VirtualBox

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

Last change on this file since 16560 was 16517, checked in by vboxsync, 15 years ago

OVF: add IVirtualSystemDescription::disableItem(), fix disk import

  • Property svn:eol-style set to native
File size: 468.2 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2008 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the<tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="MachineState"
363 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
364 >
365 <desc>
366 Virtual machine execution state.
367
368 This enumeration represents possible values of the <link
369 to="IMachine::state"/> attribute.
370
371 Below is the basic virtual machine state diagram. It shows how the state
372 changes during virtual machine execution. The text in square braces shows
373 a method of the IConsole interface that performs the given state
374 transition.
375
376 <pre>
377 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
378 V |
379 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
380 | | | | V |
381 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
382 | | ^ | ^ |
383 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
384 | ^ | | | |
385 | | +-----------------------------------------+-|-------------------+ +
386 | | | | |
387 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
388 | | | |
389 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
390 | | |
391 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
392 </pre>
393
394 Note that states to the right from PoweredOff, Aborted and Saved in the
395 above diagram are called <i>online VM states</i>. These states
396 represent the virtual machine which is being executed in a dedicated
397 process (usually with a GUI window attached to it where you can see the
398 activity of the virtual machine and interact with it). There are two
399 special pseudo-states, FirstOnline and LastOnline, that can be used in
400 relational expressions to detect if the given machine state is online or
401 not:
402
403 <pre>
404 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
405 machine.GetState() &lt;= MachineState_LastOnline)
406 {
407 ...the machine is being executed...
408 }
409 </pre>
410
411 When the virtual machine is in one of the online VM states (that is, being
412 executed), only a few machine settings can be modified. Methods working
413 with such settings contain an explicit note about that. An attempt to
414 change any oter setting or perform a modifying operation during this time
415 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
416
417 All online states except Running, Paused and Stuck are transitional: they
418 represent temporary conditions of the virtual machine that will last as
419 long as the operation that initiated such a condition.
420
421 The Stuck state is a special case. It means that execution of the machine
422 has reached the "Guru Meditation" condition. This condition indicates an
423 internal VMM (virtual machine manager) failure which may happen as a
424 result of either an unhandled low-level virtual hardware exception or one
425 of the recompiler exceptions (such as the <i>too-many-traps</i>
426 condition).
427
428 Note also that any online VM state may transit to the Aborted state. This
429 happens if the process that is executing the virtual machine terminates
430 unexpectedly (for example, crashes). Other than that, the Aborted state is
431 equivalent to PoweredOff.
432
433 There are also a few additional state diagrams that do not deal with
434 virtual machine execution and therefore are shown separately. The states
435 shown on these diagrams are called <i>offline VM states</i> (this includes
436 PoweredOff, Aborted and Saved too).
437
438 The first diagram shows what happens when a lengthy setup operation is
439 being executed (such as <link to="IMachine::attachHardDisk2()"/>).
440
441 <pre>
442 +-----------------------------------(same sate as before the call)------+
443 | |
444 +-&gt; PoweredOff --+ |
445 | | |
446 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
447 | |
448 +-&gt; Saved -------+
449 </pre>
450
451 The next two diagrams demonstrate the process of taking a snapshot of a
452 powered off virtual machine and performing one of the "discard..."
453 operations, respectively.
454
455 <pre>
456 +-----------------------------------(same sate as before the call)------+
457 | |
458 +-&gt; PoweredOff --+ |
459 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
460 +-&gt; Aborted -----+
461
462 +-&gt; PoweredOff --+
463 | |
464 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
465 | | [discardCurrentState()] |
466 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
467 | |
468 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
469 </pre>
470
471 Note that the Saving state is present in both the offline state group and
472 online state group. Currently, the only way to determine what group is
473 assumed in a particular case is to remember the previous machine state: if
474 it was Running or Paused, then Saving is an online state, otherwise it is
475 an offline state. This inconsistency may be removed in one of the future
476 versions of VirtualBox by adding a new state.
477
478 <note internal="yes">
479 For whoever decides to touch this enum: In order to keep the
480 comparisons involving FirstOnline and LastOnline pseudo-states valid,
481 the numeric values of these states must be correspondingly updated if
482 needed: for any online VM state, the condition
483 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
484 <tt>true</tt>. The same relates to transient states for which
485 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
486 <tt>true</tt>.
487 </note>
488 </desc>
489
490 <const name="Null" value="0">
491 <desc>Null value (nver used by the API).</desc>
492 </const>
493 <const name="PoweredOff" value="1">
494 <desc>
495 The machine is not running.
496 </desc>
497 </const>
498 <const name="Saved" value="2">
499 <desc>
500 The machine is not currently running, but the execution state of the machine
501 has been saved to an external file when it was running.
502 </desc>
503 </const>
504 <const name="Aborted" value="3">
505 <desc>
506 The process running the machine has terminated abnormally.
507 </desc>
508 </const>
509 <const name="Running" value="4">
510 <desc>
511 The machine is currently being executed.
512 <note internal="yes">
513 For whoever decides to touch this enum: In order to keep the
514 comparisons in the old source code valid, this state must immediately
515 precede the Paused state.
516 </note>
517 </desc>
518 </const>
519 <const name="Paused" value="5">
520 <desc>
521 Execution of the machine has been paused.
522 <note internal="yes">
523 For whoever decides to touch this enum: In order to keep the
524 comparisons in the old source code valid, this state must immediately
525 follow the Running state.
526 </note>
527 </desc>
528 </const>
529 <const name="Stuck" value="6">
530 <desc>
531 Execution of the machine has reached the "Guru Meditation"
532 condition.
533 </desc>
534 </const>
535 <const name="Starting" value="7">
536 <desc>
537 Machine is being started after powering it on from a
538 zero execution state.
539 </desc>
540 </const>
541 <const name="Stopping" value="8">
542 <desc>
543 Machine is being normally stopped powering it off, or after the guest OS
544 has initiated a shutdown sequence.
545 </desc>
546 </const>
547 <const name="Saving" value="9">
548 <desc>
549 Machine is saving its execution state to a file or an online
550 snapshot of the machine is being taken.
551 </desc>
552 </const>
553 <const name="Restoring" value="10">
554 <desc>
555 Execution state of the machine is being restored from a file
556 after powering it on from the saved execution state.
557 </desc>
558 </const>
559 <const name="Discarding" value="11">
560 <desc>
561 Snapshot of the machine is being discarded.
562 </desc>
563 </const>
564 <const name="SettingUp" value="12">
565 <desc>
566 Lengthy setup operation is in progress.
567 </desc>
568 </const>
569
570 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
571 <desc>
572 Pseudo-state: first online state (for use in relational expressions).
573 </desc>
574 </const>
575 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
576 <desc>
577 Pseudo-state: last online state (for use in relational expressions).
578 </desc>
579 </const>
580
581 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
582 <desc>
583 Pseudo-state: first transient state (for use in relational expressions).
584 </desc>
585 </const>
586 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
587 <desc>
588 Pseudo-state: last transient state (for use in relational expressions).
589 </desc>
590 </const>
591
592 </enum>
593
594 <enum
595 name="SessionState"
596 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
597 >
598 <desc>
599 Session state. This enumeration represents possible values of
600 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
601 attributes. See individual enumerator descriptions for the meaning for
602 every value.
603 </desc>
604
605 <const name="Null" value="0">
606 <desc>Null value (never used by the API).</desc>
607 </const>
608 <const name="Closed" value="1">
609 <desc>
610 The machine has no open sessions (<link to="IMachine::sessionState"/>);
611 the session is closed (<link to="ISession::state"/>)
612 </desc>
613 </const>
614 <const name="Open" value="2">
615 <desc>
616 The machine has an open direct session (<link to="IMachine::sessionState"/>);
617 the session is open (<link to="ISession::state"/>)
618 </desc>
619 </const>
620 <const name="Spawning" value="3">
621 <desc>
622 A new (direct) session is being opened for the machine
623 as a result of <link to="IVirtualBox::openRemoteSession()"/>
624 call (<link to="IMachine::sessionState"/>);
625 the session is currently being opened
626 as a result of <link to="IVirtualBox::openRemoteSession()"/>
627 call (<link to="ISession::state"/>)
628 </desc>
629 </const>
630 <const name="Closing" value="4">
631 <desc>
632 The direct session is being closed (<link to="IMachine::sessionState"/>);
633 the session is being closed (<link to="ISession::state"/>)
634 </desc>
635 </const>
636 </enum>
637
638 <enum
639 name="SessionType"
640 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
641 >
642 <desc>
643 Session type. This enumeration represents possible values of the
644 <link to="ISession::type"/> attribute.
645 </desc>
646
647 <const name="Null" value="0">
648 <desc>Null value (never used by the API).</desc>
649 </const>
650 <const name="Direct" value="1">
651 <desc>
652 Direct session
653 (opened by <link to="IVirtualBox::openSession()"/>)
654 </desc>
655 </const>
656 <const name="Remote" value="2">
657 <desc>
658 Remote session
659 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
660 </desc>
661 </const>
662 <const name="Existing" value="3">
663 <desc>
664 Existing session
665 (opened by <link to="IVirtualBox::openExistingSession()"/>)
666 </desc>
667 </const>
668 </enum>
669
670 <enum
671 name="DeviceType"
672 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
673 >
674 <desc>
675 Device type.
676 </desc>
677 <const name="Null" value="0">
678 <desc>
679 Null value, may also mean "no device" (not allowed for
680 <link to="IConsole::getDeviceActivity"/>).
681 </desc>
682 </const>
683 <const name="Floppy" value="1">
684 <desc>Floppy device.</desc>
685 </const>
686 <const name="DVD" value="2">
687 <desc>CD/DVD-ROM device.</desc>
688 </const>
689 <const name="HardDisk" value="3">
690 <desc>Hard disk device.</desc>
691 </const>
692 <const name="Network" value="4">
693 <desc>Network device.</desc>
694 </const>
695 <const name="USB" value="5">
696 <desc>USB device.</desc>
697 </const>
698 <const name="SharedFolder" value="6">
699 <desc>Shared folder device.</desc>
700 </const>
701 </enum>
702
703 <enum
704 name="DeviceActivity"
705 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
706 >
707 <desc>
708 Device activity for <link to="IConsole::getDeviceActivity"/>.
709 </desc>
710
711 <const name="Null" value="0"/>
712 <const name="Idle" value="1"/>
713 <const name="Reading" value="2"/>
714 <const name="Writing" value="3"/>
715 </enum>
716
717 <enum
718 name="StorageBus"
719 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
720 >
721 <desc>Interface bus type for storage devices.</desc>
722
723 <const name="Null" value="0">
724 <desc>Null value (never used by the API).</desc>
725 </const>
726
727 <const name="IDE" value="1"/>
728 <const name="SATA" value="2"/>
729 </enum>
730
731 <enum
732 name="ClipboardMode"
733 uuid="33364716-4008-4701-8f14-be0fa3d62950"
734 >
735 <desc>
736 Host-Guest clipboard interchange mode.
737 </desc>
738
739 <const name="Disabled" value="0"/>
740 <const name="HostToGuest" value="1"/>
741 <const name="GuestToHost" value="2"/>
742 <const name="Bidirectional" value="3"/>
743 </enum>
744
745 <enum
746 name="Scope"
747 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
748 >
749 <desc>
750 Scope of the operation.
751
752 A generic enumeration used in various methods to define the action or
753 argument scope.
754 </desc>
755
756 <const name="Global" value="0"/>
757 <const name="Machine" value="1"/>
758 <const name="Session" value="2"/>
759 </enum>
760
761 <enum
762 name="GuestStatisticType"
763 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
764 >
765 <desc>
766 Statistics type for <link to="IGuest::getStatistic"/>.
767 </desc>
768
769 <const name="CPULoad_Idle" value="0">
770 <desc>
771 Idle CPU load (0-100%) for last interval.
772 </desc>
773 </const>
774 <const name="CPULoad_Kernel" value="1">
775 <desc>
776 Kernel CPU load (0-100%) for last interval.
777 </desc>
778 </const>
779 <const name="CPULoad_User" value="2">
780 <desc>
781 User CPU load (0-100%) for last interval.
782 </desc>
783 </const>
784 <const name="Threads" value="3">
785 <desc>
786 Total number of threads in the system.
787 </desc>
788 </const>
789 <const name="Processes" value="4">
790 <desc>
791 Total number of processes in the system.
792 </desc>
793 </const>
794 <const name="Handles" value="5">
795 <desc>
796 Total number of handles in the system.
797 </desc>
798 </const>
799 <const name="MemoryLoad" value="6">
800 <desc>
801 Memory load (0-100%).
802 </desc>
803 </const>
804 <const name="PhysMemTotal" value="7">
805 <desc>
806 Total physical memory in megabytes.
807 </desc>
808 </const>
809 <const name="PhysMemAvailable" value="8">
810 <desc>
811 Free physical memory in megabytes.
812 </desc>
813 </const>
814 <const name="PhysMemBalloon" value="9">
815 <desc>
816 Ballooned physical memory in megabytes.
817 </desc>
818 </const>
819 <const name="MemCommitTotal" value="10">
820 <desc>
821 Total amount of memory in the committed state in megabytes.
822 </desc>
823 </const>
824 <const name="MemKernelTotal" value="11">
825 <desc>
826 Total amount of memory used by the guest OS's kernel in megabytes.
827 </desc>
828 </const>
829 <const name="MemKernelPaged" value="12">
830 <desc>
831 Total amount of paged memory used by the guest OS's kernel in megabytes.
832 </desc>
833 </const>
834 <const name="MemKernelNonpaged" value="13">
835 <desc>
836 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
837 </desc>
838 </const>
839 <const name="MemSystemCache" value="14">
840 <desc>
841 Total amount of memory used by the guest OS's system cache in megabytes.
842 </desc>
843 </const>
844 <const name="PageFileSize" value="15">
845 <desc>
846 Pagefile size in megabytes.
847 </desc>
848 </const>
849 <const name="SampleNumber" value="16">
850 <desc>
851 Statistics sample number
852 </desc>
853 </const>
854 <const name="MaxVal" value="17"/>
855 </enum>
856
857 <enum
858 name="BIOSBootMenuMode"
859 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
860 >
861 <desc>
862 BIOS boot menu mode.
863 </desc>
864
865 <const name="Disabled" value="0"/>
866 <const name="MenuOnly" value="1"/>
867 <const name="MessageAndMenu" value="2"/>
868 </enum>
869
870 <enum
871 name="IDEControllerType"
872 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
873 >
874 <desc>
875 IDE controller type.
876 </desc>
877
878 <const name="Null" value="0">
879 <desc>Null value (never used by the API).</desc>
880 </const>
881 <const name="PIIX3" value="1"/>
882 <const name="PIIX4" value="2"/>
883 </enum>
884
885 <enum
886 name="DriveState"
887 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
888 >
889 <const name="Null" value="0">
890 <desc>Null value (never used by the API).</desc>
891 </const>
892 <const name="NotMounted" value="1"/>
893 <const name="ImageMounted" value="2"/>
894 <const name="HostDriveCaptured" value="3"/>
895 </enum>
896
897 <enum
898 name="ProcessorFeature"
899 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
900 >
901 <desc>
902 CPU features.
903 </desc>
904
905 <const name="HWVirtEx" value="0"/>
906 <const name="PAE" value="1"/>
907 <const name="LongMode" value="2"/>
908 </enum>
909
910
911 <!--
912 // IVirtualBoxErrorInfo
913 /////////////////////////////////////////////////////////////////////////
914 -->
915
916 <interface
917 name="IVirtualBoxErrorInfo" extends="$errorinfo"
918 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
919 supportsErrorInfo="no"
920 wsmap="suppress"
921 >
922 <desc>
923 The IVirtualBoxErrorInfo interface represents extended error information.
924
925 Extended error information can be set by VirtualBox components after
926 unsuccessful or partially successful method invocation. This information
927 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
928 and then shown to the client in addition to the plain 32-bit result code.
929
930 In MS COM, this interface extends the IErrorInfo interface,
931 in XPCOM, it extends the nsIException interface. In both cases,
932 it provides a set of common attributes to retrieve error
933 information.
934
935 Sometimes invocation of some component's method may involve methods of
936 other components that may also fail (independently of this method's
937 failure), or a series of non-fatal errors may precede a fatal error that
938 causes method failure. In cases like that, it may be desirable to preserve
939 information about all errors happened during method invocation and deliver
940 it to the caller. The <link to="#next"/> attribute is intended
941 specifically for this purpose and allows to represent a chain of errors
942 through a single IVirtualBoxErrorInfo object set after method invocation.
943
944 Note that errors are stored to a chain in the reverse order, i.e. the
945 initial error object you query right after method invocation is the last
946 error set by the callee, the object it points to in the @a next attribute
947 is the previous error and so on, up to the first error (which is the last
948 in the chain).
949 </desc>
950
951 <attribute name="resultCode" type="result" readonly="yes">
952 <desc>
953 Result code of the error.
954 Usually, it will be the same as the result code returned
955 by the method that provided this error information, but not
956 always. For example, on Win32, CoCreateInstance() will most
957 likely return E_NOINTERFACE upon unsuccessful component
958 instantiation attempt, but not the value the component factory
959 returned.
960 <note>
961 In MS COM, there is no equivalent.
962 In XPCOM, it is the same as nsIException::result.
963 </note>
964 </desc>
965 </attribute>
966
967 <attribute name="interfaceID" type="uuid" readonly="yes">
968 <desc>
969 UUID of the interface that defined the error.
970 <note>
971 In MS COM, it is the same as IErrorInfo::GetGUID.
972 In XPCOM, there is no equivalent.
973 </note>
974 </desc>
975 </attribute>
976
977 <attribute name="component" type="wstring" readonly="yes">
978 <desc>
979 Name of the component that generated the error.
980 <note>
981 In MS COM, it is the same as IErrorInfo::GetSource.
982 In XPCOM, there is no equivalent.
983 </note>
984 </desc>
985 </attribute>
986
987 <attribute name="text" type="wstring" readonly="yes">
988 <desc>
989 Text description of the error.
990 <note>
991 In MS COM, it is the same as IErrorInfo::GetDescription.
992 In XPCOM, it is the same as nsIException::message.
993 </note>
994 </desc>
995 </attribute>
996
997 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
998 <desc>
999 Next error object if there is any, or @c null otherwise.
1000 <note>
1001 In MS COM, there is no equivalent.
1002 In XPCOM, it is the same as nsIException::inner.
1003 </note>
1004 </desc>
1005 </attribute>
1006
1007 </interface>
1008
1009
1010 <!--
1011 // IVirtualBox
1012 /////////////////////////////////////////////////////////////////////////
1013 -->
1014
1015 <interface
1016 name="IVirtualBoxCallback" extends="$unknown"
1017 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1018 wsmap="suppress"
1019 >
1020 <method name="onMachineStateChange">
1021 <desc>
1022 The execution state of the given machine has changed.
1023 <see>IMachine::state</see>
1024 </desc>
1025 <param name="machineId" type="uuid" dir="in">
1026 <desc>ID of the machine this event relates to.</desc>
1027 </param>
1028 <param name="state" type="MachineState" dir="in">
1029 <desc>New execution state.</desc>
1030 </param>
1031 </method>
1032
1033 <method name="onMachineDataChange">
1034 <desc>
1035 Any of the settings of the given machine has changed.
1036 </desc>
1037 <param name="machineId" type="uuid" dir="in">
1038 <desc>ID of the machine this event relates to.</desc>
1039 </param>
1040 </method>
1041
1042 <method name="onExtraDataCanChange">
1043 <desc>
1044 Notification when someone tries to change extra data for
1045 either the given machine or (if null) global extra data.
1046 This gives the chance to veto against changes.
1047 </desc>
1048 <param name="machineId" type="uuid" dir="in">
1049 <desc>
1050 ID of the machine this event relates to
1051 (null ID for global extra data change requests).
1052 </desc>
1053 </param>
1054 <param name="key" type="wstring" dir="in">
1055 <desc>
1056 Extra data key for the attempted write.
1057 </desc>
1058 </param>
1059 <param name="value" type="wstring" dir="in">
1060 <desc>
1061 Extra data value for the given key.
1062 </desc>
1063 </param>
1064 <param name="error" type="wstring" dir="out">
1065 <desc>
1066 Optional error message describing the reason of the
1067 veto (ignored if this notification returns @c true).
1068 </desc>
1069 </param>
1070 <param name="allowChange" type="boolean" dir="return">
1071 <desc>
1072 Flag to indicate whether the callee agrees (@c true)
1073 or vetoes against the change (@c false).
1074 </desc>
1075 </param>
1076 </method>
1077
1078 <method name="onExtraDataChange">
1079 <desc>
1080 Notification when machine specific or global extra data
1081 has changed.
1082 </desc>
1083 <param name="machineId" type="uuid" dir="in">
1084 <desc>
1085 ID of the machine this event relates to.
1086 Null for global extra data changes.
1087 </desc>
1088 </param>
1089 <param name="key" type="wstring" dir="in">
1090 <desc>
1091 Extra data key that has changed.
1092 </desc>
1093 </param>
1094 <param name="value" type="wstring" dir="in">
1095 <desc>
1096 Extra data value for the given key.
1097 </desc>
1098 </param>
1099 </method>
1100
1101 <method name="onMediaRegistered">
1102 <desc>
1103 The given media was registered or unregistered
1104 within this VirtualBox installation.
1105
1106 The @a mediaType parameter describes what type of
1107 media the specified @a mediaId refers to. Possible
1108 values are:
1109
1110 <ul>
1111 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1112 that, if registered, can be obtained using the
1113 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1114 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1115 that, if registered, can be obtained using the
1116 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1117 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1118 that, if registered, can be obtained using the
1119 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1120 </ul>
1121
1122 Note that if this is a deregistration notification,
1123 there is no way to access the object representing the
1124 unregistered media. It is supposed that the
1125 application will do required cleanup based on the @a
1126 mediaId value.
1127 </desc>
1128 <param name="mediaId" type="uuid" dir="in">
1129 <desc>ID of the media this event relates to.</desc>
1130 </param>
1131 <param name="mediaType" type="DeviceType" dir="in">
1132 <desc>Type of the media this event relates to.</desc>
1133 </param>
1134 <param name="registered" type="boolean" dir="in">
1135 <desc>
1136 If true, the media was registered, otherwise it was
1137 unregistered.
1138 </desc>
1139 </param>
1140 </method>
1141
1142 <method name="onMachineRegistered">
1143 <desc>
1144 The given machine was registered or unregistered
1145 within this VirtualBox installation.
1146 </desc>
1147 <param name="machineId" type="uuid" dir="in">
1148 <desc>ID of the machine this event relates to.</desc>
1149 </param>
1150 <param name="registered" type="boolean" dir="in">
1151 <desc>
1152 If true, the machine was registered, otherwise it was
1153 unregistered.
1154 </desc>
1155 </param>
1156 </method>
1157
1158 <method name="onSessionStateChange">
1159 <desc>
1160 The state of the session for the given machine was changed.
1161 <see>IMachine::sessionState</see>
1162 </desc>
1163 <param name="machineId" type="uuid" dir="in">
1164 <desc>ID of the machine this event relates to.</desc>
1165 </param>
1166 <param name="state" type="SessionState" dir="in">
1167 <desc>New session state.</desc>
1168 </param>
1169 </method>
1170
1171 <method name="onSnapshotTaken">
1172 <desc>
1173 A new snapshot of the machine has been taken.
1174 <see>ISnapshot</see>
1175 </desc>
1176 <param name="machineId" type="uuid" dir="in">
1177 <desc>ID of the machine this event relates to.</desc>
1178 </param>
1179 <param name="snapshotId" type="uuid" dir="in">
1180 <desc>ID of the new snapshot.</desc>
1181 </param>
1182 </method>
1183
1184 <method name="onSnapshotDiscarded">
1185 <desc>
1186 Snapshot of the given machine has been discarded.
1187
1188 <note>
1189 This notification is delivered <b>after</b> the snapshot
1190 object has been uninitialized on the server (so that any
1191 attempt to call its methods will return an error).
1192 </note>
1193
1194 <see>ISnapshot</see>
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>ID of the machine this event relates to.</desc>
1198 </param>
1199 <param name="snapshotId" type="uuid" dir="in">
1200 <desc>
1201 ID of the discarded snapshot. <tt>null</tt> means the
1202 current machine state has been discarded (restored from
1203 the current snapshot).
1204 </desc>
1205 </param>
1206 </method>
1207
1208 <method name="onSnapshotChange">
1209 <desc>
1210 Snapshot properties (name and/or description) have been changed.
1211 <see>ISnapshot</see>
1212 </desc>
1213 <param name="machineId" type="uuid" dir="in">
1214 <desc>ID of the machine this event relates to.</desc>
1215 </param>
1216 <param name="snapshotId" type="uuid" dir="in">
1217 <desc>ID of the changed snapshot.</desc>
1218 </param>
1219 </method>
1220
1221 <method name="onGuestPropertyChange">
1222 <desc>
1223 Notification when a guest property has changed.
1224 </desc>
1225 <param name="machineId" type="uuid" dir="in">
1226 <desc>
1227 ID of the machine this event relates to.
1228 </desc>
1229 </param>
1230 <param name="name" type="wstring" dir="in">
1231 <desc>
1232 The name of the property that has changed.
1233 </desc>
1234 </param>
1235 <param name="value" type="wstring" dir="in">
1236 <desc>
1237 The new property value.
1238 </desc>
1239 </param>
1240 <param name="flags" type="wstring" dir="in">
1241 <desc>
1242 The new property flags.
1243 </desc>
1244 </param>
1245 </method>
1246
1247 </interface>
1248
1249 <interface
1250 name="IVirtualBox" extends="$dispatched"
1251 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1252 wsmap="managed"
1253 >
1254 <desc>
1255 The IVirtualBox interface represents the main interface exposed by the
1256 product that provides virtual machine management.
1257
1258 An instance of IVirtualBox is required for the product to do anything
1259 useful. Even though the interface does not expose this, internally,
1260 IVirtualBox is implemented as a singleton and actually lives in the
1261 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1262 IVirtualBox can track the state of all virtual machines on a particular
1263 host, regardless of which frontend started them.
1264
1265 To enumerate all the virtual machines on the host, use the
1266 <link to="IVirtualBox::machines2"/> attribute.
1267 </desc>
1268
1269 <attribute name="version" type="wstring" readonly="yes">
1270 <desc>
1271 A string representing the version number of the product. The
1272 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1273 last number represents the build number and will frequently change.
1274 </desc>
1275 </attribute>
1276
1277 <attribute name="revision" type="unsigned long" readonly="yes">
1278 <desc>
1279 The internal build revision number of the product.
1280 </desc>
1281 </attribute>
1282
1283 <attribute name="packageType" type="wstring" readonly="yes">
1284 <desc>
1285 A string representing the package type of this product. The
1286 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1287 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1288 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1289 this.
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="homeFolder" type="wstring" readonly="yes">
1294 <desc>
1295 Full path to the directory where the global settings file,
1296 <tt>VirtualBox.xml</tt>, is stored.
1297
1298 In this version of VirtualBox, the value of this property is
1299 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1300 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1301 as determined by the host OS), and cannot be changed.
1302
1303 This path is also used as the base to resolve relative paths in
1304 places where relative paths are allowed (unless otherwise
1305 expressly indicated).
1306 </desc>
1307 </attribute>
1308
1309 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1310 <desc>
1311 Full name of the global settings file.
1312 The value of this property corresponds to the value of
1313 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1314 </desc>
1315 </attribute>
1316
1317 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1318 <desc>
1319 Current version of the format of the global VirtualBox settings file
1320 (<tt>VirtualBox.xml</tt>).
1321
1322 The version string has the following format:
1323 <pre>
1324 x.y-platform
1325 </pre>
1326 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1327 versions, and <tt>platform</tt> is the platform identifier.
1328
1329 The current version usually matches the value of the
1330 <link to="#settingsFormatVersion"/> attribute unless the
1331 settings file was created by an older version of VirtualBox and there
1332 was a change of the settings file format since then.
1333
1334 Note that VirtualBox automatically converts settings files from older
1335 versions to the most recent version when reading them (usually at
1336 VirtualBox startup) but it doesn't save the changes back until
1337 you call a method that implicitly saves settings (such as
1338 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1339 explicitly. Therefore, if the value of this attribute differs from the
1340 value of <link to="#settingsFormatVersion"/>, then it
1341 means that the settings file was converted but the result of the
1342 conversion is not yet saved to disk.
1343
1344 The above feature may be used by interactive front-ends to inform users
1345 about the settings file format change and offer them to explicitly save
1346 all converted settings files (the global and VM-specific ones),
1347 optionally create backup copies of the old settings files before saving,
1348 etc.
1349
1350 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1351 </desc>
1352 </attribute>
1353
1354 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1355 <desc>
1356 Most recent version of the settings file format.
1357
1358 The version string has the following format:
1359 <pre>
1360 x.y-platform
1361 </pre>
1362 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1363 versions, and <tt>platform</tt> is the platform identifier.
1364
1365 VirtualBox uses this version of the format when saving settings files
1366 (either as a result of method calls that require to save settings or as
1367 a result of an explicit call to <link to="#saveSettings()"/>).
1368
1369 <see>settingsFileVersion</see>
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="host" type="IHost" readonly="yes">
1374 <desc>Associated host object.</desc>
1375 </attribute>
1376
1377 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1378 <desc>Associated system information object.</desc>
1379 </attribute>
1380
1381 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1382 <desc>
1383 Array of machine objects registered within this VirtualBox instance.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1388 <desc>
1389 Array of hard disk objects known to this VirtualBox installation.
1390
1391 This array contains only base (root) hard disks. All differencing
1392 hard disks of the given base hard disk can be enumerated using
1393 <link to="IHardDisk2::children"/>.
1394 </desc>
1395 </attribute>
1396
1397 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1398 <desc>
1399 Array of CD/DVD image objects registered with this VirtualBox instance.
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1404 <desc>
1405 Array of floppy image objects registered with this VirtualBox instance.
1406 </desc>
1407 </attribute>
1408
1409 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1410
1411 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1412
1413 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1414 <desc>
1415 Collection of global shared folders. Global shared folders are
1416 available to all virtual machines.
1417
1418 New shared folders are added to the collection using
1419 <link to="#createSharedFolder"/>. Existing shared folders can be
1420 removed using <link to="#removeSharedFolder"/>.
1421
1422 <note>
1423 In the current version of the product, global shared folders are not
1424 implemented and therefore this collection is always empty.
1425 </note>
1426 </desc>
1427 </attribute>
1428
1429 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1430 <desc>
1431 Associated performance collector object.
1432 </desc>
1433 </attribute>
1434
1435 <method name="createMachine">
1436 <desc>
1437 Creates a new virtual machine.
1438
1439 The new machine is created unregistered, with the initial configuration
1440 set according to the specified guest OS type. A typical sequence of
1441 actions to create a new virtual machine is as follows:
1442
1443 <ol>
1444 <li>
1445 Call this method to have a new machine created. The returned machine
1446 object will be "mutable" allowing to change any machine property.
1447 </li>
1448
1449 <li>
1450 Configure the machine using the appropriate attributes and methods.
1451 </li>
1452
1453 <li>
1454 Call <link to="IMachine::saveSettings()" /> to write the settings
1455 to the machine's XML settings file. The configuration of the newly
1456 created machine will not be saved to disk until this method is
1457 called.
1458 </li>
1459
1460 <li>
1461 Call <link to="#registerMachine()" /> to add the machine to the list
1462 of machines known to VirtualBox.
1463 </li>
1464 </ol>
1465
1466 You should specify valid name for the newly created machine when calling
1467 this method. See the <link to="IMachine::name"/> attribute description
1468 for more details about the machine name.
1469
1470 The specified guest OS type identifier must match an ID of one of known
1471 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1472 array.
1473
1474 Every machine has a <i>settings file</i> that is used to store
1475 the machine configuration. This file is stored in a directory called the
1476 <i>machine settings subfolder</i>. Both the settings subfolder and file
1477 will have a name that corresponds to the name of the virtual machine.
1478 You can specify where to create the machine setting subfolder using the
1479 @a baseFolder argument. The base folder can be absolute (full path) or
1480 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1481 directory</link>.
1482
1483 If @a baseFolder is a null or empty string (which is recommended), the
1484 <link to="ISystemProperties::defaultMachineFolder">default machine
1485 settings folder</link> will be used as a base folder for the created
1486 machine. Otherwise the given base folder will be used. In either case,
1487 the full path to the resulting settings file has the following
1488 structure:
1489 <pre>
1490 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1491 </pre>
1492
1493 Note that if the resulting settings file already exists, this method
1494 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1495
1496 Optionally, you may specify an UUID of to assign to the created machine.
1497 However, this is not recommended and you should normally pass an empty
1498 (null) UUID to this method so that a new UUID will be automatically
1499 generated for every created machine.
1500
1501 <note>
1502 There is no way to change the name of the settings file or
1503 subfolder of the created machine directly.
1504 </note>
1505
1506 <result name="VBOX_E_OBJECT_NOT_FOUND">
1507 @a osTypeId is invalid.
1508 </result>
1509 <result name="VBOX_E_FILE_ERROR">
1510 Resulting settings file name is invalid or the settings file already
1511 exists or could not be created due to an I/O error.
1512 </result>
1513 <result name="E_INVALIDARG">
1514 @a name is empty or null.
1515 </result>
1516 </desc>
1517
1518 <param name="name" type="wstring" dir="in">
1519 <desc>Machine name.</desc>
1520 </param>
1521 <param name="osTypeId" type="wstring" dir="in">
1522 <desc>Guest OS Type ID.</desc>
1523 </param>
1524 <param name="baseFolder" type="wstring" dir="in">
1525 <desc>Base machine folder (optional).</desc>
1526 </param>
1527 <param name="id" type="uuid" dir="in">
1528 <desc>Machine UUID (optional).</desc>
1529 </param>
1530 <param name="machine" type="IMachine" dir="return">
1531 <desc>Created machine object.</desc>
1532 </param>
1533 </method>
1534
1535 <method name="createLegacyMachine">
1536 <desc>
1537 Creates a new virtual machine in "legacy" mode, using the specified
1538 settings file to store machine settings.
1539
1540 As opposed to machines created by <link to="#createMachine()"/>,
1541 the settings file of the machine created in "legacy" mode is not
1542 automatically renamed when the machine name is changed -- it will always
1543 remain the same as specified in this method call.
1544
1545 The specified settings file name can be absolute (full path) or relative
1546 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1547 directory</link>. If the file name doesn't contain an extension, the
1548 default extension (.xml) will be appended.
1549
1550 Note that the configuration of the newly created machine is not
1551 saved to disk (and therefore no settings file is created)
1552 until <link to="IMachine::saveSettings()"/> is called. If the
1553 specified settings file already exists, this method
1554 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1555
1556 See <link to="#createMachine()"/> for more information.
1557
1558 @deprecated This method may be removed later. Use <link
1559 to="IVirtualBox::createMachine()"/> instead.
1560
1561 <note>
1562 There is no way to change the name of the settings file
1563 of the machine created in "legacy" mode.
1564 </note>
1565
1566 <result name="VBOX_E_OBJECT_NOT_FOUND">
1567 @a osTypeId is invalid.
1568 </result>
1569 <result name="VBOX_E_FILE_ERROR">
1570 @a settingsFile is invalid or the settings file already exists or
1571 could not be created due to an I/O error.
1572 </result>
1573 <result name="E_INVALIDARG">
1574 @a name or @a settingsFile is empty or null.
1575 </result>
1576 </desc>
1577
1578 <param name="name" type="wstring" dir="in">
1579 <desc>Machine name.</desc>
1580 </param>
1581 <param name="osTypeId" type="wstring" dir="in">
1582 <desc>Machine OS Type ID.</desc>
1583 </param>
1584 <param name="settingsFile" type="wstring" dir="in">
1585 <desc>Name of the machine settings file.</desc>
1586 </param>
1587 <param name="id" type="uuid" dir="in">
1588 <desc>Machine UUID (optional).</desc>
1589 </param>
1590 <param name="machine" type="IMachine" dir="return">
1591 <desc>Created machine object.</desc>
1592 </param>
1593 </method>
1594
1595 <method name="openMachine">
1596 <desc>
1597 Opens a virtual machine from the existing settings file.
1598 The opened machine remains unregistered until you call
1599 <link to="#registerMachine()"/>.
1600
1601 The specified settings file name can be absolute
1602 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1603 VirtualBox home directory</link>. This file must exist
1604 and must be a valid machine settings file whose contents
1605 will be used to construct the machine object.
1606
1607 @deprecated Will be removed soon.
1608 <result name="VBOX_E_FILE_ERROR">
1609 Settings file name invalid, not found or sharing violation.
1610 </result>
1611 </desc>
1612 <param name="settingsFile" type="wstring" dir="in">
1613 <desc>
1614 Name of the machine settings file.
1615 </desc>
1616 </param>
1617 <param name="machine" type="IMachine" dir="return">
1618 <desc>Opened machine object.</desc>
1619 </param>
1620 <note>
1621 <link to="IMachine::settingsModified"/> will return
1622 false for the created machine, until any of machine settings
1623 are changed.
1624 </note>
1625 </method>
1626
1627 <method name="registerMachine">
1628 <desc>
1629
1630 Registers the machine previously created using
1631 <link to="#createMachine()"/> or opened using
1632 <link to="#openMachine()"/> within this VirtualBox installation. After
1633 successful method invocation, the
1634 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1635 to all registered callbacks.
1636
1637 <note>
1638 This method implicitly calls <link to="IMachine::saveSettings"/>
1639 to save all current machine settings before registering it.
1640 </note>
1641
1642 <result name="VBOX_E_OBJECT_NOT_FOUND">
1643 No matching virtual machine found.
1644 </result>
1645 <result name="VBOX_E_INVALID_OBJECT_STATE">
1646 Virtual machine was not created within this VirtualBox instance.
1647 </result>
1648
1649 </desc>
1650 <param name="machine" type="IMachine" dir="in"/>
1651 </method>
1652
1653 <method name="getMachine">
1654 <desc>
1655 Attempts to find a virtual machine given its UUID.
1656 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1657 instead.
1658
1659 <result name="VBOX_E_OBJECT_NOT_FOUND">
1660 Could not find registered machine matching @a id.
1661 </result>
1662
1663 </desc>
1664 <param name="id" type="uuid" dir="in"/>
1665 <param name="machine" type="IMachine" dir="return"/>
1666 </method>
1667
1668 <method name="findMachine">
1669 <desc>
1670 Attempts to find a virtual machine given its name.
1671 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1672 instead.
1673
1674 <result name="VBOX_E_OBJECT_NOT_FOUND">
1675 Could not find registered machine matching @a name.
1676 </result>
1677
1678 </desc>
1679 <param name="name" type="wstring" dir="in"/>
1680 <param name="machine" type="IMachine" dir="return"/>
1681 </method>
1682
1683 <method name="unregisterMachine">
1684 <desc>
1685
1686 Unregisters the machine previously registered using
1687 <link to="#registerMachine"/>. After successful method invocation, the
1688 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1689 to all registered callbacks.
1690
1691 <note>
1692 The specified machine must not be in the Saved state, have an open
1693 (or a spawning) direct session associated with it, have snapshots or
1694 have hard disks attached.
1695 </note>
1696
1697 <note>
1698 This method implicitly calls <link to="IMachine::saveSettings"/> to
1699 save all current machine settings before unregistering it.
1700 </note>
1701
1702 <note>
1703 If the given machine is inaccessible (see
1704 <link to="IMachine::accessible"/>), it will be unregistered and
1705 fully uninitialized right afterwards. As a result, the returned
1706 machine object will be unusable and an attempt to call
1707 <b>any</b> method will return the "Object not ready" error.
1708 </note>
1709
1710 <result name="VBOX_E_OBJECT_NOT_FOUND">
1711 Could not find registered machine matching @a id.
1712 </result>
1713 <result name="VBOX_E_INVALID_VM_STATE">
1714 Machine is in Saved state.
1715 </result>
1716 <result name="VBOX_E_INVALID_OBJECT_STATE">
1717 Machine has snapshot or open session or hard disk attached.
1718 </result>
1719
1720 </desc>
1721 <param name="id" type="uuid" dir="in">
1722 <desc>UUID of the machine to unregister.</desc>
1723 </param>
1724 <param name="machine" type="IMachine" dir="return">
1725 <desc>Unregistered machine object.</desc>
1726 </param>
1727 </method>
1728
1729 <method name="openAppliance">
1730 <desc>
1731 Attempts to open the given appliance, which must be in Open Virtual Machine Format (OVF).
1732
1733 As prescribed by the OVF standard, VirtualBox supports OVF in two formats:
1734
1735 <ol>
1736 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
1737 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
1738 this descriptor file references other files, as OVF appliances distributed as a set of
1739 files most likely do, those files must be in the same directory as the descriptor file.</li>
1740
1741 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
1742 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
1743 files and optionally other files.</li>
1744 </ol>
1745
1746 In both cases, VirtualBox will open the OVF descriptor file, parse its contents and create a
1747 new instance of IAppliance representing the OVF file.
1748
1749 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
1750 returned IAppliance object can then be used to retrieve information about the appliance and
1751 import it into VirtualBox. The mere fact that this method returns successfully does not mean
1752 that VirtualBox supports all features requested by the appliance; see the documentation for
1753 <link to="IAppliance" /> for details.
1754
1755 </desc>
1756 <param name="file" type="wstring" dir="in">
1757 <desc>
1758 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
1759 on whether the appliance is distributed as a set of files or as a single file, respectively).
1760 </desc>
1761 </param>
1762 <param name="machine" type="IAppliance" dir="return">
1763 <desc>New appliance.</desc>
1764 </param>
1765 </method>
1766
1767 <method name="createHardDisk2">
1768 <desc>
1769 Creates a new base hard disk object that will use the given storage
1770 format and location for hard disk data.
1771
1772 Note that the actual storage unit is not created by this method. In
1773 order to do it, and before you are able to attach the created hard disk
1774 to virtual machines, you must call one of the following methods to
1775 allocate a format-specific storage unit at the specified location:
1776 <ul>
1777 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1778 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1779 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1780 </ul>
1781
1782 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1783 remain uninitialized until the hard disk storage unit is successfully
1784 created by one of the above methods.
1785
1786 After the storage unit is successfully created, the hard disk gets
1787 remembered by this VirtualBox installation and will be accessible
1788 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1789 methods. Remembered root (base) hard disks are also returned as part of
1790 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1791
1792 The list of all storage formats supported by this VirtualBox
1793 installation can be obtained using
1794 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1795 attribute is empty or <tt>null</tt> then the default storage format
1796 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1797 be used for creating a storage unit of the hard disk.
1798
1799 Note that the format of the location string is storage format specific.
1800 See <link to="IMedium::location"/>, IHardDisk2 and
1801 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1802
1803 <result name="VBOX_E_OBJECT_NOT_FOUND">
1804 @a format identifier is invalid. See
1805 <link to="ISystemProperties::hardDiskFormats"/>.
1806 </result>
1807 <result name="VBOX_E_FILE_ERROR">
1808 @a location is a not valid file name (for file-based formats only).
1809 </result>
1810 <result name="E_INVALIDARG">
1811 @a format is a null or empty string.
1812 </result>
1813 </desc>
1814 <param name="format" type="wstring" dir="in">
1815 <desc>
1816 Identifier of the storage format to use for the new hard disk.
1817 </desc>
1818 </param>
1819 <param name="location" type="wstring" dir="in">
1820 <desc>
1821 Location of the storage unit for the new hard disk.
1822 </desc>
1823 </param>
1824 <param name="hardDisk" type="IHardDisk2" dir="return">
1825 <desc>Created hard disk object.</desc>
1826 </param>
1827 </method>
1828
1829 <method name="openHardDisk2">
1830 <desc>
1831 Opens a hard disk from an existing location.
1832
1833 After the hard disk is successfully opened by this method, it gets
1834 remembered by (known to) this VirtualBox installation and will be
1835 accessible through <link to="#getHardDisk2()"/> and
1836 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1837 are also returned as part of the <link to="#hardDisks2"/> array and can
1838 be attached to virtual machines. See IHardDisk2 for more details.
1839
1840 If a differencing hard disk is to be opened by this method, the
1841 operation will succeed only if its parent hard disk and all ancestors,
1842 if any, are already known to this VirtualBox installation (for example,
1843 were opened by this method before).
1844
1845 This method tries to guess the storage format of the specified hard disk
1846 by reading hard disk data at the specified location.
1847
1848 Note that the format of the location string is storage format specific.
1849 See <link to="IMedium::location"/>, IHardDisk2 and
1850 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1851
1852
1853 <result name="VBOX_E_FILE_ERROR">
1854 Invalid hard disk storage file location.
1855 </result>
1856 <result name="VBOX_E_IPRT_ERROR">
1857 Could not get hard disk storage format.
1858 </result>
1859 <result name="E_INVALIDARG">
1860 Invalid hard disk storage format.
1861 </result>
1862
1863 </desc>
1864 <param name="location" type="wstring" dir="in">
1865 <desc>
1866 Location of the storage unit that contains hard disk data in one of
1867 the supported storage formats.
1868 </desc>
1869 </param>
1870 <param name="hardDisk" type="IHardDisk2" dir="return">
1871 <desc>Opened hard disk object.</desc>
1872 </param>
1873 </method>
1874
1875 <method name="getHardDisk2" const="yes">
1876 <desc>
1877 Returns a hard disk with the given UUID.
1878
1879 The hard disk with the given UUID must be known to this VirtualBox
1880 installation, i.e. it must be previously created by
1881 <link to="#createHardDisk2()"/> or opened by <link
1882 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1883
1884 <result name="VBOX_E_OBJECT_NOT_FOUND">
1885 No hard disk object matching @a id found.
1886 </result>
1887
1888 </desc>
1889 <param name="id" type="uuid" dir="in">
1890 <desc>UUID of the hard disk to look for.</desc>
1891 </param>
1892 <param name="hardDisk" type="IHardDisk2" dir="return">
1893 <desc>Found hard disk object.</desc>
1894 </param>
1895 </method>
1896
1897 <method name="findHardDisk2">
1898 <desc>
1899 Returns a hard disk that uses the given location to store hard
1900 disk data.
1901
1902 The given hard disk must be known to this VirtualBox installation, i.e.
1903 it must be previously created by
1904 <link to="#createHardDisk2()"/> or opened by <link
1905 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1906
1907 The search is done by comparing the value of the @a location argument to
1908 the <link to="IHardDisk2::location"/> attribute of each known hard
1909 disk.
1910
1911 For locations represented by file names in the host's file system, the
1912 requested location can be a path relative to the
1913 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1914 only a file name without any path is given, the
1915 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1916 folder</link> will be prepended to the file name before searching. Note
1917 that on case sensitive file systems, a case sensitive comparison is
1918 performed, otherwise the case of symbols in the file path is ignored.
1919
1920 <result name="VBOX_E_OBJECT_NOT_FOUND">
1921 No hard disk object matching @a location found.
1922 </result>
1923
1924 </desc>
1925 <param name="location" type="wstring" dir="in">
1926 <desc>Location string to search for.</desc>
1927 </param>
1928 <param name="hardDisk" type="IHardDisk2" dir="return">
1929 <desc>Found hard disk object.</desc>
1930 </param>
1931 </method>
1932
1933 <method name="openDVDImage">
1934 <desc>
1935 Opens a CD/DVD image contained in the specified file of the supported
1936 format and assigns it the given UUID.
1937
1938 After the image is successfully opened by this method, it gets
1939 remembered by (known to) this VirtualBox installation and will be
1940 accessible through <link to="#getDVDImage()"/> and
1941 <link to="#findDVDImage()"/> methods. Remembered images are also
1942 returned as part of the <link to="#DVDImages"/> array and can be mounted
1943 to virtual machines. See IMedium for more details.
1944
1945 See <link to="IMedium::location"/> to get more details about the format
1946 of the location string.
1947
1948 <note>
1949 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1950 </note>
1951
1952 <result name="VBOX_E_INVALID_OBJECT_STATE">
1953 CD/DVD image already exists in the media registry.
1954 </result>
1955
1956 </desc>
1957 <param name="location" type="wstring" dir="in">
1958 <desc>
1959 Full path to the file that contains a valid CD/DVD image.
1960 </desc>
1961 </param>
1962 <param name="id" type="uuid" dir="in">
1963 <desc>
1964 UUID to assign to the given image within this VirtualBox installation.
1965 If an empty (null) UUID is specified, the system will randomly
1966 generate a new UUID.
1967 </desc>
1968 </param>
1969 <param name="image" type="IDVDImage2" dir="return">
1970 <desc>Opened CD/DVD image object.</desc>
1971 </param>
1972 </method>
1973
1974 <method name="getDVDImage">
1975 <desc>
1976 Returns a CD/DVD image with the given UUID.
1977
1978 The image with the given UUID must be known to this VirtualBox
1979 installation, i.e. it must be previously opened by <link
1980 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1981
1982 <result name="VBOX_E_OBJECT_NOT_FOUND">
1983 No matching DVD image found in the media registry.
1984 </result>
1985
1986 </desc>
1987 <param name="id" type="uuid" dir="in">
1988 <desc>UUID of the image to look for.</desc>
1989 </param>
1990 <param name="image" type="IDVDImage2" dir="return">
1991 <desc>Found CD/DVD image object.</desc>
1992 </param>
1993 </method>
1994
1995 <method name="findDVDImage">
1996 <desc>
1997 Returns a CD/DVD image with the given image location.
1998
1999 The image with the given UUID must be known to this VirtualBox
2000 installation, i.e. it must be previously opened by <link
2001 to="#openDVDImage()"/>, or mounted to some known virtual machine.
2002
2003 The search is done by comparing the value of the @a location argument to
2004 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2005
2006 The requested location can be a path relative to the
2007 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2008 only a file name without any path is given, the
2009 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2010 folder</link> will be prepended to the file name before searching. Note
2011 that on case sensitive file systems, a case sensitive comparison is
2012 performed, otherwise the case in the file path is ignored.
2013
2014 <result name="VBOX_E_FILE_ERROR">
2015 Invalid image file location.
2016 </result>
2017 <result name="VBOX_E_OBJECT_NOT_FOUND">
2018 No matching DVD image found in the media registry.
2019 </result>
2020
2021 </desc>
2022 <param name="location" type="wstring" dir="in">
2023 <desc>CD/DVD image file path to look for.</desc>
2024 </param>
2025 <param name="image" type="IDVDImage2" dir="return">
2026 <desc>Found CD/DVD image object.</desc>
2027 </param>
2028 </method>
2029
2030 <method name="openFloppyImage">
2031 <desc>
2032 Opens a floppy image contained in the specified file of the supported
2033 format and assigns it the given UUID.
2034
2035 After the image is successfully opened by this method, it gets
2036 remembered by (known to) this VirtualBox installation and will be
2037 accessible through <link to="#getFloppyImage()"/> and
2038 <link to="#findFloppyImage()"/> methods. Remembered images are also
2039 returned as part of the <link to="#floppyImages"/> array and can be
2040 mounted to virtual machines. See IMedium for more details.
2041
2042 See <link to="IMedium::location"/> to get more details about the format
2043 of the location string.
2044
2045 <result name="VBOX_E_FILE_ERROR">
2046 Floppy image specified by @a location not accessible.
2047 </result>
2048 <result name="VBOX_E_INVALID_OBJECT_STATE">
2049 Floppy image already exists in the media registry.
2050 </result>
2051
2052 <note>
2053 Currently, only raw floppy images are supported by VirtualBox.
2054 </note>
2055 </desc>
2056 <param name="location" type="wstring" dir="in">
2057 <desc>
2058 Full path to the file that contains a valid floppy image.
2059 </desc>
2060 </param>
2061 <param name="id" type="uuid" dir="in">
2062 <desc>
2063 UUID to assign to the given image file within this VirtualBox
2064 installation. If an empty (null) UUID is specified, the system will
2065 randomly generate a new UUID.
2066 </desc>
2067 </param>
2068 <param name="image" type="IFloppyImage2" dir="return">
2069 <desc>Opened floppy image object.</desc>
2070 </param>
2071 </method>
2072
2073 <method name="getFloppyImage">
2074 <desc>
2075 Returns a floppy image with the given UUID.
2076
2077 The image with the given UUID must be known to this VirtualBox
2078 installation, i.e. it must be previously opened by <link
2079 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2080
2081 <result name="VBOX_E_OBJECT_NOT_FOUND">
2082 No matching floppy image found in the media registry.
2083 </result>
2084
2085 </desc>
2086 <param name="id" type="uuid" dir="in">
2087 <desc>UUID of the image to look for.</desc>
2088 </param>
2089 <param name="image" type="IFloppyImage2" dir="return">
2090 <desc>Found floppy image object.</desc>
2091 </param>
2092 </method>
2093
2094 <method name="findFloppyImage">
2095 <desc>
2096 Returns a floppy image with the given image location.
2097
2098 The image with the given UUID must be known to this VirtualBox
2099 installation, i.e. it must be previously opened by <link
2100 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2101
2102 The search is done by comparing the value of the @a location argument to
2103 the <link to="IMedium::location"/> attribute of each known floppy image.
2104
2105 The requested location can be a path relative to the
2106 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2107 only a file name without any path is given, the
2108 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2109 folder</link> will be prepended to the file name before searching. Note
2110 that on case sensitive file systems, a case sensitive comparison is
2111 performed, otherwise the case of symbols in the file path is ignored.
2112
2113 <result name="VBOX_E_FILE_ERROR">
2114 Invalid image file location.
2115 </result>
2116 <result name="VBOX_E_OBJECT_NOT_FOUND">
2117 No matching floppy image found in the media registry.
2118 </result>
2119
2120 </desc>
2121 <param name="location" type="wstring" dir="in">
2122 <desc>Floppy image file path to look for.</desc>
2123 </param>
2124 <param name="image" type="IFloppyImage2" dir="return">
2125 <desc>Found floppy image object.</desc>
2126 </param>
2127 </method>
2128
2129 <method name="getGuestOSType">
2130 <desc>
2131 Returns an object describing the specified guest OS type.
2132
2133 The requested guest OS type is specified using a string which is a
2134 mnemonic identifier of the guest operating system, such as
2135 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2136 particular virtual machine can be read or set using the
2137 <link to="IMachine::OSTypeId"/> attribute.
2138
2139 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2140 available guest OS type objects. Each object has an
2141 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2142 the guest OS this object describes.
2143
2144 <result name="E_INVALIDARG">
2145 @a id is not a valid Guest OS type.
2146 </result>
2147
2148 </desc>
2149 <param name="id" type="wstring" dir="in">
2150 <desc>Guest OS type ID string.</desc>
2151 </param>
2152 <param name="type" type="IGuestOSType" dir="return">
2153 <desc>Guest OS type object.</desc>
2154 </param>
2155 </method>
2156
2157 <method name="createSharedFolder">
2158 <desc>
2159 Creates a new global shared folder by associating the given logical
2160 name with the given host path, adds it to the collection of shared
2161 folders and starts sharing it. Refer to the description of
2162 <link to="ISharedFolder"/> to read more about logical names.
2163 <note>
2164 In the current implementation, this operation is not
2165 implemented.
2166 </note>
2167 </desc>
2168 <param name="name" type="wstring" dir="in">
2169 <desc>Unique logical name of the shared folder.</desc>
2170 </param>
2171 <param name="hostPath" type="wstring" dir="in">
2172 <desc>Full path to the shared folder in the host file system.</desc>
2173 </param>
2174 <param name="writable" type="boolean" dir="in">
2175 <desc>Whether the share is writable or readonly</desc>
2176 </param>
2177 </method>
2178
2179 <method name="removeSharedFolder">
2180 <desc>
2181 Removes the global shared folder with the given name previously
2182 created by <link to="#createSharedFolder"/> from the collection of
2183 shared folders and stops sharing it.
2184 <note>
2185 In the current implementation, this operation is not
2186 implemented.
2187 </note>
2188 </desc>
2189 <param name="name" type="wstring" dir="in">
2190 <desc>Logical name of the shared folder to remove.</desc>
2191 </param>
2192 </method>
2193
2194 <method name="getNextExtraDataKey">
2195 <desc>
2196 Returns the global extra data key name following the supplied key.
2197
2198 An error is returned if the supplied @a key does not exist. @c NULL is
2199 returned in @a nextKey if the supplied key is the last key. When
2200 supplying @c NULL for the @a key, the first key item is returned in @a
2201 nextKey (if there is any). @a nextValue is an optional parameter and
2202 if supplied, the next key's value is returned in it.
2203
2204 <result name="VBOX_E_OBJECT_NOT_FOUND">
2205 Extra data @a key not found.
2206 </result>
2207
2208 </desc>
2209 <param name="key" type="wstring" dir="in">
2210 <desc>Name of the data key to follow.</desc>
2211 </param>
2212 <param name="nextKey" type="wstring" dir="out">
2213 <desc>Name of the next data key.</desc>
2214 </param>
2215 <param name="nextValue" type="wstring" dir="out">
2216 <desc>Value of the next data key.</desc>
2217 </param>
2218 </method>
2219
2220 <method name="getExtraData">
2221 <desc>
2222 Returns associated global extra data.
2223
2224 If the requested data @a key does not exist, this function will
2225 succeed and return @c NULL in the @a value argument.
2226
2227 <result name="VBOX_E_FILE_ERROR">
2228 Settings file not accessible.
2229 </result>
2230 <result name="VBOX_E_XML_ERROR">
2231 Could not parse the settings file.
2232 </result>
2233
2234 </desc>
2235 <param name="key" type="wstring" dir="in">
2236 <desc>Name of the data key to get.</desc>
2237 </param>
2238 <param name="value" type="wstring" dir="return">
2239 <desc>Value of the requested data key.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="setExtraData">
2244 <desc>
2245 Sets associated global extra data.
2246
2247 If you pass @c NULL as a key @a value, the given @a key will be
2248 deleted.
2249
2250 <note>
2251 Before performing the actual data change, this method will ask all
2252 registered callbacks using the
2253 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2254 notification for a permission. If one of the callbacks refuses the
2255 new value, the change will not be performed.
2256 </note>
2257 <note>
2258 On success, the
2259 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2260 is called to inform all registered callbacks about a successful data
2261 change.
2262 </note>
2263
2264 <result name="VBOX_E_FILE_ERROR">
2265 Settings file not accessible.
2266 </result>
2267 <result name="VBOX_E_XML_ERROR">
2268 Could not parse the settings file.
2269 </result>
2270 <result name="E_ACCESSDENIED">
2271 Modification request refused.
2272 </result>
2273
2274 </desc>
2275 <param name="key" type="wstring" dir="in">
2276 <desc>Name of the data key to set.</desc>
2277 </param>
2278 <param name="value" type="wstring" dir="in">
2279 <desc>Value to assign to the key.</desc>
2280 </param>
2281 </method>
2282
2283 <method name="openSession">
2284 <desc>
2285 Opens a new direct session with the given virtual machine.
2286
2287 A direct session acts as a local lock on the given VM.
2288 There can be only one direct session open at a time for every
2289 virtual machine, protecting the VM from being manipulated by
2290 conflicting actions from different processes. Only after a
2291 direct session has been opened, one can change all VM settings
2292 and execute the VM in the process space of the session object.
2293
2294 Sessions therefore can be compared to mutex semaphores that
2295 lock a given VM for modification and execution.
2296 See <link to="ISession">ISession</link> for details.
2297
2298 <note>Unless you are writing a new VM frontend, you will not
2299 want to execute a VM in the current process. To spawn a new
2300 process that executes a VM, use
2301 <link to="IVirtualBox::openRemoteSession" />
2302 instead.</note>
2303
2304 Upon successful return, the session object can be used to
2305 get access to the machine and to the VM console.
2306
2307 In VirtualBox terminology, the machine becomes "mutable" after
2308 a session has been opened. Note that the "mutable" machine
2309 object, on which you may invoke IMachine methods to change its
2310 settings, will be a different object from the immutable IMachine
2311 objects returned by various IVirtualBox methods. To obtain a
2312 mutable IMachine object (upon which you can invoke settings methods),
2313 use the <link to="ISession::machine" /> attribute.
2314
2315 One must always call <link to="ISession::close" /> to release the
2316 lock on the machine, or the machine's state will eventually be
2317 set to "Aborted".
2318
2319 In other words, to change settings on a machine, the following
2320 sequence is typically performed:
2321
2322 <ol>
2323 <li>Call this method (openSession) to have a machine locked for
2324 the current session.</li>
2325
2326 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2327
2328 <li>Change the settings of the machine.</li>
2329
2330 <li>Call <link to="IMachine::saveSettings" />.</li>
2331
2332 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2333 </ol>
2334
2335 <result name="E_UNEXPECTED">
2336 Virtual machine not registered.
2337 </result>
2338 <result name="E_ACCESSDENIED">
2339 Process not started by OpenRemoteSession.
2340 </result>
2341 <result name="VBOX_E_OBJECT_NOT_FOUND">
2342 No matching virtual machine found.
2343 </result>
2344 <result name="VBOX_E_INVALID_OBJECT_STATE">
2345 Session already open or being opened.
2346 </result>
2347 <result name="VBOX_E_VM_ERROR">
2348 Failed to assign machine to session.
2349 </result>
2350
2351 </desc>
2352 <param name="session" type="ISession" dir="in">
2353 <desc>
2354 Session object that will represent the opened session after
2355 successful method invocation. This object must not represent
2356 the already open session.
2357 <note>
2358 This session will be automatically closed if the
2359 VirtualBox server is terminated for some reason.
2360 </note>
2361 </desc>
2362 </param>
2363 <param name="machineId" type="uuid" dir="in">
2364 <desc>ID of the virtual machine to open a session with.</desc>
2365 </param>
2366 </method>
2367
2368 <method name="openRemoteSession">
2369 <desc>
2370 Spawns a new process that executes a virtual machine (called a
2371 "remote session").
2372
2373 Opening a remote session causes the VirtualBox server to start a new
2374 process that opens a direct session with the given VM. As a result, the
2375 VM is locked by that direct session in the new process, preventing
2376 conflicting changes from other processes. Since sessions act as locks
2377 that prevent conflicting changes, one cannot open a remote session
2378 for a VM that already has another open session (direct or remote), or
2379 is currently in the process of opening one (see <link
2380 to="IMachine::sessionState"/>).
2381
2382 While the remote session still provides some level of control over the
2383 VM execution to the caller (using the <link to="IConsole" /> interface),
2384 not all VM settings are available for modification within the remote
2385 session context.
2386
2387 This operation can take some time (a new VM is started in a new process,
2388 for which memory and other resources need to be set up). Because of this,
2389 an <link to="IProgress" /> is returned to allow the caller to wait for this
2390 asynchronous operation to be completed. Until then, the remote session
2391 object remains in the closed state, and accessing the machine or its
2392 console through it is invalid. It is recommended to use
2393 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2394 completion.
2395
2396 As with all <link to="ISession" /> objects, it is recommended to call
2397 <link to="ISession::close" /> on the local session object once openRemoteSession()
2398 has been called. However, the session's state (see <link to="ISession::state" />)
2399 will not return to "Closed" until the remote session has also closed (i.e.
2400 until the VM is no longer running). In that case, however, the state of
2401 the session will automatically change back to "Closed".
2402
2403 Currently supported session types (values of the @a type
2404 argument) are:
2405 <ul>
2406 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2407 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2408 </ul>
2409
2410 The @a environment argument is a string containing definitions of
2411 environment variables in the following format:
2412 @code
2413 NAME[=VALUE]\n
2414 NAME[=VALUE]\n
2415 ...
2416 @endcode
2417 where <tt>\\n</tt> is the new line character. These environment
2418 variables will be appended to the environment of the VirtualBox server
2419 process. If an environment variable exists both in the server process
2420 and in this list, the value from this list takes precedence over the
2421 server's variable. If the value of the environment variable is
2422 omitted, this variable will be removed from the resulting environment.
2423 If the environment string is @c null, the server environment is
2424 inherited by the started process as is.
2425
2426 <see>openExistingSession</see>
2427
2428 <result name="E_UNEXPECTED">
2429 Virtual machine not registered.
2430 </result>
2431 <result name="E_INVALIDARG">
2432 Invalid session type @a type.
2433 </result>
2434 <result name="VBOX_E_OBJECT_NOT_FOUND">
2435 No machine matching @a machineId found.
2436 </result>
2437 <result name="VBOX_E_INVALID_OBJECT_STATE">
2438 Session already open or being opened.
2439 </result>
2440 <result name="VBOX_E_IPRT_ERROR">
2441 Launching process for machine failed.
2442 </result>
2443 <result name="VBOX_E_VM_ERROR">
2444 Failed to assign machine to session.
2445 </result>
2446
2447 </desc>
2448 <param name="session" type="ISession" dir="in">
2449 <desc>
2450 Session object that will represent the opened remote session
2451 after successful method invocation (this object must not
2452 represent an already open session).
2453 </desc>
2454 </param>
2455 <param name="machineId" type="uuid" dir="in">
2456 <desc>ID of the virtual machine to open a session with.</desc>
2457 </param>
2458 <param name="type" type="wstring" dir="in">
2459 <desc>
2460 Type of the remote session (case sensitive).
2461 </desc>
2462 </param>
2463 <param name="environment" type="wstring" dir="in">
2464 <desc>
2465 Environment to pass to the opened session (may be @c null).
2466 </desc>
2467 </param>
2468 <param name="progress" type="IProgress" dir="return">
2469 <desc>Progress object to track the operation completion.</desc>
2470 </param>
2471 </method>
2472
2473 <method name="openExistingSession">
2474 <desc>
2475 Opens a new remote session with the virtual machine for
2476 which a direct session is already open.
2477
2478 The remote session provides some level of control over the VM
2479 execution (using the IConsole interface) to the caller; however,
2480 within the remote session context, not all VM settings are available
2481 for modification.
2482
2483 As opposed to <link to="#openRemoteSession()"/>, the number of
2484 remote sessions opened this way is not limited by the API
2485
2486 <note>
2487 It is an error to open a remote session with the machine that
2488 doesn't have an open direct session.
2489 </note>
2490
2491 <result name="E_UNEXPECTED">
2492 Virtual machine not registered.
2493 </result>
2494 <result name="VBOX_E_OBJECT_NOT_FOUND">
2495 No machine matching @a machineId found.
2496 </result>
2497 <result name="VBOX_E_INVALID_OBJECT_STATE">
2498 Session already open or being opened.
2499 </result>
2500 <result name="VBOX_E_INVALID_SESSION_STATE">
2501 Direct session state not Open.
2502 </result>
2503 <result name="VBOX_E_VM_ERROR">
2504 Failed to get console object from direct session or assign
2505 machine to session.
2506 </result>
2507
2508 <see>openRemoteSession</see>
2509 </desc>
2510 <param name="session" type="ISession" dir="in">
2511 <desc>
2512 Session object that will represent the open remote session
2513 after successful method invocation. This object must not
2514 represent an already open session.
2515 <note>
2516 This session will be automatically closed when the peer
2517 (direct) session dies or gets closed.
2518 </note>
2519 </desc>
2520 </param>
2521 <param name="machineId" type="uuid" dir="in">
2522 <desc>ID of the virtual machine to open a session with.</desc>
2523 </param>
2524 </method>
2525
2526 <method name="registerCallback">
2527 <desc>
2528 Registers a new global VirtualBox callback. The methods of the given
2529 callback object will be called by VirtualBox when an appropriate
2530 event occurs.
2531
2532 <result name="E_INVALIDARG">
2533 Registering a @c NULL @a callback is pretty pointless, ain't it?
2534 <!-- See if someone is actually reading this and objects :-) -->
2535 </result>
2536
2537 </desc>
2538 <param name="callback" type="IVirtualBoxCallback" dir="in">
2539 <desc>Callback object to register.</desc>
2540 </param>
2541 </method>
2542
2543 <method name="unregisterCallback">
2544 <desc>
2545 Unregisters the previously registered global VirtualBox callback.
2546
2547 <result name="E_INVALIDARG">
2548 Specified @a callback not registered.
2549 </result>
2550
2551 </desc>
2552 <param name="callback" type="IVirtualBoxCallback" dir="in">
2553 <desc>Callback object to unregister.</desc>
2554 </param>
2555 </method>
2556
2557 <method name="waitForPropertyChange">
2558 <desc>
2559 Blocks the caller until any of the properties represented by the @a
2560 what argument changes the value or until the given timeout interval
2561 expires.
2562
2563 The @a what argument is a comma separated list of property masks that
2564 describe properties the caller is interested in. The property mask is
2565 a string in the following format:
2566
2567 <pre>
2568 [[group.]subgroup.]name
2569 </pre>
2570
2571 where @c name is the property name and @c group, @c subgroup are zero
2572 or more property group specifiers. Each element (group or name) in
2573 the property mask may be either a Latin string or an asterisk symbol
2574 (@c "*") which is used to match any string for the given element. A
2575 property mask that doesn't contain asterisk symbols represents a
2576 single fully qualified property name.
2577
2578 Groups in the fully qualified property name go from more generic (the
2579 left-most part) to more specific (the right-most part). The first
2580 element is usually a name of the object the property belongs to. The
2581 second element may be either a property name, or a child object name,
2582 or an index if the preceding element names an object which is one of
2583 many objects of the same type. This way, property names form a
2584 hierarchy of properties. Here are some examples of property names:
2585
2586 <table>
2587 <tr>
2588 <td><tt>VirtualBox.version</tt></td>
2589 <td><link to="IVirtualBox::version"/> property</td>
2590 </tr>
2591 <tr>
2592 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2593 <td><link to="IMachine::name"/> property of the machine with the
2594 given UUID</td>
2595 </tr>
2596 </table>
2597
2598 Most property names directly correspond to the properties of objects
2599 (components) provided by the VirtualBox library and may be used to
2600 track changes to these properties. However, there may be
2601 pseudo-property names that don't correspond to any existing object's
2602 property directly, as well as there may be object properties that
2603 don't have a corresponding property name that is understood by this
2604 method, and therefore changes to such properties cannot be
2605 tracked. See individual object's property descriptions to get a
2606 fully qualified property name that can be used with this method (if
2607 any).
2608
2609 There is a special property mask @c "*" (i.e. a string consisting of a
2610 single asterisk symbol) that can be used to match all properties.
2611 Below are more examples of property masks:
2612
2613 <table>
2614 <tr>
2615 <td><tt>VirtualBox.*</tt></td>
2616 <td>Track all properties of the VirtualBox object</td>
2617 </tr>
2618 <tr>
2619 <td><tt>Machine.*.name</tt></td>
2620 <td>Track changes to the <link to="IMachine::name"/> property of
2621 all registered virtual machines</td>
2622 </tr>
2623 </table>
2624
2625 <note>
2626 This function is not implemented in the current version of the
2627 product.
2628 </note>
2629 </desc>
2630 <param name="what" type="wstring" dir="in">
2631 <desc>Comma separated list of property masks.</desc>
2632 </param>
2633 <param name="timeout" type="unsigned long" dir="in">
2634 <desc>
2635 Wait timeout in milliseconds.
2636 Specify -1 for an indefinite wait.
2637 </desc>
2638 </param>
2639 <param name="changed" type="wstring" dir="out">
2640 <desc>
2641 Comma separated list of properties that have been changed and caused
2642 this method to return to the caller.
2643 </desc>
2644 </param>
2645 <param name="values" type="wstring" dir="out">
2646 <desc>Reserved, not currently used.</desc>
2647 </param>
2648 </method>
2649
2650 <method name="saveSettings">
2651 <desc>
2652 Saves the global settings to the global settings file
2653 (<link to="#settingsFilePath"/>).
2654
2655 This method is only useful for explicitly saving the global settings
2656 file after it has been auto-converted from the old format to the most
2657 recent format (see <link to="#settingsFileVersion"/> for details).
2658 Normally, the global settings file is implicitly saved when a global
2659 setting is changed.
2660
2661 <result name="VBOX_E_FILE_ERROR">
2662 Settings file not accessible.
2663 </result>
2664 <result name="VBOX_E_XML_ERROR">
2665 Could not parse the settings file.
2666 </result>
2667
2668 </desc>
2669 </method>
2670
2671 <method name="saveSettingsWithBackup">
2672 <desc>
2673 Creates a backup copy of the global settings file
2674 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2675 calls <link to="#saveSettings()"/>.
2676
2677 Note that the backup copy is created <b>only</b> if the settings file
2678 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2679 details). Otherwise, this call is fully equivalent to
2680 <link to="#saveSettings()"/> and no backup copying is done.
2681
2682 The backup copy is created in the same directory where the original
2683 settings file is located. It is given the following file name:
2684 <pre>
2685 original.xml.x.y-platform.bak
2686 </pre>
2687 where <tt>original.xml</tt> is the original settings file name
2688 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2689 format of the settings file (before auto-conversion).
2690
2691 If the given backup file already exists, this method will try to add the
2692 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2693 0 to 9) and copy it again until it succeeds. If all suffixes are
2694 occupied, or if any other copy error occurs, this method will return a
2695 failure.
2696
2697 If the copy operation succeeds, the @a bakFileName return argument will
2698 receive a full path to the created backup file (for informational
2699 purposes). Note that this will happen even if the subsequent
2700 <link to="#saveSettings()"/> call performed by this method after the
2701 copy operation, fails.
2702
2703 <note>
2704 The VirtualBox API never calls this method. It is intended purely for
2705 the purposes of creating backup copies of the settings files by
2706 front-ends before saving the results of the automatically performed
2707 settings conversion to disk.
2708 </note>
2709
2710 <see>settingsFileVersion</see>
2711
2712 <result name="VBOX_E_FILE_ERROR">
2713 Settings file not accessible.
2714 </result>
2715 <result name="VBOX_E_XML_ERROR">
2716 Could not parse the settings file.
2717 </result>
2718 <result name="VBOX_E_IPRT_ERROR">
2719 Could not copy the settings file.
2720 </result>
2721
2722 </desc>
2723 <param name="bakFileName" type="wstring" dir="return">
2724 <desc>Full path to the created backup copy.</desc>
2725 </param>
2726 </method>
2727
2728 </interface>
2729
2730 <!--
2731 // IAppliance
2732 /////////////////////////////////////////////////////////////////////////
2733 -->
2734
2735 <enum
2736 name="CIMOSType"
2737 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2738 >
2739 <desc>
2740 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2741 </desc>
2742
2743 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2744 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2745 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2746 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2747 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2748 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2749 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2750 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2751 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2752 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2753 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2754 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2755 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2756 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2757 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2758 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2759 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2760 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2761 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2762 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2763 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2764 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2765 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2766 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2767 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2768 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2769 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2770 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2771 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2772 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2773 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2774 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2775 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2776 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2777 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2778 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2779 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2780 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2781 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2782 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2783 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2784 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2785 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2786 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2787 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2788 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2789 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2790 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2791 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2792 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2793 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2794 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2795 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2796 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2797 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2798 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2799 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2800 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2801 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2802 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2803 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2804 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2805 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2806 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2807 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2808 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2809 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2810 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2811 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2812 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2813 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2814 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2815 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2816 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2817 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2818 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2819 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2820 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2821 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2822 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2823 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2824 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2825 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2826 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2827 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2828 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2829 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2830 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2831 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2832 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2833 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2834 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2835 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2836 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2837 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2838 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2839 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2840 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2841 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2842 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2843 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2844 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2845 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2846 </enum>
2847
2848 <enum
2849 name="OVFResourceType"
2850 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2851 >
2852 <desc>
2853 OVF resource type.
2854 </desc>
2855
2856 <const name="Other" value="1" />
2857 <const name="ComputerSystem" value="2" />
2858 <const name="Processor" value="3" />
2859 <const name="Memory" value="4" />
2860 <const name="IdeController" value="5" />
2861 <const name="ParallelScsiHba" value="6" />
2862 <const name="FcHba" value="7" />
2863 <const name="iScsiHba" value="8" />
2864 <const name="IbHca" value="9" />
2865 <const name="EthernetAdapter" value="10" />
2866 <const name="OtherNetworkAdapter" value="11" />
2867 <const name="IoSlot" value="12" />
2868 <const name="IoDevice" value="13" />
2869 <const name="FloppyDrive" value="14" />
2870 <const name="CdDrive" value="15" />
2871 <const name="DvdDrive" value="16" />
2872 <const name="HardDisk" value="17" />
2873 <const name="UsbController" value="23" />
2874 <const name="SoundCard" value="35" />
2875 </enum>
2876
2877 <interface
2878 name="IAppliance" extends="$unknown"
2879 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
2880 wsmap="managed"
2881 >
2882 <desc>
2883 Represents an appliance in OVF format. An instance of this is returned by
2884 <link to="IVirtualBox::openAppliance" />.
2885
2886 Importing an OVF appliance into VirtualBox is a three-step process:
2887
2888 <ol>
2889 <li>
2890 Call <link to="IVirtualBox::openAppliance" /> with the full path of the OVF
2891 file. So long as the appliance file is syntactically valid, this will succeed
2892 and return an instance of IAppliance that contains the parsed data from the
2893 OVF file.
2894 </li>
2895
2896 <li>The caller should then invoke <link to="#interpret" />, which
2897 analyzes the OVF data and sets up the contents of the IAppliance attributes
2898 accordingly. These can be inspected by a VirtualBox front-end such as the GUI,
2899 and the suggestions can be displayed to the user. For example, the virtual system
2900 will contain the virtual hardware prescribed by the OVF (network and hardware
2901 adapters, virtual disk images, memory size and so on), and the GUI can then give
2902 the user the option to confirm and/or change these suggestions.
2903 </li>
2904
2905 <li>Finally, the caller should invoke <link to="#importAppliance" />, which will
2906 create virtual machines in VirtualBox as instances of <link to="IMachine" /> that
2907 match the information in the virtual system descriptions.
2908 </li>
2909 </ol>
2910
2911 </desc>
2912
2913 <attribute name="path" type="wstring" readonly="yes">
2914 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2915 the <tt>.ova</tt> file passed to <link to="IVirtualBox::openAppliance" />.</desc>
2916 </attribute>
2917
2918 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2919 <desc>
2920 Array of virtual disk definitions. One such description exists for each
2921 disk definition in the OVF; each string array item represents one such piece of
2922 disk information, with the information fields separated by tab (\t) characters.
2923
2924 The caller should be prepared for additional fields being appended to
2925 this string in future versions of VirtualBox and therefore check for
2926 the number of tabs in the strings returned.
2927
2928 In the current version, the following eight fields are returned per string
2929 in the array:
2930
2931 <ol>
2932 <li>Disk ID (unique string identifier given to disk)</li>
2933 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2934 <li>Populated size (optional unsigned integer indicating the current size of the
2935 disk; can be approximate; -1 if unspecified)</li>
2936 <li>Format (string identifying the disk format, typically
2937 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2938 <li>Reference (where to find the disk image, typically a file name; if empty,
2939 then the disk should be created on import)</li>
2940 <li>Image size (optional unsigned integer indicating the size of the image,
2941 which need not necessarily be the same as the values specified above, since
2942 the image may be compressed or sparse; -1 if not specified)</li>
2943 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2944 presently unsupported and always -1)</li>
2945 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2946 </ol>
2947 </desc>
2948 </attribute>
2949
2950 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2951 <desc>
2952 Array of virtual system descriptions. One such description is created
2953 for each virtual system found in the OVF. The array is empty until after <link to="#interpret" />
2954 has been called.
2955 </desc>
2956 </attribute>
2957
2958 <method name="interpret">
2959 <desc>
2960 Interprets the OVF data that was read when the appliance was constructed. After
2961 calling this method, one can inspect the
2962 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2963 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2964 the appliance.
2965
2966 Calling this method is the second step of importing an appliance into VirtualBox;
2967 see <link to="IAppliance" /> for an overview.
2968 </desc>
2969 </method>
2970
2971 <method name="importAppliance">
2972 <desc>
2973 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2974 and other interfaces that match the information contained in the appliance as
2975 closely as possible, as represented by the import instructions in the
2976 <link to="#virtualSystemDescriptions" /> array.
2977
2978 Calling this method is the final step of importing an appliance into VirtualBox;
2979 see <link to="IAppliance" /> for an overview.
2980
2981 Since importing the appliance may imply copying disk images, which can take a long
2982 time, this method operates asynchronously and returns an IProgress object to allow
2983 the caller to monitor the progress.
2984 </desc>
2985
2986 <param name="aProgress" type="IProgress" dir="return">
2987 <desc></desc>
2988 </param>
2989 </method>
2990
2991 </interface>
2992
2993 <enum
2994 name="VirtualSystemDescriptionType"
2995 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
2996 >
2997 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2998 a configuration value.</desc>
2999
3000 <const name="Ignore" value="1" />
3001 <const name="Name" value="2" />
3002 <const name="OS" value="3" />
3003 <const name="CPU" value="4" />
3004 <const name="Memory" value="5" />
3005 <const name="HardDiskControllerIDE" value="6" />
3006 <const name="HardDiskControllerSATA" value="7" />
3007 <const name="HardDiskControllerSCSI" value="8" />
3008 <const name="HardDiskImage" value="9" />
3009 <const name="CDROM" value="10" />
3010 <const name="Floppy" value="11" />
3011 <const name="NetworkAdapter" value="12" />
3012 <const name="USBController" value="13" />
3013 <const name="SoundCard" value="14" />
3014
3015 </enum>
3016
3017 <interface
3018 name="IVirtualSystemDescription" extends="$unknown"
3019 uuid="c76de96b-b316-4a42-9afb-18ce08cce0c9"
3020 wsmap="managed"
3021 >
3022
3023 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3024 After <link to="IAppliance::interpret" /> has been called, that array contains
3025 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3026 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3027 into VirtualBox.
3028 </desc>
3029
3030 <method name="getDescription">
3031 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3032 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3033
3034 The list below identifies the value sets that are possible depending on the
3035 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3036 the array item with the same index in aOrigValue[] will contain the original value as contained
3037 in the OVF file (just for informational purposes), and the corresponding item in aConfigValues[]
3038 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3039 the aExtraConfigValues[] array item may also be used.
3040
3041 <ul>
3042 <li>
3043 "OS": the guest operating system type. There must be exactly one such array item on import. The
3044 corresponding item in aConfigValues[] contains the suggested guest operating system for VirtualBox.
3045 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3046 item in aOrigValues[] will contain a numerical value that described the operating system in the OVF
3047 (see <link to="CIMOSType" />).
3048 </li>
3049 <li>
3050 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3051 if none is present on import, then an automatic name will be created from the operating system
3052 type. The correponding item im aOrigValues[] will contain the suggested virtual machine name
3053 from the OVF file, and aConfigValues[] will contain a suggestion for a unique VirtualBox
3054 <link to="IMachine" /> name that does not exist yet.
3055 </li>
3056 <li>
3057 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3058 </li>
3059 <li>
3060 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3061 is present on import, then VirtualBox will set a meaningful default based on the operating system
3062 type.
3063 </li>
3064 <li>
3065 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3066 The items in aOrigValues[] and aConfigValues[] will either be "LsiLogic" or "BusLogic". The
3067 matching item in the aRefs[] array will contain an integer that other items of the "Harddisk"
3068 type can use to specify which hard disk controller a virtual disk should be connected to.
3069 </li>
3070 <li>
3071 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3072 has no value in aOrigValues[] or aAutoValues[]. The matching item in the aRefs[] array will be
3073 used as with SCSI controllers (see above).
3074 </li>
3075 <li>
3076 "Harddisk": a virtual hard disk, most probably as a reference to an image file. There can be an
3077 arbitrary number of these items, one for each virtual disk image that accompanies the OVF. The
3078 array item in aOrigValues[] will contain the file specification from the OVF file, whereas the item
3079 in aConfigValues[] will contain a qualified path specification where the hard disk image should
3080 be copied to; this target image will then be registered with VirtualBox.
3081 The matching item in the aRefs[] array must contain a integer specifying the hard disk controller
3082 to connect the image to. This number must be the same as the integer used by one of the hard disk
3083 controller items (SCSI, SATA or IDE; see above).
3084 </li>
3085 <li>
3086 "NetworkAdapter": a network adapter. (todo document)
3087 </li>
3088 <li>
3089 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3090 present, sound support will be enabled for the new virtual machine. Note that the virtual
3091 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3092 may be different from the virtual soundcard expected by the appliance.
3093 </li>
3094 </ul>
3095
3096 </desc>
3097
3098 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3099 <desc></desc>
3100 </param>
3101
3102 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3103 <desc></desc>
3104 </param>
3105
3106 <param name="aOrigValues" type="wstring" dir="out" safearray="yes">
3107 <desc></desc>
3108 </param>
3109
3110 <param name="aConfigValues" type="wstring" dir="out" safearray="yes">
3111 <desc></desc>
3112 </param>
3113
3114 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3115 <desc></desc>
3116 </param>
3117
3118 </method>
3119
3120 <method name="disableItem">
3121 <desc>
3122 Disables part of the configuration, as represented by the array items returned by
3123 <link to="getDescription" />. For example, to disable USB support for a given
3124 virtual system, pass in the array item index of the USB controller; its type will
3125 then be changed by this method from "USBController" to "Ignore".
3126
3127 This works only for items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3128 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3129 and SoundCard.
3130 </desc>
3131
3132 <param name="index" type="unsigned long" dir="in">
3133 </param>
3134 </method>
3135
3136 <method name="SetFinalValues">
3137 <desc></desc>
3138
3139 <param name="aFinaleValues" type="wstring" dir="in" safearray="yes">
3140 <desc></desc>
3141 </param>
3142
3143 </method>
3144
3145 </interface>
3146
3147
3148 <!--
3149 // IMachine
3150 /////////////////////////////////////////////////////////////////////////
3151 -->
3152
3153 <enumerator
3154 name="IMachineEnumerator" type="IMachine"
3155 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
3156 />
3157
3158 <collection
3159 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
3160 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
3161 readonly="yes"
3162 />
3163
3164 <interface
3165 name="IInternalMachineControl" extends="$unknown"
3166 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
3167 internal="yes"
3168 wsmap="suppress"
3169 >
3170 <method name="updateState">
3171 <desc>
3172 Updates the VM state.
3173 <note>
3174 This operation will also update the settings file with
3175 the correct information about the saved state file
3176 and delete this file from disk when appropriate.
3177 </note>
3178 </desc>
3179 <param name="state" type="MachineState" dir="in"/>
3180 </method>
3181
3182 <method name="getIPCId">
3183 <param name="id" type="wstring" dir="return"/>
3184 </method>
3185
3186 <method name="runUSBDeviceFilters">
3187 <desc>
3188 Asks the server to run USB devices filters of the associated
3189 machine against the given USB device and tell if there is
3190 a match.
3191 <note>
3192 Intended to be used only for remote USB devices. Local
3193 ones don't require to call this method (this is done
3194 implicitly by the Host and USBProxyService).
3195 </note>
3196 </desc>
3197 <param name="device" type="IUSBDevice" dir="in"/>
3198 <param name="matched" type="boolean" dir="out"/>
3199 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3200 </method>
3201
3202 <method name="captureUSBDevice">
3203 <desc>
3204 Requests a capture of the given host USB device.
3205 When the request is completed, the VM process will
3206 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3207 notification.
3208 </desc>
3209 <param name="id" type="uuid" dir="in"/>
3210 </method>
3211
3212 <method name="detachUSBDevice">
3213 <desc>
3214 Notification that a VM is going to detach (done = false) or has
3215 already detached (done = true) the given USB device.
3216 When the done = true request is completed, the VM process will
3217 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3218 notification.
3219 <note>
3220 In the done = true case, the server must run its own filters
3221 and filters of all VMs but this one on the detached device
3222 as if it were just attached to the host computer.
3223 </note>
3224 </desc>
3225 <param name="id" type="uuid" dir="in"/>
3226 <param name="done" type="boolean" dir="in"/>
3227 </method>
3228
3229 <method name="autoCaptureUSBDevices">
3230 <desc>
3231 Requests a capture all matching USB devices attached to the host.
3232 When the request is completed, the VM process will
3233 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3234 notification per every captured device.
3235 </desc>
3236 </method>
3237
3238 <method name="detachAllUSBDevices">
3239 <desc>
3240 Notification that a VM that is being powered down. The done
3241 parameter indicates whether which stage of the power down
3242 we're at. When done = false the VM is announcing its
3243 intentions, while when done = true the VM is reporting
3244 what it has done.
3245 <note>
3246 In the done = true case, the server must run its own filters
3247 and filters of all VMs but this one on all detach devices as
3248 if they were just attached to the host computer.
3249 </note>
3250 </desc>
3251 <param name="done" type="boolean" dir="in"/>
3252 </method>
3253
3254 <method name="onSessionEnd">
3255 <desc>
3256 Triggered by the given session object when the session is about
3257 to close normally.
3258 </desc>
3259 <param name="session" type="ISession" dir="in">
3260 <desc>Session that is being closed</desc>
3261 </param>
3262 <param name="progress" type="IProgress" dir="return">
3263 <desc>
3264 Used to wait until the corresponding machine is actually
3265 dissociated from the given session on the server.
3266 Returned only when this session is a direct one.
3267 </desc>
3268 </param>
3269 </method>
3270
3271 <method name="beginSavingState">
3272 <desc>
3273 Called by the VM process to inform the server it wants to
3274 save the current state and stop the VM execution.
3275 </desc>
3276 <param name="progress" type="IProgress" dir="in">
3277 <desc>
3278 Progress object created by the VM process to wait until
3279 the state is saved.
3280 </desc>
3281 </param>
3282 <param name="stateFilePath" type="wstring" dir="out">
3283 <desc>
3284 File path the VM process must save the execution state to.
3285 </desc>
3286 </param>
3287 </method>
3288
3289 <method name="endSavingState">
3290 <desc>
3291 Called by the VM process to inform the server that saving
3292 the state previously requested by #beginSavingState is either
3293 successfully finished or there was a failure.
3294
3295 <result name="VBOX_E_FILE_ERROR">
3296 Settings file not accessible.
3297 </result>
3298 <result name="VBOX_E_XML_ERROR">
3299 Could not parse the settings file.
3300 </result>
3301
3302 </desc>
3303
3304 <param name="success" type="boolean" dir="in">
3305 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3306 otherwise.
3307 </desc>
3308 </param>
3309 </method>
3310
3311 <method name="adoptSavedState">
3312 <desc>
3313 Gets called by IConsole::adoptSavedState.
3314 <result name="VBOX_E_FILE_ERROR">
3315 Invalid saved state file path.
3316 </result>
3317 </desc>
3318 <param name="savedStateFile" type="wstring" dir="in">
3319 <desc>Path to the saved state file to adopt.</desc>
3320 </param>
3321 </method>
3322
3323 <method name="beginTakingSnapshot">
3324 <desc>
3325 Called by the VM process to inform the server it wants to
3326 take a snapshot.
3327
3328 <result name="VBOX_E_FILE_ERROR">
3329 Settings file not accessible.
3330 </result>
3331 <result name="VBOX_E_XML_ERROR">
3332 Could not parse the settings file.
3333 </result>
3334 </desc>
3335 <param name="initiator" type="IConsole" dir="in">
3336 <desc>The console object that initiated this call.</desc>
3337 </param>
3338 <param name="name" type="wstring" dir="in">
3339 <desc>Snapshot name.</desc>
3340 </param>
3341 <param name="description" type="wstring" dir="in">
3342 <desc>Snapshot description.</desc>
3343 </param>
3344 <param name="progress" type="IProgress" dir="in">
3345 <desc>
3346 Progress object created by the VM process to wait until
3347 the state is saved (only for online snapshots).
3348 </desc>
3349 </param>
3350 <param name="stateFilePath" type="wstring" dir="out">
3351 <desc>
3352 File path the VM process must save the execution state to.
3353 </desc>
3354 </param>
3355 <param name="serverProgress" type="IProgress" dir="out">
3356 <desc>
3357 Progress object created by the server process to wait until
3358 the snapshot is taken (VDI diff creation, etc.).
3359 </desc>
3360 </param>
3361 </method>
3362
3363 <method name="endTakingSnapshot">
3364 <desc>
3365 Called by the VM process to inform the server that the snapshot
3366 previously requested by #beginTakingSnapshot is either
3367 successfully taken or there was a failure.
3368 </desc>
3369
3370 <param name="success" type="boolean" dir="in">
3371 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3372 </param>
3373 </method>
3374
3375 <method name="discardSnapshot">
3376 <desc>
3377 Gets called by IConsole::discardSnapshot.
3378 <result name="VBOX_E_INVALID_OBJECT_STATE">
3379 Snapshot has more than one child snapshot.
3380 </result>
3381 </desc>
3382 <param name="initiator" type="IConsole" dir="in">
3383 <desc>The console object that initiated this call.</desc>
3384 </param>
3385 <param name="id" type="uuid" dir="in">
3386 <desc>UUID of the snapshot to discard.</desc>
3387 </param>
3388 <param name="machineState" type="MachineState" dir="out">
3389 <desc>New machine state after this operation is started.</desc>
3390 </param>
3391 <param name="progress" type="IProgress" dir="return">
3392 <desc>Progress object to track the operation completion.</desc>
3393 </param>
3394 </method>
3395
3396 <method name="discardCurrentState">
3397 <desc>
3398 Gets called by IConsole::discardCurrentState.
3399 <result name="VBOX_E_INVALID_OBJECT_STATE">
3400 Virtual machine does not have any snapshot.
3401 </result>
3402 </desc>
3403 <param name="initiator" type="IConsole" dir="in">
3404 <desc>The console object that initiated this call.</desc>
3405 </param>
3406 <param name="machineState" type="MachineState" dir="out">
3407 <desc>New machine state after this operation is started.</desc>
3408 </param>
3409 <param name="progress" type="IProgress" dir="return">
3410 <desc>Progress object to track the operation completion.</desc>
3411 </param>
3412 </method>
3413
3414 <method name="discardCurrentSnapshotAndState">
3415 <desc>
3416 Gets called by IConsole::discardCurrentSnapshotAndState.
3417 <result name="VBOX_E_INVALID_OBJECT_STATE">
3418 Virtual machine does not have any snapshot.
3419 </result>
3420 </desc>
3421 <param name="initiator" type="IConsole" dir="in">
3422 <desc>The console object that initiated this call.</desc>
3423 </param>
3424 <param name="machineState" type="MachineState" dir="out">
3425 <desc>New machine state after this operation is started.</desc>
3426 </param>
3427 <param name="progress" type="IProgress" dir="return">
3428 <desc>Progress object to track the operation completion.</desc>
3429 </param>
3430 </method>
3431
3432 <method name="pullGuestProperties">
3433 <desc>
3434 Get the list of the guest properties matching a set of patterns along
3435 with their values, time stamps and flags and give responsibility for
3436 managing properties to the console.
3437 </desc>
3438 <param name="name" type="wstring" dir="out" safearray="yes">
3439 <desc>
3440 The names of the properties returned.
3441 </desc>
3442 </param>
3443 <param name="value" type="wstring" dir="out" safearray="yes">
3444 <desc>
3445 The values of the properties returned. The array entries match the
3446 corresponding entries in the @a name array.
3447 </desc>
3448 </param>
3449 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3450 <desc>
3451 The time stamps of the properties returned. The array entries match
3452 the corresponding entries in the @a name array.
3453 </desc>
3454 </param>
3455 <param name="flags" type="wstring" dir="out" safearray="yes">
3456 <desc>
3457 The flags of the properties returned. The array entries match the
3458 corresponding entries in the @a name array.
3459 </desc>
3460 </param>
3461 </method>
3462
3463 <method name="pushGuestProperties">
3464 <desc>
3465 Set the list of the guest properties matching a set of patterns along
3466 with their values, time stamps and flags and return responsibility for
3467 managing properties to IMachine.
3468 </desc>
3469 <param name="name" type="wstring" dir="in" safearray="yes">
3470 <desc>
3471 The names of the properties.
3472 </desc>
3473 </param>
3474 <param name="value" type="wstring" dir="in" safearray="yes">
3475 <desc>
3476 The values of the properties. The array entries match the
3477 corresponding entries in the @a name array.
3478 </desc>
3479 </param>
3480 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3481 <desc>
3482 The time stamps of the properties. The array entries match
3483 the corresponding entries in the @a name array.
3484 </desc>
3485 </param>
3486 <param name="flags" type="wstring" dir="in" safearray="yes">
3487 <desc>
3488 The flags of the properties. The array entries match the
3489 corresponding entries in the @a name array.
3490 </desc>
3491 </param>
3492 </method>
3493 <method name="pushGuestProperty">
3494 <desc>
3495 Update a single guest property in IMachine.
3496 </desc>
3497 <param name="name" type="wstring" dir="in">
3498 <desc>
3499 The name of the property to be updated.
3500 </desc>
3501 </param>
3502 <param name="value" type="wstring" dir="in">
3503 <desc>
3504 The value of the property.
3505 </desc>
3506 </param>
3507 <param name="timestamp" type="unsigned long long" dir="in">
3508 <desc>
3509 The timestamp of the property.
3510 </desc>
3511 </param>
3512 <param name="flags" type="wstring" dir="in">
3513 <desc>
3514 The flags of the property.
3515 </desc>
3516 </param>
3517 </method>
3518 </interface>
3519
3520 <interface
3521 name="IBIOSSettings" extends="$unknown"
3522 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3523 wsmap="managed"
3524 >
3525 <desc>
3526 The IBIOSSettings interface represents BIOS settings of the virtual
3527 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3528 </desc>
3529 <attribute name="logoFadeIn" type="boolean">
3530 <desc>Fade in flag for BIOS logo animation.</desc>
3531 </attribute>
3532
3533 <attribute name="logoFadeOut" type="boolean">
3534 <desc>Fade out flag for BIOS logo animation.</desc>
3535 </attribute>
3536
3537 <attribute name="logoDisplayTime" type="unsigned long">
3538 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3539 </attribute>
3540
3541 <attribute name="logoImagePath" type="wstring">
3542 <desc>Local file system path for external BIOS image.</desc>
3543 </attribute>
3544
3545 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3546 <desc>Mode of the BIOS boot device menu.</desc>
3547 </attribute>
3548
3549 <attribute name="ACPIEnabled" type="boolean">
3550 <desc>ACPI support flag.</desc>
3551 </attribute>
3552
3553 <attribute name="IOAPICEnabled" type="boolean">
3554 <desc>
3555 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3556 and support IRQs above 15.
3557 </desc>
3558 </attribute>
3559
3560 <attribute name="timeOffset" type="long long">
3561 <desc>
3562 Offset in milliseconds from the host system time. This allows for
3563 guests running with a different system date/time than the host.
3564 It is equivalent to setting the system date/time in the BIOS except
3565 it is not an absolute value but a relative one. Guest Additions
3566 time synchronization honors this offset.
3567 </desc>
3568 </attribute>
3569
3570 <attribute name="PXEDebugEnabled" type="boolean">
3571 <desc>
3572 PXE debug logging flag. If set, VirtualBox will write extensive
3573 PXE trace information to the release log.
3574 </desc>
3575 </attribute>
3576
3577 <attribute name="IDEControllerType" type="IDEControllerType">
3578 <desc>
3579 Type of the virtual IDE controller. Depending on this value,
3580 VirtualBox will provide different virtual IDE hardware
3581 devices to the guest.
3582 </desc>
3583 </attribute>
3584
3585 </interface>
3586
3587 <interface
3588 name="IMachine" extends="$unknown"
3589 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3590 wsmap="managed"
3591 >
3592 <desc>
3593 The IMachine interface represents a virtual machine, or guest, created
3594 in VirtualBox.
3595
3596 This interface is used in two contexts. First of all, a collection of
3597 objects implementing this interface is stored in the
3598 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3599 machines that are currently registered with this VirtualBox
3600 installation. Also, once a session has been opened for the given virtual
3601 machine (e.g. the virtual machine is running), the machine object
3602 associated with the open session can be queried from the session object;
3603 see <link to="ISession"/> for details.
3604
3605 The main role of this interface is to expose the settings of the virtual
3606 machine and provide methods to change various aspects of the virtual
3607 machine's configuration. For machine objects stored in the
3608 <link to="IVirtualBox::machines2"/> collection, all attributes are
3609 read-only unless explicitly stated otherwise in individual attribute
3610 and method descriptions. In order to change a machine setting, a session
3611 for this machine must be opened using one of
3612 <link to="IVirtualBox::openSession"/>,
3613 <link to="IVirtualBox::openRemoteSession"/> or
3614 <link to="IVirtualBox::openExistingSession"/> methods. After the
3615 session has been successfully opened, a mutable machine object needs to
3616 be queried from the session object and then the desired settings changes
3617 can be applied to the returned object using IMachine attributes and
3618 methods. See the ISession interface description for more information
3619 about sessions.
3620
3621 Note that the IMachine interface does not provide methods to control
3622 virtual machine execution (such as start the machine, or power it
3623 down) -- these methods are grouped in a separate IConsole
3624 interface. Refer to the IConsole interface description to get more
3625 information about this topic.
3626
3627 <see>ISession, IConsole</see>
3628 </desc>
3629
3630 <attribute name="parent" type="IVirtualBox" readonly="yes">
3631 <desc>Associated parent object.</desc>
3632 </attribute>
3633
3634 <attribute name="accessible" type="boolean" readonly="yes">
3635 <desc>
3636 Whether this virtual machine is currently accessible or not.
3637
3638 The machine is considered to be inaccessible when:
3639 <ul>
3640 <li>It is a registered virtual machine, and
3641 </li>
3642 <li>Its settings file is inaccessible (for example, it is
3643 located on a network share that is not accessible during
3644 VirtualBox startup, or becomes inaccessible later, or if
3645 the settings file can be read but is invalid).
3646 </li>
3647 </ul>
3648
3649 Otherwise, the value of this property is always <tt>true</tt>.
3650
3651 Every time this property is read, the accessibility state of
3652 this machine is re-evaluated. If the returned value is |false|,
3653 the <link to="#accessError"/> property may be used to get the
3654 detailed error information describing the reason of
3655 inaccessibility.
3656
3657 When the machine is inaccessible, only the following properties
3658 can be used on it:
3659 <ul>
3660 <li><link to="#parent"/></li>
3661 <li><link to="#id"/></li>
3662 <li><link to="#settingsFilePath"/></li>
3663 <li><link to="#accessible"/></li>
3664 <li><link to="#accessError"/></li>
3665 </ul>
3666
3667 An attempt to access any other property or method will return
3668 an error.
3669
3670 The only possible action you can perform on an inaccessible
3671 machine is to unregister it using the
3672 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3673 for the accessibility state once more by querying this
3674 property).
3675
3676 <note>
3677 In the current implementation, once this property returns
3678 <tt>true</tt>, the machine will never become inaccessible
3679 later, even if its settings file cannot be successfully
3680 read/written any more (at least, until the VirtualBox
3681 server is restarted). This limitation may be removed in
3682 future releases.
3683 </note>
3684 </desc>
3685 </attribute>
3686
3687 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3688 <desc>
3689 Error information describing the reason of machine
3690 inaccessibility.
3691
3692 Reading this property is only valid after the last call to
3693 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3694 machine is currently unaccessible). Otherwise, a null
3695 IVirtualBoxErrorInfo object will be returned.
3696 </desc>
3697 </attribute>
3698
3699 <attribute name="name" type="wstring">
3700 <desc>
3701 Name of the virtual machine.
3702
3703 Besides being used for human-readable identification purposes
3704 everywhere in VirtualBox, the virtual machine name is also used
3705 as a name of the machine's settings file and as a name of the
3706 subdirectory this settings file resides in. Thus, every time you
3707 change the value of this property, the settings file will be
3708 renamed once you call <link to="#saveSettings()"/> to confirm the
3709 change. The containing subdirectory will be also renamed, but
3710 only if it has exactly the same name as the settings file
3711 itself prior to changing this property (for backward compatibility
3712 with previous API releases). The above implies the following
3713 limitations:
3714 <ul>
3715 <li>The machine name cannot be empty.</li>
3716 <li>The machine name can contain only characters that are valid
3717 file name characters according to the rules of the file
3718 system used to store VirtualBox configuration.</li>
3719 <li>You cannot have two or more machines with the same name
3720 if they use the same subdirectory for storing the machine
3721 settings files.</li>
3722 <li>You cannot change the name of the machine if it is running,
3723 or if any file in the directory containing the settings file
3724 is being used by another running machine or by any other
3725 process in the host operating system at a time when
3726 <link to="#saveSettings()"/> is called.
3727 </li>
3728 </ul>
3729 If any of the above limitations are hit, <link to="#saveSettings()"/>
3730 will return an appropriate error message explaining the exact
3731 reason and the changes you made to this machine will not be
3732 saved.
3733 <note>
3734 For "legacy" machines created using the
3735 <link to="IVirtualBox::createLegacyMachine()"/> call,
3736 the above naming limitations do not apply because the
3737 machine name does not affect the settings file name.
3738 The settings file name remains the same as it was specified
3739 during machine creation and never changes.
3740 </note>
3741 </desc>
3742 </attribute>
3743
3744 <attribute name="description" type="wstring">
3745 <desc>
3746 Description of the virtual machine.
3747
3748 The description attribute can contain any text and is
3749 typically used to describe the hardware and software
3750 configuration of the virtual machine in detail (i.e. network
3751 settings, versions of the installed software and so on).
3752 </desc>
3753 </attribute>
3754
3755 <attribute name="id" type="uuid" readonly="yes">
3756 <desc>UUID of the virtual machine.</desc>
3757 </attribute>
3758
3759 <attribute name="OSTypeId" type="wstring">
3760 <desc>
3761 User-defined identifier of the Guest OS type.
3762 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3763 an IGuestOSType object representing details about the given
3764 Guest OS type.
3765 <note>
3766 This value may differ from the value returned by
3767 <link to="IGuest::OSTypeId"/> if Guest Additions are
3768 installed to the guest OS.
3769 </note>
3770 </desc>
3771 </attribute>
3772
3773 <attribute name="HardwareVersion" type="wstring">
3774 <desc>Hardware version identifier. Internal use only for now.</desc>
3775 </attribute>
3776
3777 <attribute name="CPUCount" type="unsigned long">
3778 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3779 </attribute>
3780
3781 <attribute name="memorySize" type="unsigned long">
3782 <desc>System memory size in megabytes.</desc>
3783 </attribute>
3784
3785 <attribute name="memoryBalloonSize" type="unsigned long">
3786 <desc>Initial memory balloon size in megabytes.</desc>
3787 </attribute>
3788
3789 <attribute name="statisticsUpdateInterval" type="unsigned long">
3790 <desc>Initial interval to update guest statistics in seconds.</desc>
3791 </attribute>
3792
3793 <attribute name="VRAMSize" type="unsigned long">
3794 <desc>Video memory size in megabytes.</desc>
3795 </attribute>
3796
3797 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3798 <desc>
3799 This setting determines whether VirtualBox allows guests to make use
3800 of the 3D graphics support available on the host. Currently limited
3801 to OpenGL only. </desc>
3802 </attribute>
3803
3804 <attribute name="monitorCount" type="unsigned long">
3805 <desc>
3806 Number of virtual monitors.
3807 <note>
3808 Only effective on Windows XP and later guests with
3809 Guest Additions installed.
3810 </note>
3811 </desc>
3812 </attribute>
3813
3814 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3815 <desc>Object containing all BIOS settings.</desc>
3816 </attribute>
3817
3818 <attribute name="HWVirtExEnabled" type="TSBool">
3819 <desc>
3820 This setting determines whether VirtualBox will try to make use of
3821 the host CPU's hardware virtualization extensions such as Intel VT-x
3822 and AMD-V. Note that in case such extensions are not available,
3823 they will not be used.
3824 </desc>
3825 </attribute>
3826
3827 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3828 <desc>
3829 This setting determines whether VirtualBox will try to make use of
3830 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3831 such extensions are not available, they will not be used.
3832 </desc>
3833 </attribute>
3834
3835 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3836 <desc>
3837 This setting determines whether VirtualBox will try to make use of
3838 the VPID extension of Intel VT-x. Note that in case such extensions are
3839 not available, they will not be used.
3840 </desc>
3841 </attribute>
3842
3843 <attribute name="PAEEnabled" type="boolean" default="false">
3844 <desc>
3845 This setting determines whether VirtualBox will expose the Physical Address
3846 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3847 is not available, it will not be reported.
3848 </desc>
3849 </attribute>
3850
3851 <attribute name="snapshotFolder" type="wstring">
3852 <desc>
3853 Full path to the directory used to store snapshot data
3854 (differencing hard disks and saved state files) of this machine.
3855
3856 The initial value of this property is
3857 <tt>&lt;</tt><link to="#settingsFilePath">
3858 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3859 <link to="#id">machine_uuid</link>
3860 <tt>&gt;</tt>.
3861
3862 Currently, it is an error to try to change this property on
3863 a machine that has snapshots (because this would require to
3864 move possibly large files to a different location).
3865 A separate method will be available for this purpose later.
3866
3867 <note>
3868 Setting this property to <tt>null</tt> will restore the
3869 initial value.
3870 </note>
3871 <note>
3872 When setting this property, the specified path can be
3873 absolute (full path) or relative to the directory where the
3874 <link to="#settingsFilePath">machine settings file</link>
3875 is located. When reading this property, a full path is
3876 always returned.
3877 </note>
3878 <note>
3879 The specified path may not exist, it will be created
3880 when necessary.
3881 </note>
3882 </desc>
3883 </attribute>
3884
3885 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3886 <desc>VRDP server object.</desc>
3887 </attribute>
3888
3889 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3890 <desc>Array of hard disks attached to this machine.</desc>
3891 </attribute>
3892
3893 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3894 <desc>Associated DVD drive object.</desc>
3895 </attribute>
3896
3897 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3898 <desc>Associated floppy drive object.</desc>
3899 </attribute>
3900
3901 <attribute name="USBController" type="IUSBController" readonly="yes">
3902 <desc>
3903 Associated USB controller object.
3904
3905 <note>
3906 This method may set a @ref com_warnings "warning result code".
3907 </note>
3908 <note>
3909 If USB functionality is not available in the given edition of
3910 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3911 </note>
3912 </desc>
3913 </attribute>
3914
3915 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3916 <desc>Associated audio adapter, always present.</desc>
3917 </attribute>
3918
3919 <attribute name="SATAController" type="ISATAController" readonly="yes">
3920 <desc>
3921 Associated SATA controller object.
3922 </desc>
3923 </attribute>
3924
3925 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3926 <desc>
3927 Full name of the file containing machine settings data.
3928 </desc>
3929 </attribute>
3930
3931 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3932 <desc>
3933 Current version of the format of the settings file of this machine
3934 (<link to="#settingsFilePath"/>).
3935
3936 The version string has the following format:
3937 <pre>
3938 x.y-platform
3939 </pre>
3940 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3941 versions, and <tt>platform</tt> is the platform identifier.
3942
3943 The current version usually matches the value of the
3944 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3945 settings file was created by an older version of VirtualBox and there
3946 was a change of the settings file format since then.
3947
3948 Note that VirtualBox automatically converts settings files from older
3949 versions to the most recent version when reading them (usually at
3950 VirtualBox startup) but it doesn't save the changes back until
3951 you call a method that implicitly saves settings (such as
3952 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3953 explicitly. Therefore, if the value of this attribute differs from the
3954 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3955 means that the settings file was converted but the result of the
3956 conversion is not yet saved to disk.
3957
3958 The above feature may be used by interactive front-ends to inform users
3959 about the settings file format change and offer them to explicitly save
3960 all converted settings files (the global and VM-specific ones),
3961 optionally create backup copies of the old settings files before saving,
3962 etc.
3963
3964 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3965 </desc>
3966 </attribute>
3967
3968 <attribute name="settingsModified" type="boolean" readonly="yes">
3969 <desc>
3970 Whether the settings of this machine have been modified
3971 (but neither yet saved nor discarded).
3972 <note>
3973 Reading this property is only valid on instances returned
3974 by <link to="ISession::machine"/> and on new machines
3975 created by <link to="IVirtualBox::createMachine"/> or opened
3976 by <link to="IVirtualBox::openMachine"/> but not
3977 yet registered, or on unregistered machines after calling
3978 <link to="IVirtualBox::unregisterMachine"/>. For all other
3979 cases, the settings can never be modified.
3980 </note>
3981 <note>
3982 For newly created unregistered machines, the value of this
3983 property is always TRUE until <link to="#saveSettings()"/>
3984 is called (no matter if any machine settings have been
3985 changed after the creation or not). For opened machines
3986 the value is set to FALSE (and then follows to normal rules).
3987 </note>
3988 </desc>
3989 </attribute>
3990
3991 <attribute name="sessionState" type="SessionState" readonly="yes">
3992 <desc>Current session state for this machine.</desc>
3993 </attribute>
3994
3995 <attribute name="sessionType" type="wstring" readonly="yes">
3996 <desc>
3997 Type of the session. If <link to="#sessionState"/> is
3998 SessionSpawning or SessionOpen, this attribute contains the
3999 same value as passed to the
4000 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
4001 type parameter. If the session was opened directly using
4002 <link to="IVirtualBox::openSession()"/>, or if
4003 <link to="#sessionState"/> is SessionClosed, the value of this
4004 attribute is @c null.
4005 </desc>
4006 </attribute>
4007
4008 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4009 <desc>
4010 Identifier of the session process. This attribute contains the
4011 platform-dependent identifier of the process that has opened a
4012 direct session for this machine using the
4013 <link to="IVirtualBox::openSession()"/> call. The returned value
4014 is only valid if <link to="#sessionState"/> is SessionOpen or
4015 SessionClosing (i.e. a session is currently open or being
4016 closed) by the time this property is read.
4017 </desc>
4018 </attribute>
4019
4020 <attribute name="state" type="MachineState" readonly="yes">
4021 <desc>Current execution state of this machine.</desc>
4022 </attribute>
4023
4024 <attribute name="lastStateChange" type="long long" readonly="yes">
4025 <desc>
4026 Time stamp of the last execution state change,
4027 in milliseconds since 1970-01-01 UTC.
4028 </desc>
4029 </attribute>
4030
4031 <attribute name="stateFilePath" type="wstring" readonly="yes">
4032 <desc>
4033 Full path to the file that stores the execution state of
4034 the machine when it is in the <link to="MachineState_Saved"/> state.
4035 <note>
4036 When the machine is not in the Saved state, this attribute
4037 <tt>null</tt>.
4038 </note>
4039 </desc>
4040 </attribute>
4041
4042 <attribute name="logFolder" type="wstring" readonly="yes">
4043 <desc>
4044 Full path to the folder that stores a set of rotated log files
4045 recorded during machine execution. The most recent log file is
4046 named <tt>VBox.log</tt>, the previous log file is
4047 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4048 in the current version).
4049 </desc>
4050 </attribute>
4051
4052 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4053 <desc>
4054 Current snapshot of this machine.
4055 <note>
4056 A <tt>null</tt> object is returned if the machine doesn't
4057 have snapshots.
4058 </note>
4059 <see><link to="ISnapshot"/></see>
4060 </desc>
4061 </attribute>
4062
4063 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4064 <desc>
4065 Number of snapshots taken on this machine. Zero means the
4066 machine doesn't have any snapshots.
4067 </desc>
4068 </attribute>
4069
4070 <attribute name="currentStateModified" type="boolean" readonly="yes">
4071 <desc>
4072 Returns <tt>true</tt> if the current state of the machine is not
4073 identical to the state stored in the current snapshot.
4074
4075 The current state is identical to the current snapshot right
4076 after one of the following calls are made:
4077 <ul>
4078 <li><link to="IConsole::discardCurrentState"/> or
4079 <link to="IConsole::discardCurrentSnapshotAndState"/>
4080 </li>
4081 <li><link to="IConsole::takeSnapshot"/> (issued on a
4082 powered off or saved machine, for which
4083 <link to="#settingsModified"/> returns <tt>false</tt>)
4084 </li>
4085 <li><link to="IMachine::setCurrentSnapshot"/>
4086 </li>
4087 </ul>
4088
4089 The current state remains identical until one of the following
4090 happens:
4091 <ul>
4092 <li>settings of the machine are changed</li>
4093 <li>the saved state is discarded</li>
4094 <li>the current snapshot is discarded</li>
4095 <li>an attempt to execute the machine is made</li>
4096 </ul>
4097
4098 <note>
4099 For machines that don't have snapshots, this property is
4100 always <tt>false</tt>.
4101 </note>
4102 </desc>
4103 </attribute>
4104
4105 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4106 <desc>
4107 Collection of shared folders for this machine (permanent shared
4108 folders). These folders are shared automatically at machine startup
4109 and available only to the guest OS installed within this machine.
4110
4111 New shared folders are added to the collection using
4112 <link to="#createSharedFolder"/>. Existing shared folders can be
4113 removed using <link to="#removeSharedFolder"/>.
4114 </desc>
4115 </attribute>
4116
4117 <attribute name="clipboardMode" type="ClipboardMode">
4118 <desc>
4119 Synchronization mode between the host OS clipboard
4120 and the guest OS clipboard.
4121 </desc>
4122 </attribute>
4123
4124 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4125 <desc>
4126 A comma-separated list of simple glob patterns. Changes to guest
4127 properties whose name matches one of the patterns will generate an
4128 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4129 </desc>
4130 </attribute>
4131
4132 <method name="setBootOrder">
4133 <desc>
4134 Puts the given device to the specified position in
4135 the boot order.
4136
4137 To indicate that no device is associated with the given position,
4138 <link to="DeviceType_Null"/> should be used.
4139
4140 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4141
4142 <result name="E_INVALIDARG">
4143 Boot @a position out of range.
4144 </result>
4145 <result name="E_NOTIMPL">
4146 Booting from USB @a device currently not supported.
4147 </result>
4148
4149 </desc>
4150 <param name="position" type="unsigned long" dir="in">
4151 <desc>
4152 Position in the boot order (<tt>1</tt> to the total number of
4153 devices the machine can boot from, as returned by
4154 <link to="ISystemProperties::maxBootPosition"/>).
4155 </desc>
4156 </param>
4157 <param name="device" type="DeviceType" dir="in">
4158 <desc>
4159 The type of the device used to boot at the given position.
4160 </desc>
4161 </param>
4162 </method>
4163
4164 <method name="getBootOrder" const="yes">
4165 <desc>
4166 Returns the device type that occupies the specified
4167 position in the boot order.
4168
4169 @todo [remove?]
4170 If the machine can have more than one device of the returned type
4171 (such as hard disks), then a separate method should be used to
4172 retrieve the individual device that occupies the given position.
4173
4174 If here are no devices at the given position, then
4175 <link to="DeviceType_Null"/> is returned.
4176
4177 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4178
4179 <result name="E_INVALIDARG">
4180 Boot @a position out of range.
4181 </result>
4182
4183 </desc>
4184 <param name="position" type="unsigned long" dir="in">
4185 <desc>
4186 Position in the boot order (<tt>1</tt> to the total number of
4187 devices the machine can boot from, as returned by
4188 <link to="ISystemProperties::maxBootPosition"/>).
4189 </desc>
4190 </param>
4191 <param name="device" type="DeviceType" dir="return">
4192 <desc>
4193 Device at the given position.
4194 </desc>
4195 </param>
4196 </method>
4197
4198 <method name="attachHardDisk2">
4199 <desc>
4200 Attaches a virtual hard disk identified by the given UUID @a id
4201 to a device slot of the specified bus.
4202
4203 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
4204 specify the primary or secondary IDE controller, respectively. The
4205 SATA bus supports 30 channels, so this parameter can be a number
4206 ranging from @c 0 to @c 29.
4207
4208 For the primary controller of the IDE bus, the @a device number can be
4209 either @c 0 or @c 1, to specify the master or the slave device,
4210 respectively. For the secondary IDE controller, the device number is
4211 always @c 1 because the master device is reserved for the CD-ROM drive.
4212
4213 For the SATA bus, the @a device parameter is currently unused and
4214 must be @c 0.
4215
4216 The specified device slot must not have another disk attached to it, or
4217 this method will fail.
4218
4219 See <link to="IHardDisk2"/> for more detailed information about
4220 attaching hard disks.
4221
4222 <note>
4223 You cannot attach a hard disk to a running machine. Also, you cannot
4224 attach a hard disk to a newly created machine until this machine's
4225 settings are saved to disk using <link to="#saveSettings()"/>.
4226 </note>
4227 <note>
4228 If the hard disk is being attached indirectly, a new differencing hard
4229 disk will implicitly be created for it and attached instead. If the
4230 changes made to the machine settings (including this indirect
4231 attachment) are later cancelled using <link to="#discardSettings()"/>,
4232 this implicitly created differencing hard disk will implicitly
4233 be deleted.
4234 </note>
4235
4236 <result name="E_INVALIDARG">
4237 SATA device, SATA channel, IDE channel or IDE slot out of range.
4238 </result>
4239 <result name="VBOX_E_INVALID_OBJECT_STATE">
4240 Attempt to attach hard disk to an unregistered virtual machine.
4241 </result>
4242 <result name="VBOX_E_INVALID_VM_STATE">
4243 Invalid machine state.
4244 </result>
4245 <result name="VBOX_E_OBJECT_IN_USE">
4246 Hard disk already attached to this or another virtual machine.
4247 </result>
4248
4249 </desc>
4250 <param name="id" type="uuid" dir="in">
4251 <desc>UUID of the hard disk to attach.</desc>
4252 </param>
4253 <param name="bus" type="StorageBus" dir="in">
4254 <desc>Type of the storage bus to use (IDE or SATA).</desc>
4255 </param>
4256 <param name="channel" type="long" dir="in">
4257 <desc>Channel to attach the hard disk to.</desc>
4258 </param>
4259 <param name="device" type="long" dir="in">
4260 <desc>
4261 Device slot in the given channel to attach the hard disk to.
4262 </desc>
4263 </param>
4264 </method>
4265
4266 <method name="getHardDisk2" const="yes">
4267 <desc>
4268 Returns the virtual hard disk attached to a device slot of the specified
4269 bus.
4270
4271 Note that if the hard disk was indirectly attached by
4272 <link to="#attachHardDisk2()"/> to the given device slot then this
4273 method will return not the same object as passed to the
4274 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
4275 more detailed information about attaching hard disks.
4276
4277 <result name="VBOX_E_OBJECT_NOT_FOUND">
4278 No hard disk attached to given slot/bus.
4279 </result>
4280
4281 </desc>
4282 <param name="bus" type="StorageBus" dir="in">
4283 <desc>Type of the storage bus to query (IDE or SATA).</desc>
4284 </param>
4285 <param name="channel" type="long" dir="in">
4286 <desc>Channel to query.</desc>
4287 </param>
4288 <param name="device" type="long" dir="in">
4289 <desc>Device slot in the given channel to query.</desc>
4290 </param>
4291 <param name="hardDisk" type="IHardDisk2" dir="return">
4292 <desc>Attached hard disk object.</desc>
4293 </param>
4294 </method>
4295
4296 <method name="detachHardDisk2">
4297 <desc>
4298 Detaches the virtual hard disk attached to a device slot of the
4299 specified bus.
4300
4301 Detaching the hard disk from the virtual machine is deferred. This means
4302 that the hard disk remains associated with the machine when this method
4303 returns and gets actually de-associated only after a successful
4304 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
4305 for more detailed information about attaching hard disks.
4306
4307 <note>
4308 You cannot detach the hard disk from a running machine.
4309 </note>
4310 <note>
4311 Detaching differencing hard disks implicitly created by <link
4312 to="#attachHardDisk2()"/> for the indirect attachment using this
4313 method will <b>not</b> implicitly delete them. The
4314 <link to="IHardDisk2::deleteStorage()"/> operation should be
4315 explicitly performed by the caller after the hard disk is successfully
4316 detached and the settings are saved with
4317 <link to="#saveSettings()"/>, if it is the desired action.
4318 </note>
4319
4320 <result name="VBOX_E_INVALID_VM_STATE">
4321 Attempt to detach hard disk from a running virtual machine.
4322 </result>
4323 <result name="VBOX_E_OBJECT_NOT_FOUND">
4324 No hard disk attached to given slot/bus.
4325 </result>
4326 <result name="VBOX_E_NOT_SUPPORTED">
4327 Hard disk format does not support storage deletion.
4328 </result>
4329
4330 </desc>
4331 <param name="bus" type="StorageBus" dir="in">
4332 <desc>Bus to detach the hard disk from.</desc>
4333 </param>
4334 <param name="channel" type="long" dir="in">
4335 <desc>Channel number to detach the hard disk from.</desc>
4336 </param>
4337 <param name="device" type="long" dir="in">
4338 <desc>Device slot number to detach the hard disk from.</desc>
4339 </param>
4340 </method>
4341
4342 <method name="getNetworkAdapter" const="yes">
4343 <desc>
4344 Returns the network adapter associated with the given slot.
4345 Slots are numbered sequentially, starting with zero. The total
4346 number of adapters per machine is defined by the
4347 <link to="ISystemProperties::networkAdapterCount"/> property,
4348 so the maximum slot number is one less than that property's value.
4349
4350 <result name="E_INVALIDARG">
4351 Invalid @a slot number.
4352 </result>
4353
4354 </desc>
4355 <param name="slot" type="unsigned long" dir="in"/>
4356 <param name="adapter" type="INetworkAdapter" dir="return"/>
4357 </method>
4358
4359 <method name="getSerialPort" const="yes">
4360 <desc>
4361 Returns the serial port associated with the given slot.
4362 Slots are numbered sequentially, starting with zero. The total
4363 number of serial ports per machine is defined by the
4364 <link to="ISystemProperties::serialPortCount"/> property,
4365 so the maximum slot number is one less than that property's value.
4366
4367 <result name="E_INVALIDARG">
4368 Invalid @a slot number.
4369 </result>
4370
4371 </desc>
4372 <param name="slot" type="unsigned long" dir="in"/>
4373 <param name="port" type="ISerialPort" dir="return"/>
4374 </method>
4375
4376 <method name="getParallelPort" const="yes">
4377 <desc>
4378 Returns the parallel port associated with the given slot.
4379 Slots are numbered sequentially, starting with zero. The total
4380 number of parallel ports per machine is defined by the
4381 <link to="ISystemProperties::parallelPortCount"/> property,
4382 so the maximum slot number is one less than that property's value.
4383
4384 <result name="E_INVALIDARG">
4385 Invalid @a slot number.
4386 </result>
4387
4388 </desc>
4389 <param name="slot" type="unsigned long" dir="in"/>
4390 <param name="port" type="IParallelPort" dir="return"/>
4391 </method>
4392
4393 <method name="getNextExtraDataKey">
4394 <desc>
4395 Returns the machine-specific extra data key name following the
4396 supplied key.
4397
4398 An error is returned if the supplied @a key does not exist. @c NULL is
4399 returned in @a nextKey if the supplied key is the last key. When
4400 supplying @c NULL for the @a key, the first key item is returned in @a
4401 nextKey (if there is any). @a nextValue is an optional parameter and
4402 if supplied, the next key's value is returned in it.
4403
4404 <result name="VBOX_E_OBJECT_NOT_FOUND">
4405 Extra data @a key not found.
4406 </result>
4407
4408 </desc>
4409 <param name="key" type="wstring" dir="in">
4410 <desc>Name of the data key to follow.</desc>
4411 </param>
4412 <param name="nextKey" type="wstring" dir="out">
4413 <desc>Name of the next data key.</desc>
4414 </param>
4415 <param name="nextValue" type="wstring" dir="out">
4416 <desc>Value of the next data key.</desc>
4417 </param>
4418 </method>
4419
4420 <method name="getExtraData">
4421 <desc>
4422 Returns associated machine-specific extra data.
4423
4424 If the requested data @a key does not exist, this function will
4425 succeed and return @c NULL in the @a value argument.
4426
4427 <result name="VBOX_E_FILE_ERROR">
4428 Settings file not accessible.
4429 </result>
4430 <result name="VBOX_E_XML_ERROR">
4431 Could not parse the settings file.
4432 </result>
4433
4434 </desc>
4435 <param name="key" type="wstring" dir="in">
4436 <desc>Name of the data key to get.</desc>
4437 </param>
4438 <param name="value" type="wstring" dir="return">
4439 <desc>Value of the requested data key.</desc>
4440 </param>
4441 </method>
4442
4443 <method name="setExtraData">
4444 <desc>
4445 Sets associated machine-specific extra data.
4446
4447 If you pass @c NULL as a key @a value, the given @a key will be
4448 deleted.
4449
4450 <note>
4451 Before performing the actual data change, this method will ask all
4452 registered callbacks using the
4453 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
4454 notification for a permission. If one of the callbacks refuses the
4455 new value, the change will not be performed.
4456 </note>
4457 <note>
4458 On success, the
4459 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4460 is called to inform all registered callbacks about a successful data
4461 change.
4462 </note>
4463 <note>
4464 This method can be called outside the machine session and therefore
4465 it's a caller's responsibility to handle possible race conditions
4466 when several clients change the same key at the same time.
4467 </note>
4468
4469 <result name="VBOX_E_FILE_ERROR">
4470 Settings file not accessible.
4471 </result>
4472 <result name="VBOX_E_XML_ERROR">
4473 Could not parse the settings file.
4474 </result>
4475
4476 </desc>
4477 <param name="key" type="wstring" dir="in">
4478 <desc>Name of the data key to set.</desc>
4479 </param>
4480 <param name="value" type="wstring" dir="in">
4481 <desc>Value to assign to the key.</desc>
4482 </param>
4483 </method>
4484
4485 <method name="saveSettings">
4486 <desc>
4487 Saves any changes to machine settings made since the session
4488 has been opened or a new machine has been created, or since the
4489 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4490 For registered machines, new settings become visible to all
4491 other VirtualBox clients after successful invocation of this
4492 method.
4493 <note>
4494 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4495 notification event after the configuration has been successfully
4496 saved (only for registered machines).
4497 </note>
4498 <note>
4499 Calling this method is only valid on instances returned
4500 by <link to="ISession::machine"/> and on new machines
4501 created by <link to="IVirtualBox::createMachine"/> but not
4502 yet registered, or on unregistered machines after calling
4503 <link to="IVirtualBox::unregisterMachine"/>.
4504 </note>
4505
4506 <result name="VBOX_E_FILE_ERROR">
4507 Settings file not accessible.
4508 </result>
4509 <result name="VBOX_E_XML_ERROR">
4510 Could not parse the settings file.
4511 </result>
4512 <result name="E_ACCESSDENIED">
4513 Modification request refused.
4514 </result>
4515
4516 </desc>
4517 </method>
4518
4519 <method name="saveSettingsWithBackup">
4520 <desc>
4521 Creates a backup copy of the machine settings file (<link
4522 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4523 <link to="#saveSettings()"/>.
4524
4525 Note that the backup copy is created <b>only</b> if the settings file
4526 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4527 details). Otherwise, this call is fully equivalent to
4528 <link to="#saveSettings()"/> and no backup copying is done.
4529
4530 The backup copy is created in the same directory where the original
4531 settings file is located. It is given the following file name:
4532 <pre>
4533 original.xml.x.y-platform.bak
4534 </pre>
4535 where <tt>original.xml</tt> is the original settings file name
4536 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4537 format of the settings file (before auto-conversion).
4538
4539 If the given backup file already exists, this method will try to add the
4540 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4541 0 to 9) and copy it again until it succeeds. If all suffixes are
4542 occupied, or if any other copy error occurs, this method will return a
4543 failure.
4544
4545 If the copy operation succeeds, the @a bakFileName return argument will
4546 receive a full path to the created backup file (for informational
4547 purposes). Note that this will happen even if the subsequent
4548 <link to="#saveSettings()"/> call performed by this method after the
4549 copy operation, fails.
4550
4551 <note>
4552 The VirtualBox API never calls this method. It is intended purely for
4553 the purposes of creating backup copies of the settings files by
4554 front-ends before saving the results of the automatically performed
4555 settings conversion to disk.
4556 </note>
4557
4558 <see>settingsFileVersion</see>
4559
4560 <result name="VBOX_E_FILE_ERROR">
4561 Settings file not accessible.
4562 </result>
4563 <result name="VBOX_E_XML_ERROR">
4564 Could not parse the settings file.
4565 </result>
4566 <result name="VBOX_E_INVALID_VM_STATE">
4567 Virtual machine is not mutable.
4568 </result>
4569 <result name="E_ACCESSDENIED">
4570 Modification request refused.
4571 </result>
4572
4573 </desc>
4574 <param name="bakFileName" type="wstring" dir="return">
4575 <desc>Full path to the created backup copy.</desc>
4576 </param>
4577 </method>
4578
4579 <method name="discardSettings">
4580 <desc>
4581 Discards any changes to the machine settings made since the session
4582 has been opened or since the last call to <link to="#saveSettings()"/>
4583 or <link to="#discardSettings"/>.
4584 <note>
4585 Calling this method is only valid on instances returned
4586 by <link to="ISession::machine"/> and on new machines
4587 created by <link to="IVirtualBox::createMachine"/> or
4588 opened by <link to="IVirtualBox::openMachine"/> but not
4589 yet registered, or on unregistered machines after calling
4590 <link to="IVirtualBox::unregisterMachine"/>.
4591 </note>
4592
4593 <result name="VBOX_E_INVALID_VM_STATE">
4594 Virtual machine is not mutable.
4595 </result>
4596
4597 </desc>
4598 </method>
4599
4600 <method name="deleteSettings">
4601 <desc>
4602 Deletes the settings file of this machine from disk.
4603 The machine must not be registered in order for this operation
4604 to succeed.
4605 <note>
4606 <link to="#settingsModified"/> will return TRUE after this
4607 method successfully returns.
4608 </note>
4609 <note>
4610 Calling this method is only valid on instances returned
4611 by <link to="ISession::machine"/> and on new machines
4612 created by <link to="IVirtualBox::createMachine"/> or
4613 opened by <link to="IVirtualBox::openMachine"/> but not
4614 yet registered, or on unregistered machines after calling
4615 <link to="IVirtualBox::unregisterMachine"/>.
4616 </note>
4617 <note>
4618 The deleted machine settings file can be restored (saved again)
4619 by calling <link to="#saveSettings()"/>.
4620 </note>
4621
4622 <result name="VBOX_E_INVALID_VM_STATE">
4623 Cannot delete settings of a registered machine or
4624 machine not mutable.
4625 </result>
4626 <result name="VBOX_E_IPRT_ERROR">
4627 Could not delete the settings file.
4628 </result>
4629
4630 </desc>
4631 </method>
4632
4633 <method name="getSnapshot">
4634 <desc>
4635 Returns a snapshot of this machine with the given UUID.
4636 A <tt>null</tt> UUID can be used to obtain the first snapshot
4637 taken on this machine. This is useful if you want to traverse
4638 the whole tree of snapshots starting from the root.
4639
4640 <result name="VBOX_E_OBJECT_NOT_FOUND">
4641 Virtual machine has no snapshots or snapshot not found.
4642 </result>
4643
4644 </desc>
4645 <param name="id" type="uuid" dir="in">
4646 <desc>UUID of the snapshot to get</desc>
4647 </param>
4648 <param name="snapshot" type="ISnapshot" dir="return">
4649 <desc>Snapshot object with the given UUID.</desc>
4650 </param>
4651 </method>
4652
4653 <method name="findSnapshot">
4654 <desc>
4655 Returns a snapshot of this machine with the given name.
4656
4657 <result name="VBOX_E_OBJECT_NOT_FOUND">
4658 Virtual machine has no snapshots or snapshot not found.
4659 </result>
4660
4661 </desc>
4662 <param name="name" type="wstring" dir="in">
4663 <desc>Name of the snapshot to find</desc>
4664 </param>
4665 <param name="snapshot" type="ISnapshot" dir="return">
4666 <desc>Snapshot object with the given name.</desc>
4667 </param>
4668 </method>
4669
4670 <method name="setCurrentSnapshot">
4671 <desc>
4672 Sets the current snapshot of this machine.
4673 <note>
4674 In the current implementation, this operation is not
4675 implemented.
4676 </note>
4677 </desc>
4678 <param name="id" type="uuid" dir="in">
4679 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4680 </param>
4681 </method>
4682
4683 <method name="createSharedFolder">
4684 <desc>
4685 Creates a new permanent shared folder by associating the given logical
4686 name with the given host path, adds it to the collection of shared
4687 folders and starts sharing it. Refer to the description of
4688 <link to="ISharedFolder"/> to read more about logical names.
4689
4690 <result name="VBOX_E_OBJECT_IN_USE">
4691 Shared folder already exists.
4692 </result>
4693 <result name="VBOX_E_FILE_ERROR">
4694 Shared folder @a hostPath not accessible.
4695 </result>
4696
4697 </desc>
4698 <param name="name" type="wstring" dir="in">
4699 <desc>Unique logical name of the shared folder.</desc>
4700 </param>
4701 <param name="hostPath" type="wstring" dir="in">
4702 <desc>Full path to the shared folder in the host file system.</desc>
4703 </param>
4704 <param name="writable" type="boolean" dir="in">
4705 <desc>Whether the share is writable or readonly</desc>
4706 </param>
4707 </method>
4708
4709 <method name="removeSharedFolder">
4710 <desc>
4711 Removes the permanent shared folder with the given name previously
4712 created by <link to="#createSharedFolder"/> from the collection of
4713 shared folders and stops sharing it.
4714
4715 <result name="VBOX_E_INVALID_VM_STATE">
4716 Virtual machine is not mutable.
4717 </result>
4718 <result name="VBOX_E_OBJECT_NOT_FOUND">
4719 Shared folder @a name does not exist.
4720 </result>
4721
4722 </desc>
4723 <param name="name" type="wstring" dir="in">
4724 <desc>Logical name of the shared folder to remove.</desc>
4725 </param>
4726 </method>
4727
4728 <method name="canShowConsoleWindow">
4729 <desc>
4730 Returns @c true if the VM console process can activate the
4731 console window and bring it to foreground on the desktop of
4732 the host PC.
4733 <note>
4734 This method will fail if a session for this machine is not
4735 currently open.
4736 </note>
4737
4738 <result name="VBOX_E_INVALID_VM_STATE">
4739 Machine session is not open.
4740 </result>
4741
4742 </desc>
4743 <param name="canShow" type="boolean" dir="return">
4744 <desc>
4745 @c true if the console window can be shown and @c
4746 false otherwise.
4747 </desc>
4748 </param>
4749 </method>
4750
4751 <method name="showConsoleWindow">
4752 <desc>
4753 Activates the console window and brings it to foreground on
4754 the desktop of the host PC. Many modern window managers on
4755 many platforms implement some sort of focus stealing
4756 prevention logic, so that it may be impossible to activate
4757 a window without the help of the currently active
4758 application. In this case, this method will return a non-zero
4759 identifier that represents the top-level window of the VM
4760 console process. The caller, if it represents a currently
4761 active process, is responsible to use this identifier (in a
4762 platform-dependent manner) to perform actual window
4763 activation.
4764 <note>
4765 This method will fail if a session for this machine is not
4766 currently open.
4767 </note>
4768
4769 <result name="VBOX_E_INVALID_VM_STATE">
4770 Machine session is not open.
4771 </result>
4772
4773 </desc>
4774 <param name="winId" type="unsigned long long" dir="return">
4775 <desc>
4776 Platform-dependent identifier of the top-level VM console
4777 window, or zero if this method has performed all actions
4778 necessary to implement the <i>show window</i> semantics for
4779 the given platform and/or VirtualBox front-end.
4780 </desc>
4781 </param>
4782 </method>
4783
4784 <method name="getGuestProperty">
4785 <desc>
4786 Reads an entry from the machine's guest property store.
4787
4788 <result name="VBOX_E_INVALID_VM_STATE">
4789 Machine session is not open.
4790 </result>
4791
4792 </desc>
4793 <param name="name" type="wstring" dir="in">
4794 <desc>
4795 The name of the property to read.
4796 </desc>
4797 </param>
4798 <param name="value" type="wstring" dir="out">
4799 <desc>
4800 The value of the property. If the property does not exist then this
4801 will be empty.
4802 </desc>
4803 </param>
4804 <param name="timestamp" type="unsigned long long" dir="out">
4805 <desc>
4806 The time at which the property was last modified, as seen by the
4807 server process.
4808 </desc>
4809 </param>
4810 <param name="flags" type="wstring" dir="out">
4811 <desc>
4812 Additional property parameters, passed as a comma-separated list of
4813 "name=value" type entries.
4814 </desc>
4815 </param>
4816 </method>
4817
4818 <method name="getGuestPropertyValue">
4819 <desc>
4820 Reads a value from the machine's guest property store.
4821
4822 <result name="VBOX_E_INVALID_VM_STATE">
4823 Machine session is not open.
4824 </result>
4825
4826 </desc>
4827 <param name="property" type="wstring" dir="in">
4828 <desc>
4829 The name of the property to read.
4830 </desc>
4831 </param>
4832 <param name="value" type="wstring" dir="return">
4833 <desc>
4834 The value of the property. If the property does not exist then this
4835 will be empty.
4836 </desc>
4837 </param>
4838 </method>
4839
4840 <method name="getGuestPropertyTimestamp">
4841 <desc>
4842 Reads a property timestamp from the machine's guest property store.
4843
4844 <result name="VBOX_E_INVALID_VM_STATE">
4845 Machine session is not open.
4846 </result>
4847
4848 </desc>
4849 <param name="property" type="wstring" dir="in">
4850 <desc>
4851 The name of the property to read.
4852 </desc>
4853 </param>
4854 <param name="value" type="unsigned long long" dir="return">
4855 <desc>
4856 The timestamp. If the property does not exist then this will be
4857 empty.
4858 </desc>
4859 </param>
4860 </method>
4861
4862 <method name="setGuestProperty">
4863 <desc>
4864 Sets, changes or deletes an entry in the machine's guest property
4865 store.
4866
4867 <result name="E_ACCESSDENIED">
4868 Property cannot be changed.
4869 </result>
4870 <result name="E_INVALIDARG">
4871 Invalid @a flags.
4872 </result>
4873 <result name="VBOX_E_INVALID_VM_STATE">
4874 Virtual machine is not mutable or session not open.
4875 </result>
4876 <result name="VBOX_E_INVALID_OBJECT_STATE">
4877 Cannot set transient property when machine not running.
4878 </result>
4879
4880 </desc>
4881 <param name="property" type="wstring" dir="in">
4882 <desc>
4883 The name of the property to set, change or delete.
4884 </desc>
4885 </param>
4886 <param name="value" type="wstring" dir="in">
4887 <desc>
4888 The new value of the property to set, change or delete. If the
4889 property does not yet exist and value is non-empty, it will be
4890 created. If the value is empty, the key will be deleted if it
4891 exists.
4892 </desc>
4893 </param>
4894 <param name="flags" type="wstring" dir="in">
4895 <desc>
4896 Additional property parameters, passed as a comma-separated list of
4897 "name=value" type entries.
4898 </desc>
4899 </param>
4900 </method>
4901
4902 <method name="setGuestPropertyValue">
4903 <desc>
4904 Sets, changes or deletes a value in the machine's guest property
4905 store. The flags field will be left unchanged or created empty for a
4906 new property.
4907
4908 <result name="E_ACCESSDENIED">
4909 Property cannot be changed.
4910 </result>
4911 <result name="VBOX_E_INVALID_VM_STATE">
4912 Virtual machine is not mutable or session not open.
4913 </result>
4914 <result name="VBOX_E_INVALID_OBJECT_STATE">
4915 Cannot set transient property when machine not running.
4916 </result>
4917 </desc>
4918
4919 <param name="property" type="wstring" dir="in">
4920 <desc>
4921 The name of the property to set, change or delete.
4922 </desc>
4923 </param>
4924 <param name="value" type="wstring" dir="in">
4925 <desc>
4926 The new value of the property to set, change or delete. If the
4927 property does not yet exist and value is non-empty, it will be
4928 created. If value is empty, the property will be deleted if it
4929 exists.
4930 </desc>
4931 </param>
4932 </method>
4933
4934 <method name="enumerateGuestProperties">
4935 <desc>
4936 Return a list of the guest properties matching a set of patterns along
4937 with their values, time stamps and flags.
4938 </desc>
4939 <param name="patterns" type="wstring" dir="in">
4940 <desc>
4941 The patterns to match the properties against, separated by '|'
4942 characters. If this is empty or NULL, all properties will match.
4943 </desc>
4944 </param>
4945 <param name="name" type="wstring" dir="out" safearray="yes">
4946 <desc>
4947 The names of the properties returned.
4948 </desc>
4949 </param>
4950 <param name="value" type="wstring" dir="out" safearray="yes">
4951 <desc>
4952 The values of the properties returned. The array entries match the
4953 corresponding entries in the @a name array.
4954 </desc>
4955 </param>
4956 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4957 <desc>
4958 The time stamps of the properties returned. The array entries match
4959 the corresponding entries in the @a name array.
4960 </desc>
4961 </param>
4962 <param name="flags" type="wstring" dir="out" safearray="yes">
4963 <desc>
4964 The flags of the properties returned. The array entries match the
4965 corresponding entries in the @a name array.
4966 </desc>
4967 </param>
4968 </method>
4969</interface>
4970
4971 <!--
4972 // IConsole
4973 /////////////////////////////////////////////////////////////////////////
4974 -->
4975
4976 <interface
4977 name="IConsoleCallback" extends="$unknown"
4978 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4979 wsmap="suppress"
4980 >
4981
4982 <method name="onMousePointerShapeChange">
4983 <desc>
4984 Notification when the guest mouse pointer shape has
4985 changed. The new shape data is given.
4986 </desc>
4987 <param name="visible" type="boolean" dir="in">
4988 <desc>
4989 Flag whether the pointer is visible.
4990 </desc>
4991 </param>
4992 <param name="alpha" type="boolean" dir="in">
4993 <desc>
4994 Flag whether the pointer has an alpha channel.
4995 </desc>
4996 </param>
4997 <param name="xHot" type="unsigned long" dir="in">
4998 <desc>
4999 The pointer hot spot x coordinate.
5000 </desc>
5001 </param>
5002 <param name="yHot" type="unsigned long" dir="in">
5003 <desc>
5004 The pointer hot spot y coordinate.
5005 </desc>
5006 </param>
5007 <param name="width" type="unsigned long" dir="in">
5008 <desc>
5009 Width of the pointer shape in pixels.
5010 </desc>
5011 </param>
5012 <param name="height" type="unsigned long" dir="in">
5013 <desc>
5014 Height of the pointer shape in pixels.
5015 </desc>
5016 </param>
5017 <param name="shape" type="octet" mod="ptr" dir="in">
5018 <desc>
5019 Address of the shape buffer.
5020
5021 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5022 followed by a 32-bpp XOR (color) mask.
5023
5024 For pointers without alpha channel the XOR mask pixels are 32
5025 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5026 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5027
5028 An AND mask is used for pointers with alpha channel, so if the
5029 callback does not support alpha, the pointer could be
5030 displayed as a normal color pointer.
5031
5032 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5033 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5034 height</tt>. The padding bits at the end of each scanline are
5035 undefined.
5036
5037 The XOR mask follows the AND mask on the next 4-byte aligned
5038 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5039 Bytes in the gap between the AND and the XOR mask are undefined.
5040 The XOR mask scanlines have no gap between them and the size of
5041 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5042
5043 <note>
5044 If @a shape is 0, only the pointer visibility is changed.
5045 </note>
5046 </desc>
5047 </param>
5048 </method>
5049
5050 <method name="onMouseCapabilityChange">
5051 <desc>
5052 Notification when the mouse capabilities reported by the
5053 guest have changed. The new capabilities are passed.
5054 </desc>
5055 <param name="supportsAbsolute" type="boolean" dir="in"/>
5056 <param name="needsHostCursor" type="boolean" dir="in"/>
5057 </method>
5058
5059 <method name="onKeyboardLedsChange">
5060 <desc>
5061 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5062 to alter the state of the keyboard LEDs.
5063 </desc>
5064 <param name="numLock" type="boolean" dir="in"/>
5065 <param name="capsLock" type="boolean" dir="in"/>
5066 <param name="scrollLock" type="boolean" dir="in"/>
5067 </method>
5068
5069 <method name="onStateChange">
5070 <desc>
5071 Notification when the execution state of the machine has changed.
5072 The new state will be given.
5073 </desc>
5074 <param name="state" type="MachineState" dir="in"/>
5075 </method>
5076
5077 <method name="onAdditionsStateChange">
5078 <desc>
5079 Notification when a Guest Additions property changes.
5080 Interested callees should query IGuest attributes to
5081 find out what has changed.
5082 </desc>
5083 </method>
5084
5085 <method name="onDVDDriveChange">
5086 <desc>
5087 Notification when a property of the
5088 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5089 Interested callees should use IDVDDrive methods to find out what has
5090 changed.
5091 </desc>
5092 </method>
5093
5094 <method name="onFloppyDriveChange">
5095 <desc>
5096 Notification when a property of the
5097 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5098 Interested callees should use IFloppyDrive methods to find out what
5099 has changed.
5100 </desc>
5101 </method>
5102
5103 <method name="onNetworkAdapterChange">
5104 <desc>
5105 Notification when a property of one of the
5106 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5107 changes. Interested callees should use INetworkAdapter methods and
5108 attributes to find out what has changed.
5109 </desc>
5110 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5111 <desc>Network adapter that is subject to change.</desc>
5112 </param>
5113 </method>
5114
5115 <method name="onSerialPortChange">
5116 <desc>
5117 Notification when a property of one of the
5118 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5119 Interested callees should use ISerialPort methods and attributes
5120 to find out what has changed.
5121 </desc>
5122 <param name="serialPort" type="ISerialPort" dir="in">
5123 <desc>Serial port that is subject to change.</desc>
5124 </param>
5125 </method>
5126
5127 <method name="onParallelPortChange">
5128 <desc>
5129 Notification when a property of one of the
5130 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5131 changes. Interested callees should use ISerialPort methods and
5132 attributes to find out what has changed.
5133 </desc>
5134 <param name="parallelPort" type="IParallelPort" dir="in">
5135 <desc>Parallel port that is subject to change.</desc>
5136 </param>
5137 </method>
5138
5139 <method name="onVRDPServerChange">
5140 <desc>
5141 Notification when a property of the
5142 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5143 Interested callees should use IVRDPServer methods and attributes to
5144 find out what has changed.
5145 </desc>
5146 </method>
5147
5148 <method name="onUSBControllerChange">
5149 <desc>
5150 Notification when a property of the virtual
5151 <link to="IMachine::USBController">USB controller</link> changes.
5152 Interested callees should use IUSBController methods and attributes to
5153 find out what has changed.
5154 </desc>
5155 </method>
5156
5157 <method name="onUSBDeviceStateChange">
5158 <desc>
5159 Notification when a USB device is attached to or detached from
5160 the virtual USB controller.
5161
5162 This notification is sent as a result of the indirect
5163 request to attach the device because it matches one of the
5164 machine USB filters, or as a result of the direct request
5165 issued by <link to="IConsole::attachUSBDevice"/> or
5166 <link to="IConsole::detachUSBDevice"/>.
5167
5168 This notification is sent in case of both a succeeded and a
5169 failed request completion. When the request succeeds, the @a
5170 error parameter is @c null, and the given device has been
5171 already added to (when @a attached is @c true) or removed from
5172 (when @a attached is @c false) the collection represented by
5173 <link to="IConsole::USBDevices"/>. On failure, the collection
5174 doesn't change and the @a error parameter represents the error
5175 message describing the failure.
5176
5177 </desc>
5178 <param name="device" type="IUSBDevice" dir="in">
5179 <desc>Device that is subject to state change.</desc>
5180 </param>
5181 <param name="attached" type="boolean" dir="in">
5182 <desc>
5183 <tt>true</tt> if the device was attached
5184 and <tt>false</tt> otherwise.
5185 </desc>
5186 </param>
5187 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5188 <desc>
5189 <tt>null</tt> on success or an error message object on
5190 failure.
5191 </desc>
5192 </param>
5193 </method>
5194
5195 <method name="onSharedFolderChange">
5196 <desc>
5197 Notification when a shared folder is added or removed.
5198 The @a scope argument defines one of three scopes:
5199 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5200 (<link to="Scope_Global">Global</link>),
5201 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5202 the machine (<link to="Scope_Machine">Machine</link>) or <link
5203 to="IConsole::sharedFolders">transient shared folders</link> of the
5204 machine (<link to="Scope_Session">Session</link>). Interested callees
5205 should use query the corresponding collections to find out what has
5206 changed.
5207 </desc>
5208 <param name="scope" type="Scope" dir="in">
5209 <desc>Scope of the notification.</desc>
5210 </param>
5211 </method>
5212
5213 <method name="onRuntimeError">
5214 <desc>
5215 Notification when an error happens during the virtual
5216 machine execution.
5217
5218 There are three kinds of runtime errors:
5219 <ul>
5220 <li><i>fatal</i></li>
5221 <li><i>non-fatal with retry</i></li>
5222 <li><i>non-fatal warnings</i></li>
5223 </ul>
5224
5225 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5226 to <tt>true</tt>. In case of fatal errors, the virtual machine
5227 execution is always paused before calling this notification, and
5228 the notification handler is supposed either to immediately save
5229 the virtual machine state using <link to="IConsole::saveState()"/>
5230 or power it off using <link to="IConsole::powerDown()"/>.
5231 Resuming the execution can lead to unpredictable results.
5232
5233 <b>Non-fatal</b> errors and warnings are indicated by the
5234 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5235 is in the Paused state by the time the error notification is
5236 received, it means that the user can <i>try to resume</i> the machine
5237 execution after attempting to solve the problem that caused the
5238 error. In this case, the notification handler is supposed
5239 to show an appropriate message to the user (depending on the
5240 value of the @a id parameter) that offers several actions such
5241 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5242 wants to retry, the notification handler should continue
5243 the machine execution using the <link to="IConsole::resume()"/>
5244 call. If the machine execution is not Paused during this
5245 notification, then it means this notification is a <i>warning</i>
5246 (for example, about a fatal condition that can happen very soon);
5247 no immediate action is required from the user, the machine
5248 continues its normal execution.
5249
5250 Note that in either case the notification handler
5251 <b>must not</b> perform any action directly on a thread
5252 where this notification is called. Everything it is allowed to
5253 do is to post a message to another thread that will then talk
5254 to the user and take the corresponding action.
5255
5256 Currently, the following error identifiers are known:
5257 <ul>
5258 <li><tt>"HostMemoryLow"</tt></li>
5259 <li><tt>"HostAudioNotResponding"</tt></li>
5260 <li><tt>"VDIStorageFull"</tt></li>
5261 </ul>
5262
5263 <note>
5264 This notification is not designed to be implemented by
5265 more than one callback at a time. If you have multiple
5266 IConsoleCallback instances registered on the given
5267 IConsole object, make sure you simply do nothing but
5268 return @c S_OK from all but one of them that does actual
5269 user notification and performs necessary actions.
5270 </note>
5271
5272 </desc>
5273 <param name="fatal" type="boolean" dir="in">
5274 <desc>Whether the error is fatal or not</desc>
5275 </param>
5276 <param name="id" type="wstring" dir="in">
5277 <desc>Error identifier</desc>
5278 </param>
5279 <param name="message" type="wstring" dir="in">
5280 <desc>Optional error message</desc>
5281 </param>
5282 </method>
5283
5284 <method name="onCanShowWindow">
5285 <desc>
5286 Notification when a call to
5287 <link to="IMachine::canShowConsoleWindow()"/> is made by a
5288 front-end to check if a subsequent call to
5289 <link to="IMachine::showConsoleWindow()"/> can succeed.
5290
5291 The callee should give an answer appropriate to the current
5292 machine state in the @a canShow argument. This answer must
5293 remain valid at least until the next
5294 <link to="IConsole::state">machine state</link> change.
5295
5296 <note>
5297 This notification is not designed to be implemented by
5298 more than one callback at a time. If you have multiple
5299 IConsoleCallback instances registered on the given
5300 IConsole object, make sure you simply do nothing but
5301 return @c true and @c S_OK from all but one of them that
5302 actually manages console window activation.
5303 </note>
5304 </desc>
5305 <param name="canShow" type="boolean" dir="return">
5306 <desc>
5307 @c true if the console window can be shown and @c
5308 false otherwise.
5309 </desc>
5310 </param>
5311 </method>
5312
5313 <method name="onShowWindow">
5314 <desc>
5315 Notification when a call to
5316 <link to="IMachine::showConsoleWindow()"/>
5317 requests the console window to be activated and brought to
5318 foreground on the desktop of the host PC.
5319
5320 This notification should cause the VM console process to
5321 perform the requested action as described above. If it is
5322 impossible to do it at a time of this notification, this
5323 method should return a failure.
5324
5325 Note that many modern window managers on many platforms
5326 implement some sort of focus stealing prevention logic, so
5327 that it may be impossible to activate a window without the
5328 help of the currently active application (which is supposedly
5329 an initiator of this notification). In this case, this method
5330 must return a non-zero identifier that represents the
5331 top-level window of the VM console process. The caller, if it
5332 represents a currently active process, is responsible to use
5333 this identifier (in a platform-dependent manner) to perform
5334 actual window activation.
5335
5336 This method must set @a winId to zero if it has performed all
5337 actions necessary to complete the request and the console
5338 window is now active and in foreground, to indicate that no
5339 further action is required on the caller's side.
5340
5341 <note>
5342 This notification is not designed to be implemented by
5343 more than one callback at a time. If you have multiple
5344 IConsoleCallback instances registered on the given
5345 IConsole object, make sure you simply do nothing but
5346 return @c S_OK from all but one of them that actually
5347 manages console window activation.
5348 </note>
5349 </desc>
5350 <param name="winId" type="unsigned long long" dir="return">
5351 <desc>
5352 Platform-dependent identifier of the top-level VM console
5353 window, or zero if this method has performed all actions
5354 necessary to implement the <i>show window</i> semantics for
5355 the given platform and/or this VirtualBox front-end.
5356 </desc>
5357 </param>
5358 </method>
5359
5360 </interface>
5361
5362 <interface
5363 name="IRemoteDisplayInfo" extends="$unknown"
5364 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5365 wsmap="struct"
5366 >
5367 <desc>
5368 Contains information about the remote display (VRDP) capabilities and status.
5369 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5370 </desc>
5371
5372 <attribute name="active" type="boolean" readonly="yes">
5373 <desc>
5374 Whether the remote display connection is active.
5375 </desc>
5376 </attribute>
5377
5378 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5379 <desc>
5380 How many times a client connected.
5381 </desc>
5382 </attribute>
5383
5384 <attribute name="beginTime" type="long long" readonly="yes">
5385 <desc>
5386 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5387 </desc>
5388 </attribute>
5389
5390 <attribute name="endTime" type="long long" readonly="yes">
5391 <desc>
5392 When the last connection was terminated or the current time, if
5393 connection is still active, in milliseconds since 1970-01-01 UTC.
5394 </desc>
5395 </attribute>
5396
5397 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5398 <desc>
5399 How many bytes were sent in last or current, if still active, connection.
5400 </desc>
5401 </attribute>
5402
5403 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5404 <desc>
5405 How many bytes were sent in all connections.
5406 </desc>
5407 </attribute>
5408
5409 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5410 <desc>
5411 How many bytes were received in last or current, if still active, connection.
5412 </desc>
5413 </attribute>
5414
5415 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5416 <desc>
5417 How many bytes were received in all connections.
5418 </desc>
5419 </attribute>
5420
5421 <attribute name="user" type="wstring" readonly="yes">
5422 <desc>
5423 Login user name supplied by the client.
5424 </desc>
5425 </attribute>
5426
5427 <attribute name="domain" type="wstring" readonly="yes">
5428 <desc>
5429 Login domain name supplied by the client.
5430 </desc>
5431 </attribute>
5432
5433 <attribute name="clientName" type="wstring" readonly="yes">
5434 <desc>
5435 The client name supplied by the client.
5436 </desc>
5437 </attribute>
5438
5439 <attribute name="clientIP" type="wstring" readonly="yes">
5440 <desc>
5441 The IP address of the client.
5442 </desc>
5443 </attribute>
5444
5445 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5446 <desc>
5447 The client software version number.
5448 </desc>
5449 </attribute>
5450
5451 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5452 <desc>
5453 Public key exchange method used when connection was established.
5454 Values: 0 - RDP4 public key exchange scheme.
5455 1 - X509 certificates were sent to client.
5456 </desc>
5457 </attribute>
5458
5459 </interface>
5460
5461 <interface
5462 name="IConsole" extends="$unknown"
5463 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5464 wsmap="managed"
5465 >
5466 <desc>
5467 The IConsole interface represents an interface to control virtual
5468 machine execution.
5469
5470 The console object that implements the IConsole interface is obtained
5471 from a session object after the session for the given machine has been
5472 opened using one of <link to="IVirtualBox::openSession"/>,
5473 <link to="IVirtualBox::openRemoteSession"/> or
5474 <link to="IVirtualBox::openExistingSession"/> methods.
5475
5476 Methods of the IConsole interface allow the caller to query the current
5477 virtual machine execution state, pause the machine or power it down, save
5478 the machine state or take a snapshot, attach and detach removable media
5479 and so on.
5480
5481 <see>ISession</see>
5482 </desc>
5483
5484 <attribute name="machine" type="IMachine" readonly="yes">
5485 <desc>
5486 Machine object this console is sessioned with.
5487 <note>
5488 This is a convenience property, it has the same value as
5489 <link to="ISession::machine"/> of the corresponding session
5490 object.
5491 </note>
5492 </desc>
5493 </attribute>
5494
5495 <attribute name="state" type="MachineState" readonly="yes">
5496 <desc>
5497 Current execution state of the machine.
5498 <note>
5499 This property always returns the same value as the corresponding
5500 property of the IMachine object this console is sessioned with.
5501 For the process that owns (executes) the VM, this is the
5502 preferable way of querying the VM state, because no IPC
5503 calls are made.
5504 </note>
5505 </desc>
5506 </attribute>
5507
5508 <attribute name="guest" type="IGuest" readonly="yes">
5509 <desc>Guest object.</desc>
5510 </attribute>
5511
5512 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5513 <desc>
5514 Virtual keyboard object.
5515 <note>
5516 If the machine is not running, any attempt to use
5517 the returned object will result in an error.
5518 </note>
5519 </desc>
5520 </attribute>
5521
5522 <attribute name="mouse" type="IMouse" readonly="yes">
5523 <desc>
5524 Virtual mouse object.
5525 <note>
5526 If the machine is not running, any attempt to use
5527 the returned object will result in an error.
5528 </note>
5529 </desc>
5530 </attribute>
5531
5532 <attribute name="display" type="IDisplay" readonly="yes">
5533 <desc>Virtual display object.
5534 <note>
5535 If the machine is not running, any attempt to use
5536 the returned object will result in an error.
5537 </note>
5538 </desc>
5539 </attribute>
5540
5541 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5542 <desc>Debugging interface.</desc>
5543 </attribute>
5544
5545 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5546 <desc>
5547 Collection of USB devices currently attached to the virtual
5548 USB controller.
5549 <note>
5550 The collection is empty if the machine is not running.
5551 </note>
5552 </desc>
5553 </attribute>
5554
5555 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5556 <desc>
5557 List of USB devices currently attached to the remote VRDP client.
5558 Once a new device is physically attached to the remote host computer,
5559 it appears in this list and remains there until detached.
5560 </desc>
5561 </attribute>
5562
5563 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5564 <desc>
5565 Collection of shared folders for the current session. These folders
5566 are called transient shared folders because they are available to the
5567 guest OS running inside the associated virtual machine only for the
5568 duration of the session (as opposed to
5569 <link to="IMachine::sharedFolders"/> which represent permanent shared
5570 folders). When the session is closed (e.g. the machine is powered down),
5571 these folders are automatically discarded.
5572
5573 New shared folders are added to the collection using
5574 <link to="#createSharedFolder"/>. Existing shared folders can be
5575 removed using <link to="#removeSharedFolder"/>.
5576 </desc>
5577 </attribute>
5578
5579 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5580 <desc>
5581 Interface that provides information on Remote Display (VRDP) connection.
5582 </desc>
5583 </attribute>
5584
5585 <method name="powerUp">
5586 <desc>
5587 Starts the virtual machine execution using the current machine
5588 state (that is, its current execution state, current settings and
5589 current hard disks).
5590
5591 If the machine is powered off or aborted, the execution will
5592 start from the beginning (as if the real hardware were just
5593 powered on).
5594
5595 If the machine is in the <link to="MachineState_Saved"/> state,
5596 it will continue its execution the point where the state has
5597 been saved.
5598
5599 <note>
5600 Unless you are trying to write a new VirtualBox front-end that
5601 performs direct machine execution (like the VirtualBox or VBoxSDL
5602 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5603 session opened by <link to="IVirtualBox::openSession"/> and use this
5604 session only to change virtual machine settings. If you simply want to
5605 start virtual machine execution using one of the existing front-ends
5606 (for example the VirtualBox GUI or headless server), simply use
5607 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5608 power up the machine automatically for you.
5609 </note>
5610
5611 <see>#saveState</see>
5612 <result name="VBOX_E_INVALID_VM_STATE">
5613 Virtual machine already running.
5614 </result>
5615 <result name="VBOX_E_HOST_ERROR">
5616 Host interface does not exist or name not set.
5617 </result>
5618 <result name="VBOX_E_FILE_ERROR">
5619 Invalid saved state file.
5620 </result>
5621 </desc>
5622 <param name="progress" type="IProgress" dir="return">
5623 <desc>Progress object to track the operation completion.</desc>
5624 </param>
5625 </method>
5626
5627 <method name="powerUpPaused">
5628 <desc>
5629 Identical to powerUp except that the VM will enter the
5630 <link to="MachineState_Paused"/> state, instead of
5631 <link to="MachineState_Running"/>.
5632
5633 <see>#powerUp</see>
5634 <result name="VBOX_E_INVALID_VM_STATE">
5635 Virtual machine already running.
5636 </result>
5637 <result name="VBOX_E_HOST_ERROR">
5638 Host interface does not exist or name not set.
5639 </result>
5640 <result name="VBOX_E_FILE_ERROR">
5641 Invalid saved state file.
5642 </result>
5643 </desc>
5644 <param name="progress" type="IProgress" dir="return">
5645 <desc>Progress object to track the operation completion.</desc>
5646 </param>
5647 </method>
5648
5649 <method name="powerDown">
5650 <desc>
5651 Stops the virtual machine execution.
5652 After this operation completes, the machine will go to the
5653 PoweredOff state.
5654
5655 @deprecated This method will be removed in VirtualBox 2.1 where the
5656 powerDownAsync() method will take its name. Do not use this method in
5657 the code.
5658 <result name="VBOX_E_INVALID_VM_STATE">
5659 Virtual machine must be Running, Paused or Stuck to be powered down.
5660 </result>
5661 <result name="VBOX_E_VM_ERROR">
5662 Unable to power off or destroy virtual machine.
5663 </result>
5664 </desc>
5665 </method>
5666
5667 <method name="powerDownAsync">
5668 <desc>
5669 Initiates the power down procedure to stop the virtual machine
5670 execution.
5671
5672 The completion of the power down procedure is tracked using the returned
5673 IProgress object. After the operation is complete, the machine will go
5674 to the PoweredOff state.
5675
5676 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5677 where the original powerDown() method will be removed. You will need to
5678 rename "powerDownAsync" to "powerDown" in your sources to make them
5679 build with version 2.1.
5680 <result name="VBOX_E_INVALID_VM_STATE">
5681 Virtual machine must be Running, Paused or Stuck to be powered down.
5682 </result>
5683 </desc>
5684 <param name="progress" type="IProgress" dir="return">
5685 <desc>Progress object to track the operation completion.</desc>
5686 </param>
5687 </method>
5688
5689 <method name="reset">
5690 <desc>Resets the virtual machine.
5691 <result name="VBOX_E_INVALID_VM_STATE">
5692 Virtual machine not in Running state.
5693 </result>
5694 <result name="VBOX_E_VM_ERROR">
5695 Virtual machine error in reset operation.
5696 </result>
5697 </desc>
5698 </method>
5699
5700 <method name="pause">
5701 <desc>Pauses the virtual machine execution.
5702 <result name="VBOX_E_INVALID_VM_STATE">
5703 Virtual machine not in Running state.
5704 </result>
5705 <result name="VBOX_E_VM_ERROR">
5706 Virtual machine error in suspend operation.
5707 </result>
5708 </desc>
5709 </method>
5710
5711 <method name="resume">
5712 <desc>Resumes the virtual machine execution.
5713 <result name="VBOX_E_INVALID_VM_STATE">
5714 Virtual machine not in Paused state.
5715 </result>
5716 <result name="VBOX_E_VM_ERROR">
5717 Virtual machine error in resume operation.
5718 </result>
5719 </desc>
5720 </method>
5721
5722 <method name="powerButton">
5723 <desc>Sends the ACPI power button event to the guest.
5724 <result name="VBOX_E_INVALID_VM_STATE">
5725 Virtual machine not in Running state.
5726 </result>
5727 <result name="VBOX_E_PDM_ERROR">
5728 Controlled power off failed.
5729 </result>
5730 </desc>
5731 </method>
5732
5733 <method name="sleepButton">
5734 <desc>Sends the ACPI sleep button event to the guest.
5735 <result name="VBOX_E_INVALID_VM_STATE">
5736 Virtual machine not in Running state.
5737 </result>
5738 <result name="VBOX_E_PDM_ERROR">
5739 Sending sleep button event failed.
5740 </result>
5741 </desc>
5742 </method>
5743
5744 <method name="getPowerButtonHandled">
5745 <desc>Checks if the last power button event was handled by guest.
5746 <result name="VBOX_E_PDM_ERROR">
5747 Checking if the event was handled by the guest OS failed.
5748 </result>
5749 </desc>
5750 <param name="handled" type="boolean" dir="return"/>
5751 </method>
5752
5753 <method name="getGuestEnteredACPIMode">
5754 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5755 G1 (sleeping). If this method returns false, the guest will
5756 most likely not respond to external ACPI events.
5757 <result name="VBOX_E_INVALID_VM_STATE">
5758 Virtual machine not in Running state.
5759 </result>
5760 </desc>
5761 <param name="entered" type="boolean" dir="return"/>
5762 </method>
5763
5764 <method name="saveState">
5765 <desc>
5766 Saves the current execution state of a running virtual machine
5767 and stops its execution.
5768
5769 After this operation completes, the machine will go to the
5770 Saved state. Next time it is powered up, this state will
5771 be restored and the machine will continue its execution from
5772 the place where it was saved.
5773
5774 This operation differs from taking a snapshot to the effect
5775 that it doesn't create new differencing hard disks. Also, once
5776 the machine is powered up from the state saved using this method,
5777 the saved state is deleted, so it will be impossible to return
5778 to this state later.
5779
5780 <note>
5781 On success, this method implicitly calls
5782 <link to="IMachine::saveSettings()"/> to save all current machine
5783 settings (including runtime changes to the DVD drive, etc.).
5784 Together with the impossibility to change any VM settings when it is
5785 in the Saved state, this guarantees adequate hardware
5786 configuration of the machine when it is restored from the saved
5787 state file.
5788 </note>
5789
5790 <note>
5791 The machine must be in the Running or Paused state, otherwise
5792 the operation will fail.
5793 </note>
5794 <result name="VBOX_E_INVALID_VM_STATE">
5795 Virtual machine state neither Running nor Paused.
5796 </result>
5797 <result name="VBOX_E_FILE_ERROR">
5798 Failed to create directory for saved state file.
5799 </result>
5800
5801 <see><link to="#takeSnapshot"/></see>
5802 </desc>
5803 <param name="progress" type="IProgress" dir="return">
5804 <desc>Progress object to track the operation completion.</desc>
5805 </param>
5806 </method>
5807
5808 <method name="adoptSavedState">
5809 <desc>
5810 Associates the given saved state file to the virtual machine.
5811
5812 On success, the machine will go to the Saved state. Next time it is
5813 powered up, it will be restored from the adopted saved state and
5814 continue execution from the place where the saved state file was
5815 created.
5816
5817 The specified saved state file path may be absolute or relative to the
5818 folder the VM normally saves the state to (usually,
5819 <link to="IMachine::snapshotFolder"/>).
5820
5821 <note>
5822 It's a caller's responsibility to make sure the given saved state
5823 file is compatible with the settings of this virtual machine that
5824 represent its virtual hardware (memory size, hard disk configuration
5825 etc.). If there is a mismatch, the behavior of the virtual machine
5826 is undefined.
5827 </note>
5828 <result name="VBOX_E_INVALID_VM_STATE">
5829 Virtual machine state neither PoweredOff nor Aborted.
5830 </result>
5831 </desc>
5832 <param name="savedStateFile" type="wstring" dir="in">
5833 <desc>Path to the saved state file to adopt.</desc>
5834 </param>
5835 </method>
5836
5837 <method name="discardSavedState">
5838 <desc>
5839 Discards (deletes) the saved state of the virtual machine
5840 previously created by <link to="#saveState"/>. Next time the
5841 machine is powered up, a clean boot will occur.
5842 <note>
5843 This operation is equivalent to resetting or powering off
5844 the machine without doing a proper shutdown in the guest OS.
5845 </note>
5846 <result name="VBOX_E_INVALID_VM_STATE">
5847 Virtual machine not in state Saved.
5848 </result>
5849 </desc>
5850 </method>
5851
5852 <method name="getDeviceActivity">
5853 <desc>
5854 Gets the current activity type of a given device or device group.
5855 <result name="E_INVALIDARG">
5856 Invalid device type.
5857 </result>
5858 </desc>
5859 <param name="type" type="DeviceType" dir="in"/>
5860 <param name="activity" type="DeviceActivity" dir="return"/>
5861 </method>
5862
5863 <method name="attachUSBDevice">
5864 <desc>
5865 Attaches a host USB device with the given UUID to the
5866 USB controller of the virtual machine.
5867
5868 The device needs to be in one of the following states:
5869 <link to="USBDeviceState_Busy"/>,
5870 <link to="USBDeviceState_Available"/> or
5871 <link to="USBDeviceState_Held"/>,
5872 otherwise an error is immediately returned.
5873
5874 When the device state is
5875 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5876 be returned if the host computer refuses to release it for some reason.
5877
5878 <see>IUSBController::deviceFilters, USBDeviceState</see>
5879 <result name="VBOX_E_INVALID_VM_STATE">
5880 Virtual machine state neither Running nor Paused.
5881 </result>
5882 <result name="VBOX_E_PDM_ERROR">
5883 Virtual machine does not have a USB controller.
5884 </result>
5885 </desc>
5886 <param name="id" type="uuid" dir="in">
5887 <desc>UUID of the host USB device to attach.</desc>
5888 </param>
5889 </method>
5890
5891 <method name="detachUSBDevice">
5892 <desc>
5893 Detaches an USB device with the given UUID from the USB controller
5894 of the virtual machine.
5895
5896 After this method succeeds, the VirtualBox server re-initiates
5897 all USB filters as if the device were just physically attached
5898 to the host, but filters of this machine are ignored to avoid
5899 a possible automatic re-attachment.
5900
5901 <see>IUSBController::deviceFilters, USBDeviceState</see>
5902
5903 <result name="VBOX_E_PDM_ERROR">
5904 Virtual machine does not have a USB controller.
5905 </result>
5906 <result name="E_INVALIDARG">
5907 USB device not attached to this virtual machine.
5908 </result>
5909 </desc>
5910 <param name="id" type="uuid" dir="in">
5911 <desc>UUID of the USB device to detach.</desc>
5912 </param>
5913 <param name="device" type="IUSBDevice" dir="return">
5914 <desc>Detached USB device.</desc>
5915 </param>
5916 </method>
5917
5918 <method name="createSharedFolder">
5919 <desc>
5920 Creates a transient new shared folder by associating the given logical
5921 name with the given host path, adds it to the collection of shared
5922 folders and starts sharing it. Refer to the description of
5923 <link to="ISharedFolder"/> to read more about logical names.
5924
5925 <result name="VBOX_E_INVALID_VM_STATE">
5926 Virtual machine in Saved state or currently changing state.
5927 </result>
5928 <result name="VBOX_E_FILE_ERROR">
5929 Shared folder already exists or not accessible.
5930 </result>
5931 </desc>
5932 <param name="name" type="wstring" dir="in">
5933 <desc>Unique logical name of the shared folder.</desc>
5934 </param>
5935 <param name="hostPath" type="wstring" dir="in">
5936 <desc>Full path to the shared folder in the host file system.</desc>
5937 </param>
5938 <param name="writable" type="boolean" dir="in">
5939 <desc>Whether the share is writable or readonly</desc>
5940 </param>
5941 </method>
5942
5943 <method name="removeSharedFolder">
5944 <desc>
5945 Removes a transient shared folder with the given name previously
5946 created by <link to="#createSharedFolder"/> from the collection of
5947 shared folders and stops sharing it.
5948 <result name="VBOX_E_INVALID_VM_STATE">
5949 Virtual machine in Saved state or currently changing state.
5950 </result>
5951 <result name="VBOX_E_FILE_ERROR">
5952 Shared folder does not exists.
5953 </result>
5954 </desc>
5955 <param name="name" type="wstring" dir="in">
5956 <desc>Logical name of the shared folder to remove.</desc>
5957 </param>
5958 </method>
5959
5960 <method name="takeSnapshot">
5961 <desc>
5962 Saves the current execution state and all settings of the
5963 machine and creates differencing images for all
5964 normal (non-independent) hard disks.
5965
5966 This method can be called for a PoweredOff, Saved, Running or
5967 Paused virtual machine. When the machine is PoweredOff, an
5968 offline <link to="ISnapshot">snapshot</link> is created,
5969 in all other cases -- an online snapshot.
5970
5971 The taken snapshot is always based on the
5972 <link to="IMachine::currentSnapshot">current
5973 snapshot</link> of the associated virtual machine and becomes
5974 a new current snapshot.
5975
5976 <note>
5977 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5978 save all current machine settings before taking an offline snapshot.
5979 </note>
5980
5981 <see>ISnapshot, <link to="#saveState"/></see>
5982 <result name="VBOX_E_INVALID_VM_STATE">
5983 Virtual machine currently changing state.
5984 </result>
5985 </desc>
5986 <param name="name" type="wstring" dir="in">
5987 <desc>Short name for the snapshot.</desc>
5988 </param>
5989 <param name="description" type="wstring" dir="in">
5990 <desc>Optional description of the snapshot.</desc>
5991 </param>
5992 <param name="progress" type="IProgress" dir="return">
5993 <desc>Progress object to track the operation completion.</desc>
5994 </param>
5995 </method>
5996
5997 <method name="discardSnapshot">
5998 <desc>
5999
6000 Starts discarding the specified snapshot. The execution state
6001 and settings of the associated machine stored in the snapshot
6002 will be deleted. The contents of all differencing hard disks of
6003 this snapshot will be merged with the contents of their
6004 dependent child hard disks to keep the, disks valid (in other
6005 words, all changes represented by hard disks being discarded
6006 will be propagated to their child hard disks). After that, this
6007 snapshot's differencing hard disks will be deleted. The parent
6008 of this snapshot will become a new parent for all its child
6009 snapshots.
6010
6011 If the discarded snapshot is the current one, its parent
6012 snapshot will become a new current snapshot. The current machine
6013 state is not directly affected in this case, except that
6014 currently attached differencing hard disks based on hard disks
6015 of the discarded snapshot will be also merged as described
6016 above.
6017
6018 If the discarded snapshot is the first one (the root snapshot)
6019 and it has exactly one child snapshot, this child snapshot will
6020 become the first snapshot after discarding. If there are no
6021 children at all (i.e. the first snapshot is the only snapshot of
6022 the machine), both the current and the first snapshot of the
6023 machine will be set to null. In all other cases, the first
6024 snapshot cannot be discarded.
6025
6026 You cannot discard the snapshot if it
6027 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6028 hard disks that have differencing hard disks based on them. Snapshots of
6029 such kind can be discarded only when every normal hard disk has either
6030 no children at all or exactly one child. In the former case, the normal
6031 hard disk simply becomes unused (i.e. not attached to any VM). In the
6032 latter case, it receives all the changes stored in the child hard disk,
6033 and then it replaces the child hard disk in the configuration of the
6034 corresponding snapshot or machine.
6035
6036 Also, you cannot discard the snapshot if it stores hard disks
6037 (of any type) having differencing child hard disks that belong
6038 to other machines. Such snapshots can be only discarded after
6039 you discard all snapshots of other machines containing "foreign"
6040 child disks, or detach these "foreign" child disks from machines
6041 they are attached to.
6042
6043 One particular example of the snapshot storing normal hard disks
6044 is the first snapshot of a virtual machine that had normal hard
6045 disks attached when taking the snapshot. Be careful when
6046 discarding such snapshots because this implicitly commits
6047 changes (made since the snapshot being discarded has been taken)
6048 to normal hard disks (as described above), which may be not what
6049 you want.
6050
6051 The virtual machine is put to
6052 the <link to="MachineState_Discarding">Discarding</link> state until
6053 the discard operation is completed.
6054
6055 <note>
6056 The machine must not be running, otherwise the operation
6057 will fail.
6058 </note>
6059
6060 <note>
6061 Child hard disks of all normal hard disks of the discarded snapshot
6062 must be accessible (see <link to="IMedium::state"/>) for this
6063 operation to succeed. In particular, this means that all virtual
6064 machines, whose hard disks are directly or indirectly based on the
6065 hard disks of discarded snapshot, must be powered off.
6066 </note>
6067 <note>
6068 Merging hard disk contents can be very time and disk space
6069 consuming, if these disks are big in size and have many
6070 children. However, if the snapshot being discarded is the last
6071 (head) snapshot on the branch, the operation will be rather
6072 quick.
6073 </note>
6074 <note>
6075 Note that discarding the current snapshot
6076 will implicitly call <link to="IMachine::saveSettings()"/> to
6077 make all current machine settings permanent.
6078 </note>
6079 <result name="VBOX_E_INVALID_VM_STATE">
6080 Virtual machine is running.
6081 </result>
6082 </desc>
6083 <param name="id" type="uuid" dir="in">
6084 <desc>UUID of the snapshot to discard.</desc>
6085 </param>
6086 <param name="progress" type="IProgress" dir="return">
6087 <desc>Progress object to track the operation completion.</desc>
6088 </param>
6089 </method>
6090
6091 <method name="discardCurrentState">
6092 <desc>
6093 This operation is similar to <link to="#discardSnapshot()"/> but
6094 affects the current machine state. This means that the state stored in
6095 the current snapshot will become a new current state, and all current
6096 settings of the machine and changes stored in differencing hard disks
6097 will be lost.
6098
6099 After this operation is successfully completed, new empty differencing
6100 hard disks are created for all normal hard disks of the machine.
6101
6102 If the current snapshot of the machine is an online snapshot, the
6103 machine will go to the <link to="MachineState_Saved"> saved
6104 state</link>, so that the next time it is powered on, the execution
6105 state will be restored from the current snapshot.
6106
6107 <note>
6108 The machine must not be running, otherwise the operation will fail.
6109 </note>
6110
6111 <note>
6112 If the machine state is <link to="MachineState_Saved">Saved</link>
6113 prior to this operation, the saved state file will be implicitly
6114 discarded (as if <link to="IConsole::discardSavedState()"/> were
6115 called).
6116 </note>
6117
6118 <result name="VBOX_E_INVALID_VM_STATE">
6119 Virtual machine is running.
6120 </result>
6121 </desc>
6122 <param name="progress" type="IProgress" dir="return">
6123 <desc>Progress object to track the operation completion.</desc>
6124 </param>
6125 </method>
6126
6127 <method name="discardCurrentSnapshotAndState">
6128 <desc>
6129
6130 This method is equivalent to
6131 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6132 (currentSnapshot.id(), progress) followed by
6133 <link to="#discardCurrentState()"/>.
6134
6135 As a result, the machine will be fully restored from the
6136 snapshot preceding the current snapshot, while both the current
6137 snapshot and the current machine state will be discarded.
6138
6139 If the current snapshot is the first snapshot of the machine (i.e. it
6140 has the only snapshot), the current machine state will be
6141 discarded <b>before</b> discarding the snapshot. In other words, the
6142 machine will be restored from its last snapshot, before discarding
6143 it. This differs from performing a single
6144 <link to="#discardSnapshot()"/> call (note that no
6145 <link to="#discardCurrentState()"/> will be possible after it)
6146 to the effect that the latter will preserve the current state instead of
6147 discarding it.
6148
6149 Unless explicitly mentioned otherwise, all remarks and
6150 limitations of the above two methods also apply to this method.
6151
6152 <note>
6153 The machine must not be running, otherwise the operation
6154 will fail.
6155 </note>
6156
6157 <note>
6158 If the machine state is <link to="MachineState_Saved">Saved</link>
6159 prior to this operation, the saved state file will be implicitly
6160 discarded (as if <link to="#discardSavedState()"/> were
6161 called).
6162 </note>
6163
6164 <note>
6165 This method is more efficient than calling both of the above
6166 methods separately: it requires less IPC calls and provides
6167 a single progress object.
6168 </note>
6169
6170 <result name="VBOX_E_INVALID_VM_STATE">
6171 Virtual machine is running.
6172 </result>
6173 </desc>
6174 <param name="progress" type="IProgress" dir="return">
6175 <desc>Progress object to track the operation completion.</desc>
6176 </param>
6177 </method>
6178
6179 <method name="registerCallback">
6180 <desc>
6181 Registers a new console callback on this instance. The methods of the
6182 callback interface will be called by this instance when the appropriate
6183 event occurs.
6184 </desc>
6185 <param name="callback" type="IConsoleCallback" dir="in"/>
6186 </method>
6187
6188 <method name="unregisterCallback">
6189 <desc>
6190 Unregisters the console callback previously registered using
6191 <link to="#registerCallback"/>.
6192 <result name="E_INVALIDARG">
6193 Given @a callback handler is not registered.
6194 </result>
6195 </desc>
6196 <param name="callback" type="IConsoleCallback" dir="in"/>
6197 </method>
6198 </interface>
6199
6200 <!--
6201 // IHost
6202 /////////////////////////////////////////////////////////////////////////
6203 -->
6204
6205 <interface
6206 name="IHostDVDDrive" extends="$unknown"
6207 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6208 wsmap="managed"
6209 >
6210 <desc>
6211 The IHostDVDDrive interface represents the physical CD/DVD drive
6212 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6213 </desc>
6214
6215 <attribute name="name" type="wstring" readonly="yes">
6216 <desc>
6217 Returns the platform-specific device identifier.
6218 On DOS-like platforms, it is a drive name (e.g. R:).
6219 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6220 </desc>
6221 </attribute>
6222 <attribute name="description" type="wstring" readonly="yes">
6223 <desc>
6224 Returns a human readable description for the drive. This
6225 description usually contains the product and vendor name. A
6226 @c null string is returned if the description is not available.
6227 </desc>
6228 </attribute>
6229 <attribute name="udi" type="wstring" readonly="yes">
6230 <desc>
6231 Returns the unique device identifier for the drive. This
6232 attribute is reserved for future use instead of
6233 <link to="#name"/>. Currently it is not used and may return
6234 @c null on some platforms.
6235 </desc>
6236 </attribute>
6237
6238 </interface>
6239
6240 <enumerator
6241 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
6242 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
6243 />
6244
6245 <collection
6246 name="IHostDVDDriveCollection" type="IHostDVDDrive"
6247 enumerator="IHostDVDDriveEnumerator"
6248 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
6249 readonly="yes"
6250 >
6251 <method name="findByName">
6252 <desc>
6253 Searches this collection for a host drive with the given name.
6254 <note>
6255 The method returns an error if the given name does not
6256 correspond to any host drive in the collection.
6257 </note>
6258 </desc>
6259 <param name="name" type="wstring" dir="in">
6260 <desc>Name of the host drive to search for</desc>
6261 </param>
6262 <param name="drive" type="IHostDVDDrive" dir="return">
6263 <desc>Found host drive object</desc>
6264 </param>
6265 </method>
6266 </collection>
6267
6268 <interface
6269 name="IHostFloppyDrive" extends="$unknown"
6270 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
6271 wsmap="managed"
6272 >
6273 <desc>
6274 The IHostFloppyDrive interface represents the physical floppy drive
6275 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6276 </desc>
6277 <attribute name="name" type="wstring" readonly="yes">
6278 <desc>
6279 Returns the platform-specific device identifier.
6280 On DOS-like platforms, it is a drive name (e.g. A:).
6281 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6282 </desc>
6283 </attribute>
6284 <attribute name="description" type="wstring" readonly="yes">
6285 <desc>
6286 Returns a human readable description for the drive. This
6287 description usually contains the product and vendor name. A
6288 @c null string is returned if the description is not available.
6289 </desc>
6290 </attribute>
6291 <attribute name="udi" type="wstring" readonly="yes">
6292 <desc>
6293 Returns the unique device identifier for the drive. This
6294 attribute is reserved for future use instead of
6295 <link to="#name"/>. Currently it is not used and may return
6296 @c null on some platforms.
6297 </desc>
6298 </attribute>
6299 </interface>
6300
6301 <enumerator
6302 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
6303 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
6304 />
6305
6306 <collection
6307 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
6308 enumerator="IHostFloppyDriveEnumerator"
6309 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
6310 readonly="yes"
6311 >
6312 <method name="findByName">
6313 <desc>
6314 Searches this collection for a host drive with the given name.
6315 <note>
6316 The method returns an error if the given name does not
6317 correspond to any host drive in the collection.
6318 </note>
6319 </desc>
6320 <param name="name" type="wstring" dir="in">
6321 <desc>Name of the host drive to search for</desc>
6322 </param>
6323 <param name="drive" type="IHostFloppyDrive" dir="return">
6324 <desc>Found host drive object</desc>
6325 </param>
6326 </method>
6327 </collection>
6328
6329 <enum
6330 name="HostNetworkInterfaceType"
6331 uuid="763754FA-3246-4539-9590-9E603EDBF706"
6332 >
6333 <desc>
6334 Type of encapsulation. Ethernet encapsulation includes both wired and
6335 wireless Ethernet connections.
6336 <see>IHostNetworkInterface</see>
6337 </desc>
6338
6339 <const name="Unknown" value="0">
6340 <desc>
6341 The type of interface cannot be determined.
6342 </desc>
6343 </const>
6344 <const name="Ethernet" value="1">
6345 <desc>
6346 Ethernet frame encapsulation.
6347 </desc>
6348 </const>
6349 <const name="PPP" value="2">
6350 <desc>
6351 Point-to-point protocol encapsulation.
6352 </desc>
6353 </const>
6354 <const name="SLIP" value="3">
6355 <desc>
6356 Serial line IP encapsulation.
6357 </desc>
6358 </const>
6359 </enum>
6360
6361 <enum
6362 name="HostNetworkInterfaceStatus"
6363 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6364 >
6365 <desc>
6366 Current status of the interface.
6367 <see>IHostNetworkInterface</see>
6368 </desc>
6369
6370 <const name="Unknown" value="0">
6371 <desc>
6372 The state of interface cannot be determined.
6373 </desc>
6374 </const>
6375 <const name="Up" value="1">
6376 <desc>
6377 The interface is fully operational.
6378 </desc>
6379 </const>
6380 <const name="Down" value="2">
6381 <desc>
6382 The interface is not functioning.
6383 </desc>
6384 </const>
6385 </enum>
6386
6387 <interface
6388 name="IHostNetworkInterface" extends="$unknown"
6389 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
6390 wsmap="managed"
6391 >
6392 <desc>
6393 Reprents one of host's network interfaces. IP V6 address and network
6394 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6395 separated by colons.
6396 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6397 </desc>
6398 <attribute name="name" type="wstring" readonly="yes">
6399 <desc>Returns the host network interface name.</desc>
6400 </attribute>
6401
6402 <attribute name="id" type="uuid" readonly="yes">
6403 <desc>Returns the interface UUID.</desc>
6404 </attribute>
6405
6406 <attribute name="IPAddress" type="unsigned long" readonly="yes">
6407 <desc>Returns the IP V4 address of the interface.</desc>
6408 </attribute>
6409
6410 <attribute name="networkMask" type="unsigned long" readonly="yes">
6411 <desc>Returns the network mask of the interface.</desc>
6412 </attribute>
6413
6414 <attribute name="IPV6Address" type="wstring" readonly="yes">
6415 <desc>Returns the IP V6 address of the interface.</desc>
6416 </attribute>
6417
6418 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
6419 <desc>Returns the IP V6 network mask of the interface.</desc>
6420 </attribute>
6421
6422 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6423 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6424 </attribute>
6425
6426 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
6427 <desc>Type of protocol encapsulation used.</desc>
6428 </attribute>
6429
6430 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6431 <desc>Status of the interface.</desc>
6432 </attribute>
6433 </interface>
6434
6435 <interface
6436 name="IHost" extends="$unknown"
6437 uuid="7c172c42-b209-4bdc-9ddf-a84f222bd59a"
6438 wsmap="managed"
6439 >
6440 <desc>
6441 The IHost interface represents the physical machine that this VirtualBox
6442 installation runs on.
6443
6444 An object implementing this interface is returned by the
6445 <link to="IVirtualBox::host" /> attribute. This interface contains
6446 read-only information about the host's physical hardware (such as what
6447 processors and disks are available, what the host operating system is,
6448 and so on) and also allows for manipulating some of the host's hardware,
6449 such as global USB device filters and host interface networking.
6450
6451 </desc>
6452 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6453 <desc>List of DVD drives available on the host.</desc>
6454 </attribute>
6455
6456 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6457 <desc>List of floppy drives available on the host.</desc>
6458 </attribute>
6459
6460 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6461 <desc>
6462 List of USB devices currently attached to the host.
6463 Once a new device is physically attached to the host computer,
6464 it appears in this list and remains there until detached.
6465
6466 <note>
6467 This method may set a @ref com_warnings "warning result code".
6468 </note>
6469 <note>
6470 If USB functionality is not available in the given edition of
6471 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6472 </note>
6473 </desc>
6474 </attribute>
6475
6476 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6477 <desc>
6478 List of USB device filters in action.
6479 When a new device is physically attached to the host computer,
6480 filters from this list are applied to it (in order they are stored
6481 in the list). The first matched filter will determine the
6482 <link to="IHostUSBDeviceFilter::action">action</link>
6483 performed on the device.
6484
6485 Unless the device is ignored by these filters, filters of all
6486 currently running virtual machines
6487 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6488
6489 <note>
6490 This method may set a @ref com_warnings "warning result code".
6491 </note>
6492 <note>
6493 If USB functionality is not available in the given edition of
6494 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6495 </note>
6496
6497 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6498 </desc>
6499 </attribute>
6500
6501 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6502 <desc>List of host network interfaces currently defined on the host.</desc>
6503 </attribute>
6504
6505 <attribute name="processorCount" type="unsigned long" readonly="yes">
6506 <desc>Number of (logical) CPUs installed in the host system.</desc>
6507 </attribute>
6508
6509 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6510 <desc>Number of (logical) CPUs online in the host system.</desc>
6511 </attribute>
6512
6513 <method name="getProcessorSpeed">
6514 <desc>Query the (approximate) maximum speed of a specified host CPU in
6515 Megahertz.
6516 </desc>
6517 <param name="cpuId" type="unsigned long" dir="in">
6518 <desc>
6519 Identifier of the CPU.
6520 </desc>
6521 </param>
6522 <param name="speed" type="unsigned long" dir="return">
6523 <desc>
6524 Speed value. 0 is returned if value is not known or @a cpuId is
6525 invalid.
6526 </desc>
6527 </param>
6528 </method>
6529
6530 <method name="getProcessorFeature">
6531 <desc>Query whether a CPU feature is supported or not.</desc>
6532 <param name="feature" type="ProcessorFeature" dir="in">
6533 <desc>
6534 CPU Feature identifier.
6535 </desc>
6536 </param>
6537 <param name="supported" type="boolean" dir="return">
6538 <desc>
6539 Feature is supported or not.
6540 </desc>
6541 </param>
6542 </method>
6543
6544 <method name="getProcessorDescription">
6545 <desc>Query the model string of a specified host CPU.
6546 <note>
6547 This function is not implemented in the current version of the
6548 product.
6549 </note>
6550 </desc>
6551 <param name="cpuId" type="unsigned long" dir="in">
6552 <desc>
6553 Identifier of the CPU.
6554 </desc>
6555 </param>
6556 <param name="description" type="wstring" dir="return">
6557 <desc>
6558 Model string. A NULL string is returned if value is not known or
6559 @a cpuId is invalid.
6560 </desc>
6561 </param>
6562 </method>
6563
6564 <attribute name="memorySize" type="unsigned long" readonly="yes">
6565 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6566 </attribute>
6567
6568 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6569 <desc>Available system memory in the host system.</desc>
6570 </attribute>
6571
6572 <attribute name="operatingSystem" type="wstring" readonly="yes">
6573 <desc>Name of the host system's operating system.</desc>
6574 </attribute>
6575
6576 <attribute name="OSVersion" type="wstring" readonly="yes">
6577 <desc>Host operating system's version string.</desc>
6578 </attribute>
6579
6580 <attribute name="UTCTime" type="long long" readonly="yes">
6581 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6582 </attribute>
6583
6584<if target="midl">
6585 <method name="createHostNetworkInterface">
6586 <desc>
6587 Creates a new adapter for Host Interface Networking.
6588 <result name="E_INVALIDARG">
6589 Host network interface @a name already exists.
6590 </result>
6591 </desc>
6592 <param name="name" type="wstring" dir="in">
6593 <desc>
6594 Adapter name.
6595 </desc>
6596 </param>
6597 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6598 <desc>
6599 Created host interface object.
6600 </desc>
6601 </param>
6602 <param name="progress" type="IProgress" dir="return">
6603 <desc>
6604 Progress object to track the operation completion.
6605 </desc>
6606 </param>
6607 </method>
6608 <method name="removeHostNetworkInterface">
6609 <desc>
6610 Removes the given host network interface.
6611 <result name="VBOX_E_OBJECT_NOT_FOUND">
6612 No host network interface matching @a id found.
6613 </result>
6614 </desc>
6615 <param name="id" type="uuid" dir="in">
6616 <desc>
6617 Adapter GUID.
6618 </desc>
6619 </param>
6620 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6621 <desc>
6622 Removed host interface object.
6623 </desc>
6624 </param>
6625 <param name="progress" type="IProgress" dir="return">
6626 <desc>
6627 Progress object to track the operation completion.
6628 </desc>
6629 </param>
6630 </method>
6631</if>
6632
6633 <method name="createUSBDeviceFilter">
6634 <desc>
6635 Creates a new USB device filter. All attributes except
6636 the filter name are set to <tt>null</tt> (any match),
6637 <i>active</i> is <tt>false</tt> (the filter is not active).
6638
6639 The created filter can be added to the list of filters using
6640 <link to="#insertUSBDeviceFilter()"/>.
6641
6642 <see>#USBDeviceFilters</see>
6643 </desc>
6644 <param name="name" type="wstring" dir="in">
6645 <desc>
6646 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6647 for more info.
6648 </desc>
6649 </param>
6650 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6651 <desc>Created filter object.</desc>
6652 </param>
6653 </method>
6654
6655 <method name="insertUSBDeviceFilter">
6656 <desc>
6657 Inserts the given USB device to the specified position
6658 in the list of filters.
6659
6660 Positions are numbered starting from <tt>0</tt>. If the specified
6661 position is equal to or greater than the number of elements in
6662 the list, the filter is added at the end of the collection.
6663
6664 <note>
6665 Duplicates are not allowed, so an attempt to insert a
6666 filter that is already in the list, will return an
6667 error.
6668 </note>
6669 <note>
6670 This method may set a @ref com_warnings "warning result code".
6671 </note>
6672 <note>
6673 If USB functionality is not available in the given edition of
6674 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6675 </note>
6676
6677 <see>#USBDeviceFilters</see>
6678
6679 <result name="VBOX_E_INVALID_OBJECT_STATE">
6680 USB device filter is not created within this VirtualBox instance.
6681 </result>
6682 <result name="E_INVALIDARG">
6683 USB device filter already in list.
6684 </result>
6685
6686 </desc>
6687 <param name="position" type="unsigned long" dir="in">
6688 <desc>Position to insert the filter to.</desc>
6689 </param>
6690 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6691 <desc>USB device filter to insert.</desc>
6692 </param>
6693 </method>
6694
6695 <method name="removeUSBDeviceFilter">
6696 <desc>
6697 Removes a USB device filter from the specified position in the
6698 list of filters.
6699
6700 Positions are numbered starting from <tt>0</tt>. Specifying a
6701 position equal to or greater than the number of elements in
6702 the list will produce an error.
6703
6704 <note>
6705 This method may set a @ref com_warnings "warning result code".
6706 </note>
6707 <note>
6708 If USB functionality is not available in the given edition of
6709 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6710 </note>
6711
6712 <see>#USBDeviceFilters</see>
6713
6714 <result name="E_INVALIDARG">
6715 USB device filter list empty or invalid @a position.
6716 </result>
6717
6718 </desc>
6719 <param name="position" type="unsigned long" dir="in">
6720 <desc>Position to remove the filter from.</desc>
6721 </param>
6722 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6723 <desc>Removed USB device filter.</desc>
6724 </param>
6725 </method>
6726
6727 <method name="findHostNetworkInterfaceByName">
6728 <desc>
6729 Searches through all host network interfaces for an interface with
6730 the given name.
6731 <note>
6732 The method returns an error if the given name does not
6733 correspond to any host network interface.
6734 </note>
6735 </desc>
6736 <param name="name" type="wstring" dir="in">
6737 <desc>Name of the host network interface to search for.</desc>
6738 </param>
6739 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6740 <desc>Found host network interface object.</desc>
6741 </param>
6742 </method>
6743 <method name="findHostNetworkInterfaceById">
6744 <desc>
6745 Searches through all host network interfaces for an interface with
6746 the given GUID.
6747 <note>
6748 The method returns an error if the given GUID does not
6749 correspond to any host network interface.
6750 </note>
6751 </desc>
6752 <param name="id" type="uuid" dir="in">
6753 <desc>GUID of the host network interface to search for.</desc>
6754 </param>
6755 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6756 <desc>Found host network interface object.</desc>
6757 </param>
6758 </method>
6759 </interface>
6760
6761 <!--
6762 // ISystemProperties
6763 /////////////////////////////////////////////////////////////////////////
6764 -->
6765
6766 <interface
6767 name="ISystemProperties"
6768 extends="$unknown"
6769 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6770 wsmap="managed"
6771 >
6772 <desc>
6773 The ISystemProperties interface represents global properties of the given
6774 VirtualBox installation.
6775
6776 These properties define limits and default values for various attributes
6777 and parameters. Most of the properties are read-only, but some can be
6778 changed by a user.
6779 </desc>
6780
6781 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6782 <desc>Minimum guest system memory in Megabytes.</desc>
6783 </attribute>
6784
6785 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6786 <desc>Maximum guest system memory in Megabytes.</desc>
6787 </attribute>
6788
6789 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6790 <desc>Minimum guest video memory in Megabytes.</desc>
6791 </attribute>
6792
6793 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6794 <desc>Maximum guest video memory in Megabytes.</desc>
6795 </attribute>
6796
6797 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6798 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6799 </attribute>
6800
6801 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6802 <desc>
6803 Number of network adapters associated with every
6804 <link to="IMachine"/> instance.
6805 </desc>
6806 </attribute>
6807
6808 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6809 <desc>
6810 Number of serial ports associated with every
6811 <link to="IMachine"/> instance.
6812 </desc>
6813 </attribute>
6814
6815 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6816 <desc>
6817 Number of parallel ports associated with every
6818 <link to="IMachine"/> instance.
6819 </desc>
6820 </attribute>
6821
6822 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6823 <desc>
6824 Maximum device position in the boot order. This value corresponds
6825 to the total number of devices a machine can boot from, to make it
6826 possible to include all possible devices to the boot list.
6827 <see><link to="IMachine::setBootOrder()"/></see>
6828 </desc>
6829 </attribute>
6830
6831 <attribute name="defaultMachineFolder" type="wstring">
6832 <desc>
6833 Full path to the default directory used to create new or open
6834 existing machines when a settings file name contains no
6835 path.
6836
6837 The initial value of this property is
6838 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6839 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6840
6841 <note>
6842 Setting this property to <tt>null</tt> will restore the
6843 initial value.
6844 </note>
6845 <note>
6846 When settings this property, the specified path can be
6847 absolute (full path) or relative
6848 to the <link to="IVirtualBox::homeFolder">
6849 VirtualBox home directory</link>.
6850 When reading this property, a full path is
6851 always returned.
6852 </note>
6853 <note>
6854 The specified path may not exist, it will be created
6855 when necessary.
6856 </note>
6857
6858 <see>
6859 <link to="IVirtualBox::createMachine()"/>,
6860 <link to="IVirtualBox::openMachine()"/>
6861 </see>
6862 </desc>
6863 </attribute>
6864
6865 <attribute name="defaultHardDiskFolder" type="wstring">
6866 <desc>
6867 Full path to the default directory used to create new or open existing
6868 virtual disks.
6869
6870 This path is used when the storage unit of a hard disk is a regular file
6871 in the host's file system and only a file name that contains no path is
6872 given.
6873
6874 The initial value of this property is
6875 <tt>&lt;</tt>
6876 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6877 <tt>&gt;/HardDisks</tt>.
6878
6879 <note>
6880 Setting this property to <tt>null</tt> will restore the
6881 initial value.
6882 </note>
6883 <note>
6884 When settings this property, the specified path can be relative
6885 to the
6886 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6887 absolute. When reading this property, a full path is
6888 always returned.
6889 </note>
6890 <note>
6891 The specified path may not exist, it will be created
6892 when necessary.
6893 </note>
6894
6895 <see>
6896 IHardDisk2,
6897 <link to="IVirtualBox::createHardDisk2()"/>,
6898 <link to="IVirtualBox::openHardDisk2()"/>,
6899 <link to="IMedium::location"/>
6900 </see>
6901 </desc>
6902 </attribute>
6903
6904 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6905 <desc>
6906 List of all hard disk storage formats supported by this VirtualBox
6907 installation.
6908
6909 Keep in mind that the hard disk format identifier
6910 (<link to="IHardDiskFormat::id"/>) used in other API calls like
6911 <link to="IVirtualBox::createHardDisk2()"/> to refer to a particular
6912 hard disk format is a case-insensitive string. This means that, for
6913 example, all of the following strings:
6914 <pre>
6915 "VDI"
6916 "vdi"
6917 "VdI"</pre>
6918 refer to the same hard disk format.
6919
6920 Note that the virtual hard disk framework is backend-based, therefore
6921 the list of supported formats depends on what backends are currently
6922 installed.
6923
6924 <see>
6925 <link to="IHardDiskFormat"/>,
6926 </see>
6927 </desc>
6928 </attribute>
6929
6930 <attribute name="defaultHardDiskFormat" type="wstring">
6931 <desc>
6932 Identifier of the default hard disk format used by VirtualBox.
6933
6934 The hard disk format set by this attribute is used by VirtualBox
6935 when the hard disk format was not specified explicitly. One example is
6936 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6937 format argument. A more complex example is implicit creation of
6938 differencing hard disks when taking a snapshot of a virtual machine:
6939 this operation will try to use a format of the parent hard disk first
6940 and if this format does not support differencing hard disks the default
6941 format specified by this argument will be used.
6942
6943 The list of supported hard disk formats may be obtained by the
6944 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6945 format must have a capability to create differencing hard disks;
6946 otherwise opeartions that create hard disks implicitly may fail
6947 unexpectedly.
6948
6949 The initial value of this property is <tt>VDI</tt> in the current
6950 version of the VirtualBox product, but may change in the future.
6951
6952 <note>
6953 Setting this property to <tt>null</tt> will restore the
6954 initial value.
6955 </note>
6956
6957 <see>
6958 <link to="#hardDiskFormats"/>,
6959 <link to="IHardDiskFormat::id"/>,
6960 <link to="IVirtualBox::createHardDisk2()"/>
6961 </see>
6962 </desc>
6963 </attribute>
6964
6965 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6966 <desc>
6967 Library that provides authentication for VRDP clients. The library
6968 is used if a virtual machine's authentication type is set to "external"
6969 in the VM RemoteDisplay configuration.
6970
6971 The system library extension (".DLL" or ".so") must be omitted.
6972 A full path can be specified; if not, then the library must reside on the
6973 system's default library path.
6974
6975 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6976 of that name in one of the default VirtualBox library directories.
6977
6978 For details about VirtualBox authentication libraries and how to implement
6979 them, please refer to the VirtualBox manual.
6980
6981 <note>
6982 Setting this property to <tt>null</tt> will restore the
6983 initial value.
6984 </note>
6985 </desc>
6986 </attribute>
6987
6988 <attribute name="webServiceAuthLibrary" type="wstring">
6989 <desc>
6990 Library that provides authentication for webservice clients. The library
6991 is used if a virtual machine's authentication type is set to "external"
6992 in the VM RemoteDisplay configuration and will be called from
6993 within the <link to="IWebsessionManager::logon" /> implementation.
6994
6995 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6996 there is no per-VM setting for this, as the webservice is a global
6997 resource (if it is running). Only for this setting (for the webservice),
6998 setting this value to a literal "null" string disables authentication,
6999 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7000 no matter what user name and password are supplied.
7001
7002 The initial value of this property is <tt>VRDPAuth</tt>,
7003 meaning that the webservice will use the same authentication
7004 library that is used by default for VBoxVRDP (again, see
7005 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7006 The format and calling convention of authentication libraries
7007 is the same for the webservice as it is for VBoxVRDP.
7008
7009 </desc>
7010 </attribute>
7011
7012 <attribute name="HWVirtExEnabled" type="boolean">
7013 <desc>
7014 This specifies the default value for hardware virtualization
7015 extensions. If enabled, virtual machines will make use of
7016 hardware virtualization extensions such as Intel VT-x and
7017 AMD-V by default. This value can be overridden by each VM
7018 using their <link to="IMachine::HWVirtExEnabled" /> property.
7019 </desc>
7020 </attribute>
7021
7022 <attribute name="LogHistoryCount" type="unsigned long">
7023 <desc>
7024 This value specifies how many old release log files are kept.
7025 </desc>
7026 </attribute>
7027 </interface>
7028
7029 <!--
7030 // IGuest
7031 /////////////////////////////////////////////////////////////////////////
7032 -->
7033
7034 <interface
7035 name="IGuestOSType" extends="$unknown"
7036 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
7037 wsmap="struct"
7038 >
7039 <desc>
7040 </desc>
7041
7042 <attribute name="familyId" type="wstring" readonly="yes">
7043 <desc>Guest OS family identifier string.</desc>
7044 </attribute>
7045
7046 <attribute name="familyDescription" type="wstring" readonly="yes">
7047 <desc>Human readable description of the guest OS family.</desc>
7048 </attribute>
7049
7050 <attribute name="id" type="wstring" readonly="yes">
7051 <desc>Guest OS identifier string.</desc>
7052 </attribute>
7053
7054 <attribute name="description" type="wstring" readonly="yes">
7055 <desc>Human readable description of the guest OS.</desc>
7056 </attribute>
7057
7058 <attribute name="is64Bit" type="boolean" readonly="yes">
7059 <desc>Returns @c true if the given OS is 64-bit</desc>
7060 </attribute>
7061
7062 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7063 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7064 </attribute>
7065
7066 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7067 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7068 </attribute>
7069
7070 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7071 <desc>Recommended RAM size in Megabytes.</desc>
7072 </attribute>
7073
7074 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7075 <desc>Recommended video RAM size in Megabytes.</desc>
7076 </attribute>
7077
7078 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7079 <desc>Recommended hard disk size in Megabytes.</desc>
7080 </attribute>
7081
7082 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7083 <desc>Returns recommended network adapter for this OS type.</desc>
7084 </attribute>
7085 </interface>
7086
7087
7088 <enumerator
7089 name="IGuestOSTypeEnumerator" type="IGuestOSType"
7090 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
7091 />
7092
7093 <collection
7094 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
7095 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
7096 readonly="yes"
7097 />
7098
7099 <interface
7100 name="IGuest" extends="$unknown"
7101 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7102
7103 wsmap="suppress"
7104 >
7105 <desc>
7106 The IGuest interface represents information about the operating system
7107 running inside the virtual machine. Used in
7108 <link to="IConsole::guest"/>.
7109
7110 IGuest provides information about the guest operating system, whether
7111 Guest Additions are installed and other OS-specific virtual machine
7112 properties.
7113 </desc>
7114
7115 <attribute name="OSTypeId" type="wstring" readonly="yes">
7116 <desc>
7117 Identifier of the Guest OS type as reported by the Guest
7118 Additions.
7119 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7120 an IGuestOSType object representing details about the given
7121 Guest OS type.
7122 <note>
7123 If Guest Additions are not installed, this value will be
7124 the same as <link to="IMachine::OSTypeId"/>.
7125 </note>
7126 </desc>
7127 </attribute>
7128
7129 <attribute name="additionsActive" type="boolean" readonly="yes">
7130 <desc>
7131 Flag whether the Guest Additions are installed and active
7132 in which case their version will be returned by the
7133 <link to="#additionsVersion"/> property.
7134 </desc>
7135 </attribute>
7136
7137 <attribute name="additionsVersion" type="wstring" readonly="yes">
7138 <desc>
7139 Version of the Guest Additions (3 decimal numbers separated
7140 by dots) or empty when the Additions are not installed. The
7141 Additions may also report a version but yet not be active as
7142 the version might be refused by VirtualBox (incompatible) or
7143 other failures occurred.
7144 </desc>
7145 </attribute>
7146
7147 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7148 <desc>
7149 Flag whether seamless guest display rendering (seamless desktop
7150 integration) is supported.
7151 </desc>
7152 </attribute>
7153
7154 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7155 <desc>
7156 Flag whether the guest is in graphics mode. If it is not, then
7157 seamless rendering will not work, resize hints are not immediately
7158 acted on and guest display resizes are probably not initiated by
7159 the guest additions.
7160 </desc>
7161 </attribute>
7162
7163 <attribute name="memoryBalloonSize" type="unsigned long">
7164 <desc>Guest system memory balloon size in megabytes.</desc>
7165 </attribute>
7166
7167 <attribute name="statisticsUpdateInterval" type="unsigned long">
7168 <desc>Interval to update guest statistics in seconds.</desc>
7169 </attribute>
7170
7171 <method name="setCredentials">
7172 <desc>
7173 Store login credentials that can be queried by guest operating
7174 systems with Additions installed. The credentials are transient
7175 to the session and the guest may also choose to erase them. Note
7176 that the caller cannot determine whether the guest operating system
7177 has queried or made use of the credentials.
7178
7179 <result name="VBOX_E_VM_ERROR">
7180 VMM device is not available.
7181 </result>
7182
7183 </desc>
7184 <param name="userName" type="wstring" dir="in">
7185 <desc>User name string, can be empty</desc>
7186 </param>
7187 <param name="password" type="wstring" dir="in">
7188 <desc>Password string, can be empty</desc>
7189 </param>
7190 <param name="domain" type="wstring" dir="in">
7191 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7192 </param>
7193 <param name="allowInteractiveLogon" type="boolean" dir="in">
7194 <desc>
7195 Flag whether the guest should alternatively allow the user to
7196 interactively specify different credentials. This flag might
7197 not be supported by all versions of the Additions.
7198 </desc>
7199 </param>
7200 </method>
7201
7202 <method name="getStatistic">
7203 <desc>
7204 Query specified guest statistics as reported by the VirtualBox Additions.
7205 </desc>
7206 <param name="cpuId" type="unsigned long" dir="in">
7207 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7208 </param>
7209 <param name="statistic" type="GuestStatisticType" dir="in">
7210 <desc>Statistic type.</desc>
7211 </param>
7212 <param name="statVal" type="unsigned long" dir="out">
7213 <desc>Statistics value</desc>
7214 </param>
7215 </method>
7216
7217 </interface>
7218
7219
7220 <!--
7221 // IProgress
7222 /////////////////////////////////////////////////////////////////////////
7223 -->
7224
7225 <enumerator
7226 name="IProgressEnumerator" type="IProgress"
7227 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
7228 />
7229
7230 <collection
7231 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
7232 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
7233 readonly="yes"
7234 />
7235
7236 <interface
7237 name="IProgress" extends="$unknown"
7238 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
7239 wsmap="managed"
7240 >
7241 <desc>
7242 The IProgress interface represents a task progress object that allows
7243 to wait for the completion of some asynchronous task.
7244
7245 The task consists of one or more operations that run sequentially,
7246 one after one. There is an individual percent of completion of the
7247 current operation and the percent of completion of the task as a
7248 whole. Similarly, you can wait for the completion of a particular
7249 operation or for the completion of the whole task.
7250
7251 Every operation is identified by a number (starting from 0)
7252 and has a separate description.
7253 </desc>
7254
7255 <attribute name="id" type="uuid" readonly="yes">
7256 <desc>ID of the task.</desc>
7257 </attribute>
7258
7259 <attribute name="description" type="wstring" readonly="yes">
7260 <desc>Description of the task.</desc>
7261 </attribute>
7262
7263 <attribute name="initiator" type="$unknown" readonly="yes">
7264 <desc>Initiator of the task.</desc>
7265 </attribute>
7266
7267 <attribute name="cancelable" type="boolean" readonly="yes">
7268 <desc>Whether the task can be interrupted.</desc>
7269 </attribute>
7270
7271 <attribute name="percent" type="long" readonly="yes">
7272 <desc>
7273 Current task progress value in percent.
7274 This value depends on how many operations are already complete.
7275 </desc>
7276 </attribute>
7277
7278 <attribute name="completed" type="boolean" readonly="yes">
7279 <desc>Whether the task has been completed.</desc>
7280 </attribute>
7281
7282 <attribute name="canceled" type="boolean" readonly="yes">
7283 <desc>Whether the task has been canceled.</desc>
7284 </attribute>
7285
7286 <attribute name="resultCode" type="result" readonly="yes">
7287 <desc>
7288 Result code of the progress task.
7289 Valid only if <link to="#completed"/> is true.
7290 </desc>
7291 </attribute>
7292
7293 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7294 <desc>
7295 Extended information about the unsuccessful result of the
7296 progress operation. May be NULL when no extended information
7297 is available.
7298 Valid only if <link to="#completed"/> is true and
7299 <link to="#resultCode"/> indicates a failure.
7300 </desc>
7301 </attribute>
7302
7303 <attribute name="operationCount" type="unsigned long" readonly="yes">
7304 <desc>
7305 Number of operations this task is divided into.
7306 Every task consists of at least one operation.
7307 </desc>
7308 </attribute>
7309
7310 <attribute name="operation" type="unsigned long" readonly="yes">
7311 <desc>Number of the operation being currently executed.</desc>
7312 </attribute>
7313
7314 <attribute name="operationDescription" type="wstring" readonly="yes">
7315 <desc>
7316 Description of the operation being currently executed.
7317 </desc>
7318 </attribute>
7319
7320 <attribute name="operationPercent" type="long" readonly="yes">
7321 <desc>Current operation progress value in percent.</desc>
7322 </attribute>
7323
7324 <method name="waitForCompletion">
7325 <desc>
7326 Waits until the task is done (including all operations) with a
7327 given timeout.
7328
7329 <result name="VBOX_E_IPRT_ERROR">
7330 Failed to wait for task completion.
7331 </result>
7332
7333 </desc>
7334 <param name="timeout" type="long" dir="in">
7335 <desc>
7336 Timeout value in milliseconds.
7337 Specify -1 for an indefinite wait.
7338 </desc>
7339 </param>
7340 </method>
7341
7342 <method name="waitForOperationCompletion">
7343 <desc>
7344 Waits until the given operation is done with a given timeout.
7345
7346 <result name="VBOX_E_IPRT_ERROR">
7347 Failed to wait for operation completion.
7348 </result>
7349
7350 </desc>
7351 <param name="operation" type="unsigned long" dir="in">
7352 <desc>
7353 Number of the operation to wait for.
7354 Must be less than <link to="#operationCount"/>.
7355 </desc>
7356 </param>
7357 <param name="timeout" type="long" dir="in">
7358 <desc>
7359 Timeout value in milliseconds.
7360 Specify -1 for an indefinite wait.
7361 </desc>
7362 </param>
7363 </method>
7364
7365 <method name="cancel">
7366 <desc>
7367 Cancels the task.
7368 <note>
7369 If <link to="#cancelable"/> is <tt>false</tt>, then
7370 this method will fail.
7371 </note>
7372
7373 <result name="VBOX_E_INVALID_OBJECT_STATE">
7374 Operation cannot be canceled.
7375 </result>
7376
7377 </desc>
7378 </method>
7379
7380 </interface>
7381
7382
7383 <!--
7384 // ISnapshot
7385 /////////////////////////////////////////////////////////////////////////
7386 -->
7387
7388 <enumerator
7389 name="ISnapshotEnumerator" type="ISnapshot"
7390 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
7391 />
7392
7393 <collection
7394 name="ISnapshotCollection" type="ISnapshot"
7395 enumerator="ISnapshotEnumerator"
7396 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
7397 readonly="yes"
7398 />
7399
7400 <interface
7401 name="ISnapshot" extends="$unknown"
7402 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
7403 wsmap="managed"
7404 >
7405 <desc>
7406 The ISnapshot interface represents a snapshot of the virtual
7407 machine.
7408
7409 The <i>snapshot</i> stores all the information about a virtual
7410 machine necessary to bring it to exactly the same state as it was at
7411 the time of taking the snapshot. The snapshot includes:
7412
7413 <ul>
7414 <li>all settings of the virtual machine (i.e. its hardware
7415 configuration: RAM size, attached hard disks, etc.)
7416 </li>
7417 <li>the execution state of the virtual machine (memory contents,
7418 CPU state, etc.).
7419 </li>
7420 </ul>
7421
7422 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7423 or <i>online</i> (taken when the VM is running). The execution
7424 state of the offline snapshot is called a <i>zero execution state</i>
7425 (it doesn't actually contain any information about memory contents
7426 or the CPU state, assuming that all hardware is just powered off).
7427
7428 <h3>Snapshot branches</h3>
7429
7430 Snapshots can be chained. Chained snapshots form a branch where
7431 every next snapshot is based on the previous one. This chaining is
7432 mostly related to hard disk branching (see <link to="IHardDisk2"/>
7433 description). This means that every time a new snapshot is created,
7434 a new differencing hard disk is implicitly created for all normal
7435 hard disks attached to the given virtual machine. This allows to
7436 fully restore hard disk contents when the machine is later reverted
7437 to a particular snapshot.
7438
7439 In the current implementation, multiple snapshot branches within one
7440 virtual machine are not allowed. Every machine has a single branch,
7441 and <link to="IConsole::takeSnapshot()"/> operation adds a new
7442 snapshot to the top of that branch.
7443
7444 Existing snapshots can be discarded using
7445 <link to="IConsole::discardSnapshot()"/>.
7446
7447 <h3>Current snapshot</h3>
7448
7449 Every virtual machine has a current snapshot, identified by
7450 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7451 a base for the <i>current machine state</i> (see below), to the effect
7452 that all normal hard disks of the machine and its execution
7453 state are based on this snapshot.
7454
7455 In the current implementation, the current snapshot is always the
7456 last taken snapshot (i.e. the head snapshot on the branch) and it
7457 cannot be changed.
7458
7459 The current snapshot is <tt>null</tt> if the machine doesn't have
7460 snapshots at all; in this case the current machine state is just
7461 current settings of this machine plus its current execution state.
7462
7463 <h3>Current machine state</h3>
7464
7465 The current machine state is what represented by IMachine instances got
7466 directly from IVirtualBox
7467 using <link
7468 to="IVirtualBox::getMachine()">getMachine()</link>, <link
7469 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
7470 to instances returned by <link to="ISnapshot::machine"/>). This state
7471 is always used when the machine is <link to="IConsole::powerUp"> powered
7472 on</link>.
7473
7474 The current machine state also includes the current execution state.
7475 If the machine is being currently executed
7476 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7477 and above), its execution state is just what's happening now.
7478 If it is powered off (<link to="MachineState_PoweredOff"/> or
7479 <link to="MachineState_Aborted"/>), it has a zero execution state.
7480 If the machine is saved (<link to="MachineState_Saved"/>), its
7481 execution state is what saved in the execution state file
7482 (<link to="IMachine::stateFilePath"/>).
7483
7484 If the machine is in the saved state, then, next time it is powered
7485 on, its execution state will be fully restored from the saved state
7486 file and the execution will continue from the point where the state
7487 was saved.
7488
7489 Similarly to snapshots, the current machine state can be discarded
7490 using <link to="IConsole::discardCurrentState()"/>.
7491
7492 <h3>Taking and discarding snapshots</h3>
7493
7494 The table below briefly explains the meaning of every snapshot
7495 operation:
7496
7497 <table>
7498 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7499
7500 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7501
7502 <td>Save the current state of the virtual machine, including all
7503 settings, contents of normal hard disks and the current modifications
7504 to immutable hard disks (for online snapshots)</td>
7505
7506 <td>The current state is not changed (the machine will continue
7507 execution if it is being executed when the snapshot is
7508 taken)</td></tr>
7509
7510 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7511
7512 <td>Forget the state of the virtual machine stored in the snapshot:
7513 dismiss all saved settings and delete the saved execution state (for
7514 online snapshots)</td>
7515
7516 <td>Other snapshots (including child snapshots, if any) and the
7517 current state are not directly affected</td></tr>
7518
7519 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7520
7521 <td>Restore the current state of the virtual machine from the state
7522 stored in the current snapshot, including all settings and hard disk
7523 contents</td>
7524
7525 <td>The current state of the machine existed prior to this operation
7526 is lost</td></tr>
7527
7528 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7529
7530 <td>Completely revert the virtual machine to the state it was in
7531 before the current snapshot has been taken</td>
7532
7533 <td>The current state, as well as the current snapshot, are
7534 lost</td></tr>
7535
7536 </table>
7537
7538 </desc>
7539
7540 <attribute name="id" type="uuid" readonly="yes">
7541 <desc>UUID of the snapshot.</desc>
7542 </attribute>
7543
7544 <attribute name="name" type="wstring">
7545 <desc>Short name of the snapshot.</desc>
7546 </attribute>
7547
7548 <attribute name="description" type="wstring">
7549 <desc>Optional description of the snapshot.</desc>
7550 </attribute>
7551
7552 <attribute name="timeStamp" type="long long" readonly="yes">
7553 <desc>
7554 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7555 </desc>
7556 </attribute>
7557
7558 <attribute name="online" type="boolean" readonly="yes">
7559 <desc>
7560 <tt>true</tt> if this snapshot is an online snapshot and
7561 <tt>false</tt> otherwise.
7562
7563 <note>
7564 When this attribute is <tt>true</tt>, the
7565 <link to="IMachine::stateFilePath"/> attribute of the
7566 <link to="#machine"/> object associated with this snapshot
7567 will point to the saved state file. Otherwise, it will be
7568 <tt>null</tt>.
7569 </note>
7570 </desc>
7571 </attribute>
7572
7573 <attribute name="machine" type="IMachine" readonly="yes">
7574 <desc>
7575 Virtual machine this snapshot is taken on. This object
7576 stores all settings the machine had when taking this snapshot.
7577 <note>
7578 The returned machine object is immutable, i.e. no
7579 any settings can be changed.
7580 </note>
7581 </desc>
7582 </attribute>
7583
7584 <attribute name="parent" type="ISnapshot" readonly="yes">
7585 <desc>
7586 Parent snapshot (a snapshot this one is based on).
7587 <note>
7588 It's not an error to read this attribute on a snapshot
7589 that doesn't have a parent -- a null object will be
7590 returned to indicate this.
7591 </note>
7592 </desc>
7593 </attribute>
7594
7595 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7596 <desc>
7597 Child snapshots (all snapshots having this one as a parent).
7598 <note>
7599 In the current implementation, there can be only one
7600 child snapshot, or no children at all, meaning this is the
7601 last (head) snapshot.
7602 </note>
7603 </desc>
7604 </attribute>
7605
7606 </interface>
7607
7608
7609 <!--
7610 // IMedia
7611 /////////////////////////////////////////////////////////////////////////
7612 -->
7613
7614 <enum
7615 name="MediaState"
7616 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7617 >
7618 <desc>
7619 Virtual media state.
7620 <see>IMedia</see>
7621 </desc>
7622
7623 <const name="NotCreated" value="0">
7624 <desc>
7625 Associated media storage does not exist (either was not created yet or
7626 was deleted).
7627 </desc>
7628 </const>
7629 <const name="Created" value="1">
7630 <desc>
7631 Associated storage exists and accessible.
7632 </desc>
7633 </const>
7634 <const name="LockedRead" value="2">
7635 <desc>
7636 Media is locked for reading, no data modification is possible.
7637 </desc>
7638 </const>
7639 <const name="LockedWrite" value="3">
7640 <desc>
7641 Media is locked for writing, no concurrent data reading or modification
7642 is possible.
7643 </desc>
7644 </const>
7645 <const name="Inaccessible" value="4">
7646 <desc>
7647 Associated media storage is not accessible.
7648 </desc>
7649 </const>
7650 <const name="Creating" value="5">
7651 <desc>
7652 Associated media storage is being created.
7653 </desc>
7654 </const>
7655 <const name="Deleting" value="6">
7656 <desc>
7657 Associated media storage is being deleted.
7658 </desc>
7659 </const>
7660 </enum>
7661
7662 <interface
7663 name="IMedium" extends="$unknown"
7664 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7665 wsmap="managed"
7666 >
7667 <desc>
7668 The IMedium interface is a common interface for all objects representing
7669 virtual media such as hard disks, DVD images.
7670
7671 Each medium is associated with a storage unit (such as a file on the host
7672 computer or a network resource) that holds actual data. The location of
7673 the storage unit is represented by the #location attribute. The value of
7674 this attribute is media type dependent.
7675
7676 The exact media type may be determined by querying the appropriate
7677 interface such as:
7678 <ul>
7679 <li>IHardDisk2 (virtual hard disks)</li>
7680 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7681 <li>IFloppyImage2 (raw floppy image files)</li>
7682 </ul>
7683
7684 Existing media are opened using the following methods, depending on the
7685 media type:
7686 <ul>
7687 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7688 <li><link to="IVirtualBox::openDVDImage()"/></li>
7689 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7690 </ul>
7691
7692 New hard disk media are created using the
7693 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7694 images are created outside VirtualBox, usually by storing a copy
7695 of the real medium of the corresponding type in a regular file.
7696
7697 <h3>Known Media</h3>
7698
7699 When an existing medium gets opened for the first time, it gets
7700 automatically remembered by the given VirtualBox installation or, in other
7701 words, becomes a <i>known medium</i>. Known media are stored in the media
7702 registry transparently maintained by VirtualBox and stored in settings
7703 files so that this registry is preserved when VirtualBox is not running.
7704
7705 Newly created virtual hard disks get remembered only when the associated
7706 storage unit is actually created (see IHardDisk2 for more details).
7707
7708 All known media can be enumerated using
7709 <link to="IVirtualBox::hardDisks2"/>,
7710 <link to="IVirtualBox::DVDImages"/> and
7711 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7712 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7713 and similar methods or by location using
7714 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7715
7716 Only known media can be attached to virtual machines.
7717
7718 Removing known media from the media registry is performed when the given
7719 medium is closed using the <link to="#close()"/> method or when its
7720 associated storage unit is deleted (only for hard disks).
7721
7722 <h3>Accessibility Checks</h3>
7723
7724 The given medium (with the created storage unit) is considered to be
7725 <i>accessible</i> when its storage unit can be successfully read from.
7726 Accessible media are indicated by the <link to="MediaState_Created"/>
7727 value of the <link to="#state"/> attribute. When the storage unit cannot
7728 be read (for example, because it is located on a disconnected network
7729 resource, or was accidentally deleted outside VirtualBox), the medium is
7730 considered to be <i>inaccessible</i> which is indicated by the
7731 <link to="MediaState_Inaccessible"/> state. The details about the reason
7732 of being inaccessible can be obtained using the
7733 <link to="#lastAccessError"/> attribute.
7734
7735 A new accessibility check is performed each time the <link to="#state"/>
7736 attribute is read. Please note that this check may take long time (several
7737 seconds or even minutes, depending on the storage unit location and
7738 format), and will block the calling thread until finished. For this
7739 reason, it is recommended to never read this attribute on the main UI
7740 thread to avoid making the UI unresponsive.
7741
7742 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7743 created for the first time), all known media are in the
7744 <link to="MediaState_Inaccessible"/> state but the value of the <link
7745 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7746 accessibility check is made on startup. This is done to make the
7747 VirtualBox object ready for serving requests as
7748 fast as possible and let the end-user application decide if it needs to
7749 check media accessibility right away or not.
7750 </desc>
7751
7752 <attribute name="id" type="uuid" readonly="yes">
7753 <desc>
7754 UUID of the medium. For a newly created medium, this value is a randomly
7755 generated UUID.
7756
7757 <note>
7758 For media in one of MediaState_NotCreated, MediaState_Creating or
7759 MediaState_Deleting states, the value of this property is undefined
7760 and will most likely be an empty UUID.
7761 </note>
7762 </desc>
7763 </attribute>
7764
7765 <attribute name="description" type="wstring">
7766 <desc>
7767 Optional description of the medium. For newly created media, the value
7768 of this attribute value is <tt>null</tt>.
7769
7770 Media types that don't support this attribute will return E_NOTIMPL in
7771 attempt to get or set this attribute's value.
7772
7773 <note>
7774 For some storage types, reading this attribute may return an outdated
7775 (last known) value when <link to="#state"/> is <link
7776 to="MediaState_Inaccessible"/> or <link
7777 to="MediaState_LockedWrite"/> because the value of this attribute is
7778 stored within the storage unit itself. Also note that changing the
7779 attribute value is not possible in such case, as well as when the
7780 medium is the <link to="MediaState_LockedRead"/> state.
7781 </note>
7782 </desc>
7783 </attribute>
7784
7785 <attribute name="state" type="MediaState" readonly="yes">
7786 <desc>
7787 Current media state. Inspect <link to="MediaState"/> values for details.
7788
7789 Reading this attribute may take long time because a new accessibility
7790 check of the storage unit is performed every time the attribute is read.
7791 This check may cause a significant delay if the storage unit of the
7792 given medium is, for example, a file located on a network share which is
7793 not currently accessible due to connectivity problems -- the call will
7794 not return until a timeout interval defined by the host OS for this
7795 operation expires.
7796
7797 If the last known state of the medium is <link to="MediaState_Created"/>
7798 and the accessibility check fails then the state would be set to
7799 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7800 may be used to get more details about the failure. If the state of the
7801 medium is <link to="MediaState_LockedRead"/> or
7802 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7803 non-null value of <link to="#lastAccessError"/> will indicate a failed
7804 accessibility check in this case.
7805
7806 Note that not all media states are applicable to certain media types.
7807 For example, states <link to="MediaState_NotCreated"/>,
7808 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7809 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7810 IFloppyImage2 media.
7811 </desc>
7812 </attribute>
7813
7814 <attribute name="location" type="wstring">
7815 <desc>
7816 Location of the storage unit holding media data.
7817
7818 The format of the location string is media type specific. For media
7819 types that use regular files in a host's file system, the location
7820 string is just a full file name.
7821
7822 Some media types may support changing the storage unit location by
7823 simply changing the value of this property. If this operation is not
7824 supported, the implementation will return E_NOTIMPL in attempt to set
7825 this attribute's value.
7826
7827 When setting a value of the location attribute which is a regular file
7828 in the host's file system, the given file name may be either relative to
7829 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7830 absolute. Note that if the given location specification does not contain
7831 the file extension part then a proper default extension will be
7832 automatically appended by the implementation depending on the media type.
7833 </desc>
7834 </attribute>
7835
7836 <attribute name="name" type="wstring" readonly="yes">
7837 <desc>
7838 Name of the storage unit holding media data.
7839
7840 The returned string is a short version of the <link to="#location"/>
7841 attribute that is suitable for representing the medium in situations
7842 where the full location specification is too long (such as lists
7843 and comboboxes in GUI frontends). This string is also used by frontends
7844 to sort the media list alphabetically when needed.
7845
7846 For example, for locations that are regular files in the host's file
7847 system, the value of this attribute is just a file name (+ extension),
7848 without the path specification.
7849
7850 Note that as opposed to the <link to="#location"/> attribute, the name
7851 attribute will not necessary be unique for a list of media of the
7852 given type and format.
7853 </desc>
7854 </attribute>
7855
7856 <attribute name="size" type="unsigned long long" readonly="yes">
7857 <desc>
7858 Physical size of the storage unit used to hold media data (in bytes).
7859
7860 <note>
7861 For media whose <link to="#state"/> is <link
7862 to="MediaState_Inaccessible"/>, the value of this property is the
7863 last known size. For <link to="MediaState_NotCreated"/> media,
7864 the returned value is zero.
7865 </note>
7866 </desc>
7867 </attribute>
7868
7869 <attribute name="lastAccessError" type="wstring" readonly="yes">
7870 <desc>
7871 Text message that represents the result of the last accessibility
7872 check.
7873
7874 Accessibility checks are performed each time the <link to="#state"/>
7875 attribute is read. A @c null string is returned if the last
7876 accessibility check was successful. A non-null string indicates a
7877 failure and should normally describe a reason of the failure (for
7878 example, a file read error).
7879 </desc>
7880 </attribute>
7881
7882 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7883 <desc>
7884 Array of UUIDs of all machines this medium is attached to.
7885
7886 A <tt>null</tt> array is returned if this medium is not attached to any
7887 machine or to any machine's snapshot.
7888
7889 <note>
7890 The returned array will include a machine even if this medium is not
7891 attached to that machine in the current state but attached to it in
7892 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7893 details.
7894 </note>
7895 </desc>
7896 </attribute>
7897
7898 <method name="getSnapshotIds">
7899 <desc>
7900 Returns an array of UUIDs of all snapshots of the given machine where
7901 this medium is attached to it.
7902
7903 If the medium is attached to the machine in the current state, then the
7904 first element in the array will always be the ID of the queried machine
7905 (i.e. the value equal to the @c machineId argument), followed by
7906 snapshot IDs (if any).
7907
7908 If the medium is not attached to the machine in the current state, then
7909 the array will contain only snapshot IDs.
7910
7911 The returned array may be <tt>null</tt> if this medium is not attached
7912 to the given machine at all, neither in the current state nor in one of
7913 snapshots.
7914 </desc>
7915 <param name="machineId" type="uuid" dir="in">
7916 <desc>
7917 UUID of the machine to query.
7918 </desc>
7919 </param>
7920 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7921 <desc>
7922 Array of snapshot UUIDs of the given machine using this medium.
7923 </desc>
7924 </param>
7925 </method>
7926
7927 <method name="lockRead">
7928 <desc>
7929 Locks this medium for reading.
7930
7931 The read lock is shared: many clients can simultaneously lock the
7932 same media for reading unless it is already locked for writing (see
7933 <link to="#lockWrite()"/>) in which case an error is returned.
7934
7935 When the medium is locked for reading, it cannot be modified
7936 from within VirtualBox. This means that any method that changes
7937 the properties of this medium or contents of the storage unit
7938 will return an error (unless explicitly stated otherwise) and
7939 that an attempt to start a virtual machine that wants to modify
7940 the medium will also fail.
7941
7942 When the virtual machine is started up, it locks for reading all
7943 media it uses in read-only mode. If some media cannot be locked
7944 for reading, the startup procedure will fail.
7945
7946 The medium locked for reading must be unlocked using the <link
7947 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7948 can be nested and must be followed by the same number of paired
7949 <link to="#unlockRead()"/> calls.
7950
7951 This method sets the media state to <link
7952 to="MediaState_LockedRead"/> on success. The state prior to
7953 this call must be <link to="MediaState_Created"/>, <link
7954 to="MediaState_Inaccessible"/> or <link
7955 to="MediaState_LockedRead"/>. As you can see, inaccessible
7956 media can be locked too. This is not an error; this method
7957 performs a logical lock that prevents modifications of this
7958 media through the VirtualBox API, not a physical lock of the
7959 underlying storage unit.
7960
7961 This method returns the current state of the medium
7962 <b>before</b> the operation.
7963
7964 <result name="VBOX_E_INVALID_OBJECT_STATE">
7965 Invalid media state (e.g. not created, locked, inaccessible,
7966 creating, deleting).
7967 </result>
7968
7969 </desc>
7970 <param name="state" type="MediaState" dir="return">
7971 <desc>
7972 State of the medium after the operation.
7973 </desc>
7974 </param>
7975 </method>
7976
7977 <method name="unlockRead">
7978 <desc>
7979 Cancels the read lock previously set by <link to="#lockRead()"/>.
7980
7981 Either on success or on failure, this method returns the current state
7982 of the medium <b>after</b> the operation.
7983
7984 See <link to="#lockRead()"/> for more details.
7985
7986 <result name="VBOX_E_INVALID_OBJECT_STATE">
7987 Medium not locked for reading.
7988 </result>
7989
7990 </desc>
7991 <param name="state" type="MediaState" dir="return">
7992 <desc>
7993 State of the medium after the operation.
7994 </desc>
7995 </param>
7996 </method>
7997
7998 <method name="lockWrite">
7999 <desc>
8000 Locks this medium for writing.
8001
8002 The write lock, as opposed to <link to="#lockRead()"/>, is
8003 exclusive: there may be only one client that holds a write lock
8004 and there may be no read locks while the write lock is held.
8005
8006 When the medium is locked for writing, it cannot be modified
8007 from within VirtualBox and it is not guaranteed that the values
8008 of its properties are up-to-date. Any method that changes the
8009 properties of this medium or contents of the storage unit will
8010 return an error ((unless explicitly stated otherwise) and an
8011 attempt to start a virtual machine that wants to modify or to
8012 read the medium will also fail.
8013
8014 When the virtual machine is started up, it locks for writing all
8015 media it uses to write data to. If some media cannot be locked
8016 for writing, the startup procedure will fail.
8017
8018 The medium locked for writing must be unlocked using the <link
8019 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
8020 can <b>not</b> be nested and must be followed by a paired <link
8021 to="#unlockWrite()"/> call.
8022
8023 This method sets the media state to <link
8024 to="MediaState_LockedWrite"/> on success. The state prior to
8025 this call must be <link to="MediaState_Created"/> or <link
8026 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8027 media can be locked too. This is not an error; this method
8028 performs a logical lock that prevents modifications of this
8029 media through the VirtualBox API, not a physical lock of the
8030 underlying storage unit.
8031
8032 Either on success or on failure, this method returns the current
8033 state of the medium <b>before</b> the operation.
8034
8035 <result name="VBOX_E_INVALID_OBJECT_STATE">
8036 Invalid media state (e.g. not created, locked, inaccessible,
8037 creating, deleting).
8038 </result>
8039
8040 </desc>
8041 <param name="state" type="MediaState" dir="return">
8042 <desc>
8043 State of the medium after the operation.
8044 </desc>
8045 </param>
8046 </method>
8047
8048 <method name="unlockWrite">
8049 <desc>
8050 Cancels the write lock previously set by <link to="#lockWrite()"/>.
8051
8052 Either on success or on failure, this method returns the current
8053 state of the medium <b>after</b> the operation.
8054
8055 See <link to="#lockWrite()"/> for more details.
8056
8057 <result name="VBOX_E_INVALID_OBJECT_STATE">
8058 Medium not locked for writing.
8059 </result>
8060
8061 </desc>
8062 <param name="state" type="MediaState" dir="return">
8063 <desc>
8064 State of the medium after the operation.
8065 </desc>
8066 </param>
8067 </method>
8068
8069 <method name="close">
8070 <desc>
8071 Closes this medium.
8072
8073 The hard disk must not be attached to any known virtual machine
8074 and must not have any known child hard disks, otherwise the
8075 operation will fail.
8076
8077 When the hard disk is successfully closed, it gets removed from
8078 the list of remembered hard disks, but its storage unit is not
8079 deleted. In particular, this means that this hard disk can be
8080 later opened again using the <link
8081 to="IVirtualBox::openHardDisk2"/> call.
8082
8083 Note that after this method successfully returns, the given hard
8084 disk object becomes uninitialized. This means that any attempt
8085 to call any of its methods or attributes will fail with the
8086 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8087
8088 <result name="VBOX_E_INVALID_OBJECT_STATE">
8089 Invalid media state (other than not created, created or
8090 inaccessible).
8091 </result>
8092 <result name="VBOX_E_OBJECT_IN_USE">
8093 Medium attached to virtual machine.
8094 </result>
8095 <result name="VBOX_E_FILE_ERROR">
8096 Settings file not accessible.
8097 </result>
8098 <result name="VBOX_E_XML_ERROR">
8099 Could not parse the settings file.
8100 </result>
8101
8102 </desc>
8103 </method>
8104
8105 </interface>
8106
8107
8108 <!--
8109 // IHardDisk2
8110 /////////////////////////////////////////////////////////////////////////
8111 -->
8112
8113 <enum
8114 name="HardDiskType"
8115 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8116 >
8117 <desc>
8118 Virtual hard disk type.
8119 <see>IHardDisk</see>
8120 </desc>
8121
8122 <const name="Normal" value="0">
8123 <desc>
8124 Normal hard disk (attached directly or indirectly, preserved
8125 when taking snapshots).
8126 </desc>
8127 </const>
8128 <const name="Immutable" value="1">
8129 <desc>
8130 Immutable hard disk (attached indirectly, changes are wiped out
8131 after powering off the virtual machine).
8132 </desc>
8133 </const>
8134 <const name="Writethrough" value="2">
8135 <desc>
8136 Write through hard disk (attached directly, ignored when
8137 taking snapshots).
8138 </desc>
8139 </const>
8140 </enum>
8141
8142 <interface
8143 name="IHardDisk2Attachment" extends="$unknown"
8144 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
8145 wsmap="struct"
8146 >
8147 <desc>
8148 The IHardDisk2Attachment interface represents a hard disk attachment of a
8149 virtual machine.
8150
8151 Every hard disk attachment specifies a slot of the virtual hard disk
8152 controller and a virtual hard disk attached to this slot.
8153
8154 The array of hard disk attachments is returned by
8155 <link to="IMachine::hardDisk2Attachments"/>.
8156
8157 <note>
8158 With the COM API, this is an interface like all the others. With the
8159 webservice, this is mapped to a structure, so querying the attribute
8160 will not return an object, but a complete structure.
8161 </note>
8162 </desc>
8163 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
8164 <desc>Hard disk object associated with this attachment.</desc>
8165 </attribute>
8166
8167 <attribute name="bus" type="StorageBus" readonly="yes">
8168 <desc>Interface bus of this attachment.</desc>
8169 </attribute>
8170
8171 <attribute name="channel" type="long" readonly="yes">
8172 <desc>Channel number of this attachment.</desc>
8173 </attribute>
8174
8175 <attribute name="device" type="long" readonly="yes">
8176 <desc>Device slot number of this attachment.</desc>
8177 </attribute>
8178
8179 </interface>
8180
8181 <interface
8182 name="IHardDisk2" extends="IMedium"
8183 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
8184 wsmap="managed"
8185 >
8186 <desc>
8187 The IHardDisk2 interface represents a virtual hard disk drive
8188 used by a virtual machine.
8189
8190 Virtual hard disk objects virtualize the hard disk hardware and look like
8191 regular hard disks for the guest OS running inside the virtual machine.
8192
8193 <h3>Hard Disk Types</h3>
8194
8195 There are three types of hard disks:
8196 <link to="HardDiskType_Normal">Normal</link>,
8197 <link to="HardDiskType_Immutable">Immutable</link> and
8198 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8199 hard disk defines how the hard disk is attached to a virtual machine and
8200 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8201 machine with the attached hard disk is taken. The type of the hard disk is
8202 defined by the <link to="#type"/> attribute.
8203
8204 All hard disks can be also divided in two big groups: <i>base</i> hard
8205 disks and <i>differencing</i> hard disks. A base hard disk contains all
8206 sectors of the hard disk data in its storage unit and therefore can be
8207 used independently. On the contrary, a differencing hard disk contains
8208 only some part of the hard disk data (a subset of sectors) and needs
8209 another hard disk to get access to the missing sectors of data. This
8210 another hard disk is called a <i>parent</i> hard disk and defines a hard
8211 disk to which this differencing hard disk is known to be <i>linked to</i>.
8212 The parent hard disk may be itself a differencing hard disk. This
8213 way, differencing hard disks form a linked hard disk chain. This chain
8214 always ends with the base hard disk which is sometimes referred to as the
8215 root hard disk of this chain. Note that several differencing hard disks
8216 may be linked to the same parent hard disk. This way, all known hard disks
8217 form a hard disk tree which is based on their parent-child relationship.
8218
8219 Differencing hard disks can be distinguished from base hard disks by
8220 querying the <link to="#parent"/> attribute: base hard disks do not have
8221 parents they would depend on, so the value of this attribute is always
8222 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8223 the hard disk tree (from the child hard disk to its parent). It is also
8224 possible to walk down the tree using the <link to="#children"/>
8225 attribute.
8226
8227 Note that the type of all differencing hard disks is
8228 <link to="HardDiskType_Normal">Normal</link>; all other values are
8229 meaningless for them. Base hard disks may be of any type.
8230
8231 <h3>Creating Hard Disks</h3>
8232
8233 New base hard disks are created using
8234 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
8235 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
8236 disks are usually implicitly created by VirtualBox when needed but may
8237 also be created explicitly using <link to="#createDiffStorage()"/>.
8238
8239 After the hard disk is successfully created (including the storage unit)
8240 or opened, it becomes a known hard disk (remembered in the internal media
8241 registry). Known hard disks can be attached to a virtual machine, accessed
8242 through <link to="IVirtualBox::getHardDisk2()"/> and
8243 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
8244 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
8245
8246 The following methods, besides <link to="IMedium::close()"/>,
8247 automatically remove the hard disk from the media registry:
8248 <ul>
8249 <li><link to="#deleteStorage()"/></li>
8250 <li><link to="#mergeTo()"/></li>
8251 </ul>
8252
8253 If the storage unit of the hard disk is a regular file in the host's
8254 file system then the rules stated in the description of the
8255 <link to="IMedium::location"/> attribute apply when setting its value. In
8256 addition, a plain file name without any path may be given, in which case
8257 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8258 folder</link> will be prepended to it.
8259
8260 <h4>Automatic composition of the file name part</h4>
8261
8262 Another extension to the <link to="IMedium::location"/> attribute is that
8263 there is a possibility to cause VirtualBox to compose a unique value for
8264 the file name part of the location using the UUID of the hard disk. This
8265 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8266 e.g. before the storage unit is created, and works as follows. You set the
8267 value of the <link to="IMedium::location"/> attribute to a location
8268 specification which only contains the path specification but not the file
8269 name part and ends with either a forward slash or a backslash character.
8270 In response, VirtualBox will generate a new UUID for the hard disk and
8271 compose the file name using the following pattern:
8272 <pre>
8273 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8274 </pre>
8275 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8276 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8277 is the default extension for the storage format of this hard disk. After
8278 that, you may call any of the methods that create a new hard disk storage
8279 unit and they will use the generated UUID and file name.
8280
8281 <h3>Attaching Hard Disks</h3>
8282
8283 Hard disks are attached to virtual machines using the
8284 <link to="IMachine::attachHardDisk2()"/> method and detached using the
8285 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
8286 <link to="#type"/>, hard disks are attached either
8287 <i>directly</i> or <i>indirectly</i>.
8288
8289 When a hard disk is being attached directly, it is associated with the
8290 virtual machine and used for hard disk operations when the machine is
8291 running. When a hard disk is being attached indirectly, a new differencing
8292 hard disk linked to it is implicitly created and this differencing hard
8293 disk is associated with the machine and used for hard disk operations.
8294 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
8295 a direct attachment then the same hard disk will be returned in response
8296 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
8297 an indirect attachment is performed then
8298 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
8299 differencing hard disk, not the original one passed to <link
8300 to="IMachine::attachHardDisk2()"/>. The following table shows the
8301 dependency of the attachment type on the hard disk type:
8302
8303 <table>
8304 <tr>
8305 <th>Hard Disk Type</th>
8306 <th>Direct or Indirect?</th>
8307 </tr>
8308 <tr>
8309 <td>Normal (Base)</td>
8310 <td>
8311 Normal base hard disks that do not have children (i.e. differencing
8312 hard disks linked to them) and that are not already attached to
8313 virtual machines in snapshots are attached <b>directly</b>.
8314 Otherwise, they are attached <b>indirectly</b> because having
8315 dependent children or being part of the snapshot makes it impossible
8316 to modify hard disk contents without breaking the integrity of the
8317 dependent party. The <link to="#readOnly"/> attribute allows to
8318 quickly determine the kind of the attachment for the given hard
8319 disk. Note that if a normal base hard disk is to be indirectly
8320 attached to a virtual machine with snapshots then a special
8321 procedure called <i>smart attachment</i> is performed (see below).
8322 </td>
8323 </tr>
8324 <tr>
8325 <td>Normal (Differencing)</td>
8326 <td>
8327 Differencing hard disks are like normal base hard disks: attached
8328 <b>directly</b> if they do not have children and are not attached to
8329 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8330 that the smart attachment procedure is never performed for
8331 differencing hard disks.
8332 </td>
8333 </tr>
8334 <tr>
8335 <td>Immutable</td>
8336 <td>
8337 Immutable hard disks are always attached <b>indirectly</b> because
8338 they are designed to be non-writable. If an immutable hard disk is
8339 attached to a virtual machine with snapshots then a special
8340 procedure called smart attachment is performed (see below).
8341 </td>
8342 </tr>
8343 <tr>
8344 <td>Writethrough</td>
8345 <td>
8346 Writethrough hard disks are always attached <b>directly</b>, also as
8347 designed. This also means that writethrough hard disks cannot have
8348 other hard disks linked to them at all.
8349 </td>
8350 </tr>
8351 </table>
8352
8353 Note that the same hard disk, regardless of its type, may be attached to
8354 more than one virtual machine at a time. In this case, the machine that is
8355 started first gains exclusive access to the hard disk and attempts to
8356 start other machines having this hard disk attached will fail until the
8357 first machine is powered down.
8358
8359 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8360 that the given hard disk remains associated with the given machine after a
8361 successful <link to="IMachine::detachHardDisk2()"/> call until
8362 <link to="IMachine::saveSettings()"/> is called to save all changes to
8363 machine settings to disk. This deferring is necessary to guarantee that
8364 the hard disk configuration may be restored at any time by a call to
8365 <link to="IMachine::discardSettings()"/> before the settings
8366 are saved (committed).
8367
8368 Note that if <link to="IMachine::discardSettings()"/> is called after
8369 indirectly attaching some hard disks to the machine but before a call to
8370 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
8371 all differencing hard disks implicitly created by
8372 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
8373 Such implicitly created hard disks will also be immediately deleted when
8374 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
8375 call if it is made before <link to="IMachine::saveSettings()"/>. This
8376 implicit deletion is safe because newly created differencing hard
8377 disks do not contain any user data.
8378
8379 However, keep in mind that detaching differencing hard disks that were
8380 implicitly created by <link to="IMachine::attachHardDisk2()"/>
8381 before the last <link to="IMachine::saveSettings()"/> call will
8382 <b>not</b> implicitly delete them as they may already contain some data
8383 (for example, as a result of virtual machine execution). If these hard
8384 disks are no more necessary, the caller can always delete them explicitly
8385 using <link to="#deleteStorage()"/> after they are actually de-associated
8386 from this machine by the <link to="IMachine::saveSettings()"/> call.
8387
8388 <h3>Smart Attachment</h3>
8389
8390 When normal base or immutable hard disks are indirectly attached to a
8391 virtual machine then some additional steps are performed to make sure the
8392 virtual machine will have the most recent "view" of the hard disk being
8393 attached. These steps include walking through the machine's snapshots
8394 starting from the current one and going through ancestors up to the first
8395 snapshot. Hard disks attached to the virtual machine in all
8396 of the encountered snapshots are checked whether they are descendants of
8397 the given normal base or immutable hard disk. The first found child (which
8398 is the differencing hard disk) will be used instead of the normal base or
8399 immutable hard disk as a parent for creating a new differencing hard disk
8400 that will be actually attached to the machine. And only if no descendants
8401 are found or if the virtual machine does not have any snapshots then the
8402 normal base or immutable hard disk will be used itself as a parent for
8403 this differencing hard disk.
8404
8405 It is easier to explain what smart attachment does using the
8406 following example:
8407 <pre>
8408BEFORE attaching B.vdi: AFTER attaching B.vdi:
8409
8410Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8411 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8412 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8413 Snapshot 4 (none) Snapshot 4 (none)
8414 CurState (none) CurState (D3->D2.vdi)
8415
8416 NOT
8417 ...
8418 CurState (D3->B.vdi)
8419 </pre>
8420 The first column is the virtual machine configuration before the base hard
8421 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8422 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8423 mean that the hard disk that is actually attached to the machine is a
8424 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8425 another hard disk, <tt>B.vdi</tt>.
8426
8427 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8428 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8429 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8430 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8431 it cannot be attached directly and needs an indirect attachment (i.e.
8432 implicit creation of a new differencing hard disk). Due to the smart
8433 attachment procedure, the new differencing hard disk
8434 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8435 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8436 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8437 machine.
8438
8439 Note that if there is more than one descendant hard disk of the given base
8440 hard disk found in a snapshot, and there is an exact device, channel and
8441 bus match, then this exact match will be used. Otherwise, the youngest
8442 descendant will be picked up.
8443
8444 There is one more important aspect of the smart attachment procedure which
8445 is not related to snapshots at all. Before walking through the snapshots
8446 as described above, the backup copy of the current list of hard disk
8447 attachment is searched for descendants. This backup copy is created when
8448 the hard disk configuration is changed for the first time after the last
8449 <link to="IMachine::saveSettings()"/> call and used by
8450 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
8451 changes. When such a descendant is found in this backup copy, it will be
8452 simply re-attached back, without creating a new differencing hard disk for
8453 it. This optimization is necessary to make it possible to re-attach the
8454 base or immutable hard disk to a different bus, channel or device slot
8455 without losing the contents of the differencing hard disk actually
8456 attached to the machine in place of it.
8457 </desc>
8458
8459 <attribute name="format" type="wstring" readonly="yes">
8460 <desc>
8461 Storage format of this hard disk.
8462
8463 The value of this attribute is a string that specifies a backend used to
8464 store hard disk data. The storage format is defined when you create a
8465 new hard disk or automatically detected when you open an existing hard
8466 disk medium, and cannot be changed later.
8467
8468 The list of all storage formats supported by this VirtualBox
8469 installation can be obtained using
8470 <link to="ISystemProperties::hardDiskFormats"/>.
8471 </desc>
8472 </attribute>
8473
8474 <attribute name="type" type="HardDiskType">
8475 <desc>
8476 Type (role) of this hard disk.
8477
8478 The following constraints apply when changing the value of this
8479 attribute:
8480 <ul>
8481 <li>If a hard disk is attached to a virtual machine (either in the
8482 current state or in one of the snapshots), its type cannot be
8483 changed.
8484 </li>
8485 <li>As long as the hard disk has children, its type cannot be set
8486 to <link to="HardDiskType_Writethrough"/>.
8487 </li>
8488 <li>The type of all differencing hard disks is
8489 <link to="HardDiskType_Normal"/> and cannot be changed.
8490 </li>
8491 </ul>
8492
8493 The type of a newly created or opened hard disk is set to
8494 <link to="HardDiskType_Normal"/>.
8495 </desc>
8496 </attribute>
8497
8498 <attribute name="parent" type="IHardDisk2" readonly="yes">
8499 <desc>
8500 Parent of this hard disk (a hard disk this hard disk is directly based
8501 on).
8502
8503 Only differencing hard disks have parents. For base (non-differencing)
8504 hard disks, <tt>null</tt> is returned.
8505 </desc>
8506 </attribute>
8507
8508 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8509 <desc>
8510 Children of this hard disk (all differencing hard disks directly based
8511 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8512 does not have any children.
8513 </desc>
8514 </attribute>
8515
8516 <attribute name="root" type="IHardDisk2" readonly="yes">
8517 <desc>
8518 Root hard disk of this hard disk.
8519
8520 If this is a differencing hard disk, its root hard disk is the base hard
8521 disk the given hard disk branch starts from. For all other types of hard
8522 disks, this property returns the hard disk object itself (i.e. the same
8523 object this property is read on).
8524 </desc>
8525 </attribute>
8526
8527 <attribute name="readOnly" type="boolean" readonly="yes">
8528 <desc>
8529 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8530 otherwise.
8531
8532 A hard disk is considered to be read-only when its contents cannot be
8533 modified without breaking the integrity of other parties that depend on
8534 this hard disk such as its child hard disks or snapshots of virtual
8535 machines where this hard disk is attached to these machines. If there
8536 are no children and no such snapshots then there is no dependency and
8537 the hard disk is not read-only.
8538
8539 The value of this attribute can be used to determine the kind of the
8540 attachment that will take place when attaching this hard disk to a
8541 virtual machine. If the value is <tt>false</tt> then the hard disk will
8542 be attached directly. If the value is <tt>true</tt> then the hard disk
8543 will be attached indirectly by creating a new differencing child hard
8544 disk for that. See the interface description for more information.
8545
8546 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8547 disks are always read-only while all
8548 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8549 always not.
8550
8551 <note>
8552 The read-only condition represented by this attribute is related to
8553 the hard disk type and usage, not to the current
8554 <link to="IMedium::state">media state</link> and not to the read-only
8555 state of the storage unit.
8556 </note>
8557 </desc>
8558 </attribute>
8559
8560 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8561 <desc>
8562 Logical size of this hard disk (in megabytes), as reported to the
8563 guest OS running inside the virtual machine this disk is
8564 attached to. The logical size is defined when the hard disk is created
8565 and cannot be changed later.
8566
8567 <note>
8568 Reading this property on a differencing hard disk will return the size
8569 of its <link to="#root"/> hard disk.
8570 </note>
8571 <note>
8572 For hard disks whose state is <link to="#state"/> is <link
8573 to="MediaState_Inaccessible"/>, the value of this property is the
8574 last known logical size. For <link to="MediaState_NotCreated"/> hard
8575 disks, the returned value is zero.
8576 </note>
8577 </desc>
8578 </attribute>
8579
8580 <!-- storage methods -->
8581
8582 <method name="getProperty">
8583 <desc>
8584 Returns the value of the custom hard disk property with the given name.
8585
8586 The list of all properties supported by the given hard disk format can
8587 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8588
8589 Note that if this method returns a <tt>null</tt> @a value, the requested
8590 property is supported but currently not assigned any value.
8591
8592 <result name="VBOX_E_OBJECT_NOT_FOUND">
8593 Requested property does not exist (not supported by the format).
8594 </result>
8595 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8596 </desc>
8597 <param name="name" type="wstring" dir="in">
8598 <desc>Name of the property to get.</desc>
8599 </param>
8600 <param name="value" type="wstring" dir="return">
8601 <desc>Current property value.</desc>
8602 </param>
8603 </method>
8604
8605 <method name="setProperty">
8606 <desc>
8607 Sets the value of the custom hard disk property with the given name.
8608
8609 The list of all properties supported by the given hard disk format can
8610 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8611
8612 Note that setting the property value to <tt>null</tt> is equivalent to
8613 deleting the existing value. A default value (if it is defined for this
8614 property) will be used by the format backend in this case.
8615
8616 <result name="VBOX_E_OBJECT_NOT_FOUND">
8617 Requested property does not exist (not supported by the format).
8618 </result>
8619 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8620 </desc>
8621 <param name="name" type="wstring" dir="in">
8622 <desc>Name of the property to set.</desc>
8623 </param>
8624 <param name="value" type="wstring" dir="in">
8625 <desc>Property value to set.</desc>
8626 </param>
8627 </method>
8628
8629 <method name="getProperties">
8630 <desc>
8631 Returns values for a group of properties in one call.
8632
8633 The names of the properties to get are specified using the @a names
8634 argument which is a list of comma-separated property names or
8635 <tt>null</tt> if all properties are to be returned. Note that currently
8636 the value of this argument is ignored and the method always returns all
8637 existing properties.
8638
8639 The list of all properties supported by the given hard disk format can
8640 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8641
8642 The method returns two arrays, the array of property names corresponding
8643 to the @a names argument and the current values of these properties.
8644 Both arrays have the same number of elements with each elemend at the
8645 given index in the first array corresponds to an element at the same
8646 index in the second array.
8647
8648 Note that for properties that do not have assigned values,
8649 <tt>null</tt> is returned at the appropriate index in the @a
8650 returnValues array.
8651
8652 </desc>
8653 <param name="names" type="wstring" dir="in">
8654 <desc>
8655 Names of properties to get.
8656 </desc>
8657 </param>
8658 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8659 <desc>Names of returned properties.</desc>
8660 </param>
8661 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8662 <desc>Values of returned properties.</desc>
8663 </param>
8664 </method>
8665
8666 <method name="setProperties">
8667 <desc>
8668 Sets values for a group of properties in one call.
8669
8670 The names of the properties to set are passed in the @a names
8671 array along with the new values for them in the @a values array. Both
8672 arrays have the same number of elements with each elemend at the given
8673 index in the first array corresponding to an element at the same index
8674 in the second array.
8675
8676 If there is at least one property name in @a names that is not valid,
8677 the method will fail before changing the values of any other properties
8678 from the @a names array.
8679
8680 Using this method over <link to="#setProperty()"/> is preferred if you
8681 need to set several properties at once since it will result into less
8682 IPC calls.
8683
8684 The list of all properties supported by the given hard disk format can
8685 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8686
8687 Note that setting the property value to <tt>null</tt> is equivalent to
8688 deleting the existing value. A default value (if it is defined for this
8689 property) will be used by the format backend in this case.
8690 </desc>
8691 <param name="names" type="wstring" safearray="yes" dir="in">
8692 <desc>Names of properties to set.</desc>
8693 </param>
8694 <param name="values" type="wstring" safearray="yes" dir="in">
8695 <desc>Values of properties to set.</desc>
8696 </param>
8697 </method>
8698
8699 <!-- storage methods -->
8700
8701 <method name="createDynamicStorage">
8702 <desc>
8703 Starts creating a dynamically expanding hard disk storage unit in the
8704 background. The previous storage unit created for this object, if
8705 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8706 the operation will fail.
8707
8708 Before the operation starts, the hard disk is placed in
8709 <link to="MediaState_Creating"/> state. If the create operation
8710 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8711 state.
8712
8713 After the returned progress object reports that the operation has
8714 successfully completed, the media state will be set to <link
8715 to="MediaState_Created"/>, the hard disk will be remembered by this
8716 VirtualBox installation and may be attached to virtual machines.
8717
8718 <result name="VBOX_E_NOT_SUPPORTED">
8719 Dynamic storage creation operation is not supported. See <link
8720 to="IHardDiskFormat::capabilities"/>.
8721 </result>
8722 </desc>
8723 <param name="logicalSize" type="unsigned long long" dir="in">
8724 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8725 </param>
8726 <param name="progress" type="IProgress" dir="return">
8727 <desc>Progress object to track the operation completion.</desc>
8728 </param>
8729 </method>
8730
8731 <method name="createFixedStorage">
8732 <desc>
8733 Starts creating a fixed-size hard disk storage unit in the background.
8734 The previous storage unit created for this object, if
8735 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8736 the operation will fail.
8737
8738 Before the operation starts, the hard disk is placed to
8739 <link to="MediaState_Creating"/> state. If the create operation
8740 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8741 state.
8742
8743 After the returned progress object reports that the operation is
8744 successfully complete, the media state will be set to <link
8745 to="MediaState_Created"/>, the hard disk will be remembered by this
8746 VirtualBox installation and may be attached to virtual machines.
8747
8748 <result name="VBOX_E_NOT_SUPPORTED">
8749 Fixed storage creation operation is not supported. See
8750 <link to="IHardDiskFormat::capabilities"/>.
8751 </result>
8752 </desc>
8753 <param name="logicalSize" type="unsigned long long" dir="in">
8754 <desc>Logical size of the hard disk in megabytes.</desc>
8755 </param>
8756 <param name="progress" type="IProgress" dir="return">
8757 <desc>Progress object to track the operation completion.</desc>
8758 </param>
8759 </method>
8760
8761 <method name="deleteStorage">
8762 <desc>
8763 Starts deleting the storage unit of this hard disk.
8764
8765 The hard disk must not be attached to any known virtual machine and must
8766 not have any known child hard disks, otherwise the operation will fail.
8767 It will also fail if there is no storage unit to delete or if deletion
8768 is already in progress, or if the hard disk is being in use (locked for
8769 read or for write) or inaccessible. Therefore, the only valid state for
8770 this operation to succeed is <link to="MediaState_Created"/>.
8771
8772 Before the operation starts, the hard disk is placed to
8773 <link to="MediaState_Deleting"/> state and gets removed from the list
8774 of remembered hard disks (media registry). If the delete operation
8775 fails, the media will be remembered again and placed back to
8776 <link to="MediaState_Created"/> state.
8777
8778 After the returned progress object reports that the operation is
8779 complete, the media state will be set to
8780 <link to="MediaState_NotCreated"/> and you will be able to use one of
8781 the storage creation methods to create it again.
8782
8783 <see>#close()</see>
8784
8785 <result name="VBOX_E_OBJECT_IN_USE">
8786 Hard disk is attached to a virtual machine.
8787 </result>
8788 <result name="VBOX_E_NOT_SUPPORTED">
8789 Storage deletion is not allowed because neither of storage creation
8790 operations are supported. See
8791 <link to="IHardDiskFormat::capabilities"/>.
8792 </result>
8793
8794 <note>
8795 If the deletion operation fails, it is not guaranteed that the storage
8796 unit still exists. You may check the <link to="IMedium::state"/> value
8797 to answer this question.
8798 </note>
8799 </desc>
8800 <param name="progress" type="IProgress" dir="return">
8801 <desc>Progress object to track the operation completion.</desc>
8802 </param>
8803 </method>
8804
8805 <!-- diff methods -->
8806
8807 <method name="createDiffStorage">
8808 <desc>
8809 Starts creating an empty differencing storage unit based on this hard
8810 disk in the format and at the location defined by the @a target
8811 argument.
8812
8813 The target hard disk must be in <link to="MediaState_NotCreated"/>
8814 state (i.e. must not have an existing storage unit). Upon successful
8815 completion, this operation will set the type of the target hard disk to
8816 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8817 represent the differencing hard disk data in the given format (according
8818 to the storage format of the target object).
8819
8820 After the returned progress object reports that the operation is
8821 successfully complete, the target hard disk gets remembered by this
8822 VirtualBox installation and may be attached to virtual machines.
8823
8824 <note>
8825 The hard disk will be set to <link to="MediaState_LockedRead"/>
8826 state for the duration of this operation.
8827 </note>
8828 <result name="VBOX_E_OBJECT_IN_USE">
8829 Hard disk not in NotCreated state.
8830 </result>
8831 </desc>
8832 <param name="target" type="IHardDisk2" dir="in">
8833 <desc>Target hard disk.</desc>
8834 </param>
8835 <param name="progress" type="IProgress" dir="return">
8836 <desc>Progress object to track the operation completion.</desc>
8837 </param>
8838 </method>
8839
8840 <method name="mergeTo">
8841 <desc>
8842 Starts merging the contents of this hard disk and all intermediate
8843 differencing hard disks in the chain to the given target hard disk.
8844
8845 The target hard disk must be either a descendant of this hard disk or
8846 its ancestor (otherwise this method will immediately return a failure).
8847 It follows that there are two logical directions of the merge operation:
8848 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8849 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8850 chain:
8851
8852 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8853
8854 Here, calling this method on the <tt>Base</tt> hard disk object with
8855 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8856 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8857 merge. Note that in both cases the contents of the resulting hard disk
8858 will be the same, the only difference is the hard disk object that takes
8859 the result of the merge operation. In case of the forward merge in the
8860 above example, the result will be written to <tt>Diff_2</tt>; in case of
8861 the backward merge, the result will be written to <tt>Base</tt>. In
8862 other words, the result of the operation is always stored in the target
8863 hard disk.
8864
8865 Upon successful operation completion, the storage units of all hard
8866 disks in the chain between this (source) hard disk and the target hard
8867 disk, including the source hard disk itself, will be automatically
8868 deleted and the relevant hard disk objects (including this hard disk)
8869 will become uninitialized. This means that any attempt to call any of
8870 their methods or attributes will fail with the
8871 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8872 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8873 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8874 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8875 disk itself since it will no longer be based on any other hard disk.
8876
8877 Considering the above, all of the following conditions must be met in
8878 order for the merge operation to succeed:
8879 <ul>
8880 <li>
8881 Neither this (source) hard disk nor any intermediate
8882 differencing hard disk in the chain between it and the target
8883 hard disk is attached to any virtual machine.
8884 </li>
8885 <li>
8886 Neither the source hard disk nor the target hard disk is an
8887 <link to="HardDiskType_Immutable"/> hard disk.
8888 </li>
8889 <li>
8890 The part of the hard disk tree from the source hard disk to the
8891 target hard disk is a linear chain, i.e. all hard disks in this
8892 chain have exactly one child which is the next hard disk in this
8893 chain. The only exception from this rule is the target hard disk in
8894 the forward merge operation; it is allowed to have any number of
8895 child hard disks because the merge operation will hot change its
8896 logical contents (as it is seen by the guest OS or by children).
8897 </li>
8898 <li>
8899 None of the involved hard disks are in
8900 <link to="MediaState_LockedRead"/> or
8901 <link to="MediaState_LockedWrite"/> state.
8902 </li>
8903 </ul>
8904
8905 <note>
8906 This (source) hard disk and all intermediates will be placed to <link
8907 to="MediaState_Deleting"/> state and the target hard disk will be
8908 placed to <link to="MediaState_LockedWrite"/> state and for the
8909 duration of this operation.
8910 </note>
8911 </desc>
8912 <param name="targetId" type="uuid" dir="in">
8913 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8914 </param>
8915 <param name="progress" type="IProgress" dir="return">
8916 <desc>Progress object to track the operation completion.</desc>
8917 </param>
8918 </method>
8919
8920 <!-- clone methods -->
8921
8922 <method name="cloneTo">
8923 <desc>
8924 Starts creating a clone of this hard disk in the format and at the
8925 location defined by the @a target argument.
8926
8927 The target hard disk must be in <link to="MediaState_NotCreated"/>
8928 state (i.e. must not have an existing storage unit). Upon successful
8929 completion, the cloned hard disk will contain exactly the same sector
8930 data as the hard disk being cloned, except that a new UUID for the clone
8931 will be randomly generated.
8932
8933 After the returned progress object reports that the operation is
8934 successfully complete, the target hard disk gets remembered by this
8935 VirtualBox installation and may be attached to virtual machines.
8936
8937 <note>
8938 If the cloned hard disk is a differencing hard disk, it will inherit
8939 parent dependency of the original hard disk.
8940 </note>
8941 <note>
8942 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8943 state for the duration of this operation.
8944 </note>
8945 </desc>
8946 <param name="target" type="IHardDisk2" dir="in">
8947 <desc>Target hard disk.</desc>
8948 </param>
8949 <param name="progress" type="IProgress" dir="return">
8950 <desc>Progress object to track the operation completion.</desc>
8951 </param>
8952 </method>
8953
8954 <method name="flattenTo">
8955 <desc>
8956 Starts creating a deep (independent) clone of this hard disk in the
8957 format and at the location defined by the @a target argument.
8958
8959 This operation is similar to <link to="#cloneTo()"/> except that when
8960 applied to a differencing hard disk, it will also copy missing hard disk
8961 data from all parent hard disks it is linked to. This will make the
8962 created clone an independent base hard disk that contains all hard disk
8963 data and does not need any other hard disks to operate.
8964
8965 After the returned progress object reports that the operation is
8966 successfully complete, the target hard disk gets remembered by this
8967 VirtualBox installation and may be attached to virtual machines.
8968
8969 <note>
8970 For base hard disks, this operation is identical to
8971 <link to="#cloneTo()"/>.
8972 </note>
8973 <note>
8974 This hard disk and all its parent hard disks will be placed to <link
8975 to="MediaState_LockedRead"/> state for the duration of this
8976 operation.
8977 </note>
8978 </desc>
8979 <param name="target" type="IHardDisk2" dir="in">
8980 <desc>Target hard disk.</desc>
8981 </param>
8982 <param name="progress" type="IProgress" dir="return">
8983 <desc>Progress object to track the operation completion.</desc>
8984 </param>
8985 </method>
8986
8987 <method name="compact">
8988 <desc>
8989 Starts compacting of this hard disk. This means that the disk is
8990 transformed into a possibly more compact storage representation.
8991 This potentially creates temporary images, which can require a
8992 substantial amount of additional disk space.
8993
8994 After the returned progress object reports that the operation is
8995 successfully complete, the media state will be set back to the
8996 current state.
8997
8998 <note>
8999 This hard disk and all its parent hard disks will be placed to <link
9000 to="MediaState_LockedRead"/> state for the duration of this
9001 operation.
9002 </note>
9003 </desc>
9004 <param name="progress" type="IProgress" dir="return">
9005 <desc>Progress object to track the operation completion.</desc>
9006 </param>
9007 </method>
9008
9009 </interface>
9010
9011
9012 <!--
9013 // IHardDiskFormat
9014 /////////////////////////////////////////////////////////////////////////
9015 -->
9016
9017 <enum
9018 name="DataType"
9019 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9020 >
9021 <const name="Int32" value="0"/>
9022 <const name="Int8" value="1"/>
9023 <const name="String" value="2"/>
9024 </enum>
9025
9026 <enum
9027 name="DataFlags"
9028 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9029 >
9030 <const name="None" value="0x00"/>
9031 <const name="Mandatory" value="0x01"/>
9032 <const name="Expert" value="0x02"/>
9033 <const name="Array" value="0x04"/>
9034 <const name="FlagMask" value="0x07"/>
9035 </enum>
9036
9037 <enum
9038 name="HardDiskFormatCapabilities"
9039 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9040 >
9041 <desc>
9042 Hard disk format capability flags.
9043 </desc>
9044
9045 <const name="Uuid" value="0x01">
9046 <desc>
9047 Supports UUIDs as expected by VirtualBox code.
9048 </desc>
9049 </const>
9050
9051 <const name="CreateFixed" value="0x02">
9052 <desc>
9053 Supports creating fixed size images, allocating all space instantly.
9054 </desc>
9055 </const>
9056
9057 <const name="CreateDynamic" value="0x04">
9058 <desc>
9059 Supports creating dynamically growing images, allocating space on
9060 demand.
9061 </desc>
9062 </const>
9063
9064 <const name="CreateSplit2G" value="0x08">
9065 <desc>
9066 Supports creating images split in chunks of a bit less than 2 GBytes.
9067 </desc>
9068 </const>
9069
9070 <const name="Differencing" value="0x10">
9071 <desc>
9072 Supports being used as a format for differencing hard disks (see <link
9073 to="IHardDisk2::createDiffStorage"/>).
9074 </desc>
9075 </const>
9076
9077 <const name="Asynchronous" value="0x20">
9078 <desc>
9079 Supports asynchronous I/O operations for at least some configurations.
9080 </desc>
9081 </const>
9082
9083 <const name="File" value="0x40">
9084 <desc>
9085 The format backend operates on files (the <link to="IMedium::location"/>
9086 attribute of the hard disk specifies a file used to store hard disk
9087 data; for a list of supported file extensions see
9088 <link to="IHardDiskFormat::fileExtensions"/>).
9089 </desc>
9090 </const>
9091
9092 <const name="Properties" value="0x80">
9093 <desc>
9094 The format backend uses the property interface to configure the storage
9095 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9096 method is used to get access to properties supported by the given hard
9097 disk format).
9098 </desc>
9099 </const>
9100
9101 <const name="CapabilityMask" value="0xFF"/>
9102 </enum>
9103
9104 <interface
9105 name="IHardDiskFormat" extends="$unknown"
9106 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9107 wsmap="managed"
9108 >
9109 <desc>
9110 The IHardDiskFormat interface represents a virtual hard disk format.
9111
9112 Each hard disk format has an associated backend which is used to handle
9113 hard disks stored in this format. This interface provides information
9114 about the properties of the associated backend.
9115
9116 Each hard disk format is identified by a string represented by the
9117 <link to="#id"/> attribute. This string is used in calls like
9118 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
9119 format.
9120
9121 The list of all supported hard disk formats can be obtained using
9122 <link to="ISystemProperties::hardDiskFormats"/>.
9123
9124 <see>IHardDisk2</see>
9125 </desc>
9126
9127 <attribute name="id" type="wstring" readonly="yes">
9128 <desc>
9129 Identifier of this format.
9130
9131 The format identifier is a non-null non-empty ASCII string. Note that
9132 this string is case-insensitive. This means that, for example, all of
9133 the following strings:
9134 <pre>
9135 "VDI"
9136 "vdi"
9137 "VdI"</pre>
9138 refer to the same hard disk format.
9139
9140 This string is used in methods of other interfaces where it is necessary
9141 to specify a hard disk format, such as
9142 <link to="IVirtualBox::createHardDisk2()"/>.
9143 </desc>
9144 </attribute>
9145
9146 <attribute name="name" type="wstring" readonly="yes">
9147 <desc>
9148 Human readable description of this format.
9149
9150 Mainly for use in file open dialogs.
9151 </desc>
9152 </attribute>
9153
9154 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9155 <desc>
9156 Array of strings containing the supported file extensions.
9157
9158 The first extension in the array is the extension preferred by the
9159 backend. It is recommended to use this extension when specifying a
9160 location of the storage unit for a new hard disk.
9161
9162 Note that some backends do not work on files, so this array may be
9163 empty.
9164
9165 <see>IHardDiskFormat::capabilities</see>
9166 </desc>
9167 </attribute>
9168
9169 <attribute name="capabilities" type="unsigned long" readonly="yes">
9170 <desc>
9171 Capabilities of the format as a set of bit flags.
9172
9173 For the meaning of individual capability flags see
9174 <link to="HardDiskFormatCapabilities"/>.
9175 </desc>
9176 </attribute>
9177
9178 <method name="describeProperties">
9179 <desc>
9180 Returns several arrays describing the properties supported by this
9181 format.
9182
9183 An element with the given index in each array describes one
9184 property. Thus, the number of elements in each returned array is the
9185 same and corresponds to the number of supported properties.
9186
9187 The returned arrays are filled in only if the
9188 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9189 All arguments must be non-NULL.
9190
9191 <see>DataType</see>
9192 <see>DataFlags</see>
9193 </desc>
9194
9195 <param name="names" type="wstring" safearray="yes" dir="out">
9196 <desc>Array of property names.</desc>
9197 </param>
9198 <param name="description" type="wstring" safearray="yes" dir="out">
9199 <desc>Array of property descriptions.</desc>
9200 </param>
9201 <param name="types" type="DataType" safearray="yes" dir="out">
9202 <desc>Array of property types.</desc>
9203 </param>
9204 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9205 <desc>Array of property flags.</desc>
9206 </param>
9207 <param name="defaults" type="wstring" safearray="yes" dir="out">
9208 <desc>Array of default property values.</desc>
9209 </param>
9210 </method>
9211
9212 </interface>
9213
9214
9215 <!--
9216 // IFloppyImage2
9217 /////////////////////////////////////////////////////////////////////////
9218 -->
9219
9220 <interface
9221 name="IFloppyImage2" extends="IMedium"
9222 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
9223 wsmap="managed"
9224 >
9225 <desc>
9226 The IFloppyImage2 interface represents a medium containing the image
9227 of a floppy disk.
9228 </desc>
9229
9230 </interface>
9231
9232
9233 <!--
9234 // IDVDImage2
9235 /////////////////////////////////////////////////////////////////////////
9236 -->
9237
9238 <interface
9239 name="IDVDImage2" extends="IMedium"
9240 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
9241 wsmap="managed"
9242 >
9243 <desc>
9244 The IDVDImage2 interface represents a medium containing the image
9245 of a CD or DVD disk in the ISO format.
9246 </desc>
9247
9248 </interface>
9249
9250
9251 <!--
9252 // IDVDDrive
9253 /////////////////////////////////////////////////////////////////////////
9254 -->
9255
9256 <interface
9257 name="IDVDDrive" extends="$unknown"
9258 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9259 wsmap="managed"
9260 >
9261 <desc>
9262 The IDVDDrive interface represents the virtual CD/DVD drive of the
9263 virtual machine. An object of this type is returned by
9264 <link to="IMachine::DVDDrive"/>.
9265 </desc>
9266
9267 <attribute name="state" type="DriveState" readonly="yes">
9268 <desc>Current drive state.</desc>
9269 </attribute>
9270
9271 <attribute name="passthrough" type="boolean">
9272 <desc>
9273 When a host drive is mounted and passthrough is enabled
9274 the guest OS will be able to directly send SCSI commands to
9275 the host drive. This enables the guest OS to use CD/DVD writers
9276 but is potentially dangerous.
9277 </desc>
9278 </attribute>
9279
9280 <method name="mountImage">
9281 <desc>Mounts a CD/DVD image with the specified UUID.
9282
9283 <result name="VBOX_E_FILE_ERROR">
9284 Invalid image file location.
9285 </result>
9286 <result name="VBOX_E_OBJECT_NOT_FOUND">
9287 Could not find a CD/DVD image matching @a imageID.
9288 </result>
9289 <result name="VBOX_E_INVALID_OBJECT_STATE">
9290 Invalid media state.
9291 </result>
9292
9293 </desc>
9294 <param name="imageId" type="uuid" dir="in"/>
9295 </method>
9296
9297 <method name="captureHostDrive">
9298 <desc>Captures the specified host CD/DVD drive.</desc>
9299 <param name="drive" type="IHostDVDDrive" dir="in"/>
9300 </method>
9301
9302 <method name="unmount">
9303 <desc>Unmounts the currently mounted image or host drive.</desc>
9304 </method>
9305
9306 <method name="getImage">
9307 <desc>Returns the currently mounted CD/DVD image.</desc>
9308 <param name="image" type="IDVDImage2" dir="return"/>
9309 </method>
9310
9311 <method name="getHostDrive">
9312 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9313 <param name="drive" type="IHostDVDDrive" dir="return"/>
9314 </method>
9315
9316 </interface>
9317
9318
9319 <!--
9320 // IFloppyDrive
9321 /////////////////////////////////////////////////////////////////////////
9322 -->
9323
9324 <interface
9325 name="IFloppyDrive" extends="$unknown"
9326 uuid="159412cd-bab8-452e-8097-218a020825a6"
9327 wsmap="managed"
9328 >
9329 <desc>
9330 The IFloppyDrive interface represents the virtual floppy drive of the
9331 virtual machine. An object of this type is returned by
9332 <link to="IMachine::floppyDrive" />.
9333 </desc>
9334
9335 <attribute name="enabled" type="boolean">
9336 <desc>
9337 Flag whether the floppy drive is enabled. If it is disabled,
9338 the floppy drive will not be reported to the guest OS.
9339 </desc>
9340 </attribute>
9341
9342 <attribute name="state" type="DriveState" readonly="yes">
9343 <desc>Current drive state.</desc>
9344 </attribute>
9345
9346 <method name="mountImage">
9347 <desc>Mounts a floppy image with the specified UUID.
9348
9349 <result name="VBOX_E_FILE_ERROR">
9350 Invalid image file location.
9351 </result>
9352 <result name="VBOX_E_OBJECT_NOT_FOUND">
9353 Could not find a floppy image matching @a imageID.
9354 </result>
9355 <result name="VBOX_E_INVALID_OBJECT_STATE">
9356 Invalid media state.
9357 </result>
9358
9359 </desc>
9360 <param name="imageId" type="uuid" dir="in"/>
9361 </method>
9362
9363 <method name="captureHostDrive">
9364 <desc>Captures the specified host floppy drive.</desc>
9365 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9366 </method>
9367
9368 <method name="unmount">
9369 <desc>Unmounts the currently mounted image or host drive.</desc>
9370 </method>
9371
9372 <method name="getImage">
9373 <desc>Returns the currently mounted floppy image.</desc>
9374 <param name="image" type="IFloppyImage2" dir="return"/>
9375 </method>
9376
9377 <method name="getHostDrive">
9378 <desc>Returns the currently mounted host floppy drive.</desc>
9379 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9380 </method>
9381
9382 </interface>
9383
9384
9385 <!--
9386 // IKeyboard
9387 /////////////////////////////////////////////////////////////////////////
9388 -->
9389
9390 <interface
9391 name="IKeyboard" extends="$unknown"
9392 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9393 wsmap="managed"
9394 >
9395 <desc>
9396 The IKeyboard interface represents the virtual machine's keyboard. Used
9397 in <link to="IConsole::keyboard"/>.
9398
9399 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9400 to the virtual machine.
9401
9402 </desc>
9403 <method name="putScancode">
9404 <desc>Sends a scancode to the keyboard.
9405
9406 <result name="VBOX_E_IPRT_ERROR">
9407 Could not send scan code to virtual keyboard.
9408 </result>
9409
9410 </desc>
9411 <param name="scancode" type="long" dir="in"/>
9412 </method>
9413
9414 <method name="putScancodes">
9415 <desc>Sends an array of scancodes to the keyboard.
9416
9417 <result name="VBOX_E_IPRT_ERROR">
9418 Could not send all scan codes to virtual keyboard.
9419 </result>
9420
9421 </desc>
9422 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9423 <param name="codesStored" type="unsigned long" dir="return"/>
9424 </method>
9425
9426 <method name="putCAD">
9427 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9428 function is nothing special, it is just a convenience function
9429 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9430
9431 <result name="VBOX_E_IPRT_ERROR">
9432 Could not send all scan codes to virtual keyboard.
9433 </result>
9434
9435 </desc>
9436 </method>
9437
9438 </interface>
9439
9440
9441 <!--
9442 // IMouse
9443 /////////////////////////////////////////////////////////////////////////
9444 -->
9445
9446 <enum
9447 name="MouseButtonState"
9448 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9449 >
9450 <desc>
9451 Mouse button state.
9452 </desc>
9453
9454 <const name="LeftButton" value="0x01"/>
9455 <const name="RightButton" value="0x02"/>
9456 <const name="MiddleButton" value="0x04"/>
9457 <const name="WheelUp" value="0x08"/>
9458 <const name="WheelDown" value="0x10"/>
9459 <const name="MouseStateMask" value="0x1F"/>
9460 </enum>
9461
9462 <interface
9463 name="IMouse" extends="$unknown"
9464 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9465 wsmap="managed"
9466 >
9467 <desc>
9468 The IMouse interface represents the virtual machine's mouse. Used in
9469 <link to="IConsole::mouse"/>.
9470
9471 Through this interface, the virtual machine's virtual mouse can be
9472 controlled.
9473 </desc>
9474
9475 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9476 <desc>
9477 Whether the guest OS supports absolute mouse pointer positioning
9478 or not.
9479 <note>
9480 VirtualBox Guest Tools need to be installed to the guest OS
9481 in order to enable absolute mouse positioning support.
9482 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9483 callback to be instantly informed about changes of this attribute
9484 during virtual machine execution.
9485 </note>
9486 <see><link to="#putMouseEventAbsolute"/></see>
9487 </desc>
9488 </attribute>
9489
9490 <method name="putMouseEvent">
9491 <desc>
9492 Initiates a mouse event using relative pointer movements
9493 along x and y axis.
9494
9495 <result name="E_ACCESSDENIED">
9496 Console not powered up.
9497 </result>
9498 <result name="VBOX_E_IPRT_ERROR">
9499 Could not send mouse event to virtual mouse.
9500 </result>
9501
9502 </desc>
9503
9504 <param name="dx" type="long" dir="in">
9505 <desc>
9506 Amount of pixels the mouse should move to the right.
9507 Negative values move the mouse to the left.
9508 </desc>
9509 </param>
9510 <param name="dy" type="long" dir="in">
9511 <desc>
9512 Amount of pixels the mouse should move downwards.
9513 Negative values move the mouse upwards.
9514 </desc>
9515 </param>
9516 <param name="dz" type="long" dir="in">
9517 <desc>
9518 Amount of mouse wheel moves.
9519 Positive values describe clockwise wheel rotations,
9520 negative values describe counterclockwise rotations.
9521 </desc>
9522 </param>
9523 <param name="buttonState" type="long" dir="in">
9524 <desc>
9525 The current state of mouse buttons. Every bit represents
9526 a mouse button as follows:
9527 <table>
9528 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9529 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9530 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9531 </table>
9532 A value of <tt>1</tt> means the corresponding button is pressed.
9533 otherwise it is released.
9534 </desc>
9535 </param>
9536 </method>
9537
9538 <method name="putMouseEventAbsolute">
9539 <desc>
9540 Positions the mouse pointer using absolute x and y coordinates.
9541 These coordinates are expressed in pixels and
9542 start from <tt>[1,1]</tt> which corresponds to the top left
9543 corner of the virtual display.
9544
9545 <result name="E_ACCESSDENIED">
9546 Console not powered up.
9547 </result>
9548 <result name="VBOX_E_IPRT_ERROR">
9549 Could not send mouse event to virtual mouse.
9550 </result>
9551
9552 <note>
9553 This method will have effect only if absolute mouse
9554 positioning is supported by the guest OS.
9555 </note>
9556
9557 <see><link to="#absoluteSupported"/></see>
9558 </desc>
9559
9560 <param name="x" type="long" dir="in">
9561 <desc>
9562 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9563 </desc>
9564 </param>
9565 <param name="y" type="long" dir="in">
9566 <desc>
9567 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9568 </desc>
9569 </param>
9570 <param name="dz" type="long" dir="in">
9571 <desc>
9572 Amount of mouse wheel moves.
9573 Positive values describe clockwise wheel rotations,
9574 negative values describe counterclockwise rotations.
9575 </desc>
9576 </param>
9577 <param name="buttonState" type="long" dir="in">
9578 <desc>
9579 The current state of mouse buttons. Every bit represents
9580 a mouse button as follows:
9581 <table>
9582 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9583 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9584 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9585 </table>
9586 A value of <tt>1</tt> means the corresponding button is pressed.
9587 otherwise it is released.
9588 </desc>
9589 </param>
9590 </method>
9591
9592 </interface>
9593
9594 <!--
9595 // IDisplay
9596 /////////////////////////////////////////////////////////////////////////
9597 -->
9598
9599 <enum
9600 name="FramebufferAccelerationOperation"
9601 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9602 >
9603 <desc>
9604 Frame buffer acceleration operation.
9605 </desc>
9606
9607 <const name="SolidFillAcceleration" value="1"/>
9608 <const name="ScreenCopyAcceleration" value="2"/>
9609 </enum>
9610
9611 <enum
9612 name="FramebufferPixelFormat"
9613 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
9614 >
9615 <desc>
9616 Format of the video memory buffer. Constants represented by this enum can
9617 be used to test for particular values of <link
9618 to="IFramebuffer::pixelFormat"/>. See also <link
9619 to="IFramebuffer::requestResize()"/>.
9620
9621 See also www.fourcc.org for more information about FOURCC pixel formats.
9622 </desc>
9623
9624 <const name="Opaque" value="0">
9625 <desc>
9626 Unknown buffer format (the user may not assume any particular format of
9627 the buffer).
9628 </desc>
9629 </const>
9630 <const name="FOURCC_RGB" value="0x32424752">
9631 <desc>
9632 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9633 bit layout).
9634 </desc>
9635 </const>
9636 </enum>
9637
9638 <interface
9639 name="IFramebuffer" extends="$unknown"
9640 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9641 wsmap="suppress"
9642 >
9643 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9644 <desc>Address of the start byte of the frame buffer.</desc>
9645 </attribute>
9646
9647 <attribute name="width" type="unsigned long" readonly="yes">
9648 <desc>Frame buffer width, in pixels.</desc>
9649 </attribute>
9650
9651 <attribute name="height" type="unsigned long" readonly="yes">
9652 <desc>Frame buffer height, in pixels.</desc>
9653 </attribute>
9654
9655 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9656 <desc>
9657 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9658 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9659 are: 8, 15, 16, 24 and 32.
9660 </desc>
9661 </attribute>
9662
9663 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9664 <desc>
9665 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9666 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9667 size of the scan line must be aligned to 32 bits.
9668 </desc>
9669 </attribute>
9670
9671 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9672 <desc>
9673 Frame buffer pixel format. It's either one of the values defined by <link
9674 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9675 <note>
9676 This attribute must never return <link
9677 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9678 <link to="#address"/> points to must be always known.
9679 </note>
9680 </desc>
9681 </attribute>
9682
9683 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9684 <desc>
9685 Defines whether this frame buffer uses the virtual video card's memory
9686 buffer (guest VRAM) directly or not. See <link
9687 to="IFramebuffer::requestResize()"/> for more information.
9688 </desc>
9689 </attribute>
9690
9691 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9692 <desc>
9693 Hint from the frame buffer about how much of the standard
9694 screen height it wants to use for itself. This information is
9695 exposed to the guest through the VESA BIOS and VMMDev interface
9696 so that it can use it for determining its video mode table. It
9697 is not guaranteed that the guest respects the value.
9698 </desc>
9699 </attribute>
9700
9701 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9702 <desc>
9703 An alpha-blended overlay which is superposed over the frame buffer.
9704 The initial purpose is to allow the display of icons providing
9705 information about the VM state, including disk activity, in front
9706 ends which do not have other means of doing that. The overlay is
9707 designed to controlled exclusively by IDisplay. It has no locking
9708 of its own, and any changes made to it are not guaranteed to be
9709 visible until the affected portion of IFramebuffer is updated. The
9710 overlay can be created lazily the first time it is requested. This
9711 attribute can also return NULL to signal that the overlay is not
9712 implemented.
9713 </desc>
9714 </attribute>
9715
9716 <attribute name="winId" type="unsigned long long" readonly="yes">
9717 <desc>
9718 Platform-dependent identifier of the window where context of this
9719 frame buffer is drawn, or zero if there's no such window.
9720 </desc>
9721 </attribute>
9722
9723 <method name="lock">
9724 <desc>
9725 Locks the frame buffer.
9726 Gets called by the IDisplay object where this frame buffer is
9727 bound to.
9728 </desc>
9729 </method>
9730
9731 <method name="unlock">
9732 <desc>
9733 Unlocks the frame buffer.
9734 Gets called by the IDisplay object where this frame buffer is
9735 bound to.
9736 </desc>
9737 </method>
9738
9739 <method name="notifyUpdate">
9740 <desc>
9741 Informs about an update.
9742 Gets called by the display object where this buffer is
9743 registered.
9744 </desc>
9745 <param name="x" type="unsigned long" dir="in"/>
9746 <param name="y" type="unsigned long" dir="in"/>
9747 <param name="width" type="unsigned long" dir="in"/>
9748 <param name="height" type="unsigned long" dir="in"/>
9749 <param name="finished" type="boolean" dir="return"/>
9750 </method>
9751
9752 <method name="requestResize">
9753 <desc>
9754 Requests a size and pixel format change.
9755
9756 There are two modes of working with the video buffer of the virtual
9757 machine. The <i>indirect</i> mode implies that the IFramebuffer
9758 implementation allocates a memory buffer for the requested display mode
9759 and provides it to the virtual machine. In <i>direct</i> mode, the
9760 IFramebuffer implementation uses the memory buffer allocated and owned
9761 by the virtual machine. This buffer represents the video memory of the
9762 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9763 usually faster because the implementation gets a raw pointer to the
9764 guest VRAM buffer which it can directly use for visualizing the contents
9765 of the virtual display, as opposed to the indirect mode where the
9766 contents of guest VRAM are copied to the memory buffer provided by
9767 the implementation every time a display update occurs.
9768
9769 It is important to note that the direct mode is really fast only when
9770 the implementation uses the given guest VRAM buffer directly, for
9771 example, by blitting it to the window representing the virtual machine's
9772 display, which saves at least one copy operation comparing to the
9773 indirect mode. However, using the guest VRAM buffer directly is not
9774 always possible: the format and the color depth of this buffer may be
9775 not supported by the target window, or it may be unknown (opaque) as in
9776 case of text or non-linear multi-plane VGA video modes. In this case,
9777 the indirect mode (that is always available) should be used as a
9778 fallback: when the guest VRAM contents are copied to the
9779 implementation-provided memory buffer, color and format conversion is
9780 done automatically by the underlying code.
9781
9782 The @a pixelFormat parameter defines whether the direct mode is
9783 available or not. If @a pixelFormat is <link
9784 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9785 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9786 bytesPerLine parameters must be ignored and the implementation must use
9787 the indirect mode (where it provides its own buffer in one of the
9788 supported formats). In all other cases, @a pixelFormat together with @a
9789 bitsPerPixel and @a bytesPerLine define the format of the video memory
9790 buffer pointed to by the @a VRAM parameter and the implementation is
9791 free to choose which mode to use. To indicate that this frame buffer uses
9792 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9793 attribute must return <tt>true</tt> and <link to="#address"/> must
9794 return exactly the same address that is passed in the @a VRAM parameter
9795 of this method; otherwise it is assumed that the indirect strategy is
9796 chosen.
9797
9798 The @a width and @a height parameters represent the size of the
9799 requested display mode in both modes. In case of indirect mode, the
9800 provided memory buffer should be big enough to store data of the given
9801 display mode. In case of direct mode, it is guaranteed that the given @a
9802 VRAM buffer contains enough space to represent the display mode of the
9803 given size. Note that this frame buffer's <link to="#width"/> and <link
9804 to="#height"/> attributes must return exactly the same values as
9805 passed to this method after the resize is completed (see below).
9806
9807 The @a finished output parameter determines if the implementation has
9808 finished resizing the frame buffer or not. If, for some reason, the
9809 resize cannot be finished immediately during this call, @a finished
9810 must be set to @c false, and the implementation must call
9811 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9812 this method as soon as possible. If @a finished is @c false, the
9813 machine will not call any frame buffer methods until
9814 <link to="IDisplay::resizeCompleted()"/> is called.
9815
9816 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9817 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9818 this frame buffer must return exactly the same values as specified in the
9819 parameters of this method, after the resize is completed. If the
9820 indirect mode is chosen, these attributes must return values describing
9821 the format of the implementation's own memory buffer <link
9822 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9823 value must always correlate with <link to="#pixelFormat"/>. Note that
9824 the <link to="#pixelFormat"/> attribute must never return <link
9825 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9826
9827 <note>
9828 This method is called by the IDisplay object under the
9829 <link to="#lock()"/> provided by this IFramebuffer
9830 implementation. If this method returns @c false in @a finished, then
9831 this lock is not released until
9832 <link to="IDisplay::resizeCompleted()"/> is called.
9833 </note>
9834 </desc>
9835 <param name="screenId" type="unsigned long" dir="in">
9836 <desc>
9837 Logical screen number. Must be used in the corresponding call to
9838 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9839 </desc>
9840 </param>
9841 <param name="pixelFormat" type="unsigned long" dir="in">
9842 <desc>
9843 Pixel format of the memory buffer pointed to by @a VRAM.
9844 See also <link to="FramebufferPixelFormat"/>.
9845 </desc>
9846 </param>
9847 <param name="VRAM" type="octet" mod="ptr" dir="in">
9848 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9849 </param>
9850 <param name="bitsPerPixel" type="unsigned long" dir="in">
9851 <desc>Color depth, bits per pixel.</desc>
9852 </param>
9853 <param name="bytesPerLine" type="unsigned long" dir="in">
9854 <desc>Size of one scan line, in bytes.</desc>
9855 </param>
9856 <param name="width" type="unsigned long" dir="in">
9857 <desc>Width of the guest display, in pixels.</desc>
9858 </param>
9859 <param name="height" type="unsigned long" dir="in">
9860 <desc>Height of the guest display, in pixels.</desc>
9861 </param>
9862 <param name="finished" type="boolean" dir="return">
9863 <desc>
9864 Can the VM start using the new frame buffer immediately
9865 after this method returns or it should wait for
9866 <link to="IDisplay::resizeCompleted()"/>.
9867 </desc>
9868 </param>
9869 </method>
9870
9871 <method name="operationSupported">
9872 <desc>
9873 Returns whether the given acceleration operation is supported
9874 by the IFramebuffer implementation. If not, the display object
9875 will not attempt to call the corresponding IFramebuffer entry
9876 point. Even if an operation is indicated as supported, the
9877 IFramebuffer implementation always has the option to return non
9878 supported from the corresponding acceleration method in which
9879 case the operation will be performed by the display engine. This
9880 allows for reduced IFramebuffer implementation complexity where
9881 only common cases are handled.
9882 </desc>
9883 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9884 <param name="supported" type="boolean" dir="return"/>
9885 </method>
9886
9887 <method name="videoModeSupported">
9888 <desc>
9889 Returns whether the frame buffer implementation is willing to
9890 support a given video mode. In case it is not able to render
9891 the video mode (or for some reason not willing), it should
9892 return false. Usually this method is called when the guest
9893 asks the VMM device whether a given video mode is supported
9894 so the information returned is directly exposed to the guest.
9895 It is important that this method returns very quickly.
9896 </desc>
9897 <param name="width" type="unsigned long" dir="in"/>
9898 <param name="height" type="unsigned long" dir="in"/>
9899 <param name="bpp" type="unsigned long" dir="in"/>
9900 <param name="supported" type="boolean" dir="return"/>
9901 </method>
9902
9903 <method name="solidFill">
9904 <desc>
9905 Fills the specified rectangle on screen with a solid color.
9906 </desc>
9907 <param name="x" type="unsigned long" dir="in"/>
9908 <param name="y" type="unsigned long" dir="in"/>
9909 <param name="width" type="unsigned long" dir="in"/>
9910 <param name="height" type="unsigned long" dir="in"/>
9911 <param name="color" type="unsigned long" dir="in"/>
9912 <param name="handled" type="boolean" dir="return"/>
9913 </method>
9914
9915 <method name="copyScreenBits">
9916 <desc>
9917 Copies specified rectangle on the screen.
9918 </desc>
9919 <param name="xDst" type="unsigned long" dir="in"/>
9920 <param name="yDst" type="unsigned long" dir="in"/>
9921 <param name="xSrc" type="unsigned long" dir="in"/>
9922 <param name="ySrc" type="unsigned long" dir="in"/>
9923 <param name="width" type="unsigned long" dir="in"/>
9924 <param name="height" type="unsigned long" dir="in"/>
9925 <param name="handled" type="boolean" dir="return"/>
9926 </method>
9927
9928 <method name="getVisibleRegion">
9929 <desc>
9930 Returns the visible region of this frame buffer.
9931
9932 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9933 @a count parameter is ignored and the number of elements necessary to
9934 describe the current visible region is returned in @a countCopied.
9935
9936 If @a rectangles is not <tt>NULL</tt> but @a count is less
9937 than the required number of elements to store region data, the method
9938 will report a failure. If @a count is equal or greater than the
9939 required number of elements, then the actual number of elements copied
9940 to the provided array will be returned in @a countCopied.
9941
9942 <note>
9943 The address of the provided array must be in the process space of
9944 this IFramebuffer object.
9945 </note>
9946 <note>
9947 Method not yet implemented.
9948 </note>
9949 </desc>
9950 <param name="rectangles" type="octet" mod="ptr" dir="in">
9951 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9952 </param>
9953 <param name="count" type="unsigned long" dir="in">
9954 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9955 </param>
9956 <param name="countCopied" type="unsigned long" dir="return">
9957 <desc>Number of elements copied to the @a rectangles array.</desc>
9958 </param>
9959 </method>
9960
9961 <method name="setVisibleRegion">
9962 <desc>
9963 Suggests a new visible region to this frame buffer. This region
9964 represents the area of the VM display which is a union of regions of
9965 all top-level windows of the guest operating system running inside the
9966 VM (if the Guest Additions for this system support this
9967 functionality). This information may be used by the frontends to
9968 implement the seamless desktop integration feature.
9969
9970 <note>
9971 The address of the provided array must be in the process space of
9972 this IFramebuffer object.
9973 </note>
9974 <note>
9975 The IFramebuffer implementation must make a copy of the provided
9976 array of rectangles.
9977 </note>
9978 <note>
9979 Method not yet implemented.
9980 </note>
9981 </desc>
9982 <param name="rectangles" type="octet" mod="ptr" dir="in">
9983 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9984 </param>
9985 <param name="count" type="unsigned long" dir="in">
9986 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9987 </param>
9988 </method>
9989
9990 </interface>
9991
9992 <interface
9993 name="IFramebufferOverlay" extends="IFramebuffer"
9994 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9995 wsmap="suppress"
9996 >
9997 <desc>
9998 The IFramebufferOverlay interface represents an alpha blended overlay
9999 for displaying status icons above an IFramebuffer. It is always created
10000 not visible, so that it must be explicitly shown. It only covers a
10001 portion of the IFramebuffer, determined by its width, height and
10002 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10003 that order) format, and may be written to directly. Do re-read the
10004 width though, after setting it, as it may be adjusted (increased) to
10005 make it more suitable for the front end.
10006 </desc>
10007 <attribute name="x" type="unsigned long" readonly="yes">
10008 <desc>X position of the overlay, relative to the frame buffer.</desc>
10009 </attribute>
10010
10011 <attribute name="y" type="unsigned long" readonly="yes">
10012 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10013 </attribute>
10014
10015 <attribute name="visible" type="boolean" readonly="no">
10016 <desc>
10017 Whether the overlay is currently visible.
10018 </desc>
10019 </attribute>
10020
10021 <attribute name="alpha" type="unsigned long" readonly="no">
10022 <desc>
10023 The global alpha value for the overlay. This may or may not be
10024 supported by a given front end.
10025 </desc>
10026 </attribute>
10027
10028 <method name="move">
10029 <desc>
10030 Changes the overlay's position relative to the IFramebuffer.
10031 </desc>
10032 <param name="x" type="unsigned long" dir="in"/>
10033 <param name="y" type="unsigned long" dir="in"/>
10034 </method>
10035
10036 </interface>
10037
10038 <interface
10039 name="IDisplay" extends="$unknown"
10040 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10041 wsmap="suppress"
10042 >
10043 <desc>
10044 The IDisplay interface represents the virtual machine's display.
10045
10046 The object implementing this interface is contained in each
10047 <link to="IConsole::display"/> attribute and represents the visual
10048 output of the virtual machine.
10049
10050 The virtual display supports pluggable output targets represented by the
10051 IFramebuffer interface. Examples of the output target are a window on
10052 the host computer or an RDP session's display on a remote computer.
10053 </desc>
10054 <attribute name="width" type="unsigned long" readonly="yes">
10055 <desc>Current display width.</desc>
10056 </attribute>
10057
10058 <attribute name="height" type="unsigned long" readonly="yes">
10059 <desc>Current display height.</desc>
10060 </attribute>
10061
10062 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10063 <desc>
10064 Current guest display color depth. Note that this may differ
10065 from <link to="IFramebuffer::bitsPerPixel"/>.
10066 </desc>
10067 </attribute>
10068
10069 <method name="setupInternalFramebuffer">
10070 <desc>
10071 Prepares an internally managed frame buffer.
10072 </desc>
10073 <param name="depth" type="unsigned long" dir="in"/>
10074 </method>
10075
10076 <method name="lockFramebuffer">
10077 <desc>
10078 Requests access to the internal frame buffer.
10079
10080 <result name="VBOX_E_NOT_SUPPORTED">
10081 Attempt to lock a non-internal frame buffer.
10082 </result>
10083
10084 </desc>
10085 <param name="address" type="octet" mod="ptr" dir="return"/>
10086 </method>
10087
10088 <method name="unlockFramebuffer">
10089 <desc>
10090 Releases access to the internal frame buffer.
10091
10092 <result name="VBOX_E_NOT_SUPPORTED">
10093 Attempt to unlock a non-internal frame buffer.
10094 </result>
10095
10096 </desc>
10097 </method>
10098
10099 <method name="registerExternalFramebuffer">
10100 <desc>
10101 Registers an external frame buffer.
10102 </desc>
10103 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10104 </method>
10105
10106 <method name="setFramebuffer">
10107 <desc>
10108 Sets the framebuffer for given screen.
10109 </desc>
10110 <param name="screenId" type="unsigned long" dir="in"/>
10111 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10112 </method>
10113
10114 <method name="getFramebuffer">
10115 <desc>
10116 Queries the framebuffer for given screen.
10117 </desc>
10118 <param name="screenId" type="unsigned long" dir="in"/>
10119 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10120 <param name="xOrigin" type="long" dir="out"/>
10121 <param name="yOrigin" type="long" dir="out"/>
10122 </method>
10123
10124 <method name="setVideoModeHint">
10125 <desc>
10126 Asks VirtualBox to request the given video mode from
10127 the guest. This is just a hint and it cannot be guaranteed
10128 that the requested resolution will be used. Guest Additions
10129 are required for the request to be seen by guests. The caller
10130 should issue the request and wait for a resolution change and
10131 after a timeout retry.
10132
10133 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10134 parameters means that the corresponding values should be taken from the
10135 current video mode (i.e. left unchanged).
10136
10137 If the guest OS supports multi-monitor configuration then the @a display
10138 parameter specifies the number of the guest display to send the hint to:
10139 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10140 so on. If the multi-monitor configuration is not supported, @a display
10141 must be <tt>0</tt>.
10142
10143 <result name="E_INVALIDARG">
10144 The @a display is not associated with any monitor.
10145 </result>
10146
10147 </desc>
10148 <param name="width" type="unsigned long" dir="in"/>
10149 <param name="height" type="unsigned long" dir="in"/>
10150 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10151 <param name="display" type="unsigned long" dir="in"/>
10152 </method>
10153
10154 <method name="setSeamlessMode">
10155 <desc>
10156 Enables or disables seamless guest display rendering (seamless desktop
10157 integration) mode.
10158 <note>
10159 Calling this method has no effect if <link
10160 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10161 </note>
10162 </desc>
10163 <param name="enabled" type="boolean" dir="in"/>
10164 </method>
10165
10166 <method name="takeScreenShot">
10167 <desc>
10168 Takes a screen shot of the requested size and copies it to the
10169 32-bpp buffer allocated by the caller.
10170
10171 <result name="E_NOTIMPL">
10172 Feature not implemented.
10173 </result>
10174 <result name="VBOX_E_IPRT_ERROR">
10175 Could not take a screenshot.
10176 </result>
10177
10178 </desc>
10179 <param name="address" type="octet" mod="ptr" dir="in"/>
10180 <param name="width" type="unsigned long" dir="in"/>
10181 <param name="height" type="unsigned long" dir="in"/>
10182 </method>
10183
10184 <method name="drawToScreen">
10185 <desc>
10186 Draws a 32-bpp image of the specified size from the given buffer
10187 to the given point on the VM display.
10188
10189 <result name="E_NOTIMPL">
10190 Feature not implemented.
10191 </result>
10192 <result name="VBOX_E_IPRT_ERROR">
10193 Could not draw to screen.
10194 </result>
10195
10196 </desc>
10197 <param name="address" type="octet" mod="ptr" dir="in"/>
10198 <param name="x" type="unsigned long" dir="in"/>
10199 <param name="y" type="unsigned long" dir="in"/>
10200 <param name="width" type="unsigned long" dir="in"/>
10201 <param name="height" type="unsigned long" dir="in"/>
10202 </method>
10203
10204 <method name="invalidateAndUpdate">
10205 <desc>
10206 Does a full invalidation of the VM display and instructs the VM
10207 to update it.
10208
10209 <result name="VBOX_E_IPRT_ERROR">
10210 Could not invalidate and update screen.
10211 </result>
10212
10213 </desc>
10214 </method>
10215
10216 <method name="resizeCompleted">
10217 <desc>
10218 Signals that a framebuffer has completed the resize operation.
10219
10220 <result name="VBOX_E_NOT_SUPPORTED">
10221 Operation only valid for external frame buffers.
10222 </result>
10223
10224 </desc>
10225 <param name="screenId" type="unsigned long" dir="in"/>
10226 </method>
10227
10228 <method name="updateCompleted">
10229 <desc>
10230 Signals that a framebuffer has completed the update operation.
10231
10232 <result name="VBOX_E_NOT_SUPPORTED">
10233 Operation only valid for external frame buffers.
10234 </result>
10235
10236 </desc>
10237 </method>
10238
10239 </interface>
10240
10241 <!--
10242 // INetworkAdapter
10243 /////////////////////////////////////////////////////////////////////////
10244 -->
10245
10246 <enum
10247 name="NetworkAttachmentType"
10248 uuid="64e770dc-dd1d-4879-9f12-5bd6bc879b78"
10249 >
10250 <desc>
10251 Network attachment type.
10252 </desc>
10253
10254 <const name="Null" value="0">
10255 <desc>Null value, also means "not attached".</desc>
10256 </const>
10257 <const name="NAT" value="1"/>
10258 <const name="HostInterface" value="2"/>
10259 <const name="Internal" value="3"/>
10260 <const name="HostOnly" value="4"/>
10261 </enum>
10262
10263 <enum
10264 name="NetworkAdapterType"
10265 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10266 >
10267 <desc>
10268 Network adapter type.
10269 </desc>
10270
10271 <const name="Null" value="0">
10272 <desc>Null value (never used by the API).</desc>
10273 </const>
10274 <const name="Am79C970A" value="1"/>
10275 <const name="Am79C973" value="2"/>
10276 <const name="I82540EM" value="3"/>
10277 <const name="I82543GC" value="4"/>
10278 </enum>
10279
10280 <interface
10281 name="INetworkAdapter" extends="$unknown"
10282 uuid="4a1ee64e-6c5f-47dd-acfa-f834d7cb74fb"
10283 wsmap="managed"
10284 >
10285 <attribute name="adapterType" type="NetworkAdapterType">
10286 <desc>
10287 Type of the virtual network adapter. Depending on this value,
10288 VirtualBox will provide a different virtual network hardware
10289 to the guest.
10290 </desc>
10291 </attribute>
10292
10293 <attribute name="slot" type="unsigned long" readonly="yes">
10294 <desc>
10295 Slot number this adapter is plugged into. Corresponds to
10296 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10297 to obtain this instance.
10298 </desc>
10299 </attribute>
10300
10301 <attribute name="enabled" type="boolean">
10302 <desc>
10303 Flag whether the network adapter is present in the
10304 guest system. If disabled, the virtual guest hardware will
10305 not contain this network adapter. Can only be changed when
10306 the VM is not running.
10307 </desc>
10308 </attribute>
10309
10310 <attribute name="MACAddress" type="wstring">
10311 <desc>
10312 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10313 it to NULL, VirtualBox will generate a unique MAC address.
10314 </desc>
10315 </attribute>
10316
10317 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10318
10319 <attribute name="hostInterface" type="wstring">
10320 <desc>
10321 Name of the host network interface the VM is attached to.
10322 </desc>
10323 </attribute>
10324
10325 <attribute name="internalNetwork" type="wstring">
10326 <desc>
10327 Name of the internal network the VM is attached to.
10328 </desc>
10329 </attribute>
10330
10331 <attribute name="NATNetwork" type="wstring">
10332 <desc>
10333 Name of the NAT network the VM is attached to.
10334 </desc>
10335 </attribute>
10336
10337 <attribute name="cableConnected" type="boolean">
10338 <desc>
10339 Flag whether the adapter reports the cable as connected or not.
10340 It can be used to report offline situations to a VM.
10341 </desc>
10342 </attribute>
10343
10344 <attribute name="lineSpeed" type="unsigned long">
10345 <desc>
10346 Line speed reported by custom drivers, in units of 1 kbps.
10347 </desc>
10348 </attribute>
10349
10350 <attribute name="traceEnabled" type="boolean">
10351 <desc>
10352 Flag whether network traffic from/to the network card should be traced.
10353 Can only be toggled when the VM is turned off.
10354 </desc>
10355 </attribute>
10356
10357 <attribute name="traceFile" type="wstring">
10358 <desc>
10359 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10360 will be used.
10361 </desc>
10362 </attribute>
10363
10364 <method name="attachToNAT">
10365 <desc>
10366 Attach the network adapter to the Network Address Translation (NAT) interface.
10367 </desc>
10368 </method>
10369
10370 <method name="attachToHostInterface">
10371 <desc>
10372 Attach the network adapter to a host interface.
10373 </desc>
10374 </method>
10375
10376 <method name="attachToInternalNetwork">
10377 <desc>
10378 Attach the network adapter to an internal network.
10379 </desc>
10380 </method>
10381
10382 <method name="attachToHostOnlyNetwork">
10383 <desc>
10384 Attach the network adapter to the host-only network.
10385 </desc>
10386 </method>
10387
10388 <method name="detach">
10389 <desc>
10390 Detach the network adapter
10391 </desc>
10392 </method>
10393 </interface>
10394
10395
10396 <!--
10397 // ISerialPort
10398 /////////////////////////////////////////////////////////////////////////
10399 -->
10400
10401 <enum
10402 name="PortMode"
10403 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10404 >
10405 <desc>
10406 The PortMode enumeration represents possible communication modes for
10407 the virtual serial port device.
10408 </desc>
10409
10410 <const name="Disconnected" value="0">
10411 <desc>Virtual device is not attached to any real host device.</desc>
10412 </const>
10413 <const name="HostPipe" value="1">
10414 <desc>Virtual device is attached to a host pipe.</desc>
10415 </const>
10416 <const name="HostDevice" value="2">
10417 <desc>Virtual device is attached to a host device.</desc>
10418 </const>
10419 </enum>
10420
10421 <interface
10422 name="ISerialPort" extends="$unknown"
10423 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10424 wsmap="managed"
10425 >
10426
10427 <desc>
10428 The ISerialPort interface represents the virtual serial port device.
10429
10430 The virtual serial port device acts like an ordinary serial port
10431 inside the virtual machine. This device communicates to the real
10432 serial port hardware in one of two modes: host pipe or host device.
10433
10434 In host pipe mode, the #path attribute specifies the path to the pipe on
10435 the host computer that represents a serial port. The #server attribute
10436 determines if this pipe is created by the virtual machine process at
10437 machine startup or it must already exist before starting machine
10438 execution.
10439
10440 In host device mode, the #path attribute specifies the name of the
10441 serial port device on the host computer.
10442
10443 There is also a third communication mode: the disconnected mode. In this
10444 mode, the guest OS running inside the virtual machine will be able to
10445 detect the serial port, but all port write operations will be discarded
10446 and all port read operations will return no data.
10447
10448 <see>IMachine::getSerialPort</see>
10449 </desc>
10450
10451 <attribute name="slot" type="unsigned long" readonly="yes">
10452 <desc>
10453 Slot number this serial port is plugged into. Corresponds to
10454 the value you pass to <link to="IMachine::getSerialPort"/>
10455 to obtain this instance.
10456 </desc>
10457 </attribute>
10458
10459 <attribute name="enabled" type="boolean">
10460 <desc>
10461 Flag whether the serial port is enabled. If disabled,
10462 the serial port will not be reported to the guest OS.
10463 </desc>
10464 </attribute>
10465
10466 <attribute name="IOBase" type="unsigned long">
10467 <desc>Base I/O address of the serial port.</desc>
10468 </attribute>
10469
10470 <attribute name="IRQ" type="unsigned long">
10471 <desc>IRQ number of the serial port.</desc>
10472 </attribute>
10473
10474 <attribute name="hostMode" type="PortMode">
10475 <desc>
10476 How is this port connected to the host.
10477 <note>
10478 Changing this attribute may fail if the conditions for
10479 <link to="#path"/> are not met.
10480 </note>
10481 </desc>
10482 </attribute>
10483
10484 <attribute name="server" type="boolean">
10485 <desc>
10486 Flag whether this serial port acts as a server (creates a new pipe on
10487 the host) or as a client (uses the existing pipe). This attribute is
10488 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10489 </desc>
10490 </attribute>
10491
10492 <attribute name="path" type="wstring">
10493 <desc>
10494 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
10495 PortMode_HostPipe, or the host serial device name when
10496 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
10497 cases, setting a @c null or an empty string as the attribute's value
10498 will result into an error. Otherwise, the value of this property is
10499 ignored.
10500 </desc>
10501 </attribute>
10502
10503 </interface>
10504
10505 <!--
10506 // IParallelPort
10507 /////////////////////////////////////////////////////////////////////////
10508 -->
10509
10510 <interface
10511 name="IParallelPort" extends="$unknown"
10512 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10513 wsmap="managed"
10514 >
10515
10516 <desc>
10517 The IParallelPort interface represents the virtual parallel port device.
10518
10519 The virtual parallel port device acts like an ordinary parallel port
10520 inside the virtual machine. This device communicates to the real
10521 parallel port hardware using the name of the parallel device on the host
10522 computer specified in the #path attribute.
10523
10524 Each virtual parallel port device is assigned a base I/O address and an
10525 IRQ number that will be reported to the guest operating system and used
10526 to operate the given parallel port from within the virtual machine.
10527
10528 <see>IMachine::getParallelPort</see>
10529 </desc>
10530
10531 <attribute name="slot" type="unsigned long" readonly="yes">
10532 <desc>
10533 Slot number this parallel port is plugged into. Corresponds to
10534 the value you pass to <link to="IMachine::getParallelPort"/>
10535 to obtain this instance.
10536 </desc>
10537 </attribute>
10538
10539 <attribute name="enabled" type="boolean">
10540 <desc>
10541 Flag whether the parallel port is enabled. If disabled,
10542 the parallel port will not be reported to the guest OS.
10543 </desc>
10544 </attribute>
10545
10546 <attribute name="IOBase" type="unsigned long">
10547 <desc>Base I/O address of the parallel port.</desc>
10548 </attribute>
10549
10550 <attribute name="IRQ" type="unsigned long">
10551 <desc>IRQ number of the parallel port.</desc>
10552 </attribute>
10553
10554 <attribute name="path" type="wstring">
10555 <desc>
10556 Host parallel device name. If this parallel port is enabled, setting a
10557 @c null or an empty string as this attribute's value will result into
10558 an error.
10559 </desc>
10560 </attribute>
10561
10562 </interface>
10563
10564
10565 <!--
10566 // IMachineDebugger
10567 /////////////////////////////////////////////////////////////////////////
10568 -->
10569
10570 <interface
10571 name="IMachineDebugger" extends="$unknown"
10572 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10573 wsmap="suppress"
10574 >
10575 <method name="resetStats">
10576 <desc>
10577 Reset VM statistics.
10578 </desc>
10579 <param name="pattern" type="wstring" dir="in">
10580 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10581 </param>
10582 </method>
10583
10584 <method name="dumpStats">
10585 <desc>
10586 Dumps VM statistics.
10587 </desc>
10588 <param name="pattern" type="wstring" dir="in">
10589 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10590 </param>
10591 </method>
10592
10593 <method name="getStats">
10594 <desc>
10595 Get the VM statistics in a XMLish format.
10596 </desc>
10597 <param name="pattern" type="wstring" dir="in">
10598 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10599 </param>
10600 <param name="withDescriptions" type="boolean" dir="in">
10601 <desc>Whether to include the descriptions.</desc>
10602 </param>
10603 <param name="stats" type="wstring" dir="out">
10604 <desc>The XML document containing the statistics.</desc>
10605 </param>
10606 </method>
10607
10608 <method name="injectNMI">
10609 <desc>
10610 Inject an NMI into a running VT-x/AMD-V VM.
10611 </desc>
10612 </method>
10613
10614 <attribute name="singlestep" type="boolean">
10615 <desc>Switch for enabling singlestepping.</desc>
10616 </attribute>
10617
10618 <attribute name="recompileUser" type="boolean">
10619 <desc>Switch for forcing code recompilation for user mode code.</desc>
10620 </attribute>
10621
10622 <attribute name="recompileSupervisor" type="boolean">
10623 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10624 </attribute>
10625
10626 <attribute name="PATMEnabled" type="boolean">
10627 <desc>Switch for enabling and disabling the PATM component.</desc>
10628 </attribute>
10629
10630 <attribute name="CSAMEnabled" type="boolean">
10631 <desc>Switch for enabling and disabling the CSAM component.</desc>
10632 </attribute>
10633
10634 <attribute name="logEnabled" type="boolean">
10635 <desc>Switch for enabling and disabling logging.</desc>
10636 </attribute>
10637
10638 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10639 <desc>
10640 Flag indicating whether the VM is currently making use of CPU hardware
10641 virtualization extensions.
10642 </desc>
10643 </attribute>
10644
10645 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10646 <desc>
10647 Flag indicating whether the VM is currently making use of the nested paging
10648 CPU hardware virtualization extension.
10649 </desc>
10650 </attribute>
10651
10652 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10653 <desc>
10654 Flag indicating whether the VM is currently making use of the VPID
10655 VT-x extension.
10656 </desc>
10657 </attribute>
10658
10659 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10660 <desc>
10661 Flag indicating whether the VM is currently making use of the Physical
10662 Address Extension CPU feature.
10663 </desc>
10664 </attribute>
10665
10666 <attribute name="virtualTimeRate" type="unsigned long">
10667 <desc>
10668 The rate at which the virtual time runs expressed as a percentage.
10669 The accepted range is 2% to 20000%.
10670 </desc>
10671 </attribute>
10672
10673 <!-- @todo method for setting log flags, groups and destination! -->
10674
10675 <attribute name="VM" type="unsigned long long" readonly="yes">
10676 <desc>
10677 Gets the VM handle. This is only for internal use while
10678 we carve the details of this interface.
10679 </desc>
10680 </attribute>
10681
10682 </interface>
10683
10684 <!--
10685 // IUSBController
10686 /////////////////////////////////////////////////////////////////////////
10687 -->
10688
10689 <interface
10690 name="IUSBController" extends="$unknown"
10691 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10692 wsmap="managed"
10693 >
10694 <attribute name="enabled" type="boolean">
10695 <desc>
10696 Flag whether the USB controller is present in the
10697 guest system. If disabled, the virtual guest hardware will
10698 not contain any USB controller. Can only be changed when
10699 the VM is powered off.
10700 </desc>
10701 </attribute>
10702
10703 <attribute name="enabledEhci" type="boolean">
10704 <desc>
10705 Flag whether the USB EHCI controller is present in the
10706 guest system. If disabled, the virtual guest hardware will
10707 not contain a USB EHCI controller. Can only be changed when
10708 the VM is powered off.
10709 </desc>
10710 </attribute>
10711
10712 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10713 <desc>
10714 USB standard version which the controller implements.
10715 This is a BCD which means that the major version is in the
10716 high byte and minor version is in the low byte.
10717 </desc>
10718 </attribute>
10719
10720 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10721 <desc>
10722 List of USB device filters associated with the machine.
10723
10724 If the machine is currently running, these filters are activated
10725 every time a new (supported) USB device is attached to the host
10726 computer that was not ignored by global filters
10727 (<link to="IHost::USBDeviceFilters"/>).
10728
10729 These filters are also activated when the machine is powered up.
10730 They are run against a list of all currently available USB
10731 devices (in states
10732 <link to="USBDeviceState_Available"/>,
10733 <link to="USBDeviceState_Busy"/>,
10734 <link to="USBDeviceState_Held"/>) that were not previously
10735 ignored by global filters.
10736
10737 If at least one filter matches the USB device in question, this
10738 device is automatically captured (attached to) the virtual USB
10739 controller of this machine.
10740
10741 <see>IUSBDeviceFilter, ::IUSBController</see>
10742 </desc>
10743 </attribute>
10744
10745 <method name="createDeviceFilter">
10746 <desc>
10747 Creates a new USB device filter. All attributes except
10748 the filter name are set to <tt>null</tt> (any match),
10749 <i>active</i> is <tt>false</tt> (the filter is not active).
10750
10751 The created filter can then be added to the list of filters using
10752 <link to="#insertDeviceFilter()"/>.
10753
10754 <result name="VBOX_E_INVALID_VM_STATE">
10755 The virtual machine is not mutable.
10756 </result>
10757
10758 <see>#deviceFilters</see>
10759 </desc>
10760 <param name="name" type="wstring" dir="in">
10761 <desc>
10762 Filter name. See <link to="IUSBDeviceFilter::name"/>
10763 for more info.
10764 </desc>
10765 </param>
10766 <param name="filter" type="IUSBDeviceFilter" dir="return">
10767 <desc>Created filter object.</desc>
10768 </param>
10769 </method>
10770
10771 <method name="insertDeviceFilter">
10772 <desc>
10773 Inserts the given USB device to the specified position
10774 in the list of filters.
10775
10776 Positions are numbered starting from <tt>0</tt>. If the specified
10777 position is equal to or greater than the number of elements in
10778 the list, the filter is added to the end of the collection.
10779
10780 <note>
10781 Duplicates are not allowed, so an attempt to insert a
10782 filter that is already in the collection, will return an
10783 error.
10784 </note>
10785
10786 <result name="VBOX_E_INVALID_VM_STATE">
10787 Virtual machine is not mutable.
10788 </result>
10789 <result name="E_INVALIDARG">
10790 USB device filter not created within this VirtualBox instance.
10791 </result>
10792 <result name="VBOX_E_INVALID_OBJECT_STATE">
10793 USB device filter already in list.
10794 </result>
10795
10796 <see>#deviceFilters</see>
10797 </desc>
10798 <param name="position" type="unsigned long" dir="in">
10799 <desc>Position to insert the filter to.</desc>
10800 </param>
10801 <param name="filter" type="IUSBDeviceFilter" dir="in">
10802 <desc>USB device filter to insert.</desc>
10803 </param>
10804 </method>
10805
10806 <method name="removeDeviceFilter">
10807 <desc>
10808 Removes a USB device filter from the specified position in the
10809 list of filters.
10810
10811 Positions are numbered starting from <tt>0</tt>. Specifying a
10812 position equal to or greater than the number of elements in
10813 the list will produce an error.
10814
10815 <see>#deviceFilters</see>
10816
10817 <result name="VBOX_E_INVALID_VM_STATE">
10818 Virtual machine is not mutable.
10819 </result>
10820 <result name="E_INVALIDARG">
10821 USB device filter list empty or invalid @a position.
10822 </result>
10823
10824 </desc>
10825 <param name="position" type="unsigned long" dir="in">
10826 <desc>Position to remove the filter from.</desc>
10827 </param>
10828 <param name="filter" type="IUSBDeviceFilter" dir="return">
10829 <desc>Removed USB device filter.</desc>
10830 </param>
10831 </method>
10832
10833 </interface>
10834
10835
10836 <!--
10837 // IUSBDevice
10838 /////////////////////////////////////////////////////////////////////////
10839 -->
10840
10841 <enumerator
10842 name="IUSBDeviceEnumerator" type="IUSBDevice"
10843 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10844 />
10845
10846 <collection
10847 name="IUSBDeviceCollection" type="IUSBDevice"
10848 enumerator="IUSBDeviceEnumerator"
10849 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10850 readonly="yes"
10851 >
10852 <method name="findById">
10853 <desc>
10854 Searches this collection for a USB device with the given UUID.
10855 <note>
10856 The method returns an error if the given UUID does not
10857 correspond to any USB device in the collection.
10858 </note>
10859 <see>IUSBDevice::id</see>
10860 </desc>
10861 <param name="id" type="uuid" dir="in">
10862 <desc>UUID of the USB device to search for.</desc>
10863 </param>
10864 <param name="device" type="IUSBDevice" dir="return">
10865 <desc>Found USB device object.</desc>
10866 </param>
10867 </method>
10868
10869 <method name="findByAddress">
10870 <desc>
10871 Searches this collection for a USB device with the given
10872 host address.
10873 <note>
10874 The method returns an error if the given address does not
10875 correspond to any USB device in the collection.
10876 </note>
10877 <see>IUSBDevice::address</see>
10878 </desc>
10879 <param name="name" type="wstring" dir="in">
10880 <desc>
10881 Address of the USB device (as assigned by the host) to
10882 search for.
10883 </desc>
10884 </param>
10885 <param name="device" type="IUSBDevice" dir="return">
10886 <desc>Found USB device object.</desc>
10887 </param>
10888 </method>
10889
10890 </collection>
10891
10892 <interface
10893 name="IUSBDevice" extends="$unknown"
10894 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10895 wsmap="managed"
10896 >
10897 <desc>
10898 The IUSBDevice interface represents a virtual USB device attached to the
10899 virtual machine.
10900
10901 A collection of objects implementing this interface is stored in the
10902 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10903 attached to a running virtual machine's USB controller.
10904 </desc>
10905
10906 <attribute name="id" type="uuid" readonly="yes">
10907 <desc>
10908 Unique USB device ID. This ID is built from #vendorId,
10909 #productId, #revision and #serialNumber.
10910 </desc>
10911 </attribute>
10912
10913 <attribute name="vendorId" type="unsigned short" readonly="yes">
10914 <desc>Vendor ID.</desc>
10915 </attribute>
10916
10917 <attribute name="productId" type="unsigned short" readonly="yes">
10918 <desc>Product ID.</desc>
10919 </attribute>
10920
10921 <attribute name="revision" type="unsigned short" readonly="yes">
10922 <desc>
10923 Product revision number. This is a packed BCD represented as
10924 unsigned short. The high byte is the integer part and the low
10925 byte is the decimal.
10926 </desc>
10927 </attribute>
10928
10929 <attribute name="manufacturer" type="wstring" readonly="yes">
10930 <desc>Manufacturer string.</desc>
10931 </attribute>
10932
10933 <attribute name="product" type="wstring" readonly="yes">
10934 <desc>Product string.</desc>
10935 </attribute>
10936
10937 <attribute name="serialNumber" type="wstring" readonly="yes">
10938 <desc>Serial number string.</desc>
10939 </attribute>
10940
10941 <attribute name="address" type="wstring" readonly="yes">
10942 <desc>Host specific address of the device.</desc>
10943 </attribute>
10944
10945 <attribute name="port" type="unsigned short" readonly="yes">
10946 <desc>
10947 Host USB port number the device is physically
10948 connected to.
10949 </desc>
10950 </attribute>
10951
10952 <attribute name="version" type="unsigned short" readonly="yes">
10953 <desc>
10954 The major USB version of the device - 1 or 2.
10955 </desc>
10956 </attribute>
10957
10958 <attribute name="portVersion" type="unsigned short" readonly="yes">
10959 <desc>
10960 The major USB version of the host USB port the device is
10961 physically connected to - 1 or 2. For devices not connected to
10962 anything this will have the same value as the version attribute.
10963 </desc>
10964 </attribute>
10965
10966 <attribute name="remote" type="boolean" readonly="yes">
10967 <desc>
10968 Whether the device is physically connected to a remote VRDP
10969 client or to a local host machine.
10970 </desc>
10971 </attribute>
10972
10973 </interface>
10974
10975
10976 <!--
10977 // IUSBDeviceFilter
10978 /////////////////////////////////////////////////////////////////////////
10979 -->
10980
10981 <enumerator
10982 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10983 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10984 />
10985
10986 <collection
10987 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10988 enumerator="IUSBDeviceFilterEnumerator"
10989 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10990 readonly="yes"
10991 />
10992
10993 <interface
10994 name="IUSBDeviceFilter" extends="$unknown"
10995 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10996 wsmap="managed"
10997 >
10998 <desc>
10999 The IUSBDeviceFilter interface represents an USB device filter used
11000 to perform actions on a group of USB devices.
11001
11002 This type of filters is used by running virtual machines to
11003 automatically capture selected USB devices once they are physically
11004 attached to the host computer.
11005
11006 A USB device is matched to the given device filter if and only if all
11007 attributes of the device match the corresponding attributes of the
11008 filter (that is, attributes are joined together using the logical AND
11009 operation). On the other hand, all together, filters in the list of
11010 filters carry the semantics of the logical OR operation. So if it is
11011 desirable to create a match like "this vendor id OR this product id",
11012 one needs to create two filters and specify "any match" (see below)
11013 for unused attributes.
11014
11015 All filter attributes used for matching are strings. Each string
11016 is an expression representing a set of values of the corresponding
11017 device attribute, that will match the given filter. Currently, the
11018 following filtering expressions are supported:
11019
11020 <ul>
11021 <li><i>Interval filters</i>. Used to specify valid intervals for
11022 integer device attributes (Vendor ID, Product ID and Revision).
11023 The format of the string is:
11024
11025 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11026
11027 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11028 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11029 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11030 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11031 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11032 possible integer is assumed.
11033 </li>
11034 <li><i>Boolean filters</i>. Used to specify acceptable values for
11035 boolean device attributes. The format of the string is:
11036
11037 <tt>true|false|yes|no|0|1</tt>
11038
11039 </li>
11040 <li><i>Exact match</i>. Used to specify a single value for the given
11041 device attribute. Any string that doesn't start with <tt>int:</tt>
11042 represents the exact match. String device attributes are compared to
11043 this string including case of symbols. Integer attributes are first
11044 converted to a string (see individual filter attributes) and then
11045 compared ignoring case.
11046
11047 </li>
11048 <li><i>Any match</i>. Any value of the corresponding device attribute
11049 will match the given filter. An empty or <tt>null</tt> string is
11050 used to construct this type of filtering expressions.
11051
11052 </li>
11053 </ul>
11054
11055 <note>
11056 On the Windows host platform, interval filters are not currently
11057 available. Also all string filter attributes
11058 (<link to="#manufacturer"/>, <link to="#product"/>,
11059 <link to="#serialNumber"/>) are ignored, so they behave as
11060 <i>any match</i> no matter what string expression is specified.
11061 </note>
11062
11063 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11064 </desc>
11065
11066 <attribute name="name" type="wstring">
11067 <desc>
11068 Visible name for this filter.
11069 This name is used to visually distinguish one filter from another,
11070 so it can neither be <tt>null</tt> nor an empty string.
11071 </desc>
11072 </attribute>
11073
11074 <attribute name="active" type="boolean">
11075 <desc>Whether this filter active or has been temporarily disabled.</desc>
11076 </attribute>
11077
11078 <attribute name="vendorId" type="wstring">
11079 <desc>
11080 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11081 The string representation for the <i>exact matching</i>
11082 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11083 (including leading zeroes).
11084 </desc>
11085 </attribute>
11086
11087 <attribute name="productId" type="wstring">
11088 <desc>
11089 <link to="IUSBDevice::productId">Product ID</link> filter.
11090 The string representation for the <i>exact matching</i>
11091 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11092 (including leading zeroes).
11093 </desc>
11094 </attribute>
11095
11096 <attribute name="revision" type="wstring">
11097 <desc>
11098 <link to="IUSBDevice::productId">Product revision number</link>
11099 filter. The string representation for the <i>exact matching</i>
11100 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11101 of the integer part of the revision, and <tt>F</tt> is the
11102 decimal digit of its fractional part (including leading and
11103 trailing zeros).
11104 Note that for interval filters, it's best to use the hexadecimal
11105 form, because the revision is stored as a 16 bit packed BCD value;
11106 so the expression <tt>int:0x0100-0x0199</tt> will match any
11107 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11108 </desc>
11109 </attribute>
11110
11111 <attribute name="manufacturer" type="wstring">
11112 <desc>
11113 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11114 </desc>
11115 </attribute>
11116
11117 <attribute name="product" type="wstring">
11118 <desc>
11119 <link to="IUSBDevice::product">Product</link> filter.
11120 </desc>
11121 </attribute>
11122
11123 <attribute name="serialNumber" type="wstring">
11124 <desc>
11125 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11126 </desc>
11127 </attribute>
11128
11129 <attribute name="port" type="wstring">
11130 <desc>
11131 <link to="IUSBDevice::port">Host USB port</link> filter.
11132 </desc>
11133 </attribute>
11134
11135 <attribute name="remote" type="wstring">
11136 <desc>
11137 <link to="IUSBDevice::remote">Remote state</link> filter.
11138 <note>
11139 This filter makes sense only for machine USB filters,
11140 i.e. it is ignored by IHostUSBDeviceFilter objects.
11141 </note>
11142 </desc>
11143 </attribute>
11144
11145 <attribute name="maskedInterfaces" type="unsigned long">
11146 <desc>
11147 This is an advanced option for hiding one or more USB interfaces
11148 from the guest. The value is a bit mask where the bits that are set
11149 means the corresponding USB interface should be hidden, masked off
11150 if you like.
11151 This feature only works on Linux hosts.
11152 </desc>
11153 </attribute>
11154
11155 </interface>
11156
11157
11158 <!--
11159 // IHostUSBDevice
11160 /////////////////////////////////////////////////////////////////////////
11161 -->
11162
11163 <enum
11164 name="USBDeviceState"
11165 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11166 >
11167 <desc>
11168 USB device state. This enumeration represents all possible states
11169 of the USB device physically attached to the host computer regarding
11170 its state on the host computer and availability to guest computers
11171 (all currently running virtual machines).
11172
11173 Once a supported USB device is attached to the host, global USB
11174 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11175 either ignore the device, or put it to USBDeviceState_Held state, or do
11176 nothing. Unless the device is ignored by global filters, filters of all
11177 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11178 activated that can put it to USBDeviceState_Captured state.
11179
11180 If the device was ignored by global filters, or didn't match
11181 any filters at all (including guest ones), it is handled by the host
11182 in a normal way. In this case, the device state is determined by
11183 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11184 or USBDeviceState_Available, depending on the current device usage.
11185
11186 Besides auto-capturing based on filters, the device can be manually
11187 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
11188 state is USBDeviceState_Busy, USBDeviceState_Available or
11189 USBDeviceState_Held.
11190
11191 <note>
11192 Due to differences in USB stack implementations in Linux and Win32,
11193 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11194 only to the Linux version of the product. This also means that (<link
11195 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
11196 device state is USBDeviceState_Held.
11197 </note>
11198
11199 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11200 </desc>
11201
11202 <const name="NotSupported" value="0">
11203 <desc>
11204 Not supported by the VirtualBox server, not available to guests.
11205 </desc>
11206 </const>
11207 <const name="Unavailable" value="1">
11208 <desc>
11209 Being used by the host computer exclusively,
11210 not available to guests.
11211 </desc>
11212 </const>
11213 <const name="Busy" value="2">
11214 <desc>
11215 Being used by the host computer, potentially available to guests.
11216 </desc>
11217 </const>
11218 <const name="Available" value="3">
11219 <desc>
11220 Not used by the host computer, available to guests (the host computer
11221 can also start using the device at any time).
11222 </desc>
11223 </const>
11224 <const name="Held" value="4">
11225 <desc>
11226 Held by the VirtualBox server (ignored by the host computer),
11227 available to guests.
11228 </desc>
11229 </const>
11230 <const name="Captured" value="5">
11231 <desc>
11232 Captured by one of the guest computers, not available
11233 to anybody else.
11234 </desc>
11235 </const>
11236 </enum>
11237
11238 <enumerator
11239 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
11240 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
11241 />
11242
11243 <collection
11244 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
11245 enumerator="IHostUSBDeviceEnumerator"
11246 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
11247 readonly="yes"
11248 >
11249 <method name="findById">
11250 <desc>
11251 Searches this collection for a USB device with the given UUID.
11252 <note>
11253 The method returns an error if the given UUID does not
11254 correspond to any USB device in the collection.
11255 </note>
11256 <see>IHostUSBDevice::id</see>
11257 </desc>
11258 <param name="id" type="uuid" dir="in">
11259 <desc>UUID of the USB device to search for.</desc>
11260 </param>
11261 <param name="device" type="IHostUSBDevice" dir="return">
11262 <desc>Found USB device object.</desc>
11263 </param>
11264 </method>
11265
11266 <method name="findByAddress">
11267 <desc>
11268 Searches this collection for a USB device with the given
11269 host address.
11270 <note>
11271 The method returns an error if the given address does not
11272 correspond to any USB device in the collection.
11273 </note>
11274 <see>IHostUSBDevice::address</see>
11275 </desc>
11276 <param name="name" type="wstring" dir="in">
11277 <desc>
11278 Address of the USB device (as assigned by the host) to
11279 search for.
11280 </desc>
11281 </param>
11282 <param name="device" type="IHostUSBDevice" dir="return">
11283 <desc>Found USB device object.</desc>
11284 </param>
11285 </method>
11286
11287 </collection>
11288
11289 <interface
11290 name="IHostUSBDevice" extends="IUSBDevice"
11291 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11292 wsmap="managed"
11293 >
11294 <desc>
11295 The IHostUSBDevice interface represents a physical USB device attached
11296 to the host computer.
11297
11298 Besides properties inherited from IUSBDevice, this interface adds the
11299 <link to="#state"/> property that holds the current state of the USB
11300 device.
11301
11302 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11303 </desc>
11304
11305 <attribute name="state" type="USBDeviceState" readonly="yes">
11306 <desc>
11307 Current state of the device.
11308 </desc>
11309 </attribute>
11310
11311 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11312
11313 </interface>
11314
11315
11316 <!--
11317 // IHostUSBDeviceFilter
11318 /////////////////////////////////////////////////////////////////////////
11319 -->
11320
11321 <enum
11322 name="USBDeviceFilterAction"
11323 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11324 >
11325 <desc>
11326 Actions for host USB device filters.
11327 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11328 </desc>
11329
11330 <const name="Null" value="0">
11331 <desc>Null value (never used by the API).</desc>
11332 </const>
11333 <const name="Ignore" value="1">
11334 <desc>Ignore the matched USB device.</desc>
11335 </const>
11336 <const name="Hold" value="2">
11337 <desc>Hold the matched USB device.</desc>
11338 </const>
11339 </enum>
11340
11341 <enumerator
11342 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
11343 uuid="ff735211-903e-4642-9c37-189eb44579fe"
11344 />
11345
11346 <collection
11347 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
11348 enumerator="IHostUSBDeviceFilterEnumerator"
11349 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
11350 readonly="yes"
11351 />
11352
11353 <interface
11354 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11355 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11356 wsmap="managed"
11357 >
11358 <desc>
11359 The IHostUSBDeviceFilter interface represents a global filter for a
11360 physical USB device used by the host computer. Used indirectly in
11361 <link to="IHost::USBDeviceFilters"/>.
11362
11363 Using filters of this type, the host computer determines the initial
11364 state of the USB device after it is physically attached to the
11365 host's USB controller.
11366
11367 <note>
11368 The <link to="#remote"/> attribute is ignored by this type of
11369 filters, because it makes sense only for
11370 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11371 </note>
11372
11373 <see>IHost::USBDeviceFilters</see>
11374 </desc>
11375
11376 <attribute name="action" type="USBDeviceFilterAction">
11377 <desc>
11378 Action performed by the host when an attached USB device
11379 matches this filter.
11380 </desc>
11381 </attribute>
11382
11383 </interface>
11384
11385 <!--
11386 // IAudioAdapter
11387 /////////////////////////////////////////////////////////////////////////
11388 -->
11389
11390 <enum
11391 name="AudioDriverType"
11392 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11393 >
11394 <desc>
11395 Host audio driver type.
11396 </desc>
11397
11398 <const name="Null" value="0">
11399 <desc>Null value, also means "dummy audio driver".</desc>
11400 </const>
11401 <const name="WinMM" value="1"/>
11402 <const name="OSS" value="2"/>
11403 <const name="ALSA" value="3"/>
11404 <const name="DirectSound" value="4"/>
11405 <const name="CoreAudio" value="5"/>
11406 <const name="MMPM" value="6"/>
11407 <const name="Pulse" value="7"/>
11408 <const name="SolAudio" value="8"/>
11409 </enum>
11410
11411 <enum
11412 name="AudioControllerType"
11413 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11414 >
11415 <desc>
11416 Virtual audio controller type.
11417 </desc>
11418
11419 <const name="AC97" value="0"/>
11420 <const name="SB16" value="1"/>
11421 </enum>
11422
11423 <interface
11424 name="IAudioAdapter" extends="$unknown"
11425 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11426 wsmap="managed"
11427 >
11428 <desc>
11429 The IAudioAdapter interface represents the virtual audio adapter of
11430 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11431 </desc>
11432 <attribute name="enabled" type="boolean">
11433 <desc>
11434 Flag whether the audio adapter is present in the
11435 guest system. If disabled, the virtual guest hardware will
11436 not contain any audio adapter. Can only be changed when
11437 the VM is not running.
11438 </desc>
11439 </attribute>
11440 <attribute name="audioController" type="AudioControllerType">
11441 <desc>
11442 The audio hardware we emulate.
11443 </desc>
11444 </attribute>
11445 <attribute name="audioDriver" type="AudioDriverType">
11446 <desc>
11447 Audio driver the adapter is connected to. This setting
11448 can only be changed when the VM is not running.
11449 </desc>
11450 </attribute>
11451 </interface>
11452
11453 <!--
11454 // IVRDPServer
11455 /////////////////////////////////////////////////////////////////////////
11456 -->
11457
11458 <enum
11459 name="VRDPAuthType"
11460 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11461 >
11462 <desc>
11463 VRDP authentication type.
11464 </desc>
11465
11466 <const name="Null" value="0">
11467 <desc>Null value, also means "no authentication".</desc>
11468 </const>
11469 <const name="External" value="1"/>
11470 <const name="Guest" value="2"/>
11471 </enum>
11472
11473 <interface
11474 name="IVRDPServer" extends="$unknown"
11475 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11476 wsmap="managed"
11477 >
11478 <attribute name="enabled" type="boolean">
11479 <desc>VRDP server status.</desc>
11480 </attribute>
11481
11482 <attribute name="port" type="unsigned long">
11483 <desc>
11484 VRDP server port number.
11485 <note>
11486 Setting the value of this property to <tt>0</tt> will reset the port
11487 number to the default value which is
11488 currently <tt>3389</tt>. Reading this property will always return a
11489 real port number, even after it has been set to <tt>0</tt> (in which
11490 case the default port is returned).
11491 </note>
11492 </desc>
11493 </attribute>
11494
11495 <attribute name="netAddress" type="wstring">
11496 <desc>VRDP server address.</desc>
11497 </attribute>
11498
11499 <attribute name="authType" type="VRDPAuthType">
11500 <desc>VRDP authentication method.</desc>
11501 </attribute>
11502
11503 <attribute name="authTimeout" type="unsigned long">
11504 <desc>Timeout for guest authentication. Milliseconds.</desc>
11505 </attribute>
11506
11507 <attribute name="allowMultiConnection" type="boolean">
11508 <desc>
11509 Flag whether multiple simultaneous connections to the VM are permitted.
11510 Note that this will be replaced by a more powerful mechanism in the future.
11511 </desc>
11512 </attribute>
11513
11514 <attribute name="reuseSingleConnection" type="boolean">
11515 <desc>
11516 Flag whether the existing connection must be dropped and a new connection
11517 must be established by the VRDP server, when a new client connects in single
11518 connection mode.
11519 </desc>
11520 </attribute>
11521
11522 </interface>
11523
11524
11525 <!--
11526 // ISharedFolder
11527 /////////////////////////////////////////////////////////////////////////
11528 -->
11529
11530 <enumerator
11531 name="ISharedFolderEnumerator" type="ISharedFolder"
11532 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
11533 />
11534
11535 <collection
11536 name="ISharedFolderCollection" type="ISharedFolder"
11537 enumerator="ISharedFolderEnumerator"
11538 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11539 readonly="yes">
11540
11541 <method name="findByName">
11542 <desc>
11543 Searches this collection for a shared folder with the given logical
11544 name.
11545 <note>
11546 The method returns an error if the given name does not correspond to
11547 any shared folder in the collection.
11548 </note>
11549 </desc>
11550 <param name="name" type="wstring" dir="in">
11551 <desc>Logical name of the shared folder to search for</desc>
11552 </param>
11553 <param name="sharedFolder" type="ISharedFolder" dir="return">
11554 <desc>Found shared folder object</desc>
11555 </param>
11556 </method>
11557
11558 </collection>
11559
11560 <interface
11561 name="ISharedFolder" extends="$unknown"
11562 uuid="ef41869b-ef31-4b30-8e8f-95af35c0e378"
11563 wsmap="struct"
11564 >
11565 <desc>
11566 The ISharedFolder interface represents a folder in the host computer's
11567 file system accessible from the guest OS running inside a virtual
11568 machine using an associated logical name.
11569
11570 There are three types of shared folders:
11571 <ul>
11572 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11573 folders available to all virtual machines.</li>
11574 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11575 VM-specific shared folders available to the given virtual machine at
11576 startup.</li>
11577 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11578 VM-specific shared folders created in the session context (for
11579 example, when the virtual machine is running) and automatically
11580 discarded when the session is closed (the VM is powered off).</li>
11581 </ul>
11582
11583 Logical names of shared folders must be unique within the given scope
11584 (global, permanent or transient). However, they do not need to be unique
11585 across scopes. In this case, the definition of the shared folder in a
11586 more specific scope takes precedence over definitions in all other
11587 scopes. The order of precedence is (more specific to more general):
11588 <ol>
11589 <li>Transient definitions</li>
11590 <li>Permanent definitions</li>
11591 <li>Global definitions</li>
11592 </ol>
11593
11594 For example, if MyMachine has a shared folder named
11595 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11596 transient shared folder named <tt>C_DRIVE</tt> (that points
11597 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11598 of <tt>C_DRIVE</tt> in the guest OS so
11599 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11600 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11601 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11602 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11603 to <tt>C:\\</tt> if it still exists.
11604
11605 Note that permanent and transient shared folders of different machines
11606 are in different name spaces, so they don't overlap and don't need to
11607 have unique logical names.
11608
11609 <note>
11610 Global shared folders are not implemented in the current version of the
11611 product.
11612 </note>
11613 </desc>
11614
11615 <attribute name="name" type="wstring" readonly="yes">
11616 <desc>Logical name of the shared folder.</desc>
11617 </attribute>
11618
11619 <attribute name="hostPath" type="wstring" readonly="yes">
11620 <desc>Full path to the shared folder in the host file system.</desc>
11621 </attribute>
11622
11623 <attribute name="accessible" type="boolean" readonly="yes">
11624 <desc>
11625 Whether the folder defined by the host path is currently
11626 accessible or not.
11627 For example, the folder can be unaccessible if it is placed
11628 on the network share that is not available by the time
11629 this property is read.
11630 </desc>
11631 </attribute>
11632
11633 <attribute name="writable" type="boolean" readonly="yes">
11634 <desc>
11635 Whether the folder defined by the host path is writable or
11636 not.
11637 </desc>
11638 </attribute>
11639
11640 <attribute name="lastAccessError" type="wstring" readonly="yes">
11641 <desc>
11642 Text message that represents the result of the last accessibility
11643 check.
11644
11645 Accessibility checks are performed each time the <link to="#accessible"/>
11646 attribute is read. A @c null string is returned if the last
11647 accessibility check was successful. A non-null string indicates a
11648 failure and should normally describe a reason of the failure (for
11649 example, a file read error).
11650 </desc>
11651 </attribute>
11652
11653 </interface>
11654
11655 <!--
11656 // ISession
11657 /////////////////////////////////////////////////////////////////////////
11658 -->
11659
11660 <interface
11661 name="IInternalSessionControl" extends="$unknown"
11662 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11663 internal="yes"
11664 wsmap="suppress"
11665 >
11666 <method name="getPID">
11667 <desc>PID of the process that has created this Session object.
11668 </desc>
11669 <param name="pid" type="unsigned long" dir="return"/>
11670 </method>
11671
11672 <method name="getRemoteConsole">
11673 <desc>
11674 Returns the console object suitable for remote control.
11675
11676 <result name="VBOX_E_INVALID_VM_STATE">
11677 Session state prevents operation.
11678 </result>
11679 <result name="VBOX_E_INVALID_OBJECT_STATE">
11680 Session type prevents operation.
11681 </result>
11682
11683 </desc>
11684 <param name="console" type="IConsole" dir="return"/>
11685 </method>
11686
11687 <method name="assignMachine">
11688 <desc>
11689 Assigns the machine object associated with this direct-type
11690 session or informs the session that it will be a remote one
11691 (if @a machine == NULL).
11692
11693 <result name="VBOX_E_INVALID_VM_STATE">
11694 Session state prevents operation.
11695 </result>
11696 <result name="VBOX_E_INVALID_OBJECT_STATE">
11697 Session type prevents operation.
11698 </result>
11699
11700 </desc>
11701 <param name="machine" type="IMachine" dir="in"/>
11702 </method>
11703
11704 <method name="assignRemoteMachine">
11705 <desc>
11706 Assigns the machine and the (remote) console object associated with
11707 this remote-type session.
11708
11709 <result name="VBOX_E_INVALID_VM_STATE">
11710 Session state prevents operation.
11711 </result>
11712
11713 </desc>
11714 <param name="machine" type="IMachine" dir="in"/>
11715 <param name="console" type="IConsole" dir="in"/>
11716 </method>
11717
11718 <method name="updateMachineState">
11719 <desc>
11720 Updates the machine state in the VM process.
11721 Must be called only in certain cases
11722 (see the method implementation).
11723
11724 <result name="VBOX_E_INVALID_VM_STATE">
11725 Session state prevents operation.
11726 </result>
11727 <result name="VBOX_E_INVALID_OBJECT_STATE">
11728 Session type prevents operation.
11729 </result>
11730
11731 </desc>
11732 <param name="aMachineState" type="MachineState" dir="in"/>
11733 </method>
11734
11735 <method name="uninitialize">
11736 <desc>
11737 Uninitializes (closes) this session. Used by VirtualBox to close
11738 the corresponding remote session when the direct session dies
11739 or gets closed.
11740
11741 <result name="VBOX_E_INVALID_VM_STATE">
11742 Session state prevents operation.
11743 </result>
11744
11745 </desc>
11746 </method>
11747
11748 <method name="onDVDDriveChange">
11749 <desc>
11750 Triggered when settings of the DVD drive object of the
11751 associated virtual machine have changed.
11752
11753 <result name="VBOX_E_INVALID_VM_STATE">
11754 Session state prevents operation.
11755 </result>
11756 <result name="VBOX_E_INVALID_OBJECT_STATE">
11757 Session type prevents operation.
11758 </result>
11759
11760 </desc>
11761 </method>
11762
11763 <method name="onFloppyDriveChange">
11764 <desc>
11765 Triggered when settings of the floppy drive object of the
11766 associated virtual machine have changed.
11767
11768 <result name="VBOX_E_INVALID_VM_STATE">
11769 Session state prevents operation.
11770 </result>
11771 <result name="VBOX_E_INVALID_OBJECT_STATE">
11772 Session type prevents operation.
11773 </result>
11774
11775 </desc>
11776 </method>
11777
11778 <method name="onNetworkAdapterChange">
11779 <desc>
11780 Triggered when settings of a network adapter of the
11781 associated virtual machine have changed.
11782
11783 <result name="VBOX_E_INVALID_VM_STATE">
11784 Session state prevents operation.
11785 </result>
11786 <result name="VBOX_E_INVALID_OBJECT_STATE">
11787 Session type prevents operation.
11788 </result>
11789
11790 </desc>
11791 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11792 </method>
11793
11794 <method name="onSerialPortChange">
11795 <desc>
11796 Triggered when settings of a serial port of the
11797 associated virtual machine have changed.
11798
11799 <result name="VBOX_E_INVALID_VM_STATE">
11800 Session state prevents operation.
11801 </result>
11802 <result name="VBOX_E_INVALID_OBJECT_STATE">
11803 Session type prevents operation.
11804 </result>
11805
11806 </desc>
11807 <param name="serialPort" type="ISerialPort" dir="in"/>
11808 </method>
11809
11810 <method name="onParallelPortChange">
11811 <desc>
11812 Triggered when settings of a parallel port of the
11813 associated virtual machine have changed.
11814
11815 <result name="VBOX_E_INVALID_VM_STATE">
11816 Session state prevents operation.
11817 </result>
11818 <result name="VBOX_E_INVALID_OBJECT_STATE">
11819 Session type prevents operation.
11820 </result>
11821
11822 </desc>
11823 <param name="parallelPort" type="IParallelPort" dir="in"/>
11824 </method>
11825
11826 <method name="onVRDPServerChange">
11827 <desc>
11828 Triggered when settings of the VRDP server object of the
11829 associated virtual machine have changed.
11830
11831 <result name="VBOX_E_INVALID_VM_STATE">
11832 Session state prevents operation.
11833 </result>
11834 <result name="VBOX_E_INVALID_OBJECT_STATE">
11835 Session type prevents operation.
11836 </result>
11837
11838 </desc>
11839 </method>
11840
11841 <method name="onUSBControllerChange">
11842 <desc>
11843 Triggered when settings of the USB controller object of the
11844 associated virtual machine have changed.
11845
11846 <result name="VBOX_E_INVALID_VM_STATE">
11847 Session state prevents operation.
11848 </result>
11849 <result name="VBOX_E_INVALID_OBJECT_STATE">
11850 Session type prevents operation.
11851 </result>
11852
11853 </desc>
11854 </method>
11855
11856 <method name="onSharedFolderChange">
11857 <desc>
11858 Triggered when a permanent (global or machine) shared folder has been
11859 created or removed.
11860 <note>
11861 We don't pass shared folder parameters in this notification because
11862 the order in which parallel notifications are delivered is not defined,
11863 therefore it could happen that these parameters were outdated by the
11864 time of processing this notification.
11865 </note>
11866
11867 <result name="VBOX_E_INVALID_VM_STATE">
11868 Session state prevents operation.
11869 </result>
11870 <result name="VBOX_E_INVALID_OBJECT_STATE">
11871 Session type prevents operation.
11872 </result>
11873
11874 </desc>
11875 <param name="global" type="boolean" dir="in"/>
11876 </method>
11877
11878 <method name="onUSBDeviceAttach">
11879 <desc>
11880 Triggered when a request to capture a USB device (as a result
11881 of matched USB filters or direct call to
11882 <link to="IConsole::attachUSBDevice"/>) has completed.
11883 A @c null @a error object means success, otherwise it
11884 describes a failure.
11885
11886 <result name="VBOX_E_INVALID_VM_STATE">
11887 Session state prevents operation.
11888 </result>
11889 <result name="VBOX_E_INVALID_OBJECT_STATE">
11890 Session type prevents operation.
11891 </result>
11892
11893 </desc>
11894 <param name="device" type="IUSBDevice" dir="in"/>
11895 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11896 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11897 </method>
11898
11899 <method name="onUSBDeviceDetach">
11900 <desc>
11901 Triggered when a request to release the USB device (as a result
11902 of machine termination or direct call to
11903 <link to="IConsole::detachUSBDevice"/>) has completed.
11904 A @c null @a error object means success, otherwise it
11905
11906 <result name="VBOX_E_INVALID_VM_STATE">
11907 Session state prevents operation.
11908 </result>
11909 <result name="VBOX_E_INVALID_OBJECT_STATE">
11910 Session type prevents operation.
11911 </result>
11912
11913 </desc>
11914 <param name="id" type="uuid" dir="in"/>
11915 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11916 </method>
11917
11918 <method name="onShowWindow">
11919 <desc>
11920 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11921 <link to="IMachine::showConsoleWindow()"/> in order to notify
11922 console callbacks
11923 <link to="IConsoleCallback::onCanShowWindow()"/>
11924 and <link to="IConsoleCallback::onShowWindow()"/>.
11925
11926 <result name="VBOX_E_INVALID_OBJECT_STATE">
11927 Session type prevents operation.
11928 </result>
11929
11930 </desc>
11931 <param name="check" type="boolean" dir="in"/>
11932 <param name="canShow" type="boolean" dir="out"/>
11933 <param name="winId" type="unsigned long long" dir="out"/>
11934 </method>
11935
11936 <method name="accessGuestProperty">
11937 <desc>
11938 Called by <link to="IMachine::getGuestProperty()"/> and by
11939 <link to="IMachine::setGuestProperty()"/> in order to read and
11940 modify guest properties.
11941
11942 <result name="VBOX_E_INVALID_VM_STATE">
11943 Machine session is not open.
11944 </result>
11945 <result name="VBOX_E_INVALID_OBJECT_STATE">
11946 Session type is not direct.
11947 </result>
11948
11949 </desc>
11950 <param name="name" type="wstring" dir="in"/>
11951 <param name="value" type="wstring" dir="in"/>
11952 <param name="flags" type="wstring" dir="in"/>
11953 <param name="isSetter" type="boolean" dir="in"/>
11954 <param name="retValue" type="wstring" dir="out"/>
11955 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11956 <param name="retFlags" type="wstring" dir="out"/>
11957 </method>
11958
11959 <method name="enumerateGuestProperties">
11960 <desc>
11961 Return a list of the guest properties matching a set of patterns along
11962 with their values, time stamps and flags.
11963
11964 <result name="VBOX_E_INVALID_VM_STATE">
11965 Machine session is not open.
11966 </result>
11967 <result name="VBOX_E_INVALID_OBJECT_STATE">
11968 Session type is not direct.
11969 </result>
11970
11971 </desc>
11972 <param name="patterns" type="wstring" dir="in">
11973 <desc>
11974 The patterns to match the properties against as a comma-separated
11975 string. If this is empty, all properties currently set will be
11976 returned.
11977 </desc>
11978 </param>
11979 <param name="key" type="wstring" dir="out" safearray="yes">
11980 <desc>
11981 The key names of the properties returned.
11982 </desc>
11983 </param>
11984 <param name="value" type="wstring" dir="out" safearray="yes">
11985 <desc>
11986 The values of the properties returned. The array entries match the
11987 corresponding entries in the @a key array.
11988 </desc>
11989 </param>
11990 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11991 <desc>
11992 The time stamps of the properties returned. The array entries match
11993 the corresponding entries in the @a key array.
11994 </desc>
11995 </param>
11996 <param name="flags" type="wstring" dir="out" safearray="yes">
11997 <desc>
11998 The flags of the properties returned. The array entries match the
11999 corresponding entries in the @a key array.
12000 </desc>
12001 </param>
12002 </method>
12003
12004 </interface>
12005
12006 <interface
12007 name="ISession" extends="$dispatched"
12008 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12009 wsmap="managed"
12010 >
12011 <desc>
12012 The ISession interface represents a serialization primitive for virtual
12013 machines.
12014
12015 With VirtualBox, every time one wishes to manipulate a virtual machine
12016 (e.g. change its settings or start execution), a session object is
12017 required. Such an object must be passed to one of the session methods
12018 that open the given session, which then initiates the machine manipulation.
12019
12020 A session serves several purposes: it identifies to the inter-process VirtualBox
12021 code which process is currently working with the virtual machine, and it ensures
12022 that there are no incompatible requests from several processes for the
12023 same virtual machine. Session objects can therefore be thought of as mutex
12024 semaphores that lock virtual machines to prevent conflicting accesses from
12025 several processes.
12026
12027 How sessions objects are used depends on whether you use the Main API
12028 via COM or via the webservice:
12029
12030 <ul>
12031 <li>When using the COM API directly, an object of the Session class from the
12032 VirtualBox type library needs to be created. In regular COM C++ client code,
12033 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12034 This object will then act as a local session object in further calls to open
12035 a session.
12036 </li>
12037
12038 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12039 one session object automatically when <link to="IWebsessionManager::logon" />
12040 is called. A managed object reference to that session object can be retrieved by
12041 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12042 reference can then be used to open sessions.
12043 </li>
12044 </ul>
12045
12046 Sessions are mainly used in two variations:
12047
12048 <ul>
12049 <li>
12050 To start a virtual machine in a separate process, one would call
12051 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12052 object as its first parameter. This session then identifies the caller
12053 and lets him control the started machine (for example, pause machine
12054 execution or power it down) as well as be notified about machine
12055 execution state changes.
12056 </li>
12057
12058 <li>To alter machine settings, or to start machine execution within the
12059 current process, one needs to open a direct session for the machine first by
12060 calling <link to="IVirtualBox::openSession"/>. While a direct session
12061 is open within one process, no any other process may open another direct
12062 session for the same machine. This prevents the machine from being changed
12063 by other processes while it is running or while the machine is being configured.
12064 </li>
12065 </ul>
12066
12067 One also can attach to an existing direct session already opened by
12068 another process (for example, in order to send a control request to the
12069 virtual machine such as the pause or the reset request). This is done by
12070 calling <link to="IVirtualBox::openExistingSession"/>.
12071
12072 <note>
12073 Unless you are trying to write a new VirtualBox front-end that
12074 performs direct machine execution (like the VirtualBox or VBoxSDL
12075 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12076 session opened by <link to="IVirtualBox::openSession"/> and use this
12077 session only to change virtual machine settings. If you simply want to
12078 start virtual machine execution using one of the existing front-ends
12079 (for example the VirtualBox GUI or headless server), simply use
12080 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12081 will power up the machine automatically for you.
12082 </note>
12083 </desc>
12084
12085 <attribute name="state" type="SessionState" readonly="yes">
12086 <desc>Current state of this session.</desc>
12087 </attribute>
12088
12089 <attribute name="type" type="SessionType" readonly="yes">
12090 <desc>
12091 Type of this session. The value of this attribute is valid only
12092 if the session is currently open (i.e. its #state is
12093 SessionType_SessionOpen), otherwise an error will be returned.
12094 </desc>
12095 </attribute>
12096
12097 <attribute name="machine" type="IMachine" readonly="yes">
12098 <desc>Machine object associated with this session.</desc>
12099 </attribute>
12100
12101 <attribute name="console" type="IConsole" readonly="yes">
12102 <desc>Console object associated with this session.</desc>
12103 </attribute>
12104
12105 <method name="close">
12106 <desc>
12107 Closes a session that was previously opened.
12108
12109 It is recommended that every time an "open session" method (such as
12110 <link to="IVirtualBox::openRemoteSession" /> or
12111 <link to="IVirtualBox::openSession" />) has been called to
12112 manipulate a virtual machine, the caller invoke
12113 ISession::close() when it's done doing so. Since sessions are
12114 serialization primitives much like ordinary mutexes, they are
12115 best used the same way: for each "open" call, there should be
12116 a matching "close" call, even when errors occur.
12117
12118 Otherwise, if a direct session for a machine opened with
12119 <link to="IVirtualBox::openSession()"/> is not explicitly closed
12120 when the application terminates, the state of the machine will
12121 be set to <link to="MachineState_Aborted" /> on the server.
12122
12123 Generally, it is recommended to close all open sessions explicitly
12124 before terminating the application (regardless of the reason for
12125 the termination).
12126
12127 <note>
12128 Do not expect the session state (<link to="ISession::state" />
12129 to return to "Closed" immediately after you invoke
12130 ISession::close(), particularly if you have started a remote
12131 session to execute the VM in a new process. The session state will
12132 automatically return to "Closed" once the VM is no longer executing,
12133 which can of course take a very long time.
12134 </note>
12135
12136 <result name="E_UNEXPECTED">
12137 Session is not open.
12138 </result>
12139
12140 </desc>
12141 </method>
12142
12143 </interface>
12144
12145 <!--
12146 // ISATAController
12147 /////////////////////////////////////////////////////////////////////////
12148 -->
12149
12150 <interface
12151 name="ISATAController" extends="$unknown"
12152 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
12153 wsmap="managed"
12154 >
12155 <attribute name="enabled" type="boolean">
12156 <desc>
12157 Flag whether the SATA controller is present in the
12158 guest system. If disabled, the virtual guest hardware will
12159 not contain any SATA controller. Can only be changed when
12160 the VM is powered off.
12161 </desc>
12162 </attribute>
12163
12164 <attribute name="portCount" type="unsigned long">
12165 <desc>
12166 The number of usable ports on the SATA controller.
12167 It ranges from 1 to 30.
12168 </desc>
12169 </attribute>
12170
12171 <method name="GetIDEEmulationPort">
12172 <desc>
12173 Gets the corresponding port number which is emulated as an IDE device.
12174
12175 <result name="E_INVALIDARG">
12176 The @a devicePosition is not in the range 0 to 3.
12177 </result>
12178
12179 </desc>
12180 <param name="devicePosition" type="long" dir="in"/>
12181 <param name="portNumber" type="long" dir="return"/>
12182 </method>
12183
12184 <method name="SetIDEEmulationPort">
12185 <desc>
12186 Sets the port number which is emulated as an IDE device.
12187
12188 <result name="E_INVALIDARG">
12189 The @a devicePosition is not in the range 0 to 3 or the
12190 @a portNumber is not in the range 0 to 29.
12191 </result>
12192
12193 </desc>
12194 <param name="devicePosition" type="long" dir="in"/>
12195 <param name="portNumber" type="long" dir="in"/>
12196 </method>
12197
12198 </interface>
12199
12200<if target="wsdl">
12201
12202 <!--
12203 // IManagedObjectRef
12204 /////////////////////////////////////////////////////////////////////////
12205 -->
12206
12207 <interface
12208 name="IManagedObjectRef" extends="$unknown"
12209 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12210 internal="yes"
12211 wsmap="managed"
12212 wscpp="hardcoded"
12213 >
12214 <desc>
12215 Managed object reference.
12216
12217 Only within the webservice, a managed object reference (which is really
12218 an opaque number) allows a webservice client to address an object
12219 that lives in the address space of the webservice server.
12220
12221 Behind each managed object reference, there is a COM object that lives
12222 in the webservice server's address space. The COM object is not freed
12223 until the managed object reference is released, either by an explicit
12224 call to <link to="IManagedObjectRef::release" /> or by logging off from
12225 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12226 all objects created during the webservice session.
12227
12228 Whenever a method call of the VirtualBox API returns a COM object, the
12229 webservice representation of that method will instead return a
12230 managed object reference, which can then be used to invoke methods
12231 on that object.
12232 </desc>
12233
12234 <method name="getInterfaceName">
12235 <desc>
12236 Returns the name of the interface that this managed object represents,
12237 for example, "IMachine", as a string.
12238 </desc>
12239 <param name="return" type="wstring" dir="return"/>
12240 </method>
12241
12242 <method name="release">
12243 <desc>
12244 Releases this managed object reference and frees the resources that
12245 were allocated for it in the webservice server process. After calling
12246 this method, the identifier of the reference can no longer be used.
12247 </desc>
12248 </method>
12249
12250 </interface>
12251
12252 <!--
12253 // IWebsessionManager
12254 /////////////////////////////////////////////////////////////////////////
12255 -->
12256
12257 <interface
12258 name="IWebsessionManager" extends="$unknown"
12259 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12260 internal="yes"
12261 wsmap="global"
12262 wscpp="hardcoded"
12263 >
12264 <desc>
12265 Websession manager. This provides essential services
12266 to webservice clients.
12267 </desc>
12268 <method name="logon">
12269 <desc>
12270 Logs a new client onto the webservice and returns a managed object reference to
12271 the IVirtualBox instance, which the client can then use as a basis to further
12272 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12273 interface, in one way or the other.
12274 </desc>
12275 <param name="username" type="wstring" dir="in"/>
12276 <param name="password" type="wstring" dir="in"/>
12277 <param name="return" type="IVirtualBox" dir="return"/>
12278 </method>
12279
12280 <method name="getSessionObject">
12281 <desc>
12282 Returns a managed object reference to the internal ISession object that was created
12283 for this web service session when the client logged on.
12284
12285 <see>ISession</see>
12286 </desc>
12287 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12288 <param name="return" type="ISession" dir="return"/>
12289 </method>
12290
12291 <method name="logoff">
12292 <desc>
12293 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12294 and destroys all resources associated with the session (most importantly, all
12295 managed objects created in the server while the session was active).
12296 </desc>
12297 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12298 </method>
12299
12300 </interface>
12301
12302</if>
12303
12304 <!--
12305 // IPerformanceCollector & friends
12306 /////////////////////////////////////////////////////////////////////////
12307 -->
12308
12309 <interface
12310 name="IPerformanceMetric" extends="$unknown"
12311 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12312 >
12313 <desc>
12314 The IPerformanceMetric interface represents parameters of the given
12315 performance metric.
12316 </desc>
12317
12318 <attribute name="metricName" type="wstring" readonly="yes">
12319 <desc>
12320 Name of the metric.
12321 </desc>
12322 </attribute>
12323
12324 <attribute name="object" type="$unknown" readonly="yes">
12325 <desc>
12326 Object this metric belongs to.
12327 </desc>
12328 </attribute>
12329
12330 <attribute name="description" type="wstring" readonly="yes">
12331 <desc>
12332 Textual description of the metric.
12333 </desc>
12334 </attribute>
12335
12336 <attribute name="period" type="unsigned long" readonly="yes">
12337 <desc>
12338 Time interval between samples, measured in seconds.
12339 </desc>
12340 </attribute>
12341
12342 <attribute name="count" type="unsigned long" readonly="yes">
12343 <desc>
12344 Number of recent samples retained by the performance collector for this
12345 metric.
12346
12347 When the collected sample count exceeds this number, older samples
12348 are discarded.
12349 </desc>
12350 </attribute>
12351
12352 <attribute name="unit" type="wstring" readonly="yes">
12353 <desc>
12354 Unit of measurement.
12355 </desc>
12356 </attribute>
12357
12358 <attribute name="minimumValue" type="long" readonly="yes">
12359 <desc>
12360 Minimum possible value of this metric.
12361 </desc>
12362 </attribute>
12363
12364 <attribute name="maximumValue" type="long" readonly="yes">
12365 <desc>
12366 Maximum possible value of this metric.
12367 </desc>
12368 </attribute>
12369 </interface>
12370
12371 <interface
12372 name="IPerformanceCollector" extends="$unknown"
12373 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12374 wsmap="managed"
12375 >
12376 <desc>
12377 The IPerformanceCollector interface represents a service that collects and
12378 stores performance metrics data.
12379
12380 Performance metrics are associated with objects like IHost and
12381 IMachine. Each object has a distinct set of performance metrics.
12382 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12383
12384 Metric data are collected at the specified intervals and are retained
12385 internally. The interval and the number of samples retained can be set
12386 with <link to="IPerformanceCollector::setupMetrics" />.
12387
12388 Metrics are organized hierarchically, each level separated by slash (/).
12389 General scheme for metric name is
12390 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12391 metric name stands for: CPU category, Load metric, User submetric, average
12392 aggregate. An aggregate function is computed over all retained data. Valid
12393 aggregate functions are:
12394
12395 <ul>
12396 <li>avg -- average</li>
12397 <li>min -- minimum</li>
12398 <li>max -- maximum</li>
12399 </ul>
12400
12401 "Category/Metric" together form base metric name. A base metric is the
12402 smallest unit for which a sampling interval and the number of retained
12403 samples can be set. Only base metrics can be enabled and disabled. All
12404 sub-metrics are collected when their base metric is collected.
12405 Collected values for any set of sub-metrics can be queried with
12406 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12407 metric parameters, querying metric data, enabling or disabling metrics
12408 wildcards can be used in metric names to specify a subset of metrics. For
12409 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12410 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12411 values without aggregates <tt>*:</tt> can be used.
12412
12413 The valid names for base metrics are:
12414
12415 <ul>
12416 <li>CPU/Load</li>
12417 <li>CPU/MHz</li>
12418 <li>RAM/Usage</li>
12419 </ul>
12420
12421 The general sequence for collecting and retrieving the metrics is:
12422 <ul>
12423 <li>
12424 Obtain an instance of IPerformanceCollector with
12425 <link to="IVirtualBox::performanceCollector" />
12426 </li>
12427 <li>
12428 Allocate and populate an array with references to objects the metrics
12429 will be collected for. Use references to IHost and IMachine objects.
12430 </li>
12431 <li>
12432 Allocate and populate an array with base metric names the data will be
12433 collected for.
12434 </li>
12435 <li>
12436 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12437 metric data will be collected and stored.
12438 </li>
12439 <li>
12440 Wait for the data to get collected.
12441 </li>
12442 <li>
12443 Allocate and populate an array with references to objects the metric
12444 values will be queried for. You can re-use the object array used for
12445 setting base metrics.
12446 </li>
12447 <li>
12448 Allocate and populate an array with metric names the data will be
12449 collected for. Note that metric names differ from base metric names.
12450 </li>
12451 <li>
12452 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12453 have been collected so far are returned. Note that the values are still
12454 retained internally and data collection continues.
12455 </li>
12456 </ul>
12457
12458 For an example of usage refer to the following files in VirtualBox SDK:
12459 <ul>
12460 <li>
12461 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12462 </li>
12463 <li>
12464 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12465 </li>
12466 </ul>
12467 </desc>
12468
12469 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12470 <desc>
12471 Array of unique names of metrics.
12472
12473 This array represents all metrics supported by the performance
12474 collector. Individual objects do not necessarily support all of them.
12475 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12476 list of supported metrics for a particular object.
12477 </desc>
12478 </attribute>
12479
12480 <method name="getMetrics">
12481 <desc>
12482 Returns parameters of specified metrics for a set of objects.
12483 <note>
12484 @c Null metrics array means all metrics. @c Null object array means
12485 all existing objects.
12486 </note>
12487 </desc>
12488 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12489 <desc>
12490 Metric name filter. Currently, only a comma-separated list of metrics
12491 is supported.
12492 </desc>
12493 </param>
12494 <param name="objects" type="$unknown" dir="in" safearray="yes">
12495 <desc>
12496 Set of objects to return metric parameters for.
12497 </desc>
12498 </param>
12499 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12500 <desc>
12501 Array of returned metric parameters.
12502 </desc>
12503 </param>
12504 </method>
12505
12506 <method name="setupMetrics">
12507 <desc>
12508 Sets parameters of specified base metrics for a set of objects. Returns
12509 an array of <link to="IPerformanceMetric" /> describing the metrics have
12510 been affected.
12511 <note>
12512 @c Null or empty metric name array means all metrics. @c Null or empty
12513 object array means all existing objects. If metric name array contains
12514 a single element and object array contains many, the single metric
12515 name array element is applied to each object array element to form
12516 metric/object pairs.
12517 </note>
12518 </desc>
12519 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12520 <desc>
12521 Metric name filter. Comma-separated list of metrics with wildcard
12522 support.
12523 </desc>
12524 </param>
12525 <param name="objects" type="$unknown" dir="in" safearray="yes">
12526 <desc>
12527 Set of objects to setup metric parameters for.
12528 </desc>
12529 </param>
12530 <param name="period" type="unsigned long" dir="in">
12531 <desc>
12532 Time interval in seconds between two consecutive samples of performance
12533 data.
12534 </desc>
12535 </param>
12536 <param name="count" type="unsigned long" dir="in">
12537 <desc>
12538 Number of samples to retain in performance data history. Older samples
12539 get discarded.
12540 </desc>
12541 </param>
12542 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12543 <desc>
12544 Array of metrics that have been modified by the call to this method.
12545 </desc>
12546 </param>
12547 </method>
12548
12549 <method name="enableMetrics">
12550 <desc>
12551 Turns on collecting specified base metrics. Returns an array of
12552 <link to="IPerformanceMetric" /> describing the metrics have been
12553 affected.
12554 <note>
12555 @c Null or empty metric name array means all metrics. @c Null or empty
12556 object array means all existing objects. If metric name array contains
12557 a single element and object array contains many, the single metric
12558 name array element is applied to each object array element to form
12559 metric/object pairs.
12560 </note>
12561 </desc>
12562 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12563 <desc>
12564 Metric name filter. Comma-separated list of metrics with wildcard
12565 support.
12566 </desc>
12567 </param>
12568 <param name="objects" type="$unknown" dir="in" safearray="yes">
12569 <desc>
12570 Set of objects to enable metrics for.
12571 </desc>
12572 </param>
12573 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12574 <desc>
12575 Array of metrics that have been modified by the call to this method.
12576 </desc>
12577 </param>
12578 </method>
12579
12580 <method name="disableMetrics">
12581 <desc>
12582 Turns off collecting specified base metrics. Returns an array of
12583 <link to="IPerformanceMetric" /> describing the metrics have been
12584 affected.
12585 <note>
12586 @c Null or empty metric name array means all metrics. @c Null or empty
12587 object array means all existing objects. If metric name array contains
12588 a single element and object array contains many, the single metric
12589 name array element is applied to each object array element to form
12590 metric/object pairs.
12591 </note>
12592 </desc>
12593 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12594 <desc>
12595 Metric name filter. Comma-separated list of metrics with wildcard
12596 support.
12597 </desc>
12598 </param>
12599 <param name="objects" type="$unknown" dir="in" safearray="yes">
12600 <desc>
12601 Set of objects to disable metrics for.
12602 </desc>
12603 </param>
12604 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12605 <desc>
12606 Array of metrics that have been modified by the call to this method.
12607 </desc>
12608 </param>
12609 </method>
12610
12611 <method name="queryMetricsData">
12612 <desc>
12613 Queries collected metrics data for a set of objects.
12614
12615 The data itself and related metric information are returned in seven
12616 parallel and one flattened array of arrays. Elements of
12617 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12618 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12619 the same index describe one set of values corresponding to a single
12620 metric.
12621
12622 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12623 start and length of a sub-array is indicated by
12624 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12625 value for metric <tt>metricNames[i]</tt> is at
12626 <tt>returnData[returnIndices[i]]</tt>.
12627
12628 <note>
12629 @c Null or empty metric name array means all metrics. @c Null or empty
12630 object array means all existing objects. If metric name array contains
12631 a single element and object array contains many, the single metric
12632 name array element is applied to each object array element to form
12633 metric/object pairs.
12634 </note>
12635 <note>
12636 Data collection continues behind the scenes after call to @c
12637 queryMetricsData. The return data can be seen as the snapshot of
12638 the current state at the time of @c queryMetricsData call. The
12639 internally kept metric values are not cleared by the call. This makes
12640 possible querying different subsets of metrics or aggregates with
12641 subsequent calls. If periodic querying is needed it is highly
12642 suggested to query the values with @c interval*count period to avoid
12643 confusion. This way a completely new set of data values will be
12644 provided by each query.
12645 </note>
12646 </desc>
12647 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12648 <desc>
12649 Metric name filter. Comma-separated list of metrics with wildcard
12650 support.
12651 </desc>
12652 </param>
12653 <param name="objects" type="$unknown" dir="in" safearray="yes">
12654 <desc>
12655 Set of objects to query metrics for.
12656 </desc>
12657 </param>
12658 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12659 <desc>
12660 Names of metrics returned in @c returnData.
12661 </desc>
12662 </param>
12663 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12664 <desc>
12665 Objects associated with metrics returned in @c returnData.
12666 </desc>
12667 </param>
12668 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12669 <desc>
12670 Units of measurement for each returned metric.
12671 </desc>
12672 </param>
12673 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12674 <desc>
12675 Divisor that should be applied to return values in order to get
12676 floating point values. For example:
12677 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12678 will retrieve the floating point value of i-th sample of the first
12679 metric.
12680 </desc>
12681 </param>
12682 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12683 <desc>
12684 Sequence numbers of the first elements of value sequences of particular metrics
12685 returned in @c returnData. For aggregate metrics it is the sequence number of
12686 the sample the aggregate started calculation from.
12687 </desc>
12688 </param>
12689 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12690 <desc>
12691 Indices of the first elements of value sequences of particular metrics
12692 returned in @c returnData.
12693 </desc>
12694 </param>
12695 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12696 <desc>
12697 Lengths of value sequences of particular metrics.
12698 </desc>
12699 </param>
12700 <param name="returnData" type="long" dir="return" safearray="yes">
12701 <desc>
12702 Flattened array of all metric data containing sequences of values for
12703 each metric.
12704 </desc>
12705 </param>
12706 </method>
12707
12708 </interface>
12709
12710 <module name="VBoxSVC" context="LocalServer">
12711 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12712 namespace="virtualbox.org">
12713 <interface name="IVirtualBox" default="yes"/>
12714 </class>
12715 </module>
12716
12717 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12718 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12719 namespace="virtualbox.org">
12720 <interface name="ISession" default="yes"/>
12721 </class>
12722 </module>
12723
12724</library>
12725
12726</idl>
12727
12728<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use