VirtualBox

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

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

OVF: avoid excessive string/list copying

  • Property svn:eol-style set to native
File size: 465.7 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2008 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the<tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="MachineState"
363 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
364 >
365 <desc>
366 Virtual machine execution state.
367
368 This enumeration represents possible values of the <link
369 to="IMachine::state"/> attribute.
370
371 Below is the basic virtual machine state diagram. It shows how the state
372 changes during virtual machine execution. The text in square braces shows
373 a method of the IConsole interface that performs the given state
374 transition.
375
376 <pre>
377 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
378 V |
379 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
380 | | | | V |
381 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
382 | | ^ | ^ |
383 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
384 | ^ | | | |
385 | | +-----------------------------------------+-|-------------------+ +
386 | | | | |
387 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
388 | | | |
389 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
390 | | |
391 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
392 </pre>
393
394 Note that states to the right from PoweredOff, Aborted and Saved in the
395 above diagram are called <i>online VM states</i>. These states
396 represent the virtual machine which is being executed in a dedicated
397 process (usually with a GUI window attached to it where you can see the
398 activity of the virtual machine and interact with it). There are two
399 special pseudo-states, FirstOnline and LastOnline, that can be used in
400 relational expressions to detect if the given machine state is online or
401 not:
402
403 <pre>
404 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
405 machine.GetState() &lt;= MachineState_LastOnline)
406 {
407 ...the machine is being executed...
408 }
409 </pre>
410
411 When the virtual machine is in one of the online VM states (that is, being
412 executed), only a few machine settings can be modified. Methods working
413 with such settings contain an explicit note about that. An attempt to
414 change any oter setting or perform a modifying operation during this time
415 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
416
417 All online states except Running, Paused and Stuck are transitional: they
418 represent temporary conditions of the virtual machine that will last as
419 long as the operation that initiated such a condition.
420
421 The Stuck state is a special case. It means that execution of the machine
422 has reached the "Guru Meditation" condition. This condition indicates an
423 internal VMM (virtual machine manager) failure which may happen as a
424 result of either an unhandled low-level virtual hardware exception or one
425 of the recompiler exceptions (such as the <i>too-many-traps</i>
426 condition).
427
428 Note also that any online VM state may transit to the Aborted state. This
429 happens if the process that is executing the virtual machine terminates
430 unexpectedly (for example, crashes). Other than that, the Aborted state is
431 equivalent to PoweredOff.
432
433 There are also a few additional state diagrams that do not deal with
434 virtual machine execution and therefore are shown separately. The states
435 shown on these diagrams are called <i>offline VM states</i> (this includes
436 PoweredOff, Aborted and Saved too).
437
438 The first diagram shows what happens when a lengthy setup operation is
439 being executed (such as <link to="IMachine::attachHardDisk2()"/>).
440
441 <pre>
442 +-----------------------------------(same sate as before the call)------+
443 | |
444 +-&gt; PoweredOff --+ |
445 | | |
446 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
447 | |
448 +-&gt; Saved -------+
449 </pre>
450
451 The next two diagrams demonstrate the process of taking a snapshot of a
452 powered off virtual machine and performing one of the "discard..."
453 operations, respectively.
454
455 <pre>
456 +-----------------------------------(same sate as before the call)------+
457 | |
458 +-&gt; PoweredOff --+ |
459 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
460 +-&gt; Aborted -----+
461
462 +-&gt; PoweredOff --+
463 | |
464 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
465 | | [discardCurrentState()] |
466 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
467 | |
468 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
469 </pre>
470
471 Note that the Saving state is present in both the offline state group and
472 online state group. Currently, the only way to determine what group is
473 assumed in a particular case is to remember the previous machine state: if
474 it was Running or Paused, then Saving is an online state, otherwise it is
475 an offline state. This inconsistency may be removed in one of the future
476 versions of VirtualBox by adding a new state.
477
478 <note internal="yes">
479 For whoever decides to touch this enum: In order to keep the
480 comparisons involving FirstOnline and LastOnline pseudo-states valid,
481 the numeric values of these states must be correspondingly updated if
482 needed: for any online VM state, the condition
483 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
484 <tt>true</tt>. The same relates to transient states for which
485 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
486 <tt>true</tt>.
487 </note>
488 </desc>
489
490 <const name="Null" value="0">
491 <desc>Null value (nver used by the API).</desc>
492 </const>
493 <const name="PoweredOff" value="1">
494 <desc>
495 The machine is not running.
496 </desc>
497 </const>
498 <const name="Saved" value="2">
499 <desc>
500 The machine is not currently running, but the execution state of the machine
501 has been saved to an external file when it was running.
502 </desc>
503 </const>
504 <const name="Aborted" value="3">
505 <desc>
506 The process running the machine has terminated abnormally.
507 </desc>
508 </const>
509 <const name="Running" value="4">
510 <desc>
511 The machine is currently being executed.
512 <note internal="yes">
513 For whoever decides to touch this enum: In order to keep the
514 comparisons in the old source code valid, this state must immediately
515 precede the Paused state.
516 </note>
517 </desc>
518 </const>
519 <const name="Paused" value="5">
520 <desc>
521 Execution of the machine has been paused.
522 <note internal="yes">
523 For whoever decides to touch this enum: In order to keep the
524 comparisons in the old source code valid, this state must immediately
525 follow the Running state.
526 </note>
527 </desc>
528 </const>
529 <const name="Stuck" value="6">
530 <desc>
531 Execution of the machine has reached the "Guru Meditation"
532 condition.
533 </desc>
534 </const>
535 <const name="Starting" value="7">
536 <desc>
537 Machine is being started after powering it on from a
538 zero execution state.
539 </desc>
540 </const>
541 <const name="Stopping" value="8">
542 <desc>
543 Machine is being normally stopped powering it off, or after the guest OS
544 has initiated a shutdown sequence.
545 </desc>
546 </const>
547 <const name="Saving" value="9">
548 <desc>
549 Machine is saving its execution state to a file or an online
550 snapshot of the machine is being taken.
551 </desc>
552 </const>
553 <const name="Restoring" value="10">
554 <desc>
555 Execution state of the machine is being restored from a file
556 after powering it on from the saved execution state.
557 </desc>
558 </const>
559 <const name="Discarding" value="11">
560 <desc>
561 Snapshot of the machine is being discarded.
562 </desc>
563 </const>
564 <const name="SettingUp" value="12">
565 <desc>
566 Lengthy setup operation is in progress.
567 </desc>
568 </const>
569
570 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
571 <desc>
572 Pseudo-state: first online state (for use in relational expressions).
573 </desc>
574 </const>
575 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
576 <desc>
577 Pseudo-state: last online state (for use in relational expressions).
578 </desc>
579 </const>
580
581 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
582 <desc>
583 Pseudo-state: first transient state (for use in relational expressions).
584 </desc>
585 </const>
586 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
587 <desc>
588 Pseudo-state: last transient state (for use in relational expressions).
589 </desc>
590 </const>
591
592 </enum>
593
594 <enum
595 name="SessionState"
596 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
597 >
598 <desc>
599 Session state. This enumeration represents possible values of
600 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
601 attributes. See individual enumerator descriptions for the meaning for
602 every value.
603 </desc>
604
605 <const name="Null" value="0">
606 <desc>Null value (never used by the API).</desc>
607 </const>
608 <const name="Closed" value="1">
609 <desc>
610 The machine has no open sessions (<link to="IMachine::sessionState"/>);
611 the session is closed (<link to="ISession::state"/>)
612 </desc>
613 </const>
614 <const name="Open" value="2">
615 <desc>
616 The machine has an open direct session (<link to="IMachine::sessionState"/>);
617 the session is open (<link to="ISession::state"/>)
618 </desc>
619 </const>
620 <const name="Spawning" value="3">
621 <desc>
622 A new (direct) session is being opened for the machine
623 as a result of <link to="IVirtualBox::openRemoteSession()"/>
624 call (<link to="IMachine::sessionState"/>);
625 the session is currently being opened
626 as a result of <link to="IVirtualBox::openRemoteSession()"/>
627 call (<link to="ISession::state"/>)
628 </desc>
629 </const>
630 <const name="Closing" value="4">
631 <desc>
632 The direct session is being closed (<link to="IMachine::sessionState"/>);
633 the session is being closed (<link to="ISession::state"/>)
634 </desc>
635 </const>
636 </enum>
637
638 <enum
639 name="SessionType"
640 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
641 >
642 <desc>
643 Session type. This enumeration represents possible values of the
644 <link to="ISession::type"/> attribute.
645 </desc>
646
647 <const name="Null" value="0">
648 <desc>Null value (never used by the API).</desc>
649 </const>
650 <const name="Direct" value="1">
651 <desc>
652 Direct session
653 (opened by <link to="IVirtualBox::openSession()"/>)
654 </desc>
655 </const>
656 <const name="Remote" value="2">
657 <desc>
658 Remote session
659 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
660 </desc>
661 </const>
662 <const name="Existing" value="3">
663 <desc>
664 Existing session
665 (opened by <link to="IVirtualBox::openExistingSession()"/>)
666 </desc>
667 </const>
668 </enum>
669
670 <enum
671 name="DeviceType"
672 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
673 >
674 <desc>
675 Device type.
676 </desc>
677 <const name="Null" value="0">
678 <desc>
679 Null value, may also mean "no device" (not allowed for
680 <link to="IConsole::getDeviceActivity"/>).
681 </desc>
682 </const>
683 <const name="Floppy" value="1">
684 <desc>Floppy device.</desc>
685 </const>
686 <const name="DVD" value="2">
687 <desc>CD/DVD-ROM device.</desc>
688 </const>
689 <const name="HardDisk" value="3">
690 <desc>Hard disk device.</desc>
691 </const>
692 <const name="Network" value="4">
693 <desc>Network device.</desc>
694 </const>
695 <const name="USB" value="5">
696 <desc>USB device.</desc>
697 </const>
698 <const name="SharedFolder" value="6">
699 <desc>Shared folder device.</desc>
700 </const>
701 </enum>
702
703 <enum
704 name="DeviceActivity"
705 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
706 >
707 <desc>
708 Device activity for <link to="IConsole::getDeviceActivity"/>.
709 </desc>
710
711 <const name="Null" value="0"/>
712 <const name="Idle" value="1"/>
713 <const name="Reading" value="2"/>
714 <const name="Writing" value="3"/>
715 </enum>
716
717 <enum
718 name="StorageBus"
719 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
720 >
721 <desc>Interface bus type for storage devices.</desc>
722
723 <const name="Null" value="0">
724 <desc>Null value (never used by the API).</desc>
725 </const>
726
727 <const name="IDE" value="1"/>
728 <const name="SATA" value="2"/>
729 </enum>
730
731 <enum
732 name="ClipboardMode"
733 uuid="33364716-4008-4701-8f14-be0fa3d62950"
734 >
735 <desc>
736 Host-Guest clipboard interchange mode.
737 </desc>
738
739 <const name="Disabled" value="0"/>
740 <const name="HostToGuest" value="1"/>
741 <const name="GuestToHost" value="2"/>
742 <const name="Bidirectional" value="3"/>
743 </enum>
744
745 <enum
746 name="Scope"
747 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
748 >
749 <desc>
750 Scope of the operation.
751
752 A generic enumeration used in various methods to define the action or
753 argument scope.
754 </desc>
755
756 <const name="Global" value="0"/>
757 <const name="Machine" value="1"/>
758 <const name="Session" value="2"/>
759 </enum>
760
761 <enum
762 name="GuestStatisticType"
763 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
764 >
765 <desc>
766 Statistics type for <link to="IGuest::getStatistic"/>.
767 </desc>
768
769 <const name="CPULoad_Idle" value="0">
770 <desc>
771 Idle CPU load (0-100%) for last interval.
772 </desc>
773 </const>
774 <const name="CPULoad_Kernel" value="1">
775 <desc>
776 Kernel CPU load (0-100%) for last interval.
777 </desc>
778 </const>
779 <const name="CPULoad_User" value="2">
780 <desc>
781 User CPU load (0-100%) for last interval.
782 </desc>
783 </const>
784 <const name="Threads" value="3">
785 <desc>
786 Total number of threads in the system.
787 </desc>
788 </const>
789 <const name="Processes" value="4">
790 <desc>
791 Total number of processes in the system.
792 </desc>
793 </const>
794 <const name="Handles" value="5">
795 <desc>
796 Total number of handles in the system.
797 </desc>
798 </const>
799 <const name="MemoryLoad" value="6">
800 <desc>
801 Memory load (0-100%).
802 </desc>
803 </const>
804 <const name="PhysMemTotal" value="7">
805 <desc>
806 Total physical memory in megabytes.
807 </desc>
808 </const>
809 <const name="PhysMemAvailable" value="8">
810 <desc>
811 Free physical memory in megabytes.
812 </desc>
813 </const>
814 <const name="PhysMemBalloon" value="9">
815 <desc>
816 Ballooned physical memory in megabytes.
817 </desc>
818 </const>
819 <const name="MemCommitTotal" value="10">
820 <desc>
821 Total amount of memory in the committed state in megabytes.
822 </desc>
823 </const>
824 <const name="MemKernelTotal" value="11">
825 <desc>
826 Total amount of memory used by the guest OS's kernel in megabytes.
827 </desc>
828 </const>
829 <const name="MemKernelPaged" value="12">
830 <desc>
831 Total amount of paged memory used by the guest OS's kernel in megabytes.
832 </desc>
833 </const>
834 <const name="MemKernelNonpaged" value="13">
835 <desc>
836 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
837 </desc>
838 </const>
839 <const name="MemSystemCache" value="14">
840 <desc>
841 Total amount of memory used by the guest OS's system cache in megabytes.
842 </desc>
843 </const>
844 <const name="PageFileSize" value="15">
845 <desc>
846 Pagefile size in megabytes.
847 </desc>
848 </const>
849 <const name="SampleNumber" value="16">
850 <desc>
851 Statistics sample number
852 </desc>
853 </const>
854 <const name="MaxVal" value="17"/>
855 </enum>
856
857 <enum
858 name="BIOSBootMenuMode"
859 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
860 >
861 <desc>
862 BIOS boot menu mode.
863 </desc>
864
865 <const name="Disabled" value="0"/>
866 <const name="MenuOnly" value="1"/>
867 <const name="MessageAndMenu" value="2"/>
868 </enum>
869
870 <enum
871 name="IDEControllerType"
872 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
873 >
874 <desc>
875 IDE controller type.
876 </desc>
877
878 <const name="Null" value="0">
879 <desc>Null value (never used by the API).</desc>
880 </const>
881 <const name="PIIX3" value="1"/>
882 <const name="PIIX4" value="2"/>
883 </enum>
884
885 <enum
886 name="DriveState"
887 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
888 >
889 <const name="Null" value="0">
890 <desc>Null value (never used by the API).</desc>
891 </const>
892 <const name="NotMounted" value="1"/>
893 <const name="ImageMounted" value="2"/>
894 <const name="HostDriveCaptured" value="3"/>
895 </enum>
896
897 <enum
898 name="ProcessorFeature"
899 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
900 >
901 <desc>
902 CPU features.
903 </desc>
904
905 <const name="HWVirtEx" value="0"/>
906 <const name="PAE" value="1"/>
907 <const name="LongMode" value="2"/>
908 </enum>
909
910
911 <!--
912 // IVirtualBoxErrorInfo
913 /////////////////////////////////////////////////////////////////////////
914 -->
915
916 <interface
917 name="IVirtualBoxErrorInfo" extends="$errorinfo"
918 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
919 supportsErrorInfo="no"
920 wsmap="suppress"
921 >
922 <desc>
923 The IVirtualBoxErrorInfo interface represents extended error information.
924
925 Extended error information can be set by VirtualBox components after
926 unsuccessful or partially successful method invocation. This information
927 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
928 and then shown to the client in addition to the plain 32-bit result code.
929
930 In MS COM, this interface extends the IErrorInfo interface,
931 in XPCOM, it extends the nsIException interface. In both cases,
932 it provides a set of common attributes to retrieve error
933 information.
934
935 Sometimes invocation of some component's method may involve methods of
936 other components that may also fail (independently of this method's
937 failure), or a series of non-fatal errors may precede a fatal error that
938 causes method failure. In cases like that, it may be desirable to preserve
939 information about all errors happened during method invocation and deliver
940 it to the caller. The <link to="#next"/> attribute is intended
941 specifically for this purpose and allows to represent a chain of errors
942 through a single IVirtualBoxErrorInfo object set after method invocation.
943
944 Note that errors are stored to a chain in the reverse order, i.e. the
945 initial error object you query right after method invocation is the last
946 error set by the callee, the object it points to in the @a next attribute
947 is the previous error and so on, up to the first error (which is the last
948 in the chain).
949 </desc>
950
951 <attribute name="resultCode" type="result" readonly="yes">
952 <desc>
953 Result code of the error.
954 Usually, it will be the same as the result code returned
955 by the method that provided this error information, but not
956 always. For example, on Win32, CoCreateInstance() will most
957 likely return E_NOINTERFACE upon unsuccessful component
958 instantiation attempt, but not the value the component factory
959 returned.
960 <note>
961 In MS COM, there is no equivalent.
962 In XPCOM, it is the same as nsIException::result.
963 </note>
964 </desc>
965 </attribute>
966
967 <attribute name="interfaceID" type="uuid" readonly="yes">
968 <desc>
969 UUID of the interface that defined the error.
970 <note>
971 In MS COM, it is the same as IErrorInfo::GetGUID.
972 In XPCOM, there is no equivalent.
973 </note>
974 </desc>
975 </attribute>
976
977 <attribute name="component" type="wstring" readonly="yes">
978 <desc>
979 Name of the component that generated the error.
980 <note>
981 In MS COM, it is the same as IErrorInfo::GetSource.
982 In XPCOM, there is no equivalent.
983 </note>
984 </desc>
985 </attribute>
986
987 <attribute name="text" type="wstring" readonly="yes">
988 <desc>
989 Text description of the error.
990 <note>
991 In MS COM, it is the same as IErrorInfo::GetDescription.
992 In XPCOM, it is the same as nsIException::message.
993 </note>
994 </desc>
995 </attribute>
996
997 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
998 <desc>
999 Next error object if there is any, or @c null otherwise.
1000 <note>
1001 In MS COM, there is no equivalent.
1002 In XPCOM, it is the same as nsIException::inner.
1003 </note>
1004 </desc>
1005 </attribute>
1006
1007 </interface>
1008
1009
1010 <!--
1011 // IVirtualBox
1012 /////////////////////////////////////////////////////////////////////////
1013 -->
1014
1015 <interface
1016 name="IVirtualBoxCallback" extends="$unknown"
1017 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1018 wsmap="suppress"
1019 >
1020 <method name="onMachineStateChange">
1021 <desc>
1022 The execution state of the given machine has changed.
1023 <see>IMachine::state</see>
1024 </desc>
1025 <param name="machineId" type="uuid" dir="in">
1026 <desc>ID of the machine this event relates to.</desc>
1027 </param>
1028 <param name="state" type="MachineState" dir="in">
1029 <desc>New execution state.</desc>
1030 </param>
1031 </method>
1032
1033 <method name="onMachineDataChange">
1034 <desc>
1035 Any of the settings of the given machine has changed.
1036 </desc>
1037 <param name="machineId" type="uuid" dir="in">
1038 <desc>ID of the machine this event relates to.</desc>
1039 </param>
1040 </method>
1041
1042 <method name="onExtraDataCanChange">
1043 <desc>
1044 Notification when someone tries to change extra data for
1045 either the given machine or (if null) global extra data.
1046 This gives the chance to veto against changes.
1047 </desc>
1048 <param name="machineId" type="uuid" dir="in">
1049 <desc>
1050 ID of the machine this event relates to
1051 (null ID for global extra data change requests).
1052 </desc>
1053 </param>
1054 <param name="key" type="wstring" dir="in">
1055 <desc>
1056 Extra data key for the attempted write.
1057 </desc>
1058 </param>
1059 <param name="value" type="wstring" dir="in">
1060 <desc>
1061 Extra data value for the given key.
1062 </desc>
1063 </param>
1064 <param name="error" type="wstring" dir="out">
1065 <desc>
1066 Optional error message describing the reason of the
1067 veto (ignored if this notification returns @c true).
1068 </desc>
1069 </param>
1070 <param name="allowChange" type="boolean" dir="return">
1071 <desc>
1072 Flag to indicate whether the callee agrees (@c true)
1073 or vetoes against the change (@c false).
1074 </desc>
1075 </param>
1076 </method>
1077
1078 <method name="onExtraDataChange">
1079 <desc>
1080 Notification when machine specific or global extra data
1081 has changed.
1082 </desc>
1083 <param name="machineId" type="uuid" dir="in">
1084 <desc>
1085 ID of the machine this event relates to.
1086 Null for global extra data changes.
1087 </desc>
1088 </param>
1089 <param name="key" type="wstring" dir="in">
1090 <desc>
1091 Extra data key that has changed.
1092 </desc>
1093 </param>
1094 <param name="value" type="wstring" dir="in">
1095 <desc>
1096 Extra data value for the given key.
1097 </desc>
1098 </param>
1099 </method>
1100
1101 <method name="onMediaRegistered">
1102 <desc>
1103 The given media was registered or unregistered
1104 within this VirtualBox installation.
1105
1106 The @a mediaType parameter describes what type of
1107 media the specified @a mediaId refers to. Possible
1108 values are:
1109
1110 <ul>
1111 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1112 that, if registered, can be obtained using the
1113 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1114 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1115 that, if registered, can be obtained using the
1116 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1117 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1118 that, if registered, can be obtained using the
1119 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1120 </ul>
1121
1122 Note that if this is a deregistration notification,
1123 there is no way to access the object representing the
1124 unregistered media. It is supposed that the
1125 application will do required cleanup based on the @a
1126 mediaId value.
1127 </desc>
1128 <param name="mediaId" type="uuid" dir="in">
1129 <desc>ID of the media this event relates to.</desc>
1130 </param>
1131 <param name="mediaType" type="DeviceType" dir="in">
1132 <desc>Type of the media this event relates to.</desc>
1133 </param>
1134 <param name="registered" type="boolean" dir="in">
1135 <desc>
1136 If true, the media was registered, otherwise it was
1137 unregistered.
1138 </desc>
1139 </param>
1140 </method>
1141
1142 <method name="onMachineRegistered">
1143 <desc>
1144 The given machine was registered or unregistered
1145 within this VirtualBox installation.
1146 </desc>
1147 <param name="machineId" type="uuid" dir="in">
1148 <desc>ID of the machine this event relates to.</desc>
1149 </param>
1150 <param name="registered" type="boolean" dir="in">
1151 <desc>
1152 If true, the machine was registered, otherwise it was
1153 unregistered.
1154 </desc>
1155 </param>
1156 </method>
1157
1158 <method name="onSessionStateChange">
1159 <desc>
1160 The state of the session for the given machine was changed.
1161 <see>IMachine::sessionState</see>
1162 </desc>
1163 <param name="machineId" type="uuid" dir="in">
1164 <desc>ID of the machine this event relates to.</desc>
1165 </param>
1166 <param name="state" type="SessionState" dir="in">
1167 <desc>New session state.</desc>
1168 </param>
1169 </method>
1170
1171 <method name="onSnapshotTaken">
1172 <desc>
1173 A new snapshot of the machine has been taken.
1174 <see>ISnapshot</see>
1175 </desc>
1176 <param name="machineId" type="uuid" dir="in">
1177 <desc>ID of the machine this event relates to.</desc>
1178 </param>
1179 <param name="snapshotId" type="uuid" dir="in">
1180 <desc>ID of the new snapshot.</desc>
1181 </param>
1182 </method>
1183
1184 <method name="onSnapshotDiscarded">
1185 <desc>
1186 Snapshot of the given machine has been discarded.
1187
1188 <note>
1189 This notification is delivered <b>after</b> the snapshot
1190 object has been uninitialized on the server (so that any
1191 attempt to call its methods will return an error).
1192 </note>
1193
1194 <see>ISnapshot</see>
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>ID of the machine this event relates to.</desc>
1198 </param>
1199 <param name="snapshotId" type="uuid" dir="in">
1200 <desc>
1201 ID of the discarded snapshot. <tt>null</tt> means the
1202 current machine state has been discarded (restored from
1203 the current snapshot).
1204 </desc>
1205 </param>
1206 </method>
1207
1208 <method name="onSnapshotChange">
1209 <desc>
1210 Snapshot properties (name and/or description) have been changed.
1211 <see>ISnapshot</see>
1212 </desc>
1213 <param name="machineId" type="uuid" dir="in">
1214 <desc>ID of the machine this event relates to.</desc>
1215 </param>
1216 <param name="snapshotId" type="uuid" dir="in">
1217 <desc>ID of the changed snapshot.</desc>
1218 </param>
1219 </method>
1220
1221 <method name="onGuestPropertyChange">
1222 <desc>
1223 Notification when a guest property has changed.
1224 </desc>
1225 <param name="machineId" type="uuid" dir="in">
1226 <desc>
1227 ID of the machine this event relates to.
1228 </desc>
1229 </param>
1230 <param name="name" type="wstring" dir="in">
1231 <desc>
1232 The name of the property that has changed.
1233 </desc>
1234 </param>
1235 <param name="value" type="wstring" dir="in">
1236 <desc>
1237 The new property value.
1238 </desc>
1239 </param>
1240 <param name="flags" type="wstring" dir="in">
1241 <desc>
1242 The new property flags.
1243 </desc>
1244 </param>
1245 </method>
1246
1247 </interface>
1248
1249 <interface
1250 name="IVirtualBox" extends="$dispatched"
1251 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1252 wsmap="managed"
1253 >
1254 <desc>
1255 The IVirtualBox interface represents the main interface exposed by the
1256 product that provides virtual machine management.
1257
1258 An instance of IVirtualBox is required for the product to do anything
1259 useful. Even though the interface does not expose this, internally,
1260 IVirtualBox is implemented as a singleton and actually lives in the
1261 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1262 IVirtualBox can track the state of all virtual machines on a particular
1263 host, regardless of which frontend started them.
1264
1265 To enumerate all the virtual machines on the host, use the
1266 <link to="IVirtualBox::machines2"/> attribute.
1267 </desc>
1268
1269 <attribute name="version" type="wstring" readonly="yes">
1270 <desc>
1271 A string representing the version number of the product. The
1272 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1273 last number represents the build number and will frequently change.
1274 </desc>
1275 </attribute>
1276
1277 <attribute name="revision" type="unsigned long" readonly="yes">
1278 <desc>
1279 The internal build revision number of the product.
1280 </desc>
1281 </attribute>
1282
1283 <attribute name="packageType" type="wstring" readonly="yes">
1284 <desc>
1285 A string representing the package type of this product. The
1286 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1287 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1288 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1289 this.
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="homeFolder" type="wstring" readonly="yes">
1294 <desc>
1295 Full path to the directory where the global settings file,
1296 <tt>VirtualBox.xml</tt>, is stored.
1297
1298 In this version of VirtualBox, the value of this property is
1299 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1300 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1301 as determined by the host OS), and cannot be changed.
1302
1303 This path is also used as the base to resolve relative paths in
1304 places where relative paths are allowed (unless otherwise
1305 expressly indicated).
1306 </desc>
1307 </attribute>
1308
1309 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1310 <desc>
1311 Full name of the global settings file.
1312 The value of this property corresponds to the value of
1313 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1314 </desc>
1315 </attribute>
1316
1317 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1318 <desc>
1319 Current version of the format of the global VirtualBox settings file
1320 (<tt>VirtualBox.xml</tt>).
1321
1322 The version string has the following format:
1323 <pre>
1324 x.y-platform
1325 </pre>
1326 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1327 versions, and <tt>platform</tt> is the platform identifier.
1328
1329 The current version usually matches the value of the
1330 <link to="#settingsFormatVersion"/> attribute unless the
1331 settings file was created by an older version of VirtualBox and there
1332 was a change of the settings file format since then.
1333
1334 Note that VirtualBox automatically converts settings files from older
1335 versions to the most recent version when reading them (usually at
1336 VirtualBox startup) but it doesn't save the changes back until
1337 you call a method that implicitly saves settings (such as
1338 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1339 explicitly. Therefore, if the value of this attribute differs from the
1340 value of <link to="#settingsFormatVersion"/>, then it
1341 means that the settings file was converted but the result of the
1342 conversion is not yet saved to disk.
1343
1344 The above feature may be used by interactive front-ends to inform users
1345 about the settings file format change and offer them to explicitly save
1346 all converted settings files (the global and VM-specific ones),
1347 optionally create backup copies of the old settings files before saving,
1348 etc.
1349
1350 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1351 </desc>
1352 </attribute>
1353
1354 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1355 <desc>
1356 Most recent version of the settings file format.
1357
1358 The version string has the following format:
1359 <pre>
1360 x.y-platform
1361 </pre>
1362 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1363 versions, and <tt>platform</tt> is the platform identifier.
1364
1365 VirtualBox uses this version of the format when saving settings files
1366 (either as a result of method calls that require to save settings or as
1367 a result of an explicit call to <link to="#saveSettings()"/>).
1368
1369 <see>settingsFileVersion</see>
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="host" type="IHost" readonly="yes">
1374 <desc>Associated host object.</desc>
1375 </attribute>
1376
1377 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1378 <desc>Associated system information object.</desc>
1379 </attribute>
1380
1381 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1382 <desc>
1383 Array of machine objects registered within this VirtualBox instance.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1388 <desc>
1389 Array of hard disk objects known to this VirtualBox installation.
1390
1391 This array contains only base (root) hard disks. All differencing
1392 hard disks of the given base hard disk can be enumerated using
1393 <link to="IHardDisk2::children"/>.
1394 </desc>
1395 </attribute>
1396
1397 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1398 <desc>
1399 Array of CD/DVD image objects registered with this VirtualBox instance.
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1404 <desc>
1405 Array of floppy image objects registered with this VirtualBox instance.
1406 </desc>
1407 </attribute>
1408
1409 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1410
1411 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1412
1413 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1414 <desc>
1415 Collection of global shared folders. Global shared folders are
1416 available to all virtual machines.
1417
1418 New shared folders are added to the collection using
1419 <link to="#createSharedFolder"/>. Existing shared folders can be
1420 removed using <link to="#removeSharedFolder"/>.
1421
1422 <note>
1423 In the current version of the product, global shared folders are not
1424 implemented and therefore this collection is always empty.
1425 </note>
1426 </desc>
1427 </attribute>
1428
1429 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1430 <desc>
1431 Associated performance collector object.
1432 </desc>
1433 </attribute>
1434
1435 <method name="createMachine">
1436 <desc>
1437 Creates a new virtual machine.
1438
1439 The new machine is created unregistered, with the initial configuration
1440 set according to the specified guest OS type. A typical sequence of
1441 actions to create a new virtual machine is as follows:
1442
1443 <ol>
1444 <li>
1445 Call this method to have a new machine created. The returned machine
1446 object will be "mutable" allowing to change any machine property.
1447 </li>
1448
1449 <li>
1450 Configure the machine using the appropriate attributes and methods.
1451 </li>
1452
1453 <li>
1454 Call <link to="IMachine::saveSettings()" /> to write the settings
1455 to the machine's XML settings file. The configuration of the newly
1456 created machine will not be saved to disk until this method is
1457 called.
1458 </li>
1459
1460 <li>
1461 Call <link to="#registerMachine()" /> to add the machine to the list
1462 of machines known to VirtualBox.
1463 </li>
1464 </ol>
1465
1466 You should specify valid name for the newly created machine when calling
1467 this method. See the <link to="IMachine::name"/> attribute description
1468 for more details about the machine name.
1469
1470 The specified guest OS type identifier must match an ID of one of known
1471 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1472 array.
1473
1474 Every machine has a <i>settings file</i> that is used to store
1475 the machine configuration. This file is stored in a directory called the
1476 <i>machine settings subfolder</i>. Both the settings subfolder and file
1477 will have a name that corresponds to the name of the virtual machine.
1478 You can specify where to create the machine setting subfolder using the
1479 @a baseFolder argument. The base folder can be absolute (full path) or
1480 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1481 directory</link>.
1482
1483 If @a baseFolder is a null or empty string (which is recommended), the
1484 <link to="ISystemProperties::defaultMachineFolder">default machine
1485 settings folder</link> will be used as a base folder for the created
1486 machine. Otherwise the given base folder will be used. In either case,
1487 the full path to the resulting settings file has the following
1488 structure:
1489 <pre>
1490 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1491 </pre>
1492
1493 Note that if the resulting settings file already exists, this method
1494 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1495
1496 Optionally, you may specify an UUID of to assign to the created machine.
1497 However, this is not recommended and you should normally pass an empty
1498 (null) UUID to this method so that a new UUID will be automatically
1499 generated for every created machine.
1500
1501 <note>
1502 There is no way to change the name of the settings file or
1503 subfolder of the created machine directly.
1504 </note>
1505
1506 <result name="VBOX_E_OBJECT_NOT_FOUND">
1507 @a osTypeId is invalid.
1508 </result>
1509 <result name="VBOX_E_FILE_ERROR">
1510 Resulting settings file name is invalid or the settings file already
1511 exists or could not be created due to an I/O error.
1512 </result>
1513 <result name="E_INVALIDARG">
1514 @a name is empty or null.
1515 </result>
1516 </desc>
1517
1518 <param name="name" type="wstring" dir="in">
1519 <desc>Machine name.</desc>
1520 </param>
1521 <param name="osTypeId" type="wstring" dir="in">
1522 <desc>Guest OS Type ID.</desc>
1523 </param>
1524 <param name="baseFolder" type="wstring" dir="in">
1525 <desc>Base machine folder (optional).</desc>
1526 </param>
1527 <param name="id" type="uuid" dir="in">
1528 <desc>Machine UUID (optional).</desc>
1529 </param>
1530 <param name="machine" type="IMachine" dir="return">
1531 <desc>Created machine object.</desc>
1532 </param>
1533 </method>
1534
1535 <method name="createLegacyMachine">
1536 <desc>
1537 Creates a new virtual machine in "legacy" mode, using the specified
1538 settings file to store machine settings.
1539
1540 As opposed to machines created by <link to="#createMachine()"/>,
1541 the settings file of the machine created in "legacy" mode is not
1542 automatically renamed when the machine name is changed -- it will always
1543 remain the same as specified in this method call.
1544
1545 The specified settings file name can be absolute (full path) or relative
1546 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1547 directory</link>. If the file name doesn't contain an extension, the
1548 default extension (.xml) will be appended.
1549
1550 Note that the configuration of the newly created machine is not
1551 saved to disk (and therefore no settings file is created)
1552 until <link to="IMachine::saveSettings()"/> is called. If the
1553 specified settings file already exists, this method
1554 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1555
1556 See <link to="#createMachine()"/> for more information.
1557
1558 @deprecated This method may be removed later. Use <link
1559 to="IVirtualBox::createMachine()"/> instead.
1560
1561 <note>
1562 There is no way to change the name of the settings file
1563 of the machine created in "legacy" mode.
1564 </note>
1565
1566 <result name="VBOX_E_OBJECT_NOT_FOUND">
1567 @a osTypeId is invalid.
1568 </result>
1569 <result name="VBOX_E_FILE_ERROR">
1570 @a settingsFile is invalid or the settings file already exists or
1571 could not be created due to an I/O error.
1572 </result>
1573 <result name="E_INVALIDARG">
1574 @a name or @a settingsFile is empty or null.
1575 </result>
1576 </desc>
1577
1578 <param name="name" type="wstring" dir="in">
1579 <desc>Machine name.</desc>
1580 </param>
1581 <param name="osTypeId" type="wstring" dir="in">
1582 <desc>Machine OS Type ID.</desc>
1583 </param>
1584 <param name="settingsFile" type="wstring" dir="in">
1585 <desc>Name of the machine settings file.</desc>
1586 </param>
1587 <param name="id" type="uuid" dir="in">
1588 <desc>Machine UUID (optional).</desc>
1589 </param>
1590 <param name="machine" type="IMachine" dir="return">
1591 <desc>Created machine object.</desc>
1592 </param>
1593 </method>
1594
1595 <method name="openMachine">
1596 <desc>
1597 Opens a virtual machine from the existing settings file.
1598 The opened machine remains unregistered until you call
1599 <link to="#registerMachine()"/>.
1600
1601 The specified settings file name can be absolute
1602 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1603 VirtualBox home directory</link>. This file must exist
1604 and must be a valid machine settings file whose contents
1605 will be used to construct the machine object.
1606
1607 @deprecated Will be removed soon.
1608 <result name="VBOX_E_FILE_ERROR">
1609 Settings file name invalid, not found or sharing violation.
1610 </result>
1611 </desc>
1612 <param name="settingsFile" type="wstring" dir="in">
1613 <desc>
1614 Name of the machine settings file.
1615 </desc>
1616 </param>
1617 <param name="machine" type="IMachine" dir="return">
1618 <desc>Opened machine object.</desc>
1619 </param>
1620 <note>
1621 <link to="IMachine::settingsModified"/> will return
1622 false for the created machine, until any of machine settings
1623 are changed.
1624 </note>
1625 </method>
1626
1627 <method name="registerMachine">
1628 <desc>
1629
1630 Registers the machine previously created using
1631 <link to="#createMachine()"/> or opened using
1632 <link to="#openMachine()"/> within this VirtualBox installation. After
1633 successful method invocation, the
1634 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1635 to all registered callbacks.
1636
1637 <note>
1638 This method implicitly calls <link to="IMachine::saveSettings"/>
1639 to save all current machine settings before registering it.
1640 </note>
1641
1642 <result name="VBOX_E_OBJECT_NOT_FOUND">
1643 No matching virtual machine found.
1644 </result>
1645 <result name="VBOX_E_INVALID_OBJECT_STATE">
1646 Virtual machine was not created within this VirtualBox instance.
1647 </result>
1648
1649 </desc>
1650 <param name="machine" type="IMachine" dir="in"/>
1651 </method>
1652
1653 <method name="getMachine">
1654 <desc>
1655 Attempts to find a virtual machine given its UUID.
1656 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1657 instead.
1658
1659 <result name="VBOX_E_OBJECT_NOT_FOUND">
1660 Could not find registered machine matching @a id.
1661 </result>
1662
1663 </desc>
1664 <param name="id" type="uuid" dir="in"/>
1665 <param name="machine" type="IMachine" dir="return"/>
1666 </method>
1667
1668 <method name="findMachine">
1669 <desc>
1670 Attempts to find a virtual machine given its name.
1671 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1672 instead.
1673
1674 <result name="VBOX_E_OBJECT_NOT_FOUND">
1675 Could not find registered machine matching @a name.
1676 </result>
1677
1678 </desc>
1679 <param name="name" type="wstring" dir="in"/>
1680 <param name="machine" type="IMachine" dir="return"/>
1681 </method>
1682
1683 <method name="unregisterMachine">
1684 <desc>
1685
1686 Unregisters the machine previously registered using
1687 <link to="#registerMachine"/>. After successful method invocation, the
1688 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1689 to all registered callbacks.
1690
1691 <note>
1692 The specified machine must not be in the Saved state, have an open
1693 (or a spawning) direct session associated with it, have snapshots or
1694 have hard disks attached.
1695 </note>
1696
1697 <note>
1698 This method implicitly calls <link to="IMachine::saveSettings"/> to
1699 save all current machine settings before unregistering it.
1700 </note>
1701
1702 <note>
1703 If the given machine is inaccessible (see
1704 <link to="IMachine::accessible"/>), it will be unregistered and
1705 fully uninitialized right afterwards. As a result, the returned
1706 machine object will be unusable and an attempt to call
1707 <b>any</b> method will return the "Object not ready" error.
1708 </note>
1709
1710 <result name="VBOX_E_OBJECT_NOT_FOUND">
1711 Could not find registered machine matching @a id.
1712 </result>
1713 <result name="VBOX_E_INVALID_VM_STATE">
1714 Machine is in Saved state.
1715 </result>
1716 <result name="VBOX_E_INVALID_OBJECT_STATE">
1717 Machine has snapshot or open session or hard disk attached.
1718 </result>
1719
1720 </desc>
1721 <param name="id" type="uuid" dir="in">
1722 <desc>UUID of the machine to unregister.</desc>
1723 </param>
1724 <param name="machine" type="IMachine" dir="return">
1725 <desc>Unregistered machine object.</desc>
1726 </param>
1727 </method>
1728
1729 <method name="openAppliance">
1730 <desc>
1731 Attempts to open the given appliance, which must be in Open Virtual Machine Format (OVF).
1732
1733 As prescribed by the OVF standard, VirtualBox supports OVF in two formats:
1734
1735 <ol>
1736 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
1737 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
1738 this descriptor file references other files, as OVF appliances distributed as a set of
1739 files most likely do, those files must be in the same directory as the descriptor file.</li>
1740
1741 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
1742 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
1743 files and optionally other files.</li>
1744 </ol>
1745
1746 In both cases, VirtualBox will open the OVF descriptor file, parse its contents and create a
1747 new instance of IAppliance representing the OVF file.
1748
1749 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
1750 returned IAppliance object can then be used to retrieve information about the appliance and
1751 import it into VirtualBox. The mere fact that this method returns successfully does not mean
1752 that VirtualBox supports all features requested by the appliance; see the documentation for
1753 <link to="IAppliance" /> for details.
1754
1755 </desc>
1756 <param name="file" type="wstring" dir="in">
1757 <desc>
1758 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
1759 on whether the appliance is distributed as a set of files or as a single file, respectively).
1760 </desc>
1761 </param>
1762 <param name="machine" type="IAppliance" dir="return">
1763 <desc>New appliance.</desc>
1764 </param>
1765 </method>
1766
1767 <method name="createHardDisk2">
1768 <desc>
1769 Creates a new base hard disk object that will use the given storage
1770 format and location for hard disk data.
1771
1772 Note that the actual storage unit is not created by this method. In
1773 order to do it, and before you are able to attach the created hard disk
1774 to virtual machines, you must call one of the following methods to
1775 allocate a format-specific storage unit at the specified location:
1776 <ul>
1777 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1778 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1779 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1780 </ul>
1781
1782 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1783 remain uninitialized until the hard disk storage unit is successfully
1784 created by one of the above methods.
1785
1786 After the storage unit is successfully created, the hard disk gets
1787 remembered by this VirtualBox installation and will be accessible
1788 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1789 methods. Remembered root (base) hard disks are also returned as part of
1790 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1791
1792 The list of all storage formats supported by this VirtualBox
1793 installation can be obtained using
1794 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1795 attribute is empty or <tt>null</tt> then the default storage format
1796 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1797 be used for creating a storage unit of the hard disk.
1798
1799 Note that the format of the location string is storage format specific.
1800 See <link to="IMedium::location"/>, IHardDisk2 and
1801 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1802
1803 <result name="VBOX_E_OBJECT_NOT_FOUND">
1804 @a format identifier is invalid. See
1805 <link to="ISystemProperties::hardDiskFormats"/>.
1806 </result>
1807 <result name="VBOX_E_FILE_ERROR">
1808 @a location is a not valid file name (for file-based formats only).
1809 </result>
1810 <result name="E_INVALIDARG">
1811 @a format is a null or empty string.
1812 </result>
1813 </desc>
1814 <param name="format" type="wstring" dir="in">
1815 <desc>
1816 Identifier of the storage format to use for the new hard disk.
1817 </desc>
1818 </param>
1819 <param name="location" type="wstring" dir="in">
1820 <desc>
1821 Location of the storage unit for the new hard disk.
1822 </desc>
1823 </param>
1824 <param name="hardDisk" type="IHardDisk2" dir="return">
1825 <desc>Created hard disk object.</desc>
1826 </param>
1827 </method>
1828
1829 <method name="openHardDisk2">
1830 <desc>
1831 Opens a hard disk from an existing location.
1832
1833 After the hard disk is successfully opened by this method, it gets
1834 remembered by (known to) this VirtualBox installation and will be
1835 accessible through <link to="#getHardDisk2()"/> and
1836 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1837 are also returned as part of the <link to="#hardDisks2"/> array and can
1838 be attached to virtual machines. See IHardDisk2 for more details.
1839
1840 If a differencing hard disk is to be opened by this method, the
1841 operation will succeed only if its parent hard disk and all ancestors,
1842 if any, are already known to this VirtualBox installation (for example,
1843 were opened by this method before).
1844
1845 This method tries to guess the storage format of the specified hard disk
1846 by reading hard disk data at the specified location.
1847
1848 Note that the format of the location string is storage format specific.
1849 See <link to="IMedium::location"/>, IHardDisk2 and
1850 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1851
1852
1853 <result name="VBOX_E_FILE_ERROR">
1854 Invalid hard disk storage file location.
1855 </result>
1856 <result name="VBOX_E_IPRT_ERROR">
1857 Could not get hard disk storage format.
1858 </result>
1859 <result name="E_INVALIDARG">
1860 Invalid hard disk storage format.
1861 </result>
1862
1863 </desc>
1864 <param name="location" type="wstring" dir="in">
1865 <desc>
1866 Location of the storage unit that contains hard disk data in one of
1867 the supported storage formats.
1868 </desc>
1869 </param>
1870 <param name="hardDisk" type="IHardDisk2" dir="return">
1871 <desc>Opened hard disk object.</desc>
1872 </param>
1873 </method>
1874
1875 <method name="getHardDisk2" const="yes">
1876 <desc>
1877 Returns a hard disk with the given UUID.
1878
1879 The hard disk with the given UUID must be known to this VirtualBox
1880 installation, i.e. it must be previously created by
1881 <link to="#createHardDisk2()"/> or opened by <link
1882 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1883
1884 <result name="VBOX_E_OBJECT_NOT_FOUND">
1885 No hard disk object matching @a id found.
1886 </result>
1887
1888 </desc>
1889 <param name="id" type="uuid" dir="in">
1890 <desc>UUID of the hard disk to look for.</desc>
1891 </param>
1892 <param name="hardDisk" type="IHardDisk2" dir="return">
1893 <desc>Found hard disk object.</desc>
1894 </param>
1895 </method>
1896
1897 <method name="findHardDisk2">
1898 <desc>
1899 Returns a hard disk that uses the given location to store hard
1900 disk data.
1901
1902 The given hard disk must be known to this VirtualBox installation, i.e.
1903 it must be previously created by
1904 <link to="#createHardDisk2()"/> or opened by <link
1905 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1906
1907 The search is done by comparing the value of the @a location argument to
1908 the <link to="IHardDisk2::location"/> attribute of each known hard
1909 disk.
1910
1911 For locations represented by file names in the host's file system, the
1912 requested location can be a path relative to the
1913 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1914 only a file name without any path is given, the
1915 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1916 folder</link> will be prepended to the file name before searching. Note
1917 that on case sensitive file systems, a case sensitive comparison is
1918 performed, otherwise the case of symbols in the file path is ignored.
1919
1920 <result name="VBOX_E_OBJECT_NOT_FOUND">
1921 No hard disk object matching @a location found.
1922 </result>
1923
1924 </desc>
1925 <param name="location" type="wstring" dir="in">
1926 <desc>Location string to search for.</desc>
1927 </param>
1928 <param name="hardDisk" type="IHardDisk2" dir="return">
1929 <desc>Found hard disk object.</desc>
1930 </param>
1931 </method>
1932
1933 <method name="openDVDImage">
1934 <desc>
1935 Opens a CD/DVD image contained in the specified file of the supported
1936 format and assigns it the given UUID.
1937
1938 After the image is successfully opened by this method, it gets
1939 remembered by (known to) this VirtualBox installation and will be
1940 accessible through <link to="#getDVDImage()"/> and
1941 <link to="#findDVDImage()"/> methods. Remembered images are also
1942 returned as part of the <link to="#DVDImages"/> array and can be mounted
1943 to virtual machines. See IMedium for more details.
1944
1945 See <link to="IMedium::location"/> to get more details about the format
1946 of the location string.
1947
1948 <note>
1949 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1950 </note>
1951
1952 <result name="VBOX_E_INVALID_OBJECT_STATE">
1953 CD/DVD image already exists in the media registry.
1954 </result>
1955
1956 </desc>
1957 <param name="location" type="wstring" dir="in">
1958 <desc>
1959 Full path to the file that contains a valid CD/DVD image.
1960 </desc>
1961 </param>
1962 <param name="id" type="uuid" dir="in">
1963 <desc>
1964 UUID to assign to the given image within this VirtualBox installation.
1965 If an empty (null) UUID is specified, the system will randomly
1966 generate a new UUID.
1967 </desc>
1968 </param>
1969 <param name="image" type="IDVDImage2" dir="return">
1970 <desc>Opened CD/DVD image object.</desc>
1971 </param>
1972 </method>
1973
1974 <method name="getDVDImage">
1975 <desc>
1976 Returns a CD/DVD image with the given UUID.
1977
1978 The image with the given UUID must be known to this VirtualBox
1979 installation, i.e. it must be previously opened by <link
1980 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1981
1982 <result name="VBOX_E_OBJECT_NOT_FOUND">
1983 No matching DVD image found in the media registry.
1984 </result>
1985
1986 </desc>
1987 <param name="id" type="uuid" dir="in">
1988 <desc>UUID of the image to look for.</desc>
1989 </param>
1990 <param name="image" type="IDVDImage2" dir="return">
1991 <desc>Found CD/DVD image object.</desc>
1992 </param>
1993 </method>
1994
1995 <method name="findDVDImage">
1996 <desc>
1997 Returns a CD/DVD image with the given image location.
1998
1999 The image with the given UUID must be known to this VirtualBox
2000 installation, i.e. it must be previously opened by <link
2001 to="#openDVDImage()"/>, or mounted to some known virtual machine.
2002
2003 The search is done by comparing the value of the @a location argument to
2004 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2005
2006 The requested location can be a path relative to the
2007 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2008 only a file name without any path is given, the
2009 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2010 folder</link> will be prepended to the file name before searching. Note
2011 that on case sensitive file systems, a case sensitive comparison is
2012 performed, otherwise the case in the file path is ignored.
2013
2014 <result name="VBOX_E_FILE_ERROR">
2015 Invalid image file location.
2016 </result>
2017 <result name="VBOX_E_OBJECT_NOT_FOUND">
2018 No matching DVD image found in the media registry.
2019 </result>
2020
2021 </desc>
2022 <param name="location" type="wstring" dir="in">
2023 <desc>CD/DVD image file path to look for.</desc>
2024 </param>
2025 <param name="image" type="IDVDImage2" dir="return">
2026 <desc>Found CD/DVD image object.</desc>
2027 </param>
2028 </method>
2029
2030 <method name="openFloppyImage">
2031 <desc>
2032 Opens a floppy image contained in the specified file of the supported
2033 format and assigns it the given UUID.
2034
2035 After the image is successfully opened by this method, it gets
2036 remembered by (known to) this VirtualBox installation and will be
2037 accessible through <link to="#getFloppyImage()"/> and
2038 <link to="#findFloppyImage()"/> methods. Remembered images are also
2039 returned as part of the <link to="#floppyImages"/> array and can be
2040 mounted to virtual machines. See IMedium for more details.
2041
2042 See <link to="IMedium::location"/> to get more details about the format
2043 of the location string.
2044
2045 <result name="VBOX_E_FILE_ERROR">
2046 Floppy image specified by @a location not accessible.
2047 </result>
2048 <result name="VBOX_E_INVALID_OBJECT_STATE">
2049 Floppy image already exists in the media registry.
2050 </result>
2051
2052 <note>
2053 Currently, only raw floppy images are supported by VirtualBox.
2054 </note>
2055 </desc>
2056 <param name="location" type="wstring" dir="in">
2057 <desc>
2058 Full path to the file that contains a valid floppy image.
2059 </desc>
2060 </param>
2061 <param name="id" type="uuid" dir="in">
2062 <desc>
2063 UUID to assign to the given image file within this VirtualBox
2064 installation. If an empty (null) UUID is specified, the system will
2065 randomly generate a new UUID.
2066 </desc>
2067 </param>
2068 <param name="image" type="IFloppyImage2" dir="return">
2069 <desc>Opened floppy image object.</desc>
2070 </param>
2071 </method>
2072
2073 <method name="getFloppyImage">
2074 <desc>
2075 Returns a floppy image with the given UUID.
2076
2077 The image with the given UUID must be known to this VirtualBox
2078 installation, i.e. it must be previously opened by <link
2079 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2080
2081 <result name="VBOX_E_OBJECT_NOT_FOUND">
2082 No matching floppy image found in the media registry.
2083 </result>
2084
2085 </desc>
2086 <param name="id" type="uuid" dir="in">
2087 <desc>UUID of the image to look for.</desc>
2088 </param>
2089 <param name="image" type="IFloppyImage2" dir="return">
2090 <desc>Found floppy image object.</desc>
2091 </param>
2092 </method>
2093
2094 <method name="findFloppyImage">
2095 <desc>
2096 Returns a floppy image with the given image location.
2097
2098 The image with the given UUID must be known to this VirtualBox
2099 installation, i.e. it must be previously opened by <link
2100 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2101
2102 The search is done by comparing the value of the @a location argument to
2103 the <link to="IMedium::location"/> attribute of each known floppy image.
2104
2105 The requested location can be a path relative to the
2106 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2107 only a file name without any path is given, the
2108 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2109 folder</link> will be prepended to the file name before searching. Note
2110 that on case sensitive file systems, a case sensitive comparison is
2111 performed, otherwise the case of symbols in the file path is ignored.
2112
2113 <result name="VBOX_E_FILE_ERROR">
2114 Invalid image file location.
2115 </result>
2116 <result name="VBOX_E_OBJECT_NOT_FOUND">
2117 No matching floppy image found in the media registry.
2118 </result>
2119
2120 </desc>
2121 <param name="location" type="wstring" dir="in">
2122 <desc>Floppy image file path to look for.</desc>
2123 </param>
2124 <param name="image" type="IFloppyImage2" dir="return">
2125 <desc>Found floppy image object.</desc>
2126 </param>
2127 </method>
2128
2129 <method name="getGuestOSType">
2130 <desc>
2131 Returns an object describing the specified guest OS type.
2132
2133 The requested guest OS type is specified using a string which is a
2134 mnemonic identifier of the guest operating system, such as
2135 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2136 particular virtual machine can be read or set using the
2137 <link to="IMachine::OSTypeId"/> attribute.
2138
2139 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2140 available guest OS type objects. Each object has an
2141 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2142 the guest OS this object describes.
2143
2144 <result name="E_INVALIDARG">
2145 @a id is not a valid Guest OS type.
2146 </result>
2147
2148 </desc>
2149 <param name="id" type="wstring" dir="in">
2150 <desc>Guest OS type ID string.</desc>
2151 </param>
2152 <param name="type" type="IGuestOSType" dir="return">
2153 <desc>Guest OS type object.</desc>
2154 </param>
2155 </method>
2156
2157 <method name="createSharedFolder">
2158 <desc>
2159 Creates a new global shared folder by associating the given logical
2160 name with the given host path, adds it to the collection of shared
2161 folders and starts sharing it. Refer to the description of
2162 <link to="ISharedFolder"/> to read more about logical names.
2163 <note>
2164 In the current implementation, this operation is not
2165 implemented.
2166 </note>
2167 </desc>
2168 <param name="name" type="wstring" dir="in">
2169 <desc>Unique logical name of the shared folder.</desc>
2170 </param>
2171 <param name="hostPath" type="wstring" dir="in">
2172 <desc>Full path to the shared folder in the host file system.</desc>
2173 </param>
2174 <param name="writable" type="boolean" dir="in">
2175 <desc>Whether the share is writable or readonly</desc>
2176 </param>
2177 </method>
2178
2179 <method name="removeSharedFolder">
2180 <desc>
2181 Removes the global shared folder with the given name previously
2182 created by <link to="#createSharedFolder"/> from the collection of
2183 shared folders and stops sharing it.
2184 <note>
2185 In the current implementation, this operation is not
2186 implemented.
2187 </note>
2188 </desc>
2189 <param name="name" type="wstring" dir="in">
2190 <desc>Logical name of the shared folder to remove.</desc>
2191 </param>
2192 </method>
2193
2194 <method name="getNextExtraDataKey">
2195 <desc>
2196 Returns the global extra data key name following the supplied key.
2197
2198 An error is returned if the supplied @a key does not exist. @c NULL is
2199 returned in @a nextKey if the supplied key is the last key. When
2200 supplying @c NULL for the @a key, the first key item is returned in @a
2201 nextKey (if there is any). @a nextValue is an optional parameter and
2202 if supplied, the next key's value is returned in it.
2203
2204 <result name="VBOX_E_OBJECT_NOT_FOUND">
2205 Extra data @a key not found.
2206 </result>
2207
2208 </desc>
2209 <param name="key" type="wstring" dir="in">
2210 <desc>Name of the data key to follow.</desc>
2211 </param>
2212 <param name="nextKey" type="wstring" dir="out">
2213 <desc>Name of the next data key.</desc>
2214 </param>
2215 <param name="nextValue" type="wstring" dir="out">
2216 <desc>Value of the next data key.</desc>
2217 </param>
2218 </method>
2219
2220 <method name="getExtraData">
2221 <desc>
2222 Returns associated global extra data.
2223
2224 If the requested data @a key does not exist, this function will
2225 succeed and return @c NULL in the @a value argument.
2226
2227 <result name="VBOX_E_FILE_ERROR">
2228 Settings file not accessible.
2229 </result>
2230 <result name="VBOX_E_XML_ERROR">
2231 Could not parse the settings file.
2232 </result>
2233
2234 </desc>
2235 <param name="key" type="wstring" dir="in">
2236 <desc>Name of the data key to get.</desc>
2237 </param>
2238 <param name="value" type="wstring" dir="return">
2239 <desc>Value of the requested data key.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="setExtraData">
2244 <desc>
2245 Sets associated global extra data.
2246
2247 If you pass @c NULL as a key @a value, the given @a key will be
2248 deleted.
2249
2250 <note>
2251 Before performing the actual data change, this method will ask all
2252 registered callbacks using the
2253 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2254 notification for a permission. If one of the callbacks refuses the
2255 new value, the change will not be performed.
2256 </note>
2257 <note>
2258 On success, the
2259 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2260 is called to inform all registered callbacks about a successful data
2261 change.
2262 </note>
2263
2264 <result name="VBOX_E_FILE_ERROR">
2265 Settings file not accessible.
2266 </result>
2267 <result name="VBOX_E_XML_ERROR">
2268 Could not parse the settings file.
2269 </result>
2270 <result name="E_ACCESSDENIED">
2271 Modification request refused.
2272 </result>
2273
2274 </desc>
2275 <param name="key" type="wstring" dir="in">
2276 <desc>Name of the data key to set.</desc>
2277 </param>
2278 <param name="value" type="wstring" dir="in">
2279 <desc>Value to assign to the key.</desc>
2280 </param>
2281 </method>
2282
2283 <method name="openSession">
2284 <desc>
2285 Opens a new direct session with the given virtual machine.
2286
2287 A direct session acts as a local lock on the given VM.
2288 There can be only one direct session open at a time for every
2289 virtual machine, protecting the VM from being manipulated by
2290 conflicting actions from different processes. Only after a
2291 direct session has been opened, one can change all VM settings
2292 and execute the VM in the process space of the session object.
2293
2294 Sessions therefore can be compared to mutex semaphores that
2295 lock a given VM for modification and execution.
2296 See <link to="ISession">ISession</link> for details.
2297
2298 <note>Unless you are writing a new VM frontend, you will not
2299 want to execute a VM in the current process. To spawn a new
2300 process that executes a VM, use
2301 <link to="IVirtualBox::openRemoteSession" />
2302 instead.</note>
2303
2304 Upon successful return, the session object can be used to
2305 get access to the machine and to the VM console.
2306
2307 In VirtualBox terminology, the machine becomes "mutable" after
2308 a session has been opened. Note that the "mutable" machine
2309 object, on which you may invoke IMachine methods to change its
2310 settings, will be a different object from the immutable IMachine
2311 objects returned by various IVirtualBox methods. To obtain a
2312 mutable IMachine object (upon which you can invoke settings methods),
2313 use the <link to="ISession::machine" /> attribute.
2314
2315 One must always call <link to="ISession::close" /> to release the
2316 lock on the machine, or the machine's state will eventually be
2317 set to "Aborted".
2318
2319 In other words, to change settings on a machine, the following
2320 sequence is typically performed:
2321
2322 <ol>
2323 <li>Call this method (openSession) to have a machine locked for
2324 the current session.</li>
2325
2326 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2327
2328 <li>Change the settings of the machine.</li>
2329
2330 <li>Call <link to="IMachine::saveSettings" />.</li>
2331
2332 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2333 </ol>
2334
2335 <result name="E_UNEXPECTED">
2336 Virtual machine not registered.
2337 </result>
2338 <result name="E_ACCESSDENIED">
2339 Process not started by OpenRemoteSession.
2340 </result>
2341 <result name="VBOX_E_OBJECT_NOT_FOUND">
2342 No matching virtual machine found.
2343 </result>
2344 <result name="VBOX_E_INVALID_OBJECT_STATE">
2345 Session already open or being opened.
2346 </result>
2347 <result name="VBOX_E_VM_ERROR">
2348 Failed to assign machine to session.
2349 </result>
2350
2351 </desc>
2352 <param name="session" type="ISession" dir="in">
2353 <desc>
2354 Session object that will represent the opened session after
2355 successful method invocation. This object must not represent
2356 the already open session.
2357 <note>
2358 This session will be automatically closed if the
2359 VirtualBox server is terminated for some reason.
2360 </note>
2361 </desc>
2362 </param>
2363 <param name="machineId" type="uuid" dir="in">
2364 <desc>ID of the virtual machine to open a session with.</desc>
2365 </param>
2366 </method>
2367
2368 <method name="openRemoteSession">
2369 <desc>
2370 Spawns a new process that executes a virtual machine (called a
2371 "remote session").
2372
2373 Opening a remote session causes the VirtualBox server to start a new
2374 process that opens a direct session with the given VM. As a result, the
2375 VM is locked by that direct session in the new process, preventing
2376 conflicting changes from other processes. Since sessions act as locks
2377 that such prevent conflicting changes, one cannot open a remote session
2378 for a VM that already has another open session (direct or remote), or
2379 is currently in the process of opening one (see <link
2380 to="IMachine::sessionState"/>).
2381
2382 While the remote session still provides some level of control over the
2383 VM execution to the caller (using the <link to="IConsole" /> interface),
2384 not all VM settings are available for modification within the remote
2385 session context.
2386
2387 This operation can take some time (a new VM is started in a new process,
2388 for which memory and other resources need to be set up). Because of this,
2389 an <link to="IProgress" /> is returned to allow the caller to wait for this
2390 asynchronous operation to be completed. Until then, the remote session
2391 object remains in the closed state, and accessing the machine or its
2392 console through it is invalid. It is recommended to use
2393 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2394 completion.
2395
2396 As with all <link to="ISession" /> objects, it is recommended to call
2397 <link to="ISession::close" /> on the local session object once openRemoteSession()
2398 has been called. However, the session's state (see <link to="ISession::state" />)
2399 will not return to "Closed" until the remote session has also closed (i.e.
2400 until the VM is no longer running). In that case, however, the state of
2401 the session will automatically change back to "Closed".
2402
2403 Currently supported session types (values of the @a type
2404 argument) are:
2405 <ul>
2406 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2407 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2408 </ul>
2409
2410 The @a environment argument is a string containing definitions of
2411 environment variables in the following format:
2412 @code
2413 NAME[=VALUE]\n
2414 NAME[=VALUE]\n
2415 ...
2416 @endcode
2417 where <tt>\\n</tt> is the new line character. These environment
2418 variables will be appended to the environment of the VirtualBox server
2419 process. If an environment variable exists both in the server process
2420 and in this list, the value from this list takes precedence over the
2421 server's variable. If the value of the environment variable is
2422 omitted, this variable will be removed from the resulting environment.
2423 If the environment string is @c null, the server environment is
2424 inherited by the started process as is.
2425
2426 <see>openExistingSession</see>
2427
2428 <result name="E_UNEXPECTED">
2429 Virtual machine not registered.
2430 </result>
2431 <result name="E_INVALIDARG">
2432 Invalid session type @a type.
2433 </result>
2434 <result name="VBOX_E_OBJECT_NOT_FOUND">
2435 No machine matching @a machineId found.
2436 </result>
2437 <result name="VBOX_E_INVALID_OBJECT_STATE">
2438 Session already open or being opened.
2439 </result>
2440 <result name="VBOX_E_IPRT_ERROR">
2441 Launching process for machine failed.
2442 </result>
2443 <result name="VBOX_E_VM_ERROR">
2444 Failed to assign machine to session.
2445 </result>
2446
2447 </desc>
2448 <param name="session" type="ISession" dir="in">
2449 <desc>
2450 Session object that will represent the opened remote session
2451 after successful method invocation (this object must not
2452 represent an already open session).
2453 </desc>
2454 </param>
2455 <param name="machineId" type="uuid" dir="in">
2456 <desc>ID of the virtual machine to open a session with.</desc>
2457 </param>
2458 <param name="type" type="wstring" dir="in">
2459 <desc>
2460 Type of the remote session (case sensitive).
2461 </desc>
2462 </param>
2463 <param name="environment" type="wstring" dir="in">
2464 <desc>
2465 Environment to pass to the opened session (may be @c null).
2466 </desc>
2467 </param>
2468 <param name="progress" type="IProgress" dir="return">
2469 <desc>Progress object to track the operation completion.</desc>
2470 </param>
2471 </method>
2472
2473 <method name="openExistingSession">
2474 <desc>
2475 Opens a new remote session with the virtual machine for
2476 which a direct session is already open.
2477
2478 The remote session provides some level of control over the VM
2479 execution (using the IConsole interface) to the caller; however,
2480 within the remote session context, not all VM settings are available
2481 for modification.
2482
2483 As opposed to <link to="#openRemoteSession()"/>, the number of
2484 remote sessions opened this way is not limited by the API
2485
2486 <note>
2487 It is an error to open a remote session with the machine that
2488 doesn't have an open direct session.
2489 </note>
2490
2491 <result name="E_UNEXPECTED">
2492 Virtual machine not registered.
2493 </result>
2494 <result name="VBOX_E_OBJECT_NOT_FOUND">
2495 No machine matching @a machineId found.
2496 </result>
2497 <result name="VBOX_E_INVALID_OBJECT_STATE">
2498 Session already open or being opened.
2499 </result>
2500 <result name="VBOX_E_INVALID_SESSION_STATE">
2501 Direct session state not Open.
2502 </result>
2503 <result name="VBOX_E_VM_ERROR">
2504 Failed to get console object from direct session or assign
2505 machine to session.
2506 </result>
2507
2508 <see>openRemoteSession</see>
2509 </desc>
2510 <param name="session" type="ISession" dir="in">
2511 <desc>
2512 Session object that will represent the open remote session
2513 after successful method invocation. This object must not
2514 represent an already open session.
2515 <note>
2516 This session will be automatically closed when the peer
2517 (direct) session dies or gets closed.
2518 </note>
2519 </desc>
2520 </param>
2521 <param name="machineId" type="uuid" dir="in">
2522 <desc>ID of the virtual machine to open a session with.</desc>
2523 </param>
2524 </method>
2525
2526 <method name="registerCallback">
2527 <desc>
2528 Registers a new global VirtualBox callback. The methods of the given
2529 callback object will be called by VirtualBox when an appropriate
2530 event occurs.
2531
2532 <result name="E_INVALIDARG">
2533 Registering a @c NULL @a callback is pretty pointless, ain't it?
2534 <!-- See if someone is actually reading this and objects :-) -->
2535 </result>
2536
2537 </desc>
2538 <param name="callback" type="IVirtualBoxCallback" dir="in">
2539 <desc>Callback object to register.</desc>
2540 </param>
2541 </method>
2542
2543 <method name="unregisterCallback">
2544 <desc>
2545 Unregisters the previously registered global VirtualBox callback.
2546
2547 <result name="E_INVALIDARG">
2548 Specified @a callback not registered.
2549 </result>
2550
2551 </desc>
2552 <param name="callback" type="IVirtualBoxCallback" dir="in">
2553 <desc>Callback object to unregister.</desc>
2554 </param>
2555 </method>
2556
2557 <method name="waitForPropertyChange">
2558 <desc>
2559 Blocks the caller until any of the properties represented by the @a
2560 what argument changes the value or until the given timeout interval
2561 expires.
2562
2563 The @a what argument is a comma separated list of property masks that
2564 describe properties the caller is interested in. The property mask is
2565 a string in the following format:
2566
2567 <pre>
2568 [[group.]subgroup.]name
2569 </pre>
2570
2571 where @c name is the property name and @c group, @c subgroup are zero
2572 or more property group specifiers. Each element (group or name) in
2573 the property mask may be either a Latin string or an asterisk symbol
2574 (@c "*") which is used to match any string for the given element. A
2575 property mask that doesn't contain asterisk symbols represents a
2576 single fully qualified property name.
2577
2578 Groups in the fully qualified property name go from more generic (the
2579 left-most part) to more specific (the right-most part). The first
2580 element is usually a name of the object the property belongs to. The
2581 second element may be either a property name, or a child object name,
2582 or an index if the preceding element names an object which is one of
2583 many objects of the same type. This way, property names form a
2584 hierarchy of properties. Here are some examples of property names:
2585
2586 <table>
2587 <tr>
2588 <td><tt>VirtualBox.version</tt></td>
2589 <td><link to="IVirtualBox::version"/> property</td>
2590 </tr>
2591 <tr>
2592 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2593 <td><link to="IMachine::name"/> property of the machine with the
2594 given UUID</td>
2595 </tr>
2596 </table>
2597
2598 Most property names directly correspond to the properties of objects
2599 (components) provided by the VirtualBox library and may be used to
2600 track changes to these properties. However, there may be
2601 pseudo-property names that don't correspond to any existing object's
2602 property directly, as well as there may be object properties that
2603 don't have a corresponding property name that is understood by this
2604 method, and therefore changes to such properties cannot be
2605 tracked. See individual object's property descriptions to get a
2606 fully qualified property name that can be used with this method (if
2607 any).
2608
2609 There is a special property mask @c "*" (i.e. a string consisting of a
2610 single asterisk symbol) that can be used to match all properties.
2611 Below are more examples of property masks:
2612
2613 <table>
2614 <tr>
2615 <td><tt>VirtualBox.*</tt></td>
2616 <td>Track all properties of the VirtualBox object</td>
2617 </tr>
2618 <tr>
2619 <td><tt>Machine.*.name</tt></td>
2620 <td>Track changes to the <link to="IMachine::name"/> property of
2621 all registered virtual machines</td>
2622 </tr>
2623 </table>
2624
2625 <note>
2626 This function is not implemented in the current version of the
2627 product.
2628 </note>
2629 </desc>
2630 <param name="what" type="wstring" dir="in">
2631 <desc>Comma separated list of property masks.</desc>
2632 </param>
2633 <param name="timeout" type="unsigned long" dir="in">
2634 <desc>
2635 Wait timeout in milliseconds.
2636 Specify -1 for an indefinite wait.
2637 </desc>
2638 </param>
2639 <param name="changed" type="wstring" dir="out">
2640 <desc>
2641 Comma separated list of properties that have been changed and caused
2642 this method to return to the caller.
2643 </desc>
2644 </param>
2645 <param name="values" type="wstring" dir="out">
2646 <desc>Reserved, not currently used.</desc>
2647 </param>
2648 </method>
2649
2650 <method name="saveSettings">
2651 <desc>
2652 Saves the global settings to the global settings file
2653 (<link to="#settingsFilePath"/>).
2654
2655 This method is only useful for explicitly saving the global settings
2656 file after it has been auto-converted from the old format to the most
2657 recent format (see <link to="#settingsFileVersion"/> for details).
2658 Normally, the global settings file is implicitly saved when a global
2659 setting is changed.
2660
2661 <result name="VBOX_E_FILE_ERROR">
2662 Settings file not accessible.
2663 </result>
2664 <result name="VBOX_E_XML_ERROR">
2665 Could not parse the settings file.
2666 </result>
2667
2668 </desc>
2669 </method>
2670
2671 <method name="saveSettingsWithBackup">
2672 <desc>
2673 Creates a backup copy of the global settings file
2674 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2675 calls <link to="#saveSettings()"/>.
2676
2677 Note that the backup copy is created <b>only</b> if the settings file
2678 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2679 details). Otherwise, this call is fully equivalent to
2680 <link to="#saveSettings()"/> and no backup copying is done.
2681
2682 The backup copy is created in the same directory where the original
2683 settings file is located. It is given the following file name:
2684 <pre>
2685 original.xml.x.y-platform.bak
2686 </pre>
2687 where <tt>original.xml</tt> is the original settings file name
2688 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2689 format of the settings file (before auto-conversion).
2690
2691 If the given backup file already exists, this method will try to add the
2692 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2693 0 to 9) and copy it again until it succeeds. If all suffixes are
2694 occupied, or if any other copy error occurs, this method will return a
2695 failure.
2696
2697 If the copy operation succeeds, the @a bakFileName return argument will
2698 receive a full path to the created backup file (for informational
2699 purposes). Note that this will happen even if the subsequent
2700 <link to="#saveSettings()"/> call performed by this method after the
2701 copy operation, fails.
2702
2703 <note>
2704 The VirtualBox API never calls this method. It is intended purely for
2705 the purposes of creating backup copies of the settings files by
2706 front-ends before saving the results of the automatically performed
2707 settings conversion to disk.
2708 </note>
2709
2710 <see>settingsFileVersion</see>
2711
2712 <result name="VBOX_E_FILE_ERROR">
2713 Settings file not accessible.
2714 </result>
2715 <result name="VBOX_E_XML_ERROR">
2716 Could not parse the settings file.
2717 </result>
2718 <result name="VBOX_E_IPRT_ERROR">
2719 Could not copy the settings file.
2720 </result>
2721
2722 </desc>
2723 <param name="bakFileName" type="wstring" dir="return">
2724 <desc>Full path to the created backup copy.</desc>
2725 </param>
2726 </method>
2727
2728 </interface>
2729
2730 <!--
2731 // IAppliance
2732 /////////////////////////////////////////////////////////////////////////
2733 -->
2734
2735 <enum
2736 name="CIMOSType"
2737 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2738 >
2739 <desc>
2740 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2741 </desc>
2742
2743 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2744 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2745 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2746 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2747 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2748 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2749 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2750 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2751 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2752 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2753 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2754 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2755 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2756 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2757 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2758 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2759 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2760 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2761 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2762 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2763 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2764 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2765 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2766 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2767 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2768 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2769 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2770 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2771 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2772 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2773 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2774 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2775 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2776 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2777 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2778 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2779 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2780 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2781 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2782 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2783 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2784 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2785 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2786 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2787 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2788 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2789 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2790 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2791 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2792 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2793 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2794 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2795 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2796 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2797 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2798 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2799 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2800 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2801 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2802 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2803 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2804 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2805 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2806 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2807 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2808 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2809 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2810 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2811 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2812 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2813 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2814 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2815 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2816 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2817 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2818 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2819 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2820 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2821 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2822 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2823 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2824 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2825 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2826 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2827 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2828 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2829 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2830 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2831 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2832 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2833 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2834 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2835 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2836 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2837 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2838 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2839 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2840 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2841 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2842 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2843 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2844 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2845 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2846 </enum>
2847
2848 <enum
2849 name="OVFResourceType"
2850 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2851 >
2852 <desc>
2853 OVF resource type.
2854 </desc>
2855
2856 <const name="Other" value="1" />
2857 <const name="ComputerSystem" value="2" />
2858 <const name="Processor" value="3" />
2859 <const name="Memory" value="4" />
2860 <const name="IdeController" value="5" />
2861 <const name="ParallelScsiHba" value="6" />
2862 <const name="FcHba" value="7" />
2863 <const name="iScsiHba" value="8" />
2864 <const name="IbHca" value="9" />
2865 <const name="EthernetAdapter" value="10" />
2866 <const name="OtherNetworkAdapter" value="11" />
2867 <const name="IoSlot" value="12" />
2868 <const name="IoDevice" value="13" />
2869 <const name="FloppyDrive" value="14" />
2870 <const name="CdDrive" value="15" />
2871 <const name="DvdDrive" value="16" />
2872 <const name="HardDisk" value="17" />
2873 <const name="UsbController" value="23" />
2874 <const name="SoundCard" value="35" />
2875 </enum>
2876
2877 <interface
2878 name="IAppliance" extends="$unknown"
2879 uuid="f3aa3a74-7b66-425b-9d3d-973924ddf163"
2880 wsmap="managed"
2881 >
2882 <desc>
2883 Represents an appliance in OVF format. An instance of this is returned by
2884 <link to="IVirtualBox::openAppliance" />.
2885
2886 Importing an OVF appliance into VirtualBox is a three-step process:
2887
2888 <ol>
2889 <li>
2890 Call <link to="IVirtualBox::openAppliance" /> with the full path of the OVF
2891 file. So long as the appliance file is syntactically valid, this will succeed
2892 and return an instance of IAppliance that contains the parsed data from the
2893 OVF file.
2894 </li>
2895
2896 <li>The caller should then invoke <link to="#interpret" />, which
2897 analyzes the OVF data and sets up the contents of the IAppliance attributes
2898 accordingly. These can be inspected by a VirtualBox front-end such as the GUI,
2899 and the suggestions can be displayed to the user. For example, the virtual system
2900 will contain the virtual hardware prescribed by the OVF (network and hardware
2901 adapters, virtual disk images, memory size and so on), and the GUI can then give
2902 the user the option to confirm and/or change these suggestions.
2903 </li>
2904
2905 <li>Finally, the caller should invoke <link to="#importAppliance" />, which will
2906 create virtual machines in VirtualBox as instances of <link to="IMachine" /> that
2907 match the information in the virtual system descriptions.
2908 </li>
2909 </ol>
2910
2911 </desc>
2912
2913 <attribute name="path" type="wstring" readonly="yes">
2914 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2915 the <tt>.ova</tt> file passed to <link to="IVirtualBox::openAppliance" />.</desc>
2916 </attribute>
2917
2918 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2919 <desc>
2920 Array of virtual disk definitions. One such description exists for each
2921 disk definition in the OVF; each string array item represents one such piece of
2922 disk information, with the information fields separated by tab (\t) characters.
2923
2924 The caller should be prepared for additional fields being appended to
2925 this string in future versions of VirtualBox and therefore check for
2926 the number of tabs in the strings returned.
2927
2928 In the current version, the following eight fields are returned per string
2929 in the array:
2930
2931 <ol>
2932 <li>Disk ID (unique string identifier given to disk)</li>
2933 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2934 <li>Populated size (optional unsigned integer indicating the current size of the
2935 disk; can be approximate; -1 if unspecified)</li>
2936 <li>Format (string identifying the disk format, typically
2937 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2938 <li>Reference (where to find the disk image, typically a file name; if empty,
2939 then the disk should be created on import)</li>
2940 <li>Image size (optional unsigned integer indicating the size of the image,
2941 which need not necessarily be the same as the values specified above, since
2942 the image may be compressed or sparse; -1 if not specified)</li>
2943 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2944 presently unsupported and always -1)</li>
2945 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2946 </ol>
2947 </desc>
2948 </attribute>
2949
2950 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2951 <desc>
2952 Array of virtual system descriptions. One such description is created
2953 for each virtual system found in the OVF. The array is empty until after <link to="#interpret" />
2954 has been called.
2955 </desc>
2956 </attribute>
2957
2958 <method name="interpret">
2959 <desc>
2960 Interprets the OVF data that was read when the appliance was constructed. After
2961 calling this method, one can inspect the
2962 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2963 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2964 the appliance.
2965
2966 Calling this method is the second step of importing an appliance into VirtualBox;
2967 see <link to="IAppliance" /> for an overview.
2968 </desc>
2969 </method>
2970
2971 <method name="importAppliance">
2972 <desc>
2973 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2974 and other interfaces that match the information contained in the appliance as
2975 closely as possible, as represented by the import instructions in the
2976 <link to="#virtualSystemDescriptions" /> array.
2977
2978 Calling this method is the final step of importing an appliance into VirtualBox;
2979 see <link to="IAppliance" /> for an overview.
2980 </desc>
2981 </method>
2982
2983 </interface>
2984
2985 <enum
2986 name="VirtualSystemDescriptionType"
2987 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
2988 >
2989 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2990 a configuration value.</desc>
2991
2992 <const name="Name" value="1" />
2993 <const name="OS" value="2" />
2994 <const name="CPU" value="3" />
2995 <const name="Memory" value="4" />
2996 <const name="HardDiskControllerIDE" value="5" />
2997 <const name="HardDiskControllerSATA" value="6" />
2998 <const name="HardDiskControllerSCSI" value="7" />
2999 <const name="HardDiskImage" value="8" />
3000 <const name="CDROM" value="9" />
3001 <const name="Floppy" value="10" />
3002 <const name="NetworkAdapter" value="11" />
3003 <const name="USBController" value="12" />
3004 <const name="SoundCard" value="13" />
3005
3006 </enum>
3007
3008 <interface
3009 name="IVirtualSystemDescription" extends="$unknown"
3010 uuid="c76de96b-b316-4a42-9afb-18ce08cce0c9"
3011 wsmap="managed"
3012 >
3013
3014 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3015 After <link to="IAppliance::interpret" /> has been called, that array contains
3016 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3017 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3018 into VirtualBox.
3019 </desc>
3020
3021 <method name="getDescription">
3022 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3023 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3024
3025 The list below identifies the value sets that are possible depending on the
3026 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3027 the array item with the same index in aOrigValues[] will contain the original value as contained
3028 in the OVF file, and the corresponding item in aAutoValues[] will contain a suggested value to
3029 be used for VirtualBox. Items in the other arrays will be empty, unless specified otherwise below:
3030
3031 <ul>
3032 <li>
3033 "OS": then the corresponding item in aAutoValues[] contains the suggested guest operating system
3034 for VirtualBox. The corresponding item in aOrigValues[] will contain a numerical value that
3035 described the operating system in the OVF (see <link to="CIMOSType" />).
3036 </li>
3037 <li>
3038 "Name": then the correponding item im aOrigValues[] will contain the suggested virtual machine name
3039 from the OVF file, and aAutoValues[] will contain a suggestion for a unique VirtualBox
3040 <link to="IMachine" /> name that does not exist yet.
3041 </li>
3042 <li>
3043 "CPU": number of CPUs.
3044 </li>
3045 <li>
3046 "Memory": amount of memory, in bytes.
3047 </li>
3048 <li>
3049 "HarddiskControllerSCSI": a SCSI hard disk controller. Here the items in aOrigValues[] and aAutoValues[] will either be
3050 "LsiLogic" or "BusLogic". The matching item in the aRefValue[] array will contain a numerical
3051 index that other items of the "Harddisk" type can use to specify which hard disk controller
3052 a virtual disk should be connected to.
3053 </li>
3054 <li>
3055 "HarddiskControllerIDE": an IDE hard disk controller. This has no value in aOrigValues[] or aAutoValues[];
3056 as with SCSI controllers, the matching item in the aRefValues[] array will contain a numerical
3057 index that other items of the "Harddisk" type can use to specify which hard disk controller
3058 a virtual disk should be connected to.
3059 </li>
3060 <li>
3061 "Harddisk": a virtual hard disk, most probably as a reference to an image file. The array item
3062 in aOrigValues[] will contain the file specification from the OVF file, whereas the item
3063 in aAutoValues[] will contain the fully qualified path to the image, which VirtualBox has verified
3064 to exist.
3065 The item in the aRefValues[] array specifies the hard disk controller to connect to and has the
3066 same value as another aRefValues[] array item of the types listed above.
3067 </li>
3068 <li>
3069 "NetworkAdapter": a network adapter. (todo document)
3070 </li>
3071 </ul>
3072
3073 </desc>
3074
3075 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3076 <desc></desc>
3077 </param>
3078
3079 <param name="aOrigValues" type="wstring" dir="out" safearray="yes">
3080 <desc></desc>
3081 </param>
3082
3083 <param name="aAutoValues" type="wstring" dir="out" safearray="yes">
3084 <desc></desc>
3085 </param>
3086
3087 <param name="aConfiguration" type="wstring" dir="out" safearray="yes">
3088 <desc></desc>
3089 </param>
3090
3091 </method>
3092
3093 <method name="SetFinalValues">
3094 <desc></desc>
3095
3096 <param name="aFinaleValues" type="wstring" dir="in" safearray="yes">
3097 <desc></desc>
3098 </param>
3099
3100 </method>
3101
3102 </interface>
3103
3104
3105 <!--
3106 // IMachine
3107 /////////////////////////////////////////////////////////////////////////
3108 -->
3109
3110 <enumerator
3111 name="IMachineEnumerator" type="IMachine"
3112 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
3113 />
3114
3115 <collection
3116 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
3117 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
3118 readonly="yes"
3119 />
3120
3121 <interface
3122 name="IInternalMachineControl" extends="$unknown"
3123 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
3124 internal="yes"
3125 wsmap="suppress"
3126 >
3127 <method name="updateState">
3128 <desc>
3129 Updates the VM state.
3130 <note>
3131 This operation will also update the settings file with
3132 the correct information about the saved state file
3133 and delete this file from disk when appropriate.
3134 </note>
3135 </desc>
3136 <param name="state" type="MachineState" dir="in"/>
3137 </method>
3138
3139 <method name="getIPCId">
3140 <param name="id" type="wstring" dir="return"/>
3141 </method>
3142
3143 <method name="runUSBDeviceFilters">
3144 <desc>
3145 Asks the server to run USB devices filters of the associated
3146 machine against the given USB device and tell if there is
3147 a match.
3148 <note>
3149 Intended to be used only for remote USB devices. Local
3150 ones don't require to call this method (this is done
3151 implicitly by the Host and USBProxyService).
3152 </note>
3153 </desc>
3154 <param name="device" type="IUSBDevice" dir="in"/>
3155 <param name="matched" type="boolean" dir="out"/>
3156 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3157 </method>
3158
3159 <method name="captureUSBDevice">
3160 <desc>
3161 Requests a capture of the given host USB device.
3162 When the request is completed, the VM process will
3163 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3164 notification.
3165 </desc>
3166 <param name="id" type="uuid" dir="in"/>
3167 </method>
3168
3169 <method name="detachUSBDevice">
3170 <desc>
3171 Notification that a VM is going to detach (done = false) or has
3172 already detached (done = true) the given USB device.
3173 When the done = true request is completed, the VM process will
3174 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3175 notification.
3176 <note>
3177 In the done = true case, the server must run its own filters
3178 and filters of all VMs but this one on the detached device
3179 as if it were just attached to the host computer.
3180 </note>
3181 </desc>
3182 <param name="id" type="uuid" dir="in"/>
3183 <param name="done" type="boolean" dir="in"/>
3184 </method>
3185
3186 <method name="autoCaptureUSBDevices">
3187 <desc>
3188 Requests a capture all matching USB devices attached to the host.
3189 When the request is completed, the VM process will
3190 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3191 notification per every captured device.
3192 </desc>
3193 </method>
3194
3195 <method name="detachAllUSBDevices">
3196 <desc>
3197 Notification that a VM that is being powered down. The done
3198 parameter indicates whether which stage of the power down
3199 we're at. When done = false the VM is announcing its
3200 intentions, while when done = true the VM is reporting
3201 what it has done.
3202 <note>
3203 In the done = true case, the server must run its own filters
3204 and filters of all VMs but this one on all detach devices as
3205 if they were just attached to the host computer.
3206 </note>
3207 </desc>
3208 <param name="done" type="boolean" dir="in"/>
3209 </method>
3210
3211 <method name="onSessionEnd">
3212 <desc>
3213 Triggered by the given session object when the session is about
3214 to close normally.
3215 </desc>
3216 <param name="session" type="ISession" dir="in">
3217 <desc>Session that is being closed</desc>
3218 </param>
3219 <param name="progress" type="IProgress" dir="return">
3220 <desc>
3221 Used to wait until the corresponding machine is actually
3222 dissociated from the given session on the server.
3223 Returned only when this session is a direct one.
3224 </desc>
3225 </param>
3226 </method>
3227
3228 <method name="beginSavingState">
3229 <desc>
3230 Called by the VM process to inform the server it wants to
3231 save the current state and stop the VM execution.
3232 </desc>
3233 <param name="progress" type="IProgress" dir="in">
3234 <desc>
3235 Progress object created by the VM process to wait until
3236 the state is saved.
3237 </desc>
3238 </param>
3239 <param name="stateFilePath" type="wstring" dir="out">
3240 <desc>
3241 File path the VM process must save the execution state to.
3242 </desc>
3243 </param>
3244 </method>
3245
3246 <method name="endSavingState">
3247 <desc>
3248 Called by the VM process to inform the server that saving
3249 the state previously requested by #beginSavingState is either
3250 successfully finished or there was a failure.
3251
3252 <result name="VBOX_E_FILE_ERROR">
3253 Settings file not accessible.
3254 </result>
3255 <result name="VBOX_E_XML_ERROR">
3256 Could not parse the settings file.
3257 </result>
3258
3259 </desc>
3260
3261 <param name="success" type="boolean" dir="in">
3262 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3263 otherwise.
3264 </desc>
3265 </param>
3266 </method>
3267
3268 <method name="adoptSavedState">
3269 <desc>
3270 Gets called by IConsole::adoptSavedState.
3271 <result name="VBOX_E_FILE_ERROR">
3272 Invalid saved state file path.
3273 </result>
3274 </desc>
3275 <param name="savedStateFile" type="wstring" dir="in">
3276 <desc>Path to the saved state file to adopt.</desc>
3277 </param>
3278 </method>
3279
3280 <method name="beginTakingSnapshot">
3281 <desc>
3282 Called by the VM process to inform the server it wants to
3283 take a snapshot.
3284
3285 <result name="VBOX_E_FILE_ERROR">
3286 Settings file not accessible.
3287 </result>
3288 <result name="VBOX_E_XML_ERROR">
3289 Could not parse the settings file.
3290 </result>
3291 </desc>
3292 <param name="initiator" type="IConsole" dir="in">
3293 <desc>The console object that initiated this call.</desc>
3294 </param>
3295 <param name="name" type="wstring" dir="in">
3296 <desc>Snapshot name.</desc>
3297 </param>
3298 <param name="description" type="wstring" dir="in">
3299 <desc>Snapshot description.</desc>
3300 </param>
3301 <param name="progress" type="IProgress" dir="in">
3302 <desc>
3303 Progress object created by the VM process to wait until
3304 the state is saved (only for online snapshots).
3305 </desc>
3306 </param>
3307 <param name="stateFilePath" type="wstring" dir="out">
3308 <desc>
3309 File path the VM process must save the execution state to.
3310 </desc>
3311 </param>
3312 <param name="serverProgress" type="IProgress" dir="out">
3313 <desc>
3314 Progress object created by the server process to wait until
3315 the snapshot is taken (VDI diff creation, etc.).
3316 </desc>
3317 </param>
3318 </method>
3319
3320 <method name="endTakingSnapshot">
3321 <desc>
3322 Called by the VM process to inform the server that the snapshot
3323 previously requested by #beginTakingSnapshot is either
3324 successfully taken or there was a failure.
3325 </desc>
3326
3327 <param name="success" type="boolean" dir="in">
3328 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3329 </param>
3330 </method>
3331
3332 <method name="discardSnapshot">
3333 <desc>
3334 Gets called by IConsole::discardSnapshot.
3335 <result name="VBOX_E_INVALID_OBJECT_STATE">
3336 Snapshot has more than one child snapshot.
3337 </result>
3338 </desc>
3339 <param name="initiator" type="IConsole" dir="in">
3340 <desc>The console object that initiated this call.</desc>
3341 </param>
3342 <param name="id" type="uuid" dir="in">
3343 <desc>UUID of the snapshot to discard.</desc>
3344 </param>
3345 <param name="machineState" type="MachineState" dir="out">
3346 <desc>New machine state after this operation is started.</desc>
3347 </param>
3348 <param name="progress" type="IProgress" dir="return">
3349 <desc>Progress object to track the operation completion.</desc>
3350 </param>
3351 </method>
3352
3353 <method name="discardCurrentState">
3354 <desc>
3355 Gets called by IConsole::discardCurrentState.
3356 <result name="VBOX_E_INVALID_OBJECT_STATE">
3357 Virtual machine does not have any snapshot.
3358 </result>
3359 </desc>
3360 <param name="initiator" type="IConsole" dir="in">
3361 <desc>The console object that initiated this call.</desc>
3362 </param>
3363 <param name="machineState" type="MachineState" dir="out">
3364 <desc>New machine state after this operation is started.</desc>
3365 </param>
3366 <param name="progress" type="IProgress" dir="return">
3367 <desc>Progress object to track the operation completion.</desc>
3368 </param>
3369 </method>
3370
3371 <method name="discardCurrentSnapshotAndState">
3372 <desc>
3373 Gets called by IConsole::discardCurrentSnapshotAndState.
3374 <result name="VBOX_E_INVALID_OBJECT_STATE">
3375 Virtual machine does not have any snapshot.
3376 </result>
3377 </desc>
3378 <param name="initiator" type="IConsole" dir="in">
3379 <desc>The console object that initiated this call.</desc>
3380 </param>
3381 <param name="machineState" type="MachineState" dir="out">
3382 <desc>New machine state after this operation is started.</desc>
3383 </param>
3384 <param name="progress" type="IProgress" dir="return">
3385 <desc>Progress object to track the operation completion.</desc>
3386 </param>
3387 </method>
3388
3389 <method name="pullGuestProperties">
3390 <desc>
3391 Get the list of the guest properties matching a set of patterns along
3392 with their values, time stamps and flags and give responsibility for
3393 managing properties to the console.
3394 </desc>
3395 <param name="name" type="wstring" dir="out" safearray="yes">
3396 <desc>
3397 The names of the properties returned.
3398 </desc>
3399 </param>
3400 <param name="value" type="wstring" dir="out" safearray="yes">
3401 <desc>
3402 The values of the properties returned. The array entries match the
3403 corresponding entries in the @a name array.
3404 </desc>
3405 </param>
3406 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3407 <desc>
3408 The time stamps of the properties returned. The array entries match
3409 the corresponding entries in the @a name array.
3410 </desc>
3411 </param>
3412 <param name="flags" type="wstring" dir="out" safearray="yes">
3413 <desc>
3414 The flags of the properties returned. The array entries match the
3415 corresponding entries in the @a name array.
3416 </desc>
3417 </param>
3418 </method>
3419
3420 <method name="pushGuestProperties">
3421 <desc>
3422 Set the list of the guest properties matching a set of patterns along
3423 with their values, time stamps and flags and return responsibility for
3424 managing properties to IMachine.
3425 </desc>
3426 <param name="name" type="wstring" dir="in" safearray="yes">
3427 <desc>
3428 The names of the properties.
3429 </desc>
3430 </param>
3431 <param name="value" type="wstring" dir="in" safearray="yes">
3432 <desc>
3433 The values of the properties. The array entries match the
3434 corresponding entries in the @a name array.
3435 </desc>
3436 </param>
3437 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3438 <desc>
3439 The time stamps of the properties. The array entries match
3440 the corresponding entries in the @a name array.
3441 </desc>
3442 </param>
3443 <param name="flags" type="wstring" dir="in" safearray="yes">
3444 <desc>
3445 The flags of the properties. The array entries match the
3446 corresponding entries in the @a name array.
3447 </desc>
3448 </param>
3449 </method>
3450 <method name="pushGuestProperty">
3451 <desc>
3452 Update a single guest property in IMachine.
3453 </desc>
3454 <param name="name" type="wstring" dir="in">
3455 <desc>
3456 The name of the property to be updated.
3457 </desc>
3458 </param>
3459 <param name="value" type="wstring" dir="in">
3460 <desc>
3461 The value of the property.
3462 </desc>
3463 </param>
3464 <param name="timestamp" type="unsigned long long" dir="in">
3465 <desc>
3466 The timestamp of the property.
3467 </desc>
3468 </param>
3469 <param name="flags" type="wstring" dir="in">
3470 <desc>
3471 The flags of the property.
3472 </desc>
3473 </param>
3474 </method>
3475 </interface>
3476
3477 <interface
3478 name="IBIOSSettings" extends="$unknown"
3479 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3480 wsmap="managed"
3481 >
3482 <desc>
3483 The IBIOSSettings interface represents BIOS settings of the virtual
3484 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3485 </desc>
3486 <attribute name="logoFadeIn" type="boolean">
3487 <desc>Fade in flag for BIOS logo animation.</desc>
3488 </attribute>
3489
3490 <attribute name="logoFadeOut" type="boolean">
3491 <desc>Fade out flag for BIOS logo animation.</desc>
3492 </attribute>
3493
3494 <attribute name="logoDisplayTime" type="unsigned long">
3495 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3496 </attribute>
3497
3498 <attribute name="logoImagePath" type="wstring">
3499 <desc>Local file system path for external BIOS image.</desc>
3500 </attribute>
3501
3502 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3503 <desc>Mode of the BIOS boot device menu.</desc>
3504 </attribute>
3505
3506 <attribute name="ACPIEnabled" type="boolean">
3507 <desc>ACPI support flag.</desc>
3508 </attribute>
3509
3510 <attribute name="IOAPICEnabled" type="boolean">
3511 <desc>
3512 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3513 and support IRQs above 15.
3514 </desc>
3515 </attribute>
3516
3517 <attribute name="timeOffset" type="long long">
3518 <desc>
3519 Offset in milliseconds from the host system time. This allows for
3520 guests running with a different system date/time than the host.
3521 It is equivalent to setting the system date/time in the BIOS except
3522 it is not an absolute value but a relative one. Guest Additions
3523 time synchronization honors this offset.
3524 </desc>
3525 </attribute>
3526
3527 <attribute name="PXEDebugEnabled" type="boolean">
3528 <desc>
3529 PXE debug logging flag. If set, VirtualBox will write extensive
3530 PXE trace information to the release log.
3531 </desc>
3532 </attribute>
3533
3534 <attribute name="IDEControllerType" type="IDEControllerType">
3535 <desc>
3536 Type of the virtual IDE controller. Depending on this value,
3537 VirtualBox will provide different virtual IDE hardware
3538 devices to the guest.
3539 </desc>
3540 </attribute>
3541
3542 </interface>
3543
3544 <interface
3545 name="IMachine" extends="$unknown"
3546 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3547 wsmap="managed"
3548 >
3549 <desc>
3550 The IMachine interface represents a virtual machine, or guest, created
3551 in VirtualBox.
3552
3553 This interface is used in two contexts. First of all, a collection of
3554 objects implementing this interface is stored in the
3555 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3556 machines that are currently registered with this VirtualBox
3557 installation. Also, once a session has been opened for the given virtual
3558 machine (e.g. the virtual machine is running), the machine object
3559 associated with the open session can be queried from the session object;
3560 see <link to="ISession"/> for details.
3561
3562 The main role of this interface is to expose the settings of the virtual
3563 machine and provide methods to change various aspects of the virtual
3564 machine's configuration. For machine objects stored in the
3565 <link to="IVirtualBox::machines2"/> collection, all attributes are
3566 read-only unless explicitly stated otherwise in individual attribute
3567 and method descriptions. In order to change a machine setting, a session
3568 for this machine must be opened using one of
3569 <link to="IVirtualBox::openSession"/>,
3570 <link to="IVirtualBox::openRemoteSession"/> or
3571 <link to="IVirtualBox::openExistingSession"/> methods. After the
3572 session has been successfully opened, a mutable machine object needs to
3573 be queried from the session object and then the desired settings changes
3574 can be applied to the returned object using IMachine attributes and
3575 methods. See the ISession interface description for more information
3576 about sessions.
3577
3578 Note that the IMachine interface does not provide methods to control
3579 virtual machine execution (such as start the machine, or power it
3580 down) -- these methods are grouped in a separate IConsole
3581 interface. Refer to the IConsole interface description to get more
3582 information about this topic.
3583
3584 <see>ISession, IConsole</see>
3585 </desc>
3586
3587 <attribute name="parent" type="IVirtualBox" readonly="yes">
3588 <desc>Associated parent object.</desc>
3589 </attribute>
3590
3591 <attribute name="accessible" type="boolean" readonly="yes">
3592 <desc>
3593 Whether this virtual machine is currently accessible or not.
3594
3595 The machine is considered to be inaccessible when:
3596 <ul>
3597 <li>It is a registered virtual machine, and
3598 </li>
3599 <li>Its settings file is inaccessible (for example, it is
3600 located on a network share that is not accessible during
3601 VirtualBox startup, or becomes inaccessible later, or if
3602 the settings file can be read but is invalid).
3603 </li>
3604 </ul>
3605
3606 Otherwise, the value of this property is always <tt>true</tt>.
3607
3608 Every time this property is read, the accessibility state of
3609 this machine is re-evaluated. If the returned value is |false|,
3610 the <link to="#accessError"/> property may be used to get the
3611 detailed error information describing the reason of
3612 inaccessibility.
3613
3614 When the machine is inaccessible, only the following properties
3615 can be used on it:
3616 <ul>
3617 <li><link to="#parent"/></li>
3618 <li><link to="#id"/></li>
3619 <li><link to="#settingsFilePath"/></li>
3620 <li><link to="#accessible"/></li>
3621 <li><link to="#accessError"/></li>
3622 </ul>
3623
3624 An attempt to access any other property or method will return
3625 an error.
3626
3627 The only possible action you can perform on an inaccessible
3628 machine is to unregister it using the
3629 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3630 for the accessibility state once more by querying this
3631 property).
3632
3633 <note>
3634 In the current implementation, once this property returns
3635 <tt>true</tt>, the machine will never become inaccessible
3636 later, even if its settings file cannot be successfully
3637 read/written any more (at least, until the VirtualBox
3638 server is restarted). This limitation may be removed in
3639 future releases.
3640 </note>
3641 </desc>
3642 </attribute>
3643
3644 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3645 <desc>
3646 Error information describing the reason of machine
3647 inaccessibility.
3648
3649 Reading this property is only valid after the last call to
3650 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3651 machine is currently unaccessible). Otherwise, a null
3652 IVirtualBoxErrorInfo object will be returned.
3653 </desc>
3654 </attribute>
3655
3656 <attribute name="name" type="wstring">
3657 <desc>
3658 Name of the virtual machine.
3659
3660 Besides being used for human-readable identification purposes
3661 everywhere in VirtualBox, the virtual machine name is also used
3662 as a name of the machine's settings file and as a name of the
3663 subdirectory this settings file resides in. Thus, every time you
3664 change the value of this property, the settings file will be
3665 renamed once you call <link to="#saveSettings()"/> to confirm the
3666 change. The containing subdirectory will be also renamed, but
3667 only if it has exactly the same name as the settings file
3668 itself prior to changing this property (for backward compatibility
3669 with previous API releases). The above implies the following
3670 limitations:
3671 <ul>
3672 <li>The machine name cannot be empty.</li>
3673 <li>The machine name can contain only characters that are valid
3674 file name characters according to the rules of the file
3675 system used to store VirtualBox configuration.</li>
3676 <li>You cannot have two or more machines with the same name
3677 if they use the same subdirectory for storing the machine
3678 settings files.</li>
3679 <li>You cannot change the name of the machine if it is running,
3680 or if any file in the directory containing the settings file
3681 is being used by another running machine or by any other
3682 process in the host operating system at a time when
3683 <link to="#saveSettings()"/> is called.
3684 </li>
3685 </ul>
3686 If any of the above limitations are hit, <link to="#saveSettings()"/>
3687 will return an appropriate error message explaining the exact
3688 reason and the changes you made to this machine will not be
3689 saved.
3690 <note>
3691 For "legacy" machines created using the
3692 <link to="IVirtualBox::createLegacyMachine()"/> call,
3693 the above naming limitations do not apply because the
3694 machine name does not affect the settings file name.
3695 The settings file name remains the same as it was specified
3696 during machine creation and never changes.
3697 </note>
3698 </desc>
3699 </attribute>
3700
3701 <attribute name="description" type="wstring">
3702 <desc>
3703 Description of the virtual machine.
3704
3705 The description attribute can contain any text and is
3706 typically used to describe the hardware and software
3707 configuration of the virtual machine in detail (i.e. network
3708 settings, versions of the installed software and so on).
3709 </desc>
3710 </attribute>
3711
3712 <attribute name="id" type="uuid" readonly="yes">
3713 <desc>UUID of the virtual machine.</desc>
3714 </attribute>
3715
3716 <attribute name="OSTypeId" type="wstring">
3717 <desc>
3718 User-defined identifier of the Guest OS type.
3719 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3720 an IGuestOSType object representing details about the given
3721 Guest OS type.
3722 <note>
3723 This value may differ from the value returned by
3724 <link to="IGuest::OSTypeId"/> if Guest Additions are
3725 installed to the guest OS.
3726 </note>
3727 </desc>
3728 </attribute>
3729
3730 <attribute name="HardwareVersion" type="wstring">
3731 <desc>Hardware version identifier. Internal use only for now.</desc>
3732 </attribute>
3733
3734 <attribute name="CPUCount" type="unsigned long">
3735 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3736 </attribute>
3737
3738 <attribute name="memorySize" type="unsigned long">
3739 <desc>System memory size in megabytes.</desc>
3740 </attribute>
3741
3742 <attribute name="memoryBalloonSize" type="unsigned long">
3743 <desc>Initial memory balloon size in megabytes.</desc>
3744 </attribute>
3745
3746 <attribute name="statisticsUpdateInterval" type="unsigned long">
3747 <desc>Initial interval to update guest statistics in seconds.</desc>
3748 </attribute>
3749
3750 <attribute name="VRAMSize" type="unsigned long">
3751 <desc>Video memory size in megabytes.</desc>
3752 </attribute>
3753
3754 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3755 <desc>
3756 This setting determines whether VirtualBox allows guests to make use
3757 of the 3D graphics support available on the host. Currently limited
3758 to OpenGL only. </desc>
3759 </attribute>
3760
3761 <attribute name="monitorCount" type="unsigned long">
3762 <desc>
3763 Number of virtual monitors.
3764 <note>
3765 Only effective on Windows XP and later guests with
3766 Guest Additions installed.
3767 </note>
3768 </desc>
3769 </attribute>
3770
3771 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3772 <desc>Object containing all BIOS settings.</desc>
3773 </attribute>
3774
3775 <attribute name="HWVirtExEnabled" type="TSBool">
3776 <desc>
3777 This setting determines whether VirtualBox will try to make use of
3778 the host CPU's hardware virtualization extensions such as Intel VT-x
3779 and AMD-V. Note that in case such extensions are not available,
3780 they will not be used.
3781 </desc>
3782 </attribute>
3783
3784 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3785 <desc>
3786 This setting determines whether VirtualBox will try to make use of
3787 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3788 such extensions are not available, they will not be used.
3789 </desc>
3790 </attribute>
3791
3792 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3793 <desc>
3794 This setting determines whether VirtualBox will try to make use of
3795 the VPID extension of Intel VT-x. Note that in case such extensions are
3796 not available, they will not be used.
3797 </desc>
3798 </attribute>
3799
3800 <attribute name="PAEEnabled" type="boolean" default="false">
3801 <desc>
3802 This setting determines whether VirtualBox will expose the Physical Address
3803 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3804 is not available, it will not be reported.
3805 </desc>
3806 </attribute>
3807
3808 <attribute name="snapshotFolder" type="wstring">
3809 <desc>
3810 Full path to the directory used to store snapshot data
3811 (differencing hard disks and saved state files) of this machine.
3812
3813 The initial value of this property is
3814 <tt>&lt;</tt><link to="#settingsFilePath">
3815 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3816 <link to="#id">machine_uuid</link>
3817 <tt>&gt;</tt>.
3818
3819 Currently, it is an error to try to change this property on
3820 a machine that has snapshots (because this would require to
3821 move possibly large files to a different location).
3822 A separate method will be available for this purpose later.
3823
3824 <note>
3825 Setting this property to <tt>null</tt> will restore the
3826 initial value.
3827 </note>
3828 <note>
3829 When setting this property, the specified path can be
3830 absolute (full path) or relative to the directory where the
3831 <link to="#settingsFilePath">machine settings file</link>
3832 is located. When reading this property, a full path is
3833 always returned.
3834 </note>
3835 <note>
3836 The specified path may not exist, it will be created
3837 when necessary.
3838 </note>
3839 </desc>
3840 </attribute>
3841
3842 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3843 <desc>VRDP server object.</desc>
3844 </attribute>
3845
3846 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3847 <desc>Array of hard disks attached to this machine.</desc>
3848 </attribute>
3849
3850 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3851 <desc>Associated DVD drive object.</desc>
3852 </attribute>
3853
3854 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3855 <desc>Associated floppy drive object.</desc>
3856 </attribute>
3857
3858 <attribute name="USBController" type="IUSBController" readonly="yes">
3859 <desc>
3860 Associated USB controller object.
3861
3862 <note>
3863 This method may set a @ref com_warnings "warning result code".
3864 </note>
3865 <note>
3866 If USB functionality is not available in the given edition of
3867 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3868 </note>
3869 </desc>
3870 </attribute>
3871
3872 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3873 <desc>Associated audio adapter, always present.</desc>
3874 </attribute>
3875
3876 <attribute name="SATAController" type="ISATAController" readonly="yes">
3877 <desc>
3878 Associated SATA controller object.
3879 </desc>
3880 </attribute>
3881
3882 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3883 <desc>
3884 Full name of the file containing machine settings data.
3885 </desc>
3886 </attribute>
3887
3888 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3889 <desc>
3890 Current version of the format of the settings file of this machine
3891 (<link to="#settingsFilePath"/>).
3892
3893 The version string has the following format:
3894 <pre>
3895 x.y-platform
3896 </pre>
3897 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3898 versions, and <tt>platform</tt> is the platform identifier.
3899
3900 The current version usually matches the value of the
3901 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3902 settings file was created by an older version of VirtualBox and there
3903 was a change of the settings file format since then.
3904
3905 Note that VirtualBox automatically converts settings files from older
3906 versions to the most recent version when reading them (usually at
3907 VirtualBox startup) but it doesn't save the changes back until
3908 you call a method that implicitly saves settings (such as
3909 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3910 explicitly. Therefore, if the value of this attribute differs from the
3911 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3912 means that the settings file was converted but the result of the
3913 conversion is not yet saved to disk.
3914
3915 The above feature may be used by interactive front-ends to inform users
3916 about the settings file format change and offer them to explicitly save
3917 all converted settings files (the global and VM-specific ones),
3918 optionally create backup copies of the old settings files before saving,
3919 etc.
3920
3921 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3922 </desc>
3923 </attribute>
3924
3925 <attribute name="settingsModified" type="boolean" readonly="yes">
3926 <desc>
3927 Whether the settings of this machine have been modified
3928 (but neither yet saved nor discarded).
3929 <note>
3930 Reading this property is only valid on instances returned
3931 by <link to="ISession::machine"/> and on new machines
3932 created by <link to="IVirtualBox::createMachine"/> or opened
3933 by <link to="IVirtualBox::openMachine"/> but not
3934 yet registered, or on unregistered machines after calling
3935 <link to="IVirtualBox::unregisterMachine"/>. For all other
3936 cases, the settings can never be modified.
3937 </note>
3938 <note>
3939 For newly created unregistered machines, the value of this
3940 property is always TRUE until <link to="#saveSettings()"/>
3941 is called (no matter if any machine settings have been
3942 changed after the creation or not). For opened machines
3943 the value is set to FALSE (and then follows to normal rules).
3944 </note>
3945 </desc>
3946 </attribute>
3947
3948 <attribute name="sessionState" type="SessionState" readonly="yes">
3949 <desc>Current session state for this machine.</desc>
3950 </attribute>
3951
3952 <attribute name="sessionType" type="wstring" readonly="yes">
3953 <desc>
3954 Type of the session. If <link to="#sessionState"/> is
3955 SessionSpawning or SessionOpen, this attribute contains the
3956 same value as passed to the
3957 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3958 type parameter. If the session was opened directly using
3959 <link to="IVirtualBox::openSession()"/>, or if
3960 <link to="#sessionState"/> is SessionClosed, the value of this
3961 attribute is @c null.
3962 </desc>
3963 </attribute>
3964
3965 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3966 <desc>
3967 Identifier of the session process. This attribute contains the
3968 platform-dependent identifier of the process that has opened a
3969 direct session for this machine using the
3970 <link to="IVirtualBox::openSession()"/> call. The returned value
3971 is only valid if <link to="#sessionState"/> is SessionOpen or
3972 SessionClosing (i.e. a session is currently open or being
3973 closed) by the time this property is read.
3974 </desc>
3975 </attribute>
3976
3977 <attribute name="state" type="MachineState" readonly="yes">
3978 <desc>Current execution state of this machine.</desc>
3979 </attribute>
3980
3981 <attribute name="lastStateChange" type="long long" readonly="yes">
3982 <desc>
3983 Time stamp of the last execution state change,
3984 in milliseconds since 1970-01-01 UTC.
3985 </desc>
3986 </attribute>
3987
3988 <attribute name="stateFilePath" type="wstring" readonly="yes">
3989 <desc>
3990 Full path to the file that stores the execution state of
3991 the machine when it is in the <link to="MachineState_Saved"/> state.
3992 <note>
3993 When the machine is not in the Saved state, this attribute
3994 <tt>null</tt>.
3995 </note>
3996 </desc>
3997 </attribute>
3998
3999 <attribute name="logFolder" type="wstring" readonly="yes">
4000 <desc>
4001 Full path to the folder that stores a set of rotated log files
4002 recorded during machine execution. The most recent log file is
4003 named <tt>VBox.log</tt>, the previous log file is
4004 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4005 in the current version).
4006 </desc>
4007 </attribute>
4008
4009 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4010 <desc>
4011 Current snapshot of this machine.
4012 <note>
4013 A <tt>null</tt> object is returned if the machine doesn't
4014 have snapshots.
4015 </note>
4016 <see><link to="ISnapshot"/></see>
4017 </desc>
4018 </attribute>
4019
4020 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4021 <desc>
4022 Number of snapshots taken on this machine. Zero means the
4023 machine doesn't have any snapshots.
4024 </desc>
4025 </attribute>
4026
4027 <attribute name="currentStateModified" type="boolean" readonly="yes">
4028 <desc>
4029 Returns <tt>true</tt> if the current state of the machine is not
4030 identical to the state stored in the current snapshot.
4031
4032 The current state is identical to the current snapshot right
4033 after one of the following calls are made:
4034 <ul>
4035 <li><link to="IConsole::discardCurrentState"/> or
4036 <link to="IConsole::discardCurrentSnapshotAndState"/>
4037 </li>
4038 <li><link to="IConsole::takeSnapshot"/> (issued on a
4039 powered off or saved machine, for which
4040 <link to="#settingsModified"/> returns <tt>false</tt>)
4041 </li>
4042 <li><link to="IMachine::setCurrentSnapshot"/>
4043 </li>
4044 </ul>
4045
4046 The current state remains identical until one of the following
4047 happens:
4048 <ul>
4049 <li>settings of the machine are changed</li>
4050 <li>the saved state is discarded</li>
4051 <li>the current snapshot is discarded</li>
4052 <li>an attempt to execute the machine is made</li>
4053 </ul>
4054
4055 <note>
4056 For machines that don't have snapshots, this property is
4057 always <tt>false</tt>.
4058 </note>
4059 </desc>
4060 </attribute>
4061
4062 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4063 <desc>
4064 Collection of shared folders for this machine (permanent shared
4065 folders). These folders are shared automatically at machine startup
4066 and available only to the guest OS installed within this machine.
4067
4068 New shared folders are added to the collection using
4069 <link to="#createSharedFolder"/>. Existing shared folders can be
4070 removed using <link to="#removeSharedFolder"/>.
4071 </desc>
4072 </attribute>
4073
4074 <attribute name="clipboardMode" type="ClipboardMode">
4075 <desc>
4076 Synchronization mode between the host OS clipboard
4077 and the guest OS clipboard.
4078 </desc>
4079 </attribute>
4080
4081 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4082 <desc>
4083 A comma-separated list of simple glob patterns. Changes to guest
4084 properties whose name matches one of the patterns will generate an
4085 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4086 </desc>
4087 </attribute>
4088
4089 <method name="setBootOrder">
4090 <desc>
4091 Puts the given device to the specified position in
4092 the boot order.
4093
4094 To indicate that no device is associated with the given position,
4095 <link to="DeviceType_Null"/> should be used.
4096
4097 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4098
4099 <result name="E_INVALIDARG">
4100 Boot @a position out of range.
4101 </result>
4102 <result name="E_NOTIMPL">
4103 Booting from USB @a device currently not supported.
4104 </result>
4105
4106 </desc>
4107 <param name="position" type="unsigned long" dir="in">
4108 <desc>
4109 Position in the boot order (<tt>1</tt> to the total number of
4110 devices the machine can boot from, as returned by
4111 <link to="ISystemProperties::maxBootPosition"/>).
4112 </desc>
4113 </param>
4114 <param name="device" type="DeviceType" dir="in">
4115 <desc>
4116 The type of the device used to boot at the given position.
4117 </desc>
4118 </param>
4119 </method>
4120
4121 <method name="getBootOrder" const="yes">
4122 <desc>
4123 Returns the device type that occupies the specified
4124 position in the boot order.
4125
4126 @todo [remove?]
4127 If the machine can have more than one device of the returned type
4128 (such as hard disks), then a separate method should be used to
4129 retrieve the individual device that occupies the given position.
4130
4131 If here are no devices at the given position, then
4132 <link to="DeviceType_Null"/> is returned.
4133
4134 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4135
4136 <result name="E_INVALIDARG">
4137 Boot @a position out of range.
4138 </result>
4139
4140 </desc>
4141 <param name="position" type="unsigned long" dir="in">
4142 <desc>
4143 Position in the boot order (<tt>1</tt> to the total number of
4144 devices the machine can boot from, as returned by
4145 <link to="ISystemProperties::maxBootPosition"/>).
4146 </desc>
4147 </param>
4148 <param name="device" type="DeviceType" dir="return">
4149 <desc>
4150 Device at the given position.
4151 </desc>
4152 </param>
4153 </method>
4154
4155 <method name="attachHardDisk2">
4156 <desc>
4157 Attaches a virtual hard disk identified by the given UUID @a id
4158 to a device slot of the specified bus.
4159
4160 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
4161 specify the primary or secondary IDE controller, respectively. The
4162 SATA bus supports 30 channels, so this parameter can be a number
4163 ranging from @c 0 to @c 29.
4164
4165 For the primary controller of the IDE bus, the @a device number can be
4166 either @c 0 or @c 1, to specify the master or the slave device,
4167 respectively. For the secondary IDE controller, the device number is
4168 always @c 1 because the master device is reserved for the CD-ROM drive.
4169
4170 For the SATA bus, the @a device parameter is currently unused and
4171 must be @c 0.
4172
4173 The specified device slot must not have another disk attached to it, or
4174 this method will fail.
4175
4176 See <link to="IHardDisk2"/> for more detailed information about
4177 attaching hard disks.
4178
4179 <note>
4180 You cannot attach a hard disk to a running machine. Also, you cannot
4181 attach a hard disk to a newly created machine until this machine's
4182 settings are saved to disk using <link to="#saveSettings()"/>.
4183 </note>
4184 <note>
4185 If the hard disk is being attached indirectly, a new differencing hard
4186 disk will implicitly be created for it and attached instead. If the
4187 changes made to the machine settings (including this indirect
4188 attachment) are later cancelled using <link to="#discardSettings()"/>,
4189 this implicitly created differencing hard disk will implicitly
4190 be deleted.
4191 </note>
4192
4193 <result name="E_INVALIDARG">
4194 SATA device, SATA channel, IDE channel or IDE slot out of range.
4195 </result>
4196 <result name="VBOX_E_INVALID_OBJECT_STATE">
4197 Attempt to attach hard disk to an unregistered virtual machine.
4198 </result>
4199 <result name="VBOX_E_INVALID_VM_STATE">
4200 Invalid machine state.
4201 </result>
4202 <result name="VBOX_E_OBJECT_IN_USE">
4203 Hard disk already attached to this or another virtual machine.
4204 </result>
4205
4206 </desc>
4207 <param name="id" type="uuid" dir="in">
4208 <desc>UUID of the hard disk to attach.</desc>
4209 </param>
4210 <param name="bus" type="StorageBus" dir="in">
4211 <desc>Type of the storage bus to use (IDE or SATA).</desc>
4212 </param>
4213 <param name="channel" type="long" dir="in">
4214 <desc>Channel to attach the hard disk to.</desc>
4215 </param>
4216 <param name="device" type="long" dir="in">
4217 <desc>
4218 Device slot in the given channel to attach the hard disk to.
4219 </desc>
4220 </param>
4221 </method>
4222
4223 <method name="getHardDisk2" const="yes">
4224 <desc>
4225 Returns the virtual hard disk attached to a device slot of the specified
4226 bus.
4227
4228 Note that if the hard disk was indirectly attached by
4229 <link to="#attachHardDisk2()"/> to the given device slot then this
4230 method will return not the same object as passed to the
4231 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
4232 more detailed information about attaching hard disks.
4233
4234 <result name="VBOX_E_OBJECT_NOT_FOUND">
4235 No hard disk attached to given slot/bus.
4236 </result>
4237
4238 </desc>
4239 <param name="bus" type="StorageBus" dir="in">
4240 <desc>Type of the storage bus to query (IDE or SATA).</desc>
4241 </param>
4242 <param name="channel" type="long" dir="in">
4243 <desc>Channel to query.</desc>
4244 </param>
4245 <param name="device" type="long" dir="in">
4246 <desc>Device slot in the given channel to query.</desc>
4247 </param>
4248 <param name="hardDisk" type="IHardDisk2" dir="return">
4249 <desc>Attached hard disk object.</desc>
4250 </param>
4251 </method>
4252
4253 <method name="detachHardDisk2">
4254 <desc>
4255 Detaches the virtual hard disk attached to a device slot of the
4256 specified bus.
4257
4258 Detaching the hard disk from the virtual machine is deferred. This means
4259 that the hard disk remains associated with the machine when this method
4260 returns and gets actually de-associated only after a successful
4261 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
4262 for more detailed information about attaching hard disks.
4263
4264 <note>
4265 You cannot detach the hard disk from a running machine.
4266 </note>
4267 <note>
4268 Detaching differencing hard disks implicitly created by <link
4269 to="#attachHardDisk2()"/> for the indirect attachment using this
4270 method will <b>not</b> implicitly delete them. The
4271 <link to="IHardDisk2::deleteStorage()"/> operation should be
4272 explicitly performed by the caller after the hard disk is successfully
4273 detached and the settings are saved with
4274 <link to="#saveSettings()"/>, if it is the desired action.
4275 </note>
4276
4277 <result name="VBOX_E_INVALID_VM_STATE">
4278 Attempt to detach hard disk from a running virtual machine.
4279 </result>
4280 <result name="VBOX_E_OBJECT_NOT_FOUND">
4281 No hard disk attached to given slot/bus.
4282 </result>
4283 <result name="VBOX_E_NOT_SUPPORTED">
4284 Hard disk format does not support storage deletion.
4285 </result>
4286
4287 </desc>
4288 <param name="bus" type="StorageBus" dir="in">
4289 <desc>Bus to detach the hard disk from.</desc>
4290 </param>
4291 <param name="channel" type="long" dir="in">
4292 <desc>Channel number to detach the hard disk from.</desc>
4293 </param>
4294 <param name="device" type="long" dir="in">
4295 <desc>Device slot number to detach the hard disk from.</desc>
4296 </param>
4297 </method>
4298
4299 <method name="getNetworkAdapter" const="yes">
4300 <desc>
4301 Returns the network adapter associated with the given slot.
4302 Slots are numbered sequentially, starting with zero. The total
4303 number of adapters per machine is defined by the
4304 <link to="ISystemProperties::networkAdapterCount"/> property,
4305 so the maximum slot number is one less than that property's value.
4306
4307 <result name="E_INVALIDARG">
4308 Invalid @a slot number.
4309 </result>
4310
4311 </desc>
4312 <param name="slot" type="unsigned long" dir="in"/>
4313 <param name="adapter" type="INetworkAdapter" dir="return"/>
4314 </method>
4315
4316 <method name="getSerialPort" const="yes">
4317 <desc>
4318 Returns the serial port associated with the given slot.
4319 Slots are numbered sequentially, starting with zero. The total
4320 number of serial ports per machine is defined by the
4321 <link to="ISystemProperties::serialPortCount"/> property,
4322 so the maximum slot number is one less than that property's value.
4323
4324 <result name="E_INVALIDARG">
4325 Invalid @a slot number.
4326 </result>
4327
4328 </desc>
4329 <param name="slot" type="unsigned long" dir="in"/>
4330 <param name="port" type="ISerialPort" dir="return"/>
4331 </method>
4332
4333 <method name="getParallelPort" const="yes">
4334 <desc>
4335 Returns the parallel port associated with the given slot.
4336 Slots are numbered sequentially, starting with zero. The total
4337 number of parallel ports per machine is defined by the
4338 <link to="ISystemProperties::parallelPortCount"/> property,
4339 so the maximum slot number is one less than that property's value.
4340
4341 <result name="E_INVALIDARG">
4342 Invalid @a slot number.
4343 </result>
4344
4345 </desc>
4346 <param name="slot" type="unsigned long" dir="in"/>
4347 <param name="port" type="IParallelPort" dir="return"/>
4348 </method>
4349
4350 <method name="getNextExtraDataKey">
4351 <desc>
4352 Returns the machine-specific extra data key name following the
4353 supplied key.
4354
4355 An error is returned if the supplied @a key does not exist. @c NULL is
4356 returned in @a nextKey if the supplied key is the last key. When
4357 supplying @c NULL for the @a key, the first key item is returned in @a
4358 nextKey (if there is any). @a nextValue is an optional parameter and
4359 if supplied, the next key's value is returned in it.
4360
4361 <result name="VBOX_E_OBJECT_NOT_FOUND">
4362 Extra data @a key not found.
4363 </result>
4364
4365 </desc>
4366 <param name="key" type="wstring" dir="in">
4367 <desc>Name of the data key to follow.</desc>
4368 </param>
4369 <param name="nextKey" type="wstring" dir="out">
4370 <desc>Name of the next data key.</desc>
4371 </param>
4372 <param name="nextValue" type="wstring" dir="out">
4373 <desc>Value of the next data key.</desc>
4374 </param>
4375 </method>
4376
4377 <method name="getExtraData">
4378 <desc>
4379 Returns associated machine-specific extra data.
4380
4381 If the requested data @a key does not exist, this function will
4382 succeed and return @c NULL in the @a value argument.
4383
4384 <result name="VBOX_E_FILE_ERROR">
4385 Settings file not accessible.
4386 </result>
4387 <result name="VBOX_E_XML_ERROR">
4388 Could not parse the settings file.
4389 </result>
4390
4391 </desc>
4392 <param name="key" type="wstring" dir="in">
4393 <desc>Name of the data key to get.</desc>
4394 </param>
4395 <param name="value" type="wstring" dir="return">
4396 <desc>Value of the requested data key.</desc>
4397 </param>
4398 </method>
4399
4400 <method name="setExtraData">
4401 <desc>
4402 Sets associated machine-specific extra data.
4403
4404 If you pass @c NULL as a key @a value, the given @a key will be
4405 deleted.
4406
4407 <note>
4408 Before performing the actual data change, this method will ask all
4409 registered callbacks using the
4410 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
4411 notification for a permission. If one of the callbacks refuses the
4412 new value, the change will not be performed.
4413 </note>
4414 <note>
4415 On success, the
4416 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4417 is called to inform all registered callbacks about a successful data
4418 change.
4419 </note>
4420 <note>
4421 This method can be called outside the machine session and therefore
4422 it's a caller's responsibility to handle possible race conditions
4423 when several clients change the same key at the same time.
4424 </note>
4425
4426 <result name="VBOX_E_FILE_ERROR">
4427 Settings file not accessible.
4428 </result>
4429 <result name="VBOX_E_XML_ERROR">
4430 Could not parse the settings file.
4431 </result>
4432
4433 </desc>
4434 <param name="key" type="wstring" dir="in">
4435 <desc>Name of the data key to set.</desc>
4436 </param>
4437 <param name="value" type="wstring" dir="in">
4438 <desc>Value to assign to the key.</desc>
4439 </param>
4440 </method>
4441
4442 <method name="saveSettings">
4443 <desc>
4444 Saves any changes to machine settings made since the session
4445 has been opened or a new machine has been created, or since the
4446 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4447 For registered machines, new settings become visible to all
4448 other VirtualBox clients after successful invocation of this
4449 method.
4450 <note>
4451 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4452 notification event after the configuration has been successfully
4453 saved (only for registered machines).
4454 </note>
4455 <note>
4456 Calling this method is only valid on instances returned
4457 by <link to="ISession::machine"/> and on new machines
4458 created by <link to="IVirtualBox::createMachine"/> but not
4459 yet registered, or on unregistered machines after calling
4460 <link to="IVirtualBox::unregisterMachine"/>.
4461 </note>
4462
4463 <result name="VBOX_E_FILE_ERROR">
4464 Settings file not accessible.
4465 </result>
4466 <result name="VBOX_E_XML_ERROR">
4467 Could not parse the settings file.
4468 </result>
4469 <result name="E_ACCESSDENIED">
4470 Modification request refused.
4471 </result>
4472
4473 </desc>
4474 </method>
4475
4476 <method name="saveSettingsWithBackup">
4477 <desc>
4478 Creates a backup copy of the machine settings file (<link
4479 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4480 <link to="#saveSettings()"/>.
4481
4482 Note that the backup copy is created <b>only</b> if the settings file
4483 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4484 details). Otherwise, this call is fully equivalent to
4485 <link to="#saveSettings()"/> and no backup copying is done.
4486
4487 The backup copy is created in the same directory where the original
4488 settings file is located. It is given the following file name:
4489 <pre>
4490 original.xml.x.y-platform.bak
4491 </pre>
4492 where <tt>original.xml</tt> is the original settings file name
4493 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4494 format of the settings file (before auto-conversion).
4495
4496 If the given backup file already exists, this method will try to add the
4497 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4498 0 to 9) and copy it again until it succeeds. If all suffixes are
4499 occupied, or if any other copy error occurs, this method will return a
4500 failure.
4501
4502 If the copy operation succeeds, the @a bakFileName return argument will
4503 receive a full path to the created backup file (for informational
4504 purposes). Note that this will happen even if the subsequent
4505 <link to="#saveSettings()"/> call performed by this method after the
4506 copy operation, fails.
4507
4508 <note>
4509 The VirtualBox API never calls this method. It is intended purely for
4510 the purposes of creating backup copies of the settings files by
4511 front-ends before saving the results of the automatically performed
4512 settings conversion to disk.
4513 </note>
4514
4515 <see>settingsFileVersion</see>
4516
4517 <result name="VBOX_E_FILE_ERROR">
4518 Settings file not accessible.
4519 </result>
4520 <result name="VBOX_E_XML_ERROR">
4521 Could not parse the settings file.
4522 </result>
4523 <result name="VBOX_E_INVALID_VM_STATE">
4524 Virtual machine is not mutable.
4525 </result>
4526 <result name="E_ACCESSDENIED">
4527 Modification request refused.
4528 </result>
4529
4530 </desc>
4531 <param name="bakFileName" type="wstring" dir="return">
4532 <desc>Full path to the created backup copy.</desc>
4533 </param>
4534 </method>
4535
4536 <method name="discardSettings">
4537 <desc>
4538 Discards any changes to the machine settings made since the session
4539 has been opened or since the last call to <link to="#saveSettings()"/>
4540 or <link to="#discardSettings"/>.
4541 <note>
4542 Calling this method is only valid on instances returned
4543 by <link to="ISession::machine"/> and on new machines
4544 created by <link to="IVirtualBox::createMachine"/> or
4545 opened by <link to="IVirtualBox::openMachine"/> but not
4546 yet registered, or on unregistered machines after calling
4547 <link to="IVirtualBox::unregisterMachine"/>.
4548 </note>
4549
4550 <result name="VBOX_E_INVALID_VM_STATE">
4551 Virtual machine is not mutable.
4552 </result>
4553
4554 </desc>
4555 </method>
4556
4557 <method name="deleteSettings">
4558 <desc>
4559 Deletes the settings file of this machine from disk.
4560 The machine must not be registered in order for this operation
4561 to succeed.
4562 <note>
4563 <link to="#settingsModified"/> will return TRUE after this
4564 method successfully returns.
4565 </note>
4566 <note>
4567 Calling this method is only valid on instances returned
4568 by <link to="ISession::machine"/> and on new machines
4569 created by <link to="IVirtualBox::createMachine"/> or
4570 opened by <link to="IVirtualBox::openMachine"/> but not
4571 yet registered, or on unregistered machines after calling
4572 <link to="IVirtualBox::unregisterMachine"/>.
4573 </note>
4574 <note>
4575 The deleted machine settings file can be restored (saved again)
4576 by calling <link to="#saveSettings()"/>.
4577 </note>
4578
4579 <result name="VBOX_E_INVALID_VM_STATE">
4580 Cannot delete settings of a registered machine or
4581 machine not mutable.
4582 </result>
4583 <result name="VBOX_E_IPRT_ERROR">
4584 Could not delete the settings file.
4585 </result>
4586
4587 </desc>
4588 </method>
4589
4590 <method name="getSnapshot">
4591 <desc>
4592 Returns a snapshot of this machine with the given UUID.
4593 A <tt>null</tt> UUID can be used to obtain the first snapshot
4594 taken on this machine. This is useful if you want to traverse
4595 the whole tree of snapshots starting from the root.
4596
4597 <result name="VBOX_E_OBJECT_NOT_FOUND">
4598 Virtual machine has no snapshots or snapshot not found.
4599 </result>
4600
4601 </desc>
4602 <param name="id" type="uuid" dir="in">
4603 <desc>UUID of the snapshot to get</desc>
4604 </param>
4605 <param name="snapshot" type="ISnapshot" dir="return">
4606 <desc>Snapshot object with the given UUID.</desc>
4607 </param>
4608 </method>
4609
4610 <method name="findSnapshot">
4611 <desc>
4612 Returns a snapshot of this machine with the given name.
4613
4614 <result name="VBOX_E_OBJECT_NOT_FOUND">
4615 Virtual machine has no snapshots or snapshot not found.
4616 </result>
4617
4618 </desc>
4619 <param name="name" type="wstring" dir="in">
4620 <desc>Name of the snapshot to find</desc>
4621 </param>
4622 <param name="snapshot" type="ISnapshot" dir="return">
4623 <desc>Snapshot object with the given name.</desc>
4624 </param>
4625 </method>
4626
4627 <method name="setCurrentSnapshot">
4628 <desc>
4629 Sets the current snapshot of this machine.
4630 <note>
4631 In the current implementation, this operation is not
4632 implemented.
4633 </note>
4634 </desc>
4635 <param name="id" type="uuid" dir="in">
4636 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4637 </param>
4638 </method>
4639
4640 <method name="createSharedFolder">
4641 <desc>
4642 Creates a new permanent shared folder by associating the given logical
4643 name with the given host path, adds it to the collection of shared
4644 folders and starts sharing it. Refer to the description of
4645 <link to="ISharedFolder"/> to read more about logical names.
4646
4647 <result name="VBOX_E_OBJECT_IN_USE">
4648 Shared folder already exists.
4649 </result>
4650 <result name="VBOX_E_FILE_ERROR">
4651 Shared folder @a hostPath not accessible.
4652 </result>
4653
4654 </desc>
4655 <param name="name" type="wstring" dir="in">
4656 <desc>Unique logical name of the shared folder.</desc>
4657 </param>
4658 <param name="hostPath" type="wstring" dir="in">
4659 <desc>Full path to the shared folder in the host file system.</desc>
4660 </param>
4661 <param name="writable" type="boolean" dir="in">
4662 <desc>Whether the share is writable or readonly</desc>
4663 </param>
4664 </method>
4665
4666 <method name="removeSharedFolder">
4667 <desc>
4668 Removes the permanent shared folder with the given name previously
4669 created by <link to="#createSharedFolder"/> from the collection of
4670 shared folders and stops sharing it.
4671
4672 <result name="VBOX_E_INVALID_VM_STATE">
4673 Virtual machine is not mutable.
4674 </result>
4675 <result name="VBOX_E_OBJECT_NOT_FOUND">
4676 Shared folder @a name does not exist.
4677 </result>
4678
4679 </desc>
4680 <param name="name" type="wstring" dir="in">
4681 <desc>Logical name of the shared folder to remove.</desc>
4682 </param>
4683 </method>
4684
4685 <method name="canShowConsoleWindow">
4686 <desc>
4687 Returns @c true if the VM console process can activate the
4688 console window and bring it to foreground on the desktop of
4689 the host PC.
4690 <note>
4691 This method will fail if a session for this machine is not
4692 currently open.
4693 </note>
4694
4695 <result name="VBOX_E_INVALID_VM_STATE">
4696 Machine session is not open.
4697 </result>
4698
4699 </desc>
4700 <param name="canShow" type="boolean" dir="return">
4701 <desc>
4702 @c true if the console window can be shown and @c
4703 false otherwise.
4704 </desc>
4705 </param>
4706 </method>
4707
4708 <method name="showConsoleWindow">
4709 <desc>
4710 Activates the console window and brings it to foreground on
4711 the desktop of the host PC. Many modern window managers on
4712 many platforms implement some sort of focus stealing
4713 prevention logic, so that it may be impossible to activate
4714 a window without the help of the currently active
4715 application. In this case, this method will return a non-zero
4716 identifier that represents the top-level window of the VM
4717 console process. The caller, if it represents a currently
4718 active process, is responsible to use this identifier (in a
4719 platform-dependent manner) to perform actual window
4720 activation.
4721 <note>
4722 This method will fail if a session for this machine is not
4723 currently open.
4724 </note>
4725
4726 <result name="VBOX_E_INVALID_VM_STATE">
4727 Machine session is not open.
4728 </result>
4729
4730 </desc>
4731 <param name="winId" type="unsigned long long" dir="return">
4732 <desc>
4733 Platform-dependent identifier of the top-level VM console
4734 window, or zero if this method has performed all actions
4735 necessary to implement the <i>show window</i> semantics for
4736 the given platform and/or VirtualBox front-end.
4737 </desc>
4738 </param>
4739 </method>
4740
4741 <method name="getGuestProperty">
4742 <desc>
4743 Reads an entry from the machine's guest property store.
4744
4745 <result name="VBOX_E_INVALID_VM_STATE">
4746 Machine session is not open.
4747 </result>
4748
4749 </desc>
4750 <param name="name" type="wstring" dir="in">
4751 <desc>
4752 The name of the property to read.
4753 </desc>
4754 </param>
4755 <param name="value" type="wstring" dir="out">
4756 <desc>
4757 The value of the property. If the property does not exist then this
4758 will be empty.
4759 </desc>
4760 </param>
4761 <param name="timestamp" type="unsigned long long" dir="out">
4762 <desc>
4763 The time at which the property was last modified, as seen by the
4764 server process.
4765 </desc>
4766 </param>
4767 <param name="flags" type="wstring" dir="out">
4768 <desc>
4769 Additional property parameters, passed as a comma-separated list of
4770 "name=value" type entries.
4771 </desc>
4772 </param>
4773 </method>
4774
4775 <method name="getGuestPropertyValue">
4776 <desc>
4777 Reads a value from the machine's guest property store.
4778
4779 <result name="VBOX_E_INVALID_VM_STATE">
4780 Machine session is not open.
4781 </result>
4782
4783 </desc>
4784 <param name="property" type="wstring" dir="in">
4785 <desc>
4786 The name of the property to read.
4787 </desc>
4788 </param>
4789 <param name="value" type="wstring" dir="return">
4790 <desc>
4791 The value of the property. If the property does not exist then this
4792 will be empty.
4793 </desc>
4794 </param>
4795 </method>
4796
4797 <method name="getGuestPropertyTimestamp">
4798 <desc>
4799 Reads a property timestamp from the machine's guest property store.
4800
4801 <result name="VBOX_E_INVALID_VM_STATE">
4802 Machine session is not open.
4803 </result>
4804
4805 </desc>
4806 <param name="property" type="wstring" dir="in">
4807 <desc>
4808 The name of the property to read.
4809 </desc>
4810 </param>
4811 <param name="value" type="unsigned long long" dir="return">
4812 <desc>
4813 The timestamp. If the property does not exist then this will be
4814 empty.
4815 </desc>
4816 </param>
4817 </method>
4818
4819 <method name="setGuestProperty">
4820 <desc>
4821 Sets, changes or deletes an entry in the machine's guest property
4822 store.
4823
4824 <result name="E_ACCESSDENIED">
4825 Property cannot be changed.
4826 </result>
4827 <result name="E_INVALIDARG">
4828 Invalid @a flags.
4829 </result>
4830 <result name="VBOX_E_INVALID_VM_STATE">
4831 Virtual machine is not mutable or session not open.
4832 </result>
4833 <result name="VBOX_E_INVALID_OBJECT_STATE">
4834 Cannot set transient property when machine not running.
4835 </result>
4836
4837 </desc>
4838 <param name="property" type="wstring" dir="in">
4839 <desc>
4840 The name of the property to set, change or delete.
4841 </desc>
4842 </param>
4843 <param name="value" type="wstring" dir="in">
4844 <desc>
4845 The new value of the property to set, change or delete. If the
4846 property does not yet exist and value is non-empty, it will be
4847 created. If the value is empty, the key will be deleted if it
4848 exists.
4849 </desc>
4850 </param>
4851 <param name="flags" type="wstring" dir="in">
4852 <desc>
4853 Additional property parameters, passed as a comma-separated list of
4854 "name=value" type entries.
4855 </desc>
4856 </param>
4857 </method>
4858
4859 <method name="setGuestPropertyValue">
4860 <desc>
4861 Sets, changes or deletes a value in the machine's guest property
4862 store. The flags field will be left unchanged or created empty for a
4863 new property.
4864
4865 <result name="E_ACCESSDENIED">
4866 Property cannot be changed.
4867 </result>
4868 <result name="VBOX_E_INVALID_VM_STATE">
4869 Virtual machine is not mutable or session not open.
4870 </result>
4871 <result name="VBOX_E_INVALID_OBJECT_STATE">
4872 Cannot set transient property when machine not running.
4873 </result>
4874 </desc>
4875
4876 <param name="property" type="wstring" dir="in">
4877 <desc>
4878 The name of the property to set, change or delete.
4879 </desc>
4880 </param>
4881 <param name="value" type="wstring" dir="in">
4882 <desc>
4883 The new value of the property to set, change or delete. If the
4884 property does not yet exist and value is non-empty, it will be
4885 created. If value is empty, the property will be deleted if it
4886 exists.
4887 </desc>
4888 </param>
4889 </method>
4890
4891 <method name="enumerateGuestProperties">
4892 <desc>
4893 Return a list of the guest properties matching a set of patterns along
4894 with their values, time stamps and flags.
4895 </desc>
4896 <param name="patterns" type="wstring" dir="in">
4897 <desc>
4898 The patterns to match the properties against, separated by '|'
4899 characters. If this is empty or NULL, all properties will match.
4900 </desc>
4901 </param>
4902 <param name="name" type="wstring" dir="out" safearray="yes">
4903 <desc>
4904 The names of the properties returned.
4905 </desc>
4906 </param>
4907 <param name="value" type="wstring" dir="out" safearray="yes">
4908 <desc>
4909 The values of the properties returned. The array entries match the
4910 corresponding entries in the @a name array.
4911 </desc>
4912 </param>
4913 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4914 <desc>
4915 The time stamps of the properties returned. The array entries match
4916 the corresponding entries in the @a name array.
4917 </desc>
4918 </param>
4919 <param name="flags" type="wstring" dir="out" safearray="yes">
4920 <desc>
4921 The flags of the properties returned. The array entries match the
4922 corresponding entries in the @a name array.
4923 </desc>
4924 </param>
4925 </method>
4926</interface>
4927
4928 <!--
4929 // IConsole
4930 /////////////////////////////////////////////////////////////////////////
4931 -->
4932
4933 <interface
4934 name="IConsoleCallback" extends="$unknown"
4935 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4936 wsmap="suppress"
4937 >
4938
4939 <method name="onMousePointerShapeChange">
4940 <desc>
4941 Notification when the guest mouse pointer shape has
4942 changed. The new shape data is given.
4943 </desc>
4944 <param name="visible" type="boolean" dir="in">
4945 <desc>
4946 Flag whether the pointer is visible.
4947 </desc>
4948 </param>
4949 <param name="alpha" type="boolean" dir="in">
4950 <desc>
4951 Flag whether the pointer has an alpha channel.
4952 </desc>
4953 </param>
4954 <param name="xHot" type="unsigned long" dir="in">
4955 <desc>
4956 The pointer hot spot x coordinate.
4957 </desc>
4958 </param>
4959 <param name="yHot" type="unsigned long" dir="in">
4960 <desc>
4961 The pointer hot spot y coordinate.
4962 </desc>
4963 </param>
4964 <param name="width" type="unsigned long" dir="in">
4965 <desc>
4966 Width of the pointer shape in pixels.
4967 </desc>
4968 </param>
4969 <param name="height" type="unsigned long" dir="in">
4970 <desc>
4971 Height of the pointer shape in pixels.
4972 </desc>
4973 </param>
4974 <param name="shape" type="octet" mod="ptr" dir="in">
4975 <desc>
4976 Address of the shape buffer.
4977
4978 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
4979 followed by a 32-bpp XOR (color) mask.
4980
4981 For pointers without alpha channel the XOR mask pixels are 32
4982 bit values: (lsb)BGR0(msb). For pointers with alpha channel
4983 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
4984
4985 An AND mask is used for pointers with alpha channel, so if the
4986 callback does not support alpha, the pointer could be
4987 displayed as a normal color pointer.
4988
4989 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
4990 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
4991 height</tt>. The padding bits at the end of each scanline are
4992 undefined.
4993
4994 The XOR mask follows the AND mask on the next 4-byte aligned
4995 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
4996 Bytes in the gap between the AND and the XOR mask are undefined.
4997 The XOR mask scanlines have no gap between them and the size of
4998 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
4999
5000 <note>
5001 If @a shape is 0, only the pointer visibility is changed.
5002 </note>
5003 </desc>
5004 </param>
5005 </method>
5006
5007 <method name="onMouseCapabilityChange">
5008 <desc>
5009 Notification when the mouse capabilities reported by the
5010 guest have changed. The new capabilities are passed.
5011 </desc>
5012 <param name="supportsAbsolute" type="boolean" dir="in"/>
5013 <param name="needsHostCursor" type="boolean" dir="in"/>
5014 </method>
5015
5016 <method name="onKeyboardLedsChange">
5017 <desc>
5018 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5019 to alter the state of the keyboard LEDs.
5020 </desc>
5021 <param name="numLock" type="boolean" dir="in"/>
5022 <param name="capsLock" type="boolean" dir="in"/>
5023 <param name="scrollLock" type="boolean" dir="in"/>
5024 </method>
5025
5026 <method name="onStateChange">
5027 <desc>
5028 Notification when the execution state of the machine has changed.
5029 The new state will be given.
5030 </desc>
5031 <param name="state" type="MachineState" dir="in"/>
5032 </method>
5033
5034 <method name="onAdditionsStateChange">
5035 <desc>
5036 Notification when a Guest Additions property changes.
5037 Interested callees should query IGuest attributes to
5038 find out what has changed.
5039 </desc>
5040 </method>
5041
5042 <method name="onDVDDriveChange">
5043 <desc>
5044 Notification when a property of the
5045 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5046 Interested callees should use IDVDDrive methods to find out what has
5047 changed.
5048 </desc>
5049 </method>
5050
5051 <method name="onFloppyDriveChange">
5052 <desc>
5053 Notification when a property of the
5054 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5055 Interested callees should use IFloppyDrive methods to find out what
5056 has changed.
5057 </desc>
5058 </method>
5059
5060 <method name="onNetworkAdapterChange">
5061 <desc>
5062 Notification when a property of one of the
5063 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5064 changes. Interested callees should use INetworkAdapter methods and
5065 attributes to find out what has changed.
5066 </desc>
5067 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5068 <desc>Network adapter that is subject to change.</desc>
5069 </param>
5070 </method>
5071
5072 <method name="onSerialPortChange">
5073 <desc>
5074 Notification when a property of one of the
5075 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5076 Interested callees should use ISerialPort methods and attributes
5077 to find out what has changed.
5078 </desc>
5079 <param name="serialPort" type="ISerialPort" dir="in">
5080 <desc>Serial port that is subject to change.</desc>
5081 </param>
5082 </method>
5083
5084 <method name="onParallelPortChange">
5085 <desc>
5086 Notification when a property of one of the
5087 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5088 changes. Interested callees should use ISerialPort methods and
5089 attributes to find out what has changed.
5090 </desc>
5091 <param name="parallelPort" type="IParallelPort" dir="in">
5092 <desc>Parallel port that is subject to change.</desc>
5093 </param>
5094 </method>
5095
5096 <method name="onVRDPServerChange">
5097 <desc>
5098 Notification when a property of the
5099 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5100 Interested callees should use IVRDPServer methods and attributes to
5101 find out what has changed.
5102 </desc>
5103 </method>
5104
5105 <method name="onUSBControllerChange">
5106 <desc>
5107 Notification when a property of the virtual
5108 <link to="IMachine::USBController">USB controller</link> changes.
5109 Interested callees should use IUSBController methods and attributes to
5110 find out what has changed.
5111 </desc>
5112 </method>
5113
5114 <method name="onUSBDeviceStateChange">
5115 <desc>
5116 Notification when a USB device is attached to or detached from
5117 the virtual USB controller.
5118
5119 This notification is sent as a result of the indirect
5120 request to attach the device because it matches one of the
5121 machine USB filters, or as a result of the direct request
5122 issued by <link to="IConsole::attachUSBDevice"/> or
5123 <link to="IConsole::detachUSBDevice"/>.
5124
5125 This notification is sent in case of both a succeeded and a
5126 failed request completion. When the request succeeds, the @a
5127 error parameter is @c null, and the given device has been
5128 already added to (when @a attached is @c true) or removed from
5129 (when @a attached is @c false) the collection represented by
5130 <link to="IConsole::USBDevices"/>. On failure, the collection
5131 doesn't change and the @a error parameter represents the error
5132 message describing the failure.
5133
5134 </desc>
5135 <param name="device" type="IUSBDevice" dir="in">
5136 <desc>Device that is subject to state change.</desc>
5137 </param>
5138 <param name="attached" type="boolean" dir="in">
5139 <desc>
5140 <tt>true</tt> if the device was attached
5141 and <tt>false</tt> otherwise.
5142 </desc>
5143 </param>
5144 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5145 <desc>
5146 <tt>null</tt> on success or an error message object on
5147 failure.
5148 </desc>
5149 </param>
5150 </method>
5151
5152 <method name="onSharedFolderChange">
5153 <desc>
5154 Notification when a shared folder is added or removed.
5155 The @a scope argument defines one of three scopes:
5156 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5157 (<link to="Scope_Global">Global</link>),
5158 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5159 the machine (<link to="Scope_Machine">Machine</link>) or <link
5160 to="IConsole::sharedFolders">transient shared folders</link> of the
5161 machine (<link to="Scope_Session">Session</link>). Interested callees
5162 should use query the corresponding collections to find out what has
5163 changed.
5164 </desc>
5165 <param name="scope" type="Scope" dir="in">
5166 <desc>Scope of the notification.</desc>
5167 </param>
5168 </method>
5169
5170 <method name="onRuntimeError">
5171 <desc>
5172 Notification when an error happens during the virtual
5173 machine execution.
5174
5175 There are three kinds of runtime errors:
5176 <ul>
5177 <li><i>fatal</i></li>
5178 <li><i>non-fatal with retry</i></li>
5179 <li><i>non-fatal warnings</i></li>
5180 </ul>
5181
5182 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5183 to <tt>true</tt>. In case of fatal errors, the virtual machine
5184 execution is always paused before calling this notification, and
5185 the notification handler is supposed either to immediately save
5186 the virtual machine state using <link to="IConsole::saveState()"/>
5187 or power it off using <link to="IConsole::powerDown()"/>.
5188 Resuming the execution can lead to unpredictable results.
5189
5190 <b>Non-fatal</b> errors and warnings are indicated by the
5191 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5192 is in the Paused state by the time the error notification is
5193 received, it means that the user can <i>try to resume</i> the machine
5194 execution after attempting to solve the problem that caused the
5195 error. In this case, the notification handler is supposed
5196 to show an appropriate message to the user (depending on the
5197 value of the @a id parameter) that offers several actions such
5198 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5199 wants to retry, the notification handler should continue
5200 the machine execution using the <link to="IConsole::resume()"/>
5201 call. If the machine execution is not Paused during this
5202 notification, then it means this notification is a <i>warning</i>
5203 (for example, about a fatal condition that can happen very soon);
5204 no immediate action is required from the user, the machine
5205 continues its normal execution.
5206
5207 Note that in either case the notification handler
5208 <b>must not</b> perform any action directly on a thread
5209 where this notification is called. Everything it is allowed to
5210 do is to post a message to another thread that will then talk
5211 to the user and take the corresponding action.
5212
5213 Currently, the following error identifiers are known:
5214 <ul>
5215 <li><tt>"HostMemoryLow"</tt></li>
5216 <li><tt>"HostAudioNotResponding"</tt></li>
5217 <li><tt>"VDIStorageFull"</tt></li>
5218 </ul>
5219
5220 <note>
5221 This notification is not designed to be implemented by
5222 more than one callback at a time. If you have multiple
5223 IConsoleCallback instances registered on the given
5224 IConsole object, make sure you simply do nothing but
5225 return @c S_OK from all but one of them that does actual
5226 user notification and performs necessary actions.
5227 </note>
5228
5229 </desc>
5230 <param name="fatal" type="boolean" dir="in">
5231 <desc>Whether the error is fatal or not</desc>
5232 </param>
5233 <param name="id" type="wstring" dir="in">
5234 <desc>Error identifier</desc>
5235 </param>
5236 <param name="message" type="wstring" dir="in">
5237 <desc>Optional error message</desc>
5238 </param>
5239 </method>
5240
5241 <method name="onCanShowWindow">
5242 <desc>
5243 Notification when a call to
5244 <link to="IMachine::canShowConsoleWindow()"/> is made by a
5245 front-end to check if a subsequent call to
5246 <link to="IMachine::showConsoleWindow()"/> can succeed.
5247
5248 The callee should give an answer appropriate to the current
5249 machine state in the @a canShow argument. This answer must
5250 remain valid at least until the next
5251 <link to="IConsole::state">machine state</link> change.
5252
5253 <note>
5254 This notification is not designed to be implemented by
5255 more than one callback at a time. If you have multiple
5256 IConsoleCallback instances registered on the given
5257 IConsole object, make sure you simply do nothing but
5258 return @c true and @c S_OK from all but one of them that
5259 actually manages console window activation.
5260 </note>
5261 </desc>
5262 <param name="canShow" type="boolean" dir="return">
5263 <desc>
5264 @c true if the console window can be shown and @c
5265 false otherwise.
5266 </desc>
5267 </param>
5268 </method>
5269
5270 <method name="onShowWindow">
5271 <desc>
5272 Notification when a call to
5273 <link to="IMachine::showConsoleWindow()"/>
5274 requests the console window to be activated and brought to
5275 foreground on the desktop of the host PC.
5276
5277 This notification should cause the VM console process to
5278 perform the requested action as described above. If it is
5279 impossible to do it at a time of this notification, this
5280 method should return a failure.
5281
5282 Note that many modern window managers on many platforms
5283 implement some sort of focus stealing prevention logic, so
5284 that it may be impossible to activate a window without the
5285 help of the currently active application (which is supposedly
5286 an initiator of this notification). In this case, this method
5287 must return a non-zero identifier that represents the
5288 top-level window of the VM console process. The caller, if it
5289 represents a currently active process, is responsible to use
5290 this identifier (in a platform-dependent manner) to perform
5291 actual window activation.
5292
5293 This method must set @a winId to zero if it has performed all
5294 actions necessary to complete the request and the console
5295 window is now active and in foreground, to indicate that no
5296 further action is required on the caller's side.
5297
5298 <note>
5299 This notification is not designed to be implemented by
5300 more than one callback at a time. If you have multiple
5301 IConsoleCallback instances registered on the given
5302 IConsole object, make sure you simply do nothing but
5303 return @c S_OK from all but one of them that actually
5304 manages console window activation.
5305 </note>
5306 </desc>
5307 <param name="winId" type="unsigned long long" dir="return">
5308 <desc>
5309 Platform-dependent identifier of the top-level VM console
5310 window, or zero if this method has performed all actions
5311 necessary to implement the <i>show window</i> semantics for
5312 the given platform and/or this VirtualBox front-end.
5313 </desc>
5314 </param>
5315 </method>
5316
5317 </interface>
5318
5319 <interface
5320 name="IRemoteDisplayInfo" extends="$unknown"
5321 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5322 wsmap="struct"
5323 >
5324 <desc>
5325 Contains information about the remote display (VRDP) capabilities and status.
5326 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5327 </desc>
5328
5329 <attribute name="active" type="boolean" readonly="yes">
5330 <desc>
5331 Whether the remote display connection is active.
5332 </desc>
5333 </attribute>
5334
5335 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5336 <desc>
5337 How many times a client connected.
5338 </desc>
5339 </attribute>
5340
5341 <attribute name="beginTime" type="long long" readonly="yes">
5342 <desc>
5343 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5344 </desc>
5345 </attribute>
5346
5347 <attribute name="endTime" type="long long" readonly="yes">
5348 <desc>
5349 When the last connection was terminated or the current time, if
5350 connection is still active, in milliseconds since 1970-01-01 UTC.
5351 </desc>
5352 </attribute>
5353
5354 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5355 <desc>
5356 How many bytes were sent in last or current, if still active, connection.
5357 </desc>
5358 </attribute>
5359
5360 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5361 <desc>
5362 How many bytes were sent in all connections.
5363 </desc>
5364 </attribute>
5365
5366 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5367 <desc>
5368 How many bytes were received in last or current, if still active, connection.
5369 </desc>
5370 </attribute>
5371
5372 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5373 <desc>
5374 How many bytes were received in all connections.
5375 </desc>
5376 </attribute>
5377
5378 <attribute name="user" type="wstring" readonly="yes">
5379 <desc>
5380 Login user name supplied by the client.
5381 </desc>
5382 </attribute>
5383
5384 <attribute name="domain" type="wstring" readonly="yes">
5385 <desc>
5386 Login domain name supplied by the client.
5387 </desc>
5388 </attribute>
5389
5390 <attribute name="clientName" type="wstring" readonly="yes">
5391 <desc>
5392 The client name supplied by the client.
5393 </desc>
5394 </attribute>
5395
5396 <attribute name="clientIP" type="wstring" readonly="yes">
5397 <desc>
5398 The IP address of the client.
5399 </desc>
5400 </attribute>
5401
5402 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5403 <desc>
5404 The client software version number.
5405 </desc>
5406 </attribute>
5407
5408 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5409 <desc>
5410 Public key exchange method used when connection was established.
5411 Values: 0 - RDP4 public key exchange scheme.
5412 1 - X509 certificates were sent to client.
5413 </desc>
5414 </attribute>
5415
5416 </interface>
5417
5418 <interface
5419 name="IConsole" extends="$unknown"
5420 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5421 wsmap="managed"
5422 >
5423 <desc>
5424 The IConsole interface represents an interface to control virtual
5425 machine execution.
5426
5427 The console object that implements the IConsole interface is obtained
5428 from a session object after the session for the given machine has been
5429 opened using one of <link to="IVirtualBox::openSession"/>,
5430 <link to="IVirtualBox::openRemoteSession"/> or
5431 <link to="IVirtualBox::openExistingSession"/> methods.
5432
5433 Methods of the IConsole interface allow the caller to query the current
5434 virtual machine execution state, pause the machine or power it down, save
5435 the machine state or take a snapshot, attach and detach removable media
5436 and so on.
5437
5438 <see>ISession</see>
5439 </desc>
5440
5441 <attribute name="machine" type="IMachine" readonly="yes">
5442 <desc>
5443 Machine object this console is sessioned with.
5444 <note>
5445 This is a convenience property, it has the same value as
5446 <link to="ISession::machine"/> of the corresponding session
5447 object.
5448 </note>
5449 </desc>
5450 </attribute>
5451
5452 <attribute name="state" type="MachineState" readonly="yes">
5453 <desc>
5454 Current execution state of the machine.
5455 <note>
5456 This property always returns the same value as the corresponding
5457 property of the IMachine object this console is sessioned with.
5458 For the process that owns (executes) the VM, this is the
5459 preferable way of querying the VM state, because no IPC
5460 calls are made.
5461 </note>
5462 </desc>
5463 </attribute>
5464
5465 <attribute name="guest" type="IGuest" readonly="yes">
5466 <desc>Guest object.</desc>
5467 </attribute>
5468
5469 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5470 <desc>
5471 Virtual keyboard object.
5472 <note>
5473 If the machine is not running, any attempt to use
5474 the returned object will result in an error.
5475 </note>
5476 </desc>
5477 </attribute>
5478
5479 <attribute name="mouse" type="IMouse" readonly="yes">
5480 <desc>
5481 Virtual mouse object.
5482 <note>
5483 If the machine is not running, any attempt to use
5484 the returned object will result in an error.
5485 </note>
5486 </desc>
5487 </attribute>
5488
5489 <attribute name="display" type="IDisplay" readonly="yes">
5490 <desc>Virtual display object.
5491 <note>
5492 If the machine is not running, any attempt to use
5493 the returned object will result in an error.
5494 </note>
5495 </desc>
5496 </attribute>
5497
5498 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5499 <desc>Debugging interface.</desc>
5500 </attribute>
5501
5502 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5503 <desc>
5504 Collection of USB devices currently attached to the virtual
5505 USB controller.
5506 <note>
5507 The collection is empty if the machine is not running.
5508 </note>
5509 </desc>
5510 </attribute>
5511
5512 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5513 <desc>
5514 List of USB devices currently attached to the remote VRDP client.
5515 Once a new device is physically attached to the remote host computer,
5516 it appears in this list and remains there until detached.
5517 </desc>
5518 </attribute>
5519
5520 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5521 <desc>
5522 Collection of shared folders for the current session. These folders
5523 are called transient shared folders because they are available to the
5524 guest OS running inside the associated virtual machine only for the
5525 duration of the session (as opposed to
5526 <link to="IMachine::sharedFolders"/> which represent permanent shared
5527 folders). When the session is closed (e.g. the machine is powered down),
5528 these folders are automatically discarded.
5529
5530 New shared folders are added to the collection using
5531 <link to="#createSharedFolder"/>. Existing shared folders can be
5532 removed using <link to="#removeSharedFolder"/>.
5533 </desc>
5534 </attribute>
5535
5536 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5537 <desc>
5538 Interface that provides information on Remote Display (VRDP) connection.
5539 </desc>
5540 </attribute>
5541
5542 <method name="powerUp">
5543 <desc>
5544 Starts the virtual machine execution using the current machine
5545 state (that is, its current execution state, current settings and
5546 current hard disks).
5547
5548 If the machine is powered off or aborted, the execution will
5549 start from the beginning (as if the real hardware were just
5550 powered on).
5551
5552 If the machine is in the <link to="MachineState_Saved"/> state,
5553 it will continue its execution the point where the state has
5554 been saved.
5555
5556 <note>
5557 Unless you are trying to write a new VirtualBox front-end that
5558 performs direct machine execution (like the VirtualBox or VBoxSDL
5559 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5560 session opened by <link to="IVirtualBox::openSession"/> and use this
5561 session only to change virtual machine settings. If you simply want to
5562 start virtual machine execution using one of the existing front-ends
5563 (for example the VirtualBox GUI or headless server), simply use
5564 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5565 power up the machine automatically for you.
5566 </note>
5567
5568 <see>#saveState</see>
5569 <result name="VBOX_E_INVALID_VM_STATE">
5570 Virtual machine already running.
5571 </result>
5572 <result name="VBOX_E_HOST_ERROR">
5573 Host interface does not exist or name not set.
5574 </result>
5575 <result name="VBOX_E_FILE_ERROR">
5576 Invalid saved state file.
5577 </result>
5578 </desc>
5579 <param name="progress" type="IProgress" dir="return">
5580 <desc>Progress object to track the operation completion.</desc>
5581 </param>
5582 </method>
5583
5584 <method name="powerUpPaused">
5585 <desc>
5586 Identical to powerUp except that the VM will enter the
5587 <link to="MachineState_Paused"/> state, instead of
5588 <link to="MachineState_Running"/>.
5589
5590 <see>#powerUp</see>
5591 <result name="VBOX_E_INVALID_VM_STATE">
5592 Virtual machine already running.
5593 </result>
5594 <result name="VBOX_E_HOST_ERROR">
5595 Host interface does not exist or name not set.
5596 </result>
5597 <result name="VBOX_E_FILE_ERROR">
5598 Invalid saved state file.
5599 </result>
5600 </desc>
5601 <param name="progress" type="IProgress" dir="return">
5602 <desc>Progress object to track the operation completion.</desc>
5603 </param>
5604 </method>
5605
5606 <method name="powerDown">
5607 <desc>
5608 Stops the virtual machine execution.
5609 After this operation completes, the machine will go to the
5610 PoweredOff state.
5611
5612 @deprecated This method will be removed in VirtualBox 2.1 where the
5613 powerDownAsync() method will take its name. Do not use this method in
5614 the code.
5615 <result name="VBOX_E_INVALID_VM_STATE">
5616 Virtual machine must be Running, Paused or Stuck to be powered down.
5617 </result>
5618 <result name="VBOX_E_VM_ERROR">
5619 Unable to power off or destroy virtual machine.
5620 </result>
5621 </desc>
5622 </method>
5623
5624 <method name="powerDownAsync">
5625 <desc>
5626 Initiates the power down procedure to stop the virtual machine
5627 execution.
5628
5629 The completion of the power down procedure is tracked using the returned
5630 IProgress object. After the operation is complete, the machine will go
5631 to the PoweredOff state.
5632
5633 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5634 where the original powerDown() method will be removed. You will need to
5635 rename "powerDownAsync" to "powerDown" in your sources to make them
5636 build with version 2.1.
5637 <result name="VBOX_E_INVALID_VM_STATE">
5638 Virtual machine must be Running, Paused or Stuck to be powered down.
5639 </result>
5640 </desc>
5641 <param name="progress" type="IProgress" dir="return">
5642 <desc>Progress object to track the operation completion.</desc>
5643 </param>
5644 </method>
5645
5646 <method name="reset">
5647 <desc>Resets the virtual machine.
5648 <result name="VBOX_E_INVALID_VM_STATE">
5649 Virtual machine not in Running state.
5650 </result>
5651 <result name="VBOX_E_VM_ERROR">
5652 Virtual machine error in reset operation.
5653 </result>
5654 </desc>
5655 </method>
5656
5657 <method name="pause">
5658 <desc>Pauses the virtual machine execution.
5659 <result name="VBOX_E_INVALID_VM_STATE">
5660 Virtual machine not in Running state.
5661 </result>
5662 <result name="VBOX_E_VM_ERROR">
5663 Virtual machine error in suspend operation.
5664 </result>
5665 </desc>
5666 </method>
5667
5668 <method name="resume">
5669 <desc>Resumes the virtual machine execution.
5670 <result name="VBOX_E_INVALID_VM_STATE">
5671 Virtual machine not in Paused state.
5672 </result>
5673 <result name="VBOX_E_VM_ERROR">
5674 Virtual machine error in resume operation.
5675 </result>
5676 </desc>
5677 </method>
5678
5679 <method name="powerButton">
5680 <desc>Sends the ACPI power button event to the guest.
5681 <result name="VBOX_E_INVALID_VM_STATE">
5682 Virtual machine not in Running state.
5683 </result>
5684 <result name="VBOX_E_PDM_ERROR">
5685 Controlled power off failed.
5686 </result>
5687 </desc>
5688 </method>
5689
5690 <method name="sleepButton">
5691 <desc>Sends the ACPI sleep button event to the guest.
5692 <result name="VBOX_E_INVALID_VM_STATE">
5693 Virtual machine not in Running state.
5694 </result>
5695 <result name="VBOX_E_PDM_ERROR">
5696 Sending sleep button event failed.
5697 </result>
5698 </desc>
5699 </method>
5700
5701 <method name="getPowerButtonHandled">
5702 <desc>Checks if the last power button event was handled by guest.
5703 <result name="VBOX_E_PDM_ERROR">
5704 Checking if the event was handled by the guest OS failed.
5705 </result>
5706 </desc>
5707 <param name="handled" type="boolean" dir="return"/>
5708 </method>
5709
5710 <method name="getGuestEnteredACPIMode">
5711 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5712 G1 (sleeping). If this method returns false, the guest will
5713 most likely not respond to external ACPI events.
5714 <result name="VBOX_E_INVALID_VM_STATE">
5715 Virtual machine not in Running state.
5716 </result>
5717 </desc>
5718 <param name="entered" type="boolean" dir="return"/>
5719 </method>
5720
5721 <method name="saveState">
5722 <desc>
5723 Saves the current execution state of a running virtual machine
5724 and stops its execution.
5725
5726 After this operation completes, the machine will go to the
5727 Saved state. Next time it is powered up, this state will
5728 be restored and the machine will continue its execution from
5729 the place where it was saved.
5730
5731 This operation differs from taking a snapshot to the effect
5732 that it doesn't create new differencing hard disks. Also, once
5733 the machine is powered up from the state saved using this method,
5734 the saved state is deleted, so it will be impossible to return
5735 to this state later.
5736
5737 <note>
5738 On success, this method implicitly calls
5739 <link to="IMachine::saveSettings()"/> to save all current machine
5740 settings (including runtime changes to the DVD drive, etc.).
5741 Together with the impossibility to change any VM settings when it is
5742 in the Saved state, this guarantees adequate hardware
5743 configuration of the machine when it is restored from the saved
5744 state file.
5745 </note>
5746
5747 <note>
5748 The machine must be in the Running or Paused state, otherwise
5749 the operation will fail.
5750 </note>
5751 <result name="VBOX_E_INVALID_VM_STATE">
5752 Virtual machine state neither Running nor Paused.
5753 </result>
5754 <result name="VBOX_E_FILE_ERROR">
5755 Failed to create directory for saved state file.
5756 </result>
5757
5758 <see><link to="#takeSnapshot"/></see>
5759 </desc>
5760 <param name="progress" type="IProgress" dir="return">
5761 <desc>Progress object to track the operation completion.</desc>
5762 </param>
5763 </method>
5764
5765 <method name="adoptSavedState">
5766 <desc>
5767 Associates the given saved state file to the virtual machine.
5768
5769 On success, the machine will go to the Saved state. Next time it is
5770 powered up, it will be restored from the adopted saved state and
5771 continue execution from the place where the saved state file was
5772 created.
5773
5774 The specified saved state file path may be absolute or relative to the
5775 folder the VM normally saves the state to (usually,
5776 <link to="IMachine::snapshotFolder"/>).
5777
5778 <note>
5779 It's a caller's responsibility to make sure the given saved state
5780 file is compatible with the settings of this virtual machine that
5781 represent its virtual hardware (memory size, hard disk configuration
5782 etc.). If there is a mismatch, the behavior of the virtual machine
5783 is undefined.
5784 </note>
5785 <result name="VBOX_E_INVALID_VM_STATE">
5786 Virtual machine state neither PoweredOff nor Aborted.
5787 </result>
5788 </desc>
5789 <param name="savedStateFile" type="wstring" dir="in">
5790 <desc>Path to the saved state file to adopt.</desc>
5791 </param>
5792 </method>
5793
5794 <method name="discardSavedState">
5795 <desc>
5796 Discards (deletes) the saved state of the virtual machine
5797 previously created by <link to="#saveState"/>. Next time the
5798 machine is powered up, a clean boot will occur.
5799 <note>
5800 This operation is equivalent to resetting or powering off
5801 the machine without doing a proper shutdown in the guest OS.
5802 </note>
5803 <result name="VBOX_E_INVALID_VM_STATE">
5804 Virtual machine not in state Saved.
5805 </result>
5806 </desc>
5807 </method>
5808
5809 <method name="getDeviceActivity">
5810 <desc>
5811 Gets the current activity type of a given device or device group.
5812 <result name="E_INVALIDARG">
5813 Invalid device type.
5814 </result>
5815 </desc>
5816 <param name="type" type="DeviceType" dir="in"/>
5817 <param name="activity" type="DeviceActivity" dir="return"/>
5818 </method>
5819
5820 <method name="attachUSBDevice">
5821 <desc>
5822 Attaches a host USB device with the given UUID to the
5823 USB controller of the virtual machine.
5824
5825 The device needs to be in one of the following states:
5826 <link to="USBDeviceState_Busy"/>,
5827 <link to="USBDeviceState_Available"/> or
5828 <link to="USBDeviceState_Held"/>,
5829 otherwise an error is immediately returned.
5830
5831 When the device state is
5832 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5833 be returned if the host computer refuses to release it for some reason.
5834
5835 <see>IUSBController::deviceFilters, USBDeviceState</see>
5836 <result name="VBOX_E_INVALID_VM_STATE">
5837 Virtual machine state neither Running nor Paused.
5838 </result>
5839 <result name="VBOX_E_PDM_ERROR">
5840 Virtual machine does not have a USB controller.
5841 </result>
5842 </desc>
5843 <param name="id" type="uuid" dir="in">
5844 <desc>UUID of the host USB device to attach.</desc>
5845 </param>
5846 </method>
5847
5848 <method name="detachUSBDevice">
5849 <desc>
5850 Detaches an USB device with the given UUID from the USB controller
5851 of the virtual machine.
5852
5853 After this method succeeds, the VirtualBox server re-initiates
5854 all USB filters as if the device were just physically attached
5855 to the host, but filters of this machine are ignored to avoid
5856 a possible automatic re-attachment.
5857
5858 <see>IUSBController::deviceFilters, USBDeviceState</see>
5859
5860 <result name="VBOX_E_PDM_ERROR">
5861 Virtual machine does not have a USB controller.
5862 </result>
5863 <result name="E_INVALIDARG">
5864 USB device not attached to this virtual machine.
5865 </result>
5866 </desc>
5867 <param name="id" type="uuid" dir="in">
5868 <desc>UUID of the USB device to detach.</desc>
5869 </param>
5870 <param name="device" type="IUSBDevice" dir="return">
5871 <desc>Detached USB device.</desc>
5872 </param>
5873 </method>
5874
5875 <method name="createSharedFolder">
5876 <desc>
5877 Creates a transient new shared folder by associating the given logical
5878 name with the given host path, adds it to the collection of shared
5879 folders and starts sharing it. Refer to the description of
5880 <link to="ISharedFolder"/> to read more about logical names.
5881
5882 <result name="VBOX_E_INVALID_VM_STATE">
5883 Virtual machine in Saved state or currently changing state.
5884 </result>
5885 <result name="VBOX_E_FILE_ERROR">
5886 Shared folder already exists or not accessible.
5887 </result>
5888 </desc>
5889 <param name="name" type="wstring" dir="in">
5890 <desc>Unique logical name of the shared folder.</desc>
5891 </param>
5892 <param name="hostPath" type="wstring" dir="in">
5893 <desc>Full path to the shared folder in the host file system.</desc>
5894 </param>
5895 <param name="writable" type="boolean" dir="in">
5896 <desc>Whether the share is writable or readonly</desc>
5897 </param>
5898 </method>
5899
5900 <method name="removeSharedFolder">
5901 <desc>
5902 Removes a transient shared folder with the given name previously
5903 created by <link to="#createSharedFolder"/> from the collection of
5904 shared folders and stops sharing it.
5905 <result name="VBOX_E_INVALID_VM_STATE">
5906 Virtual machine in Saved state or currently changing state.
5907 </result>
5908 <result name="VBOX_E_FILE_ERROR">
5909 Shared folder does not exists.
5910 </result>
5911 </desc>
5912 <param name="name" type="wstring" dir="in">
5913 <desc>Logical name of the shared folder to remove.</desc>
5914 </param>
5915 </method>
5916
5917 <method name="takeSnapshot">
5918 <desc>
5919 Saves the current execution state and all settings of the
5920 machine and creates differencing images for all
5921 normal (non-independent) hard disks.
5922
5923 This method can be called for a PoweredOff, Saved, Running or
5924 Paused virtual machine. When the machine is PoweredOff, an
5925 offline <link to="ISnapshot">snapshot</link> is created,
5926 in all other cases -- an online snapshot.
5927
5928 The taken snapshot is always based on the
5929 <link to="IMachine::currentSnapshot">current
5930 snapshot</link> of the associated virtual machine and becomes
5931 a new current snapshot.
5932
5933 <note>
5934 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5935 save all current machine settings before taking an offline snapshot.
5936 </note>
5937
5938 <see>ISnapshot, <link to="#saveState"/></see>
5939 <result name="VBOX_E_INVALID_VM_STATE">
5940 Virtual machine currently changing state.
5941 </result>
5942 </desc>
5943 <param name="name" type="wstring" dir="in">
5944 <desc>Short name for the snapshot.</desc>
5945 </param>
5946 <param name="description" type="wstring" dir="in">
5947 <desc>Optional description of the snapshot.</desc>
5948 </param>
5949 <param name="progress" type="IProgress" dir="return">
5950 <desc>Progress object to track the operation completion.</desc>
5951 </param>
5952 </method>
5953
5954 <method name="discardSnapshot">
5955 <desc>
5956
5957 Starts discarding the specified snapshot. The execution state
5958 and settings of the associated machine stored in the snapshot
5959 will be deleted. The contents of all differencing hard disks of
5960 this snapshot will be merged with the contents of their
5961 dependent child hard disks to keep the, disks valid (in other
5962 words, all changes represented by hard disks being discarded
5963 will be propagated to their child hard disks). After that, this
5964 snapshot's differencing hard disks will be deleted. The parent
5965 of this snapshot will become a new parent for all its child
5966 snapshots.
5967
5968 If the discarded snapshot is the current one, its parent
5969 snapshot will become a new current snapshot. The current machine
5970 state is not directly affected in this case, except that
5971 currently attached differencing hard disks based on hard disks
5972 of the discarded snapshot will be also merged as described
5973 above.
5974
5975 If the discarded snapshot is the first one (the root snapshot)
5976 and it has exactly one child snapshot, this child snapshot will
5977 become the first snapshot after discarding. If there are no
5978 children at all (i.e. the first snapshot is the only snapshot of
5979 the machine), both the current and the first snapshot of the
5980 machine will be set to null. In all other cases, the first
5981 snapshot cannot be discarded.
5982
5983 You cannot discard the snapshot if it
5984 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
5985 hard disks that have differencing hard disks based on them. Snapshots of
5986 such kind can be discarded only when every normal hard disk has either
5987 no children at all or exactly one child. In the former case, the normal
5988 hard disk simply becomes unused (i.e. not attached to any VM). In the
5989 latter case, it receives all the changes stored in the child hard disk,
5990 and then it replaces the child hard disk in the configuration of the
5991 corresponding snapshot or machine.
5992
5993 Also, you cannot discard the snapshot if it stores hard disks
5994 (of any type) having differencing child hard disks that belong
5995 to other machines. Such snapshots can be only discarded after
5996 you discard all snapshots of other machines containing "foreign"
5997 child disks, or detach these "foreign" child disks from machines
5998 they are attached to.
5999
6000 One particular example of the snapshot storing normal hard disks
6001 is the first snapshot of a virtual machine that had normal hard
6002 disks attached when taking the snapshot. Be careful when
6003 discarding such snapshots because this implicitly commits
6004 changes (made since the snapshot being discarded has been taken)
6005 to normal hard disks (as described above), which may be not what
6006 you want.
6007
6008 The virtual machine is put to
6009 the <link to="MachineState_Discarding">Discarding</link> state until
6010 the discard operation is completed.
6011
6012 <note>
6013 The machine must not be running, otherwise the operation
6014 will fail.
6015 </note>
6016
6017 <note>
6018 Child hard disks of all normal hard disks of the discarded snapshot
6019 must be accessible (see <link to="IMedium::state"/>) for this
6020 operation to succeed. In particular, this means that all virtual
6021 machines, whose hard disks are directly or indirectly based on the
6022 hard disks of discarded snapshot, must be powered off.
6023 </note>
6024 <note>
6025 Merging hard disk contents can be very time and disk space
6026 consuming, if these disks are big in size and have many
6027 children. However, if the snapshot being discarded is the last
6028 (head) snapshot on the branch, the operation will be rather
6029 quick.
6030 </note>
6031 <note>
6032 Note that discarding the current snapshot
6033 will implicitly call <link to="IMachine::saveSettings()"/> to
6034 make all current machine settings permanent.
6035 </note>
6036 <result name="VBOX_E_INVALID_VM_STATE">
6037 Virtual machine is running.
6038 </result>
6039 </desc>
6040 <param name="id" type="uuid" dir="in">
6041 <desc>UUID of the snapshot to discard.</desc>
6042 </param>
6043 <param name="progress" type="IProgress" dir="return">
6044 <desc>Progress object to track the operation completion.</desc>
6045 </param>
6046 </method>
6047
6048 <method name="discardCurrentState">
6049 <desc>
6050 This operation is similar to <link to="#discardSnapshot()"/> but
6051 affects the current machine state. This means that the state stored in
6052 the current snapshot will become a new current state, and all current
6053 settings of the machine and changes stored in differencing hard disks
6054 will be lost.
6055
6056 After this operation is successfully completed, new empty differencing
6057 hard disks are created for all normal hard disks of the machine.
6058
6059 If the current snapshot of the machine is an online snapshot, the
6060 machine will go to the <link to="MachineState_Saved"> saved
6061 state</link>, so that the next time it is powered on, the execution
6062 state will be restored from the current snapshot.
6063
6064 <note>
6065 The machine must not be running, otherwise the operation will fail.
6066 </note>
6067
6068 <note>
6069 If the machine state is <link to="MachineState_Saved">Saved</link>
6070 prior to this operation, the saved state file will be implicitly
6071 discarded (as if <link to="IConsole::discardSavedState()"/> were
6072 called).
6073 </note>
6074
6075 <result name="VBOX_E_INVALID_VM_STATE">
6076 Virtual machine is running.
6077 </result>
6078 </desc>
6079 <param name="progress" type="IProgress" dir="return">
6080 <desc>Progress object to track the operation completion.</desc>
6081 </param>
6082 </method>
6083
6084 <method name="discardCurrentSnapshotAndState">
6085 <desc>
6086
6087 This method is equivalent to
6088 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6089 (currentSnapshot.id(), progress) followed by
6090 <link to="#discardCurrentState()"/>.
6091
6092 As a result, the machine will be fully restored from the
6093 snapshot preceding the current snapshot, while both the current
6094 snapshot and the current machine state will be discarded.
6095
6096 If the current snapshot is the first snapshot of the machine (i.e. it
6097 has the only snapshot), the current machine state will be
6098 discarded <b>before</b> discarding the snapshot. In other words, the
6099 machine will be restored from its last snapshot, before discarding
6100 it. This differs from performing a single
6101 <link to="#discardSnapshot()"/> call (note that no
6102 <link to="#discardCurrentState()"/> will be possible after it)
6103 to the effect that the latter will preserve the current state instead of
6104 discarding it.
6105
6106 Unless explicitly mentioned otherwise, all remarks and
6107 limitations of the above two methods also apply to this method.
6108
6109 <note>
6110 The machine must not be running, otherwise the operation
6111 will fail.
6112 </note>
6113
6114 <note>
6115 If the machine state is <link to="MachineState_Saved">Saved</link>
6116 prior to this operation, the saved state file will be implicitly
6117 discarded (as if <link to="#discardSavedState()"/> were
6118 called).
6119 </note>
6120
6121 <note>
6122 This method is more efficient than calling both of the above
6123 methods separately: it requires less IPC calls and provides
6124 a single progress object.
6125 </note>
6126
6127 <result name="VBOX_E_INVALID_VM_STATE">
6128 Virtual machine is running.
6129 </result>
6130 </desc>
6131 <param name="progress" type="IProgress" dir="return">
6132 <desc>Progress object to track the operation completion.</desc>
6133 </param>
6134 </method>
6135
6136 <method name="registerCallback">
6137 <desc>
6138 Registers a new console callback on this instance. The methods of the
6139 callback interface will be called by this instance when the appropriate
6140 event occurs.
6141 </desc>
6142 <param name="callback" type="IConsoleCallback" dir="in"/>
6143 </method>
6144
6145 <method name="unregisterCallback">
6146 <desc>
6147 Unregisters the console callback previously registered using
6148 <link to="#registerCallback"/>.
6149 <result name="E_INVALIDARG">
6150 Given @a callback handler is not registered.
6151 </result>
6152 </desc>
6153 <param name="callback" type="IConsoleCallback" dir="in"/>
6154 </method>
6155 </interface>
6156
6157 <!--
6158 // IHost
6159 /////////////////////////////////////////////////////////////////////////
6160 -->
6161
6162 <interface
6163 name="IHostDVDDrive" extends="$unknown"
6164 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6165 wsmap="managed"
6166 >
6167 <desc>
6168 The IHostDVDDrive interface represents the physical CD/DVD drive
6169 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6170 </desc>
6171
6172 <attribute name="name" type="wstring" readonly="yes">
6173 <desc>
6174 Returns the platform-specific device identifier.
6175 On DOS-like platforms, it is a drive name (e.g. R:).
6176 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6177 </desc>
6178 </attribute>
6179 <attribute name="description" type="wstring" readonly="yes">
6180 <desc>
6181 Returns a human readable description for the drive. This
6182 description usually contains the product and vendor name. A
6183 @c null string is returned if the description is not available.
6184 </desc>
6185 </attribute>
6186 <attribute name="udi" type="wstring" readonly="yes">
6187 <desc>
6188 Returns the unique device identifier for the drive. This
6189 attribute is reserved for future use instead of
6190 <link to="#name"/>. Currently it is not used and may return
6191 @c null on some platforms.
6192 </desc>
6193 </attribute>
6194
6195 </interface>
6196
6197 <enumerator
6198 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
6199 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
6200 />
6201
6202 <collection
6203 name="IHostDVDDriveCollection" type="IHostDVDDrive"
6204 enumerator="IHostDVDDriveEnumerator"
6205 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
6206 readonly="yes"
6207 >
6208 <method name="findByName">
6209 <desc>
6210 Searches this collection for a host drive with the given name.
6211 <note>
6212 The method returns an error if the given name does not
6213 correspond to any host drive in the collection.
6214 </note>
6215 </desc>
6216 <param name="name" type="wstring" dir="in">
6217 <desc>Name of the host drive to search for</desc>
6218 </param>
6219 <param name="drive" type="IHostDVDDrive" dir="return">
6220 <desc>Found host drive object</desc>
6221 </param>
6222 </method>
6223 </collection>
6224
6225 <interface
6226 name="IHostFloppyDrive" extends="$unknown"
6227 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
6228 wsmap="managed"
6229 >
6230 <desc>
6231 The IHostFloppyDrive interface represents the physical floppy drive
6232 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6233 </desc>
6234 <attribute name="name" type="wstring" readonly="yes">
6235 <desc>
6236 Returns the platform-specific device identifier.
6237 On DOS-like platforms, it is a drive name (e.g. A:).
6238 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6239 </desc>
6240 </attribute>
6241 <attribute name="description" type="wstring" readonly="yes">
6242 <desc>
6243 Returns a human readable description for the drive. This
6244 description usually contains the product and vendor name. A
6245 @c null string is returned if the description is not available.
6246 </desc>
6247 </attribute>
6248 <attribute name="udi" type="wstring" readonly="yes">
6249 <desc>
6250 Returns the unique device identifier for the drive. This
6251 attribute is reserved for future use instead of
6252 <link to="#name"/>. Currently it is not used and may return
6253 @c null on some platforms.
6254 </desc>
6255 </attribute>
6256 </interface>
6257
6258 <enumerator
6259 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
6260 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
6261 />
6262
6263 <collection
6264 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
6265 enumerator="IHostFloppyDriveEnumerator"
6266 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
6267 readonly="yes"
6268 >
6269 <method name="findByName">
6270 <desc>
6271 Searches this collection for a host drive with the given name.
6272 <note>
6273 The method returns an error if the given name does not
6274 correspond to any host drive in the collection.
6275 </note>
6276 </desc>
6277 <param name="name" type="wstring" dir="in">
6278 <desc>Name of the host drive to search for</desc>
6279 </param>
6280 <param name="drive" type="IHostFloppyDrive" dir="return">
6281 <desc>Found host drive object</desc>
6282 </param>
6283 </method>
6284 </collection>
6285
6286 <enum
6287 name="HostNetworkInterfaceType"
6288 uuid="763754FA-3246-4539-9590-9E603EDBF706"
6289 >
6290 <desc>
6291 Type of encapsulation. Ethernet encapsulation includes both wired and
6292 wireless Ethernet connections.
6293 <see>IHostNetworkInterface</see>
6294 </desc>
6295
6296 <const name="Unknown" value="0">
6297 <desc>
6298 The type of interface cannot be determined.
6299 </desc>
6300 </const>
6301 <const name="Ethernet" value="1">
6302 <desc>
6303 Ethernet frame encapsulation.
6304 </desc>
6305 </const>
6306 <const name="PPP" value="2">
6307 <desc>
6308 Point-to-point protocol encapsulation.
6309 </desc>
6310 </const>
6311 <const name="SLIP" value="3">
6312 <desc>
6313 Serial line IP encapsulation.
6314 </desc>
6315 </const>
6316 </enum>
6317
6318 <enum
6319 name="HostNetworkInterfaceStatus"
6320 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6321 >
6322 <desc>
6323 Current status of the interface.
6324 <see>IHostNetworkInterface</see>
6325 </desc>
6326
6327 <const name="Unknown" value="0">
6328 <desc>
6329 The state of interface cannot be determined.
6330 </desc>
6331 </const>
6332 <const name="Up" value="1">
6333 <desc>
6334 The interface is fully operational.
6335 </desc>
6336 </const>
6337 <const name="Down" value="2">
6338 <desc>
6339 The interface is not functioning.
6340 </desc>
6341 </const>
6342 </enum>
6343
6344 <interface
6345 name="IHostNetworkInterface" extends="$unknown"
6346 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
6347 wsmap="managed"
6348 >
6349 <desc>
6350 Reprents one of host's network interfaces. IP V6 address and network
6351 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6352 separated by colons.
6353 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6354 </desc>
6355 <attribute name="name" type="wstring" readonly="yes">
6356 <desc>Returns the host network interface name.</desc>
6357 </attribute>
6358
6359 <attribute name="id" type="uuid" readonly="yes">
6360 <desc>Returns the interface UUID.</desc>
6361 </attribute>
6362
6363 <attribute name="IPAddress" type="unsigned long" readonly="yes">
6364 <desc>Returns the IP V4 address of the interface.</desc>
6365 </attribute>
6366
6367 <attribute name="networkMask" type="unsigned long" readonly="yes">
6368 <desc>Returns the network mask of the interface.</desc>
6369 </attribute>
6370
6371 <attribute name="IPV6Address" type="wstring" readonly="yes">
6372 <desc>Returns the IP V6 address of the interface.</desc>
6373 </attribute>
6374
6375 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
6376 <desc>Returns the IP V6 network mask of the interface.</desc>
6377 </attribute>
6378
6379 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6380 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6381 </attribute>
6382
6383 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
6384 <desc>Type of protocol encapsulation used.</desc>
6385 </attribute>
6386
6387 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6388 <desc>Status of the interface.</desc>
6389 </attribute>
6390 </interface>
6391
6392 <interface
6393 name="IHost" extends="$unknown"
6394 uuid="7c172c42-b209-4bdc-9ddf-a84f222bd59a"
6395 wsmap="managed"
6396 >
6397 <desc>
6398 The IHost interface represents the physical machine that this VirtualBox
6399 installation runs on.
6400
6401 An object implementing this interface is returned by the
6402 <link to="IVirtualBox::host" /> attribute. This interface contains
6403 read-only information about the host's physical hardware (such as what
6404 processors and disks are available, what the host operating system is,
6405 and so on) and also allows for manipulating some of the host's hardware,
6406 such as global USB device filters and host interface networking.
6407
6408 </desc>
6409 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6410 <desc>List of DVD drives available on the host.</desc>
6411 </attribute>
6412
6413 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6414 <desc>List of floppy drives available on the host.</desc>
6415 </attribute>
6416
6417 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6418 <desc>
6419 List of USB devices currently attached to the host.
6420 Once a new device is physically attached to the host computer,
6421 it appears in this list and remains there until detached.
6422
6423 <note>
6424 This method may set a @ref com_warnings "warning result code".
6425 </note>
6426 <note>
6427 If USB functionality is not available in the given edition of
6428 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6429 </note>
6430 </desc>
6431 </attribute>
6432
6433 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6434 <desc>
6435 List of USB device filters in action.
6436 When a new device is physically attached to the host computer,
6437 filters from this list are applied to it (in order they are stored
6438 in the list). The first matched filter will determine the
6439 <link to="IHostUSBDeviceFilter::action">action</link>
6440 performed on the device.
6441
6442 Unless the device is ignored by these filters, filters of all
6443 currently running virtual machines
6444 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6445
6446 <note>
6447 This method may set a @ref com_warnings "warning result code".
6448 </note>
6449 <note>
6450 If USB functionality is not available in the given edition of
6451 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6452 </note>
6453
6454 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6455 </desc>
6456 </attribute>
6457
6458 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6459 <desc>List of host network interfaces currently defined on the host.</desc>
6460 </attribute>
6461
6462 <attribute name="processorCount" type="unsigned long" readonly="yes">
6463 <desc>Number of (logical) CPUs installed in the host system.</desc>
6464 </attribute>
6465
6466 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6467 <desc>Number of (logical) CPUs online in the host system.</desc>
6468 </attribute>
6469
6470 <method name="getProcessorSpeed">
6471 <desc>Query the (approximate) maximum speed of a specified host CPU in
6472 Megahertz.
6473 </desc>
6474 <param name="cpuId" type="unsigned long" dir="in">
6475 <desc>
6476 Identifier of the CPU.
6477 </desc>
6478 </param>
6479 <param name="speed" type="unsigned long" dir="return">
6480 <desc>
6481 Speed value. 0 is returned if value is not known or @a cpuId is
6482 invalid.
6483 </desc>
6484 </param>
6485 </method>
6486
6487 <method name="getProcessorFeature">
6488 <desc>Query whether a CPU feature is supported or not.</desc>
6489 <param name="feature" type="ProcessorFeature" dir="in">
6490 <desc>
6491 CPU Feature identifier.
6492 </desc>
6493 </param>
6494 <param name="supported" type="boolean" dir="return">
6495 <desc>
6496 Feature is supported or not.
6497 </desc>
6498 </param>
6499 </method>
6500
6501 <method name="getProcessorDescription">
6502 <desc>Query the model string of a specified host CPU.
6503 <note>
6504 This function is not implemented in the current version of the
6505 product.
6506 </note>
6507 </desc>
6508 <param name="cpuId" type="unsigned long" dir="in">
6509 <desc>
6510 Identifier of the CPU.
6511 </desc>
6512 </param>
6513 <param name="description" type="wstring" dir="return">
6514 <desc>
6515 Model string. A NULL string is returned if value is not known or
6516 @a cpuId is invalid.
6517 </desc>
6518 </param>
6519 </method>
6520
6521 <attribute name="memorySize" type="unsigned long" readonly="yes">
6522 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6523 </attribute>
6524
6525 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6526 <desc>Available system memory in the host system.</desc>
6527 </attribute>
6528
6529 <attribute name="operatingSystem" type="wstring" readonly="yes">
6530 <desc>Name of the host system's operating system.</desc>
6531 </attribute>
6532
6533 <attribute name="OSVersion" type="wstring" readonly="yes">
6534 <desc>Host operating system's version string.</desc>
6535 </attribute>
6536
6537 <attribute name="UTCTime" type="long long" readonly="yes">
6538 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6539 </attribute>
6540
6541<if target="midl">
6542 <method name="createHostNetworkInterface">
6543 <desc>
6544 Creates a new adapter for Host Interface Networking.
6545 <result name="E_INVALIDARG">
6546 Host network interface @a name already exists.
6547 </result>
6548 </desc>
6549 <param name="name" type="wstring" dir="in">
6550 <desc>
6551 Adapter name.
6552 </desc>
6553 </param>
6554 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6555 <desc>
6556 Created host interface object.
6557 </desc>
6558 </param>
6559 <param name="progress" type="IProgress" dir="return">
6560 <desc>
6561 Progress object to track the operation completion.
6562 </desc>
6563 </param>
6564 </method>
6565 <method name="removeHostNetworkInterface">
6566 <desc>
6567 Removes the given host network interface.
6568 <result name="VBOX_E_OBJECT_NOT_FOUND">
6569 No host network interface matching @a id found.
6570 </result>
6571 </desc>
6572 <param name="id" type="uuid" dir="in">
6573 <desc>
6574 Adapter GUID.
6575 </desc>
6576 </param>
6577 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6578 <desc>
6579 Removed host interface object.
6580 </desc>
6581 </param>
6582 <param name="progress" type="IProgress" dir="return">
6583 <desc>
6584 Progress object to track the operation completion.
6585 </desc>
6586 </param>
6587 </method>
6588</if>
6589
6590 <method name="createUSBDeviceFilter">
6591 <desc>
6592 Creates a new USB device filter. All attributes except
6593 the filter name are set to <tt>null</tt> (any match),
6594 <i>active</i> is <tt>false</tt> (the filter is not active).
6595
6596 The created filter can be added to the list of filters using
6597 <link to="#insertUSBDeviceFilter()"/>.
6598
6599 <see>#USBDeviceFilters</see>
6600 </desc>
6601 <param name="name" type="wstring" dir="in">
6602 <desc>
6603 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6604 for more info.
6605 </desc>
6606 </param>
6607 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6608 <desc>Created filter object.</desc>
6609 </param>
6610 </method>
6611
6612 <method name="insertUSBDeviceFilter">
6613 <desc>
6614 Inserts the given USB device to the specified position
6615 in the list of filters.
6616
6617 Positions are numbered starting from <tt>0</tt>. If the specified
6618 position is equal to or greater than the number of elements in
6619 the list, the filter is added at the end of the collection.
6620
6621 <note>
6622 Duplicates are not allowed, so an attempt to insert a
6623 filter that is already in the list, will return an
6624 error.
6625 </note>
6626 <note>
6627 This method may set a @ref com_warnings "warning result code".
6628 </note>
6629 <note>
6630 If USB functionality is not available in the given edition of
6631 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6632 </note>
6633
6634 <see>#USBDeviceFilters</see>
6635
6636 <result name="VBOX_E_INVALID_OBJECT_STATE">
6637 USB device filter is not created within this VirtualBox instance.
6638 </result>
6639 <result name="E_INVALIDARG">
6640 USB device filter already in list.
6641 </result>
6642
6643 </desc>
6644 <param name="position" type="unsigned long" dir="in">
6645 <desc>Position to insert the filter to.</desc>
6646 </param>
6647 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6648 <desc>USB device filter to insert.</desc>
6649 </param>
6650 </method>
6651
6652 <method name="removeUSBDeviceFilter">
6653 <desc>
6654 Removes a USB device filter from the specified position in the
6655 list of filters.
6656
6657 Positions are numbered starting from <tt>0</tt>. Specifying a
6658 position equal to or greater than the number of elements in
6659 the list will produce an error.
6660
6661 <note>
6662 This method may set a @ref com_warnings "warning result code".
6663 </note>
6664 <note>
6665 If USB functionality is not available in the given edition of
6666 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6667 </note>
6668
6669 <see>#USBDeviceFilters</see>
6670
6671 <result name="E_INVALIDARG">
6672 USB device filter list empty or invalid @a position.
6673 </result>
6674
6675 </desc>
6676 <param name="position" type="unsigned long" dir="in">
6677 <desc>Position to remove the filter from.</desc>
6678 </param>
6679 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6680 <desc>Removed USB device filter.</desc>
6681 </param>
6682 </method>
6683
6684 <method name="findHostNetworkInterfaceByName">
6685 <desc>
6686 Searches through all host network interfaces for an interface with
6687 the given name.
6688 <note>
6689 The method returns an error if the given name does not
6690 correspond to any host network interface.
6691 </note>
6692 </desc>
6693 <param name="name" type="wstring" dir="in">
6694 <desc>Name of the host network interface to search for.</desc>
6695 </param>
6696 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6697 <desc>Found host network interface object.</desc>
6698 </param>
6699 </method>
6700 <method name="findHostNetworkInterfaceById">
6701 <desc>
6702 Searches through all host network interfaces for an interface with
6703 the given GUID.
6704 <note>
6705 The method returns an error if the given GUID does not
6706 correspond to any host network interface.
6707 </note>
6708 </desc>
6709 <param name="id" type="uuid" dir="in">
6710 <desc>GUID of the host network interface to search for.</desc>
6711 </param>
6712 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6713 <desc>Found host network interface object.</desc>
6714 </param>
6715 </method>
6716 </interface>
6717
6718 <!--
6719 // ISystemProperties
6720 /////////////////////////////////////////////////////////////////////////
6721 -->
6722
6723 <interface
6724 name="ISystemProperties"
6725 extends="$unknown"
6726 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6727 wsmap="managed"
6728 >
6729 <desc>
6730 The ISystemProperties interface represents global properties of the given
6731 VirtualBox installation.
6732
6733 These properties define limits and default values for various attributes
6734 and parameters. Most of the properties are read-only, but some can be
6735 changed by a user.
6736 </desc>
6737
6738 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6739 <desc>Minimum guest system memory in Megabytes.</desc>
6740 </attribute>
6741
6742 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6743 <desc>Maximum guest system memory in Megabytes.</desc>
6744 </attribute>
6745
6746 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6747 <desc>Minimum guest video memory in Megabytes.</desc>
6748 </attribute>
6749
6750 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6751 <desc>Maximum guest video memory in Megabytes.</desc>
6752 </attribute>
6753
6754 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6755 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6756 </attribute>
6757
6758 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6759 <desc>
6760 Number of network adapters associated with every
6761 <link to="IMachine"/> instance.
6762 </desc>
6763 </attribute>
6764
6765 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6766 <desc>
6767 Number of serial ports associated with every
6768 <link to="IMachine"/> instance.
6769 </desc>
6770 </attribute>
6771
6772 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6773 <desc>
6774 Number of parallel ports associated with every
6775 <link to="IMachine"/> instance.
6776 </desc>
6777 </attribute>
6778
6779 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6780 <desc>
6781 Maximum device position in the boot order. This value corresponds
6782 to the total number of devices a machine can boot from, to make it
6783 possible to include all possible devices to the boot list.
6784 <see><link to="IMachine::setBootOrder()"/></see>
6785 </desc>
6786 </attribute>
6787
6788 <attribute name="defaultMachineFolder" type="wstring">
6789 <desc>
6790 Full path to the default directory used to create new or open
6791 existing machines when a settings file name contains no
6792 path.
6793
6794 The initial value of this property is
6795 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6796 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6797
6798 <note>
6799 Setting this property to <tt>null</tt> will restore the
6800 initial value.
6801 </note>
6802 <note>
6803 When settings this property, the specified path can be
6804 absolute (full path) or relative
6805 to the <link to="IVirtualBox::homeFolder">
6806 VirtualBox home directory</link>.
6807 When reading this property, a full path is
6808 always returned.
6809 </note>
6810 <note>
6811 The specified path may not exist, it will be created
6812 when necessary.
6813 </note>
6814
6815 <see>
6816 <link to="IVirtualBox::createMachine()"/>,
6817 <link to="IVirtualBox::openMachine()"/>
6818 </see>
6819 </desc>
6820 </attribute>
6821
6822 <attribute name="defaultHardDiskFolder" type="wstring">
6823 <desc>
6824 Full path to the default directory used to create new or open existing
6825 virtual disks.
6826
6827 This path is used when the storage unit of a hard disk is a regular file
6828 in the host's file system and only a file name that contains no path is
6829 given.
6830
6831 The initial value of this property is
6832 <tt>&lt;</tt>
6833 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6834 <tt>&gt;/HardDisks</tt>.
6835
6836 <note>
6837 Setting this property to <tt>null</tt> will restore the
6838 initial value.
6839 </note>
6840 <note>
6841 When settings this property, the specified path can be relative
6842 to the
6843 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6844 absolute. When reading this property, a full path is
6845 always returned.
6846 </note>
6847 <note>
6848 The specified path may not exist, it will be created
6849 when necessary.
6850 </note>
6851
6852 <see>
6853 IHardDisk2,
6854 <link to="IVirtualBox::createHardDisk2()"/>,
6855 <link to="IVirtualBox::openHardDisk2()"/>,
6856 <link to="IMedium::location"/>
6857 </see>
6858 </desc>
6859 </attribute>
6860
6861 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6862 <desc>
6863 List of all hard disk storage formats supported by this VirtualBox
6864 installation.
6865
6866 Keep in mind that the hard disk format identifier
6867 (<link to="IHardDiskFormat::id"/>) used in other API calls like
6868 <link to="IVirtualBox::createHardDisk2()"/> to refer to a particular
6869 hard disk format is a case-insensitive string. This means that, for
6870 example, all of the following strings:
6871 <pre>
6872 "VDI"
6873 "vdi"
6874 "VdI"</pre>
6875 refer to the same hard disk format.
6876
6877 Note that the virtual hard disk framework is backend-based, therefore
6878 the list of supported formats depends on what backends are currently
6879 installed.
6880
6881 <see>
6882 <link to="IHardDiskFormat"/>,
6883 </see>
6884 </desc>
6885 </attribute>
6886
6887 <attribute name="defaultHardDiskFormat" type="wstring">
6888 <desc>
6889 Identifier of the default hard disk format used by VirtualBox.
6890
6891 The hard disk format set by this attribute is used by VirtualBox
6892 when the hard disk format was not specified explicitly. One example is
6893 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6894 format argument. A more complex example is implicit creation of
6895 differencing hard disks when taking a snapshot of a virtual machine:
6896 this operation will try to use a format of the parent hard disk first
6897 and if this format does not support differencing hard disks the default
6898 format specified by this argument will be used.
6899
6900 The list of supported hard disk formats may be obtained by the
6901 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6902 format must have a capability to create differencing hard disks;
6903 otherwise opeartions that create hard disks implicitly may fail
6904 unexpectedly.
6905
6906 The initial value of this property is <tt>VDI</tt> in the current
6907 version of the VirtualBox product, but may change in the future.
6908
6909 <note>
6910 Setting this property to <tt>null</tt> will restore the
6911 initial value.
6912 </note>
6913
6914 <see>
6915 <link to="#hardDiskFormats"/>,
6916 <link to="IHardDiskFormat::id"/>,
6917 <link to="IVirtualBox::createHardDisk2()"/>
6918 </see>
6919 </desc>
6920 </attribute>
6921
6922 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6923 <desc>
6924 Library that provides authentication for VRDP clients. The library
6925 is used if a virtual machine's authentication type is set to "external"
6926 in the VM RemoteDisplay configuration.
6927
6928 The system library extension (".DLL" or ".so") must be omitted.
6929 A full path can be specified; if not, then the library must reside on the
6930 system's default library path.
6931
6932 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6933 of that name in one of the default VirtualBox library directories.
6934
6935 For details about VirtualBox authentication libraries and how to implement
6936 them, please refer to the VirtualBox manual.
6937
6938 <note>
6939 Setting this property to <tt>null</tt> will restore the
6940 initial value.
6941 </note>
6942 </desc>
6943 </attribute>
6944
6945 <attribute name="webServiceAuthLibrary" type="wstring">
6946 <desc>
6947 Library that provides authentication for webservice clients. The library
6948 is used if a virtual machine's authentication type is set to "external"
6949 in the VM RemoteDisplay configuration and will be called from
6950 within the <link to="IWebsessionManager::logon" /> implementation.
6951
6952 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6953 there is no per-VM setting for this, as the webservice is a global
6954 resource (if it is running). Only for this setting (for the webservice),
6955 setting this value to a literal "null" string disables authentication,
6956 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
6957 no matter what user name and password are supplied.
6958
6959 The initial value of this property is <tt>VRDPAuth</tt>,
6960 meaning that the webservice will use the same authentication
6961 library that is used by default for VBoxVRDP (again, see
6962 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
6963 The format and calling convention of authentication libraries
6964 is the same for the webservice as it is for VBoxVRDP.
6965
6966 </desc>
6967 </attribute>
6968
6969 <attribute name="HWVirtExEnabled" type="boolean">
6970 <desc>
6971 This specifies the default value for hardware virtualization
6972 extensions. If enabled, virtual machines will make use of
6973 hardware virtualization extensions such as Intel VT-x and
6974 AMD-V by default. This value can be overridden by each VM
6975 using their <link to="IMachine::HWVirtExEnabled" /> property.
6976 </desc>
6977 </attribute>
6978
6979 <attribute name="LogHistoryCount" type="unsigned long">
6980 <desc>
6981 This value specifies how many old release log files are kept.
6982 </desc>
6983 </attribute>
6984 </interface>
6985
6986 <!--
6987 // IGuest
6988 /////////////////////////////////////////////////////////////////////////
6989 -->
6990
6991 <interface
6992 name="IGuestOSType" extends="$unknown"
6993 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
6994 wsmap="struct"
6995 >
6996 <desc>
6997 </desc>
6998
6999 <attribute name="familyId" type="wstring" readonly="yes">
7000 <desc>Guest OS family identifier string.</desc>
7001 </attribute>
7002
7003 <attribute name="familyDescription" type="wstring" readonly="yes">
7004 <desc>Human readable description of the guest OS family.</desc>
7005 </attribute>
7006
7007 <attribute name="id" type="wstring" readonly="yes">
7008 <desc>Guest OS identifier string.</desc>
7009 </attribute>
7010
7011 <attribute name="description" type="wstring" readonly="yes">
7012 <desc>Human readable description of the guest OS.</desc>
7013 </attribute>
7014
7015 <attribute name="is64Bit" type="boolean" readonly="yes">
7016 <desc>Returns @c true if the given OS is 64-bit</desc>
7017 </attribute>
7018
7019 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7020 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7021 </attribute>
7022
7023 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7024 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7025 </attribute>
7026
7027 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7028 <desc>Recommended RAM size in Megabytes.</desc>
7029 </attribute>
7030
7031 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7032 <desc>Recommended video RAM size in Megabytes.</desc>
7033 </attribute>
7034
7035 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7036 <desc>Recommended hard disk size in Megabytes.</desc>
7037 </attribute>
7038
7039 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7040 <desc>Returns recommended network adapter for this OS type.</desc>
7041 </attribute>
7042 </interface>
7043
7044
7045 <enumerator
7046 name="IGuestOSTypeEnumerator" type="IGuestOSType"
7047 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
7048 />
7049
7050 <collection
7051 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
7052 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
7053 readonly="yes"
7054 />
7055
7056 <interface
7057 name="IGuest" extends="$unknown"
7058 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7059
7060 wsmap="suppress"
7061 >
7062 <desc>
7063 The IGuest interface represents information about the operating system
7064 running inside the virtual machine. Used in
7065 <link to="IConsole::guest"/>.
7066
7067 IGuest provides information about the guest operating system, whether
7068 Guest Additions are installed and other OS-specific virtual machine
7069 properties.
7070 </desc>
7071
7072 <attribute name="OSTypeId" type="wstring" readonly="yes">
7073 <desc>
7074 Identifier of the Guest OS type as reported by the Guest
7075 Additions.
7076 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7077 an IGuestOSType object representing details about the given
7078 Guest OS type.
7079 <note>
7080 If Guest Additions are not installed, this value will be
7081 the same as <link to="IMachine::OSTypeId"/>.
7082 </note>
7083 </desc>
7084 </attribute>
7085
7086 <attribute name="additionsActive" type="boolean" readonly="yes">
7087 <desc>
7088 Flag whether the Guest Additions are installed and active
7089 in which case their version will be returned by the
7090 <link to="#additionsVersion"/> property.
7091 </desc>
7092 </attribute>
7093
7094 <attribute name="additionsVersion" type="wstring" readonly="yes">
7095 <desc>
7096 Version of the Guest Additions (3 decimal numbers separated
7097 by dots) or empty when the Additions are not installed. The
7098 Additions may also report a version but yet not be active as
7099 the version might be refused by VirtualBox (incompatible) or
7100 other failures occurred.
7101 </desc>
7102 </attribute>
7103
7104 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7105 <desc>
7106 Flag whether seamless guest display rendering (seamless desktop
7107 integration) is supported.
7108 </desc>
7109 </attribute>
7110
7111 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7112 <desc>
7113 Flag whether the guest is in graphics mode. If it is not, then
7114 seamless rendering will not work, resize hints are not immediately
7115 acted on and guest display resizes are probably not initiated by
7116 the guest additions.
7117 </desc>
7118 </attribute>
7119
7120 <attribute name="memoryBalloonSize" type="unsigned long">
7121 <desc>Guest system memory balloon size in megabytes.</desc>
7122 </attribute>
7123
7124 <attribute name="statisticsUpdateInterval" type="unsigned long">
7125 <desc>Interval to update guest statistics in seconds.</desc>
7126 </attribute>
7127
7128 <method name="setCredentials">
7129 <desc>
7130 Store login credentials that can be queried by guest operating
7131 systems with Additions installed. The credentials are transient
7132 to the session and the guest may also choose to erase them. Note
7133 that the caller cannot determine whether the guest operating system
7134 has queried or made use of the credentials.
7135
7136 <result name="VBOX_E_VM_ERROR">
7137 VMM device is not available.
7138 </result>
7139
7140 </desc>
7141 <param name="userName" type="wstring" dir="in">
7142 <desc>User name string, can be empty</desc>
7143 </param>
7144 <param name="password" type="wstring" dir="in">
7145 <desc>Password string, can be empty</desc>
7146 </param>
7147 <param name="domain" type="wstring" dir="in">
7148 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7149 </param>
7150 <param name="allowInteractiveLogon" type="boolean" dir="in">
7151 <desc>
7152 Flag whether the guest should alternatively allow the user to
7153 interactively specify different credentials. This flag might
7154 not be supported by all versions of the Additions.
7155 </desc>
7156 </param>
7157 </method>
7158
7159 <method name="getStatistic">
7160 <desc>
7161 Query specified guest statistics as reported by the VirtualBox Additions.
7162 </desc>
7163 <param name="cpuId" type="unsigned long" dir="in">
7164 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7165 </param>
7166 <param name="statistic" type="GuestStatisticType" dir="in">
7167 <desc>Statistic type.</desc>
7168 </param>
7169 <param name="statVal" type="unsigned long" dir="out">
7170 <desc>Statistics value</desc>
7171 </param>
7172 </method>
7173
7174 </interface>
7175
7176
7177 <!--
7178 // IProgress
7179 /////////////////////////////////////////////////////////////////////////
7180 -->
7181
7182 <enumerator
7183 name="IProgressEnumerator" type="IProgress"
7184 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
7185 />
7186
7187 <collection
7188 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
7189 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
7190 readonly="yes"
7191 />
7192
7193 <interface
7194 name="IProgress" extends="$unknown"
7195 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
7196 wsmap="managed"
7197 >
7198 <desc>
7199 The IProgress interface represents a task progress object that allows
7200 to wait for the completion of some asynchronous task.
7201
7202 The task consists of one or more operations that run sequentially,
7203 one after one. There is an individual percent of completion of the
7204 current operation and the percent of completion of the task as a
7205 whole. Similarly, you can wait for the completion of a particular
7206 operation or for the completion of the whole task.
7207
7208 Every operation is identified by a number (starting from 0)
7209 and has a separate description.
7210 </desc>
7211
7212 <attribute name="id" type="uuid" readonly="yes">
7213 <desc>ID of the task.</desc>
7214 </attribute>
7215
7216 <attribute name="description" type="wstring" readonly="yes">
7217 <desc>Description of the task.</desc>
7218 </attribute>
7219
7220 <attribute name="initiator" type="$unknown" readonly="yes">
7221 <desc>Initiator of the task.</desc>
7222 </attribute>
7223
7224 <attribute name="cancelable" type="boolean" readonly="yes">
7225 <desc>Whether the task can be interrupted.</desc>
7226 </attribute>
7227
7228 <attribute name="percent" type="long" readonly="yes">
7229 <desc>
7230 Current task progress value in percent.
7231 This value depends on how many operations are already complete.
7232 </desc>
7233 </attribute>
7234
7235 <attribute name="completed" type="boolean" readonly="yes">
7236 <desc>Whether the task has been completed.</desc>
7237 </attribute>
7238
7239 <attribute name="canceled" type="boolean" readonly="yes">
7240 <desc>Whether the task has been canceled.</desc>
7241 </attribute>
7242
7243 <attribute name="resultCode" type="result" readonly="yes">
7244 <desc>
7245 Result code of the progress task.
7246 Valid only if <link to="#completed"/> is true.
7247 </desc>
7248 </attribute>
7249
7250 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7251 <desc>
7252 Extended information about the unsuccessful result of the
7253 progress operation. May be NULL when no extended information
7254 is available.
7255 Valid only if <link to="#completed"/> is true and
7256 <link to="#resultCode"/> indicates a failure.
7257 </desc>
7258 </attribute>
7259
7260 <attribute name="operationCount" type="unsigned long" readonly="yes">
7261 <desc>
7262 Number of operations this task is divided into.
7263 Every task consists of at least one operation.
7264 </desc>
7265 </attribute>
7266
7267 <attribute name="operation" type="unsigned long" readonly="yes">
7268 <desc>Number of the operation being currently executed.</desc>
7269 </attribute>
7270
7271 <attribute name="operationDescription" type="wstring" readonly="yes">
7272 <desc>
7273 Description of the operation being currently executed.
7274 </desc>
7275 </attribute>
7276
7277 <attribute name="operationPercent" type="long" readonly="yes">
7278 <desc>Current operation progress value in percent.</desc>
7279 </attribute>
7280
7281 <method name="waitForCompletion">
7282 <desc>
7283 Waits until the task is done (including all operations) with a
7284 given timeout.
7285
7286 <result name="VBOX_E_IPRT_ERROR">
7287 Failed to wait for task completion.
7288 </result>
7289
7290 </desc>
7291 <param name="timeout" type="long" dir="in">
7292 <desc>
7293 Timeout value in milliseconds.
7294 Specify -1 for an indefinite wait.
7295 </desc>
7296 </param>
7297 </method>
7298
7299 <method name="waitForOperationCompletion">
7300 <desc>
7301 Waits until the given operation is done with a given timeout.
7302
7303 <result name="VBOX_E_IPRT_ERROR">
7304 Failed to wait for operation completion.
7305 </result>
7306
7307 </desc>
7308 <param name="operation" type="unsigned long" dir="in">
7309 <desc>
7310 Number of the operation to wait for.
7311 Must be less than <link to="#operationCount"/>.
7312 </desc>
7313 </param>
7314 <param name="timeout" type="long" dir="in">
7315 <desc>
7316 Timeout value in milliseconds.
7317 Specify -1 for an indefinite wait.
7318 </desc>
7319 </param>
7320 </method>
7321
7322 <method name="cancel">
7323 <desc>
7324 Cancels the task.
7325 <note>
7326 If <link to="#cancelable"/> is <tt>false</tt>, then
7327 this method will fail.
7328 </note>
7329
7330 <result name="VBOX_E_INVALID_OBJECT_STATE">
7331 Operation cannot be canceled.
7332 </result>
7333
7334 </desc>
7335 </method>
7336
7337 </interface>
7338
7339
7340 <!--
7341 // ISnapshot
7342 /////////////////////////////////////////////////////////////////////////
7343 -->
7344
7345 <enumerator
7346 name="ISnapshotEnumerator" type="ISnapshot"
7347 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
7348 />
7349
7350 <collection
7351 name="ISnapshotCollection" type="ISnapshot"
7352 enumerator="ISnapshotEnumerator"
7353 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
7354 readonly="yes"
7355 />
7356
7357 <interface
7358 name="ISnapshot" extends="$unknown"
7359 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
7360 wsmap="managed"
7361 >
7362 <desc>
7363 The ISnapshot interface represents a snapshot of the virtual
7364 machine.
7365
7366 The <i>snapshot</i> stores all the information about a virtual
7367 machine necessary to bring it to exactly the same state as it was at
7368 the time of taking the snapshot. The snapshot includes:
7369
7370 <ul>
7371 <li>all settings of the virtual machine (i.e. its hardware
7372 configuration: RAM size, attached hard disks, etc.)
7373 </li>
7374 <li>the execution state of the virtual machine (memory contents,
7375 CPU state, etc.).
7376 </li>
7377 </ul>
7378
7379 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7380 or <i>online</i> (taken when the VM is running). The execution
7381 state of the offline snapshot is called a <i>zero execution state</i>
7382 (it doesn't actually contain any information about memory contents
7383 or the CPU state, assuming that all hardware is just powered off).
7384
7385 <h3>Snapshot branches</h3>
7386
7387 Snapshots can be chained. Chained snapshots form a branch where
7388 every next snapshot is based on the previous one. This chaining is
7389 mostly related to hard disk branching (see <link to="IHardDisk2"/>
7390 description). This means that every time a new snapshot is created,
7391 a new differencing hard disk is implicitly created for all normal
7392 hard disks attached to the given virtual machine. This allows to
7393 fully restore hard disk contents when the machine is later reverted
7394 to a particular snapshot.
7395
7396 In the current implementation, multiple snapshot branches within one
7397 virtual machine are not allowed. Every machine has a single branch,
7398 and <link to="IConsole::takeSnapshot()"/> operation adds a new
7399 snapshot to the top of that branch.
7400
7401 Existing snapshots can be discarded using
7402 <link to="IConsole::discardSnapshot()"/>.
7403
7404 <h3>Current snapshot</h3>
7405
7406 Every virtual machine has a current snapshot, identified by
7407 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7408 a base for the <i>current machine state</i> (see below), to the effect
7409 that all normal hard disks of the machine and its execution
7410 state are based on this snapshot.
7411
7412 In the current implementation, the current snapshot is always the
7413 last taken snapshot (i.e. the head snapshot on the branch) and it
7414 cannot be changed.
7415
7416 The current snapshot is <tt>null</tt> if the machine doesn't have
7417 snapshots at all; in this case the current machine state is just
7418 current settings of this machine plus its current execution state.
7419
7420 <h3>Current machine state</h3>
7421
7422 The current machine state is what represented by IMachine instances got
7423 directly from IVirtualBox
7424 using <link
7425 to="IVirtualBox::getMachine()">getMachine()</link>, <link
7426 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
7427 to instances returned by <link to="ISnapshot::machine"/>). This state
7428 is always used when the machine is <link to="IConsole::powerUp"> powered
7429 on</link>.
7430
7431 The current machine state also includes the current execution state.
7432 If the machine is being currently executed
7433 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7434 and above), its execution state is just what's happening now.
7435 If it is powered off (<link to="MachineState_PoweredOff"/> or
7436 <link to="MachineState_Aborted"/>), it has a zero execution state.
7437 If the machine is saved (<link to="MachineState_Saved"/>), its
7438 execution state is what saved in the execution state file
7439 (<link to="IMachine::stateFilePath"/>).
7440
7441 If the machine is in the saved state, then, next time it is powered
7442 on, its execution state will be fully restored from the saved state
7443 file and the execution will continue from the point where the state
7444 was saved.
7445
7446 Similarly to snapshots, the current machine state can be discarded
7447 using <link to="IConsole::discardCurrentState()"/>.
7448
7449 <h3>Taking and discarding snapshots</h3>
7450
7451 The table below briefly explains the meaning of every snapshot
7452 operation:
7453
7454 <table>
7455 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7456
7457 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7458
7459 <td>Save the current state of the virtual machine, including all
7460 settings, contents of normal hard disks and the current modifications
7461 to immutable hard disks (for online snapshots)</td>
7462
7463 <td>The current state is not changed (the machine will continue
7464 execution if it is being executed when the snapshot is
7465 taken)</td></tr>
7466
7467 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7468
7469 <td>Forget the state of the virtual machine stored in the snapshot:
7470 dismiss all saved settings and delete the saved execution state (for
7471 online snapshots)</td>
7472
7473 <td>Other snapshots (including child snapshots, if any) and the
7474 current state are not directly affected</td></tr>
7475
7476 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7477
7478 <td>Restore the current state of the virtual machine from the state
7479 stored in the current snapshot, including all settings and hard disk
7480 contents</td>
7481
7482 <td>The current state of the machine existed prior to this operation
7483 is lost</td></tr>
7484
7485 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7486
7487 <td>Completely revert the virtual machine to the state it was in
7488 before the current snapshot has been taken</td>
7489
7490 <td>The current state, as well as the current snapshot, are
7491 lost</td></tr>
7492
7493 </table>
7494
7495 </desc>
7496
7497 <attribute name="id" type="uuid" readonly="yes">
7498 <desc>UUID of the snapshot.</desc>
7499 </attribute>
7500
7501 <attribute name="name" type="wstring">
7502 <desc>Short name of the snapshot.</desc>
7503 </attribute>
7504
7505 <attribute name="description" type="wstring">
7506 <desc>Optional description of the snapshot.</desc>
7507 </attribute>
7508
7509 <attribute name="timeStamp" type="long long" readonly="yes">
7510 <desc>
7511 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7512 </desc>
7513 </attribute>
7514
7515 <attribute name="online" type="boolean" readonly="yes">
7516 <desc>
7517 <tt>true</tt> if this snapshot is an online snapshot and
7518 <tt>false</tt> otherwise.
7519
7520 <note>
7521 When this attribute is <tt>true</tt>, the
7522 <link to="IMachine::stateFilePath"/> attribute of the
7523 <link to="#machine"/> object associated with this snapshot
7524 will point to the saved state file. Otherwise, it will be
7525 <tt>null</tt>.
7526 </note>
7527 </desc>
7528 </attribute>
7529
7530 <attribute name="machine" type="IMachine" readonly="yes">
7531 <desc>
7532 Virtual machine this snapshot is taken on. This object
7533 stores all settings the machine had when taking this snapshot.
7534 <note>
7535 The returned machine object is immutable, i.e. no
7536 any settings can be changed.
7537 </note>
7538 </desc>
7539 </attribute>
7540
7541 <attribute name="parent" type="ISnapshot" readonly="yes">
7542 <desc>
7543 Parent snapshot (a snapshot this one is based on).
7544 <note>
7545 It's not an error to read this attribute on a snapshot
7546 that doesn't have a parent -- a null object will be
7547 returned to indicate this.
7548 </note>
7549 </desc>
7550 </attribute>
7551
7552 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7553 <desc>
7554 Child snapshots (all snapshots having this one as a parent).
7555 <note>
7556 In the current implementation, there can be only one
7557 child snapshot, or no children at all, meaning this is the
7558 last (head) snapshot.
7559 </note>
7560 </desc>
7561 </attribute>
7562
7563 </interface>
7564
7565
7566 <!--
7567 // IMedia
7568 /////////////////////////////////////////////////////////////////////////
7569 -->
7570
7571 <enum
7572 name="MediaState"
7573 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7574 >
7575 <desc>
7576 Virtual media state.
7577 <see>IMedia</see>
7578 </desc>
7579
7580 <const name="NotCreated" value="0">
7581 <desc>
7582 Associated media storage does not exist (either was not created yet or
7583 was deleted).
7584 </desc>
7585 </const>
7586 <const name="Created" value="1">
7587 <desc>
7588 Associated storage exists and accessible.
7589 </desc>
7590 </const>
7591 <const name="LockedRead" value="2">
7592 <desc>
7593 Media is locked for reading, no data modification is possible.
7594 </desc>
7595 </const>
7596 <const name="LockedWrite" value="3">
7597 <desc>
7598 Media is locked for writing, no concurrent data reading or modification
7599 is possible.
7600 </desc>
7601 </const>
7602 <const name="Inaccessible" value="4">
7603 <desc>
7604 Associated media storage is not accessible.
7605 </desc>
7606 </const>
7607 <const name="Creating" value="5">
7608 <desc>
7609 Associated media storage is being created.
7610 </desc>
7611 </const>
7612 <const name="Deleting" value="6">
7613 <desc>
7614 Associated media storage is being deleted.
7615 </desc>
7616 </const>
7617 </enum>
7618
7619 <interface
7620 name="IMedium" extends="$unknown"
7621 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7622 wsmap="managed"
7623 >
7624 <desc>
7625 The IMedium interface is a common interface for all objects representing
7626 virtual media such as hard disks, DVD images.
7627
7628 Each medium is associated with a storage unit (such as a file on the host
7629 computer or a network resource) that holds actual data. The location of
7630 the storage unit is represented by the #location attribute. The value of
7631 this attribute is media type dependent.
7632
7633 The exact media type may be determined by querying the appropriate
7634 interface such as:
7635 <ul>
7636 <li>IHardDisk2 (virtual hard disks)</li>
7637 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7638 <li>IFloppyImage2 (raw floppy image files)</li>
7639 </ul>
7640
7641 Existing media are opened using the following methods, depending on the
7642 media type:
7643 <ul>
7644 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7645 <li><link to="IVirtualBox::openDVDImage()"/></li>
7646 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7647 </ul>
7648
7649 New hard disk media are created using the
7650 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7651 images are created outside VirtualBox, usually by storing a copy
7652 of the real medium of the corresponding type in a regular file.
7653
7654 <h3>Known Media</h3>
7655
7656 When an existing medium gets opened for the first time, it gets
7657 automatically remembered by the given VirtualBox installation or, in other
7658 words, becomes a <i>known medium</i>. Known media are stored in the media
7659 registry transparently maintained by VirtualBox and stored in settings
7660 files so that this registry is preserved when VirtualBox is not running.
7661
7662 Newly created virtual hard disks get remembered only when the associated
7663 storage unit is actually created (see IHardDisk2 for more details).
7664
7665 All known media can be enumerated using
7666 <link to="IVirtualBox::hardDisks2"/>,
7667 <link to="IVirtualBox::DVDImages"/> and
7668 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7669 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7670 and similar methods or by location using
7671 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7672
7673 Only known media can be attached to virtual machines.
7674
7675 Removing known media from the media registry is performed when the given
7676 medium is closed using the <link to="#close()"/> method or when its
7677 associated storage unit is deleted (only for hard disks).
7678
7679 <h3>Accessibility Checks</h3>
7680
7681 The given medium (with the created storage unit) is considered to be
7682 <i>accessible</i> when its storage unit can be successfully read from.
7683 Accessible media are indicated by the <link to="MediaState_Created"/>
7684 value of the <link to="#state"/> attribute. When the storage unit cannot
7685 be read (for example, because it is located on a disconnected network
7686 resource, or was accidentally deleted outside VirtualBox), the medium is
7687 considered to be <i>inaccessible</i> which is indicated by the
7688 <link to="MediaState_Inaccessible"/> state. The details about the reason
7689 of being inaccessible can be obtained using the
7690 <link to="#lastAccessError"/> attribute.
7691
7692 A new accessibility check is performed each time the <link to="#state"/>
7693 attribute is read. Please note that this check may take long time (several
7694 seconds or even minutes, depending on the storage unit location and
7695 format), and will block the calling thread until finished. For this
7696 reason, it is recommended to never read this attribute on the main UI
7697 thread to avoid making the UI unresponsive.
7698
7699 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7700 created for the first time), all known media are in the
7701 <link to="MediaState_Inaccessible"/> state but the value of the <link
7702 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7703 accessibility check is made on startup. This is done to make the
7704 VirtualBox object ready for serving requests as
7705 fast as possible and let the end-user application decide if it needs to
7706 check media accessibility right away or not.
7707 </desc>
7708
7709 <attribute name="id" type="uuid" readonly="yes">
7710 <desc>
7711 UUID of the medium. For a newly created medium, this value is a randomly
7712 generated UUID.
7713
7714 <note>
7715 For media in one of MediaState_NotCreated, MediaState_Creating or
7716 MediaState_Deleting states, the value of this property is undefined
7717 and will most likely be an empty UUID.
7718 </note>
7719 </desc>
7720 </attribute>
7721
7722 <attribute name="description" type="wstring">
7723 <desc>
7724 Optional description of the medium. For newly created media, the value
7725 of this attribute value is <tt>null</tt>.
7726
7727 Media types that don't support this attribute will return E_NOTIMPL in
7728 attempt to get or set this attribute's value.
7729
7730 <note>
7731 For some storage types, reading this attribute may return an outdated
7732 (last known) value when <link to="#state"/> is <link
7733 to="MediaState_Inaccessible"/> or <link
7734 to="MediaState_LockedWrite"/> because the value of this attribute is
7735 stored within the storage unit itself. Also note that changing the
7736 attribute value is not possible in such case, as well as when the
7737 medium is the <link to="MediaState_LockedRead"/> state.
7738 </note>
7739 </desc>
7740 </attribute>
7741
7742 <attribute name="state" type="MediaState" readonly="yes">
7743 <desc>
7744 Current media state. Inspect <link to="MediaState"/> values for details.
7745
7746 Reading this attribute may take long time because a new accessibility
7747 check of the storage unit is performed every time the attribute is read.
7748 This check may cause a significant delay if the storage unit of the
7749 given medium is, for example, a file located on a network share which is
7750 not currently accessible due to connectivity problems -- the call will
7751 not return until a timeout interval defined by the host OS for this
7752 operation expires.
7753
7754 If the last known state of the medium is <link to="MediaState_Created"/>
7755 and the accessibility check fails then the state would be set to
7756 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7757 may be used to get more details about the failure. If the state of the
7758 medium is <link to="MediaState_LockedRead"/> or
7759 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7760 non-null value of <link to="#lastAccessError"/> will indicate a failed
7761 accessibility check in this case.
7762
7763 Note that not all media states are applicable to certain media types.
7764 For example, states <link to="MediaState_NotCreated"/>,
7765 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7766 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7767 IFloppyImage2 media.
7768 </desc>
7769 </attribute>
7770
7771 <attribute name="location" type="wstring">
7772 <desc>
7773 Location of the storage unit holding media data.
7774
7775 The format of the location string is media type specific. For media
7776 types that use regular files in a host's file system, the location
7777 string is just a full file name.
7778
7779 Some media types may support changing the storage unit location by
7780 simply changing the value of this property. If this operation is not
7781 supported, the implementation will return E_NOTIMPL in attempt to set
7782 this attribute's value.
7783
7784 When setting a value of the location attribute which is a regular file
7785 in the host's file system, the given file name may be either relative to
7786 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7787 absolute. Note that if the given location specification does not contain
7788 the file extension part then a proper default extension will be
7789 automatically appended by the implementation depending on the media type.
7790 </desc>
7791 </attribute>
7792
7793 <attribute name="name" type="wstring" readonly="yes">
7794 <desc>
7795 Name of the storage unit holding media data.
7796
7797 The returned string is a short version of the <link to="#location"/>
7798 attribute that is suitable for representing the medium in situations
7799 where the full location specification is too long (such as lists
7800 and comboboxes in GUI frontends). This string is also used by frontends
7801 to sort the media list alphabetically when needed.
7802
7803 For example, for locations that are regular files in the host's file
7804 system, the value of this attribute is just a file name (+ extension),
7805 without the path specification.
7806
7807 Note that as opposed to the <link to="#location"/> attribute, the name
7808 attribute will not necessary be unique for a list of media of the
7809 given type and format.
7810 </desc>
7811 </attribute>
7812
7813 <attribute name="size" type="unsigned long long" readonly="yes">
7814 <desc>
7815 Physical size of the storage unit used to hold media data (in bytes).
7816
7817 <note>
7818 For media whose <link to="#state"/> is <link
7819 to="MediaState_Inaccessible"/>, the value of this property is the
7820 last known size. For <link to="MediaState_NotCreated"/> media,
7821 the returned value is zero.
7822 </note>
7823 </desc>
7824 </attribute>
7825
7826 <attribute name="lastAccessError" type="wstring" readonly="yes">
7827 <desc>
7828 Text message that represents the result of the last accessibility
7829 check.
7830
7831 Accessibility checks are performed each time the <link to="#state"/>
7832 attribute is read. A @c null string is returned if the last
7833 accessibility check was successful. A non-null string indicates a
7834 failure and should normally describe a reason of the failure (for
7835 example, a file read error).
7836 </desc>
7837 </attribute>
7838
7839 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7840 <desc>
7841 Array of UUIDs of all machines this medium is attached to.
7842
7843 A <tt>null</tt> array is returned if this medium is not attached to any
7844 machine or to any machine's snapshot.
7845
7846 <note>
7847 The returned array will include a machine even if this medium is not
7848 attached to that machine in the current state but attached to it in
7849 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7850 details.
7851 </note>
7852 </desc>
7853 </attribute>
7854
7855 <method name="getSnapshotIds">
7856 <desc>
7857 Returns an array of UUIDs of all snapshots of the given machine where
7858 this medium is attached to it.
7859
7860 If the medium is attached to the machine in the current state, then the
7861 first element in the array will always be the ID of the queried machine
7862 (i.e. the value equal to the @c machineId argument), followed by
7863 snapshot IDs (if any).
7864
7865 If the medium is not attached to the machine in the current state, then
7866 the array will contain only snapshot IDs.
7867
7868 The returned array may be <tt>null</tt> if this medium is not attached
7869 to the given machine at all, neither in the current state nor in one of
7870 snapshots.
7871 </desc>
7872 <param name="machineId" type="uuid" dir="in">
7873 <desc>
7874 UUID of the machine to query.
7875 </desc>
7876 </param>
7877 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7878 <desc>
7879 Array of snapshot UUIDs of the given machine using this medium.
7880 </desc>
7881 </param>
7882 </method>
7883
7884 <method name="lockRead">
7885 <desc>
7886 Locks this medium for reading.
7887
7888 The read lock is shared: many clients can simultaneously lock the
7889 same media for reading unless it is already locked for writing (see
7890 <link to="#lockWrite()"/>) in which case an error is returned.
7891
7892 When the medium is locked for reading, it cannot be modified
7893 from within VirtualBox. This means that any method that changes
7894 the properties of this medium or contents of the storage unit
7895 will return an error (unless explicitly stated otherwise) and
7896 that an attempt to start a virtual machine that wants to modify
7897 the medium will also fail.
7898
7899 When the virtual machine is started up, it locks for reading all
7900 media it uses in read-only mode. If some media cannot be locked
7901 for reading, the startup procedure will fail.
7902
7903 The medium locked for reading must be unlocked using the <link
7904 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7905 can be nested and must be followed by the same number of paired
7906 <link to="#unlockRead()"/> calls.
7907
7908 This method sets the media state to <link
7909 to="MediaState_LockedRead"/> on success. The state prior to
7910 this call must be <link to="MediaState_Created"/>, <link
7911 to="MediaState_Inaccessible"/> or <link
7912 to="MediaState_LockedRead"/>. As you can see, inaccessible
7913 media can be locked too. This is not an error; this method
7914 performs a logical lock that prevents modifications of this
7915 media through the VirtualBox API, not a physical lock of the
7916 underlying storage unit.
7917
7918 This method returns the current state of the medium
7919 <b>before</b> the operation.
7920
7921 <result name="VBOX_E_INVALID_OBJECT_STATE">
7922 Invalid media state (e.g. not created, locked, inaccessible,
7923 creating, deleting).
7924 </result>
7925
7926 </desc>
7927 <param name="state" type="MediaState" dir="return">
7928 <desc>
7929 State of the medium after the operation.
7930 </desc>
7931 </param>
7932 </method>
7933
7934 <method name="unlockRead">
7935 <desc>
7936 Cancels the read lock previously set by <link to="#lockRead()"/>.
7937
7938 Either on success or on failure, this method returns the current state
7939 of the medium <b>after</b> the operation.
7940
7941 See <link to="#lockRead()"/> for more details.
7942
7943 <result name="VBOX_E_INVALID_OBJECT_STATE">
7944 Medium not locked for reading.
7945 </result>
7946
7947 </desc>
7948 <param name="state" type="MediaState" dir="return">
7949 <desc>
7950 State of the medium after the operation.
7951 </desc>
7952 </param>
7953 </method>
7954
7955 <method name="lockWrite">
7956 <desc>
7957 Locks this medium for writing.
7958
7959 The write lock, as opposed to <link to="#lockRead()"/>, is
7960 exclusive: there may be only one client that holds a write lock
7961 and there may be no read locks while the write lock is held.
7962
7963 When the medium is locked for writing, it cannot be modified
7964 from within VirtualBox and it is not guaranteed that the values
7965 of its properties are up-to-date. Any method that changes the
7966 properties of this medium or contents of the storage unit will
7967 return an error ((unless explicitly stated otherwise) and an
7968 attempt to start a virtual machine that wants to modify or to
7969 read the medium will also fail.
7970
7971 When the virtual machine is started up, it locks for writing all
7972 media it uses to write data to. If some media cannot be locked
7973 for writing, the startup procedure will fail.
7974
7975 The medium locked for writing must be unlocked using the <link
7976 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
7977 can <b>not</b> be nested and must be followed by a paired <link
7978 to="#unlockWrite()"/> call.
7979
7980 This method sets the media state to <link
7981 to="MediaState_LockedWrite"/> on success. The state prior to
7982 this call must be <link to="MediaState_Created"/> or <link
7983 to="MediaState_Inaccessible"/>. As you can see, inaccessible
7984 media can be locked too. This is not an error; this method
7985 performs a logical lock that prevents modifications of this
7986 media through the VirtualBox API, not a physical lock of the
7987 underlying storage unit.
7988
7989 Either on success or on failure, this method returns the current
7990 state of the medium <b>before</b> the operation.
7991
7992 <result name="VBOX_E_INVALID_OBJECT_STATE">
7993 Invalid media state (e.g. not created, locked, inaccessible,
7994 creating, deleting).
7995 </result>
7996
7997 </desc>
7998 <param name="state" type="MediaState" dir="return">
7999 <desc>
8000 State of the medium after the operation.
8001 </desc>
8002 </param>
8003 </method>
8004
8005 <method name="unlockWrite">
8006 <desc>
8007 Cancels the write lock previously set by <link to="#lockWrite()"/>.
8008
8009 Either on success or on failure, this method returns the current
8010 state of the medium <b>after</b> the operation.
8011
8012 See <link to="#lockWrite()"/> for more details.
8013
8014 <result name="VBOX_E_INVALID_OBJECT_STATE">
8015 Medium not locked for writing.
8016 </result>
8017
8018 </desc>
8019 <param name="state" type="MediaState" dir="return">
8020 <desc>
8021 State of the medium after the operation.
8022 </desc>
8023 </param>
8024 </method>
8025
8026 <method name="close">
8027 <desc>
8028 Closes this medium.
8029
8030 The hard disk must not be attached to any known virtual machine
8031 and must not have any known child hard disks, otherwise the
8032 operation will fail.
8033
8034 When the hard disk is successfully closed, it gets removed from
8035 the list of remembered hard disks, but its storage unit is not
8036 deleted. In particular, this means that this hard disk can be
8037 later opened again using the <link
8038 to="IVirtualBox::openHardDisk2"/> call.
8039
8040 Note that after this method successfully returns, the given hard
8041 disk object becomes uninitialized. This means that any attempt
8042 to call any of its methods or attributes will fail with the
8043 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8044
8045 <result name="VBOX_E_INVALID_OBJECT_STATE">
8046 Invalid media state (other than not created, created or
8047 inaccessible).
8048 </result>
8049 <result name="VBOX_E_OBJECT_IN_USE">
8050 Medium attached to virtual machine.
8051 </result>
8052 <result name="VBOX_E_FILE_ERROR">
8053 Settings file not accessible.
8054 </result>
8055 <result name="VBOX_E_XML_ERROR">
8056 Could not parse the settings file.
8057 </result>
8058
8059 </desc>
8060 </method>
8061
8062 </interface>
8063
8064
8065 <!--
8066 // IHardDisk2
8067 /////////////////////////////////////////////////////////////////////////
8068 -->
8069
8070 <enum
8071 name="HardDiskType"
8072 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8073 >
8074 <desc>
8075 Virtual hard disk type.
8076 <see>IHardDisk</see>
8077 </desc>
8078
8079 <const name="Normal" value="0">
8080 <desc>
8081 Normal hard disk (attached directly or indirectly, preserved
8082 when taking snapshots).
8083 </desc>
8084 </const>
8085 <const name="Immutable" value="1">
8086 <desc>
8087 Immutable hard disk (attached indirectly, changes are wiped out
8088 after powering off the virtual machine).
8089 </desc>
8090 </const>
8091 <const name="Writethrough" value="2">
8092 <desc>
8093 Write through hard disk (attached directly, ignored when
8094 taking snapshots).
8095 </desc>
8096 </const>
8097 </enum>
8098
8099 <interface
8100 name="IHardDisk2Attachment" extends="$unknown"
8101 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
8102 wsmap="struct"
8103 >
8104 <desc>
8105 The IHardDisk2Attachment interface represents a hard disk attachment of a
8106 virtual machine.
8107
8108 Every hard disk attachment specifies a slot of the virtual hard disk
8109 controller and a virtual hard disk attached to this slot.
8110
8111 The array of hard disk attachments is returned by
8112 <link to="IMachine::hardDisk2Attachments"/>.
8113
8114 <note>
8115 With the COM API, this is an interface like all the others. With the
8116 webservice, this is mapped to a structure, so querying the attribute
8117 will not return an object, but a complete structure.
8118 </note>
8119 </desc>
8120 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
8121 <desc>Hard disk object associated with this attachment.</desc>
8122 </attribute>
8123
8124 <attribute name="bus" type="StorageBus" readonly="yes">
8125 <desc>Interface bus of this attachment.</desc>
8126 </attribute>
8127
8128 <attribute name="channel" type="long" readonly="yes">
8129 <desc>Channel number of this attachment.</desc>
8130 </attribute>
8131
8132 <attribute name="device" type="long" readonly="yes">
8133 <desc>Device slot number of this attachment.</desc>
8134 </attribute>
8135
8136 </interface>
8137
8138 <interface
8139 name="IHardDisk2" extends="IMedium"
8140 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
8141 wsmap="managed"
8142 >
8143 <desc>
8144 The IHardDisk2 interface represents a virtual hard disk drive
8145 used by a virtual machine.
8146
8147 Virtual hard disk objects virtualize the hard disk hardware and look like
8148 regular hard disks for the guest OS running inside the virtual machine.
8149
8150 <h3>Hard Disk Types</h3>
8151
8152 There are three types of hard disks:
8153 <link to="HardDiskType_Normal">Normal</link>,
8154 <link to="HardDiskType_Immutable">Immutable</link> and
8155 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8156 hard disk defines how the hard disk is attached to a virtual machine and
8157 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8158 machine with the attached hard disk is taken. The type of the hard disk is
8159 defined by the <link to="#type"/> attribute.
8160
8161 All hard disks can be also divided in two big groups: <i>base</i> hard
8162 disks and <i>differencing</i> hard disks. A base hard disk contains all
8163 sectors of the hard disk data in its storage unit and therefore can be
8164 used independently. On the contrary, a differencing hard disk contains
8165 only some part of the hard disk data (a subset of sectors) and needs
8166 another hard disk to get access to the missing sectors of data. This
8167 another hard disk is called a <i>parent</i> hard disk and defines a hard
8168 disk to which this differencing hard disk is known to be <i>linked to</i>.
8169 The parent hard disk may be itself a differencing hard disk. This
8170 way, differencing hard disks form a linked hard disk chain. This chain
8171 always ends with the base hard disk which is sometimes referred to as the
8172 root hard disk of this chain. Note that several differencing hard disks
8173 may be linked to the same parent hard disk. This way, all known hard disks
8174 form a hard disk tree which is based on their parent-child relationship.
8175
8176 Differencing hard disks can be distinguished from base hard disks by
8177 querying the <link to="#parent"/> attribute: base hard disks do not have
8178 parents they would depend on, so the value of this attribute is always
8179 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8180 the hard disk tree (from the child hard disk to its parent). It is also
8181 possible to walk down the tree using the <link to="#children"/>
8182 attribute.
8183
8184 Note that the type of all differencing hard disks is
8185 <link to="HardDiskType_Normal">Normal</link>; all other values are
8186 meaningless for them. Base hard disks may be of any type.
8187
8188 <h3>Creating Hard Disks</h3>
8189
8190 New base hard disks are created using
8191 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
8192 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
8193 disks are usually implicitly created by VirtualBox when needed but may
8194 also be created explicitly using <link to="#createDiffStorage()"/>.
8195
8196 After the hard disk is successfully created (including the storage unit)
8197 or opened, it becomes a known hard disk (remembered in the internal media
8198 registry). Known hard disks can be attached to a virtual machine, accessed
8199 through <link to="IVirtualBox::getHardDisk2()"/> and
8200 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
8201 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
8202
8203 The following methods, besides <link to="IMedium::close()"/>,
8204 automatically remove the hard disk from the media registry:
8205 <ul>
8206 <li><link to="#deleteStorage()"/></li>
8207 <li><link to="#mergeTo()"/></li>
8208 </ul>
8209
8210 If the storage unit of the hard disk is a regular file in the host's
8211 file system then the rules stated in the description of the
8212 <link to="IMedium::location"/> attribute apply when setting its value. In
8213 addition, a plain file name without any path may be given, in which case
8214 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8215 folder</link> will be prepended to it.
8216
8217 <h4>Automatic composition of the file name part</h4>
8218
8219 Another extension to the <link to="IMedium::location"/> attribute is that
8220 there is a possibility to cause VirtualBox to compose a unique value for
8221 the file name part of the location using the UUID of the hard disk. This
8222 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8223 e.g. before the storage unit is created, and works as follows. You set the
8224 value of the <link to="IMedium::location"/> attribute to a location
8225 specification which only contains the path specification but not the file
8226 name part and ends with either a forward slash or a backslash character.
8227 In response, VirtualBox will generate a new UUID for the hard disk and
8228 compose the file name using the following pattern:
8229 <pre>
8230 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8231 </pre>
8232 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8233 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8234 is the default extension for the storage format of this hard disk. After
8235 that, you may call any of the methods that create a new hard disk storage
8236 unit and they will use the generated UUID and file name.
8237
8238 <h3>Attaching Hard Disks</h3>
8239
8240 Hard disks are attached to virtual machines using the
8241 <link to="IMachine::attachHardDisk2()"/> method and detached using the
8242 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
8243 <link to="#type"/>, hard disks are attached either
8244 <i>directly</i> or <i>indirectly</i>.
8245
8246 When a hard disk is being attached directly, it is associated with the
8247 virtual machine and used for hard disk operations when the machine is
8248 running. When a hard disk is being attached indirectly, a new differencing
8249 hard disk linked to it is implicitly created and this differencing hard
8250 disk is associated with the machine and used for hard disk operations.
8251 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
8252 a direct attachment then the same hard disk will be returned in response
8253 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
8254 an indirect attachment is performed then
8255 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
8256 differencing hard disk, not the original one passed to <link
8257 to="IMachine::attachHardDisk2()"/>. The following table shows the
8258 dependency of the attachment type on the hard disk type:
8259
8260 <table>
8261 <tr>
8262 <th>Hard Disk Type</th>
8263 <th>Direct or Indirect?</th>
8264 </tr>
8265 <tr>
8266 <td>Normal (Base)</td>
8267 <td>
8268 Normal base hard disks that do not have children (i.e. differencing
8269 hard disks linked to them) and that are not already attached to
8270 virtual machines in snapshots are attached <b>directly</b>.
8271 Otherwise, they are attached <b>indirectly</b> because having
8272 dependent children or being part of the snapshot makes it impossible
8273 to modify hard disk contents without breaking the integrity of the
8274 dependent party. The <link to="#readOnly"/> attribute allows to
8275 quickly determine the kind of the attachment for the given hard
8276 disk. Note that if a normal base hard disk is to be indirectly
8277 attached to a virtual machine with snapshots then a special
8278 procedure called <i>smart attachment</i> is performed (see below).
8279 </td>
8280 </tr>
8281 <tr>
8282 <td>Normal (Differencing)</td>
8283 <td>
8284 Differencing hard disks are like normal base hard disks: attached
8285 <b>directly</b> if they do not have children and are not attached to
8286 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8287 that the smart attachment procedure is never performed for
8288 differencing hard disks.
8289 </td>
8290 </tr>
8291 <tr>
8292 <td>Immutable</td>
8293 <td>
8294 Immutable hard disks are always attached <b>indirectly</b> because
8295 they are designed to be non-writable. If an immutable hard disk is
8296 attached to a virtual machine with snapshots then a special
8297 procedure called smart attachment is performed (see below).
8298 </td>
8299 </tr>
8300 <tr>
8301 <td>Writethrough</td>
8302 <td>
8303 Writethrough hard disks are always attached <b>directly</b>, also as
8304 designed. This also means that writethrough hard disks cannot have
8305 other hard disks linked to them at all.
8306 </td>
8307 </tr>
8308 </table>
8309
8310 Note that the same hard disk, regardless of its type, may be attached to
8311 more than one virtual machine at a time. In this case, the machine that is
8312 started first gains exclusive access to the hard disk and attempts to
8313 start other machines having this hard disk attached will fail until the
8314 first machine is powered down.
8315
8316 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8317 that the given hard disk remains associated with the given machine after a
8318 successful <link to="IMachine::detachHardDisk2()"/> call until
8319 <link to="IMachine::saveSettings()"/> is called to save all changes to
8320 machine settings to disk. This deferring is necessary to guarantee that
8321 the hard disk configuration may be restored at any time by a call to
8322 <link to="IMachine::discardSettings()"/> before the settings
8323 are saved (committed).
8324
8325 Note that if <link to="IMachine::discardSettings()"/> is called after
8326 indirectly attaching some hard disks to the machine but before a call to
8327 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
8328 all differencing hard disks implicitly created by
8329 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
8330 Such implicitly created hard disks will also be immediately deleted when
8331 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
8332 call if it is made before <link to="IMachine::saveSettings()"/>. This
8333 implicit deletion is safe because newly created differencing hard
8334 disks do not contain any user data.
8335
8336 However, keep in mind that detaching differencing hard disks that were
8337 implicitly created by <link to="IMachine::attachHardDisk2()"/>
8338 before the last <link to="IMachine::saveSettings()"/> call will
8339 <b>not</b> implicitly delete them as they may already contain some data
8340 (for example, as a result of virtual machine execution). If these hard
8341 disks are no more necessary, the caller can always delete them explicitly
8342 using <link to="#deleteStorage()"/> after they are actually de-associated
8343 from this machine by the <link to="IMachine::saveSettings()"/> call.
8344
8345 <h3>Smart Attachment</h3>
8346
8347 When normal base or immutable hard disks are indirectly attached to a
8348 virtual machine then some additional steps are performed to make sure the
8349 virtual machine will have the most recent "view" of the hard disk being
8350 attached. These steps include walking through the machine's snapshots
8351 starting from the current one and going through ancestors up to the first
8352 snapshot. Hard disks attached to the virtual machine in all
8353 of the encountered snapshots are checked whether they are descendants of
8354 the given normal base or immutable hard disk. The first found child (which
8355 is the differencing hard disk) will be used instead of the normal base or
8356 immutable hard disk as a parent for creating a new differencing hard disk
8357 that will be actually attached to the machine. And only if no descendants
8358 are found or if the virtual machine does not have any snapshots then the
8359 normal base or immutable hard disk will be used itself as a parent for
8360 this differencing hard disk.
8361
8362 It is easier to explain what smart attachment does using the
8363 following example:
8364 <pre>
8365BEFORE attaching B.vdi: AFTER attaching B.vdi:
8366
8367Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8368 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8369 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8370 Snapshot 4 (none) Snapshot 4 (none)
8371 CurState (none) CurState (D3->D2.vdi)
8372
8373 NOT
8374 ...
8375 CurState (D3->B.vdi)
8376 </pre>
8377 The first column is the virtual machine configuration before the base hard
8378 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8379 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8380 mean that the hard disk that is actually attached to the machine is a
8381 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8382 another hard disk, <tt>B.vdi</tt>.
8383
8384 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8385 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8386 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8387 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8388 it cannot be attached directly and needs an indirect attachment (i.e.
8389 implicit creation of a new differencing hard disk). Due to the smart
8390 attachment procedure, the new differencing hard disk
8391 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8392 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8393 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8394 machine.
8395
8396 Note that if there is more than one descendant hard disk of the given base
8397 hard disk found in a snapshot, and there is an exact device, channel and
8398 bus match, then this exact match will be used. Otherwise, the youngest
8399 descendant will be picked up.
8400
8401 There is one more important aspect of the smart attachment procedure which
8402 is not related to snapshots at all. Before walking through the snapshots
8403 as described above, the backup copy of the current list of hard disk
8404 attachment is searched for descendants. This backup copy is created when
8405 the hard disk configuration is changed for the first time after the last
8406 <link to="IMachine::saveSettings()"/> call and used by
8407 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
8408 changes. When such a descendant is found in this backup copy, it will be
8409 simply re-attached back, without creating a new differencing hard disk for
8410 it. This optimization is necessary to make it possible to re-attach the
8411 base or immutable hard disk to a different bus, channel or device slot
8412 without losing the contents of the differencing hard disk actually
8413 attached to the machine in place of it.
8414 </desc>
8415
8416 <attribute name="format" type="wstring" readonly="yes">
8417 <desc>
8418 Storage format of this hard disk.
8419
8420 The value of this attribute is a string that specifies a backend used to
8421 store hard disk data. The storage format is defined when you create a
8422 new hard disk or automatically detected when you open an existing hard
8423 disk medium, and cannot be changed later.
8424
8425 The list of all storage formats supported by this VirtualBox
8426 installation can be obtained using
8427 <link to="ISystemProperties::hardDiskFormats"/>.
8428 </desc>
8429 </attribute>
8430
8431 <attribute name="type" type="HardDiskType">
8432 <desc>
8433 Type (role) of this hard disk.
8434
8435 The following constraints apply when changing the value of this
8436 attribute:
8437 <ul>
8438 <li>If a hard disk is attached to a virtual machine (either in the
8439 current state or in one of the snapshots), its type cannot be
8440 changed.
8441 </li>
8442 <li>As long as the hard disk has children, its type cannot be set
8443 to <link to="HardDiskType_Writethrough"/>.
8444 </li>
8445 <li>The type of all differencing hard disks is
8446 <link to="HardDiskType_Normal"/> and cannot be changed.
8447 </li>
8448 </ul>
8449
8450 The type of a newly created or opened hard disk is set to
8451 <link to="HardDiskType_Normal"/>.
8452 </desc>
8453 </attribute>
8454
8455 <attribute name="parent" type="IHardDisk2" readonly="yes">
8456 <desc>
8457 Parent of this hard disk (a hard disk this hard disk is directly based
8458 on).
8459
8460 Only differencing hard disks have parents. For base (non-differencing)
8461 hard disks, <tt>null</tt> is returned.
8462 </desc>
8463 </attribute>
8464
8465 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8466 <desc>
8467 Children of this hard disk (all differencing hard disks directly based
8468 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8469 does not have any children.
8470 </desc>
8471 </attribute>
8472
8473 <attribute name="root" type="IHardDisk2" readonly="yes">
8474 <desc>
8475 Root hard disk of this hard disk.
8476
8477 If this is a differencing hard disk, its root hard disk is the base hard
8478 disk the given hard disk branch starts from. For all other types of hard
8479 disks, this property returns the hard disk object itself (i.e. the same
8480 object this property is read on).
8481 </desc>
8482 </attribute>
8483
8484 <attribute name="readOnly" type="boolean" readonly="yes">
8485 <desc>
8486 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8487 otherwise.
8488
8489 A hard disk is considered to be read-only when its contents cannot be
8490 modified without breaking the integrity of other parties that depend on
8491 this hard disk such as its child hard disks or snapshots of virtual
8492 machines where this hard disk is attached to these machines. If there
8493 are no children and no such snapshots then there is no dependency and
8494 the hard disk is not read-only.
8495
8496 The value of this attribute can be used to determine the kind of the
8497 attachment that will take place when attaching this hard disk to a
8498 virtual machine. If the value is <tt>false</tt> then the hard disk will
8499 be attached directly. If the value is <tt>true</tt> then the hard disk
8500 will be attached indirectly by creating a new differencing child hard
8501 disk for that. See the interface description for more information.
8502
8503 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8504 disks are always read-only while all
8505 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8506 always not.
8507
8508 <note>
8509 The read-only condition represented by this attribute is related to
8510 the hard disk type and usage, not to the current
8511 <link to="IMedium::state">media state</link> and not to the read-only
8512 state of the storage unit.
8513 </note>
8514 </desc>
8515 </attribute>
8516
8517 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8518 <desc>
8519 Logical size of this hard disk (in megabytes), as reported to the
8520 guest OS running inside the virtual machine this disk is
8521 attached to. The logical size is defined when the hard disk is created
8522 and cannot be changed later.
8523
8524 <note>
8525 Reading this property on a differencing hard disk will return the size
8526 of its <link to="#root"/> hard disk.
8527 </note>
8528 <note>
8529 For hard disks whose state is <link to="#state"/> is <link
8530 to="MediaState_Inaccessible"/>, the value of this property is the
8531 last known logical size. For <link to="MediaState_NotCreated"/> hard
8532 disks, the returned value is zero.
8533 </note>
8534 </desc>
8535 </attribute>
8536
8537 <!-- storage methods -->
8538
8539 <method name="getProperty">
8540 <desc>
8541 Returns the value of the custom hard disk property with the given name.
8542
8543 The list of all properties supported by the given hard disk format can
8544 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8545
8546 Note that if this method returns a <tt>null</tt> @a value, the requested
8547 property is supported but currently not assigned any value.
8548
8549 <result name="VBOX_E_OBJECT_NOT_FOUND">
8550 Requested property does not exist (not supported by the format).
8551 </result>
8552 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8553 </desc>
8554 <param name="name" type="wstring" dir="in">
8555 <desc>Name of the property to get.</desc>
8556 </param>
8557 <param name="value" type="wstring" dir="return">
8558 <desc>Current property value.</desc>
8559 </param>
8560 </method>
8561
8562 <method name="setProperty">
8563 <desc>
8564 Sets the value of the custom hard disk property with the given name.
8565
8566 The list of all properties supported by the given hard disk format can
8567 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8568
8569 Note that setting the property value to <tt>null</tt> is equivalent to
8570 deleting the existing value. A default value (if it is defined for this
8571 property) will be used by the format backend in this case.
8572
8573 <result name="VBOX_E_OBJECT_NOT_FOUND">
8574 Requested property does not exist (not supported by the format).
8575 </result>
8576 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8577 </desc>
8578 <param name="name" type="wstring" dir="in">
8579 <desc>Name of the property to set.</desc>
8580 </param>
8581 <param name="value" type="wstring" dir="in">
8582 <desc>Property value to set.</desc>
8583 </param>
8584 </method>
8585
8586 <method name="getProperties">
8587 <desc>
8588 Returns values for a group of properties in one call.
8589
8590 The names of the properties to get are specified using the @a names
8591 argument which is a list of comma-separated property names or
8592 <tt>null</tt> if all properties are to be returned. Note that currently
8593 the value of this argument is ignored and the method always returns all
8594 existing properties.
8595
8596 The list of all properties supported by the given hard disk format can
8597 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8598
8599 The method returns two arrays, the array of property names corresponding
8600 to the @a names argument and the current values of these properties.
8601 Both arrays have the same number of elements with each elemend at the
8602 given index in the first array corresponds to an element at the same
8603 index in the second array.
8604
8605 Note that for properties that do not have assigned values,
8606 <tt>null</tt> is returned at the appropriate index in the @a
8607 returnValues array.
8608
8609 </desc>
8610 <param name="names" type="wstring" dir="in">
8611 <desc>
8612 Names of properties to get.
8613 </desc>
8614 </param>
8615 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8616 <desc>Names of returned properties.</desc>
8617 </param>
8618 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8619 <desc>Values of returned properties.</desc>
8620 </param>
8621 </method>
8622
8623 <method name="setProperties">
8624 <desc>
8625 Sets values for a group of properties in one call.
8626
8627 The names of the properties to set are passed in the @a names
8628 array along with the new values for them in the @a values array. Both
8629 arrays have the same number of elements with each elemend at the given
8630 index in the first array corresponding to an element at the same index
8631 in the second array.
8632
8633 If there is at least one property name in @a names that is not valid,
8634 the method will fail before changing the values of any other properties
8635 from the @a names array.
8636
8637 Using this method over <link to="#setProperty()"/> is preferred if you
8638 need to set several properties at once since it will result into less
8639 IPC calls.
8640
8641 The list of all properties supported by the given hard disk format can
8642 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8643
8644 Note that setting the property value to <tt>null</tt> is equivalent to
8645 deleting the existing value. A default value (if it is defined for this
8646 property) will be used by the format backend in this case.
8647 </desc>
8648 <param name="names" type="wstring" safearray="yes" dir="in">
8649 <desc>Names of properties to set.</desc>
8650 </param>
8651 <param name="values" type="wstring" safearray="yes" dir="in">
8652 <desc>Values of properties to set.</desc>
8653 </param>
8654 </method>
8655
8656 <!-- storage methods -->
8657
8658 <method name="createDynamicStorage">
8659 <desc>
8660 Starts creating a dynamically expanding hard disk storage unit in the
8661 background. The previous storage unit created for this object, if
8662 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8663 the operation will fail.
8664
8665 Before the operation starts, the hard disk is placed in
8666 <link to="MediaState_Creating"/> state. If the create operation
8667 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8668 state.
8669
8670 After the returned progress object reports that the operation has
8671 successfully completed, the media state will be set to <link
8672 to="MediaState_Created"/>, the hard disk will be remembered by this
8673 VirtualBox installation and may be attached to virtual machines.
8674
8675 <result name="VBOX_E_NOT_SUPPORTED">
8676 Dynamic storage creation operation is not supported. See <link
8677 to="IHardDiskFormat::capabilities"/>.
8678 </result>
8679 </desc>
8680 <param name="logicalSize" type="unsigned long long" dir="in">
8681 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8682 </param>
8683 <param name="progress" type="IProgress" dir="return">
8684 <desc>Progress object to track the operation completion.</desc>
8685 </param>
8686 </method>
8687
8688 <method name="createFixedStorage">
8689 <desc>
8690 Starts creating a fixed-size hard disk storage unit in the background.
8691 The previous storage unit created for this object, if
8692 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8693 the operation will fail.
8694
8695 Before the operation starts, the hard disk is placed to
8696 <link to="MediaState_Creating"/> state. If the create operation
8697 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8698 state.
8699
8700 After the returned progress object reports that the operation is
8701 successfully complete, the media state will be set to <link
8702 to="MediaState_Created"/>, the hard disk will be remembered by this
8703 VirtualBox installation and may be attached to virtual machines.
8704
8705 <result name="VBOX_E_NOT_SUPPORTED">
8706 Fixed storage creation operation is not supported. See
8707 <link to="IHardDiskFormat::capabilities"/>.
8708 </result>
8709 </desc>
8710 <param name="logicalSize" type="unsigned long long" dir="in">
8711 <desc>Logical size of the hard disk in megabytes.</desc>
8712 </param>
8713 <param name="progress" type="IProgress" dir="return">
8714 <desc>Progress object to track the operation completion.</desc>
8715 </param>
8716 </method>
8717
8718 <method name="deleteStorage">
8719 <desc>
8720 Starts deleting the storage unit of this hard disk.
8721
8722 The hard disk must not be attached to any known virtual machine and must
8723 not have any known child hard disks, otherwise the operation will fail.
8724 It will also fail if there is no storage unit to delete or if deletion
8725 is already in progress, or if the hard disk is being in use (locked for
8726 read or for write) or inaccessible. Therefore, the only valid state for
8727 this operation to succeed is <link to="MediaState_Created"/>.
8728
8729 Before the operation starts, the hard disk is placed to
8730 <link to="MediaState_Deleting"/> state and gets removed from the list
8731 of remembered hard disks (media registry). If the delete operation
8732 fails, the media will be remembered again and placed back to
8733 <link to="MediaState_Created"/> state.
8734
8735 After the returned progress object reports that the operation is
8736 complete, the media state will be set to
8737 <link to="MediaState_NotCreated"/> and you will be able to use one of
8738 the storage creation methods to create it again.
8739
8740 <see>#close()</see>
8741
8742 <result name="VBOX_E_OBJECT_IN_USE">
8743 Hard disk is attached to a virtual machine.
8744 </result>
8745 <result name="VBOX_E_NOT_SUPPORTED">
8746 Storage deletion is not allowed because neither of storage creation
8747 operations are supported. See
8748 <link to="IHardDiskFormat::capabilities"/>.
8749 </result>
8750
8751 <note>
8752 If the deletion operation fails, it is not guaranteed that the storage
8753 unit still exists. You may check the <link to="IMedium::state"/> value
8754 to answer this question.
8755 </note>
8756 </desc>
8757 <param name="progress" type="IProgress" dir="return">
8758 <desc>Progress object to track the operation completion.</desc>
8759 </param>
8760 </method>
8761
8762 <!-- diff methods -->
8763
8764 <method name="createDiffStorage">
8765 <desc>
8766 Starts creating an empty differencing storage unit based on this hard
8767 disk in the format and at the location defined by the @a target
8768 argument.
8769
8770 The target hard disk must be in <link to="MediaState_NotCreated"/>
8771 state (i.e. must not have an existing storage unit). Upon successful
8772 completion, this operation will set the type of the target hard disk to
8773 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8774 represent the differencing hard disk data in the given format (according
8775 to the storage format of the target object).
8776
8777 After the returned progress object reports that the operation is
8778 successfully complete, the target hard disk gets remembered by this
8779 VirtualBox installation and may be attached to virtual machines.
8780
8781 <note>
8782 The hard disk will be set to <link to="MediaState_LockedRead"/>
8783 state for the duration of this operation.
8784 </note>
8785 <result name="VBOX_E_OBJECT_IN_USE">
8786 Hard disk not in NotCreated state.
8787 </result>
8788 </desc>
8789 <param name="target" type="IHardDisk2" dir="in">
8790 <desc>Target hard disk.</desc>
8791 </param>
8792 <param name="progress" type="IProgress" dir="return">
8793 <desc>Progress object to track the operation completion.</desc>
8794 </param>
8795 </method>
8796
8797 <method name="mergeTo">
8798 <desc>
8799 Starts merging the contents of this hard disk and all intermediate
8800 differencing hard disks in the chain to the given target hard disk.
8801
8802 The target hard disk must be either a descendant of this hard disk or
8803 its ancestor (otherwise this method will immediately return a failure).
8804 It follows that there are two logical directions of the merge operation:
8805 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8806 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8807 chain:
8808
8809 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8810
8811 Here, calling this method on the <tt>Base</tt> hard disk object with
8812 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8813 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8814 merge. Note that in both cases the contents of the resulting hard disk
8815 will be the same, the only difference is the hard disk object that takes
8816 the result of the merge operation. In case of the forward merge in the
8817 above example, the result will be written to <tt>Diff_2</tt>; in case of
8818 the backward merge, the result will be written to <tt>Base</tt>. In
8819 other words, the result of the operation is always stored in the target
8820 hard disk.
8821
8822 Upon successful operation completion, the storage units of all hard
8823 disks in the chain between this (source) hard disk and the target hard
8824 disk, including the source hard disk itself, will be automatically
8825 deleted and the relevant hard disk objects (including this hard disk)
8826 will become uninitialized. This means that any attempt to call any of
8827 their methods or attributes will fail with the
8828 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8829 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8830 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8831 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8832 disk itself since it will no longer be based on any other hard disk.
8833
8834 Considering the above, all of the following conditions must be met in
8835 order for the merge operation to succeed:
8836 <ul>
8837 <li>
8838 Neither this (source) hard disk nor any intermediate
8839 differencing hard disk in the chain between it and the target
8840 hard disk is attached to any virtual machine.
8841 </li>
8842 <li>
8843 Neither the source hard disk nor the target hard disk is an
8844 <link to="HardDiskType_Immutable"/> hard disk.
8845 </li>
8846 <li>
8847 The part of the hard disk tree from the source hard disk to the
8848 target hard disk is a linear chain, i.e. all hard disks in this
8849 chain have exactly one child which is the next hard disk in this
8850 chain. The only exception from this rule is the target hard disk in
8851 the forward merge operation; it is allowed to have any number of
8852 child hard disks because the merge operation will hot change its
8853 logical contents (as it is seen by the guest OS or by children).
8854 </li>
8855 <li>
8856 None of the involved hard disks are in
8857 <link to="MediaState_LockedRead"/> or
8858 <link to="MediaState_LockedWrite"/> state.
8859 </li>
8860 </ul>
8861
8862 <note>
8863 This (source) hard disk and all intermediates will be placed to <link
8864 to="MediaState_Deleting"/> state and the target hard disk will be
8865 placed to <link to="MediaState_LockedWrite"/> state and for the
8866 duration of this operation.
8867 </note>
8868 </desc>
8869 <param name="targetId" type="uuid" dir="in">
8870 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8871 </param>
8872 <param name="progress" type="IProgress" dir="return">
8873 <desc>Progress object to track the operation completion.</desc>
8874 </param>
8875 </method>
8876
8877 <!-- clone methods -->
8878
8879 <method name="cloneTo">
8880 <desc>
8881 Starts creating a clone of this hard disk in the format and at the
8882 location defined by the @a target argument.
8883
8884 The target hard disk must be in <link to="MediaState_NotCreated"/>
8885 state (i.e. must not have an existing storage unit). Upon successful
8886 completion, the cloned hard disk will contain exactly the same sector
8887 data as the hard disk being cloned, except that a new UUID for the clone
8888 will be randomly generated.
8889
8890 After the returned progress object reports that the operation is
8891 successfully complete, the target hard disk gets remembered by this
8892 VirtualBox installation and may be attached to virtual machines.
8893
8894 <note>
8895 If the cloned hard disk is a differencing hard disk, it will inherit
8896 parent dependency of the original hard disk.
8897 </note>
8898 <note>
8899 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8900 state for the duration of this operation.
8901 </note>
8902 </desc>
8903 <param name="target" type="IHardDisk2" dir="in">
8904 <desc>Target hard disk.</desc>
8905 </param>
8906 <param name="progress" type="IProgress" dir="return">
8907 <desc>Progress object to track the operation completion.</desc>
8908 </param>
8909 </method>
8910
8911 <method name="flattenTo">
8912 <desc>
8913 Starts creating a deep (independent) clone of this hard disk in the
8914 format and at the location defined by the @a target argument.
8915
8916 This operation is similar to <link to="#cloneTo()"/> except that when
8917 applied to a differencing hard disk, it will also copy missing hard disk
8918 data from all parent hard disks it is linked to. This will make the
8919 created clone an independent base hard disk that contains all hard disk
8920 data and does not need any other hard disks to operate.
8921
8922 After the returned progress object reports that the operation is
8923 successfully complete, the target hard disk gets remembered by this
8924 VirtualBox installation and may be attached to virtual machines.
8925
8926 <note>
8927 For base hard disks, this operation is identical to
8928 <link to="#cloneTo()"/>.
8929 </note>
8930 <note>
8931 This hard disk and all its parent hard disks will be placed to <link
8932 to="MediaState_LockedRead"/> state for the duration of this
8933 operation.
8934 </note>
8935 </desc>
8936 <param name="target" type="IHardDisk2" dir="in">
8937 <desc>Target hard disk.</desc>
8938 </param>
8939 <param name="progress" type="IProgress" dir="return">
8940 <desc>Progress object to track the operation completion.</desc>
8941 </param>
8942 </method>
8943
8944 <method name="compact">
8945 <desc>
8946 Starts compacting of this hard disk. This means that the disk is
8947 transformed into a possibly more compact storage representation.
8948 This potentially creates temporary images, which can require a
8949 substantial amount of additional disk space.
8950
8951 After the returned progress object reports that the operation is
8952 successfully complete, the media state will be set back to the
8953 current state.
8954
8955 <note>
8956 This hard disk and all its parent hard disks will be placed to <link
8957 to="MediaState_LockedRead"/> state for the duration of this
8958 operation.
8959 </note>
8960 </desc>
8961 <param name="progress" type="IProgress" dir="return">
8962 <desc>Progress object to track the operation completion.</desc>
8963 </param>
8964 </method>
8965
8966 </interface>
8967
8968
8969 <!--
8970 // IHardDiskFormat
8971 /////////////////////////////////////////////////////////////////////////
8972 -->
8973
8974 <enum
8975 name="DataType"
8976 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
8977 >
8978 <const name="Int32" value="0"/>
8979 <const name="Int8" value="1"/>
8980 <const name="String" value="2"/>
8981 </enum>
8982
8983 <enum
8984 name="DataFlags"
8985 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
8986 >
8987 <const name="None" value="0x00"/>
8988 <const name="Mandatory" value="0x01"/>
8989 <const name="Expert" value="0x02"/>
8990 <const name="Array" value="0x04"/>
8991 <const name="FlagMask" value="0x07"/>
8992 </enum>
8993
8994 <enum
8995 name="HardDiskFormatCapabilities"
8996 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
8997 >
8998 <desc>
8999 Hard disk format capability flags.
9000 </desc>
9001
9002 <const name="Uuid" value="0x01">
9003 <desc>
9004 Supports UUIDs as expected by VirtualBox code.
9005 </desc>
9006 </const>
9007
9008 <const name="CreateFixed" value="0x02">
9009 <desc>
9010 Supports creating fixed size images, allocating all space instantly.
9011 </desc>
9012 </const>
9013
9014 <const name="CreateDynamic" value="0x04">
9015 <desc>
9016 Supports creating dynamically growing images, allocating space on
9017 demand.
9018 </desc>
9019 </const>
9020
9021 <const name="CreateSplit2G" value="0x08">
9022 <desc>
9023 Supports creating images split in chunks of a bit less than 2 GBytes.
9024 </desc>
9025 </const>
9026
9027 <const name="Differencing" value="0x10">
9028 <desc>
9029 Supports being used as a format for differencing hard disks (see <link
9030 to="IHardDisk2::createDiffStorage"/>).
9031 </desc>
9032 </const>
9033
9034 <const name="Asynchronous" value="0x20">
9035 <desc>
9036 Supports asynchronous I/O operations for at least some configurations.
9037 </desc>
9038 </const>
9039
9040 <const name="File" value="0x40">
9041 <desc>
9042 The format backend operates on files (the <link to="IMedium::location"/>
9043 attribute of the hard disk specifies a file used to store hard disk
9044 data; for a list of supported file extensions see
9045 <link to="IHardDiskFormat::fileExtensions"/>).
9046 </desc>
9047 </const>
9048
9049 <const name="Properties" value="0x80">
9050 <desc>
9051 The format backend uses the property interface to configure the storage
9052 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9053 method is used to get access to properties supported by the given hard
9054 disk format).
9055 </desc>
9056 </const>
9057
9058 <const name="CapabilityMask" value="0xFF"/>
9059 </enum>
9060
9061 <interface
9062 name="IHardDiskFormat" extends="$unknown"
9063 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9064 wsmap="managed"
9065 >
9066 <desc>
9067 The IHardDiskFormat interface represents a virtual hard disk format.
9068
9069 Each hard disk format has an associated backend which is used to handle
9070 hard disks stored in this format. This interface provides information
9071 about the properties of the associated backend.
9072
9073 Each hard disk format is identified by a string represented by the
9074 <link to="#id"/> attribute. This string is used in calls like
9075 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
9076 format.
9077
9078 The list of all supported hard disk formats can be obtained using
9079 <link to="ISystemProperties::hardDiskFormats"/>.
9080
9081 <see>IHardDisk2</see>
9082 </desc>
9083
9084 <attribute name="id" type="wstring" readonly="yes">
9085 <desc>
9086 Identifier of this format.
9087
9088 The format identifier is a non-null non-empty ASCII string. Note that
9089 this string is case-insensitive. This means that, for example, all of
9090 the following strings:
9091 <pre>
9092 "VDI"
9093 "vdi"
9094 "VdI"</pre>
9095 refer to the same hard disk format.
9096
9097 This string is used in methods of other interfaces where it is necessary
9098 to specify a hard disk format, such as
9099 <link to="IVirtualBox::createHardDisk2()"/>.
9100 </desc>
9101 </attribute>
9102
9103 <attribute name="name" type="wstring" readonly="yes">
9104 <desc>
9105 Human readable description of this format.
9106
9107 Mainly for use in file open dialogs.
9108 </desc>
9109 </attribute>
9110
9111 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9112 <desc>
9113 Array of strings containing the supported file extensions.
9114
9115 The first extension in the array is the extension preferred by the
9116 backend. It is recommended to use this extension when specifying a
9117 location of the storage unit for a new hard disk.
9118
9119 Note that some backends do not work on files, so this array may be
9120 empty.
9121
9122 <see>IHardDiskFormat::capabilities</see>
9123 </desc>
9124 </attribute>
9125
9126 <attribute name="capabilities" type="unsigned long" readonly="yes">
9127 <desc>
9128 Capabilities of the format as a set of bit flags.
9129
9130 For the meaning of individual capability flags see
9131 <link to="HardDiskFormatCapabilities"/>.
9132 </desc>
9133 </attribute>
9134
9135 <method name="describeProperties">
9136 <desc>
9137 Returns several arrays describing the properties supported by this
9138 format.
9139
9140 An element with the given index in each array describes one
9141 property. Thus, the number of elements in each returned array is the
9142 same and corresponds to the number of supported properties.
9143
9144 The returned arrays are filled in only if the
9145 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9146 All arguments must be non-NULL.
9147
9148 <see>DataType</see>
9149 <see>DataFlags</see>
9150 </desc>
9151
9152 <param name="names" type="wstring" safearray="yes" dir="out">
9153 <desc>Array of property names.</desc>
9154 </param>
9155 <param name="description" type="wstring" safearray="yes" dir="out">
9156 <desc>Array of property descriptions.</desc>
9157 </param>
9158 <param name="types" type="DataType" safearray="yes" dir="out">
9159 <desc>Array of property types.</desc>
9160 </param>
9161 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9162 <desc>Array of property flags.</desc>
9163 </param>
9164 <param name="defaults" type="wstring" safearray="yes" dir="out">
9165 <desc>Array of default property values.</desc>
9166 </param>
9167 </method>
9168
9169 </interface>
9170
9171
9172 <!--
9173 // IFloppyImage2
9174 /////////////////////////////////////////////////////////////////////////
9175 -->
9176
9177 <interface
9178 name="IFloppyImage2" extends="IMedium"
9179 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
9180 wsmap="managed"
9181 >
9182 <desc>
9183 The IFloppyImage2 interface represents a medium containing the image
9184 of a floppy disk.
9185 </desc>
9186
9187 </interface>
9188
9189
9190 <!--
9191 // IDVDImage2
9192 /////////////////////////////////////////////////////////////////////////
9193 -->
9194
9195 <interface
9196 name="IDVDImage2" extends="IMedium"
9197 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
9198 wsmap="managed"
9199 >
9200 <desc>
9201 The IDVDImage2 interface represents a medium containing the image
9202 of a CD or DVD disk in the ISO format.
9203 </desc>
9204
9205 </interface>
9206
9207
9208 <!--
9209 // IDVDDrive
9210 /////////////////////////////////////////////////////////////////////////
9211 -->
9212
9213 <interface
9214 name="IDVDDrive" extends="$unknown"
9215 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9216 wsmap="managed"
9217 >
9218 <desc>
9219 The IDVDDrive interface represents the virtual CD/DVD drive of the
9220 virtual machine. An object of this type is returned by
9221 <link to="IMachine::DVDDrive"/>.
9222 </desc>
9223
9224 <attribute name="state" type="DriveState" readonly="yes">
9225 <desc>Current drive state.</desc>
9226 </attribute>
9227
9228 <attribute name="passthrough" type="boolean">
9229 <desc>
9230 When a host drive is mounted and passthrough is enabled
9231 the guest OS will be able to directly send SCSI commands to
9232 the host drive. This enables the guest OS to use CD/DVD writers
9233 but is potentially dangerous.
9234 </desc>
9235 </attribute>
9236
9237 <method name="mountImage">
9238 <desc>Mounts a CD/DVD image with the specified UUID.
9239
9240 <result name="VBOX_E_FILE_ERROR">
9241 Invalid image file location.
9242 </result>
9243 <result name="VBOX_E_OBJECT_NOT_FOUND">
9244 Could not find a CD/DVD image matching @a imageID.
9245 </result>
9246 <result name="VBOX_E_INVALID_OBJECT_STATE">
9247 Invalid media state.
9248 </result>
9249
9250 </desc>
9251 <param name="imageId" type="uuid" dir="in"/>
9252 </method>
9253
9254 <method name="captureHostDrive">
9255 <desc>Captures the specified host CD/DVD drive.</desc>
9256 <param name="drive" type="IHostDVDDrive" dir="in"/>
9257 </method>
9258
9259 <method name="unmount">
9260 <desc>Unmounts the currently mounted image or host drive.</desc>
9261 </method>
9262
9263 <method name="getImage">
9264 <desc>Returns the currently mounted CD/DVD image.</desc>
9265 <param name="image" type="IDVDImage2" dir="return"/>
9266 </method>
9267
9268 <method name="getHostDrive">
9269 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9270 <param name="drive" type="IHostDVDDrive" dir="return"/>
9271 </method>
9272
9273 </interface>
9274
9275
9276 <!--
9277 // IFloppyDrive
9278 /////////////////////////////////////////////////////////////////////////
9279 -->
9280
9281 <interface
9282 name="IFloppyDrive" extends="$unknown"
9283 uuid="159412cd-bab8-452e-8097-218a020825a6"
9284 wsmap="managed"
9285 >
9286 <desc>
9287 The IFloppyDrive interface represents the virtual floppy drive of the
9288 virtual machine. An object of this type is returned by
9289 <link to="IMachine::floppyDrive" />.
9290 </desc>
9291
9292 <attribute name="enabled" type="boolean">
9293 <desc>
9294 Flag whether the floppy drive is enabled. If it is disabled,
9295 the floppy drive will not be reported to the guest OS.
9296 </desc>
9297 </attribute>
9298
9299 <attribute name="state" type="DriveState" readonly="yes">
9300 <desc>Current drive state.</desc>
9301 </attribute>
9302
9303 <method name="mountImage">
9304 <desc>Mounts a floppy image with the specified UUID.
9305
9306 <result name="VBOX_E_FILE_ERROR">
9307 Invalid image file location.
9308 </result>
9309 <result name="VBOX_E_OBJECT_NOT_FOUND">
9310 Could not find a floppy image matching @a imageID.
9311 </result>
9312 <result name="VBOX_E_INVALID_OBJECT_STATE">
9313 Invalid media state.
9314 </result>
9315
9316 </desc>
9317 <param name="imageId" type="uuid" dir="in"/>
9318 </method>
9319
9320 <method name="captureHostDrive">
9321 <desc>Captures the specified host floppy drive.</desc>
9322 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9323 </method>
9324
9325 <method name="unmount">
9326 <desc>Unmounts the currently mounted image or host drive.</desc>
9327 </method>
9328
9329 <method name="getImage">
9330 <desc>Returns the currently mounted floppy image.</desc>
9331 <param name="image" type="IFloppyImage2" dir="return"/>
9332 </method>
9333
9334 <method name="getHostDrive">
9335 <desc>Returns the currently mounted host floppy drive.</desc>
9336 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9337 </method>
9338
9339 </interface>
9340
9341
9342 <!--
9343 // IKeyboard
9344 /////////////////////////////////////////////////////////////////////////
9345 -->
9346
9347 <interface
9348 name="IKeyboard" extends="$unknown"
9349 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9350 wsmap="managed"
9351 >
9352 <desc>
9353 The IKeyboard interface represents the virtual machine's keyboard. Used
9354 in <link to="IConsole::keyboard"/>.
9355
9356 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9357 to the virtual machine.
9358
9359 </desc>
9360 <method name="putScancode">
9361 <desc>Sends a scancode to the keyboard.
9362
9363 <result name="VBOX_E_IPRT_ERROR">
9364 Could not send scan code to virtual keyboard.
9365 </result>
9366
9367 </desc>
9368 <param name="scancode" type="long" dir="in"/>
9369 </method>
9370
9371 <method name="putScancodes">
9372 <desc>Sends an array of scancodes to the keyboard.
9373
9374 <result name="VBOX_E_IPRT_ERROR">
9375 Could not send all scan codes to virtual keyboard.
9376 </result>
9377
9378 </desc>
9379 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9380 <param name="codesStored" type="unsigned long" dir="return"/>
9381 </method>
9382
9383 <method name="putCAD">
9384 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9385 function is nothing special, it is just a convenience function
9386 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9387
9388 <result name="VBOX_E_IPRT_ERROR">
9389 Could not send all scan codes to virtual keyboard.
9390 </result>
9391
9392 </desc>
9393 </method>
9394
9395 </interface>
9396
9397
9398 <!--
9399 // IMouse
9400 /////////////////////////////////////////////////////////////////////////
9401 -->
9402
9403 <enum
9404 name="MouseButtonState"
9405 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9406 >
9407 <desc>
9408 Mouse button state.
9409 </desc>
9410
9411 <const name="LeftButton" value="0x01"/>
9412 <const name="RightButton" value="0x02"/>
9413 <const name="MiddleButton" value="0x04"/>
9414 <const name="WheelUp" value="0x08"/>
9415 <const name="WheelDown" value="0x10"/>
9416 <const name="MouseStateMask" value="0x1F"/>
9417 </enum>
9418
9419 <interface
9420 name="IMouse" extends="$unknown"
9421 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9422 wsmap="managed"
9423 >
9424 <desc>
9425 The IMouse interface represents the virtual machine's mouse. Used in
9426 <link to="IConsole::mouse"/>.
9427
9428 Through this interface, the virtual machine's virtual mouse can be
9429 controlled.
9430 </desc>
9431
9432 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9433 <desc>
9434 Whether the guest OS supports absolute mouse pointer positioning
9435 or not.
9436 <note>
9437 VirtualBox Guest Tools need to be installed to the guest OS
9438 in order to enable absolute mouse positioning support.
9439 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9440 callback to be instantly informed about changes of this attribute
9441 during virtual machine execution.
9442 </note>
9443 <see><link to="#putMouseEventAbsolute"/></see>
9444 </desc>
9445 </attribute>
9446
9447 <method name="putMouseEvent">
9448 <desc>
9449 Initiates a mouse event using relative pointer movements
9450 along x and y axis.
9451
9452 <result name="E_ACCESSDENIED">
9453 Console not powered up.
9454 </result>
9455 <result name="VBOX_E_IPRT_ERROR">
9456 Could not send mouse event to virtual mouse.
9457 </result>
9458
9459 </desc>
9460
9461 <param name="dx" type="long" dir="in">
9462 <desc>
9463 Amount of pixels the mouse should move to the right.
9464 Negative values move the mouse to the left.
9465 </desc>
9466 </param>
9467 <param name="dy" type="long" dir="in">
9468 <desc>
9469 Amount of pixels the mouse should move downwards.
9470 Negative values move the mouse upwards.
9471 </desc>
9472 </param>
9473 <param name="dz" type="long" dir="in">
9474 <desc>
9475 Amount of mouse wheel moves.
9476 Positive values describe clockwise wheel rotations,
9477 negative values describe counterclockwise rotations.
9478 </desc>
9479 </param>
9480 <param name="buttonState" type="long" dir="in">
9481 <desc>
9482 The current state of mouse buttons. Every bit represents
9483 a mouse button as follows:
9484 <table>
9485 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9486 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9487 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9488 </table>
9489 A value of <tt>1</tt> means the corresponding button is pressed.
9490 otherwise it is released.
9491 </desc>
9492 </param>
9493 </method>
9494
9495 <method name="putMouseEventAbsolute">
9496 <desc>
9497 Positions the mouse pointer using absolute x and y coordinates.
9498 These coordinates are expressed in pixels and
9499 start from <tt>[1,1]</tt> which corresponds to the top left
9500 corner of the virtual display.
9501
9502 <result name="E_ACCESSDENIED">
9503 Console not powered up.
9504 </result>
9505 <result name="VBOX_E_IPRT_ERROR">
9506 Could not send mouse event to virtual mouse.
9507 </result>
9508
9509 <note>
9510 This method will have effect only if absolute mouse
9511 positioning is supported by the guest OS.
9512 </note>
9513
9514 <see><link to="#absoluteSupported"/></see>
9515 </desc>
9516
9517 <param name="x" type="long" dir="in">
9518 <desc>
9519 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9520 </desc>
9521 </param>
9522 <param name="y" type="long" dir="in">
9523 <desc>
9524 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9525 </desc>
9526 </param>
9527 <param name="dz" type="long" dir="in">
9528 <desc>
9529 Amount of mouse wheel moves.
9530 Positive values describe clockwise wheel rotations,
9531 negative values describe counterclockwise rotations.
9532 </desc>
9533 </param>
9534 <param name="buttonState" type="long" dir="in">
9535 <desc>
9536 The current state of mouse buttons. Every bit represents
9537 a mouse button as follows:
9538 <table>
9539 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9540 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9541 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9542 </table>
9543 A value of <tt>1</tt> means the corresponding button is pressed.
9544 otherwise it is released.
9545 </desc>
9546 </param>
9547 </method>
9548
9549 </interface>
9550
9551 <!--
9552 // IDisplay
9553 /////////////////////////////////////////////////////////////////////////
9554 -->
9555
9556 <enum
9557 name="FramebufferAccelerationOperation"
9558 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9559 >
9560 <desc>
9561 Frame buffer acceleration operation.
9562 </desc>
9563
9564 <const name="SolidFillAcceleration" value="1"/>
9565 <const name="ScreenCopyAcceleration" value="2"/>
9566 </enum>
9567
9568 <enum
9569 name="FramebufferPixelFormat"
9570 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
9571 >
9572 <desc>
9573 Format of the video memory buffer. Constants represented by this enum can
9574 be used to test for particular values of <link
9575 to="IFramebuffer::pixelFormat"/>. See also <link
9576 to="IFramebuffer::requestResize()"/>.
9577
9578 See also www.fourcc.org for more information about FOURCC pixel formats.
9579 </desc>
9580
9581 <const name="Opaque" value="0">
9582 <desc>
9583 Unknown buffer format (the user may not assume any particular format of
9584 the buffer).
9585 </desc>
9586 </const>
9587 <const name="FOURCC_RGB" value="0x32424752">
9588 <desc>
9589 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9590 bit layout).
9591 </desc>
9592 </const>
9593 </enum>
9594
9595 <interface
9596 name="IFramebuffer" extends="$unknown"
9597 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9598 wsmap="suppress"
9599 >
9600 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9601 <desc>Address of the start byte of the frame buffer.</desc>
9602 </attribute>
9603
9604 <attribute name="width" type="unsigned long" readonly="yes">
9605 <desc>Frame buffer width, in pixels.</desc>
9606 </attribute>
9607
9608 <attribute name="height" type="unsigned long" readonly="yes">
9609 <desc>Frame buffer height, in pixels.</desc>
9610 </attribute>
9611
9612 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9613 <desc>
9614 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9615 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9616 are: 8, 15, 16, 24 and 32.
9617 </desc>
9618 </attribute>
9619
9620 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9621 <desc>
9622 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9623 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9624 size of the scan line must be aligned to 32 bits.
9625 </desc>
9626 </attribute>
9627
9628 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9629 <desc>
9630 Frame buffer pixel format. It's either one of the values defined by <link
9631 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9632 <note>
9633 This attribute must never return <link
9634 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9635 <link to="#address"/> points to must be always known.
9636 </note>
9637 </desc>
9638 </attribute>
9639
9640 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9641 <desc>
9642 Defines whether this frame buffer uses the virtual video card's memory
9643 buffer (guest VRAM) directly or not. See <link
9644 to="IFramebuffer::requestResize()"/> for more information.
9645 </desc>
9646 </attribute>
9647
9648 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9649 <desc>
9650 Hint from the frame buffer about how much of the standard
9651 screen height it wants to use for itself. This information is
9652 exposed to the guest through the VESA BIOS and VMMDev interface
9653 so that it can use it for determining its video mode table. It
9654 is not guaranteed that the guest respects the value.
9655 </desc>
9656 </attribute>
9657
9658 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9659 <desc>
9660 An alpha-blended overlay which is superposed over the frame buffer.
9661 The initial purpose is to allow the display of icons providing
9662 information about the VM state, including disk activity, in front
9663 ends which do not have other means of doing that. The overlay is
9664 designed to controlled exclusively by IDisplay. It has no locking
9665 of its own, and any changes made to it are not guaranteed to be
9666 visible until the affected portion of IFramebuffer is updated. The
9667 overlay can be created lazily the first time it is requested. This
9668 attribute can also return NULL to signal that the overlay is not
9669 implemented.
9670 </desc>
9671 </attribute>
9672
9673 <attribute name="winId" type="unsigned long long" readonly="yes">
9674 <desc>
9675 Platform-dependent identifier of the window where context of this
9676 frame buffer is drawn, or zero if there's no such window.
9677 </desc>
9678 </attribute>
9679
9680 <method name="lock">
9681 <desc>
9682 Locks the frame buffer.
9683 Gets called by the IDisplay object where this frame buffer is
9684 bound to.
9685 </desc>
9686 </method>
9687
9688 <method name="unlock">
9689 <desc>
9690 Unlocks the frame buffer.
9691 Gets called by the IDisplay object where this frame buffer is
9692 bound to.
9693 </desc>
9694 </method>
9695
9696 <method name="notifyUpdate">
9697 <desc>
9698 Informs about an update.
9699 Gets called by the display object where this buffer is
9700 registered.
9701 </desc>
9702 <param name="x" type="unsigned long" dir="in"/>
9703 <param name="y" type="unsigned long" dir="in"/>
9704 <param name="width" type="unsigned long" dir="in"/>
9705 <param name="height" type="unsigned long" dir="in"/>
9706 <param name="finished" type="boolean" dir="return"/>
9707 </method>
9708
9709 <method name="requestResize">
9710 <desc>
9711 Requests a size and pixel format change.
9712
9713 There are two modes of working with the video buffer of the virtual
9714 machine. The <i>indirect</i> mode implies that the IFramebuffer
9715 implementation allocates a memory buffer for the requested display mode
9716 and provides it to the virtual machine. In <i>direct</i> mode, the
9717 IFramebuffer implementation uses the memory buffer allocated and owned
9718 by the virtual machine. This buffer represents the video memory of the
9719 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9720 usually faster because the implementation gets a raw pointer to the
9721 guest VRAM buffer which it can directly use for visualizing the contents
9722 of the virtual display, as opposed to the indirect mode where the
9723 contents of guest VRAM are copied to the memory buffer provided by
9724 the implementation every time a display update occurs.
9725
9726 It is important to note that the direct mode is really fast only when
9727 the implementation uses the given guest VRAM buffer directly, for
9728 example, by blitting it to the window representing the virtual machine's
9729 display, which saves at least one copy operation comparing to the
9730 indirect mode. However, using the guest VRAM buffer directly is not
9731 always possible: the format and the color depth of this buffer may be
9732 not supported by the target window, or it may be unknown (opaque) as in
9733 case of text or non-linear multi-plane VGA video modes. In this case,
9734 the indirect mode (that is always available) should be used as a
9735 fallback: when the guest VRAM contents are copied to the
9736 implementation-provided memory buffer, color and format conversion is
9737 done automatically by the underlying code.
9738
9739 The @a pixelFormat parameter defines whether the direct mode is
9740 available or not. If @a pixelFormat is <link
9741 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9742 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9743 bytesPerLine parameters must be ignored and the implementation must use
9744 the indirect mode (where it provides its own buffer in one of the
9745 supported formats). In all other cases, @a pixelFormat together with @a
9746 bitsPerPixel and @a bytesPerLine define the format of the video memory
9747 buffer pointed to by the @a VRAM parameter and the implementation is
9748 free to choose which mode to use. To indicate that this frame buffer uses
9749 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9750 attribute must return <tt>true</tt> and <link to="#address"/> must
9751 return exactly the same address that is passed in the @a VRAM parameter
9752 of this method; otherwise it is assumed that the indirect strategy is
9753 chosen.
9754
9755 The @a width and @a height parameters represent the size of the
9756 requested display mode in both modes. In case of indirect mode, the
9757 provided memory buffer should be big enough to store data of the given
9758 display mode. In case of direct mode, it is guaranteed that the given @a
9759 VRAM buffer contains enough space to represent the display mode of the
9760 given size. Note that this frame buffer's <link to="#width"/> and <link
9761 to="#height"/> attributes must return exactly the same values as
9762 passed to this method after the resize is completed (see below).
9763
9764 The @a finished output parameter determines if the implementation has
9765 finished resizing the frame buffer or not. If, for some reason, the
9766 resize cannot be finished immediately during this call, @a finished
9767 must be set to @c false, and the implementation must call
9768 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9769 this method as soon as possible. If @a finished is @c false, the
9770 machine will not call any frame buffer methods until
9771 <link to="IDisplay::resizeCompleted()"/> is called.
9772
9773 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9774 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9775 this frame buffer must return exactly the same values as specified in the
9776 parameters of this method, after the resize is completed. If the
9777 indirect mode is chosen, these attributes must return values describing
9778 the format of the implementation's own memory buffer <link
9779 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9780 value must always correlate with <link to="#pixelFormat"/>. Note that
9781 the <link to="#pixelFormat"/> attribute must never return <link
9782 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9783
9784 <note>
9785 This method is called by the IDisplay object under the
9786 <link to="#lock()"/> provided by this IFramebuffer
9787 implementation. If this method returns @c false in @a finished, then
9788 this lock is not released until
9789 <link to="IDisplay::resizeCompleted()"/> is called.
9790 </note>
9791 </desc>
9792 <param name="screenId" type="unsigned long" dir="in">
9793 <desc>
9794 Logical screen number. Must be used in the corresponding call to
9795 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9796 </desc>
9797 </param>
9798 <param name="pixelFormat" type="unsigned long" dir="in">
9799 <desc>
9800 Pixel format of the memory buffer pointed to by @a VRAM.
9801 See also <link to="FramebufferPixelFormat"/>.
9802 </desc>
9803 </param>
9804 <param name="VRAM" type="octet" mod="ptr" dir="in">
9805 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9806 </param>
9807 <param name="bitsPerPixel" type="unsigned long" dir="in">
9808 <desc>Color depth, bits per pixel.</desc>
9809 </param>
9810 <param name="bytesPerLine" type="unsigned long" dir="in">
9811 <desc>Size of one scan line, in bytes.</desc>
9812 </param>
9813 <param name="width" type="unsigned long" dir="in">
9814 <desc>Width of the guest display, in pixels.</desc>
9815 </param>
9816 <param name="height" type="unsigned long" dir="in">
9817 <desc>Height of the guest display, in pixels.</desc>
9818 </param>
9819 <param name="finished" type="boolean" dir="return">
9820 <desc>
9821 Can the VM start using the new frame buffer immediately
9822 after this method returns or it should wait for
9823 <link to="IDisplay::resizeCompleted()"/>.
9824 </desc>
9825 </param>
9826 </method>
9827
9828 <method name="operationSupported">
9829 <desc>
9830 Returns whether the given acceleration operation is supported
9831 by the IFramebuffer implementation. If not, the display object
9832 will not attempt to call the corresponding IFramebuffer entry
9833 point. Even if an operation is indicated as supported, the
9834 IFramebuffer implementation always has the option to return non
9835 supported from the corresponding acceleration method in which
9836 case the operation will be performed by the display engine. This
9837 allows for reduced IFramebuffer implementation complexity where
9838 only common cases are handled.
9839 </desc>
9840 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9841 <param name="supported" type="boolean" dir="return"/>
9842 </method>
9843
9844 <method name="videoModeSupported">
9845 <desc>
9846 Returns whether the frame buffer implementation is willing to
9847 support a given video mode. In case it is not able to render
9848 the video mode (or for some reason not willing), it should
9849 return false. Usually this method is called when the guest
9850 asks the VMM device whether a given video mode is supported
9851 so the information returned is directly exposed to the guest.
9852 It is important that this method returns very quickly.
9853 </desc>
9854 <param name="width" type="unsigned long" dir="in"/>
9855 <param name="height" type="unsigned long" dir="in"/>
9856 <param name="bpp" type="unsigned long" dir="in"/>
9857 <param name="supported" type="boolean" dir="return"/>
9858 </method>
9859
9860 <method name="solidFill">
9861 <desc>
9862 Fills the specified rectangle on screen with a solid color.
9863 </desc>
9864 <param name="x" type="unsigned long" dir="in"/>
9865 <param name="y" type="unsigned long" dir="in"/>
9866 <param name="width" type="unsigned long" dir="in"/>
9867 <param name="height" type="unsigned long" dir="in"/>
9868 <param name="color" type="unsigned long" dir="in"/>
9869 <param name="handled" type="boolean" dir="return"/>
9870 </method>
9871
9872 <method name="copyScreenBits">
9873 <desc>
9874 Copies specified rectangle on the screen.
9875 </desc>
9876 <param name="xDst" type="unsigned long" dir="in"/>
9877 <param name="yDst" type="unsigned long" dir="in"/>
9878 <param name="xSrc" type="unsigned long" dir="in"/>
9879 <param name="ySrc" type="unsigned long" dir="in"/>
9880 <param name="width" type="unsigned long" dir="in"/>
9881 <param name="height" type="unsigned long" dir="in"/>
9882 <param name="handled" type="boolean" dir="return"/>
9883 </method>
9884
9885 <method name="getVisibleRegion">
9886 <desc>
9887 Returns the visible region of this frame buffer.
9888
9889 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9890 @a count parameter is ignored and the number of elements necessary to
9891 describe the current visible region is returned in @a countCopied.
9892
9893 If @a rectangles is not <tt>NULL</tt> but @a count is less
9894 than the required number of elements to store region data, the method
9895 will report a failure. If @a count is equal or greater than the
9896 required number of elements, then the actual number of elements copied
9897 to the provided array will be returned in @a countCopied.
9898
9899 <note>
9900 The address of the provided array must be in the process space of
9901 this IFramebuffer object.
9902 </note>
9903 <note>
9904 Method not yet implemented.
9905 </note>
9906 </desc>
9907 <param name="rectangles" type="octet" mod="ptr" dir="in">
9908 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9909 </param>
9910 <param name="count" type="unsigned long" dir="in">
9911 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9912 </param>
9913 <param name="countCopied" type="unsigned long" dir="return">
9914 <desc>Number of elements copied to the @a rectangles array.</desc>
9915 </param>
9916 </method>
9917
9918 <method name="setVisibleRegion">
9919 <desc>
9920 Suggests a new visible region to this frame buffer. This region
9921 represents the area of the VM display which is a union of regions of
9922 all top-level windows of the guest operating system running inside the
9923 VM (if the Guest Additions for this system support this
9924 functionality). This information may be used by the frontends to
9925 implement the seamless desktop integration feature.
9926
9927 <note>
9928 The address of the provided array must be in the process space of
9929 this IFramebuffer object.
9930 </note>
9931 <note>
9932 The IFramebuffer implementation must make a copy of the provided
9933 array of rectangles.
9934 </note>
9935 <note>
9936 Method not yet implemented.
9937 </note>
9938 </desc>
9939 <param name="rectangles" type="octet" mod="ptr" dir="in">
9940 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9941 </param>
9942 <param name="count" type="unsigned long" dir="in">
9943 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9944 </param>
9945 </method>
9946
9947 </interface>
9948
9949 <interface
9950 name="IFramebufferOverlay" extends="IFramebuffer"
9951 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9952 wsmap="suppress"
9953 >
9954 <desc>
9955 The IFramebufferOverlay interface represents an alpha blended overlay
9956 for displaying status icons above an IFramebuffer. It is always created
9957 not visible, so that it must be explicitly shown. It only covers a
9958 portion of the IFramebuffer, determined by its width, height and
9959 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9960 that order) format, and may be written to directly. Do re-read the
9961 width though, after setting it, as it may be adjusted (increased) to
9962 make it more suitable for the front end.
9963 </desc>
9964 <attribute name="x" type="unsigned long" readonly="yes">
9965 <desc>X position of the overlay, relative to the frame buffer.</desc>
9966 </attribute>
9967
9968 <attribute name="y" type="unsigned long" readonly="yes">
9969 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9970 </attribute>
9971
9972 <attribute name="visible" type="boolean" readonly="no">
9973 <desc>
9974 Whether the overlay is currently visible.
9975 </desc>
9976 </attribute>
9977
9978 <attribute name="alpha" type="unsigned long" readonly="no">
9979 <desc>
9980 The global alpha value for the overlay. This may or may not be
9981 supported by a given front end.
9982 </desc>
9983 </attribute>
9984
9985 <method name="move">
9986 <desc>
9987 Changes the overlay's position relative to the IFramebuffer.
9988 </desc>
9989 <param name="x" type="unsigned long" dir="in"/>
9990 <param name="y" type="unsigned long" dir="in"/>
9991 </method>
9992
9993 </interface>
9994
9995 <interface
9996 name="IDisplay" extends="$unknown"
9997 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
9998 wsmap="suppress"
9999 >
10000 <desc>
10001 The IDisplay interface represents the virtual machine's display.
10002
10003 The object implementing this interface is contained in each
10004 <link to="IConsole::display"/> attribute and represents the visual
10005 output of the virtual machine.
10006
10007 The virtual display supports pluggable output targets represented by the
10008 IFramebuffer interface. Examples of the output target are a window on
10009 the host computer or an RDP session's display on a remote computer.
10010 </desc>
10011 <attribute name="width" type="unsigned long" readonly="yes">
10012 <desc>Current display width.</desc>
10013 </attribute>
10014
10015 <attribute name="height" type="unsigned long" readonly="yes">
10016 <desc>Current display height.</desc>
10017 </attribute>
10018
10019 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10020 <desc>
10021 Current guest display color depth. Note that this may differ
10022 from <link to="IFramebuffer::bitsPerPixel"/>.
10023 </desc>
10024 </attribute>
10025
10026 <method name="setupInternalFramebuffer">
10027 <desc>
10028 Prepares an internally managed frame buffer.
10029 </desc>
10030 <param name="depth" type="unsigned long" dir="in"/>
10031 </method>
10032
10033 <method name="lockFramebuffer">
10034 <desc>
10035 Requests access to the internal frame buffer.
10036
10037 <result name="VBOX_E_NOT_SUPPORTED">
10038 Attempt to lock a non-internal frame buffer.
10039 </result>
10040
10041 </desc>
10042 <param name="address" type="octet" mod="ptr" dir="return"/>
10043 </method>
10044
10045 <method name="unlockFramebuffer">
10046 <desc>
10047 Releases access to the internal frame buffer.
10048
10049 <result name="VBOX_E_NOT_SUPPORTED">
10050 Attempt to unlock a non-internal frame buffer.
10051 </result>
10052
10053 </desc>
10054 </method>
10055
10056 <method name="registerExternalFramebuffer">
10057 <desc>
10058 Registers an external frame buffer.
10059 </desc>
10060 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10061 </method>
10062
10063 <method name="setFramebuffer">
10064 <desc>
10065 Sets the framebuffer for given screen.
10066 </desc>
10067 <param name="screenId" type="unsigned long" dir="in"/>
10068 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10069 </method>
10070
10071 <method name="getFramebuffer">
10072 <desc>
10073 Queries the framebuffer for given screen.
10074 </desc>
10075 <param name="screenId" type="unsigned long" dir="in"/>
10076 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10077 <param name="xOrigin" type="long" dir="out"/>
10078 <param name="yOrigin" type="long" dir="out"/>
10079 </method>
10080
10081 <method name="setVideoModeHint">
10082 <desc>
10083 Asks VirtualBox to request the given video mode from
10084 the guest. This is just a hint and it cannot be guaranteed
10085 that the requested resolution will be used. Guest Additions
10086 are required for the request to be seen by guests. The caller
10087 should issue the request and wait for a resolution change and
10088 after a timeout retry.
10089
10090 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10091 parameters means that the corresponding values should be taken from the
10092 current video mode (i.e. left unchanged).
10093
10094 If the guest OS supports multi-monitor configuration then the @a display
10095 parameter specifies the number of the guest display to send the hint to:
10096 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10097 so on. If the multi-monitor configuration is not supported, @a display
10098 must be <tt>0</tt>.
10099
10100 <result name="E_INVALIDARG">
10101 The @a display is not associated with any monitor.
10102 </result>
10103
10104 </desc>
10105 <param name="width" type="unsigned long" dir="in"/>
10106 <param name="height" type="unsigned long" dir="in"/>
10107 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10108 <param name="display" type="unsigned long" dir="in"/>
10109 </method>
10110
10111 <method name="setSeamlessMode">
10112 <desc>
10113 Enables or disables seamless guest display rendering (seamless desktop
10114 integration) mode.
10115 <note>
10116 Calling this method has no effect if <link
10117 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10118 </note>
10119 </desc>
10120 <param name="enabled" type="boolean" dir="in"/>
10121 </method>
10122
10123 <method name="takeScreenShot">
10124 <desc>
10125 Takes a screen shot of the requested size and copies it to the
10126 32-bpp buffer allocated by the caller.
10127
10128 <result name="E_NOTIMPL">
10129 Feature not implemented.
10130 </result>
10131 <result name="VBOX_E_IPRT_ERROR">
10132 Could not take a screenshot.
10133 </result>
10134
10135 </desc>
10136 <param name="address" type="octet" mod="ptr" dir="in"/>
10137 <param name="width" type="unsigned long" dir="in"/>
10138 <param name="height" type="unsigned long" dir="in"/>
10139 </method>
10140
10141 <method name="drawToScreen">
10142 <desc>
10143 Draws a 32-bpp image of the specified size from the given buffer
10144 to the given point on the VM display.
10145
10146 <result name="E_NOTIMPL">
10147 Feature not implemented.
10148 </result>
10149 <result name="VBOX_E_IPRT_ERROR">
10150 Could not draw to screen.
10151 </result>
10152
10153 </desc>
10154 <param name="address" type="octet" mod="ptr" dir="in"/>
10155 <param name="x" type="unsigned long" dir="in"/>
10156 <param name="y" type="unsigned long" dir="in"/>
10157 <param name="width" type="unsigned long" dir="in"/>
10158 <param name="height" type="unsigned long" dir="in"/>
10159 </method>
10160
10161 <method name="invalidateAndUpdate">
10162 <desc>
10163 Does a full invalidation of the VM display and instructs the VM
10164 to update it.
10165
10166 <result name="VBOX_E_IPRT_ERROR">
10167 Could not invalidate and update screen.
10168 </result>
10169
10170 </desc>
10171 </method>
10172
10173 <method name="resizeCompleted">
10174 <desc>
10175 Signals that a framebuffer has completed the resize operation.
10176
10177 <result name="VBOX_E_NOT_SUPPORTED">
10178 Operation only valid for external frame buffers.
10179 </result>
10180
10181 </desc>
10182 <param name="screenId" type="unsigned long" dir="in"/>
10183 </method>
10184
10185 <method name="updateCompleted">
10186 <desc>
10187 Signals that a framebuffer has completed the update operation.
10188
10189 <result name="VBOX_E_NOT_SUPPORTED">
10190 Operation only valid for external frame buffers.
10191 </result>
10192
10193 </desc>
10194 </method>
10195
10196 </interface>
10197
10198 <!--
10199 // INetworkAdapter
10200 /////////////////////////////////////////////////////////////////////////
10201 -->
10202
10203 <enum
10204 name="NetworkAttachmentType"
10205 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
10206 >
10207 <desc>
10208 Network attachment type.
10209 </desc>
10210
10211 <const name="Null" value="0">
10212 <desc>Null value, also means "not attached".</desc>
10213 </const>
10214 <const name="NAT" value="1"/>
10215 <const name="HostInterface" value="2"/>
10216 <const name="Internal" value="3"/>
10217 </enum>
10218
10219 <enum
10220 name="NetworkAdapterType"
10221 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10222 >
10223 <desc>
10224 Network adapter type.
10225 </desc>
10226
10227 <const name="Null" value="0">
10228 <desc>Null value (never used by the API).</desc>
10229 </const>
10230 <const name="Am79C970A" value="1"/>
10231 <const name="Am79C973" value="2"/>
10232 <const name="I82540EM" value="3"/>
10233 <const name="I82543GC" value="4"/>
10234 </enum>
10235
10236 <interface
10237 name="INetworkAdapter" extends="$unknown"
10238 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
10239 wsmap="managed"
10240 >
10241 <attribute name="adapterType" type="NetworkAdapterType">
10242 <desc>
10243 Type of the virtual network adapter. Depending on this value,
10244 VirtualBox will provide a different virtual network hardware
10245 to the guest.
10246 </desc>
10247 </attribute>
10248
10249 <attribute name="slot" type="unsigned long" readonly="yes">
10250 <desc>
10251 Slot number this adapter is plugged into. Corresponds to
10252 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10253 to obtain this instance.
10254 </desc>
10255 </attribute>
10256
10257 <attribute name="enabled" type="boolean">
10258 <desc>
10259 Flag whether the network adapter is present in the
10260 guest system. If disabled, the virtual guest hardware will
10261 not contain this network adapter. Can only be changed when
10262 the VM is not running.
10263 </desc>
10264 </attribute>
10265
10266 <attribute name="MACAddress" type="wstring">
10267 <desc>
10268 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10269 it to NULL, VirtualBox will generate a unique MAC address.
10270 </desc>
10271 </attribute>
10272
10273 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10274
10275 <attribute name="hostInterface" type="wstring">
10276 <desc>
10277 Name of the host network interface the VM is attached to.
10278 </desc>
10279 </attribute>
10280
10281 <attribute name="internalNetwork" type="wstring">
10282 <desc>
10283 Name of the internal network the VM is attached to.
10284 </desc>
10285 </attribute>
10286
10287 <attribute name="NATNetwork" type="wstring">
10288 <desc>
10289 Name of the NAT network the VM is attached to.
10290 </desc>
10291 </attribute>
10292
10293 <attribute name="cableConnected" type="boolean">
10294 <desc>
10295 Flag whether the adapter reports the cable as connected or not.
10296 It can be used to report offline situations to a VM.
10297 </desc>
10298 </attribute>
10299
10300 <attribute name="lineSpeed" type="unsigned long">
10301 <desc>
10302 Line speed reported by custom drivers, in units of 1 kbps.
10303 </desc>
10304 </attribute>
10305
10306 <attribute name="traceEnabled" type="boolean">
10307 <desc>
10308 Flag whether network traffic from/to the network card should be traced.
10309 Can only be toggled when the VM is turned off.
10310 </desc>
10311 </attribute>
10312
10313 <attribute name="traceFile" type="wstring">
10314 <desc>
10315 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10316 will be used.
10317 </desc>
10318 </attribute>
10319
10320 <method name="attachToNAT">
10321 <desc>
10322 Attach the network adapter to the Network Address Translation (NAT) interface.
10323 </desc>
10324 </method>
10325
10326 <method name="attachToHostInterface">
10327 <desc>
10328 Attach the network adapter to a host interface.
10329 </desc>
10330 </method>
10331
10332 <method name="attachToInternalNetwork">
10333 <desc>
10334 Attach the network adapter to an internal network.
10335 </desc>
10336 </method>
10337
10338 <method name="detach">
10339 <desc>
10340 Detach the network adapter
10341 </desc>
10342 </method>
10343 </interface>
10344
10345
10346 <!--
10347 // ISerialPort
10348 /////////////////////////////////////////////////////////////////////////
10349 -->
10350
10351 <enum
10352 name="PortMode"
10353 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10354 >
10355 <desc>
10356 The PortMode enumeration represents possible communication modes for
10357 the virtual serial port device.
10358 </desc>
10359
10360 <const name="Disconnected" value="0">
10361 <desc>Virtual device is not attached to any real host device.</desc>
10362 </const>
10363 <const name="HostPipe" value="1">
10364 <desc>Virtual device is attached to a host pipe.</desc>
10365 </const>
10366 <const name="HostDevice" value="2">
10367 <desc>Virtual device is attached to a host device.</desc>
10368 </const>
10369 </enum>
10370
10371 <interface
10372 name="ISerialPort" extends="$unknown"
10373 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10374 wsmap="managed"
10375 >
10376
10377 <desc>
10378 The ISerialPort interface represents the virtual serial port device.
10379
10380 The virtual serial port device acts like an ordinary serial port
10381 inside the virtual machine. This device communicates to the real
10382 serial port hardware in one of two modes: host pipe or host device.
10383
10384 In host pipe mode, the #path attribute specifies the path to the pipe on
10385 the host computer that represents a serial port. The #server attribute
10386 determines if this pipe is created by the virtual machine process at
10387 machine startup or it must already exist before starting machine
10388 execution.
10389
10390 In host device mode, the #path attribute specifies the name of the
10391 serial port device on the host computer.
10392
10393 There is also a third communication mode: the disconnected mode. In this
10394 mode, the guest OS running inside the virtual machine will be able to
10395 detect the serial port, but all port write operations will be discarded
10396 and all port read operations will return no data.
10397
10398 <see>IMachine::getSerialPort</see>
10399 </desc>
10400
10401 <attribute name="slot" type="unsigned long" readonly="yes">
10402 <desc>
10403 Slot number this serial port is plugged into. Corresponds to
10404 the value you pass to <link to="IMachine::getSerialPort"/>
10405 to obtain this instance.
10406 </desc>
10407 </attribute>
10408
10409 <attribute name="enabled" type="boolean">
10410 <desc>
10411 Flag whether the serial port is enabled. If disabled,
10412 the serial port will not be reported to the guest OS.
10413 </desc>
10414 </attribute>
10415
10416 <attribute name="IOBase" type="unsigned long">
10417 <desc>Base I/O address of the serial port.</desc>
10418 </attribute>
10419
10420 <attribute name="IRQ" type="unsigned long">
10421 <desc>IRQ number of the serial port.</desc>
10422 </attribute>
10423
10424 <attribute name="hostMode" type="PortMode">
10425 <desc>
10426 How is this port connected to the host.
10427 <note>
10428 Changing this attribute may fail if the conditions for
10429 <link to="#path"/> are not met.
10430 </note>
10431 </desc>
10432 </attribute>
10433
10434 <attribute name="server" type="boolean">
10435 <desc>
10436 Flag whether this serial port acts as a server (creates a new pipe on
10437 the host) or as a client (uses the existing pipe). This attribute is
10438 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10439 </desc>
10440 </attribute>
10441
10442 <attribute name="path" type="wstring">
10443 <desc>
10444 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
10445 PortMode_HostPipe, or the host serial device name when
10446 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
10447 cases, setting a @c null or an empty string as the attribute's value
10448 will result into an error. Otherwise, the value of this property is
10449 ignored.
10450 </desc>
10451 </attribute>
10452
10453 </interface>
10454
10455 <!--
10456 // IParallelPort
10457 /////////////////////////////////////////////////////////////////////////
10458 -->
10459
10460 <interface
10461 name="IParallelPort" extends="$unknown"
10462 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10463 wsmap="managed"
10464 >
10465
10466 <desc>
10467 The IParallelPort interface represents the virtual parallel port device.
10468
10469 The virtual parallel port device acts like an ordinary parallel port
10470 inside the virtual machine. This device communicates to the real
10471 parallel port hardware using the name of the parallel device on the host
10472 computer specified in the #path attribute.
10473
10474 Each virtual parallel port device is assigned a base I/O address and an
10475 IRQ number that will be reported to the guest operating system and used
10476 to operate the given parallel port from within the virtual machine.
10477
10478 <see>IMachine::getParallelPort</see>
10479 </desc>
10480
10481 <attribute name="slot" type="unsigned long" readonly="yes">
10482 <desc>
10483 Slot number this parallel port is plugged into. Corresponds to
10484 the value you pass to <link to="IMachine::getParallelPort"/>
10485 to obtain this instance.
10486 </desc>
10487 </attribute>
10488
10489 <attribute name="enabled" type="boolean">
10490 <desc>
10491 Flag whether the parallel port is enabled. If disabled,
10492 the parallel port will not be reported to the guest OS.
10493 </desc>
10494 </attribute>
10495
10496 <attribute name="IOBase" type="unsigned long">
10497 <desc>Base I/O address of the parallel port.</desc>
10498 </attribute>
10499
10500 <attribute name="IRQ" type="unsigned long">
10501 <desc>IRQ number of the parallel port.</desc>
10502 </attribute>
10503
10504 <attribute name="path" type="wstring">
10505 <desc>
10506 Host parallel device name. If this parallel port is enabled, setting a
10507 @c null or an empty string as this attribute's value will result into
10508 an error.
10509 </desc>
10510 </attribute>
10511
10512 </interface>
10513
10514
10515 <!--
10516 // IMachineDebugger
10517 /////////////////////////////////////////////////////////////////////////
10518 -->
10519
10520 <interface
10521 name="IMachineDebugger" extends="$unknown"
10522 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10523 wsmap="suppress"
10524 >
10525 <method name="resetStats">
10526 <desc>
10527 Reset VM statistics.
10528 </desc>
10529 <param name="pattern" type="wstring" dir="in">
10530 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10531 </param>
10532 </method>
10533
10534 <method name="dumpStats">
10535 <desc>
10536 Dumps VM statistics.
10537 </desc>
10538 <param name="pattern" type="wstring" dir="in">
10539 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10540 </param>
10541 </method>
10542
10543 <method name="getStats">
10544 <desc>
10545 Get the VM statistics in a XMLish format.
10546 </desc>
10547 <param name="pattern" type="wstring" dir="in">
10548 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10549 </param>
10550 <param name="withDescriptions" type="boolean" dir="in">
10551 <desc>Whether to include the descriptions.</desc>
10552 </param>
10553 <param name="stats" type="wstring" dir="out">
10554 <desc>The XML document containing the statistics.</desc>
10555 </param>
10556 </method>
10557
10558 <method name="injectNMI">
10559 <desc>
10560 Inject an NMI into a running VT-x/AMD-V VM.
10561 </desc>
10562 </method>
10563
10564 <attribute name="singlestep" type="boolean">
10565 <desc>Switch for enabling singlestepping.</desc>
10566 </attribute>
10567
10568 <attribute name="recompileUser" type="boolean">
10569 <desc>Switch for forcing code recompilation for user mode code.</desc>
10570 </attribute>
10571
10572 <attribute name="recompileSupervisor" type="boolean">
10573 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10574 </attribute>
10575
10576 <attribute name="PATMEnabled" type="boolean">
10577 <desc>Switch for enabling and disabling the PATM component.</desc>
10578 </attribute>
10579
10580 <attribute name="CSAMEnabled" type="boolean">
10581 <desc>Switch for enabling and disabling the CSAM component.</desc>
10582 </attribute>
10583
10584 <attribute name="logEnabled" type="boolean">
10585 <desc>Switch for enabling and disabling logging.</desc>
10586 </attribute>
10587
10588 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10589 <desc>
10590 Flag indicating whether the VM is currently making use of CPU hardware
10591 virtualization extensions.
10592 </desc>
10593 </attribute>
10594
10595 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10596 <desc>
10597 Flag indicating whether the VM is currently making use of the nested paging
10598 CPU hardware virtualization extension.
10599 </desc>
10600 </attribute>
10601
10602 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10603 <desc>
10604 Flag indicating whether the VM is currently making use of the VPID
10605 VT-x extension.
10606 </desc>
10607 </attribute>
10608
10609 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10610 <desc>
10611 Flag indicating whether the VM is currently making use of the Physical
10612 Address Extension CPU feature.
10613 </desc>
10614 </attribute>
10615
10616 <attribute name="virtualTimeRate" type="unsigned long">
10617 <desc>
10618 The rate at which the virtual time runs expressed as a percentage.
10619 The accepted range is 2% to 20000%.
10620 </desc>
10621 </attribute>
10622
10623 <!-- @todo method for setting log flags, groups and destination! -->
10624
10625 <attribute name="VM" type="unsigned long long" readonly="yes">
10626 <desc>
10627 Gets the VM handle. This is only for internal use while
10628 we carve the details of this interface.
10629 </desc>
10630 </attribute>
10631
10632 </interface>
10633
10634 <!--
10635 // IUSBController
10636 /////////////////////////////////////////////////////////////////////////
10637 -->
10638
10639 <interface
10640 name="IUSBController" extends="$unknown"
10641 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10642 wsmap="managed"
10643 >
10644 <attribute name="enabled" type="boolean">
10645 <desc>
10646 Flag whether the USB controller is present in the
10647 guest system. If disabled, the virtual guest hardware will
10648 not contain any USB controller. Can only be changed when
10649 the VM is powered off.
10650 </desc>
10651 </attribute>
10652
10653 <attribute name="enabledEhci" type="boolean">
10654 <desc>
10655 Flag whether the USB EHCI controller is present in the
10656 guest system. If disabled, the virtual guest hardware will
10657 not contain a USB EHCI controller. Can only be changed when
10658 the VM is powered off.
10659 </desc>
10660 </attribute>
10661
10662 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10663 <desc>
10664 USB standard version which the controller implements.
10665 This is a BCD which means that the major version is in the
10666 high byte and minor version is in the low byte.
10667 </desc>
10668 </attribute>
10669
10670 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10671 <desc>
10672 List of USB device filters associated with the machine.
10673
10674 If the machine is currently running, these filters are activated
10675 every time a new (supported) USB device is attached to the host
10676 computer that was not ignored by global filters
10677 (<link to="IHost::USBDeviceFilters"/>).
10678
10679 These filters are also activated when the machine is powered up.
10680 They are run against a list of all currently available USB
10681 devices (in states
10682 <link to="USBDeviceState_Available"/>,
10683 <link to="USBDeviceState_Busy"/>,
10684 <link to="USBDeviceState_Held"/>) that were not previously
10685 ignored by global filters.
10686
10687 If at least one filter matches the USB device in question, this
10688 device is automatically captured (attached to) the virtual USB
10689 controller of this machine.
10690
10691 <see>IUSBDeviceFilter, ::IUSBController</see>
10692 </desc>
10693 </attribute>
10694
10695 <method name="createDeviceFilter">
10696 <desc>
10697 Creates a new USB device filter. All attributes except
10698 the filter name are set to <tt>null</tt> (any match),
10699 <i>active</i> is <tt>false</tt> (the filter is not active).
10700
10701 The created filter can then be added to the list of filters using
10702 <link to="#insertDeviceFilter()"/>.
10703
10704 <result name="VBOX_E_INVALID_VM_STATE">
10705 The virtual machine is not mutable.
10706 </result>
10707
10708 <see>#deviceFilters</see>
10709 </desc>
10710 <param name="name" type="wstring" dir="in">
10711 <desc>
10712 Filter name. See <link to="IUSBDeviceFilter::name"/>
10713 for more info.
10714 </desc>
10715 </param>
10716 <param name="filter" type="IUSBDeviceFilter" dir="return">
10717 <desc>Created filter object.</desc>
10718 </param>
10719 </method>
10720
10721 <method name="insertDeviceFilter">
10722 <desc>
10723 Inserts the given USB device to the specified position
10724 in the list of filters.
10725
10726 Positions are numbered starting from <tt>0</tt>. If the specified
10727 position is equal to or greater than the number of elements in
10728 the list, the filter is added to the end of the collection.
10729
10730 <note>
10731 Duplicates are not allowed, so an attempt to insert a
10732 filter that is already in the collection, will return an
10733 error.
10734 </note>
10735
10736 <result name="VBOX_E_INVALID_VM_STATE">
10737 Virtual machine is not mutable.
10738 </result>
10739 <result name="E_INVALIDARG">
10740 USB device filter not created within this VirtualBox instance.
10741 </result>
10742 <result name="VBOX_E_INVALID_OBJECT_STATE">
10743 USB device filter already in list.
10744 </result>
10745
10746 <see>#deviceFilters</see>
10747 </desc>
10748 <param name="position" type="unsigned long" dir="in">
10749 <desc>Position to insert the filter to.</desc>
10750 </param>
10751 <param name="filter" type="IUSBDeviceFilter" dir="in">
10752 <desc>USB device filter to insert.</desc>
10753 </param>
10754 </method>
10755
10756 <method name="removeDeviceFilter">
10757 <desc>
10758 Removes a USB device filter from the specified position in the
10759 list of filters.
10760
10761 Positions are numbered starting from <tt>0</tt>. Specifying a
10762 position equal to or greater than the number of elements in
10763 the list will produce an error.
10764
10765 <see>#deviceFilters</see>
10766
10767 <result name="VBOX_E_INVALID_VM_STATE">
10768 Virtual machine is not mutable.
10769 </result>
10770 <result name="E_INVALIDARG">
10771 USB device filter list empty or invalid @a position.
10772 </result>
10773
10774 </desc>
10775 <param name="position" type="unsigned long" dir="in">
10776 <desc>Position to remove the filter from.</desc>
10777 </param>
10778 <param name="filter" type="IUSBDeviceFilter" dir="return">
10779 <desc>Removed USB device filter.</desc>
10780 </param>
10781 </method>
10782
10783 </interface>
10784
10785
10786 <!--
10787 // IUSBDevice
10788 /////////////////////////////////////////////////////////////////////////
10789 -->
10790
10791 <enumerator
10792 name="IUSBDeviceEnumerator" type="IUSBDevice"
10793 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10794 />
10795
10796 <collection
10797 name="IUSBDeviceCollection" type="IUSBDevice"
10798 enumerator="IUSBDeviceEnumerator"
10799 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10800 readonly="yes"
10801 >
10802 <method name="findById">
10803 <desc>
10804 Searches this collection for a USB device with the given UUID.
10805 <note>
10806 The method returns an error if the given UUID does not
10807 correspond to any USB device in the collection.
10808 </note>
10809 <see>IUSBDevice::id</see>
10810 </desc>
10811 <param name="id" type="uuid" dir="in">
10812 <desc>UUID of the USB device to search for.</desc>
10813 </param>
10814 <param name="device" type="IUSBDevice" dir="return">
10815 <desc>Found USB device object.</desc>
10816 </param>
10817 </method>
10818
10819 <method name="findByAddress">
10820 <desc>
10821 Searches this collection for a USB device with the given
10822 host address.
10823 <note>
10824 The method returns an error if the given address does not
10825 correspond to any USB device in the collection.
10826 </note>
10827 <see>IUSBDevice::address</see>
10828 </desc>
10829 <param name="name" type="wstring" dir="in">
10830 <desc>
10831 Address of the USB device (as assigned by the host) to
10832 search for.
10833 </desc>
10834 </param>
10835 <param name="device" type="IUSBDevice" dir="return">
10836 <desc>Found USB device object.</desc>
10837 </param>
10838 </method>
10839
10840 </collection>
10841
10842 <interface
10843 name="IUSBDevice" extends="$unknown"
10844 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10845 wsmap="managed"
10846 >
10847 <desc>
10848 The IUSBDevice interface represents a virtual USB device attached to the
10849 virtual machine.
10850
10851 A collection of objects implementing this interface is stored in the
10852 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10853 attached to a running virtual machine's USB controller.
10854 </desc>
10855
10856 <attribute name="id" type="uuid" readonly="yes">
10857 <desc>
10858 Unique USB device ID. This ID is built from #vendorId,
10859 #productId, #revision and #serialNumber.
10860 </desc>
10861 </attribute>
10862
10863 <attribute name="vendorId" type="unsigned short" readonly="yes">
10864 <desc>Vendor ID.</desc>
10865 </attribute>
10866
10867 <attribute name="productId" type="unsigned short" readonly="yes">
10868 <desc>Product ID.</desc>
10869 </attribute>
10870
10871 <attribute name="revision" type="unsigned short" readonly="yes">
10872 <desc>
10873 Product revision number. This is a packed BCD represented as
10874 unsigned short. The high byte is the integer part and the low
10875 byte is the decimal.
10876 </desc>
10877 </attribute>
10878
10879 <attribute name="manufacturer" type="wstring" readonly="yes">
10880 <desc>Manufacturer string.</desc>
10881 </attribute>
10882
10883 <attribute name="product" type="wstring" readonly="yes">
10884 <desc>Product string.</desc>
10885 </attribute>
10886
10887 <attribute name="serialNumber" type="wstring" readonly="yes">
10888 <desc>Serial number string.</desc>
10889 </attribute>
10890
10891 <attribute name="address" type="wstring" readonly="yes">
10892 <desc>Host specific address of the device.</desc>
10893 </attribute>
10894
10895 <attribute name="port" type="unsigned short" readonly="yes">
10896 <desc>
10897 Host USB port number the device is physically
10898 connected to.
10899 </desc>
10900 </attribute>
10901
10902 <attribute name="version" type="unsigned short" readonly="yes">
10903 <desc>
10904 The major USB version of the device - 1 or 2.
10905 </desc>
10906 </attribute>
10907
10908 <attribute name="portVersion" type="unsigned short" readonly="yes">
10909 <desc>
10910 The major USB version of the host USB port the device is
10911 physically connected to - 1 or 2. For devices not connected to
10912 anything this will have the same value as the version attribute.
10913 </desc>
10914 </attribute>
10915
10916 <attribute name="remote" type="boolean" readonly="yes">
10917 <desc>
10918 Whether the device is physically connected to a remote VRDP
10919 client or to a local host machine.
10920 </desc>
10921 </attribute>
10922
10923 </interface>
10924
10925
10926 <!--
10927 // IUSBDeviceFilter
10928 /////////////////////////////////////////////////////////////////////////
10929 -->
10930
10931 <enumerator
10932 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10933 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10934 />
10935
10936 <collection
10937 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10938 enumerator="IUSBDeviceFilterEnumerator"
10939 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10940 readonly="yes"
10941 />
10942
10943 <interface
10944 name="IUSBDeviceFilter" extends="$unknown"
10945 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10946 wsmap="managed"
10947 >
10948 <desc>
10949 The IUSBDeviceFilter interface represents an USB device filter used
10950 to perform actions on a group of USB devices.
10951
10952 This type of filters is used by running virtual machines to
10953 automatically capture selected USB devices once they are physically
10954 attached to the host computer.
10955
10956 A USB device is matched to the given device filter if and only if all
10957 attributes of the device match the corresponding attributes of the
10958 filter (that is, attributes are joined together using the logical AND
10959 operation). On the other hand, all together, filters in the list of
10960 filters carry the semantics of the logical OR operation. So if it is
10961 desirable to create a match like "this vendor id OR this product id",
10962 one needs to create two filters and specify "any match" (see below)
10963 for unused attributes.
10964
10965 All filter attributes used for matching are strings. Each string
10966 is an expression representing a set of values of the corresponding
10967 device attribute, that will match the given filter. Currently, the
10968 following filtering expressions are supported:
10969
10970 <ul>
10971 <li><i>Interval filters</i>. Used to specify valid intervals for
10972 integer device attributes (Vendor ID, Product ID and Revision).
10973 The format of the string is:
10974
10975 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
10976
10977 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
10978 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
10979 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
10980 is omitted before a dash (<tt>-</tt>), the minimum possible integer
10981 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
10982 possible integer is assumed.
10983 </li>
10984 <li><i>Boolean filters</i>. Used to specify acceptable values for
10985 boolean device attributes. The format of the string is:
10986
10987 <tt>true|false|yes|no|0|1</tt>
10988
10989 </li>
10990 <li><i>Exact match</i>. Used to specify a single value for the given
10991 device attribute. Any string that doesn't start with <tt>int:</tt>
10992 represents the exact match. String device attributes are compared to
10993 this string including case of symbols. Integer attributes are first
10994 converted to a string (see individual filter attributes) and then
10995 compared ignoring case.
10996
10997 </li>
10998 <li><i>Any match</i>. Any value of the corresponding device attribute
10999 will match the given filter. An empty or <tt>null</tt> string is
11000 used to construct this type of filtering expressions.
11001
11002 </li>
11003 </ul>
11004
11005 <note>
11006 On the Windows host platform, interval filters are not currently
11007 available. Also all string filter attributes
11008 (<link to="#manufacturer"/>, <link to="#product"/>,
11009 <link to="#serialNumber"/>) are ignored, so they behave as
11010 <i>any match</i> no matter what string expression is specified.
11011 </note>
11012
11013 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11014 </desc>
11015
11016 <attribute name="name" type="wstring">
11017 <desc>
11018 Visible name for this filter.
11019 This name is used to visually distinguish one filter from another,
11020 so it can neither be <tt>null</tt> nor an empty string.
11021 </desc>
11022 </attribute>
11023
11024 <attribute name="active" type="boolean">
11025 <desc>Whether this filter active or has been temporarily disabled.</desc>
11026 </attribute>
11027
11028 <attribute name="vendorId" type="wstring">
11029 <desc>
11030 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11031 The string representation for the <i>exact matching</i>
11032 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11033 (including leading zeroes).
11034 </desc>
11035 </attribute>
11036
11037 <attribute name="productId" type="wstring">
11038 <desc>
11039 <link to="IUSBDevice::productId">Product ID</link> filter.
11040 The string representation for the <i>exact matching</i>
11041 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11042 (including leading zeroes).
11043 </desc>
11044 </attribute>
11045
11046 <attribute name="revision" type="wstring">
11047 <desc>
11048 <link to="IUSBDevice::productId">Product revision number</link>
11049 filter. The string representation for the <i>exact matching</i>
11050 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11051 of the integer part of the revision, and <tt>F</tt> is the
11052 decimal digit of its fractional part (including leading and
11053 trailing zeros).
11054 Note that for interval filters, it's best to use the hexadecimal
11055 form, because the revision is stored as a 16 bit packed BCD value;
11056 so the expression <tt>int:0x0100-0x0199</tt> will match any
11057 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11058 </desc>
11059 </attribute>
11060
11061 <attribute name="manufacturer" type="wstring">
11062 <desc>
11063 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11064 </desc>
11065 </attribute>
11066
11067 <attribute name="product" type="wstring">
11068 <desc>
11069 <link to="IUSBDevice::product">Product</link> filter.
11070 </desc>
11071 </attribute>
11072
11073 <attribute name="serialNumber" type="wstring">
11074 <desc>
11075 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11076 </desc>
11077 </attribute>
11078
11079 <attribute name="port" type="wstring">
11080 <desc>
11081 <link to="IUSBDevice::port">Host USB port</link> filter.
11082 </desc>
11083 </attribute>
11084
11085 <attribute name="remote" type="wstring">
11086 <desc>
11087 <link to="IUSBDevice::remote">Remote state</link> filter.
11088 <note>
11089 This filter makes sense only for machine USB filters,
11090 i.e. it is ignored by IHostUSBDeviceFilter objects.
11091 </note>
11092 </desc>
11093 </attribute>
11094
11095 <attribute name="maskedInterfaces" type="unsigned long">
11096 <desc>
11097 This is an advanced option for hiding one or more USB interfaces
11098 from the guest. The value is a bit mask where the bits that are set
11099 means the corresponding USB interface should be hidden, masked off
11100 if you like.
11101 This feature only works on Linux hosts.
11102 </desc>
11103 </attribute>
11104
11105 </interface>
11106
11107
11108 <!--
11109 // IHostUSBDevice
11110 /////////////////////////////////////////////////////////////////////////
11111 -->
11112
11113 <enum
11114 name="USBDeviceState"
11115 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11116 >
11117 <desc>
11118 USB device state. This enumeration represents all possible states
11119 of the USB device physically attached to the host computer regarding
11120 its state on the host computer and availability to guest computers
11121 (all currently running virtual machines).
11122
11123 Once a supported USB device is attached to the host, global USB
11124 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11125 either ignore the device, or put it to USBDeviceState_Held state, or do
11126 nothing. Unless the device is ignored by global filters, filters of all
11127 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11128 activated that can put it to USBDeviceState_Captured state.
11129
11130 If the device was ignored by global filters, or didn't match
11131 any filters at all (including guest ones), it is handled by the host
11132 in a normal way. In this case, the device state is determined by
11133 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11134 or USBDeviceState_Available, depending on the current device usage.
11135
11136 Besides auto-capturing based on filters, the device can be manually
11137 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
11138 state is USBDeviceState_Busy, USBDeviceState_Available or
11139 USBDeviceState_Held.
11140
11141 <note>
11142 Due to differences in USB stack implementations in Linux and Win32,
11143 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11144 only to the Linux version of the product. This also means that (<link
11145 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
11146 device state is USBDeviceState_Held.
11147 </note>
11148
11149 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11150 </desc>
11151
11152 <const name="NotSupported" value="0">
11153 <desc>
11154 Not supported by the VirtualBox server, not available to guests.
11155 </desc>
11156 </const>
11157 <const name="Unavailable" value="1">
11158 <desc>
11159 Being used by the host computer exclusively,
11160 not available to guests.
11161 </desc>
11162 </const>
11163 <const name="Busy" value="2">
11164 <desc>
11165 Being used by the host computer, potentially available to guests.
11166 </desc>
11167 </const>
11168 <const name="Available" value="3">
11169 <desc>
11170 Not used by the host computer, available to guests (the host computer
11171 can also start using the device at any time).
11172 </desc>
11173 </const>
11174 <const name="Held" value="4">
11175 <desc>
11176 Held by the VirtualBox server (ignored by the host computer),
11177 available to guests.
11178 </desc>
11179 </const>
11180 <const name="Captured" value="5">
11181 <desc>
11182 Captured by one of the guest computers, not available
11183 to anybody else.
11184 </desc>
11185 </const>
11186 </enum>
11187
11188 <enumerator
11189 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
11190 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
11191 />
11192
11193 <collection
11194 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
11195 enumerator="IHostUSBDeviceEnumerator"
11196 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
11197 readonly="yes"
11198 >
11199 <method name="findById">
11200 <desc>
11201 Searches this collection for a USB device with the given UUID.
11202 <note>
11203 The method returns an error if the given UUID does not
11204 correspond to any USB device in the collection.
11205 </note>
11206 <see>IHostUSBDevice::id</see>
11207 </desc>
11208 <param name="id" type="uuid" dir="in">
11209 <desc>UUID of the USB device to search for.</desc>
11210 </param>
11211 <param name="device" type="IHostUSBDevice" dir="return">
11212 <desc>Found USB device object.</desc>
11213 </param>
11214 </method>
11215
11216 <method name="findByAddress">
11217 <desc>
11218 Searches this collection for a USB device with the given
11219 host address.
11220 <note>
11221 The method returns an error if the given address does not
11222 correspond to any USB device in the collection.
11223 </note>
11224 <see>IHostUSBDevice::address</see>
11225 </desc>
11226 <param name="name" type="wstring" dir="in">
11227 <desc>
11228 Address of the USB device (as assigned by the host) to
11229 search for.
11230 </desc>
11231 </param>
11232 <param name="device" type="IHostUSBDevice" dir="return">
11233 <desc>Found USB device object.</desc>
11234 </param>
11235 </method>
11236
11237 </collection>
11238
11239 <interface
11240 name="IHostUSBDevice" extends="IUSBDevice"
11241 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11242 wsmap="managed"
11243 >
11244 <desc>
11245 The IHostUSBDevice interface represents a physical USB device attached
11246 to the host computer.
11247
11248 Besides properties inherited from IUSBDevice, this interface adds the
11249 <link to="#state"/> property that holds the current state of the USB
11250 device.
11251
11252 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11253 </desc>
11254
11255 <attribute name="state" type="USBDeviceState" readonly="yes">
11256 <desc>
11257 Current state of the device.
11258 </desc>
11259 </attribute>
11260
11261 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11262
11263 </interface>
11264
11265
11266 <!--
11267 // IHostUSBDeviceFilter
11268 /////////////////////////////////////////////////////////////////////////
11269 -->
11270
11271 <enum
11272 name="USBDeviceFilterAction"
11273 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11274 >
11275 <desc>
11276 Actions for host USB device filters.
11277 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11278 </desc>
11279
11280 <const name="Null" value="0">
11281 <desc>Null value (never used by the API).</desc>
11282 </const>
11283 <const name="Ignore" value="1">
11284 <desc>Ignore the matched USB device.</desc>
11285 </const>
11286 <const name="Hold" value="2">
11287 <desc>Hold the matched USB device.</desc>
11288 </const>
11289 </enum>
11290
11291 <enumerator
11292 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
11293 uuid="ff735211-903e-4642-9c37-189eb44579fe"
11294 />
11295
11296 <collection
11297 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
11298 enumerator="IHostUSBDeviceFilterEnumerator"
11299 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
11300 readonly="yes"
11301 />
11302
11303 <interface
11304 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11305 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11306 wsmap="managed"
11307 >
11308 <desc>
11309 The IHostUSBDeviceFilter interface represents a global filter for a
11310 physical USB device used by the host computer. Used indirectly in
11311 <link to="IHost::USBDeviceFilters"/>.
11312
11313 Using filters of this type, the host computer determines the initial
11314 state of the USB device after it is physically attached to the
11315 host's USB controller.
11316
11317 <note>
11318 The <link to="#remote"/> attribute is ignored by this type of
11319 filters, because it makes sense only for
11320 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11321 </note>
11322
11323 <see>IHost::USBDeviceFilters</see>
11324 </desc>
11325
11326 <attribute name="action" type="USBDeviceFilterAction">
11327 <desc>
11328 Action performed by the host when an attached USB device
11329 matches this filter.
11330 </desc>
11331 </attribute>
11332
11333 </interface>
11334
11335 <!--
11336 // IAudioAdapter
11337 /////////////////////////////////////////////////////////////////////////
11338 -->
11339
11340 <enum
11341 name="AudioDriverType"
11342 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11343 >
11344 <desc>
11345 Host audio driver type.
11346 </desc>
11347
11348 <const name="Null" value="0">
11349 <desc>Null value, also means "dummy audio driver".</desc>
11350 </const>
11351 <const name="WinMM" value="1"/>
11352 <const name="OSS" value="2"/>
11353 <const name="ALSA" value="3"/>
11354 <const name="DirectSound" value="4"/>
11355 <const name="CoreAudio" value="5"/>
11356 <const name="MMPM" value="6"/>
11357 <const name="Pulse" value="7"/>
11358 <const name="SolAudio" value="8"/>
11359 </enum>
11360
11361 <enum
11362 name="AudioControllerType"
11363 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11364 >
11365 <desc>
11366 Virtual audio controller type.
11367 </desc>
11368
11369 <const name="AC97" value="0"/>
11370 <const name="SB16" value="1"/>
11371 </enum>
11372
11373 <interface
11374 name="IAudioAdapter" extends="$unknown"
11375 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11376 wsmap="managed"
11377 >
11378 <desc>
11379 The IAudioAdapter interface represents the virtual audio adapter of
11380 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11381 </desc>
11382 <attribute name="enabled" type="boolean">
11383 <desc>
11384 Flag whether the audio adapter is present in the
11385 guest system. If disabled, the virtual guest hardware will
11386 not contain any audio adapter. Can only be changed when
11387 the VM is not running.
11388 </desc>
11389 </attribute>
11390 <attribute name="audioController" type="AudioControllerType">
11391 <desc>
11392 The audio hardware we emulate.
11393 </desc>
11394 </attribute>
11395 <attribute name="audioDriver" type="AudioDriverType">
11396 <desc>
11397 Audio driver the adapter is connected to. This setting
11398 can only be changed when the VM is not running.
11399 </desc>
11400 </attribute>
11401 </interface>
11402
11403 <!--
11404 // IVRDPServer
11405 /////////////////////////////////////////////////////////////////////////
11406 -->
11407
11408 <enum
11409 name="VRDPAuthType"
11410 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11411 >
11412 <desc>
11413 VRDP authentication type.
11414 </desc>
11415
11416 <const name="Null" value="0">
11417 <desc>Null value, also means "no authentication".</desc>
11418 </const>
11419 <const name="External" value="1"/>
11420 <const name="Guest" value="2"/>
11421 </enum>
11422
11423 <interface
11424 name="IVRDPServer" extends="$unknown"
11425 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11426 wsmap="managed"
11427 >
11428 <attribute name="enabled" type="boolean">
11429 <desc>VRDP server status.</desc>
11430 </attribute>
11431
11432 <attribute name="port" type="unsigned long">
11433 <desc>
11434 VRDP server port number.
11435 <note>
11436 Setting the value of this property to <tt>0</tt> will reset the port
11437 number to the default value which is
11438 currently <tt>3389</tt>. Reading this property will always return a
11439 real port number, even after it has been set to <tt>0</tt> (in which
11440 case the default port is returned).
11441 </note>
11442 </desc>
11443 </attribute>
11444
11445 <attribute name="netAddress" type="wstring">
11446 <desc>VRDP server address.</desc>
11447 </attribute>
11448
11449 <attribute name="authType" type="VRDPAuthType">
11450 <desc>VRDP authentication method.</desc>
11451 </attribute>
11452
11453 <attribute name="authTimeout" type="unsigned long">
11454 <desc>Timeout for guest authentication. Milliseconds.</desc>
11455 </attribute>
11456
11457 <attribute name="allowMultiConnection" type="boolean">
11458 <desc>
11459 Flag whether multiple simultaneous connections to the VM are permitted.
11460 Note that this will be replaced by a more powerful mechanism in the future.
11461 </desc>
11462 </attribute>
11463
11464 <attribute name="reuseSingleConnection" type="boolean">
11465 <desc>
11466 Flag whether the existing connection must be dropped and a new connection
11467 must be established by the VRDP server, when a new client connects in single
11468 connection mode.
11469 </desc>
11470 </attribute>
11471
11472 </interface>
11473
11474
11475 <!--
11476 // ISharedFolder
11477 /////////////////////////////////////////////////////////////////////////
11478 -->
11479
11480 <enumerator
11481 name="ISharedFolderEnumerator" type="ISharedFolder"
11482 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
11483 />
11484
11485 <collection
11486 name="ISharedFolderCollection" type="ISharedFolder"
11487 enumerator="ISharedFolderEnumerator"
11488 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11489 readonly="yes">
11490
11491 <method name="findByName">
11492 <desc>
11493 Searches this collection for a shared folder with the given logical
11494 name.
11495 <note>
11496 The method returns an error if the given name does not correspond to
11497 any shared folder in the collection.
11498 </note>
11499 </desc>
11500 <param name="name" type="wstring" dir="in">
11501 <desc>Logical name of the shared folder to search for</desc>
11502 </param>
11503 <param name="sharedFolder" type="ISharedFolder" dir="return">
11504 <desc>Found shared folder object</desc>
11505 </param>
11506 </method>
11507
11508 </collection>
11509
11510 <interface
11511 name="ISharedFolder" extends="$unknown"
11512 uuid="ef41869b-ef31-4b30-8e8f-95af35c0e378"
11513 wsmap="struct"
11514 >
11515 <desc>
11516 The ISharedFolder interface represents a folder in the host computer's
11517 file system accessible from the guest OS running inside a virtual
11518 machine using an associated logical name.
11519
11520 There are three types of shared folders:
11521 <ul>
11522 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11523 folders available to all virtual machines.</li>
11524 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11525 VM-specific shared folders available to the given virtual machine at
11526 startup.</li>
11527 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11528 VM-specific shared folders created in the session context (for
11529 example, when the virtual machine is running) and automatically
11530 discarded when the session is closed (the VM is powered off).</li>
11531 </ul>
11532
11533 Logical names of shared folders must be unique within the given scope
11534 (global, permanent or transient). However, they do not need to be unique
11535 across scopes. In this case, the definition of the shared folder in a
11536 more specific scope takes precedence over definitions in all other
11537 scopes. The order of precedence is (more specific to more general):
11538 <ol>
11539 <li>Transient definitions</li>
11540 <li>Permanent definitions</li>
11541 <li>Global definitions</li>
11542 </ol>
11543
11544 For example, if MyMachine has a shared folder named
11545 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11546 transient shared folder named <tt>C_DRIVE</tt> (that points
11547 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11548 of <tt>C_DRIVE</tt> in the guest OS so
11549 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11550 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11551 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11552 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11553 to <tt>C:\\</tt> if it still exists.
11554
11555 Note that permanent and transient shared folders of different machines
11556 are in different name spaces, so they don't overlap and don't need to
11557 have unique logical names.
11558
11559 <note>
11560 Global shared folders are not implemented in the current version of the
11561 product.
11562 </note>
11563 </desc>
11564
11565 <attribute name="name" type="wstring" readonly="yes">
11566 <desc>Logical name of the shared folder.</desc>
11567 </attribute>
11568
11569 <attribute name="hostPath" type="wstring" readonly="yes">
11570 <desc>Full path to the shared folder in the host file system.</desc>
11571 </attribute>
11572
11573 <attribute name="accessible" type="boolean" readonly="yes">
11574 <desc>
11575 Whether the folder defined by the host path is currently
11576 accessible or not.
11577 For example, the folder can be unaccessible if it is placed
11578 on the network share that is not available by the time
11579 this property is read.
11580 </desc>
11581 </attribute>
11582
11583 <attribute name="writable" type="boolean" readonly="yes">
11584 <desc>
11585 Whether the folder defined by the host path is writable or
11586 not.
11587 </desc>
11588 </attribute>
11589
11590 <attribute name="lastAccessError" type="wstring" readonly="yes">
11591 <desc>
11592 Text message that represents the result of the last accessibility
11593 check.
11594
11595 Accessibility checks are performed each time the <link to="#accessible"/>
11596 attribute is read. A @c null string is returned if the last
11597 accessibility check was successful. A non-null string indicates a
11598 failure and should normally describe a reason of the failure (for
11599 example, a file read error).
11600 </desc>
11601 </attribute>
11602
11603 </interface>
11604
11605 <!--
11606 // ISession
11607 /////////////////////////////////////////////////////////////////////////
11608 -->
11609
11610 <interface
11611 name="IInternalSessionControl" extends="$unknown"
11612 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11613 internal="yes"
11614 wsmap="suppress"
11615 >
11616 <method name="getPID">
11617 <desc>PID of the process that has created this Session object.
11618 </desc>
11619 <param name="pid" type="unsigned long" dir="return"/>
11620 </method>
11621
11622 <method name="getRemoteConsole">
11623 <desc>
11624 Returns the console object suitable for remote control.
11625
11626 <result name="VBOX_E_INVALID_VM_STATE">
11627 Session state prevents operation.
11628 </result>
11629 <result name="VBOX_E_INVALID_OBJECT_STATE">
11630 Session type prevents operation.
11631 </result>
11632
11633 </desc>
11634 <param name="console" type="IConsole" dir="return"/>
11635 </method>
11636
11637 <method name="assignMachine">
11638 <desc>
11639 Assigns the machine object associated with this direct-type
11640 session or informs the session that it will be a remote one
11641 (if @a machine == NULL).
11642
11643 <result name="VBOX_E_INVALID_VM_STATE">
11644 Session state prevents operation.
11645 </result>
11646 <result name="VBOX_E_INVALID_OBJECT_STATE">
11647 Session type prevents operation.
11648 </result>
11649
11650 </desc>
11651 <param name="machine" type="IMachine" dir="in"/>
11652 </method>
11653
11654 <method name="assignRemoteMachine">
11655 <desc>
11656 Assigns the machine and the (remote) console object associated with
11657 this remote-type session.
11658
11659 <result name="VBOX_E_INVALID_VM_STATE">
11660 Session state prevents operation.
11661 </result>
11662
11663 </desc>
11664 <param name="machine" type="IMachine" dir="in"/>
11665 <param name="console" type="IConsole" dir="in"/>
11666 </method>
11667
11668 <method name="updateMachineState">
11669 <desc>
11670 Updates the machine state in the VM process.
11671 Must be called only in certain cases
11672 (see the method implementation).
11673
11674 <result name="VBOX_E_INVALID_VM_STATE">
11675 Session state prevents operation.
11676 </result>
11677 <result name="VBOX_E_INVALID_OBJECT_STATE">
11678 Session type prevents operation.
11679 </result>
11680
11681 </desc>
11682 <param name="aMachineState" type="MachineState" dir="in"/>
11683 </method>
11684
11685 <method name="uninitialize">
11686 <desc>
11687 Uninitializes (closes) this session. Used by VirtualBox to close
11688 the corresponding remote session when the direct session dies
11689 or gets closed.
11690
11691 <result name="VBOX_E_INVALID_VM_STATE">
11692 Session state prevents operation.
11693 </result>
11694
11695 </desc>
11696 </method>
11697
11698 <method name="onDVDDriveChange">
11699 <desc>
11700 Triggered when settings of the DVD drive object of the
11701 associated virtual machine have changed.
11702
11703 <result name="VBOX_E_INVALID_VM_STATE">
11704 Session state prevents operation.
11705 </result>
11706 <result name="VBOX_E_INVALID_OBJECT_STATE">
11707 Session type prevents operation.
11708 </result>
11709
11710 </desc>
11711 </method>
11712
11713 <method name="onFloppyDriveChange">
11714 <desc>
11715 Triggered when settings of the floppy drive object of the
11716 associated virtual machine have changed.
11717
11718 <result name="VBOX_E_INVALID_VM_STATE">
11719 Session state prevents operation.
11720 </result>
11721 <result name="VBOX_E_INVALID_OBJECT_STATE">
11722 Session type prevents operation.
11723 </result>
11724
11725 </desc>
11726 </method>
11727
11728 <method name="onNetworkAdapterChange">
11729 <desc>
11730 Triggered when settings of a network adapter of the
11731 associated virtual machine have changed.
11732
11733 <result name="VBOX_E_INVALID_VM_STATE">
11734 Session state prevents operation.
11735 </result>
11736 <result name="VBOX_E_INVALID_OBJECT_STATE">
11737 Session type prevents operation.
11738 </result>
11739
11740 </desc>
11741 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11742 </method>
11743
11744 <method name="onSerialPortChange">
11745 <desc>
11746 Triggered when settings of a serial port of the
11747 associated virtual machine have changed.
11748
11749 <result name="VBOX_E_INVALID_VM_STATE">
11750 Session state prevents operation.
11751 </result>
11752 <result name="VBOX_E_INVALID_OBJECT_STATE">
11753 Session type prevents operation.
11754 </result>
11755
11756 </desc>
11757 <param name="serialPort" type="ISerialPort" dir="in"/>
11758 </method>
11759
11760 <method name="onParallelPortChange">
11761 <desc>
11762 Triggered when settings of a parallel port of the
11763 associated virtual machine have changed.
11764
11765 <result name="VBOX_E_INVALID_VM_STATE">
11766 Session state prevents operation.
11767 </result>
11768 <result name="VBOX_E_INVALID_OBJECT_STATE">
11769 Session type prevents operation.
11770 </result>
11771
11772 </desc>
11773 <param name="parallelPort" type="IParallelPort" dir="in"/>
11774 </method>
11775
11776 <method name="onVRDPServerChange">
11777 <desc>
11778 Triggered when settings of the VRDP server object of the
11779 associated virtual machine have changed.
11780
11781 <result name="VBOX_E_INVALID_VM_STATE">
11782 Session state prevents operation.
11783 </result>
11784 <result name="VBOX_E_INVALID_OBJECT_STATE">
11785 Session type prevents operation.
11786 </result>
11787
11788 </desc>
11789 </method>
11790
11791 <method name="onUSBControllerChange">
11792 <desc>
11793 Triggered when settings of the USB controller object of the
11794 associated virtual machine have changed.
11795
11796 <result name="VBOX_E_INVALID_VM_STATE">
11797 Session state prevents operation.
11798 </result>
11799 <result name="VBOX_E_INVALID_OBJECT_STATE">
11800 Session type prevents operation.
11801 </result>
11802
11803 </desc>
11804 </method>
11805
11806 <method name="onSharedFolderChange">
11807 <desc>
11808 Triggered when a permanent (global or machine) shared folder has been
11809 created or removed.
11810 <note>
11811 We don't pass shared folder parameters in this notification because
11812 the order in which parallel notifications are delivered is not defined,
11813 therefore it could happen that these parameters were outdated by the
11814 time of processing this notification.
11815 </note>
11816
11817 <result name="VBOX_E_INVALID_VM_STATE">
11818 Session state prevents operation.
11819 </result>
11820 <result name="VBOX_E_INVALID_OBJECT_STATE">
11821 Session type prevents operation.
11822 </result>
11823
11824 </desc>
11825 <param name="global" type="boolean" dir="in"/>
11826 </method>
11827
11828 <method name="onUSBDeviceAttach">
11829 <desc>
11830 Triggered when a request to capture a USB device (as a result
11831 of matched USB filters or direct call to
11832 <link to="IConsole::attachUSBDevice"/>) has completed.
11833 A @c null @a error object means success, otherwise it
11834 describes a failure.
11835
11836 <result name="VBOX_E_INVALID_VM_STATE">
11837 Session state prevents operation.
11838 </result>
11839 <result name="VBOX_E_INVALID_OBJECT_STATE">
11840 Session type prevents operation.
11841 </result>
11842
11843 </desc>
11844 <param name="device" type="IUSBDevice" dir="in"/>
11845 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11846 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11847 </method>
11848
11849 <method name="onUSBDeviceDetach">
11850 <desc>
11851 Triggered when a request to release the USB device (as a result
11852 of machine termination or direct call to
11853 <link to="IConsole::detachUSBDevice"/>) has completed.
11854 A @c null @a error object means success, otherwise it
11855
11856 <result name="VBOX_E_INVALID_VM_STATE">
11857 Session state prevents operation.
11858 </result>
11859 <result name="VBOX_E_INVALID_OBJECT_STATE">
11860 Session type prevents operation.
11861 </result>
11862
11863 </desc>
11864 <param name="id" type="uuid" dir="in"/>
11865 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11866 </method>
11867
11868 <method name="onShowWindow">
11869 <desc>
11870 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11871 <link to="IMachine::showConsoleWindow()"/> in order to notify
11872 console callbacks
11873 <link to="IConsoleCallback::onCanShowWindow()"/>
11874 and <link to="IConsoleCallback::onShowWindow()"/>.
11875
11876 <result name="VBOX_E_INVALID_OBJECT_STATE">
11877 Session type prevents operation.
11878 </result>
11879
11880 </desc>
11881 <param name="check" type="boolean" dir="in"/>
11882 <param name="canShow" type="boolean" dir="out"/>
11883 <param name="winId" type="unsigned long long" dir="out"/>
11884 </method>
11885
11886 <method name="accessGuestProperty">
11887 <desc>
11888 Called by <link to="IMachine::getGuestProperty()"/> and by
11889 <link to="IMachine::setGuestProperty()"/> in order to read and
11890 modify guest properties.
11891
11892 <result name="VBOX_E_INVALID_VM_STATE">
11893 Machine session is not open.
11894 </result>
11895 <result name="VBOX_E_INVALID_OBJECT_STATE">
11896 Session type is not direct.
11897 </result>
11898
11899 </desc>
11900 <param name="name" type="wstring" dir="in"/>
11901 <param name="value" type="wstring" dir="in"/>
11902 <param name="flags" type="wstring" dir="in"/>
11903 <param name="isSetter" type="boolean" dir="in"/>
11904 <param name="retValue" type="wstring" dir="out"/>
11905 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11906 <param name="retFlags" type="wstring" dir="out"/>
11907 </method>
11908
11909 <method name="enumerateGuestProperties">
11910 <desc>
11911 Return a list of the guest properties matching a set of patterns along
11912 with their values, time stamps and flags.
11913
11914 <result name="VBOX_E_INVALID_VM_STATE">
11915 Machine session is not open.
11916 </result>
11917 <result name="VBOX_E_INVALID_OBJECT_STATE">
11918 Session type is not direct.
11919 </result>
11920
11921 </desc>
11922 <param name="patterns" type="wstring" dir="in">
11923 <desc>
11924 The patterns to match the properties against as a comma-separated
11925 string. If this is empty, all properties currently set will be
11926 returned.
11927 </desc>
11928 </param>
11929 <param name="key" type="wstring" dir="out" safearray="yes">
11930 <desc>
11931 The key names of the properties returned.
11932 </desc>
11933 </param>
11934 <param name="value" type="wstring" dir="out" safearray="yes">
11935 <desc>
11936 The values of the properties returned. The array entries match the
11937 corresponding entries in the @a key array.
11938 </desc>
11939 </param>
11940 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11941 <desc>
11942 The time stamps of the properties returned. The array entries match
11943 the corresponding entries in the @a key array.
11944 </desc>
11945 </param>
11946 <param name="flags" type="wstring" dir="out" safearray="yes">
11947 <desc>
11948 The flags of the properties returned. The array entries match the
11949 corresponding entries in the @a key array.
11950 </desc>
11951 </param>
11952 </method>
11953
11954 </interface>
11955
11956 <interface
11957 name="ISession" extends="$dispatched"
11958 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11959 wsmap="managed"
11960 >
11961 <desc>
11962 The ISession interface represents a serialization primitive for virtual
11963 machines.
11964
11965 With VirtualBox, every time one wishes to manipulate a virtual machine
11966 (e.g. change its settings or start execution), a session object is
11967 required. Such an object must be passed to one of the session methods
11968 that open the given session, which then initiates the machine manipulation.
11969
11970 A session serves several purposes: it identifies to the inter-process VirtualBox
11971 code which process is currently working with the virtual machine, and it ensures
11972 that there are no incompatible requests from several processes for the
11973 same virtual machine. Session objects can therefore be thought of as mutex
11974 semaphores that lock virtual machines to prevent conflicting accesses from
11975 several processes.
11976
11977 How sessions objects are used depends on whether you use the Main API
11978 via COM or via the webservice:
11979
11980 <ul>
11981 <li>When using the COM API directly, an object of the Session class from the
11982 VirtualBox type library needs to be created. In regular COM C++ client code,
11983 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
11984 This object will then act as a local session object in further calls to open
11985 a session.
11986 </li>
11987
11988 <li>In the webservice, the session manager (IWebsessionManager) instead creates
11989 one session object automatically when <link to="IWebsessionManager::logon" />
11990 is called. A managed object reference to that session object can be retrieved by
11991 calling <link to="IWebsessionManager::getSessionObject" />. This session object
11992 reference can then be used to open sessions.
11993 </li>
11994 </ul>
11995
11996 Sessions are mainly used in two variations:
11997
11998 <ul>
11999 <li>
12000 To start a virtual machine in a separate process, one would call
12001 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12002 object as its first parameter. This session then identifies the caller
12003 and lets him control the started machine (for example, pause machine
12004 execution or power it down) as well as be notified about machine
12005 execution state changes.
12006 </li>
12007
12008 <li>To alter machine settings, or to start machine execution within the
12009 current process, one needs to open a direct session for the machine first by
12010 calling <link to="IVirtualBox::openSession"/>. While a direct session
12011 is open within one process, no any other process may open another direct
12012 session for the same machine. This prevents the machine from being changed
12013 by other processes while it is running or while the machine is being configured.
12014 </li>
12015 </ul>
12016
12017 One also can attach to an existing direct session already opened by
12018 another process (for example, in order to send a control request to the
12019 virtual machine such as the pause or the reset request). This is done by
12020 calling <link to="IVirtualBox::openExistingSession"/>.
12021
12022 <note>
12023 Unless you are trying to write a new VirtualBox front-end that
12024 performs direct machine execution (like the VirtualBox or VBoxSDL
12025 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12026 session opened by <link to="IVirtualBox::openSession"/> and use this
12027 session only to change virtual machine settings. If you simply want to
12028 start virtual machine execution using one of the existing front-ends
12029 (for example the VirtualBox GUI or headless server), simply use
12030 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12031 will power up the machine automatically for you.
12032 </note>
12033 </desc>
12034
12035 <attribute name="state" type="SessionState" readonly="yes">
12036 <desc>Current state of this session.</desc>
12037 </attribute>
12038
12039 <attribute name="type" type="SessionType" readonly="yes">
12040 <desc>
12041 Type of this session. The value of this attribute is valid only
12042 if the session is currently open (i.e. its #state is
12043 SessionType_SessionOpen), otherwise an error will be returned.
12044 </desc>
12045 </attribute>
12046
12047 <attribute name="machine" type="IMachine" readonly="yes">
12048 <desc>Machine object associated with this session.</desc>
12049 </attribute>
12050
12051 <attribute name="console" type="IConsole" readonly="yes">
12052 <desc>Console object associated with this session.</desc>
12053 </attribute>
12054
12055 <method name="close">
12056 <desc>
12057 Closes a session that was previously opened.
12058
12059 It is recommended that every time an "open session" method (such as
12060 <link to="IVirtualBox::openRemoteSession" /> or
12061 <link to="IVirtualBox::openSession" />) has been called to
12062 manipulate a virtual machine, the caller invoke
12063 ISession::close() when it's done doing so. Since sessions are
12064 serialization primitives much like ordinary mutexes, they are
12065 best used the same way: for each "open" call, there should be
12066 a matching "close" call, even when errors occur.
12067
12068 Otherwise, if a direct session for a machine opened with
12069 <link to="IVirtualBox::openSession()"/> is not explicitly closed
12070 when the application terminates, the state of the machine will
12071 be set to <link to="MachineState_Aborted" /> on the server.
12072
12073 Generally, it is recommended to close all open sessions explicitly
12074 before terminating the application (regardless of the reason for
12075 the termination).
12076
12077 <note>
12078 Do not expect the session state (<link to="ISession::state" />
12079 to return to "Closed" immediately after you invoke
12080 ISession::close(), particularly if you have started a remote
12081 session to execute the VM in a new process. The session state will
12082 automatically return to "Closed" once the VM is no longer executing,
12083 which can of course take a very long time.
12084 </note>
12085
12086 <result name="E_UNEXPECTED">
12087 Session is not open.
12088 </result>
12089
12090 </desc>
12091 </method>
12092
12093 </interface>
12094
12095 <!--
12096 // ISATAController
12097 /////////////////////////////////////////////////////////////////////////
12098 -->
12099
12100 <interface
12101 name="ISATAController" extends="$unknown"
12102 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
12103 wsmap="managed"
12104 >
12105 <attribute name="enabled" type="boolean">
12106 <desc>
12107 Flag whether the SATA controller is present in the
12108 guest system. If disabled, the virtual guest hardware will
12109 not contain any SATA controller. Can only be changed when
12110 the VM is powered off.
12111 </desc>
12112 </attribute>
12113
12114 <attribute name="portCount" type="unsigned long">
12115 <desc>
12116 The number of usable ports on the SATA controller.
12117 It ranges from 1 to 30.
12118 </desc>
12119 </attribute>
12120
12121 <method name="GetIDEEmulationPort">
12122 <desc>
12123 Gets the corresponding port number which is emulated as an IDE device.
12124
12125 <result name="E_INVALIDARG">
12126 The @a devicePosition is not in the range 0 to 3.
12127 </result>
12128
12129 </desc>
12130 <param name="devicePosition" type="long" dir="in"/>
12131 <param name="portNumber" type="long" dir="return"/>
12132 </method>
12133
12134 <method name="SetIDEEmulationPort">
12135 <desc>
12136 Sets the port number which is emulated as an IDE device.
12137
12138 <result name="E_INVALIDARG">
12139 The @a devicePosition is not in the range 0 to 3 or the
12140 @a portNumber is not in the range 0 to 29.
12141 </result>
12142
12143 </desc>
12144 <param name="devicePosition" type="long" dir="in"/>
12145 <param name="portNumber" type="long" dir="in"/>
12146 </method>
12147
12148 </interface>
12149
12150<if target="wsdl">
12151
12152 <!--
12153 // IManagedObjectRef
12154 /////////////////////////////////////////////////////////////////////////
12155 -->
12156
12157 <interface
12158 name="IManagedObjectRef" extends="$unknown"
12159 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12160 internal="yes"
12161 wsmap="managed"
12162 wscpp="hardcoded"
12163 >
12164 <desc>
12165 Managed object reference.
12166
12167 Only within the webservice, a managed object reference (which is really
12168 an opaque number) allows a webservice client to address an object
12169 that lives in the address space of the webservice server.
12170
12171 Behind each managed object reference, there is a COM object that lives
12172 in the webservice server's address space. The COM object is not freed
12173 until the managed object reference is released, either by an explicit
12174 call to <link to="IManagedObjectRef::release" /> or by logging off from
12175 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12176 all objects created during the webservice session.
12177
12178 Whenever a method call of the VirtualBox API returns a COM object, the
12179 webservice representation of that method will instead return a
12180 managed object reference, which can then be used to invoke methods
12181 on that object.
12182 </desc>
12183
12184 <method name="getInterfaceName">
12185 <desc>
12186 Returns the name of the interface that this managed object represents,
12187 for example, "IMachine", as a string.
12188 </desc>
12189 <param name="return" type="wstring" dir="return"/>
12190 </method>
12191
12192 <method name="release">
12193 <desc>
12194 Releases this managed object reference and frees the resources that
12195 were allocated for it in the webservice server process. After calling
12196 this method, the identifier of the reference can no longer be used.
12197 </desc>
12198 </method>
12199
12200 </interface>
12201
12202 <!--
12203 // IWebsessionManager
12204 /////////////////////////////////////////////////////////////////////////
12205 -->
12206
12207 <interface
12208 name="IWebsessionManager" extends="$unknown"
12209 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12210 internal="yes"
12211 wsmap="global"
12212 wscpp="hardcoded"
12213 >
12214 <desc>
12215 Websession manager. This provides essential services
12216 to webservice clients.
12217 </desc>
12218 <method name="logon">
12219 <desc>
12220 Logs a new client onto the webservice and returns a managed object reference to
12221 the IVirtualBox instance, which the client can then use as a basis to further
12222 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12223 interface, in one way or the other.
12224 </desc>
12225 <param name="username" type="wstring" dir="in"/>
12226 <param name="password" type="wstring" dir="in"/>
12227 <param name="return" type="IVirtualBox" dir="return"/>
12228 </method>
12229
12230 <method name="getSessionObject">
12231 <desc>
12232 Returns a managed object reference to the internal ISession object that was created
12233 for this web service session when the client logged on.
12234
12235 <see>ISession</see>
12236 </desc>
12237 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12238 <param name="return" type="ISession" dir="return"/>
12239 </method>
12240
12241 <method name="logoff">
12242 <desc>
12243 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12244 and destroys all resources associated with the session (most importantly, all
12245 managed objects created in the server while the session was active).
12246 </desc>
12247 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12248 </method>
12249
12250 </interface>
12251
12252</if>
12253
12254 <!--
12255 // IPerformanceCollector & friends
12256 /////////////////////////////////////////////////////////////////////////
12257 -->
12258
12259 <interface
12260 name="IPerformanceMetric" extends="$unknown"
12261 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12262 >
12263 <desc>
12264 The IPerformanceMetric interface represents parameters of the given
12265 performance metric.
12266 </desc>
12267
12268 <attribute name="metricName" type="wstring" readonly="yes">
12269 <desc>
12270 Name of the metric.
12271 </desc>
12272 </attribute>
12273
12274 <attribute name="object" type="$unknown" readonly="yes">
12275 <desc>
12276 Object this metric belongs to.
12277 </desc>
12278 </attribute>
12279
12280 <attribute name="description" type="wstring" readonly="yes">
12281 <desc>
12282 Textual description of the metric.
12283 </desc>
12284 </attribute>
12285
12286 <attribute name="period" type="unsigned long" readonly="yes">
12287 <desc>
12288 Time interval between samples, measured in seconds.
12289 </desc>
12290 </attribute>
12291
12292 <attribute name="count" type="unsigned long" readonly="yes">
12293 <desc>
12294 Number of recent samples retained by the performance collector for this
12295 metric.
12296
12297 When the collected sample count exceeds this number, older samples
12298 are discarded.
12299 </desc>
12300 </attribute>
12301
12302 <attribute name="unit" type="wstring" readonly="yes">
12303 <desc>
12304 Unit of measurement.
12305 </desc>
12306 </attribute>
12307
12308 <attribute name="minimumValue" type="long" readonly="yes">
12309 <desc>
12310 Minimum possible value of this metric.
12311 </desc>
12312 </attribute>
12313
12314 <attribute name="maximumValue" type="long" readonly="yes">
12315 <desc>
12316 Maximum possible value of this metric.
12317 </desc>
12318 </attribute>
12319 </interface>
12320
12321 <interface
12322 name="IPerformanceCollector" extends="$unknown"
12323 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12324 wsmap="managed"
12325 >
12326 <desc>
12327 The IPerformanceCollector interface represents a service that collects and
12328 stores performance metrics data.
12329
12330 Performance metrics are associated with objects like IHost and
12331 IMachine. Each object has a distinct set of performance metrics.
12332 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12333
12334 Metric data are collected at the specified intervals and are retained
12335 internally. The interval and the number of samples retained can be set
12336 with <link to="IPerformanceCollector::setupMetrics" />.
12337
12338 Metrics are organized hierarchically, each level separated by slash (/).
12339 General scheme for metric name is
12340 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12341 metric name stands for: CPU category, Load metric, User submetric, average
12342 aggregate. An aggregate function is computed over all retained data. Valid
12343 aggregate functions are:
12344
12345 <ul>
12346 <li>avg -- average</li>
12347 <li>min -- minimum</li>
12348 <li>max -- maximum</li>
12349 </ul>
12350
12351 "Category/Metric" together form base metric name. A base metric is the
12352 smallest unit for which a sampling interval and the number of retained
12353 samples can be set. Only base metrics can be enabled and disabled. All
12354 sub-metrics are collected when their base metric is collected.
12355 Collected values for any set of sub-metrics can be queried with
12356 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12357 metric parameters, querying metric data, enabling or disabling metrics
12358 wildcards can be used in metric names to specify a subset of metrics. For
12359 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12360 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12361 values without aggregates <tt>*:</tt> can be used.
12362
12363 The valid names for base metrics are:
12364
12365 <ul>
12366 <li>CPU/Load</li>
12367 <li>CPU/MHz</li>
12368 <li>RAM/Usage</li>
12369 </ul>
12370
12371 The general sequence for collecting and retrieving the metrics is:
12372 <ul>
12373 <li>
12374 Obtain an instance of IPerformanceCollector with
12375 <link to="IVirtualBox::performanceCollector" />
12376 </li>
12377 <li>
12378 Allocate and populate an array with references to objects the metrics
12379 will be collected for. Use references to IHost and IMachine objects.
12380 </li>
12381 <li>
12382 Allocate and populate an array with base metric names the data will be
12383 collected for.
12384 </li>
12385 <li>
12386 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12387 metric data will be collected and stored.
12388 </li>
12389 <li>
12390 Wait for the data to get collected.
12391 </li>
12392 <li>
12393 Allocate and populate an array with references to objects the metric
12394 values will be queried for. You can re-use the object array used for
12395 setting base metrics.
12396 </li>
12397 <li>
12398 Allocate and populate an array with metric names the data will be
12399 collected for. Note that metric names differ from base metric names.
12400 </li>
12401 <li>
12402 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12403 have been collected so far are returned. Note that the values are still
12404 retained internally and data collection continues.
12405 </li>
12406 </ul>
12407
12408 For an example of usage refer to the following files in VirtualBox SDK:
12409 <ul>
12410 <li>
12411 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12412 </li>
12413 <li>
12414 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12415 </li>
12416 </ul>
12417 </desc>
12418
12419 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12420 <desc>
12421 Array of unique names of metrics.
12422
12423 This array represents all metrics supported by the performance
12424 collector. Individual objects do not necessarily support all of them.
12425 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12426 list of supported metrics for a particular object.
12427 </desc>
12428 </attribute>
12429
12430 <method name="getMetrics">
12431 <desc>
12432 Returns parameters of specified metrics for a set of objects.
12433 <note>
12434 @c Null metrics array means all metrics. @c Null object array means
12435 all existing objects.
12436 </note>
12437 </desc>
12438 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12439 <desc>
12440 Metric name filter. Currently, only a comma-separated list of metrics
12441 is supported.
12442 </desc>
12443 </param>
12444 <param name="objects" type="$unknown" dir="in" safearray="yes">
12445 <desc>
12446 Set of objects to return metric parameters for.
12447 </desc>
12448 </param>
12449 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12450 <desc>
12451 Array of returned metric parameters.
12452 </desc>
12453 </param>
12454 </method>
12455
12456 <method name="setupMetrics">
12457 <desc>
12458 Sets parameters of specified base metrics for a set of objects. Returns
12459 an array of <link to="IPerformanceMetric" /> describing the metrics have
12460 been affected.
12461 <note>
12462 @c Null or empty metric name array means all metrics. @c Null or empty
12463 object array means all existing objects. If metric name array contains
12464 a single element and object array contains many, the single metric
12465 name array element is applied to each object array element to form
12466 metric/object pairs.
12467 </note>
12468 </desc>
12469 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12470 <desc>
12471 Metric name filter. Comma-separated list of metrics with wildcard
12472 support.
12473 </desc>
12474 </param>
12475 <param name="objects" type="$unknown" dir="in" safearray="yes">
12476 <desc>
12477 Set of objects to setup metric parameters for.
12478 </desc>
12479 </param>
12480 <param name="period" type="unsigned long" dir="in">
12481 <desc>
12482 Time interval in seconds between two consecutive samples of performance
12483 data.
12484 </desc>
12485 </param>
12486 <param name="count" type="unsigned long" dir="in">
12487 <desc>
12488 Number of samples to retain in performance data history. Older samples
12489 get discarded.
12490 </desc>
12491 </param>
12492 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12493 <desc>
12494 Array of metrics that have been modified by the call to this method.
12495 </desc>
12496 </param>
12497 </method>
12498
12499 <method name="enableMetrics">
12500 <desc>
12501 Turns on collecting specified base metrics. Returns an array of
12502 <link to="IPerformanceMetric" /> describing the metrics have been
12503 affected.
12504 <note>
12505 @c Null or empty metric name array means all metrics. @c Null or empty
12506 object array means all existing objects. If metric name array contains
12507 a single element and object array contains many, the single metric
12508 name array element is applied to each object array element to form
12509 metric/object pairs.
12510 </note>
12511 </desc>
12512 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12513 <desc>
12514 Metric name filter. Comma-separated list of metrics with wildcard
12515 support.
12516 </desc>
12517 </param>
12518 <param name="objects" type="$unknown" dir="in" safearray="yes">
12519 <desc>
12520 Set of objects to enable metrics for.
12521 </desc>
12522 </param>
12523 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12524 <desc>
12525 Array of metrics that have been modified by the call to this method.
12526 </desc>
12527 </param>
12528 </method>
12529
12530 <method name="disableMetrics">
12531 <desc>
12532 Turns off collecting specified base metrics. Returns an array of
12533 <link to="IPerformanceMetric" /> describing the metrics have been
12534 affected.
12535 <note>
12536 @c Null or empty metric name array means all metrics. @c Null or empty
12537 object array means all existing objects. If metric name array contains
12538 a single element and object array contains many, the single metric
12539 name array element is applied to each object array element to form
12540 metric/object pairs.
12541 </note>
12542 </desc>
12543 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12544 <desc>
12545 Metric name filter. Comma-separated list of metrics with wildcard
12546 support.
12547 </desc>
12548 </param>
12549 <param name="objects" type="$unknown" dir="in" safearray="yes">
12550 <desc>
12551 Set of objects to disable metrics for.
12552 </desc>
12553 </param>
12554 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12555 <desc>
12556 Array of metrics that have been modified by the call to this method.
12557 </desc>
12558 </param>
12559 </method>
12560
12561 <method name="queryMetricsData">
12562 <desc>
12563 Queries collected metrics data for a set of objects.
12564
12565 The data itself and related metric information are returned in seven
12566 parallel and one flattened array of arrays. Elements of
12567 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12568 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12569 the same index describe one set of values corresponding to a single
12570 metric.
12571
12572 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12573 start and length of a sub-array is indicated by
12574 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12575 value for metric <tt>metricNames[i]</tt> is at
12576 <tt>returnData[returnIndices[i]]</tt>.
12577
12578 <note>
12579 @c Null or empty metric name array means all metrics. @c Null or empty
12580 object array means all existing objects. If metric name array contains
12581 a single element and object array contains many, the single metric
12582 name array element is applied to each object array element to form
12583 metric/object pairs.
12584 </note>
12585 <note>
12586 Data collection continues behind the scenes after call to @c
12587 queryMetricsData. The return data can be seen as the snapshot of
12588 the current state at the time of @c queryMetricsData call. The
12589 internally kept metric values are not cleared by the call. This makes
12590 possible querying different subsets of metrics or aggregates with
12591 subsequent calls. If periodic querying is needed it is highly
12592 suggested to query the values with @c interval*count period to avoid
12593 confusion. This way a completely new set of data values will be
12594 provided by each query.
12595 </note>
12596 </desc>
12597 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12598 <desc>
12599 Metric name filter. Comma-separated list of metrics with wildcard
12600 support.
12601 </desc>
12602 </param>
12603 <param name="objects" type="$unknown" dir="in" safearray="yes">
12604 <desc>
12605 Set of objects to query metrics for.
12606 </desc>
12607 </param>
12608 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12609 <desc>
12610 Names of metrics returned in @c returnData.
12611 </desc>
12612 </param>
12613 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12614 <desc>
12615 Objects associated with metrics returned in @c returnData.
12616 </desc>
12617 </param>
12618 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12619 <desc>
12620 Units of measurement for each returned metric.
12621 </desc>
12622 </param>
12623 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12624 <desc>
12625 Divisor that should be applied to return values in order to get
12626 floating point values. For example:
12627 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12628 will retrieve the floating point value of i-th sample of the first
12629 metric.
12630 </desc>
12631 </param>
12632 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12633 <desc>
12634 Sequence numbers of the first elements of value sequences of particular metrics
12635 returned in @c returnData. For aggregate metrics it is the sequence number of
12636 the sample the aggregate started calculation from.
12637 </desc>
12638 </param>
12639 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12640 <desc>
12641 Indices of the first elements of value sequences of particular metrics
12642 returned in @c returnData.
12643 </desc>
12644 </param>
12645 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12646 <desc>
12647 Lengths of value sequences of particular metrics.
12648 </desc>
12649 </param>
12650 <param name="returnData" type="long" dir="return" safearray="yes">
12651 <desc>
12652 Flattened array of all metric data containing sequences of values for
12653 each metric.
12654 </desc>
12655 </param>
12656 </method>
12657
12658 </interface>
12659
12660 <module name="VBoxSVC" context="LocalServer">
12661 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12662 namespace="virtualbox.org">
12663 <interface name="IVirtualBox" default="yes"/>
12664 </class>
12665 </module>
12666
12667 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12668 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12669 namespace="virtualbox.org">
12670 <interface name="ISession" default="yes"/>
12671 </class>
12672 </module>
12673
12674</library>
12675
12676</idl>
12677
12678<!-- 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