VirtualBox

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

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

Main/XIDL: Added MachineState_FirstOnline and LastOnline pseudo-states. Added MachineState diagrams and detailed description. Fixed enum references.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 436.5 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 15282 2008-12-10 23:35:43Z vboxsync $ *
5 *
6 * :tabSize=2:indentSize=2:noTabs=true:
7 * :folding=explicit:collapseFolds=1:
8 *
9 * Master declaration for VirtualBox's Main API, represented
10 * by COM/XPCOM and web service interfaces.
11 *
12 * From this document, the build system generates several files
13 * via XSLT that are then used during the build process.
14 *
15 * Below is the list of XSL templates that operate on this file and
16 * output files they generate. These XSL templates must be updated
17 * whenever the schema of this file changes:
18 *
19 * 1. src/VBox/Main/idl/midl.xsl =>
20 * out/<platform>/bin/sdk/idl/VirtualBox.idl
21 * (MS COM interface definition file for Main API)
22 *
23 * 2. src/VBox/Main/idl/xpidl.xsl =>
24 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
25 * (XPCOM interface definition file for Main API)
26 *
27 * 3. src/VBox/Main/idl/doxygen.xsl =>
28 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
29 * (pseudo-IDL for Doxygen to generate the official Main API
30 * documentation)
31 *
32 * 4. src/VBox/Main/webservice/*.xsl =>
33 * a bunch of WSDL and C++ files
34 * (VirtualBox web service sources and SOAP mappers;
35 * see src/VBox/Main/webservice/Makefile.kmk for details)
36 *
37 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
38 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
39 * (smart Qt-based C++ wrapper classes for COM interfaces
40 * of the Main API)
41 *
42 * 6. src/VBox/Frontends/VirtualBox4/include/COMWrappers.xsl =>
43 * out/<platform>/obj/src/VBox/Frontends/VirtualBox4/VirtualBox/include/COMWrappers.h
44 * (smart Qt-based C++ wrapper classes for COM interfaces
45 * of the Main API)
46 *
47 * 7. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
48 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
49 * (Main API TypeLib block for the WiX installer)
50 *
51 * 8. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
52 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
53 * (<result> extraction for the %Rhrc format specifier)
54 *
55 Copyright (C) 2006-2008 Sun Microsystems, Inc.
56
57 This file is part of VirtualBox Open Source Edition (OSE), as
58 available from http://www.virtualbox.org. This file is free software;
59 you can redistribute it and/or modify it under the terms of the GNU
60 General Public License (GPL) as published by the Free Software
61 Foundation, in version 2 as it comes in the "COPYING" file of the
62 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
63 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
64
65 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
66 Clara, CA 95054 USA or visit http://www.sun.com if you need
67 additional information or have any questions.
68-->
69
70<idl>
71
72<desc>
73 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
74 describes the so-called <i>VirtualBox Main API</i> which comprises all public
75 COM interfaces and components provided by the VirtualBox server and by the
76 VirtualBox client library.
77
78 VirtualBox employs a client-server design, meaning that whenever any part of
79 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
80 interface or any virtual machine --, a dedicated server process named
81 VBoxSVC runs in the background. This allows multiple processes working with
82 VirtualBox to cooperate without conflicts. These processes communicate to each
83 other using inter-process communication facilities provided by the COM
84 implementation of the host computer.
85
86 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
87 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
88 implementation, is used.
89
90 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
91 the VBoxManage command-line interface and the VBoxVRDP server) are technically
92 front-ends to the Main API and only use the interfaces that are documented
93 in this Main API documentation. This ensures that, with any given release
94 version of VirtualBox, all capabilities of the product that could be useful
95 to an external client program are always exposed by way of this API.
96
97 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
98 contains two public component classes:
99 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
100 implement IVirtualBox and ISession interfaces respectively. These two classes
101 are of supreme importance and will be needed in order for any front-end
102 program to do anything useful. It is recommended to read the documentation of
103 the mentioned interfaces first.
104
105 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
106 there can be only one object of this class on the local machine at any given
107 time. This object is a parent of many other objects in the VirtualBox COM
108 library and lives in the VBoxSVC process. In fact, when you create an instance
109 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
110 process is already running, starts it if not, and returns you a reference to
111 the<tt>VirtualBox</tt> object created in this process. When the last reference
112 to this object is released, the VBoxSVC process ends (with a 5 second delay to
113 protect from too frequent restarts).
114
115 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
116 as many <tt>Session</tt> objects as you need but all of them will live in a
117 process which issues the object instantiation call. <tt>Session</tt> objects
118 represent virtual machine sessions which are used to configure virtual
119 machines and control their execution.
120</desc>
121
122<if target="midl">
123 <cpp line="enum {"/>
124 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
125 <cpp line=" kTypeLibraryMinorVersion = 0"/>
126 <cpp line="};"/>
127</if>
128
129<if target="xpidl">
130 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
131 <cpp>
132/* currently, nsISupportsImpl.h lacks the below-like macros */
133
134#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
135#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
142 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
150 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
151#endif
152
153#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
154# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
155 NS_INTERFACE_MAP_BEGIN(_class) \
156 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
157 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
158 NS_IMPL_QUERY_CLASSINFO(_class) \
159 NS_INTERFACE_MAP_END
160#endif
161
162#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
163# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
164 _i2, _ic2) \
165 NS_INTERFACE_MAP_BEGIN(_class) \
166 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
167 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
169 NS_IMPL_QUERY_CLASSINFO(_class) \
170 NS_INTERFACE_MAP_END
171#endif
172
173#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
174#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
175
176#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
177# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
178 NS_IMPL_THREADSAFE_ADDREF(_class) \
179 NS_IMPL_THREADSAFE_RELEASE(_class) \
180 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
181 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
182#endif
183
184#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
185# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
186 _i2, _ic2) \
187 NS_IMPL_THREADSAFE_ADDREF(_class) \
188 NS_IMPL_THREADSAFE_RELEASE(_class) \
189 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
190 _i2, _ic2) \
191 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
192#endif
193 </cpp>
194</if>
195
196<library
197 name="VirtualBox"
198 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
199 version="1.3"
200 desc="VirtualBox Type Library"
201 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
202 supportsErrorInfo="yes"
203>
204
205
206 <!--
207 // COM result codes for VirtualBox
208 /////////////////////////////////////////////////////////////////////////
209 -->
210
211 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
212 <desc>
213 This section describes all VirtualBox-specific COM result codes that may
214 be returned by methods of VirtualBox COM interfaces in addition to
215 standard COM result codes.
216
217 Note that along with the result code, every VirtualBox method returns
218 extended error information through the IVirtualBoxErrorInfo interface on
219 failure. This interface is a preferred way to present the error to the end
220 user because it contains a human readable description of the error. Raw
221 result codes, both standard and described in this section, are intended to
222 be used by programs to analyze the reason of a failure and select an
223 appropriate course of action without involving the end user (for example,
224 retry the operation later or make a different call).
225
226 The standard COM result codes that may originate from our methods include:
227
228 <table>
229 <tr><td>E_INVALIDARG</td>
230 <td>
231 Returned when the value of the method's argument is not within the range
232 of valid values. This should not be confused with situations when the
233 value is within the range but simply doesn't suit the current object
234 state and there is a possibility that it will be accepted later (in such
235 cases VirtualBox-specific codes are returned, for example,
236 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
237 </td>
238 </tr>
239 <tr><td>E_POINTER</td>
240 <td>
241 Returned if a memory pointer for the output argument is invalid (for
242 example, <tt>NULL</tt>). Note that when pointers representing input
243 arguments (such as strings) are invalid, E_INVALIDARG is returned.
244 </td>
245 </tr>
246 <tr><td>E_ACCESSDENIED</td>
247 <td>
248 Returned when the called object is not ready. Since the lifetime of a
249 public COM object cannot be fully controlled by the implementation,
250 VirtualBox maintains the readiness state for all objects it creates and
251 returns this code in response to any method call on the object that was
252 deactivated by VirtualBox and is not functioning any more.
253 </td>
254 </tr>
255 <tr><td>E_OUTOFMEMORY</td>
256 <td>
257 Returned when a memory allocation operation fails.
258 </td>
259 </tr>
260 </table>
261 </desc>
262 </descGroup>
263
264 <!--
265 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
266 everything in <result>/<desc> after (and including) the first dot, so express
267 the matter of the error code in the first sentence and keep it short.
268 -->
269
270 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
271 <desc>
272 Object corresponding to the supplied arguments does not exist.
273 </desc>
274 </result>
275
276 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
277 <desc>
278 Current virtual machine state prevents the operation.
279 </desc>
280 </result>
281
282 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
283 <desc>
284 Virtual machine error occurred attempting the operation.
285 </desc>
286 </result>
287
288 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
289 <desc>
290 File not accessible or erroneous file contents.
291 </desc>
292 </result>
293
294 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
295 <desc>
296 Runtime subsystem error.
297 </desc>
298 </result>
299
300 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
301 <desc>
302 Pluggable Device Manager error.
303 </desc>
304 </result>
305
306 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
307 <desc>
308 Current object state prohibits operation.
309 </desc>
310 </result>
311
312 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
313 <desc>
314 Host operating system related error.
315 </desc>
316 </result>
317
318 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
319 <desc>
320 Requested operation is not supported.
321 </desc>
322 </result>
323
324 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
325 <desc>
326 Invalid XML found.
327 </desc>
328 </result>
329
330 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
331 <desc>
332 Current session state prohibits operation.
333 </desc>
334 </result>
335
336 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
337 <desc>
338 Object being in use prohibits operation.
339 </desc>
340 </result>
341
342 <!--
343 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
344 everything in <result>/<desc> after (and including) the first dot, so express
345 the matter of the error code in the first sentence and keep it short.
346 -->
347
348 <descGroup/>
349
350 <!--
351 // all common enums
352 /////////////////////////////////////////////////////////////////////////
353 -->
354
355 <enum
356 name="TSBool"
357 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
358 >
359 <desc>
360 Boolean variable having a third state, default.
361 </desc>
362
363 <const name="False" value="0"/>
364 <const name="True" value="1"/>
365 <const name="Default" value="2"/>
366 </enum>
367
368 <enum
369 name="MachineState"
370 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
371 >
372 <desc>
373 Virtual machine execution state.
374
375 This enumeration represents possible values of the <link
376 to="IMachine::state"/> attribute.
377
378 Below is the basic virtual machine state diagram. It shows how the state
379 changes during virtual machine execution. The text in square braces shows
380 a method of the IConsole interface that performs the given state
381 transition.
382
383 <pre>
384 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
385 V |
386 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
387 | | | | V |
388 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
389 | | ^ | ^ |
390 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
391 | ^ | | | |
392 | | +-----------------------------------------+-|-------------------+ +
393 | | | | |
394 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
395 | | | |
396 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
397 | | |
398 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
399 </pre>
400
401 Note that states to the left from PoweredOff, Aborted and Saved in the
402 above diagram are called <i>online VM states</i>. These states
403 represent the virtual machine which is being executed in a dedicated
404 process (usually with a GUI window attached to it where you can see the
405 activity of the virtual machine and interact with it). There are two
406 special pseudo-states, FirstOnline and LastOnline, that can be used in
407 relational expressions to detect if the given machine state is online or
408 not:
409
410 <pre>
411 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
412 machine.GetState() &lt;= MachineState_LastOnline)
413 {
414 ...the machine is being executed...
415 }
416 </pre>
417
418 When the virtual machine is on one of the online VM states (that is, being
419 executed), only a few machine settings can be modified. Methods working
420 with such settings contain an explicit note about that. An attempt to
421 change any oter setting or perform a modifying operation during this time
422 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
423
424 All online states except Running, Paused and Stuck are transitional: they
425 represent a temporary condition of the virtual machine that will not last
426 too long.
427
428 The Stuck state is a special one. It means that execution of the machine
429 has reached the "Guru Meditation" condition. This condition indicates an
430 internal VMM (virtual machine manager) failure which may happen as a
431 result of either an unhandled low-level virtual hardware exception or one
432 of the recompiler exceptions (such as the <i>too-many-traps</i>
433 condition).
434
435 Note also that any online VM state may transit to the Aborted state. This
436 happens if the process that is executing the virtual machine terminates
437 unexpectedly (for example, crashes). Other than that, the Aborted state is
438 equivalent to PoweredOff.
439
440 There are also a few additional state diagrams that do not deal with
441 virtual machine execution and therefore are shown separately. The states
442 shown on these diagrams are called <i>offline VM states</i> (this includes
443 PoweredOff, Aborted and Saved too).
444
445 The first diagram shows what happens whan a lengthy setup operation is
446 being executed (such as <link to="IMachine::attachHardDisk2()"/>).
447
448 <pre>
449 +-----------------------------------(same sate as before the call)------+
450 | |
451 +-&gt; PoweredOff --+ |
452 | | |
453 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
454 | |
455 +-&gt; Saved -------+
456 </pre>
457
458 The next two diagrams demonstrate the process of taking a snapshot of a
459 powered off virtual machine and performing one of the "discard..."
460 operations, respectively.
461
462 <pre>
463 +-----------------------------------(same sate as before the call)------+
464 | |
465 +-&gt; PoweredOff --+ |
466 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
467 +-&gt; Aborted -----+
468
469 +-&gt; PoweredOff --+
470 | |
471 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
472 | | [discardCurrentState()] |
473 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
474 | |
475 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
476 </pre>
477
478 Note that the Saving state is present in both the offline state group and
479 online state group. Currently, the only way to determine what group is
480 assumed in a particular case is to remember the previous machine state: if
481 it was Running or Paused, then Saving is an online state, otherwise it is
482 an offline state. This inconsistency may be removed in one of the future
483 versions of VirtualBox by adding a new state.
484 </desc>
485
486 <const name="Null" value="0">
487 <desc>Null value (nver used by the API).</desc>
488 </const>
489 <const name="PoweredOff" value="1">
490 <desc>
491 The machine is not running.
492 </desc>
493 </const>
494 <const name="Saved" value="2">
495 <desc>
496 The machine is not currently running, but the execution state of the machine
497 has been saved to an external file when it was running.
498 </desc>
499 </const>
500 <const name="Aborted" value="3">
501 <desc>
502 The process running the machine has terminated abnormally.
503 </desc>
504 </const>
505 <const name="Running" value="4">
506 <desc>
507 The machine is currently being executed.
508 <note internal="yes">
509 For whoever decides to touch this enum: In order to keep the
510 comparisons in the source code valid, this state must immediately
511 precede the Paused state.
512 </note>
513 </desc>
514 </const>
515 <const name="Paused" value="5">
516 <desc>
517 Execution of the machine has been paused.
518 <note internal="yes">
519 For whoever decides to touch this enum: In order to keep the
520 comparisons in the source code valid, this state must immediately
521 follow the Running state.
522 </note>
523 </desc>
524 </const>
525 <const name="Stuck" value="6">
526 <desc>
527 Execution of the machine has reached the "Guru Meditation"
528 condition.
529 </desc>
530 </const>
531 <const name="Starting" value="7">
532 <desc>
533 Machine is being started after powering it on from a
534 zero execution state.
535 </desc>
536 </const>
537 <const name="Stopping" value="8">
538 <desc>
539 Machine is being normally stopped powering it off, or after the guest OS
540 has initiated a shutdown sequence.
541 </desc>
542 </const>
543 <const name="Saving" value="9">
544 <desc>
545 Machine is saving its execution state to a file or an online
546 snapshot of the machine is being taken.
547 </desc>
548 </const>
549 <const name="Restoring" value="10">
550 <desc>
551 Execution state of the machine is being restored from a file
552 after powering it on from the saved execution state.
553 </desc>
554 </const>
555 <const name="Discarding" value="11">
556 <desc>
557 Snapshot of the machine is being discarded.
558 </desc>
559 </const>
560 <const name="SettingUp" value="12">
561 <desc>
562 Lengthy setup operation is in progress.
563 </desc>
564 </const>
565
566 <const name="FirstOnline" value="4"> <!-- Running -->
567 <desc>
568 Pseudo-state: first online state (for use in relational expressions).
569 <note internal="yes">
570 For whoever decides to touch this enum: In order to keep the
571 comparisons involving FirstOnline and LastOnline pseudo-states valid,
572 the numeric values of these states must be correspondingly updated if
573 needed: for any online VM state, the condition
574 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
575 <tt>true</tt>.
576 </note>
577 </desc>
578 </const>
579 <const name="LastOnline" value="10"> <!-- Restoring -->
580 <desc>
581 Pseudo-state: last online state (for use in relational expressions).
582 <note internal="yes">
583 For whoever decides to touch this enum: In order to keep the
584 comparisons involving FirstOnline and LastOnline pseudo-states valid,
585 the numeric values of these states must be correspondingly updated if
586 needed: for any online VM state, the condition
587 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
588 <tt>true</tt>.
589 </note>
590 </desc>
591 </const>
592
593 </enum>
594
595 <enum
596 name="SessionState"
597 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
598 >
599 <desc>
600 Session state. This enumeration represents possible values of
601 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
602 attributes. See individual enumerator descriptions for the meaning for
603 every value.
604 </desc>
605
606 <const name="Null" value="0">
607 <desc>Null value (never used by the API).</desc>
608 </const>
609 <const name="Closed" value="1">
610 <desc>
611 The machine has no open sessions (<link to="IMachine::sessionState"/>);
612 the session is closed (<link to="ISession::state"/>)
613 </desc>
614 </const>
615 <const name="Open" value="2">
616 <desc>
617 The machine has an open direct session (<link to="IMachine::sessionState"/>);
618 the session is open (<link to="ISession::state"/>)
619 </desc>
620 </const>
621 <const name="Spawning" value="3">
622 <desc>
623 A new (direct) session is being opened for the machine
624 as a result of <link to="IVirtualBox::openRemoteSession()"/>
625 call (<link to="IMachine::sessionState"/>);
626 the session is currently being opened
627 as a result of <link to="IVirtualBox::openRemoteSession()"/>
628 call (<link to="ISession::state"/>)
629 </desc>
630 </const>
631 <const name="Closing" value="4">
632 <desc>
633 The direct session is being closed (<link to="IMachine::sessionState"/>);
634 the session is being closed (<link to="ISession::state"/>)
635 </desc>
636 </const>
637 </enum>
638
639 <enum
640 name="SessionType"
641 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
642 >
643 <desc>
644 Session type. This enumeration represents possible values of the
645 <link to="ISession::type"/> attribute.
646 </desc>
647
648 <const name="Null" value="0">
649 <desc>Null value (never used by the API).</desc>
650 </const>
651 <const name="Direct" value="1">
652 <desc>
653 Direct session
654 (opened by <link to="IVirtualBox::openSession()"/>)
655 </desc>
656 </const>
657 <const name="Remote" value="2">
658 <desc>
659 Remote session
660 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
661 </desc>
662 </const>
663 <const name="Existing" value="3">
664 <desc>
665 Existing session
666 (opened by <link to="IVirtualBox::openExistingSession()"/>)
667 </desc>
668 </const>
669 </enum>
670
671 <enum
672 name="DeviceType"
673 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
674 >
675 <desc>
676 Device type.
677 </desc>
678 <const name="Null" value="0">
679 <desc>
680 Null value, may also mean "no device" (not allowed for
681 <link to="IConsole::getDeviceActivity"/>).
682 </desc>
683 </const>
684 <const name="Floppy" value="1">
685 <desc>Floppy device.</desc>
686 </const>
687 <const name="DVD" value="2">
688 <desc>CD/DVD-ROM device.</desc>
689 </const>
690 <const name="HardDisk" value="3">
691 <desc>Hard disk device.</desc>
692 </const>
693 <const name="Network" value="4">
694 <desc>Network device.</desc>
695 </const>
696 <const name="USB" value="5">
697 <desc>USB device.</desc>
698 </const>
699 <const name="SharedFolder" value="6">
700 <desc>Shared folder device.</desc>
701 </const>
702 </enum>
703
704 <enum
705 name="DeviceActivity"
706 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
707 >
708 <desc>
709 Device activity for <link to="IConsole::getDeviceActivity"/>.
710 </desc>
711
712 <const name="Null" value="0"/>
713 <const name="Idle" value="1"/>
714 <const name="Reading" value="2"/>
715 <const name="Writing" value="3"/>
716 </enum>
717
718 <enum
719 name="StorageBus"
720 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
721 >
722 <desc>Interface bus type for storage devices.</desc>
723
724 <const name="Null" value="0">
725 <desc>Null value (never used by the API).</desc>
726 </const>
727
728 <const name="IDE" value="1"/>
729 <const name="SATA" value="2"/>
730 </enum>
731
732 <enum
733 name="ClipboardMode"
734 uuid="33364716-4008-4701-8f14-be0fa3d62950"
735 >
736 <desc>
737 Host-Guest clipboard interchange mode.
738 </desc>
739
740 <const name="Disabled" value="0"/>
741 <const name="HostToGuest" value="1"/>
742 <const name="GuestToHost" value="2"/>
743 <const name="Bidirectional" value="3"/>
744 </enum>
745
746 <enum
747 name="Scope"
748 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
749 >
750 <desc>
751 Scope of the operation.
752
753 A generic enumeration used in various methods to define the action or
754 argument scope.
755 </desc>
756
757 <const name="Global" value="0"/>
758 <const name="Machine" value="1"/>
759 <const name="Session" value="2"/>
760 </enum>
761
762 <enum
763 name="GuestStatisticType"
764 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
765 >
766 <desc>
767 Statistics type for <link to="IGuest::getStatistic"/>.
768 </desc>
769
770 <const name="CPULoad_Idle" value="0">
771 <desc>
772 Idle CPU load (0-100%) for last interval.
773 </desc>
774 </const>
775 <const name="CPULoad_Kernel" value="1">
776 <desc>
777 Kernel CPU load (0-100%) for last interval.
778 </desc>
779 </const>
780 <const name="CPULoad_User" value="2">
781 <desc>
782 User CPU load (0-100%) for last interval.
783 </desc>
784 </const>
785 <const name="Threads" value="3">
786 <desc>
787 Total number of threads in the system.
788 </desc>
789 </const>
790 <const name="Processes" value="4">
791 <desc>
792 Total number of processes in the system.
793 </desc>
794 </const>
795 <const name="Handles" value="5">
796 <desc>
797 Total number of handles in the system.
798 </desc>
799 </const>
800 <const name="MemoryLoad" value="6">
801 <desc>
802 Memory load (0-100%).
803 </desc>
804 </const>
805 <const name="PhysMemTotal" value="7">
806 <desc>
807 Total physical memory in megabytes.
808 </desc>
809 </const>
810 <const name="PhysMemAvailable" value="8">
811 <desc>
812 Free physical memory in megabytes.
813 </desc>
814 </const>
815 <const name="PhysMemBalloon" value="9">
816 <desc>
817 Ballooned physical memory in megabytes.
818 </desc>
819 </const>
820 <const name="MemCommitTotal" value="10">
821 <desc>
822 Total amount of memory in the committed state in megabytes.
823 </desc>
824 </const>
825 <const name="MemKernelTotal" value="11">
826 <desc>
827 Total amount of memory used by the guest OS's kernel in megabytes.
828 </desc>
829 </const>
830 <const name="MemKernelPaged" value="12">
831 <desc>
832 Total amount of paged memory used by the guest OS's kernel in megabytes.
833 </desc>
834 </const>
835 <const name="MemKernelNonpaged" value="13">
836 <desc>
837 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
838 </desc>
839 </const>
840 <const name="MemSystemCache" value="14">
841 <desc>
842 Total amount of memory used by the guest OS's system cache in megabytes.
843 </desc>
844 </const>
845 <const name="PageFileSize" value="15">
846 <desc>
847 Pagefile size in megabytes.
848 </desc>
849 </const>
850 <const name="SampleNumber" value="16">
851 <desc>
852 Statistics sample number
853 </desc>
854 </const>
855 <const name="MaxVal" value="17"/>
856 </enum>
857
858 <enum
859 name="BIOSBootMenuMode"
860 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
861 >
862 <desc>
863 BIOS boot menu mode.
864 </desc>
865
866 <const name="Disabled" value="0"/>
867 <const name="MenuOnly" value="1"/>
868 <const name="MessageAndMenu" value="2"/>
869 </enum>
870
871 <enum
872 name="IDEControllerType"
873 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
874 >
875 <desc>
876 IDE controller type.
877 </desc>
878
879 <const name="Null" value="0">
880 <desc>Null value (never used by the API).</desc>
881 </const>
882 <const name="PIIX3" value="1"/>
883 <const name="PIIX4" value="2"/>
884 </enum>
885
886 <enum
887 name="DriveState"
888 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
889 >
890 <const name="Null" value="0">
891 <desc>Null value (never used by the API).</desc>
892 </const>
893 <const name="NotMounted" value="1"/>
894 <const name="ImageMounted" value="2"/>
895 <const name="HostDriveCaptured" value="3"/>
896 </enum>
897
898 <enum
899 name="ProcessorFeature"
900 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
901 >
902 <desc>
903 CPU features.
904 </desc>
905
906 <const name="HWVirtEx" value="0"/>
907 <const name="PAE" value="1"/>
908 <const name="LongMode" value="2"/>
909 </enum>
910
911
912 <!--
913 // IVirtualBoxErrorInfo
914 /////////////////////////////////////////////////////////////////////////
915 -->
916
917 <interface
918 name="IVirtualBoxErrorInfo" extends="$errorinfo"
919 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
920 supportsErrorInfo="no"
921 wsmap="suppress"
922 >
923 <desc>
924 The IVirtualBoxErrorInfo interface represents extended error information.
925
926 Extended error information can be set by VirtualBox components after
927 unsuccessful or partially successful method invocation. This information
928 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
929 and then shown to the client in addition to the plain 32-bit result code.
930
931 In MS COM, this interface extends the IErrorInfo interface,
932 in XPCOM, it extends the nsIException interface. In both cases,
933 it provides a set of common attributes to retrieve error
934 information.
935
936 Sometimes invocation of some component's method may involve methods of
937 other components that may also fail (independently of this method's
938 failure), or a series of non-fatal errors may precede a fatal error that
939 causes method failure. In cases like that, it may be desirable to preserve
940 information about all errors happened during method invocation and deliver
941 it to the caller. The <link to="#next"/> attribute is intended
942 specifically for this purpose and allows to represent a chain of errors
943 through a single IVirtualBoxErrorInfo object set after method invocation.
944
945 Note that errors are stored to a chain in the reverse order, i.e. the
946 initial error object you query right after method invocation is the last
947 error set by the callee, the object it points to in the @a next attribute
948 is the previous error and so on, up to the first error (which is the last
949 in the chain).
950 </desc>
951
952 <attribute name="resultCode" type="result" readonly="yes">
953 <desc>
954 Result code of the error.
955 Usually, it will be the same as the result code returned
956 by the method that provided this error information, but not
957 always. For example, on Win32, CoCreateInstance() will most
958 likely return E_NOINTERFACE upon unsuccessful component
959 instantiation attempt, but not the value the component factory
960 returned.
961 <note>
962 In MS COM, there is no equivalent.
963 In XPCOM, it is the same as nsIException::result.
964 </note>
965 </desc>
966 </attribute>
967
968 <attribute name="interfaceID" type="uuid" readonly="yes">
969 <desc>
970 UUID of the interface that defined the error.
971 <note>
972 In MS COM, it is the same as IErrorInfo::GetGUID.
973 In XPCOM, there is no equivalent.
974 </note>
975 </desc>
976 </attribute>
977
978 <attribute name="component" type="wstring" readonly="yes">
979 <desc>
980 Name of the component that generated the error.
981 <note>
982 In MS COM, it is the same as IErrorInfo::GetSource.
983 In XPCOM, there is no equivalent.
984 </note>
985 </desc>
986 </attribute>
987
988 <attribute name="text" type="wstring" readonly="yes">
989 <desc>
990 Text description of the error.
991 <note>
992 In MS COM, it is the same as IErrorInfo::GetDescription.
993 In XPCOM, it is the same as nsIException::message.
994 </note>
995 </desc>
996 </attribute>
997
998 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
999 <desc>
1000 Next error object if there is any, or @c null otherwise.
1001 <note>
1002 In MS COM, there is no equivalent.
1003 In XPCOM, it is the same as nsIException::inner.
1004 </note>
1005 </desc>
1006 </attribute>
1007
1008 </interface>
1009
1010
1011 <!--
1012 // IVirtualBox
1013 /////////////////////////////////////////////////////////////////////////
1014 -->
1015
1016 <interface
1017 name="IVirtualBoxCallback" extends="$unknown"
1018 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1019 wsmap="suppress"
1020 >
1021 <method name="onMachineStateChange">
1022 <desc>
1023 The execution state of the given machine has changed.
1024 <see>IMachine::state</see>
1025 </desc>
1026 <param name="machineId" type="uuid" dir="in">
1027 <desc>ID of the machine this event relates to.</desc>
1028 </param>
1029 <param name="state" type="MachineState" dir="in">
1030 <desc>New execution state.</desc>
1031 </param>
1032 </method>
1033
1034 <method name="onMachineDataChange">
1035 <desc>
1036 Any of the settings of the given machine has changed.
1037 </desc>
1038 <param name="machineId" type="uuid" dir="in">
1039 <desc>ID of the machine this event relates to.</desc>
1040 </param>
1041 </method>
1042
1043 <method name="onExtraDataCanChange">
1044 <desc>
1045 Notification when someone tries to change extra data for
1046 either the given machine or (if null) global extra data.
1047 This gives the chance to veto against changes.
1048 </desc>
1049 <param name="machineId" type="uuid" dir="in">
1050 <desc>
1051 ID of the machine this event relates to
1052 (null ID for global extra data change requests).
1053 </desc>
1054 </param>
1055 <param name="key" type="wstring" dir="in">
1056 <desc>
1057 Extra data key for the attempted write.
1058 </desc>
1059 </param>
1060 <param name="value" type="wstring" dir="in">
1061 <desc>
1062 Extra data value for the given key.
1063 </desc>
1064 </param>
1065 <param name="error" type="wstring" dir="out">
1066 <desc>
1067 Optional error message describing the reason of the
1068 veto (ignored if this notification returns @c true).
1069 </desc>
1070 </param>
1071 <param name="allowChange" type="boolean" dir="return">
1072 <desc>
1073 Flag to indicate whether the callee agrees (@c true)
1074 or vetoes against the change (@c false).
1075 </desc>
1076 </param>
1077 </method>
1078
1079 <method name="onExtraDataChange">
1080 <desc>
1081 Notification when machine specific or global extra data
1082 has changed.
1083 </desc>
1084 <param name="machineId" type="uuid" dir="in">
1085 <desc>
1086 ID of the machine this event relates to.
1087 Null for global extra data changes.
1088 </desc>
1089 </param>
1090 <param name="key" type="wstring" dir="in">
1091 <desc>
1092 Extra data key that has changed.
1093 </desc>
1094 </param>
1095 <param name="value" type="wstring" dir="in">
1096 <desc>
1097 Extra data value for the given key.
1098 </desc>
1099 </param>
1100 </method>
1101
1102 <method name="onMediaRegistered">
1103 <desc>
1104 The given media was registered or unregistered
1105 within this VirtualBox installation.
1106
1107 The @a mediaType parameter describes what type of
1108 media the specified @a mediaId refers to. Possible
1109 values are:
1110
1111 <ul>
1112 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1113 that, if registered, can be obtained using the
1114 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1115 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1116 that, if registered, can be obtained using the
1117 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1118 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1119 that, if registered, can be obtained using the
1120 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1121 </ul>
1122
1123 Note that if this is a deregistration notification,
1124 there is no way to access the object representing the
1125 unregistered media. It is supposed that the
1126 application will do required cleanup based on the @a
1127 mediaId value.
1128 </desc>
1129 <param name="mediaId" type="uuid" dir="in">
1130 <desc>ID of the media this event relates to.</desc>
1131 </param>
1132 <param name="mediaType" type="DeviceType" dir="in">
1133 <desc>Type of the media this event relates to.</desc>
1134 </param>
1135 <param name="registered" type="boolean" dir="in">
1136 <desc>
1137 If true, the media was registered, otherwise it was
1138 unregistered.
1139 </desc>
1140 </param>
1141 </method>
1142
1143 <method name="onMachineRegistered">
1144 <desc>
1145 The given machine was registered or unregistered
1146 within this VirtualBox installation.
1147 </desc>
1148 <param name="machineId" type="uuid" dir="in">
1149 <desc>ID of the machine this event relates to.</desc>
1150 </param>
1151 <param name="registered" type="boolean" dir="in">
1152 <desc>
1153 If true, the machine was registered, otherwise it was
1154 unregistered.
1155 </desc>
1156 </param>
1157 </method>
1158
1159 <method name="onSessionStateChange">
1160 <desc>
1161 The state of the session for the given machine was changed.
1162 <see>IMachine::sessionState</see>
1163 </desc>
1164 <param name="machineId" type="uuid" dir="in">
1165 <desc>ID of the machine this event relates to.</desc>
1166 </param>
1167 <param name="state" type="SessionState" dir="in">
1168 <desc>New session state.</desc>
1169 </param>
1170 </method>
1171
1172 <method name="onSnapshotTaken">
1173 <desc>
1174 A new snapshot of the machine has been taken.
1175 <see>ISnapshot</see>
1176 </desc>
1177 <param name="machineId" type="uuid" dir="in">
1178 <desc>ID of the machine this event relates to.</desc>
1179 </param>
1180 <param name="snapshotId" type="uuid" dir="in">
1181 <desc>ID of the new snapshot.</desc>
1182 </param>
1183 </method>
1184
1185 <method name="onSnapshotDiscarded">
1186 <desc>
1187 Snapshot of the given machine has been discarded.
1188
1189 <note>
1190 This notification is delivered <b>after</b> the snapshot
1191 object has been uninitialized on the server (so that any
1192 attempt to call its methods will return an error).
1193 </note>
1194
1195 <see>ISnapshot</see>
1196 </desc>
1197 <param name="machineId" type="uuid" dir="in">
1198 <desc>ID of the machine this event relates to.</desc>
1199 </param>
1200 <param name="snapshotId" type="uuid" dir="in">
1201 <desc>
1202 ID of the discarded snapshot. <tt>null</tt> means the
1203 current machine state has been discarded (restored from
1204 the current snapshot).
1205 </desc>
1206 </param>
1207 </method>
1208
1209 <method name="onSnapshotChange">
1210 <desc>
1211 Snapshot properties (name and/or description) have been changed.
1212 <see>ISnapshot</see>
1213 </desc>
1214 <param name="machineId" type="uuid" dir="in">
1215 <desc>ID of the machine this event relates to.</desc>
1216 </param>
1217 <param name="snapshotId" type="uuid" dir="in">
1218 <desc>ID of the changed snapshot.</desc>
1219 </param>
1220 </method>
1221
1222 <method name="onGuestPropertyChange">
1223 <desc>
1224 Notification when a guest property has changed.
1225 </desc>
1226 <param name="machineId" type="uuid" dir="in">
1227 <desc>
1228 ID of the machine this event relates to.
1229 </desc>
1230 </param>
1231 <param name="name" type="wstring" dir="in">
1232 <desc>
1233 The name of the property that has changed.
1234 </desc>
1235 </param>
1236 <param name="value" type="wstring" dir="in">
1237 <desc>
1238 The new property value.
1239 </desc>
1240 </param>
1241 <param name="flags" type="wstring" dir="in">
1242 <desc>
1243 The new property flags.
1244 </desc>
1245 </param>
1246 </method>
1247
1248 </interface>
1249
1250 <interface
1251 name="IVirtualBox" extends="$dispatched"
1252 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1253 wsmap="managed"
1254 >
1255 <desc>
1256 The IVirtualBox interface represents the main interface exposed by the
1257 product that provides virtual machine management.
1258
1259 An instance of IVirtualBox is required for the product to do anything
1260 useful. Even though the interface does not expose this, internally,
1261 IVirtualBox is implemented as a singleton and actually lives in the
1262 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1263 IVirtualBox can track the state of all virtual machines on a particular
1264 host, regardless of which frontend started them.
1265
1266 To enumerate all the virtual machines on the host, use the
1267 <link to="IVirtualBox::machines2"/> attribute.
1268 </desc>
1269
1270 <attribute name="version" type="wstring" readonly="yes">
1271 <desc>
1272 A string representing the version number of the product. The
1273 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1274 last number represents the build number and will frequently change.
1275 </desc>
1276 </attribute>
1277
1278 <attribute name="revision" type="unsigned long" readonly="yes">
1279 <desc>
1280 The internal build revision number of the product.
1281 </desc>
1282 </attribute>
1283
1284 <attribute name="packageType" type="wstring" readonly="yes">
1285 <desc>
1286 A string representing the package type of this product. The
1287 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1288 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1289 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1290 this.
1291 </desc>
1292 </attribute>
1293
1294 <attribute name="homeFolder" type="wstring" readonly="yes">
1295 <desc>
1296 Full path to the directory where the global settings file,
1297 <tt>VirtualBox.xml</tt>, is stored.
1298
1299 In this version of VirtualBox, the value of this property is
1300 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1301 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1302 as determined by the host OS), and cannot be changed.
1303
1304 This path is also used as the base to resolve relative paths in
1305 places where relative paths are allowed (unless otherwise
1306 expressly indicated).
1307 </desc>
1308 </attribute>
1309
1310 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1311 <desc>
1312 Full name of the global settings file.
1313 The value of this property corresponds to the value of
1314 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1315 </desc>
1316 </attribute>
1317
1318 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1319 <desc>
1320 Current version of the format of the global VirtualBox settings file
1321 (<tt>VirtualBox.xml</tt>).
1322
1323 The version string has the following format:
1324 <pre>
1325 x.y-platform
1326 </pre>
1327 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1328 versions, and <tt>platform</tt> is the platform identifier.
1329
1330 The current version usually matches the value of the
1331 <link to="#settingsFormatVersion"/> attribute unless the
1332 settings file was created by an older version of VirtualBox and there
1333 was a change of the settings file format since then.
1334
1335 Note that VirtualBox automatically converts settings files from older
1336 versions to the most recent version when reading them (usually at
1337 VirtualBox startup) but it doesn't save the changes back until
1338 you call a method that implicitly saves settings (such as
1339 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1340 explicitly. Therefore, if the value of this attribute differs from the
1341 value of <link to="#settingsFormatVersion"/>, then it
1342 means that the settings file was converted but the result of the
1343 conversion is not yet saved to disk.
1344
1345 The above feature may be used by interactive front-ends to inform users
1346 about the settings file format change and offer them to explicitly save
1347 all converted settings files (the global and VM-specific ones),
1348 optionally create backup copies of the old settings files before saving,
1349 etc.
1350
1351 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1352 </desc>
1353 </attribute>
1354
1355 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1356 <desc>
1357 Most recent version of the settings file format.
1358
1359 The version string has the following format:
1360 <pre>
1361 x.y-platform
1362 </pre>
1363 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1364 versions, and <tt>platform</tt> is the platform identifier.
1365
1366 VirtualBox uses this version of the format when saving settings files
1367 (either as a result of method calls that require to save settings or as
1368 a result of an explicit call to <link to="#saveSettings()"/>).
1369
1370 <see>settingsFileVersion</see>
1371 </desc>
1372 </attribute>
1373
1374 <attribute name="host" type="IHost" readonly="yes">
1375 <desc>Associated host object.</desc>
1376 </attribute>
1377
1378 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1379 <desc>Associated system information object.</desc>
1380 </attribute>
1381
1382 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1383 <desc>
1384 Array of machine objects registered within this VirtualBox instance.
1385 </desc>
1386 </attribute>
1387
1388 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1389 <desc>
1390 Array of hard disk objects known to this VirtualBox installation.
1391
1392 This array contains only base (root) hard disks. All differencing
1393 hard disks of the given base hard disk can be enumerated using
1394 <link to="IHardDisk2::children"/>.
1395 </desc>
1396 </attribute>
1397
1398 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1399 <desc>
1400 Array of CD/DVD image objects registered with this VirtualBox instance.
1401 </desc>
1402 </attribute>
1403
1404 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1405 <desc>
1406 Array of floppy image objects registered with this VirtualBox instance.
1407 </desc>
1408 </attribute>
1409
1410 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1411
1412 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1413
1414 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1415 <desc>
1416 Collection of global shared folders. Global shared folders are
1417 available to all virtual machines.
1418
1419 New shared folders are added to the collection using
1420 <link to="#createSharedFolder"/>. Existing shared folders can be
1421 removed using <link to="#removeSharedFolder"/>.
1422
1423 <note>
1424 In the current version of the product, global shared folders are not
1425 implemented and therefore this collection is always empty.
1426 </note>
1427 </desc>
1428 </attribute>
1429
1430 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1431 <desc>
1432 Associated performance collector object.
1433 </desc>
1434 </attribute>
1435
1436 <method name="createMachine">
1437 <desc>
1438 Creates a new virtual machine.
1439
1440 The new machine is created unregistered, with the initial configuration
1441 set according to the specified guest OS type. A typical sequence of
1442 actions to create a new virtual machine is as follows:
1443
1444 <ol>
1445 <li>
1446 Call this method to have a new machine created. The returned machine
1447 object will be "mutable" allowing to change any machine property.
1448 </li>
1449
1450 <li>
1451 Configure the machine using the appropriate attributes and methods.
1452 </li>
1453
1454 <li>
1455 Call <link to="IMachine::saveSettings()" /> to write the settings
1456 to the machine's XML settings file. The configuration of the newly
1457 created machine will not be saved to disk until this method is
1458 called.
1459 </li>
1460
1461 <li>
1462 Call <link to="#registerMachine()" /> to add the machine to the list
1463 of machines known to VirtualBox.
1464 </li>
1465 </ol>
1466
1467 You should specify valid name for the newly created machine when calling
1468 this method. See the <link to="IMachine::name"/> attribute description
1469 for more details about the machine name.
1470
1471 The specified guest OS type identifier must match an ID of one of known
1472 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1473 array.
1474
1475 Every machine has a <i>settings file</i> that is used to store
1476 the machine configuration. This file is stored in a directory called the
1477 <i>machine settings subfolder</i>. Both the settings subfolder and file
1478 will have a name that corresponds to the name of the virtual machine.
1479 You can specify where to create the machine setting subfolder using the
1480 @a baseFolder argument. The base folder can be absolute (full path) or
1481 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1482 directory</link>.
1483
1484 If @a baseFolder is a null or empty string (which is recommended), the
1485 <link to="ISystemProperties::defaultMachineFolder">default machine
1486 settings folder</link> will be used as a base folder for the created
1487 machine. Otherwise the given base folder will be used. In either case,
1488 the full path to the resulting settings file has the following
1489 structure:
1490 <pre>
1491 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1492 </pre>
1493
1494 Note that if the resulting settings file already exists, this method
1495 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1496
1497 Optionally, you may specify an UUID of to assign to the created machine.
1498 However, this is not recommended and you should normally pass an empty
1499 (null) UUID to this method so that a new UUID will be automatically
1500 generated for every created machine.
1501
1502 <note>
1503 There is no way to change the name of the settings file or
1504 subfolder of the created machine directly.
1505 </note>
1506
1507 <result name="VBOX_E_OBJECT_NOT_FOUND">
1508 @a osTypeId is invalid.
1509 </result>
1510 <result name="VBOX_E_FILE_ERROR">
1511 Resulting settings file name is invalid or the settings file already
1512 exists or could not be created due to an I/O error.
1513 </result>
1514 <result name="E_INVALIDARG">
1515 @a name is empty or null.
1516 </result>
1517 </desc>
1518
1519 <param name="name" type="wstring" dir="in">
1520 <desc>Machine name.</desc>
1521 </param>
1522 <param name="osTypeId" type="wstring" dir="in">
1523 <desc>Guest OS Type ID.</desc>
1524 </param>
1525 <param name="baseFolder" type="wstring" dir="in">
1526 <desc>Base machine folder (optional).</desc>
1527 </param>
1528 <param name="id" type="uuid" dir="in">
1529 <desc>Machine UUID (optional).</desc>
1530 </param>
1531 <param name="machine" type="IMachine" dir="return">
1532 <desc>Created machine object.</desc>
1533 </param>
1534 </method>
1535
1536 <method name="createLegacyMachine">
1537 <desc>
1538 Creates a new virtual machine in "legacy" mode, using the specified
1539 settings file to store machine settings.
1540
1541 As opposed to machines created by <link to="#createMachine()"/>,
1542 the settings file of the machine created in "legacy" mode is not
1543 automatically renamed when the machine name is changed -- it will always
1544 remain the same as specified in this method call.
1545
1546 The specified settings file name can be absolute (full path) or relative
1547 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1548 directory</link>. If the file name doesn't contain an extension, the
1549 default extension (.xml) will be appended.
1550
1551 Note that the configuration of the newly created machine is not
1552 saved to disk (and therefore no settings file is created)
1553 until <link to="IMachine::saveSettings()"/> is called. If the
1554 specified settings file already exists, this method
1555 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1556
1557 See <link to="#createMachine()"/> for more information.
1558
1559 @deprecated This method may be removed later. Use <link
1560 to="IVirtualBox::createMachine()"/> instead.
1561
1562 <note>
1563 There is no way to change the name of the settings file
1564 of the machine created in "legacy" mode.
1565 </note>
1566
1567 <result name="VBOX_E_OBJECT_NOT_FOUND">
1568 @a osTypeId is invalid.
1569 </result>
1570 <result name="VBOX_E_FILE_ERROR">
1571 @a settingsFile is invalid or the settings file already exists or
1572 could not be created due to an I/O error.
1573 </result>
1574 <result name="E_INVALIDARG">
1575 @a name or @a settingsFile is empty or null.
1576 </result>
1577 </desc>
1578
1579 <param name="name" type="wstring" dir="in">
1580 <desc>Machine name.</desc>
1581 </param>
1582 <param name="osTypeId" type="wstring" dir="in">
1583 <desc>Machine OS Type ID.</desc>
1584 </param>
1585 <param name="settingsFile" type="wstring" dir="in">
1586 <desc>Name of the machine settings file.</desc>
1587 </param>
1588 <param name="id" type="uuid" dir="in">
1589 <desc>Machine UUID (optional).</desc>
1590 </param>
1591 <param name="machine" type="IMachine" dir="return">
1592 <desc>Created machine object.</desc>
1593 </param>
1594 </method>
1595
1596 <method name="openMachine">
1597 <desc>
1598 Opens a virtual machine from the existing settings file.
1599 The opened machine remains unregistered until you call
1600 <link to="#registerMachine()"/>.
1601
1602 The specified settings file name can be absolute
1603 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1604 VirtualBox home directory</link>. This file must exist
1605 and must be a valid machine settings file whose contents
1606 will be used to construct the machine object.
1607
1608 @deprecated Will be removed soon.
1609 <result name="VBOX_E_FILE_ERROR">
1610 Settings file name invalid, not found or sharing violation.
1611 </result>
1612 </desc>
1613 <param name="settingsFile" type="wstring" dir="in">
1614 <desc>
1615 Name of the machine settings file.
1616 </desc>
1617 </param>
1618 <param name="machine" type="IMachine" dir="return">
1619 <desc>Opened machine object.</desc>
1620 </param>
1621 <note>
1622 <link to="IMachine::settingsModified"/> will return
1623 false for the created machine, until any of machine settings
1624 are changed.
1625 </note>
1626 </method>
1627
1628 <method name="registerMachine">
1629 <desc>
1630
1631 Registers the machine previously created using
1632 <link to="#createMachine()"/> or opened using
1633 <link to="#openMachine()"/> within this VirtualBox installation. After
1634 successful method invocation, the
1635 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1636 to all registered callbacks.
1637
1638 <note>
1639 This method implicitly calls <link to="IMachine::saveSettings"/>
1640 to save all current machine settings before registering it.
1641 </note>
1642
1643 <result name="VBOX_E_INVALID_OBJECT_STATE">
1644 Virtual machine was not created within this VirtualBox instance.
1645 </result>
1646
1647 </desc>
1648 <param name="machine" type="IMachine" dir="in"/>
1649 </method>
1650
1651 <method name="getMachine">
1652 <desc>
1653 Attempts to find a virtual machine given its UUID.
1654 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1655 instead.
1656
1657 <result name="VBOX_E_FILE_ERROR">
1658 Could not find registered machine matching @a id.
1659 </result>
1660
1661 </desc>
1662 <param name="id" type="uuid" dir="in"/>
1663 <param name="machine" type="IMachine" dir="return"/>
1664 </method>
1665
1666 <method name="findMachine">
1667 <desc>
1668 Attempts to find a virtual machine given its name.
1669 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1670 instead.
1671
1672 <result name="VBOX_E_FILE_ERROR">
1673 Could not find registered machine matching @a name.
1674 </result>
1675
1676 </desc>
1677 <param name="name" type="wstring" dir="in"/>
1678 <param name="machine" type="IMachine" dir="return"/>
1679 </method>
1680
1681 <method name="unregisterMachine">
1682 <desc>
1683
1684 Unregisters the machine previously registered using
1685 <link to="#registerMachine"/>. After successful method invocation, the
1686 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1687 to all registered callbacks.
1688
1689 <note>
1690 The specified machine must not be in the Saved state, have an open
1691 (or a spawning) direct session associated with it, have snapshots or
1692 have hard disks attached.
1693 </note>
1694
1695 <note>
1696 This method implicitly calls <link to="IMachine::saveSettings"/> to
1697 save all current machine settings before unregistering it.
1698 </note>
1699
1700 <note>
1701 If the given machine is inaccessible (see
1702 <link to="IMachine::accessible"/>), it will be unregistered and
1703 fully uninitialized right afterwards. As a result, the returned
1704 machine object will be unusable and an attempt to call
1705 <b>any</b> method will return the "Object not ready" error.
1706 </note>
1707
1708 <result name="VBOX_E_FILE_ERROR">
1709 Could not find registered machine matching @a id.
1710 </result>
1711 <result name="VBOX_E_INVALID_VM_STATE">
1712 Machine is in Saved state.
1713 </result>
1714 <result name="VBOX_E_INVALID_OBJECT_STATE">
1715 Machine has snapshot or open session or hard disk attached.
1716 </result>
1717
1718 </desc>
1719 <param name="id" type="uuid" dir="in">
1720 <desc>UUID of the machine to unregister.</desc>
1721 </param>
1722 <param name="machine" type="IMachine" dir="return">
1723 <desc>Unregistered machine object.</desc>
1724 </param>
1725 </method>
1726
1727 <method name="createHardDisk2">
1728 <desc>
1729 Creates a new base hard disk object that will use the given storage
1730 format and location for hard disk data.
1731
1732 Note that the actual storage unit is not created by this method. In
1733 order to do it, and before you are able to attach the created hard disk
1734 to virtual machines, you must call one of the following methods to
1735 allocate a format-specific storage unit at the specified location:
1736 <ul>
1737 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1738 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1739 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1740 </ul>
1741
1742 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1743 remain uninitialized until the hard disk storage unit is successfully
1744 created by one of the above methods.
1745
1746 After the storage unit is successfully created, the hard disk gets
1747 remembered by this VirtualBox installation and will be accessible
1748 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1749 methods. Remembered root (base) hard disks are also returned as part of
1750 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1751
1752 The list of all storage formats supported by this VirtualBox
1753 installation can be obtained using
1754 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1755 attribute is empty or <tt>null</tt> then the default storage format
1756 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1757 be used for creating a storage unit of the hard disk.
1758
1759 Note that the format of the location string is storage format specific.
1760 See <link to="IMedium::location"/>, IHardDisk2 and
1761 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1762
1763 <result name="VBOX_E_OBJECT_NOT_FOUND">
1764 @a format identifier is invalid. See
1765 <link to="ISystemProperties::hardDiskFormats"/>.
1766 </result>
1767 <result name="VBOX_E_FILE_ERROR">
1768 @a location is a not valid file name (for file-based formats only).
1769 </result>
1770 <result name="E_INVALIDARG">
1771 @a format is a null or empty string.
1772 </result>
1773 </desc>
1774 <param name="format" type="wstring" dir="in">
1775 <desc>
1776 Identifier of the storage format to use for the new hard disk.
1777 </desc>
1778 </param>
1779 <param name="location" type="wstring" dir="in">
1780 <desc>
1781 Location of the storage unit for the new hard disk.
1782 </desc>
1783 </param>
1784 <param name="hardDisk" type="IHardDisk2" dir="return">
1785 <desc>Created hard disk object.</desc>
1786 </param>
1787 </method>
1788
1789 <method name="openHardDisk2">
1790 <desc>
1791 Opens a hard disk from an existing location.
1792
1793 After the hard disk is successfully opened by this method, it gets
1794 remembered by (known to) this VirtualBox installation and will be
1795 accessible through <link to="#getHardDisk2()"/> and
1796 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1797 are also returned as part of the <link to="#hardDisks2"/> array and can
1798 be attached to virtual machines. See IHardDisk2 for more details.
1799
1800 If a differencing hard disk is to be opened by this method, the
1801 operation will succeed only if its parent hard disk and all ancestors,
1802 if any, are already known to this VirtualBox installation (for example,
1803 were opened by this method before).
1804
1805 This method tries to guess the storage format of the specified hard disk
1806 by reading hard disk data at the specified location.
1807
1808 Note that the format of the location string is storage format specific.
1809 See <link to="IMedium::location"/>, IHardDisk2 and
1810 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1811
1812
1813 <result name="VBOX_E_FILE_ERROR">
1814 Invalid hard disk storage file location.
1815 </result>
1816 <result name="VBOX_E_IPRT_ERROR">
1817 Could not get hard disk storage format.
1818 </result>
1819 <result name="E_INVALIDARG">
1820 Invalid hard disk storage format.
1821 </result>
1822
1823 </desc>
1824 <param name="location" type="wstring" dir="in">
1825 <desc>
1826 Location of the storage unit that contains hard disk data in one of
1827 the supported storage formats.
1828 </desc>
1829 </param>
1830 <param name="hardDisk" type="IHardDisk2" dir="return">
1831 <desc>Opened hard disk object.</desc>
1832 </param>
1833 </method>
1834
1835 <method name="getHardDisk2" const="yes">
1836 <desc>
1837 Returns a hard disk with the given UUID.
1838
1839 The hard disk with the given UUID must be known to this VirtualBox
1840 installation, i.e. it must be previously created by
1841 <link to="#createHardDisk2()"/> or opened by <link
1842 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1843
1844 <result name="VBOX_E_OBJECT_NOT_FOUND">
1845 No hard disk object matching @a id found.
1846 </result>
1847
1848 </desc>
1849 <param name="id" type="uuid" dir="in">
1850 <desc>UUID of the hard disk to look for.</desc>
1851 </param>
1852 <param name="hardDisk" type="IHardDisk2" dir="return">
1853 <desc>Found hard disk object.</desc>
1854 </param>
1855 </method>
1856
1857 <method name="findHardDisk2">
1858 <desc>
1859 Returns a hard disk that uses the given location to store hard
1860 disk data.
1861
1862 The given hard disk must be known to this VirtualBox installation, i.e.
1863 it must be previously created by
1864 <link to="#createHardDisk2()"/> or opened by <link
1865 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1866
1867 The search is done by comparing the value of the @a location argument to
1868 the <link to="IHardDisk2::location"/> attribute of each known hard
1869 disk.
1870
1871 For locations represented by file names in the host's file system, the
1872 requested location can be a path relative to the
1873 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1874 only a file name without any path is given, the
1875 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1876 folder</link> will be prepended to the file name before searching. Note
1877 that on case sensitive file systems, a case sensitive comparison is
1878 performed, otherwise the case of symbols in the file path is ignored.
1879
1880 <result name="VBOX_E_OBJECT_NOT_FOUND">
1881 No hard disk object matching @a location found.
1882 </result>
1883
1884 </desc>
1885 <param name="location" type="wstring" dir="in">
1886 <desc>Location string to search for.</desc>
1887 </param>
1888 <param name="hardDisk" type="IHardDisk2" dir="return">
1889 <desc>Found hard disk object.</desc>
1890 </param>
1891 </method>
1892
1893 <method name="openDVDImage">
1894 <desc>
1895 Opens a CD/DVD image contained in the specified file of the supported
1896 format and assigns it the given UUID.
1897
1898 After the image is successfully opened by this method, it gets
1899 remembered by (known to) this VirtualBox installation and will be
1900 accessible through <link to="#getDVDImage()"/> and
1901 <link to="#findDVDImage()"/> methods. Remembered images are also
1902 returned as part of the <link to="#DVDImages"/> array and can be mounted
1903 to virtual machines. See IMedium for more details.
1904
1905 See <link to="IMedium::location"/> to get more details about the format
1906 of the location string.
1907
1908 <note>
1909 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1910 </note>
1911
1912 <result name="VBOX_E_INVALID_OBJECT_STATE">
1913 CD/DVD image already exists in the media registry.
1914 </result>
1915
1916 </desc>
1917 <param name="location" type="wstring" dir="in">
1918 <desc>
1919 Full path to the file that contains a valid CD/DVD image.
1920 </desc>
1921 </param>
1922 <param name="id" type="uuid" dir="in">
1923 <desc>
1924 UUID to assign to the given image within this VirtualBox installation.
1925 If an empty (null) UUID is specified, the system will randomly
1926 generate a new UUID.
1927 </desc>
1928 </param>
1929 <param name="image" type="IDVDImage2" dir="return">
1930 <desc>Opened CD/DVD image object.</desc>
1931 </param>
1932 </method>
1933
1934 <method name="getDVDImage">
1935 <desc>
1936 Returns a CD/DVD image with the given UUID.
1937
1938 The image with the given UUID must be known to this VirtualBox
1939 installation, i.e. it must be previously opened by <link
1940 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1941
1942 <result name="VBOX_E_OBJECT_NOT_FOUND">
1943 No matching DVD image found in the media registry.
1944 </result>
1945
1946 </desc>
1947 <param name="id" type="uuid" dir="in">
1948 <desc>UUID of the image to look for.</desc>
1949 </param>
1950 <param name="image" type="IDVDImage2" dir="return">
1951 <desc>Found CD/DVD image object.</desc>
1952 </param>
1953 </method>
1954
1955 <method name="findDVDImage">
1956 <desc>
1957 Returns a CD/DVD image with the given image location.
1958
1959 The image with the given UUID must be known to this VirtualBox
1960 installation, i.e. it must be previously opened by <link
1961 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1962
1963 The search is done by comparing the value of the @a location argument to
1964 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1965
1966 The requested location can be a path relative to the
1967 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1968 only a file name without any path is given, the
1969 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1970 folder</link> will be prepended to the file name before searching. Note
1971 that on case sensitive file systems, a case sensitive comparison is
1972 performed, otherwise the case in the file path is ignored.
1973
1974 <result name="VBOX_E_FILE_ERROR">
1975 Invalid image file location.
1976 </result>
1977 <result name="VBOX_E_OBJECT_NOT_FOUND">
1978 No matching DVD image found in the media registry.
1979 </result>
1980
1981 </desc>
1982 <param name="location" type="wstring" dir="in">
1983 <desc>CD/DVD image file path to look for.</desc>
1984 </param>
1985 <param name="image" type="IDVDImage2" dir="return">
1986 <desc>Found CD/DVD image object.</desc>
1987 </param>
1988 </method>
1989
1990 <method name="openFloppyImage">
1991 <desc>
1992 Opens a floppy image contained in the specified file of the supported
1993 format and assigns it the given UUID.
1994
1995 After the image is successfully opened by this method, it gets
1996 remembered by (known to) this VirtualBox installation and will be
1997 accessible through <link to="#getFloppyImage()"/> and
1998 <link to="#findFloppyImage()"/> methods. Remembered images are also
1999 returned as part of the <link to="#floppyImages"/> array and can be
2000 mounted to virtual machines. See IMedium for more details.
2001
2002 See <link to="IMedium::location"/> to get more details about the format
2003 of the location string.
2004
2005 <result name="VBOX_E_FILE_ERROR">
2006 Floppy image specified by @a location not accessible.
2007 </result>
2008 <result name="VBOX_E_INVALID_OBJECT_STATE">
2009 Floppy image already exists in the media registry.
2010 </result>
2011
2012 <note>
2013 Currently, only raw floppy images are supported by VirtualBox.
2014 </note>
2015 </desc>
2016 <param name="location" type="wstring" dir="in">
2017 <desc>
2018 Full path to the file that contains a valid floppy image.
2019 </desc>
2020 </param>
2021 <param name="id" type="uuid" dir="in">
2022 <desc>
2023 UUID to assign to the given image file within this VirtualBox
2024 installation. If an empty (null) UUID is specified, the system will
2025 randomly generate a new UUID.
2026 </desc>
2027 </param>
2028 <param name="image" type="IFloppyImage2" dir="return">
2029 <desc>Opened floppy image object.</desc>
2030 </param>
2031 </method>
2032
2033 <method name="getFloppyImage">
2034 <desc>
2035 Returns a floppy image with the given UUID.
2036
2037 The image with the given UUID must be known to this VirtualBox
2038 installation, i.e. it must be previously opened by <link
2039 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2040
2041 <result name="VBOX_E_OBJECT_NOT_FOUND">
2042 No matching floppy image found in the media registry.
2043 </result>
2044
2045 </desc>
2046 <param name="id" type="uuid" dir="in">
2047 <desc>UUID of the image to look for.</desc>
2048 </param>
2049 <param name="image" type="IFloppyImage2" dir="return">
2050 <desc>Found floppy image object.</desc>
2051 </param>
2052 </method>
2053
2054 <method name="findFloppyImage">
2055 <desc>
2056 Returns a floppy image with the given image location.
2057
2058 The image with the given UUID must be known to this VirtualBox
2059 installation, i.e. it must be previously opened by <link
2060 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2061
2062 The search is done by comparing the value of the @a location argument to
2063 the <link to="IMedium::location"/> attribute of each known floppy image.
2064
2065 The requested location can be a path relative to the
2066 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2067 only a file name without any path is given, the
2068 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2069 folder</link> will be prepended to the file name before searching. Note
2070 that on case sensitive file systems, a case sensitive comparison is
2071 performed, otherwise the case of symbols in the file path is ignored.
2072
2073 <result name="VBOX_E_FILE_ERROR">
2074 Invalid image file location.
2075 </result>
2076 <result name="VBOX_E_OBJECT_NOT_FOUND">
2077 No matching floppy image found in the media registry.
2078 </result>
2079
2080 </desc>
2081 <param name="location" type="wstring" dir="in">
2082 <desc>Floppy image file path to look for.</desc>
2083 </param>
2084 <param name="image" type="IFloppyImage2" dir="return">
2085 <desc>Found floppy image object.</desc>
2086 </param>
2087 </method>
2088
2089 <method name="getGuestOSType">
2090 <desc>
2091 Returns an object describing the specified guest OS type.
2092
2093 The requested guest OS type is specified using a string which is a
2094 mnemonic identifier of the guest operating system, such as
2095 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2096 particular virtual machine can be read or set using the
2097 <link to="IMachine::OSTypeId"/> attribute.
2098
2099 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2100 available guest OS type objects. Each object has an
2101 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2102 the guest OS this object describes.
2103
2104 <result name="E_INVALIDARG">
2105 @a id is not a valid Guest OS type.
2106 </result>
2107
2108 </desc>
2109 <param name="id" type="wstring" dir="in">
2110 <desc>Guest OS type ID string.</desc>
2111 </param>
2112 <param name="type" type="IGuestOSType" dir="return">
2113 <desc>Guest OS type object.</desc>
2114 </param>
2115 </method>
2116
2117 <method name="createSharedFolder">
2118 <desc>
2119 Creates a new global shared folder by associating the given logical
2120 name with the given host path, adds it to the collection of shared
2121 folders and starts sharing it. Refer to the description of
2122 <link to="ISharedFolder"/> to read more about logical names.
2123 <note>
2124 In the current implementation, this operation is not
2125 implemented.
2126 </note>
2127 </desc>
2128 <param name="name" type="wstring" dir="in">
2129 <desc>Unique logical name of the shared folder.</desc>
2130 </param>
2131 <param name="hostPath" type="wstring" dir="in">
2132 <desc>Full path to the shared folder in the host file system.</desc>
2133 </param>
2134 <param name="writable" type="boolean" dir="in">
2135 <desc>Whether the share is writable or readonly</desc>
2136 </param>
2137 </method>
2138
2139 <method name="removeSharedFolder">
2140 <desc>
2141 Removes the global shared folder with the given name previously
2142 created by <link to="#createSharedFolder"/> from the collection of
2143 shared folders and stops sharing it.
2144 <note>
2145 In the current implementation, this operation is not
2146 implemented.
2147 </note>
2148 </desc>
2149 <param name="name" type="wstring" dir="in">
2150 <desc>Logical name of the shared folder to remove.</desc>
2151 </param>
2152 </method>
2153
2154 <method name="getNextExtraDataKey">
2155 <desc>
2156 Returns the global extra data key name following the supplied key.
2157
2158 An error is returned if the supplied @a key does not exist. @c NULL is
2159 returned in @a nextKey if the supplied key is the last key. When
2160 supplying @c NULL for the @a key, the first key item is returned in @a
2161 nextKey (if there is any). @a nextValue is an optional parameter and
2162 if supplied, the next key's value is returned in it.
2163
2164 <result name="VBOX_E_OBJECT_NOT_FOUND">
2165 Extra data @a key not found.
2166 </result>
2167
2168 </desc>
2169 <param name="key" type="wstring" dir="in">
2170 <desc>Name of the data key to follow.</desc>
2171 </param>
2172 <param name="nextKey" type="wstring" dir="out">
2173 <desc>Name of the next data key.</desc>
2174 </param>
2175 <param name="nextValue" type="wstring" dir="out">
2176 <desc>Value of the next data key.</desc>
2177 </param>
2178 </method>
2179
2180 <method name="getExtraData">
2181 <desc>
2182 Returns associated global extra data.
2183
2184 If the requested data @a key does not exist, this function will
2185 succeed and return @c NULL in the @a value argument.
2186
2187 <result name="VBOX_E_FILE_ERROR">
2188 Settings file not accessible.
2189 </result>
2190 <result name="VBOX_E_XML_ERROR">
2191 Could not parse the settings file.
2192 </result>
2193
2194 </desc>
2195 <param name="key" type="wstring" dir="in">
2196 <desc>Name of the data key to get.</desc>
2197 </param>
2198 <param name="value" type="wstring" dir="return">
2199 <desc>Value of the requested data key.</desc>
2200 </param>
2201 </method>
2202
2203 <method name="setExtraData">
2204 <desc>
2205 Sets associated global extra data.
2206
2207 If you pass @c NULL as a key @a value, the given @a key will be
2208 deleted.
2209
2210 <note>
2211 Before performing the actual data change, this method will ask all
2212 registered callbacks using the
2213 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2214 notification for a permission. If one of the callbacks refuses the
2215 new value, the change will not be performed.
2216 </note>
2217 <note>
2218 On success, the
2219 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2220 is called to inform all registered callbacks about a successful data
2221 change.
2222 </note>
2223
2224 <result name="VBOX_E_FILE_ERROR">
2225 Settings file not accessible.
2226 </result>
2227 <result name="VBOX_E_XML_ERROR">
2228 Could not parse the settings file.
2229 </result>
2230 <result name="E_ACCESSDENIED">
2231 Modification request refused.
2232 </result>
2233
2234 </desc>
2235 <param name="key" type="wstring" dir="in">
2236 <desc>Name of the data key to set.</desc>
2237 </param>
2238 <param name="value" type="wstring" dir="in">
2239 <desc>Value to assign to the key.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="openSession">
2244 <desc>
2245 Opens a new direct session with the given virtual machine.
2246
2247 A direct session acts as a local lock on the given VM.
2248 There can be only one direct session open at a time for every
2249 virtual machine, protecting the VM from being manipulated by
2250 conflicting actions from different processes. Only after a
2251 direct session has been opened, one can change all VM settings
2252 and execute the VM in the process space of the session object.
2253
2254 Sessions therefore can be compared to mutex semaphores that
2255 lock a given VM for modification and execution.
2256 See <link to="ISession">ISession</link> for details.
2257
2258 <note>Unless you are writing a new VM frontend, you will not
2259 want to execute a VM in the current process. To spawn a new
2260 process that executes a VM, use
2261 <link to="IVirtualBox::openRemoteSession" />
2262 instead.</note>
2263
2264 Upon successful return, the session object can be used to
2265 get access to the machine and to the VM console.
2266
2267 In VirtualBox terminology, the machine becomes "mutable" after
2268 a session has been opened. Note that the "mutable" machine
2269 object, on which you may invoke IMachine methods to change its
2270 settings, will be a different object from the immutable IMachine
2271 objects returned by various IVirtualBox methods. To obtain a
2272 mutable IMachine object (upon which you can invoke settings methods),
2273 use the <link to="ISession::machine" /> attribute.
2274
2275 One must always call <link to="ISession::close" /> to release the
2276 lock on the machine, or the machine's state will eventually be
2277 set to "Aborted".
2278
2279 In other words, to change settings on a machine, the following
2280 sequence is typically performed:
2281
2282 <ol>
2283 <li>Call this method (openSession) to have a machine locked for
2284 the current session.</li>
2285
2286 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2287
2288 <li>Change the settings of the machine.</li>
2289
2290 <li>Call <link to="IMachine::saveSettings" />.</li>
2291
2292 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2293 </ol>
2294
2295 <result name="E_UNEXPECTED">
2296 Virtual machine not registered.
2297 </result>
2298 <result name="E_ACCESSDENIED">
2299 Process not started by OpenRemoteSession.
2300 </result>
2301 <result name="VBOX_E_INVALID_OBJECT_STATE">
2302 Session already open or being opened.
2303 </result>
2304 <result name="VBOX_E_VM_ERROR">
2305 Failed to assign machine to session.
2306 </result>
2307
2308 </desc>
2309 <param name="session" type="ISession" dir="in">
2310 <desc>
2311 Session object that will represent the opened session after
2312 successful method invocation. This object must not represent
2313 the already open session.
2314 <note>
2315 This session will be automatically closed if the
2316 VirtualBox server is terminated for some reason.
2317 </note>
2318 </desc>
2319 </param>
2320 <param name="machineId" type="uuid" dir="in">
2321 <desc>ID of the virtual machine to open a session with.</desc>
2322 </param>
2323 </method>
2324
2325 <method name="openRemoteSession">
2326 <desc>
2327 Spawns a new process that executes a virtual machine (called a
2328 "remote session").
2329
2330 Opening a remote session causes the VirtualBox server to start a new
2331 process that opens a direct session with the given VM. As a result, the
2332 VM is locked by that direct session in the new process, preventing
2333 conflicting changes from other processes. Since sessions act as locks
2334 that such prevent conflicting changes, one cannot open a remote session
2335 for a VM that already has another open session (direct or remote), or
2336 is currently in the process of opening one (see <link
2337 to="IMachine::sessionState"/>).
2338
2339 While the remote session still provides some level of control over the
2340 VM execution to the caller (using the <link to="IConsole" /> interface),
2341 not all VM settings are available for modification within the remote
2342 session context.
2343
2344 This operation can take some time (a new VM is started in a new process,
2345 for which memory and other resources need to be set up). Because of this,
2346 an <link to="IProgress" /> is returned to allow the caller to wait for this
2347 asynchronous operation to be completed. Until then, the remote session
2348 object remains in the closed state, and accessing the machine or its
2349 console through it is invalid. It is recommended to use
2350 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2351 completion.
2352
2353 As with all <link to="ISession" /> objects, it is recommended to call
2354 <link to="ISession::close" /> on the local session object once openRemoteSession()
2355 has been called. However, the session's state (see <link to="ISession::state" />)
2356 will not return to "Closed" until the remote session has also closed (i.e.
2357 until the VM is no longer running). In that case, however, the state of
2358 the session will automatically change back to "Closed".
2359
2360 Currently supported session types (values of the @a type
2361 argument) are:
2362 <ul>
2363 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2364 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2365 </ul>
2366
2367 The @a environment argument is a string containing definitions of
2368 environment variables in the following format:
2369 @code
2370 NAME[=VALUE]\n
2371 NAME[=VALUE]\n
2372 ...
2373 @endcode
2374 where <tt>\\n</tt> is the new line character. These environment
2375 variables will be appended to the environment of the VirtualBox server
2376 process. If an environment variable exists both in the server process
2377 and in this list, the value from this list takes precedence over the
2378 server's variable. If the value of the environment variable is
2379 omitted, this variable will be removed from the resulting environment.
2380 If the environment string is @c null, the server environment is
2381 inherited by the started process as is.
2382
2383 <see>openExistingSession</see>
2384
2385 <result name="E_UNEXPECTED">
2386 Virtual machine not registered.
2387 </result>
2388 <result name="E_INVALIDARG">
2389 Invalid session type @a type.
2390 </result>
2391 <result name="VBOX_E_OBJECT_NOT_FOUND">
2392 No machine matching @a machineId found.
2393 </result>
2394 <result name="VBOX_E_INVALID_OBJECT_STATE">
2395 Session already open or being opened.
2396 </result>
2397 <result name="VBOX_E_IPRT_ERROR">
2398 Launching process for machine failed.
2399 </result>
2400 <result name="VBOX_E_VM_ERROR">
2401 Failed to assign machine to session.
2402 </result>
2403
2404 </desc>
2405 <param name="session" type="ISession" dir="in">
2406 <desc>
2407 Session object that will represent the opened remote session
2408 after successful method invocation (this object must not
2409 represent an already open session).
2410 </desc>
2411 </param>
2412 <param name="machineId" type="uuid" dir="in">
2413 <desc>ID of the virtual machine to open a session with.</desc>
2414 </param>
2415 <param name="type" type="wstring" dir="in">
2416 <desc>
2417 Type of the remote session (case sensitive).
2418 </desc>
2419 </param>
2420 <param name="environment" type="wstring" dir="in">
2421 <desc>
2422 Environment to pass to the opened session (may be @c null).
2423 </desc>
2424 </param>
2425 <param name="progress" type="IProgress" dir="return">
2426 <desc>Progress object to track the operation completion.</desc>
2427 </param>
2428 </method>
2429
2430 <method name="openExistingSession">
2431 <desc>
2432 Opens a new remote session with the virtual machine for
2433 which a direct session is already open.
2434
2435 The remote session provides some level of control over the VM
2436 execution (using the IConsole interface) to the caller; however,
2437 within the remote session context, not all VM settings are available
2438 for modification.
2439
2440 As opposed to <link to="#openRemoteSession()"/>, the number of
2441 remote sessions opened this way is not limited by the API
2442
2443 <note>
2444 It is an error to open a remote session with the machine that
2445 doesn't have an open direct session.
2446 </note>
2447
2448 <result name="E_UNEXPECTED">
2449 Virtual machine not registered.
2450 </result>
2451 <result name="VBOX_E_OBJECT_NOT_FOUND">
2452 No machine matching @a machineId found.
2453 </result>
2454 <result name="VBOX_E_INVALID_OBJECT_STATE">
2455 Session already open or being opened.
2456 </result>
2457 <result name="VBOX_E_INVALID_SESSION_STATE">
2458 Direct session state not Open.
2459 </result>
2460 <result name="VBOX_E_VM_ERROR">
2461 Failed to get console object from direct session or assign
2462 machine to session.
2463 </result>
2464
2465 <see>openRemoteSession</see>
2466 </desc>
2467 <param name="session" type="ISession" dir="in">
2468 <desc>
2469 Session object that will represent the open remote session
2470 after successful method invocation. This object must not
2471 represent an already open session.
2472 <note>
2473 This session will be automatically closed when the peer
2474 (direct) session dies or gets closed.
2475 </note>
2476 </desc>
2477 </param>
2478 <param name="machineId" type="uuid" dir="in">
2479 <desc>ID of the virtual machine to open a session with.</desc>
2480 </param>
2481 </method>
2482
2483 <method name="registerCallback">
2484 <desc>
2485 Registers a new global VirtualBox callback. The methods of the given
2486 callback object will be called by VirtualBox when an appropriate
2487 event occurs.
2488
2489 <result name="E_INVALIDARG">
2490 Registering a @c NULL @a callback is pretty pointless, ain't it?
2491 <!-- See if someone is actually reading this and objects :-) -->
2492 </result>
2493
2494 </desc>
2495 <param name="callback" type="IVirtualBoxCallback" dir="in">
2496 <desc>Callback object to register.</desc>
2497 </param>
2498 </method>
2499
2500 <method name="unregisterCallback">
2501 <desc>
2502 Unregisters the previously registered global VirtualBox callback.
2503
2504 <result name="E_INVALIDARG">
2505 Specified @a callback not registered.
2506 </result>
2507
2508 </desc>
2509 <param name="callback" type="IVirtualBoxCallback" dir="in">
2510 <desc>Callback object to unregister.</desc>
2511 </param>
2512 </method>
2513
2514 <method name="waitForPropertyChange">
2515 <desc>
2516 Blocks the caller until any of the properties represented by the @a
2517 what argument changes the value or until the given timeout interval
2518 expires.
2519
2520 The @a what argument is a comma separated list of property masks that
2521 describe properties the caller is interested in. The property mask is
2522 a string in the following format:
2523
2524 <pre>
2525 [[group.]subgroup.]name
2526 </pre>
2527
2528 where @c name is the property name and @c group, @c subgroup are zero
2529 or more property group specifiers. Each element (group or name) in
2530 the property mask may be either a Latin string or an asterisk symbol
2531 (@c "*") which is used to match any string for the given element. A
2532 property mask that doesn't contain asterisk symbols represents a
2533 single fully qualified property name.
2534
2535 Groups in the fully qualified property name go from more generic (the
2536 left-most part) to more specific (the right-most part). The first
2537 element is usually a name of the object the property belongs to. The
2538 second element may be either a property name, or a child object name,
2539 or an index if the preceding element names an object which is one of
2540 many objects of the same type. This way, property names form a
2541 hierarchy of properties. Here are some examples of property names:
2542
2543 <table>
2544 <tr>
2545 <td><tt>VirtualBox.version</tt></td>
2546 <td><link to="IVirtualBox::version"/> property</td>
2547 </tr>
2548 <tr>
2549 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2550 <td><link to="IMachine::name"/> property of the machine with the
2551 given UUID</td>
2552 </tr>
2553 </table>
2554
2555 Most property names directly correspond to the properties of objects
2556 (components) provided by the VirtualBox library and may be used to
2557 track changes to these properties. However, there may be
2558 pseudo-property names that don't correspond to any existing object's
2559 property directly, as well as there may be object properties that
2560 don't have a corresponding property name that is understood by this
2561 method, and therefore changes to such properties cannot be
2562 tracked. See individual object's property descriptions to get a
2563 fully qualified property name that can be used with this method (if
2564 any).
2565
2566 There is a special property mask @c "*" (i.e. a string consisting of a
2567 single asterisk symbol) that can be used to match all properties.
2568 Below are more examples of property masks:
2569
2570 <table>
2571 <tr>
2572 <td><tt>VirtualBox.*</tt></td>
2573 <td>Track all properties of the VirtualBox object</td>
2574 </tr>
2575 <tr>
2576 <td><tt>Machine.*.name</tt></td>
2577 <td>Track changes to the <link to="IMachine::name"/> property of
2578 all registered virtual machines</td>
2579 </tr>
2580 </table>
2581
2582 <note>
2583 This function is not implemented in the current version of the
2584 product.
2585 </note>
2586 </desc>
2587 <param name="what" type="wstring" dir="in">
2588 <desc>Comma separated list of property masks.</desc>
2589 </param>
2590 <param name="timeout" type="unsigned long" dir="in">
2591 <desc>
2592 Wait timeout in milliseconds.
2593 Specify -1 for an indefinite wait.
2594 </desc>
2595 </param>
2596 <param name="changed" type="wstring" dir="out">
2597 <desc>
2598 Comma separated list of properties that have been changed and caused
2599 this method to return to the caller.
2600 </desc>
2601 </param>
2602 <param name="values" type="wstring" dir="out">
2603 <desc>Reserved, not currently used.</desc>
2604 </param>
2605 </method>
2606
2607 <method name="saveSettings">
2608 <desc>
2609 Saves the global settings to the global settings file
2610 (<link to="#settingsFilePath"/>).
2611
2612 This method is only useful for explicitly saving the global settings
2613 file after it has been auto-converted from the old format to the most
2614 recent format (see <link to="#settingsFileVersion"/> for details).
2615 Normally, the global settings file is implicitly saved when a global
2616 setting is changed.
2617
2618 <result name="VBOX_E_FILE_ERROR">
2619 Settings file not accessible.
2620 </result>
2621 <result name="VBOX_E_XML_ERROR">
2622 Could not parse the settings file.
2623 </result>
2624
2625 </desc>
2626 </method>
2627
2628 <method name="saveSettingsWithBackup">
2629 <desc>
2630 Creates a backup copy of the global settings file
2631 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2632 calls <link to="#saveSettings()"/>.
2633
2634 Note that the backup copy is created <b>only</b> if the settings file
2635 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2636 details). Otherwise, this call is fully equivalent to
2637 <link to="#saveSettings()"/> and no backup copying is done.
2638
2639 The backup copy is created in the same directory where the original
2640 settings file is located. It is given the following file name:
2641 <pre>
2642 original.xml.x.y-platform.bak
2643 </pre>
2644 where <tt>original.xml</tt> is the original settings file name
2645 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2646 format of the settings file (before auto-conversion).
2647
2648 If the given backup file already exists, this method will try to add the
2649 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2650 0 to 9) and copy it again until it succeeds. If all suffixes are
2651 occupied, or if any other copy error occurs, this method will return a
2652 failure.
2653
2654 If the copy operation succeeds, the @a bakFileName return argument will
2655 receive a full path to the created backup file (for informational
2656 purposes). Note that this will happen even if the subsequent
2657 <link to="#saveSettings()"/> call performed by this method after the
2658 copy operation, fails.
2659
2660 <note>
2661 The VirtualBox API never calls this method. It is intended purely for
2662 the purposes of creating backup copies of the settings files by
2663 front-ends before saving the results of the automatically performed
2664 settings conversion to disk.
2665 </note>
2666
2667 <see>settingsFileVersion</see>
2668
2669 <result name="VBOX_E_FILE_ERROR">
2670 Settings file not accessible.
2671 </result>
2672 <result name="VBOX_E_XML_ERROR">
2673 Could not parse the settings file.
2674 </result>
2675 <result name="VBOX_E_IPRT_ERROR">
2676 Could not copy the settings file.
2677 </result>
2678
2679 </desc>
2680 <param name="bakFileName" type="wstring" dir="return">
2681 <desc>Full path to the created backup copy.</desc>
2682 </param>
2683 </method>
2684
2685 </interface>
2686
2687 <!--
2688 // IMachine
2689 /////////////////////////////////////////////////////////////////////////
2690 -->
2691
2692 <enumerator
2693 name="IMachineEnumerator" type="IMachine"
2694 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2695 />
2696
2697 <collection
2698 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2699 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2700 readonly="yes"
2701 />
2702
2703 <interface
2704 name="IInternalMachineControl" extends="$unknown"
2705 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2706 internal="yes"
2707 wsmap="suppress"
2708 >
2709 <method name="updateState">
2710 <desc>
2711 Updates the VM state.
2712 <note>
2713 This operation will also update the settings file with
2714 the correct information about the saved state file
2715 and delete this file from disk when appropriate.
2716 </note>
2717 </desc>
2718 <param name="state" type="MachineState" dir="in"/>
2719 </method>
2720
2721 <method name="getIPCId">
2722 <param name="id" type="wstring" dir="return"/>
2723 </method>
2724
2725 <method name="runUSBDeviceFilters">
2726 <desc>
2727 Asks the server to run USB devices filters of the associated
2728 machine against the given USB device and tell if there is
2729 a match.
2730 <note>
2731 Intended to be used only for remote USB devices. Local
2732 ones don't require to call this method (this is done
2733 implicitly by the Host and USBProxyService).
2734 </note>
2735 </desc>
2736 <param name="device" type="IUSBDevice" dir="in"/>
2737 <param name="matched" type="boolean" dir="out"/>
2738 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2739 </method>
2740
2741 <method name="captureUSBDevice">
2742 <desc>
2743 Requests a capture of the given host USB device.
2744 When the request is completed, the VM process will
2745 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2746 notification.
2747 </desc>
2748 <param name="id" type="uuid" dir="in"/>
2749 </method>
2750
2751 <method name="detachUSBDevice">
2752 <desc>
2753 Notification that a VM is going to detach (done = false) or has
2754 already detached (done = true) the given USB device.
2755 When the done = true request is completed, the VM process will
2756 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2757 notification.
2758 <note>
2759 In the done = true case, the server must run its own filters
2760 and filters of all VMs but this one on the detached device
2761 as if it were just attached to the host computer.
2762 </note>
2763 </desc>
2764 <param name="id" type="uuid" dir="in"/>
2765 <param name="done" type="boolean" dir="in"/>
2766 </method>
2767
2768 <method name="autoCaptureUSBDevices">
2769 <desc>
2770 Requests a capture all matching USB devices attached to the host.
2771 When the request is completed, the VM process will
2772 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2773 notification per every captured device.
2774 </desc>
2775 </method>
2776
2777 <method name="detachAllUSBDevices">
2778 <desc>
2779 Notification that a VM that is being powered down. The done
2780 parameter indicates whether which stage of the power down
2781 we're at. When done = false the VM is announcing its
2782 intentions, while when done = true the VM is reporting
2783 what it has done.
2784 <note>
2785 In the done = true case, the server must run its own filters
2786 and filters of all VMs but this one on all detach devices as
2787 if they were just attached to the host computer.
2788 </note>
2789 </desc>
2790 <param name="done" type="boolean" dir="in"/>
2791 </method>
2792
2793 <method name="onSessionEnd">
2794 <desc>
2795 Triggered by the given session object when the session is about
2796 to close normally.
2797 </desc>
2798 <param name="session" type="ISession" dir="in">
2799 <desc>Session that is being closed</desc>
2800 </param>
2801 <param name="progress" type="IProgress" dir="return">
2802 <desc>
2803 Used to wait until the corresponding machine is actually
2804 dissociated from the given session on the server.
2805 Returned only when this session is a direct one.
2806 </desc>
2807 </param>
2808 </method>
2809
2810 <method name="beginSavingState">
2811 <desc>
2812 Called by the VM process to inform the server it wants to
2813 save the current state and stop the VM execution.
2814 </desc>
2815 <param name="progress" type="IProgress" dir="in">
2816 <desc>
2817 Progress object created by the VM process to wait until
2818 the state is saved.
2819 </desc>
2820 </param>
2821 <param name="stateFilePath" type="wstring" dir="out">
2822 <desc>
2823 File path the VM process must save the execution state to.
2824 </desc>
2825 </param>
2826 </method>
2827
2828 <method name="endSavingState">
2829 <desc>
2830 Called by the VM process to inform the server that saving
2831 the state previously requested by #beginSavingState is either
2832 successfully finished or there was a failure.
2833
2834 <result name="VBOX_E_FILE_ERROR">
2835 Settings file not accessible.
2836 </result>
2837 <result name="VBOX_E_XML_ERROR">
2838 Could not parse the settings file.
2839 </result>
2840
2841 </desc>
2842
2843 <param name="success" type="boolean" dir="in">
2844 <desc><tt>true</tt> to indicate success and <tt>false</tt>
2845 otherwise.
2846 </desc>
2847 </param>
2848 </method>
2849
2850 <method name="adoptSavedState">
2851 <desc>
2852 Gets called by IConsole::adoptSavedState.
2853 <result name="VBOX_E_FILE_ERROR">
2854 Invalid saved state file path.
2855 </result>
2856 </desc>
2857 <param name="savedStateFile" type="wstring" dir="in">
2858 <desc>Path to the saved state file to adopt.</desc>
2859 </param>
2860 </method>
2861
2862 <method name="beginTakingSnapshot">
2863 <desc>
2864 Called by the VM process to inform the server it wants to
2865 take a snapshot.
2866
2867 <result name="VBOX_E_FILE_ERROR">
2868 Settings file not accessible.
2869 </result>
2870 <result name="VBOX_E_XML_ERROR">
2871 Could not parse the settings file.
2872 </result>
2873 </desc>
2874 <param name="initiator" type="IConsole" dir="in">
2875 <desc>The console object that initiated this call.</desc>
2876 </param>
2877 <param name="name" type="wstring" dir="in">
2878 <desc>Snapshot name.</desc>
2879 </param>
2880 <param name="description" type="wstring" dir="in">
2881 <desc>Snapshot description.</desc>
2882 </param>
2883 <param name="progress" type="IProgress" dir="in">
2884 <desc>
2885 Progress object created by the VM process to wait until
2886 the state is saved (only for online snapshots).
2887 </desc>
2888 </param>
2889 <param name="stateFilePath" type="wstring" dir="out">
2890 <desc>
2891 File path the VM process must save the execution state to.
2892 </desc>
2893 </param>
2894 <param name="serverProgress" type="IProgress" dir="out">
2895 <desc>
2896 Progress object created by the server process to wait until
2897 the snapshot is taken (VDI diff creation, etc.).
2898 </desc>
2899 </param>
2900 </method>
2901
2902 <method name="endTakingSnapshot">
2903 <desc>
2904 Called by the VM process to inform the server that the snapshot
2905 previously requested by #beginTakingSnapshot is either
2906 successfully taken or there was a failure.
2907 </desc>
2908
2909 <param name="success" type="boolean" dir="in">
2910 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2911 </param>
2912 </method>
2913
2914 <method name="discardSnapshot">
2915 <desc>
2916 Gets called by IConsole::discardSnapshot.
2917 <result name="VBOX_E_INVALID_OBJECT_STATE">
2918 Snapshot has more than one child snapshot.
2919 </result>
2920 </desc>
2921 <param name="initiator" type="IConsole" dir="in">
2922 <desc>The console object that initiated this call.</desc>
2923 </param>
2924 <param name="id" type="uuid" dir="in">
2925 <desc>UUID of the snapshot to discard.</desc>
2926 </param>
2927 <param name="machineState" type="MachineState" dir="out">
2928 <desc>New machine state after this operation is started.</desc>
2929 </param>
2930 <param name="progress" type="IProgress" dir="return">
2931 <desc>Progress object to track the operation completion.</desc>
2932 </param>
2933 </method>
2934
2935 <method name="discardCurrentState">
2936 <desc>
2937 Gets called by IConsole::discardCurrentState.
2938 <result name="VBOX_E_INVALID_OBJECT_STATE">
2939 Virtual machine does not have any snapshot.
2940 </result>
2941 </desc>
2942 <param name="initiator" type="IConsole" dir="in">
2943 <desc>The console object that initiated this call.</desc>
2944 </param>
2945 <param name="machineState" type="MachineState" dir="out">
2946 <desc>New machine state after this operation is started.</desc>
2947 </param>
2948 <param name="progress" type="IProgress" dir="return">
2949 <desc>Progress object to track the operation completion.</desc>
2950 </param>
2951 </method>
2952
2953 <method name="discardCurrentSnapshotAndState">
2954 <desc>
2955 Gets called by IConsole::discardCurrentSnapshotAndState.
2956 <result name="VBOX_E_INVALID_OBJECT_STATE">
2957 Virtual machine does not have any snapshot.
2958 </result>
2959 </desc>
2960 <param name="initiator" type="IConsole" dir="in">
2961 <desc>The console object that initiated this call.</desc>
2962 </param>
2963 <param name="machineState" type="MachineState" dir="out">
2964 <desc>New machine state after this operation is started.</desc>
2965 </param>
2966 <param name="progress" type="IProgress" dir="return">
2967 <desc>Progress object to track the operation completion.</desc>
2968 </param>
2969 </method>
2970
2971 <method name="pullGuestProperties">
2972 <desc>
2973 Get the list of the guest properties matching a set of patterns along
2974 with their values, time stamps and flags and give responsibility for
2975 managing properties to the console.
2976 </desc>
2977 <param name="name" type="wstring" dir="out" safearray="yes">
2978 <desc>
2979 The names of the properties returned.
2980 </desc>
2981 </param>
2982 <param name="value" type="wstring" dir="out" safearray="yes">
2983 <desc>
2984 The values of the properties returned. The array entries match the
2985 corresponding entries in the @a name array.
2986 </desc>
2987 </param>
2988 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2989 <desc>
2990 The time stamps of the properties returned. The array entries match
2991 the corresponding entries in the @a name array.
2992 </desc>
2993 </param>
2994 <param name="flags" type="wstring" dir="out" safearray="yes">
2995 <desc>
2996 The flags of the properties returned. The array entries match the
2997 corresponding entries in the @a name array.
2998 </desc>
2999 </param>
3000 </method>
3001
3002 <method name="pushGuestProperties">
3003 <desc>
3004 Set the list of the guest properties matching a set of patterns along
3005 with their values, time stamps and flags and return responsibility for
3006 managing properties to IMachine.
3007 </desc>
3008 <param name="name" type="wstring" dir="in" safearray="yes">
3009 <desc>
3010 The names of the properties.
3011 </desc>
3012 </param>
3013 <param name="value" type="wstring" dir="in" safearray="yes">
3014 <desc>
3015 The values of the properties. The array entries match the
3016 corresponding entries in the @a name array.
3017 </desc>
3018 </param>
3019 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3020 <desc>
3021 The time stamps of the properties. The array entries match
3022 the corresponding entries in the @a name array.
3023 </desc>
3024 </param>
3025 <param name="flags" type="wstring" dir="in" safearray="yes">
3026 <desc>
3027 The flags of the properties. The array entries match the
3028 corresponding entries in the @a name array.
3029 </desc>
3030 </param>
3031 </method>
3032 <method name="pushGuestProperty">
3033 <desc>
3034 Update a single guest property in IMachine.
3035 </desc>
3036 <param name="name" type="wstring" dir="in">
3037 <desc>
3038 The name of the property to be updated.
3039 </desc>
3040 </param>
3041 <param name="value" type="wstring" dir="in">
3042 <desc>
3043 The value of the property.
3044 </desc>
3045 </param>
3046 <param name="timestamp" type="unsigned long long" dir="in">
3047 <desc>
3048 The timestamp of the property.
3049 </desc>
3050 </param>
3051 <param name="flags" type="wstring" dir="in">
3052 <desc>
3053 The flags of the property.
3054 </desc>
3055 </param>
3056 </method>
3057 </interface>
3058
3059 <interface
3060 name="IBIOSSettings" extends="$unknown"
3061 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3062 wsmap="managed"
3063 >
3064 <desc>
3065 The IBIOSSettings interface represents BIOS settings of the virtual
3066 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3067 </desc>
3068 <attribute name="logoFadeIn" type="boolean">
3069 <desc>Fade in flag for BIOS logo animation.</desc>
3070 </attribute>
3071
3072 <attribute name="logoFadeOut" type="boolean">
3073 <desc>Fade out flag for BIOS logo animation.</desc>
3074 </attribute>
3075
3076 <attribute name="logoDisplayTime" type="unsigned long">
3077 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3078 </attribute>
3079
3080 <attribute name="logoImagePath" type="wstring">
3081 <desc>Local file system path for external BIOS image.</desc>
3082 </attribute>
3083
3084 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3085 <desc>Mode of the BIOS boot device menu.</desc>
3086 </attribute>
3087
3088 <attribute name="ACPIEnabled" type="boolean">
3089 <desc>ACPI support flag.</desc>
3090 </attribute>
3091
3092 <attribute name="IOAPICEnabled" type="boolean">
3093 <desc>
3094 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3095 and support IRQs above 15.
3096 </desc>
3097 </attribute>
3098
3099 <attribute name="timeOffset" type="long long">
3100 <desc>
3101 Offset in milliseconds from the host system time. This allows for
3102 guests running with a different system date/time than the host.
3103 It is equivalent to setting the system date/time in the BIOS except
3104 it is not an absolute value but a relative one. Guest Additions
3105 time synchronization honors this offset.
3106 </desc>
3107 </attribute>
3108
3109 <attribute name="PXEDebugEnabled" type="boolean">
3110 <desc>
3111 PXE debug logging flag. If set, VirtualBox will write extensive
3112 PXE trace information to the release log.
3113 </desc>
3114 </attribute>
3115
3116 <attribute name="IDEControllerType" type="IDEControllerType">
3117 <desc>
3118 Type of the virtual IDE controller. Depending on this value,
3119 VirtualBox will provide different virtual IDE hardware
3120 devices to the guest.
3121 </desc>
3122 </attribute>
3123
3124 </interface>
3125
3126 <interface
3127 name="IMachine" extends="$unknown"
3128 uuid="a744b229-3457-422f-8550-649c40346c55"
3129 wsmap="managed"
3130 >
3131 <desc>
3132 The IMachine interface represents a virtual machine, or guest, created
3133 in VirtualBox.
3134
3135 This interface is used in two contexts. First of all, a collection of
3136 objects implementing this interface is stored in the
3137 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3138 machines that are currently registered with this VirtualBox
3139 installation. Also, once a session has been opened for the given virtual
3140 machine (e.g. the virtual machine is running), the machine object
3141 associated with the open session can be queried from the session object;
3142 see <link to="ISession"/> for details.
3143
3144 The main role of this interface is to expose the settings of the virtual
3145 machine and provide methods to change various aspects of the virtual
3146 machine's configuration. For machine objects stored in the
3147 <link to="IVirtualBox::machines2"/> collection, all attributes are
3148 read-only unless explicitly stated otherwise in individual attribute
3149 and method descriptions. In order to change a machine setting, a session
3150 for this machine must be opened using one of
3151 <link to="IVirtualBox::openSession"/>,
3152 <link to="IVirtualBox::openRemoteSession"/> or
3153 <link to="IVirtualBox::openExistingSession"/> methods. After the
3154 session has been successfully opened, a mutable machine object needs to
3155 be queried from the session object and then the desired settings changes
3156 can be applied to the returned object using IMachine attributes and
3157 methods. See the ISession interface description for more information
3158 about sessions.
3159
3160 Note that the IMachine interface does not provide methods to control
3161 virtual machine execution (such as start the machine, or power it
3162 down) -- these methods are grouped in a separate IConsole
3163 interface. Refer to the IConsole interface description to get more
3164 information about this topic.
3165
3166 <see>ISession, IConsole</see>
3167 </desc>
3168
3169 <attribute name="parent" type="IVirtualBox" readonly="yes">
3170 <desc>Associated parent object.</desc>
3171 </attribute>
3172
3173 <attribute name="accessible" type="boolean" readonly="yes">
3174 <desc>
3175 Whether this virtual machine is currently accessible or not.
3176
3177 The machine is considered to be inaccessible when:
3178 <ul>
3179 <li>It is a registered virtual machine, and
3180 </li>
3181 <li>Its settings file is inaccessible (for example, it is
3182 located on a network share that is not accessible during
3183 VirtualBox startup, or becomes inaccessible later, or if
3184 the settings file can be read but is invalid).
3185 </li>
3186 </ul>
3187
3188 Otherwise, the value of this property is always <tt>true</tt>.
3189
3190 Every time this property is read, the accessibility state of
3191 this machine is re-evaluated. If the returned value is |false|,
3192 the <link to="#accessError"/> property may be used to get the
3193 detailed error information describing the reason of
3194 inaccessibility.
3195
3196 When the machine is inaccessible, only the following properties
3197 can be used on it:
3198 <ul>
3199 <li><link to="#parent"/></li>
3200 <li><link to="#id"/></li>
3201 <li><link to="#settingsFilePath"/></li>
3202 <li><link to="#accessible"/></li>
3203 <li><link to="#accessError"/></li>
3204 </ul>
3205
3206 An attempt to access any other property or method will return
3207 an error.
3208
3209 The only possible action you can perform on an inaccessible
3210 machine is to unregister it using the
3211 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3212 for the accessibility state once more by querying this
3213 property).
3214
3215 <note>
3216 In the current implementation, once this property returns
3217 <tt>true</tt>, the machine will never become inaccessible
3218 later, even if its settings file cannot be successfully
3219 read/written any more (at least, until the VirtualBox
3220 server is restarted). This limitation may be removed in
3221 future releases.
3222 </note>
3223 </desc>
3224 </attribute>
3225
3226 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3227 <desc>
3228 Error information describing the reason of machine
3229 inaccessibility.
3230
3231 Reading this property is only valid after the last call to
3232 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3233 machine is currently unaccessible). Otherwise, a null
3234 IVirtualBoxErrorInfo object will be returned.
3235 </desc>
3236 </attribute>
3237
3238 <attribute name="name" type="wstring">
3239 <desc>
3240 Name of the virtual machine.
3241
3242 Besides being used for human-readable identification purposes
3243 everywhere in VirtualBox, the virtual machine name is also used
3244 as a name of the machine's settings file and as a name of the
3245 subdirectory this settings file resides in. Thus, every time you
3246 change the value of this property, the settings file will be
3247 renamed once you call <link to="#saveSettings()"/> to confirm the
3248 change. The containing subdirectory will be also renamed, but
3249 only if it has exactly the same name as the settings file
3250 itself prior to changing this property (for backward compatibility
3251 with previous API releases). The above implies the following
3252 limitations:
3253 <ul>
3254 <li>The machine name cannot be empty.</li>
3255 <li>The machine name can contain only characters that are valid
3256 file name characters according to the rules of the file
3257 system used to store VirtualBox configuration.</li>
3258 <li>You cannot have two or more machines with the same name
3259 if they use the same subdirectory for storing the machine
3260 settings files.</li>
3261 <li>You cannot change the name of the machine if it is running,
3262 or if any file in the directory containing the settings file
3263 is being used by another running machine or by any other
3264 process in the host operating system at a time when
3265 <link to="#saveSettings()"/> is called.
3266 </li>
3267 </ul>
3268 If any of the above limitations are hit, <link to="#saveSettings()"/>
3269 will return an appropriate error message explaining the exact
3270 reason and the changes you made to this machine will not be
3271 saved.
3272 <note>
3273 For "legacy" machines created using the
3274 <link to="IVirtualBox::createLegacyMachine()"/> call,
3275 the above naming limitations do not apply because the
3276 machine name does not affect the settings file name.
3277 The settings file name remains the same as it was specified
3278 during machine creation and never changes.
3279 </note>
3280 </desc>
3281 </attribute>
3282
3283 <attribute name="description" type="wstring">
3284 <desc>
3285 Description of the virtual machine.
3286
3287 The description attribute can contain any text and is
3288 typically used to describe the hardware and software
3289 configuration of the virtual machine in detail (i.e. network
3290 settings, versions of the installed software and so on).
3291 </desc>
3292 </attribute>
3293
3294 <attribute name="id" type="uuid" readonly="yes">
3295 <desc>UUID of the virtual machine.</desc>
3296 </attribute>
3297
3298 <attribute name="OSTypeId" type="wstring">
3299 <desc>
3300 User-defined identifier of the Guest OS type.
3301 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3302 an IGuestOSType object representing details about the given
3303 Guest OS type.
3304 <note>
3305 This value may differ from the value returned by
3306 <link to="IGuest::OSTypeId"/> if Guest Additions are
3307 installed to the guest OS.
3308 </note>
3309 </desc>
3310 </attribute>
3311
3312 <attribute name="CPUCount" type="unsigned long">
3313 <desc>Number of virtual CPUs in the VM.</desc>
3314 </attribute>
3315
3316 <attribute name="memorySize" type="unsigned long">
3317 <desc>System memory size in megabytes.</desc>
3318 </attribute>
3319
3320 <attribute name="memoryBalloonSize" type="unsigned long">
3321 <desc>Initial memory balloon size in megabytes.</desc>
3322 </attribute>
3323
3324 <attribute name="statisticsUpdateInterval" type="unsigned long">
3325 <desc>Initial interval to update guest statistics in seconds.</desc>
3326 </attribute>
3327
3328 <attribute name="VRAMSize" type="unsigned long">
3329 <desc>Video memory size in megabytes.</desc>
3330 </attribute>
3331
3332 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3333 <desc>
3334 This setting determines whether VirtualBox allows guests to make use
3335 of the 3D graphics support available on the host. Currently limited
3336 to OpenGL only. </desc>
3337 </attribute>
3338
3339 <attribute name="monitorCount" type="unsigned long">
3340 <desc>
3341 Number of virtual monitors.
3342 <note>
3343 Only effective on Windows XP and later guests with
3344 Guest Additions installed.
3345 </note>
3346 </desc>
3347 </attribute>
3348
3349 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3350 <desc>Object containing all BIOS settings.</desc>
3351 </attribute>
3352
3353 <attribute name="HWVirtExEnabled" type="TSBool">
3354 <desc>
3355 This setting determines whether VirtualBox will try to make use of
3356 the host CPU's hardware virtualization extensions such as Intel VT-x
3357 and AMD-V. Note that in case such extensions are not available,
3358 they will not be used.
3359 </desc>
3360 </attribute>
3361
3362 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3363 <desc>
3364 This setting determines whether VirtualBox will try to make use of
3365 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3366 such extensions are not available, they will not be used.
3367 </desc>
3368 </attribute>
3369
3370 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3371 <desc>
3372 This setting determines whether VirtualBox will try to make use of
3373 the VPID extension of Intel VT-x. Note that in case such extensions are
3374 not available, they will not be used.
3375 </desc>
3376 </attribute>
3377
3378 <attribute name="PAEEnabled" type="boolean" default="false">
3379 <desc>
3380 This setting determines whether VirtualBox will expose the Physical Address
3381 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3382 is not available, it will not be reported.
3383 </desc>
3384 </attribute>
3385
3386 <attribute name="snapshotFolder" type="wstring">
3387 <desc>
3388 Full path to the directory used to store snapshot data
3389 (differencing hard disks and saved state files) of this machine.
3390
3391 The initial value of this property is
3392 <tt>&lt;</tt><link to="#settingsFilePath">
3393 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3394 <link to="#id">machine_uuid</link>
3395 <tt>&gt;</tt>.
3396
3397 Currently, it is an error to try to change this property on
3398 a machine that has snapshots (because this would require to
3399 move possibly large files to a different location).
3400 A separate method will be available for this purpose later.
3401
3402 <note>
3403 Setting this property to <tt>null</tt> will restore the
3404 initial value.
3405 </note>
3406 <note>
3407 When setting this property, the specified path can be
3408 absolute (full path) or relative to the directory where the
3409 <link to="#settingsFilePath">machine settings file</link>
3410 is located. When reading this property, a full path is
3411 always returned.
3412 </note>
3413 <note>
3414 The specified path may not exist, it will be created
3415 when necessary.
3416 </note>
3417 </desc>
3418 </attribute>
3419
3420 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3421 <desc>VRDP server object.</desc>
3422 </attribute>
3423
3424 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3425 <desc>Array of hard disks attached to this machine.</desc>
3426 </attribute>
3427
3428 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3429 <desc>Associated DVD drive object.</desc>
3430 </attribute>
3431
3432 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3433 <desc>Associated floppy drive object.</desc>
3434 </attribute>
3435
3436 <attribute name="USBController" type="IUSBController" readonly="yes">
3437 <desc>
3438 Associated USB controller object.
3439
3440 <note>
3441 This method may set a @ref com_warnings "warning result code".
3442 </note>
3443 <note>
3444 If USB functionality is not available in the given edition of
3445 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3446 </note>
3447 </desc>
3448 </attribute>
3449
3450 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3451 <desc>Associated audio adapter, always present.</desc>
3452 </attribute>
3453
3454 <attribute name="SATAController" type="ISATAController" readonly="yes">
3455 <desc>
3456 Associated SATA controller object.
3457 </desc>
3458 </attribute>
3459
3460 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3461 <desc>
3462 Full name of the file containing machine settings data.
3463 </desc>
3464 </attribute>
3465
3466 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3467 <desc>
3468 Current version of the format of the settings file of this machine
3469 (<link to="#settingsFilePath"/>).
3470
3471 The version string has the following format:
3472 <pre>
3473 x.y-platform
3474 </pre>
3475 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3476 versions, and <tt>platform</tt> is the platform identifier.
3477
3478 The current version usually matches the value of the
3479 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3480 settings file was created by an older version of VirtualBox and there
3481 was a change of the settings file format since then.
3482
3483 Note that VirtualBox automatically converts settings files from older
3484 versions to the most recent version when reading them (usually at
3485 VirtualBox startup) but it doesn't save the changes back until
3486 you call a method that implicitly saves settings (such as
3487 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3488 explicitly. Therefore, if the value of this attribute differs from the
3489 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3490 means that the settings file was converted but the result of the
3491 conversion is not yet saved to disk.
3492
3493 The above feature may be used by interactive front-ends to inform users
3494 about the settings file format change and offer them to explicitly save
3495 all converted settings files (the global and VM-specific ones),
3496 optionally create backup copies of the old settings files before saving,
3497 etc.
3498
3499 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3500 </desc>
3501 </attribute>
3502
3503 <attribute name="settingsModified" type="boolean" readonly="yes">
3504 <desc>
3505 Whether the settings of this machine have been modified
3506 (but neither yet saved nor discarded).
3507 <note>
3508 Reading this property is only valid on instances returned
3509 by <link to="ISession::machine"/> and on new machines
3510 created by <link to="IVirtualBox::createMachine"/> or opened
3511 by <link to="IVirtualBox::openMachine"/> but not
3512 yet registered, or on unregistered machines after calling
3513 <link to="IVirtualBox::unregisterMachine"/>. For all other
3514 cases, the settings can never be modified.
3515 </note>
3516 <note>
3517 For newly created unregistered machines, the value of this
3518 property is always TRUE until <link to="#saveSettings()"/>
3519 is called (no matter if any machine settings have been
3520 changed after the creation or not). For opened machines
3521 the value is set to FALSE (and then follows to normal rules).
3522 </note>
3523 </desc>
3524 </attribute>
3525
3526 <attribute name="sessionState" type="SessionState" readonly="yes">
3527 <desc>Current session state for this machine.</desc>
3528 </attribute>
3529
3530 <attribute name="sessionType" type="wstring" readonly="yes">
3531 <desc>
3532 Type of the session. If <link to="#sessionState"/> is
3533 SessionSpawning or SessionOpen, this attribute contains the
3534 same value as passed to the
3535 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3536 type parameter. If the session was opened directly using
3537 <link to="IVirtualBox::openSession()"/>, or if
3538 <link to="#sessionState"/> is SessionClosed, the value of this
3539 attribute is @c null.
3540 </desc>
3541 </attribute>
3542
3543 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3544 <desc>
3545 Identifier of the session process. This attribute contains the
3546 platform-dependent identifier of the process that has opened a
3547 direct session for this machine using the
3548 <link to="IVirtualBox::openSession()"/> call. The returned value
3549 is only valid if <link to="#sessionState"/> is SessionOpen or
3550 SessionClosing (i.e. a session is currently open or being
3551 closed) by the time this property is read.
3552 </desc>
3553 </attribute>
3554
3555 <attribute name="state" type="MachineState" readonly="yes">
3556 <desc>Current execution state of this machine.</desc>
3557 </attribute>
3558
3559 <attribute name="lastStateChange" type="long long" readonly="yes">
3560 <desc>
3561 Time stamp of the last execution state change,
3562 in milliseconds since 1970-01-01 UTC.
3563 </desc>
3564 </attribute>
3565
3566 <attribute name="stateFilePath" type="wstring" readonly="yes">
3567 <desc>
3568 Full path to the file that stores the execution state of
3569 the machine when it is in the <link to="MachineState_Saved"/> state.
3570 <note>
3571 When the machine is not in the Saved state, this attribute
3572 <tt>null</tt>.
3573 </note>
3574 </desc>
3575 </attribute>
3576
3577 <attribute name="logFolder" type="wstring" readonly="yes">
3578 <desc>
3579 Full path to the folder that stores a set of rotated log files
3580 recorded during machine execution. The most recent log file is
3581 named <tt>VBox.log</tt>, the previous log file is
3582 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3583 in the current version).
3584 </desc>
3585 </attribute>
3586
3587 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3588 <desc>
3589 Current snapshot of this machine.
3590 <note>
3591 A <tt>null</tt> object is returned if the machine doesn't
3592 have snapshots.
3593 </note>
3594 <see><link to="ISnapshot"/></see>
3595 </desc>
3596 </attribute>
3597
3598 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3599 <desc>
3600 Number of snapshots taken on this machine. Zero means the
3601 machine doesn't have any snapshots.
3602 </desc>
3603 </attribute>
3604
3605 <attribute name="currentStateModified" type="boolean" readonly="yes">
3606 <desc>
3607 Returns <tt>true</tt> if the current state of the machine is not
3608 identical to the state stored in the current snapshot.
3609
3610 The current state is identical to the current snapshot right
3611 after one of the following calls are made:
3612 <ul>
3613 <li><link to="IConsole::discardCurrentState"/> or
3614 <link to="IConsole::discardCurrentSnapshotAndState"/>
3615 </li>
3616 <li><link to="IConsole::takeSnapshot"/> (issued on a
3617 powered off or saved machine, for which
3618 <link to="#settingsModified"/> returns <tt>false</tt>)
3619 </li>
3620 <li><link to="IMachine::setCurrentSnapshot"/>
3621 </li>
3622 </ul>
3623
3624 The current state remains identical until one of the following
3625 happens:
3626 <ul>
3627 <li>settings of the machine are changed</li>
3628 <li>the saved state is discarded</li>
3629 <li>the current snapshot is discarded</li>
3630 <li>an attempt to execute the machine is made</li>
3631 </ul>
3632
3633 <note>
3634 For machines that don't have snapshots, this property is
3635 always <tt>false</tt>.
3636 </note>
3637 </desc>
3638 </attribute>
3639
3640 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3641 <desc>
3642 Collection of shared folders for this machine (permanent shared
3643 folders). These folders are shared automatically at machine startup
3644 and available only to the guest OS installed within this machine.
3645
3646 New shared folders are added to the collection using
3647 <link to="#createSharedFolder"/>. Existing shared folders can be
3648 removed using <link to="#removeSharedFolder"/>.
3649 </desc>
3650 </attribute>
3651
3652 <attribute name="clipboardMode" type="ClipboardMode">
3653 <desc>
3654 Synchronization mode between the host OS clipboard
3655 and the guest OS clipboard.
3656 </desc>
3657 </attribute>
3658
3659 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3660 <desc>
3661 A comma-separated list of simple glob patterns. Changes to guest
3662 properties whose name matches one of the patterns will generate an
3663 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3664 </desc>
3665 </attribute>
3666
3667 <method name="setBootOrder">
3668 <desc>
3669 Puts the given device to the specified position in
3670 the boot order.
3671
3672 To indicate that no device is associated with the given position,
3673 <link to="DeviceType_Null"/> should be used.
3674
3675 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3676
3677 <result name="E_INVALIDARG">
3678 Boot @a position out of range.
3679 </result>
3680 <result name="E_NOTIMPL">
3681 Booting from USB @a device currently not supported.
3682 </result>
3683
3684 </desc>
3685 <param name="position" type="unsigned long" dir="in">
3686 <desc>
3687 Position in the boot order (<tt>1</tt> to the total number of
3688 devices the machine can boot from, as returned by
3689 <link to="ISystemProperties::maxBootPosition"/>).
3690 </desc>
3691 </param>
3692 <param name="device" type="DeviceType" dir="in">
3693 <desc>
3694 The type of the device used to boot at the given position.
3695 </desc>
3696 </param>
3697 </method>
3698
3699 <method name="getBootOrder" const="yes">
3700 <desc>
3701 Returns the device type that occupies the specified
3702 position in the boot order.
3703
3704 @todo [remove?]
3705 If the machine can have more than one device of the returned type
3706 (such as hard disks), then a separate method should be used to
3707 retrieve the individual device that occupies the given position.
3708
3709 If here are no devices at the given position, then
3710 <link to="DeviceType_Null"/> is returned.
3711
3712 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3713
3714 <result name="E_INVALIDARG">
3715 Boot @a position out of range.
3716 </result>
3717
3718 </desc>
3719 <param name="position" type="unsigned long" dir="in">
3720 <desc>
3721 Position in the boot order (<tt>1</tt> to the total number of
3722 devices the machine can boot from, as returned by
3723 <link to="ISystemProperties::maxBootPosition"/>).
3724 </desc>
3725 </param>
3726 <param name="device" type="DeviceType" dir="return">
3727 <desc>
3728 Device at the given position.
3729 </desc>
3730 </param>
3731 </method>
3732
3733 <method name="attachHardDisk2">
3734 <desc>
3735 Attaches a virtual hard disk identified by the given UUID @a id
3736 to a device slot of the specified bus.
3737
3738 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3739 specify the primary or secondary IDE controller, respectively. The
3740 SATA bus supports 30 channels, so this parameter can be a number
3741 ranging from @c 0 to @c 29.
3742
3743 For the primary controller of the IDE bus, the @a device number can be
3744 either @c 0 or @c 1, to specify the master or the slave device,
3745 respectively. For the secondary IDE controller, the device number is
3746 always @c 1 because the master device is reserved for the CD-ROM drive.
3747
3748 For the SATA bus, the @a device parameter is currently unused and
3749 must be @c 0.
3750
3751 The specified device slot must not have another disk attached to it, or
3752 this method will fail.
3753
3754 See <link to="IHardDisk2"/> for more detailed information about
3755 attaching hard disks.
3756
3757 <note>
3758 You cannot attach a hard disk to a running machine. Also, you cannot
3759 attach a hard disk to a newly created machine until this machine's
3760 settings are saved to disk using <link to="#saveSettings()"/>.
3761 </note>
3762 <note>
3763 If the hard disk is being attached indirectly, a new differencing hard
3764 disk will implicitly be created for it and attached instead. If the
3765 changes made to the machine settings (including this indirect
3766 attachment) are later cancelled using <link to="#discardSettings()"/>,
3767 this implicitly created differencing hard disk will implicitly
3768 be deleted.
3769 </note>
3770
3771 <result name="E_INVALIDARG">
3772 SATA device, SATA channel, IDE channel or IDE slot out of range.
3773 </result>
3774 <result name="VBOX_E_INVALID_OBJECT_STATE">
3775 Attempt to attach hard disk to an unregistered virtual machine.
3776 </result>
3777 <result name="VBOX_E_INVALID_VM_STATE">
3778 Invalid machine state.
3779 </result>
3780 <result name="VBOX_E_OBJECT_IN_USE">
3781 Hard disk already attached to this or another virtual machine.
3782 </result>
3783
3784 </desc>
3785 <param name="id" type="uuid" dir="in">
3786 <desc>UUID of the hard disk to attach.</desc>
3787 </param>
3788 <param name="bus" type="StorageBus" dir="in">
3789 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3790 </param>
3791 <param name="channel" type="long" dir="in">
3792 <desc>Channel to attach the hard disk to.</desc>
3793 </param>
3794 <param name="device" type="long" dir="in">
3795 <desc>
3796 Device slot in the given channel to attach the hard disk to.
3797 </desc>
3798 </param>
3799 </method>
3800
3801 <method name="getHardDisk2" const="yes">
3802 <desc>
3803 Returns the virtual hard disk attached to a device slot of the specified
3804 bus.
3805
3806 Note that if the hard disk was indirectly attached by
3807 <link to="#attachHardDisk2()"/> to the given device slot then this
3808 method will return not the same object as passed to the
3809 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3810 more detailed information about attaching hard disks.
3811
3812 <result name="VBOX_E_OBJECT_NOT_FOUND">
3813 No hard disk attached to given slot/bus.
3814 </result>
3815
3816 </desc>
3817 <param name="bus" type="StorageBus" dir="in">
3818 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3819 </param>
3820 <param name="channel" type="long" dir="in">
3821 <desc>Channel to query.</desc>
3822 </param>
3823 <param name="device" type="long" dir="in">
3824 <desc>Device slot in the given channel to query.</desc>
3825 </param>
3826 <param name="hardDisk" type="IHardDisk2" dir="return">
3827 <desc>Attached hard disk object.</desc>
3828 </param>
3829 </method>
3830
3831 <method name="detachHardDisk2">
3832 <desc>
3833 Detaches the virtual hard disk attached to a device slot of the
3834 specified bus.
3835
3836 Detaching the hard disk from the virtual machine is deferred. This means
3837 that the hard disk remains associated with the machine when this method
3838 returns and gets actually de-associated only after a successful
3839 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3840 for more detailed information about attaching hard disks.
3841
3842 <note>
3843 You cannot detach the hard disk from a running machine.
3844 </note>
3845 <note>
3846 Detaching differencing hard disks implicitly created by <link
3847 to="#attachHardDisk2()"/> for the indirect attachment using this
3848 method will <b>not</b> implicitly delete them. The
3849 <link to="IHardDisk2::deleteStorage()"/> operation should be
3850 explicitly performed by the caller after the hard disk is successfully
3851 detached and the settings are saved with
3852 <link to="#saveSettings()"/>, if it is the desired action.
3853 </note>
3854
3855 <result name="VBOX_E_INVALID_VM_STATE">
3856 Attempt to detach hard disk from a running virtual machine.
3857 </result>
3858 <result name="VBOX_E_OBJECT_NOT_FOUND">
3859 No hard disk attached to given slot/bus.
3860 </result>
3861 <result name="VBOX_E_NOT_SUPPORTED">
3862 Hard disk format does not support storage deletion.
3863 </result>
3864
3865 </desc>
3866 <param name="bus" type="StorageBus" dir="in">
3867 <desc>Bus to detach the hard disk from.</desc>
3868 </param>
3869 <param name="channel" type="long" dir="in">
3870 <desc>Channel number to detach the hard disk from.</desc>
3871 </param>
3872 <param name="device" type="long" dir="in">
3873 <desc>Device slot number to detach the hard disk from.</desc>
3874 </param>
3875 </method>
3876
3877 <method name="getNetworkAdapter" const="yes">
3878 <desc>
3879 Returns the network adapter associated with the given slot.
3880 Slots are numbered sequentially, starting with zero. The total
3881 number of adapters per machine is defined by the
3882 <link to="ISystemProperties::networkAdapterCount"/> property,
3883 so the maximum slot number is one less than that property's value.
3884
3885 <result name="E_INVALIDARG">
3886 Invalid @a slot number.
3887 </result>
3888
3889 </desc>
3890 <param name="slot" type="unsigned long" dir="in"/>
3891 <param name="adapter" type="INetworkAdapter" dir="return"/>
3892 </method>
3893
3894 <method name="getSerialPort" const="yes">
3895 <desc>
3896 Returns the serial port associated with the given slot.
3897 Slots are numbered sequentially, starting with zero. The total
3898 number of serial ports per machine is defined by the
3899 <link to="ISystemProperties::serialPortCount"/> property,
3900 so the maximum slot number is one less than that property's value.
3901
3902 <result name="E_INVALIDARG">
3903 Invalid @a slot number.
3904 </result>
3905
3906 </desc>
3907 <param name="slot" type="unsigned long" dir="in"/>
3908 <param name="port" type="ISerialPort" dir="return"/>
3909 </method>
3910
3911 <method name="getParallelPort" const="yes">
3912 <desc>
3913 Returns the parallel port associated with the given slot.
3914 Slots are numbered sequentially, starting with zero. The total
3915 number of parallel ports per machine is defined by the
3916 <link to="ISystemProperties::parallelPortCount"/> property,
3917 so the maximum slot number is one less than that property's value.
3918
3919 <result name="E_INVALIDARG">
3920 Invalid @a slot number.
3921 </result>
3922
3923 </desc>
3924 <param name="slot" type="unsigned long" dir="in"/>
3925 <param name="port" type="IParallelPort" dir="return"/>
3926 </method>
3927
3928 <method name="getNextExtraDataKey">
3929 <desc>
3930 Returns the machine-specific extra data key name following the
3931 supplied key.
3932
3933 An error is returned if the supplied @a key does not exist. @c NULL is
3934 returned in @a nextKey if the supplied key is the last key. When
3935 supplying @c NULL for the @a key, the first key item is returned in @a
3936 nextKey (if there is any). @a nextValue is an optional parameter and
3937 if supplied, the next key's value is returned in it.
3938
3939 <result name="VBOX_E_OBJECT_NOT_FOUND">
3940 Extra data @a key not found.
3941 </result>
3942
3943 </desc>
3944 <param name="key" type="wstring" dir="in">
3945 <desc>Name of the data key to follow.</desc>
3946 </param>
3947 <param name="nextKey" type="wstring" dir="out">
3948 <desc>Name of the next data key.</desc>
3949 </param>
3950 <param name="nextValue" type="wstring" dir="out">
3951 <desc>Value of the next data key.</desc>
3952 </param>
3953 </method>
3954
3955 <method name="getExtraData">
3956 <desc>
3957 Returns associated machine-specific extra data.
3958
3959 If the requested data @a key does not exist, this function will
3960 succeed and return @c NULL in the @a value argument.
3961
3962 <result name="VBOX_E_FILE_ERROR">
3963 Settings file not accessible.
3964 </result>
3965 <result name="VBOX_E_XML_ERROR">
3966 Could not parse the settings file.
3967 </result>
3968
3969 </desc>
3970 <param name="key" type="wstring" dir="in">
3971 <desc>Name of the data key to get.</desc>
3972 </param>
3973 <param name="value" type="wstring" dir="return">
3974 <desc>Value of the requested data key.</desc>
3975 </param>
3976 </method>
3977
3978 <method name="setExtraData">
3979 <desc>
3980 Sets associated machine-specific extra data.
3981
3982 If you pass @c NULL as a key @a value, the given @a key will be
3983 deleted.
3984
3985 <note>
3986 Before performing the actual data change, this method will ask all
3987 registered callbacks using the
3988 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3989 notification for a permission. If one of the callbacks refuses the
3990 new value, the change will not be performed.
3991 </note>
3992 <note>
3993 On success, the
3994 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3995 is called to inform all registered callbacks about a successful data
3996 change.
3997 </note>
3998 <note>
3999 This method can be called outside the machine session and therefore
4000 it's a caller's responsibility to handle possible race conditions
4001 when several clients change the same key at the same time.
4002 </note>
4003
4004 <result name="VBOX_E_FILE_ERROR">
4005 Settings file not accessible.
4006 </result>
4007 <result name="VBOX_E_XML_ERROR">
4008 Could not parse the settings file.
4009 </result>
4010
4011 </desc>
4012 <param name="key" type="wstring" dir="in">
4013 <desc>Name of the data key to set.</desc>
4014 </param>
4015 <param name="value" type="wstring" dir="in">
4016 <desc>Value to assign to the key.</desc>
4017 </param>
4018 </method>
4019
4020 <method name="saveSettings">
4021 <desc>
4022 Saves any changes to machine settings made since the session
4023 has been opened or a new machine has been created, or since the
4024 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4025 For registered machines, new settings become visible to all
4026 other VirtualBox clients after successful invocation of this
4027 method.
4028 <note>
4029 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4030 notification event after the configuration has been successfully
4031 saved (only for registered machines).
4032 </note>
4033 <note>
4034 Calling this method is only valid on instances returned
4035 by <link to="ISession::machine"/> and on new machines
4036 created by <link to="IVirtualBox::createMachine"/> but not
4037 yet registered, or on unregistered machines after calling
4038 <link to="IVirtualBox::unregisterMachine"/>.
4039 </note>
4040
4041 <result name="VBOX_E_FILE_ERROR">
4042 Settings file not accessible.
4043 </result>
4044 <result name="VBOX_E_XML_ERROR">
4045 Could not parse the settings file.
4046 </result>
4047 <result name="E_ACCESSDENIED">
4048 Modification request refused.
4049 </result>
4050
4051 </desc>
4052 </method>
4053
4054 <method name="saveSettingsWithBackup">
4055 <desc>
4056 Creates a backup copy of the machine settings file (<link
4057 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4058 <link to="#saveSettings()"/>.
4059
4060 Note that the backup copy is created <b>only</b> if the settings file
4061 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4062 details). Otherwise, this call is fully equivalent to
4063 <link to="#saveSettings()"/> and no backup copying is done.
4064
4065 The backup copy is created in the same directory where the original
4066 settings file is located. It is given the following file name:
4067 <pre>
4068 original.xml.x.y-platform.bak
4069 </pre>
4070 where <tt>original.xml</tt> is the original settings file name
4071 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4072 format of the settings file (before auto-conversion).
4073
4074 If the given backup file already exists, this method will try to add the
4075 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4076 0 to 9) and copy it again until it succeeds. If all suffixes are
4077 occupied, or if any other copy error occurs, this method will return a
4078 failure.
4079
4080 If the copy operation succeeds, the @a bakFileName return argument will
4081 receive a full path to the created backup file (for informational
4082 purposes). Note that this will happen even if the subsequent
4083 <link to="#saveSettings()"/> call performed by this method after the
4084 copy operation, fails.
4085
4086 <note>
4087 The VirtualBox API never calls this method. It is intended purely for
4088 the purposes of creating backup copies of the settings files by
4089 front-ends before saving the results of the automatically performed
4090 settings conversion to disk.
4091 </note>
4092
4093 <see>settingsFileVersion</see>
4094
4095 <result name="VBOX_E_FILE_ERROR">
4096 Settings file not accessible.
4097 </result>
4098 <result name="VBOX_E_XML_ERROR">
4099 Could not parse the settings file.
4100 </result>
4101 <result name="VBOX_E_INVALID_VM_STATE">
4102 Virtual machine is not mutable.
4103 </result>
4104 <result name="E_ACCESSDENIED">
4105 Modification request refused.
4106 </result>
4107
4108 </desc>
4109 <param name="bakFileName" type="wstring" dir="return">
4110 <desc>Full path to the created backup copy.</desc>
4111 </param>
4112 </method>
4113
4114 <method name="discardSettings">
4115 <desc>
4116 Discards any changes to the machine settings made since the session
4117 has been opened or since the last call to <link to="#saveSettings()"/>
4118 or <link to="#discardSettings"/>.
4119 <note>
4120 Calling this method is only valid on instances returned
4121 by <link to="ISession::machine"/> and on new machines
4122 created by <link to="IVirtualBox::createMachine"/> or
4123 opened by <link to="IVirtualBox::openMachine"/> but not
4124 yet registered, or on unregistered machines after calling
4125 <link to="IVirtualBox::unregisterMachine"/>.
4126 </note>
4127
4128 <result name="VBOX_E_INVALID_VM_STATE">
4129 Virtual machine is not mutable.
4130 </result>
4131
4132 </desc>
4133 </method>
4134
4135 <method name="deleteSettings">
4136 <desc>
4137 Deletes the settings file of this machine from disk.
4138 The machine must not be registered in order for this operation
4139 to succeed.
4140 <note>
4141 <link to="#settingsModified"/> will return TRUE after this
4142 method successfully returns.
4143 </note>
4144 <note>
4145 Calling this method is only valid on instances returned
4146 by <link to="ISession::machine"/> and on new machines
4147 created by <link to="IVirtualBox::createMachine"/> or
4148 opened by <link to="IVirtualBox::openMachine"/> but not
4149 yet registered, or on unregistered machines after calling
4150 <link to="IVirtualBox::unregisterMachine"/>.
4151 </note>
4152 <note>
4153 The deleted machine settings file can be restored (saved again)
4154 by calling <link to="#saveSettings()"/>.
4155 </note>
4156
4157 <result name="VBOX_E_INVALID_VM_STATE">
4158 Cannot delete settings of a registered machine or
4159 machine not mutable.
4160 </result>
4161 <result name="VBOX_E_IPRT_ERROR">
4162 Could not delete the settings file.
4163 </result>
4164
4165 </desc>
4166 </method>
4167
4168 <method name="getSnapshot">
4169 <desc>
4170 Returns a snapshot of this machine with the given UUID.
4171 A <tt>null</tt> UUID can be used to obtain the first snapshot
4172 taken on this machine. This is useful if you want to traverse
4173 the whole tree of snapshots starting from the root.
4174
4175 <result name="VBOX_E_OBJECT_NOT_FOUND">
4176 Virtual machine has no snapshots or snapshot not found.
4177 </result>
4178
4179 </desc>
4180 <param name="id" type="uuid" dir="in">
4181 <desc>UUID of the snapshot to get</desc>
4182 </param>
4183 <param name="snapshot" type="ISnapshot" dir="return">
4184 <desc>Snapshot object with the given UUID.</desc>
4185 </param>
4186 </method>
4187
4188 <method name="findSnapshot">
4189 <desc>
4190 Returns a snapshot of this machine with the given name.
4191
4192 <result name="VBOX_E_OBJECT_NOT_FOUND">
4193 Virtual machine has no snapshots or snapshot not found.
4194 </result>
4195
4196 </desc>
4197 <param name="name" type="wstring" dir="in">
4198 <desc>Name of the snapshot to find</desc>
4199 </param>
4200 <param name="snapshot" type="ISnapshot" dir="return">
4201 <desc>Snapshot object with the given name.</desc>
4202 </param>
4203 </method>
4204
4205 <method name="setCurrentSnapshot">
4206 <desc>
4207 Sets the current snapshot of this machine.
4208 <note>
4209 In the current implementation, this operation is not
4210 implemented.
4211 </note>
4212 </desc>
4213 <param name="id" type="uuid" dir="in">
4214 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4215 </param>
4216 </method>
4217
4218 <method name="createSharedFolder">
4219 <desc>
4220 Creates a new permanent shared folder by associating the given logical
4221 name with the given host path, adds it to the collection of shared
4222 folders and starts sharing it. Refer to the description of
4223 <link to="ISharedFolder"/> to read more about logical names.
4224
4225 <result name="VBOX_E_OBJECT_IN_USE">
4226 Shared folder already exists.
4227 </result>
4228 <result name="VBOX_E_FILE_ERROR">
4229 Shared folder @a hostPath not accessible.
4230 </result>
4231
4232 </desc>
4233 <param name="name" type="wstring" dir="in">
4234 <desc>Unique logical name of the shared folder.</desc>
4235 </param>
4236 <param name="hostPath" type="wstring" dir="in">
4237 <desc>Full path to the shared folder in the host file system.</desc>
4238 </param>
4239 <param name="writable" type="boolean" dir="in">
4240 <desc>Whether the share is writable or readonly</desc>
4241 </param>
4242 </method>
4243
4244 <method name="removeSharedFolder">
4245 <desc>
4246 Removes the permanent shared folder with the given name previously
4247 created by <link to="#createSharedFolder"/> from the collection of
4248 shared folders and stops sharing it.
4249
4250 <result name="VBOX_E_INVALID_VM_STATE">
4251 Virtual machine is not mutable.
4252 </result>
4253 <result name="VBOX_E_OBJECT_NOT_FOUND">
4254 Shared folder @a name does not exist.
4255 </result>
4256
4257 </desc>
4258 <param name="name" type="wstring" dir="in">
4259 <desc>Logical name of the shared folder to remove.</desc>
4260 </param>
4261 </method>
4262
4263 <method name="canShowConsoleWindow">
4264 <desc>
4265 Returns @c true if the VM console process can activate the
4266 console window and bring it to foreground on the desktop of
4267 the host PC.
4268 <note>
4269 This method will fail if a session for this machine is not
4270 currently open.
4271 </note>
4272
4273 <result name="VBOX_E_INVALID_VM_STATE">
4274 Machine session is not open.
4275 </result>
4276
4277 </desc>
4278 <param name="canShow" type="boolean" dir="return">
4279 <desc>
4280 @c true if the console window can be shown and @c
4281 false otherwise.
4282 </desc>
4283 </param>
4284 </method>
4285
4286 <method name="showConsoleWindow">
4287 <desc>
4288 Activates the console window and brings it to foreground on
4289 the desktop of the host PC. Many modern window managers on
4290 many platforms implement some sort of focus stealing
4291 prevention logic, so that it may be impossible to activate
4292 a window without the help of the currently active
4293 application. In this case, this method will return a non-zero
4294 identifier that represents the top-level window of the VM
4295 console process. The caller, if it represents a currently
4296 active process, is responsible to use this identifier (in a
4297 platform-dependent manner) to perform actual window
4298 activation.
4299 <note>
4300 This method will fail if a session for this machine is not
4301 currently open.
4302 </note>
4303
4304 <result name="VBOX_E_INVALID_VM_STATE">
4305 Machine session is not open.
4306 </result>
4307
4308 </desc>
4309 <param name="winId" type="unsigned long long" dir="return">
4310 <desc>
4311 Platform-dependent identifier of the top-level VM console
4312 window, or zero if this method has performed all actions
4313 necessary to implement the <i>show window</i> semantics for
4314 the given platform and/or VirtualBox front-end.
4315 </desc>
4316 </param>
4317 </method>
4318
4319 <method name="getGuestProperty">
4320 <desc>
4321 Reads an entry from the machine's guest property store.
4322
4323 <result name="VBOX_E_INVALID_VM_STATE">
4324 Machine session is not open.
4325 </result>
4326
4327 </desc>
4328 <param name="name" type="wstring" dir="in">
4329 <desc>
4330 The name of the property to read.
4331 </desc>
4332 </param>
4333 <param name="value" type="wstring" dir="out">
4334 <desc>
4335 The value of the property. If the property does not exist then this
4336 will be empty.
4337 </desc>
4338 </param>
4339 <param name="timestamp" type="unsigned long long" dir="out">
4340 <desc>
4341 The time at which the property was last modified, as seen by the
4342 server process.
4343 </desc>
4344 </param>
4345 <param name="flags" type="wstring" dir="out">
4346 <desc>
4347 Additional property parameters, passed as a comma-separated list of
4348 "name=value" type entries.
4349 </desc>
4350 </param>
4351 </method>
4352
4353 <method name="getGuestPropertyValue">
4354 <desc>
4355 Reads a value from the machine's guest property store.
4356
4357 <result name="VBOX_E_INVALID_VM_STATE">
4358 Machine session is not open.
4359 </result>
4360
4361 </desc>
4362 <param name="property" type="wstring" dir="in">
4363 <desc>
4364 The name of the property to read.
4365 </desc>
4366 </param>
4367 <param name="value" type="wstring" dir="return">
4368 <desc>
4369 The value of the property. If the property does not exist then this
4370 will be empty.
4371 </desc>
4372 </param>
4373 </method>
4374
4375 <method name="getGuestPropertyTimestamp">
4376 <desc>
4377 Reads a property timestamp from the machine's guest property store.
4378
4379 <result name="VBOX_E_INVALID_VM_STATE">
4380 Machine session is not open.
4381 </result>
4382
4383 </desc>
4384 <param name="property" type="wstring" dir="in">
4385 <desc>
4386 The name of the property to read.
4387 </desc>
4388 </param>
4389 <param name="value" type="unsigned long long" dir="return">
4390 <desc>
4391 The timestamp. If the property does not exist then this will be
4392 empty.
4393 </desc>
4394 </param>
4395 </method>
4396
4397 <method name="setGuestProperty">
4398 <desc>
4399 Sets, changes or deletes an entry in the machine's guest property
4400 store.
4401
4402 <result name="E_ACCESSDENIED">
4403 Property cannot be changed.
4404 </result>
4405 <result name="E_INVALIDARG">
4406 Invalid @a flags.
4407 </result>
4408 <result name="VBOX_E_INVALID_VM_STATE">
4409 Virtual machine is not mutable or session not open.
4410 </result>
4411 <result name="VBOX_E_INVALID_OBJECT_STATE">
4412 Cannot set transient property when machine not running.
4413 </result>
4414
4415 </desc>
4416 <param name="property" type="wstring" dir="in">
4417 <desc>
4418 The name of the property to set, change or delete.
4419 </desc>
4420 </param>
4421 <param name="value" type="wstring" dir="in">
4422 <desc>
4423 The new value of the property to set, change or delete. If the
4424 property does not yet exist and value is non-empty, it will be
4425 created. If the value is empty, the key will be deleted if it
4426 exists.
4427 </desc>
4428 </param>
4429 <param name="flags" type="wstring" dir="in">
4430 <desc>
4431 Additional property parameters, passed as a comma-separated list of
4432 "name=value" type entries.
4433 </desc>
4434 </param>
4435 </method>
4436
4437 <method name="setGuestPropertyValue">
4438 <desc>
4439 Sets, changes or deletes a value in the machine's guest property
4440 store. The flags field will be left unchanged or created empty for a
4441 new property.
4442
4443 <result name="E_ACCESSDENIED">
4444 Property cannot be changed.
4445 </result>
4446 <result name="VBOX_E_INVALID_VM_STATE">
4447 Virtual machine is not mutable or session not open.
4448 </result>
4449 <result name="VBOX_E_INVALID_OBJECT_STATE">
4450 Cannot set transient property when machine not running.
4451 </result>
4452 </desc>
4453
4454 <param name="property" type="wstring" dir="in">
4455 <desc>
4456 The name of the property to set, change or delete.
4457 </desc>
4458 </param>
4459 <param name="value" type="wstring" dir="in">
4460 <desc>
4461 The new value of the property to set, change or delete. If the
4462 property does not yet exist and value is non-empty, it will be
4463 created. If value is empty, the property will be deleted if it
4464 exists.
4465 </desc>
4466 </param>
4467 </method>
4468
4469 <method name="enumerateGuestProperties">
4470 <desc>
4471 Return a list of the guest properties matching a set of patterns along
4472 with their values, time stamps and flags.
4473 </desc>
4474 <param name="patterns" type="wstring" dir="in">
4475 <desc>
4476 The patterns to match the properties against, separated by '|'
4477 characters. If this is empty or NULL, all properties will match.
4478 </desc>
4479 </param>
4480 <param name="name" type="wstring" dir="out" safearray="yes">
4481 <desc>
4482 The names of the properties returned.
4483 </desc>
4484 </param>
4485 <param name="value" type="wstring" dir="out" safearray="yes">
4486 <desc>
4487 The values of the properties returned. The array entries match the
4488 corresponding entries in the @a name array.
4489 </desc>
4490 </param>
4491 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4492 <desc>
4493 The time stamps of the properties returned. The array entries match
4494 the corresponding entries in the @a name array.
4495 </desc>
4496 </param>
4497 <param name="flags" type="wstring" dir="out" safearray="yes">
4498 <desc>
4499 The flags of the properties returned. The array entries match the
4500 corresponding entries in the @a name array.
4501 </desc>
4502 </param>
4503 </method>
4504</interface>
4505
4506 <!--
4507 // IConsole
4508 /////////////////////////////////////////////////////////////////////////
4509 -->
4510
4511 <interface
4512 name="IConsoleCallback" extends="$unknown"
4513 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4514 wsmap="suppress"
4515 >
4516
4517 <method name="onMousePointerShapeChange">
4518 <desc>
4519 Notification when the guest mouse pointer shape has
4520 changed. The new shape data is given.
4521 </desc>
4522 <param name="visible" type="boolean" dir="in">
4523 <desc>
4524 Flag whether the pointer is visible.
4525 </desc>
4526 </param>
4527 <param name="alpha" type="boolean" dir="in">
4528 <desc>
4529 Flag whether the pointer has an alpha channel.
4530 </desc>
4531 </param>
4532 <param name="xHot" type="unsigned long" dir="in">
4533 <desc>
4534 The pointer hot spot x coordinate.
4535 </desc>
4536 </param>
4537 <param name="yHot" type="unsigned long" dir="in">
4538 <desc>
4539 The pointer hot spot y coordinate.
4540 </desc>
4541 </param>
4542 <param name="width" type="unsigned long" dir="in">
4543 <desc>
4544 Width of the pointer shape in pixels.
4545 </desc>
4546 </param>
4547 <param name="height" type="unsigned long" dir="in">
4548 <desc>
4549 Height of the pointer shape in pixels.
4550 </desc>
4551 </param>
4552 <param name="shape" type="octet" mod="ptr" dir="in">
4553 <desc>
4554 Address of the shape buffer.
4555
4556 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
4557 followed by a 32-bpp XOR (color) mask.
4558
4559 For pointers without alpha channel the XOR mask pixels are 32
4560 bit values: (lsb)BGR0(msb). For pointers with alpha channel
4561 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
4562
4563 An AND mask is used for pointers with alpha channel, so if the
4564 callback does not support alpha, the pointer could be
4565 displayed as a normal color pointer.
4566
4567 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
4568 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
4569 height</tt>. The padding bits at the end of each scanline are
4570 undefined.
4571
4572 The XOR mask follows the AND mask on the next 4-byte aligned
4573 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
4574 Bytes in the gap between the AND and the XOR mask are undefined.
4575 The XOR mask scanlines have no gap between them and the size of
4576 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
4577
4578 <note>
4579 If @a shape is 0, only the pointer visibility is changed.
4580 </note>
4581 </desc>
4582 </param>
4583 </method>
4584
4585 <method name="onMouseCapabilityChange">
4586 <desc>
4587 Notification when the mouse capabilities reported by the
4588 guest have changed. The new capabilities are passed.
4589 </desc>
4590 <param name="supportsAbsolute" type="boolean" dir="in"/>
4591 <param name="needsHostCursor" type="boolean" dir="in"/>
4592 </method>
4593
4594 <method name="onKeyboardLedsChange">
4595 <desc>
4596 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4597 to alter the state of the keyboard LEDs.
4598 </desc>
4599 <param name="numLock" type="boolean" dir="in"/>
4600 <param name="capsLock" type="boolean" dir="in"/>
4601 <param name="scrollLock" type="boolean" dir="in"/>
4602 </method>
4603
4604 <method name="onStateChange">
4605 <desc>
4606 Notification when the execution state of the machine has changed.
4607 The new state will be given.
4608 </desc>
4609 <param name="state" type="MachineState" dir="in"/>
4610 </method>
4611
4612 <method name="onAdditionsStateChange">
4613 <desc>
4614 Notification when a Guest Additions property changes.
4615 Interested callees should query IGuest attributes to
4616 find out what has changed.
4617 </desc>
4618 </method>
4619
4620 <method name="onDVDDriveChange">
4621 <desc>
4622 Notification when a property of the
4623 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4624 Interested callees should use IDVDDrive methods to find out what has
4625 changed.
4626 </desc>
4627 </method>
4628
4629 <method name="onFloppyDriveChange">
4630 <desc>
4631 Notification when a property of the
4632 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4633 Interested callees should use IFloppyDrive methods to find out what
4634 has changed.
4635 </desc>
4636 </method>
4637
4638 <method name="onNetworkAdapterChange">
4639 <desc>
4640 Notification when a property of one of the
4641 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4642 changes. Interested callees should use INetworkAdapter methods and
4643 attributes to find out what has changed.
4644 </desc>
4645 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4646 <desc>Network adapter that is subject to change.</desc>
4647 </param>
4648 </method>
4649
4650 <method name="onSerialPortChange">
4651 <desc>
4652 Notification when a property of one of the
4653 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4654 Interested callees should use ISerialPort methods and attributes
4655 to find out what has changed.
4656 </desc>
4657 <param name="serialPort" type="ISerialPort" dir="in">
4658 <desc>Serial port that is subject to change.</desc>
4659 </param>
4660 </method>
4661
4662 <method name="onParallelPortChange">
4663 <desc>
4664 Notification when a property of one of the
4665 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4666 changes. Interested callees should use ISerialPort methods and
4667 attributes to find out what has changed.
4668 </desc>
4669 <param name="parallelPort" type="IParallelPort" dir="in">
4670 <desc>Parallel port that is subject to change.</desc>
4671 </param>
4672 </method>
4673
4674 <method name="onVRDPServerChange">
4675 <desc>
4676 Notification when a property of the
4677 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4678 Interested callees should use IVRDPServer methods and attributes to
4679 find out what has changed.
4680 </desc>
4681 </method>
4682
4683 <method name="onUSBControllerChange">
4684 <desc>
4685 Notification when a property of the virtual
4686 <link to="IMachine::USBController">USB controller</link> changes.
4687 Interested callees should use IUSBController methods and attributes to
4688 find out what has changed.
4689 </desc>
4690 </method>
4691
4692 <method name="onUSBDeviceStateChange">
4693 <desc>
4694 Notification when a USB device is attached to or detached from
4695 the virtual USB controller.
4696
4697 This notification is sent as a result of the indirect
4698 request to attach the device because it matches one of the
4699 machine USB filters, or as a result of the direct request
4700 issued by <link to="IConsole::attachUSBDevice"/> or
4701 <link to="IConsole::detachUSBDevice"/>.
4702
4703 This notification is sent in case of both a succeeded and a
4704 failed request completion. When the request succeeds, the @a
4705 error parameter is @c null, and the given device has been
4706 already added to (when @a attached is @c true) or removed from
4707 (when @a attached is @c false) the collection represented by
4708 <link to="IConsole::USBDevices"/>. On failure, the collection
4709 doesn't change and the @a error parameter represents the error
4710 message describing the failure.
4711
4712 </desc>
4713 <param name="device" type="IUSBDevice" dir="in">
4714 <desc>Device that is subject to state change.</desc>
4715 </param>
4716 <param name="attached" type="boolean" dir="in">
4717 <desc>
4718 <tt>true</tt> if the device was attached
4719 and <tt>false</tt> otherwise.
4720 </desc>
4721 </param>
4722 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4723 <desc>
4724 <tt>null</tt> on success or an error message object on
4725 failure.
4726 </desc>
4727 </param>
4728 </method>
4729
4730 <method name="onSharedFolderChange">
4731 <desc>
4732 Notification when a shared folder is added or removed.
4733 The @a scope argument defines one of three scopes:
4734 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4735 (<link to="Scope_Global">Global</link>),
4736 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4737 the machine (<link to="Scope_Machine">Machine</link>) or <link
4738 to="IConsole::sharedFolders">transient shared folders</link> of the
4739 machine (<link to="Scope_Session">Session</link>). Interested callees
4740 should use query the corresponding collections to find out what has
4741 changed.
4742 </desc>
4743 <param name="scope" type="Scope" dir="in">
4744 <desc>Scope of the notification.</desc>
4745 </param>
4746 </method>
4747
4748 <method name="onRuntimeError">
4749 <desc>
4750 Notification when an error happens during the virtual
4751 machine execution.
4752
4753 There are three kinds of runtime errors:
4754 <ul>
4755 <li><i>fatal</i></li>
4756 <li><i>non-fatal with retry</i></li>
4757 <li><i>non-fatal warnings</i></li>
4758 </ul>
4759
4760 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4761 to <tt>true</tt>. In case of fatal errors, the virtual machine
4762 execution is always paused before calling this notification, and
4763 the notification handler is supposed either to immediately save
4764 the virtual machine state using <link to="IConsole::saveState()"/>
4765 or power it off using <link to="IConsole::powerDown()"/>.
4766 Resuming the execution can lead to unpredictable results.
4767
4768 <b>Non-fatal</b> errors and warnings are indicated by the
4769 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4770 is in the Paused state by the time the error notification is
4771 received, it means that the user can <i>try to resume</i> the machine
4772 execution after attempting to solve the problem that caused the
4773 error. In this case, the notification handler is supposed
4774 to show an appropriate message to the user (depending on the
4775 value of the @a id parameter) that offers several actions such
4776 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4777 wants to retry, the notification handler should continue
4778 the machine execution using the <link to="IConsole::resume()"/>
4779 call. If the machine execution is not Paused during this
4780 notification, then it means this notification is a <i>warning</i>
4781 (for example, about a fatal condition that can happen very soon);
4782 no immediate action is required from the user, the machine
4783 continues its normal execution.
4784
4785 Note that in either case the notification handler
4786 <b>must not</b> perform any action directly on a thread
4787 where this notification is called. Everything it is allowed to
4788 do is to post a message to another thread that will then talk
4789 to the user and take the corresponding action.
4790
4791 Currently, the following error identifiers are known:
4792 <ul>
4793 <li><tt>"HostMemoryLow"</tt></li>
4794 <li><tt>"HostAudioNotResponding"</tt></li>
4795 <li><tt>"VDIStorageFull"</tt></li>
4796 </ul>
4797
4798 <note>
4799 This notification is not designed to be implemented by
4800 more than one callback at a time. If you have multiple
4801 IConsoleCallback instances registered on the given
4802 IConsole object, make sure you simply do nothing but
4803 return @c S_OK from all but one of them that does actual
4804 user notification and performs necessary actions.
4805 </note>
4806
4807 </desc>
4808 <param name="fatal" type="boolean" dir="in">
4809 <desc>Whether the error is fatal or not</desc>
4810 </param>
4811 <param name="id" type="wstring" dir="in">
4812 <desc>Error identifier</desc>
4813 </param>
4814 <param name="message" type="wstring" dir="in">
4815 <desc>Optional error message</desc>
4816 </param>
4817 </method>
4818
4819 <method name="onCanShowWindow">
4820 <desc>
4821 Notification when a call to
4822 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4823 front-end to check if a subsequent call to
4824 <link to="IMachine::showConsoleWindow()"/> can succeed.
4825
4826 The callee should give an answer appropriate to the current
4827 machine state in the @a canShow argument. This answer must
4828 remain valid at least until the next
4829 <link to="IConsole::state">machine state</link> change.
4830
4831 <note>
4832 This notification is not designed to be implemented by
4833 more than one callback at a time. If you have multiple
4834 IConsoleCallback instances registered on the given
4835 IConsole object, make sure you simply do nothing but
4836 return @c true and @c S_OK from all but one of them that
4837 actually manages console window activation.
4838 </note>
4839 </desc>
4840 <param name="canShow" type="boolean" dir="return">
4841 <desc>
4842 @c true if the console window can be shown and @c
4843 false otherwise.
4844 </desc>
4845 </param>
4846 </method>
4847
4848 <method name="onShowWindow">
4849 <desc>
4850 Notification when a call to
4851 <link to="IMachine::showConsoleWindow()"/>
4852 requests the console window to be activated and brought to
4853 foreground on the desktop of the host PC.
4854
4855 This notification should cause the VM console process to
4856 perform the requested action as described above. If it is
4857 impossible to do it at a time of this notification, this
4858 method should return a failure.
4859
4860 Note that many modern window managers on many platforms
4861 implement some sort of focus stealing prevention logic, so
4862 that it may be impossible to activate a window without the
4863 help of the currently active application (which is supposedly
4864 an initiator of this notification). In this case, this method
4865 must return a non-zero identifier that represents the
4866 top-level window of the VM console process. The caller, if it
4867 represents a currently active process, is responsible to use
4868 this identifier (in a platform-dependent manner) to perform
4869 actual window activation.
4870
4871 This method must set @a winId to zero if it has performed all
4872 actions necessary to complete the request and the console
4873 window is now active and in foreground, to indicate that no
4874 further action is required on the caller's side.
4875
4876 <note>
4877 This notification is not designed to be implemented by
4878 more than one callback at a time. If you have multiple
4879 IConsoleCallback instances registered on the given
4880 IConsole object, make sure you simply do nothing but
4881 return @c S_OK from all but one of them that actually
4882 manages console window activation.
4883 </note>
4884 </desc>
4885 <param name="winId" type="unsigned long long" dir="return">
4886 <desc>
4887 Platform-dependent identifier of the top-level VM console
4888 window, or zero if this method has performed all actions
4889 necessary to implement the <i>show window</i> semantics for
4890 the given platform and/or this VirtualBox front-end.
4891 </desc>
4892 </param>
4893 </method>
4894
4895 </interface>
4896
4897 <interface
4898 name="IRemoteDisplayInfo" extends="$unknown"
4899 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4900 wsmap="struct"
4901 >
4902 <desc>
4903 Contains information about the remote display (VRDP) capabilities and status.
4904 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4905 </desc>
4906
4907 <attribute name="active" type="boolean" readonly="yes">
4908 <desc>
4909 Whether the remote display connection is active.
4910 </desc>
4911 </attribute>
4912
4913 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4914 <desc>
4915 How many times a client connected.
4916 </desc>
4917 </attribute>
4918
4919 <attribute name="beginTime" type="long long" readonly="yes">
4920 <desc>
4921 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4922 </desc>
4923 </attribute>
4924
4925 <attribute name="endTime" type="long long" readonly="yes">
4926 <desc>
4927 When the last connection was terminated or the current time, if
4928 connection is still active, in milliseconds since 1970-01-01 UTC.
4929 </desc>
4930 </attribute>
4931
4932 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4933 <desc>
4934 How many bytes were sent in last or current, if still active, connection.
4935 </desc>
4936 </attribute>
4937
4938 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4939 <desc>
4940 How many bytes were sent in all connections.
4941 </desc>
4942 </attribute>
4943
4944 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4945 <desc>
4946 How many bytes were received in last or current, if still active, connection.
4947 </desc>
4948 </attribute>
4949
4950 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4951 <desc>
4952 How many bytes were received in all connections.
4953 </desc>
4954 </attribute>
4955
4956 <attribute name="user" type="wstring" readonly="yes">
4957 <desc>
4958 Login user name supplied by the client.
4959 </desc>
4960 </attribute>
4961
4962 <attribute name="domain" type="wstring" readonly="yes">
4963 <desc>
4964 Login domain name supplied by the client.
4965 </desc>
4966 </attribute>
4967
4968 <attribute name="clientName" type="wstring" readonly="yes">
4969 <desc>
4970 The client name supplied by the client.
4971 </desc>
4972 </attribute>
4973
4974 <attribute name="clientIP" type="wstring" readonly="yes">
4975 <desc>
4976 The IP address of the client.
4977 </desc>
4978 </attribute>
4979
4980 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4981 <desc>
4982 The client software version number.
4983 </desc>
4984 </attribute>
4985
4986 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4987 <desc>
4988 Public key exchange method used when connection was established.
4989 Values: 0 - RDP4 public key exchange scheme.
4990 1 - X509 certificates were sent to client.
4991 </desc>
4992 </attribute>
4993
4994 </interface>
4995
4996 <interface
4997 name="IConsole" extends="$unknown"
4998 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
4999 wsmap="managed"
5000 >
5001 <desc>
5002 The IConsole interface represents an interface to control virtual
5003 machine execution.
5004
5005 The console object that implements the IConsole interface is obtained
5006 from a session object after the session for the given machine has been
5007 opened using one of <link to="IVirtualBox::openSession"/>,
5008 <link to="IVirtualBox::openRemoteSession"/> or
5009 <link to="IVirtualBox::openExistingSession"/> methods.
5010
5011 Methods of the IConsole interface allow the caller to query the current
5012 virtual machine execution state, pause the machine or power it down, save
5013 the machine state or take a snapshot, attach and detach removable media
5014 and so on.
5015
5016 <see>ISession</see>
5017 </desc>
5018
5019 <attribute name="machine" type="IMachine" readonly="yes">
5020 <desc>
5021 Machine object this console is sessioned with.
5022 <note>
5023 This is a convenience property, it has the same value as
5024 <link to="ISession::machine"/> of the corresponding session
5025 object.
5026 </note>
5027 </desc>
5028 </attribute>
5029
5030 <attribute name="state" type="MachineState" readonly="yes">
5031 <desc>
5032 Current execution state of the machine.
5033 <note>
5034 This property always returns the same value as the corresponding
5035 property of the IMachine object this console is sessioned with.
5036 For the process that owns (executes) the VM, this is the
5037 preferable way of querying the VM state, because no IPC
5038 calls are made.
5039 </note>
5040 </desc>
5041 </attribute>
5042
5043 <attribute name="guest" type="IGuest" readonly="yes">
5044 <desc>Guest object.</desc>
5045 </attribute>
5046
5047 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5048 <desc>
5049 Virtual keyboard object.
5050 <note>
5051 If the machine is not running, any attempt to use
5052 the returned object will result in an error.
5053 </note>
5054 </desc>
5055 </attribute>
5056
5057 <attribute name="mouse" type="IMouse" readonly="yes">
5058 <desc>
5059 Virtual mouse object.
5060 <note>
5061 If the machine is not running, any attempt to use
5062 the returned object will result in an error.
5063 </note>
5064 </desc>
5065 </attribute>
5066
5067 <attribute name="display" type="IDisplay" readonly="yes">
5068 <desc>Virtual display object.
5069 <note>
5070 If the machine is not running, any attempt to use
5071 the returned object will result in an error.
5072 </note>
5073 </desc>
5074 </attribute>
5075
5076 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5077 <desc>Debugging interface.</desc>
5078 </attribute>
5079
5080 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5081 <desc>
5082 Collection of USB devices currently attached to the virtual
5083 USB controller.
5084 <note>
5085 The collection is empty if the machine is not running.
5086 </note>
5087 </desc>
5088 </attribute>
5089
5090 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5091 <desc>
5092 List of USB devices currently attached to the remote VRDP client.
5093 Once a new device is physically attached to the remote host computer,
5094 it appears in this list and remains there until detached.
5095 </desc>
5096 </attribute>
5097
5098 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5099 <desc>
5100 Collection of shared folders for the current session. These folders
5101 are called transient shared folders because they are available to the
5102 guest OS running inside the associated virtual machine only for the
5103 duration of the session (as opposed to
5104 <link to="IMachine::sharedFolders"/> which represent permanent shared
5105 folders). When the session is closed (e.g. the machine is powered down),
5106 these folders are automatically discarded.
5107
5108 New shared folders are added to the collection using
5109 <link to="#createSharedFolder"/>. Existing shared folders can be
5110 removed using <link to="#removeSharedFolder"/>.
5111 </desc>
5112 </attribute>
5113
5114 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5115 <desc>
5116 Interface that provides information on Remote Display (VRDP) connection.
5117 </desc>
5118 </attribute>
5119
5120 <method name="powerUp">
5121 <desc>
5122 Starts the virtual machine execution using the current machine
5123 state (that is, its current execution state, current settings and
5124 current hard disks).
5125
5126 If the machine is powered off or aborted, the execution will
5127 start from the beginning (as if the real hardware were just
5128 powered on).
5129
5130 If the machine is in the <link to="MachineState_Saved"/> state,
5131 it will continue its execution the point where the state has
5132 been saved.
5133
5134 <note>
5135 Unless you are trying to write a new VirtualBox front-end that
5136 performs direct machine execution (like the VirtualBox or VBoxSDL
5137 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5138 session opened by <link to="IVirtualBox::openSession"/> and use this
5139 session only to change virtual machine settings. If you simply want to
5140 start virtual machine execution using one of the existing front-ends
5141 (for example the VirtualBox GUI or headless server), simply use
5142 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5143 power up the machine automatically for you.
5144 </note>
5145
5146 <see>#saveState</see>
5147 <result name="VBOX_E_INVALID_VM_STATE">
5148 Virtual machine already running.
5149 </result>
5150 <result name="VBOX_E_HOST_ERROR">
5151 Host interface does not exist or name not set.
5152 </result>
5153 <result name="VBOX_E_FILE_ERROR">
5154 Invalid saved state file.
5155 </result>
5156 </desc>
5157 <param name="progress" type="IProgress" dir="return">
5158 <desc>Progress object to track the operation completion.</desc>
5159 </param>
5160 </method>
5161
5162 <method name="powerUpPaused">
5163 <desc>
5164 Identical to powerUp except that the VM will enter the
5165 <link to="MachineState_Paused"/> state, instead of
5166 <link to="MachineState_Running"/>.
5167
5168 <see>#powerUp</see>
5169 <result name="VBOX_E_INVALID_VM_STATE">
5170 Virtual machine already running.
5171 </result>
5172 <result name="VBOX_E_HOST_ERROR">
5173 Host interface does not exist or name not set.
5174 </result>
5175 <result name="VBOX_E_FILE_ERROR">
5176 Invalid saved state file.
5177 </result>
5178 </desc>
5179 <param name="progress" type="IProgress" dir="return">
5180 <desc>Progress object to track the operation completion.</desc>
5181 </param>
5182 </method>
5183
5184 <method name="powerDown">
5185 <desc>
5186 Stops the virtual machine execution.
5187 After this operation completes, the machine will go to the
5188 PoweredOff state.
5189
5190 @deprecated This method will be removed in VirtualBox 2.1 where the
5191 powerDownAsync() method will take its name. Do not use this method in
5192 the code.
5193 <result name="VBOX_E_INVALID_VM_STATE">
5194 Virtual machine must be Running, Paused or Stuck to be powered down.
5195 </result>
5196 <result name="VBOX_E_VM_ERROR">
5197 Unable to power off or destroy virtual machine.
5198 </result>
5199 </desc>
5200 </method>
5201
5202 <method name="powerDownAsync">
5203 <desc>
5204 Initiates the power down procedure to stop the virtual machine
5205 execution.
5206
5207 The completion of the power down procedure is tracked using the returned
5208 IProgress object. After the operation is complete, the machine will go
5209 to the PoweredOff state.
5210
5211 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5212 where the original powerDown() method will be removed. You will need to
5213 rename "powerDownAsync" to "powerDown" in your sources to make them
5214 build with version 2.1.
5215 <result name="VBOX_E_INVALID_VM_STATE">
5216 Virtual machine must be Running, Paused or Stuck to be powered down.
5217 </result>
5218 </desc>
5219 <param name="progress" type="IProgress" dir="return">
5220 <desc>Progress object to track the operation completion.</desc>
5221 </param>
5222 </method>
5223
5224 <method name="reset">
5225 <desc>Resets the virtual machine.
5226 <result name="VBOX_E_INVALID_VM_STATE">
5227 Virtual machine not in Running state.
5228 </result>
5229 <result name="VBOX_E_VM_ERROR">
5230 Virtual machine error in reset operation.
5231 </result>
5232 </desc>
5233 </method>
5234
5235 <method name="pause">
5236 <desc>Pauses the virtual machine execution.
5237 <result name="VBOX_E_INVALID_VM_STATE">
5238 Virtual machine not in Running state.
5239 </result>
5240 <result name="VBOX_E_VM_ERROR">
5241 Virtual machine error in suspend operation.
5242 </result>
5243 </desc>
5244 </method>
5245
5246 <method name="resume">
5247 <desc>Resumes the virtual machine execution.
5248 <result name="VBOX_E_INVALID_VM_STATE">
5249 Virtual machine not in Paused state.
5250 </result>
5251 <result name="VBOX_E_VM_ERROR">
5252 Virtual machine error in resume operation.
5253 </result>
5254 </desc>
5255 </method>
5256
5257 <method name="powerButton">
5258 <desc>Send the ACPI power button event to the guest.
5259 <result name="VBOX_E_INVALID_VM_STATE">
5260 Virtual machine not in Running state.
5261 </result>
5262 <result name="VBOX_E_PDM_ERROR">
5263 Controlled power off failed.
5264 </result>
5265 </desc>
5266 </method>
5267
5268 <method name="sleepButton">
5269 <desc>Sends the ACPI sleep button event to the guest.
5270 <result name="VBOX_E_INVALID_VM_STATE">
5271 Virtual machine not in Running state.
5272 </result>
5273 <result name="VBOX_E_PDM_ERROR">
5274 Sending sleep button event failed.
5275 </result>
5276 </desc>
5277 </method>
5278
5279 <method name="getPowerButtonHandled">
5280 <desc>Checks if the last power button event was handled by guest.
5281 <result name="VBOX_E_PDM_ERROR">
5282 Checking if the event was handled by the guest OS failed.
5283 </result>
5284 </desc>
5285 <param name="handled" type="boolean" dir="return"/>
5286 </method>
5287
5288 <method name="getGuestEnteredACPIMode">
5289 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5290 G1 (sleeping). If this method returns false, the guest will
5291 most likely not respond to external ACPI events.
5292 <result name="VBOX_E_INVALID_VM_STATE">
5293 Virtual machine not in Running state.
5294 </result>
5295 </desc>
5296 <param name="entered" type="boolean" dir="return"/>
5297 </method>
5298
5299 <method name="saveState">
5300 <desc>
5301 Saves the current execution state of a running virtual machine
5302 and stops its execution.
5303
5304 After this operation completes, the machine will go to the
5305 Saved state. Next time it is powered up, this state will
5306 be restored and the machine will continue its execution from
5307 the place where it was saved.
5308
5309 This operation differs from taking a snapshot to the effect
5310 that it doesn't create new differencing hard disks. Also, once
5311 the machine is powered up from the state saved using this method,
5312 the saved state is deleted, so it will be impossible to return
5313 to this state later.
5314
5315 <note>
5316 On success, this method implicitly calls
5317 <link to="IMachine::saveSettings()"/> to save all current machine
5318 settings (including runtime changes to the DVD drive, etc.).
5319 Together with the impossibility to change any VM settings when it is
5320 in the Saved state, this guarantees adequate hardware
5321 configuration of the machine when it is restored from the saved
5322 state file.
5323 </note>
5324
5325 <note>
5326 The machine must be in the Running or Paused state, otherwise
5327 the operation will fail.
5328 </note>
5329 <result name="VBOX_E_INVALID_VM_STATE">
5330 Virtual machine state neither Running nor Paused.
5331 </result>
5332 <result name="VBOX_E_FILE_ERROR">
5333 Failed to create directory for saved state file.
5334 </result>
5335
5336 <see><link to="#takeSnapshot"/></see>
5337 </desc>
5338 <param name="progress" type="IProgress" dir="return">
5339 <desc>Progress object to track the operation completion.</desc>
5340 </param>
5341 </method>
5342
5343 <method name="adoptSavedState">
5344 <desc>
5345 Associates the given saved state file to the virtual machine.
5346
5347 On success, the machine will go to the Saved state. Next time it is
5348 powered up, it will be restored from the adopted saved state and
5349 continue execution from the place where the saved state file was
5350 created.
5351
5352 The specified saved state file path may be absolute or relative to the
5353 folder the VM normally saves the state to (usually,
5354 <link to="IMachine::snapshotFolder"/>).
5355
5356 <note>
5357 It's a caller's responsibility to make sure the given saved state
5358 file is compatible with the settings of this virtual machine that
5359 represent its virtual hardware (memory size, hard disk configuration
5360 etc.). If there is a mismatch, the behavior of the virtual machine
5361 is undefined.
5362 </note>
5363 <result name="VBOX_E_INVALID_VM_STATE">
5364 Virtual machine state neither PoweredOff nor Aborted.
5365 </result>
5366 </desc>
5367 <param name="savedStateFile" type="wstring" dir="in">
5368 <desc>Path to the saved state file to adopt.</desc>
5369 </param>
5370 </method>
5371
5372 <method name="discardSavedState">
5373 <desc>
5374 Discards (deletes) the saved state of the virtual machine
5375 previously created by <link to="#saveState"/>. Next time the
5376 machine is powered up, a clean boot will occur.
5377 <note>
5378 This operation is equivalent to resetting or powering off
5379 the machine without doing a proper shutdown in the guest OS.
5380 </note>
5381 <result name="VBOX_E_INVALID_VM_STATE">
5382 Virtual machine not in state Saved.
5383 </result>
5384 </desc>
5385 </method>
5386
5387 <method name="getDeviceActivity">
5388 <desc>
5389 Gets the current activity type of a given device or device group.
5390 <result name="E_INVALIDARG">
5391 Invalid device type.
5392 </result>
5393 </desc>
5394 <param name="type" type="DeviceType" dir="in"/>
5395 <param name="activity" type="DeviceActivity" dir="return"/>
5396 </method>
5397
5398 <method name="attachUSBDevice">
5399 <desc>
5400 Attaches a host USB device with the given UUID to the
5401 USB controller of the virtual machine.
5402
5403 The device needs to be in one of the following states:
5404 <link to="USBDeviceState_Busy"/>,
5405 <link to="USBDeviceState_Available"/> or
5406 <link to="USBDeviceState_Held"/>,
5407 otherwise an error is immediately returned.
5408
5409 When the device state is
5410 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5411 be returned if the host computer refuses to release it for some reason.
5412
5413 <see>IUSBController::deviceFilters, USBDeviceState</see>
5414 <result name="VBOX_E_INVALID_VM_STATE">
5415 Virtual machine state neither Running nor Paused.
5416 </result>
5417 <result name="VBOX_E_PDM_ERROR">
5418 Virtual machine does not have a USB controller.
5419 </result>
5420 </desc>
5421 <param name="id" type="uuid" dir="in">
5422 <desc>UUID of the host USB device to attach.</desc>
5423 </param>
5424 </method>
5425
5426 <method name="detachUSBDevice">
5427 <desc>
5428 Detaches an USB device with the given UUID from the USB controller
5429 of the virtual machine.
5430
5431 After this method succeeds, the VirtualBox server re-initiates
5432 all USB filters as if the device were just physically attached
5433 to the host, but filters of this machine are ignored to avoid
5434 a possible automatic re-attachment.
5435
5436 <see>IUSBController::deviceFilters, USBDeviceState</see>
5437
5438 <result name="VBOX_E_PDM_ERROR">
5439 Virtual machine does not have a USB controller.
5440 </result>
5441 <result name="E_INVALIDARG">
5442 USB device not attached to this virtual machine.
5443 </result>
5444 </desc>
5445 <param name="id" type="uuid" dir="in">
5446 <desc>UUID of the USB device to detach.</desc>
5447 </param>
5448 <param name="device" type="IUSBDevice" dir="return">
5449 <desc>Detached USB device.</desc>
5450 </param>
5451 </method>
5452
5453 <method name="createSharedFolder">
5454 <desc>
5455 Creates a transient new shared folder by associating the given logical
5456 name with the given host path, adds it to the collection of shared
5457 folders and starts sharing it. Refer to the description of
5458 <link to="ISharedFolder"/> to read more about logical names.
5459
5460 <result name="VBOX_E_INVALID_VM_STATE">
5461 Virtual machine in Saved state or currently changing state.
5462 </result>
5463 <result name="VBOX_E_FILE_ERROR">
5464 Shared folder already exists or not accessible.
5465 </result>
5466 </desc>
5467 <param name="name" type="wstring" dir="in">
5468 <desc>Unique logical name of the shared folder.</desc>
5469 </param>
5470 <param name="hostPath" type="wstring" dir="in">
5471 <desc>Full path to the shared folder in the host file system.</desc>
5472 </param>
5473 <param name="writable" type="boolean" dir="in">
5474 <desc>Whether the share is writable or readonly</desc>
5475 </param>
5476 </method>
5477
5478 <method name="removeSharedFolder">
5479 <desc>
5480 Removes a transient shared folder with the given name previously
5481 created by <link to="#createSharedFolder"/> from the collection of
5482 shared folders and stops sharing it.
5483 <result name="VBOX_E_INVALID_VM_STATE">
5484 Virtual machine in Saved state or currently changing state.
5485 </result>
5486 <result name="VBOX_E_FILE_ERROR">
5487 Shared folder does not exists.
5488 </result>
5489 </desc>
5490 <param name="name" type="wstring" dir="in">
5491 <desc>Logical name of the shared folder to remove.</desc>
5492 </param>
5493 </method>
5494
5495 <method name="takeSnapshot">
5496 <desc>
5497 Saves the current execution state and all settings of the
5498 machine and creates differencing images for all
5499 normal (non-independent) hard disks.
5500
5501 This method can be called for a PoweredOff, Saved, Running or
5502 Paused virtual machine. When the machine is PoweredOff, an
5503 offline <link to="ISnapshot">snapshot</link> is created,
5504 in all other cases -- an online snapshot.
5505
5506 The taken snapshot is always based on the
5507 <link to="IMachine::currentSnapshot">current
5508 snapshot</link> of the associated virtual machine and becomes
5509 a new current snapshot.
5510
5511 <note>
5512 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5513 save all current machine settings before taking an offline snapshot.
5514 </note>
5515
5516 <see>ISnapshot, <link to="#saveState"/></see>
5517 <result name="VBOX_E_INVALID_VM_STATE">
5518 Virtual machine currently changing state.
5519 </result>
5520 </desc>
5521 <param name="name" type="wstring" dir="in">
5522 <desc>Short name for the snapshot.</desc>
5523 </param>
5524 <param name="description" type="wstring" dir="in">
5525 <desc>Optional description of the snapshot.</desc>
5526 </param>
5527 <param name="progress" type="IProgress" dir="return">
5528 <desc>Progress object to track the operation completion.</desc>
5529 </param>
5530 </method>
5531
5532 <method name="discardSnapshot">
5533 <desc>
5534
5535 Starts discarding the specified snapshot. The execution state
5536 and settings of the associated machine stored in the snapshot
5537 will be deleted. The contents of all differencing hard disks of
5538 this snapshot will be merged with the contents of their
5539 dependent child hard disks to keep the, disks valid (in other
5540 words, all changes represented by hard disks being discarded
5541 will be propagated to their child hard disks). After that, this
5542 snapshot's differencing hard disks will be deleted. The parent
5543 of this snapshot will become a new parent for all its child
5544 snapshots.
5545
5546 If the discarded snapshot is the current one, its parent
5547 snapshot will become a new current snapshot. The current machine
5548 state is not directly affected in this case, except that
5549 currently attached differencing hard disks based on hard disks
5550 of the discarded snapshot will be also merged as described
5551 above.
5552
5553 If the discarded snapshot is the first one (the root snapshot)
5554 and it has exactly one child snapshot, this child snapshot will
5555 become the first snapshot after discarding. If there are no
5556 children at all (i.e. the first snapshot is the only snapshot of
5557 the machine), both the current and the first snapshot of the
5558 machine will be set to null. In all other cases, the first
5559 snapshot cannot be discarded.
5560
5561 You cannot discard the snapshot if it
5562 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
5563 hard disks that have differencing hard disks based on them. Snapshots of
5564 such kind can be discarded only when every normal hard disk has either
5565 no children at all or exactly one child. In the former case, the normal
5566 hard disk simply becomes unused (i.e. not attached to any VM). In the
5567 latter case, it receives all the changes stored in the child hard disk,
5568 and then it replaces the child hard disk in the configuration of the
5569 corresponding snapshot or machine.
5570
5571 Also, you cannot discard the snapshot if it stores hard disks
5572 (of any type) having differencing child hard disks that belong
5573 to other machines. Such snapshots can be only discarded after
5574 you discard all snapshots of other machines containing "foreign"
5575 child disks, or detach these "foreign" child disks from machines
5576 they are attached to.
5577
5578 One particular example of the snapshot storing normal hard disks
5579 is the first snapshot of a virtual machine that had normal hard
5580 disks attached when taking the snapshot. Be careful when
5581 discarding such snapshots because this implicitly commits
5582 changes (made since the snapshot being discarded has been taken)
5583 to normal hard disks (as described above), which may be not what
5584 you want.
5585
5586 The virtual machine is put to
5587 the <link to="MachineState_Discarding">Discarding</link> state until
5588 the discard operation is completed.
5589
5590 <note>
5591 The machine must not be running, otherwise the operation
5592 will fail.
5593 </note>
5594
5595 <note>
5596 Child hard disks of all normal hard disks of the discarded snapshot
5597 must be accessible (see <link to="IMedium::state"/>) for this
5598 operation to succeed. In particular, this means that all virtual
5599 machines, whose hard disks are directly or indirectly based on the
5600 hard disks of discarded snapshot, must be powered off.
5601 </note>
5602 <note>
5603 Merging hard disk contents can be very time and disk space
5604 consuming, if these disks are big in size and have many
5605 children. However, if the snapshot being discarded is the last
5606 (head) snapshot on the branch, the operation will be rather
5607 quick.
5608 </note>
5609 <note>
5610 Note that discarding the current snapshot
5611 will implicitly call <link to="IMachine::saveSettings()"/> to
5612 make all current machine settings permanent.
5613 </note>
5614 <result name="VBOX_E_INVALID_VM_STATE">
5615 Virtual machine is running.
5616 </result>
5617 </desc>
5618 <param name="id" type="uuid" dir="in">
5619 <desc>UUID of the snapshot to discard.</desc>
5620 </param>
5621 <param name="progress" type="IProgress" dir="return">
5622 <desc>Progress object to track the operation completion.</desc>
5623 </param>
5624 </method>
5625
5626 <method name="discardCurrentState">
5627 <desc>
5628 This operation is similar to <link to="#discardSnapshot()"/> but
5629 affects the current machine state. This means that the state stored in
5630 the current snapshot will become a new current state, and all current
5631 settings of the machine and changes stored in differencing hard disks
5632 will be lost.
5633
5634 After this operation is successfully completed, new empty differencing
5635 hard disks are created for all normal hard disks of the machine.
5636
5637 If the current snapshot of the machine is an online snapshot, the
5638 machine will go to the <link to="MachineState_Saved"> saved
5639 state</link>, so that the next time it is powered on, the execution
5640 state will be restored from the current snapshot.
5641
5642 <note>
5643 The machine must not be running, otherwise the operation will fail.
5644 </note>
5645
5646 <note>
5647 If the machine state is <link to="MachineState_Saved">Saved</link>
5648 prior to this operation, the saved state file will be implicitly
5649 discarded (as if <link to="IConsole::discardSavedState()"/> were
5650 called).
5651 </note>
5652
5653 <result name="VBOX_E_INVALID_VM_STATE">
5654 Virtual machine is running.
5655 </result>
5656 </desc>
5657 <param name="progress" type="IProgress" dir="return">
5658 <desc>Progress object to track the operation completion.</desc>
5659 </param>
5660 </method>
5661
5662 <method name="discardCurrentSnapshotAndState">
5663 <desc>
5664
5665 This method is equivalent to
5666 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
5667 (currentSnapshot.id(), progress) followed by
5668 <link to="#discardCurrentState()"/>.
5669
5670 As a result, the machine will be fully restored from the
5671 snapshot preceding the current snapshot, while both the current
5672 snapshot and the current machine state will be discarded.
5673
5674 If the current snapshot is the first snapshot of the machine (i.e. it
5675 has the only snapshot), the current machine state will be
5676 discarded <b>before</b> discarding the snapshot. In other words, the
5677 machine will be restored from its last snapshot, before discarding
5678 it. This differs from performing a single
5679 <link to="#discardSnapshot()"/> call (note that no
5680 <link to="#discardCurrentState()"/> will be possible after it)
5681 to the effect that the latter will preserve the current state instead of
5682 discarding it.
5683
5684 Unless explicitly mentioned otherwise, all remarks and
5685 limitations of the above two methods also apply to this method.
5686
5687 <note>
5688 The machine must not be running, otherwise the operation
5689 will fail.
5690 </note>
5691
5692 <note>
5693 If the machine state is <link to="MachineState_Saved">Saved</link>
5694 prior to this operation, the saved state file will be implicitly
5695 discarded (as if <link to="#discardSavedState()"/> were
5696 called).
5697 </note>
5698
5699 <note>
5700 This method is more efficient than calling both of the above
5701 methods separately: it requires less IPC calls and provides
5702 a single progress object.
5703 </note>
5704
5705 <result name="VBOX_E_INVALID_VM_STATE">
5706 Virtual machine is running.
5707 </result>
5708 </desc>
5709 <param name="progress" type="IProgress" dir="return">
5710 <desc>Progress object to track the operation completion.</desc>
5711 </param>
5712 </method>
5713
5714 <method name="registerCallback">
5715 <desc>
5716 Registers a new console callback on this instance. The methods of the
5717 callback interface will be called by this instance when the appropriate
5718 event occurs.
5719 </desc>
5720 <param name="callback" type="IConsoleCallback" dir="in"/>
5721 </method>
5722
5723 <method name="unregisterCallback">
5724 <desc>
5725 Unregisters the console callback previously registered using
5726 <link to="#registerCallback"/>.
5727 <result name="E_INVALIDARG">
5728 Given @a callback handler is not registered.
5729 </result>
5730 </desc>
5731 <param name="callback" type="IConsoleCallback" dir="in"/>
5732 </method>
5733 </interface>
5734
5735 <!--
5736 // IHost
5737 /////////////////////////////////////////////////////////////////////////
5738 -->
5739
5740 <interface
5741 name="IHostDVDDrive" extends="$unknown"
5742 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
5743 wsmap="managed"
5744 >
5745 <desc>
5746 The IHostDVDDrive interface represents the physical CD/DVD drive
5747 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5748 </desc>
5749
5750 <attribute name="name" type="wstring" readonly="yes">
5751 <desc>
5752 Returns the platform-specific device identifier.
5753 On DOS-like platforms, it is a drive name (e.g. R:).
5754 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5755 </desc>
5756 </attribute>
5757 <attribute name="description" type="wstring" readonly="yes">
5758 <desc>
5759 Returns a human readable description for the drive. This
5760 description usually contains the product and vendor name. A
5761 @c null string is returned if the description is not available.
5762 </desc>
5763 </attribute>
5764 <attribute name="udi" type="wstring" readonly="yes">
5765 <desc>
5766 Returns the unique device identifier for the drive. This
5767 attribute is reserved for future use instead of
5768 <link to="#name"/>. Currently it is not used and may return
5769 @c null on some platforms.
5770 </desc>
5771 </attribute>
5772
5773 </interface>
5774
5775 <enumerator
5776 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5777 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5778 />
5779
5780 <collection
5781 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5782 enumerator="IHostDVDDriveEnumerator"
5783 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5784 readonly="yes"
5785 >
5786 <method name="findByName">
5787 <desc>
5788 Searches this collection for a host drive with the given name.
5789 <note>
5790 The method returns an error if the given name does not
5791 correspond to any host drive in the collection.
5792 </note>
5793 </desc>
5794 <param name="name" type="wstring" dir="in">
5795 <desc>Name of the host drive to search for</desc>
5796 </param>
5797 <param name="drive" type="IHostDVDDrive" dir="return">
5798 <desc>Found host drive object</desc>
5799 </param>
5800 </method>
5801 </collection>
5802
5803 <interface
5804 name="IHostFloppyDrive" extends="$unknown"
5805 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5806 wsmap="managed"
5807 >
5808 <desc>
5809 The IHostFloppyDrive interface represents the physical floppy drive
5810 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5811 </desc>
5812 <attribute name="name" type="wstring" readonly="yes">
5813 <desc>
5814 Returns the platform-specific device identifier.
5815 On DOS-like platforms, it is a drive name (e.g. A:).
5816 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5817 </desc>
5818 </attribute>
5819 <attribute name="description" type="wstring" readonly="yes">
5820 <desc>
5821 Returns a human readable description for the drive. This
5822 description usually contains the product and vendor name. A
5823 @c null string is returned if the description is not available.
5824 </desc>
5825 </attribute>
5826 <attribute name="udi" type="wstring" readonly="yes">
5827 <desc>
5828 Returns the unique device identifier for the drive. This
5829 attribute is reserved for future use instead of
5830 <link to="#name"/>. Currently it is not used and may return
5831 @c null on some platforms.
5832 </desc>
5833 </attribute>
5834 </interface>
5835
5836 <enumerator
5837 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5838 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5839 />
5840
5841 <collection
5842 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5843 enumerator="IHostFloppyDriveEnumerator"
5844 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5845 readonly="yes"
5846 >
5847 <method name="findByName">
5848 <desc>
5849 Searches this collection for a host drive with the given name.
5850 <note>
5851 The method returns an error if the given name does not
5852 correspond to any host drive in the collection.
5853 </note>
5854 </desc>
5855 <param name="name" type="wstring" dir="in">
5856 <desc>Name of the host drive to search for</desc>
5857 </param>
5858 <param name="drive" type="IHostFloppyDrive" dir="return">
5859 <desc>Found host drive object</desc>
5860 </param>
5861 </method>
5862 </collection>
5863
5864 <enum
5865 name="HostNetworkInterfaceType"
5866 uuid="763754FA-3246-4539-9590-9E603EDBF706"
5867 >
5868 <desc>
5869 Type of encapsulation.
5870 <see>IHostNetworkInterface</see>
5871 </desc>
5872
5873 <const name="Unknown" value="0">
5874 <desc>
5875 The type of interface cannot be determined.
5876 </desc>
5877 </const>
5878 <const name="Ethernet" value="1">
5879 <desc>
5880 TBD.
5881 </desc>
5882 </const>
5883 <const name="PPP" value="2">
5884 <desc>
5885 Point-to-point protocol encapsulation.
5886 </desc>
5887 </const>
5888 <const name="SLIP" value="3">
5889 <desc>
5890 Serial line IP encapsulation.
5891 </desc>
5892 </const>
5893 </enum>
5894
5895 <enum
5896 name="HostNetworkInterfaceStatus"
5897 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
5898 >
5899 <desc>
5900 Current status of the interface.
5901 <see>IHostNetworkInterface</see>
5902 </desc>
5903
5904 <const name="Up" value="0">
5905 <desc>
5906 The interface is fully operational.
5907 </desc>
5908 </const>
5909 <const name="Down" value="1">
5910 <desc>
5911 The interface is not functioning.
5912 </desc>
5913 </const>
5914 </enum>
5915
5916 <interface
5917 name="IHostNetworkInterface" extends="$unknown"
5918 uuid="4A89BA1D-E2AD-4D1B-98BB-F04FF2D923F6"
5919 wsmap="managed"
5920 >
5921 <attribute name="name" type="wstring" readonly="yes">
5922 <desc>Returns the host network interface name.</desc>
5923 </attribute>
5924
5925 <attribute name="id" type="uuid" readonly="yes">
5926 <desc>Returns the interface UUID.</desc>
5927 </attribute>
5928
5929 <attribute name="IPAddress" type="unsigned long" readonly="yes">
5930 <desc>Returns the IP address of the interface.</desc>
5931 </attribute>
5932
5933 <attribute name="networkMask" type="unsigned long" readonly="yes">
5934 <desc>Returns the network mask of the interface.</desc>
5935 </attribute>
5936
5937 <attribute name="IPV6Address" type="wstring" readonly="yes">
5938 <desc>Returns the IP V6 address of the interface.</desc>
5939 </attribute>
5940
5941 <attribute name="hardwareAddress" type="wstring" readonly="yes">
5942 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
5943 </attribute>
5944
5945 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
5946 <desc>Type of protocol encapsulation used.</desc>
5947 </attribute>
5948
5949 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
5950 <desc>Status of the interface.</desc>
5951 </attribute>
5952 </interface>
5953
5954 <enumerator
5955 name="IHostNetworkInterfaceEnumerator" type="IHostNetworkInterface"
5956 uuid="7B52FEF7-56E8-4aec-92F5-15E6D11EC630"
5957 />
5958
5959 <collection
5960 name="IHostNetworkInterfaceCollection" type="IHostNetworkInterface"
5961 enumerator="IHostNetworkInterfaceEnumerator"
5962 uuid="BF1D41F2-B97B-4314-A0FB-D4823AF42FB5"
5963 readonly="yes"
5964 >
5965 <method name="findByName">
5966 <desc>
5967 Searches this collection for a host network interface with the given name.
5968 <note>
5969 The method returns an error if the given name does not
5970 correspond to any host network interface in the collection.
5971 </note>
5972 </desc>
5973 <param name="name" type="wstring" dir="in">
5974 <desc>Name of the host network interface to search for.</desc>
5975 </param>
5976 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5977 <desc>Found host network interface object.</desc>
5978 </param>
5979 </method>
5980 <method name="findById">
5981 <desc>
5982 Searches this collection for a host network interface with the given GUID.
5983 <note>
5984 The method returns an error if the given GUID does not
5985 correspond to any host network interface in the collection.
5986 </note>
5987 </desc>
5988 <param name="id" type="uuid" dir="in">
5989 <desc>GUID of the host network interface to search for.</desc>
5990 </param>
5991 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
5992 <desc>Found host network interface object.</desc>
5993 </param>
5994 </method>
5995 </collection>
5996
5997 <interface
5998 name="IHost" extends="$unknown"
5999 uuid="4be2e85f-a54c-4bc7-8bf6-f070f9113940"
6000 wsmap="managed"
6001 >
6002 <desc>
6003 The IHost interface represents the physical machine that this VirtualBox
6004 installation runs on.
6005
6006 An object implementing this interface is returned by the
6007 <link to="IVirtualBox::host" /> attribute. This interface contains
6008 read-only information about the host's physical hardware (such as what
6009 processors and disks are available, what the host operating system is,
6010 and so on) and also allows for manipulating some of the host's hardware,
6011 such as global USB device filters and host interface networking.
6012
6013 </desc>
6014 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6015 <desc>List of DVD drives available on the host.</desc>
6016 </attribute>
6017
6018 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6019 <desc>List of floppy drives available on the host.</desc>
6020 </attribute>
6021
6022 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6023 <desc>
6024 List of USB devices currently attached to the host.
6025 Once a new device is physically attached to the host computer,
6026 it appears in this list and remains there until detached.
6027
6028 <note>
6029 This method may set a @ref com_warnings "warning result code".
6030 </note>
6031 <note>
6032 If USB functionality is not available in the given edition of
6033 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6034 </note>
6035 </desc>
6036 </attribute>
6037
6038 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6039 <desc>
6040 List of USB device filters in action.
6041 When a new device is physically attached to the host computer,
6042 filters from this list are applied to it (in order they are stored
6043 in the list). The first matched filter will determine the
6044 <link to="IHostUSBDeviceFilter::action">action</link>
6045 performed on the device.
6046
6047 Unless the device is ignored by these filters, filters of all
6048 currently running virtual machines
6049 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6050
6051 <note>
6052 This method may set a @ref com_warnings "warning result code".
6053 </note>
6054 <note>
6055 If USB functionality is not available in the given edition of
6056 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6057 </note>
6058
6059 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6060 </desc>
6061 </attribute>
6062
6063 <attribute name="networkInterfaces" type="IHostNetworkInterfaceCollection" readonly="yes">
6064 <desc>List of host network interfaces currently defined on the host.</desc>
6065 </attribute>
6066
6067 <attribute name="processorCount" type="unsigned long" readonly="yes">
6068 <desc>Number of (logical) CPUs installed in the host system.</desc>
6069 </attribute>
6070
6071 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6072 <desc>Number of (logical) CPUs online in the host system.</desc>
6073 </attribute>
6074
6075 <method name="getProcessorSpeed">
6076 <desc>Query the (approximate) maximum speed of a specified host CPU in
6077 Megahertz.
6078 </desc>
6079 <param name="cpuId" type="unsigned long" dir="in">
6080 <desc>
6081 Identifier of the CPU.
6082 </desc>
6083 </param>
6084 <param name="speed" type="unsigned long" dir="return">
6085 <desc>
6086 Speed value. 0 is returned if value is not known or @a cpuId is
6087 invalid.
6088 </desc>
6089 </param>
6090 </method>
6091
6092 <method name="getProcessorFeature">
6093 <desc>Query whether a CPU feature is supported or not.</desc>
6094 <param name="feature" type="ProcessorFeature" dir="in">
6095 <desc>
6096 CPU Feature identifier.
6097 </desc>
6098 </param>
6099 <param name="supported" type="boolean" dir="return">
6100 <desc>
6101 Feature is supported or not.
6102 </desc>
6103 </param>
6104 </method>
6105
6106 <method name="getProcessorDescription">
6107 <desc>Query the model string of a specified host CPU.
6108 <note>
6109 This function is not implemented in the current version of the
6110 product.
6111 </note>
6112 </desc>
6113 <param name="cpuId" type="unsigned long" dir="in">
6114 <desc>
6115 Identifier of the CPU.
6116 </desc>
6117 </param>
6118 <param name="description" type="wstring" dir="return">
6119 <desc>
6120 Model string. A NULL string is returned if value is not known or
6121 @a cpuId is invalid.
6122 </desc>
6123 </param>
6124 </method>
6125
6126 <attribute name="memorySize" type="unsigned long" readonly="yes">
6127 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6128 </attribute>
6129
6130 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6131 <desc>Available system memory in the host system.</desc>
6132 </attribute>
6133
6134 <attribute name="operatingSystem" type="wstring" readonly="yes">
6135 <desc>Name of the host system's operating system.</desc>
6136 </attribute>
6137
6138 <attribute name="OSVersion" type="wstring" readonly="yes">
6139 <desc>Host operating system's version string.</desc>
6140 </attribute>
6141
6142 <attribute name="UTCTime" type="long long" readonly="yes">
6143 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6144 </attribute>
6145
6146<if target="midl">
6147 <method name="createHostNetworkInterface">
6148 <desc>
6149 Creates a new adapter for Host Interface Networking.
6150 <result name="E_INVALIDARG">
6151 Host network interface @a name already exists.
6152 </result>
6153 </desc>
6154 <param name="name" type="wstring" dir="in">
6155 <desc>
6156 Adapter name.
6157 </desc>
6158 </param>
6159 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6160 <desc>
6161 Created host interface object.
6162 </desc>
6163 </param>
6164 <param name="progress" type="IProgress" dir="return">
6165 <desc>
6166 Progress object to track the operation completion.
6167 </desc>
6168 </param>
6169 </method>
6170 <method name="removeHostNetworkInterface">
6171 <desc>
6172 Removes the given host network interface.
6173 <result name="VBOX_E_OBJECT_NOT_FOUND">
6174 No host network interface matching @a id found.
6175 </result>
6176 </desc>
6177 <param name="id" type="uuid" dir="in">
6178 <desc>
6179 Adapter GUID.
6180 </desc>
6181 </param>
6182 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6183 <desc>
6184 Removed host interface object.
6185 </desc>
6186 </param>
6187 <param name="progress" type="IProgress" dir="return">
6188 <desc>
6189 Progress object to track the operation completion.
6190 </desc>
6191 </param>
6192 </method>
6193</if>
6194
6195 <method name="createUSBDeviceFilter">
6196 <desc>
6197 Creates a new USB device filter. All attributes except
6198 the filter name are set to <tt>null</tt> (any match),
6199 <i>active</i> is <tt>false</tt> (the filter is not active).
6200
6201 The created filter can be added to the list of filters using
6202 <link to="#insertUSBDeviceFilter()"/>.
6203
6204 <see>#USBDeviceFilters</see>
6205 </desc>
6206 <param name="name" type="wstring" dir="in">
6207 <desc>
6208 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6209 for more info.
6210 </desc>
6211 </param>
6212 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6213 <desc>Created filter object.</desc>
6214 </param>
6215 </method>
6216
6217 <method name="insertUSBDeviceFilter">
6218 <desc>
6219 Inserts the given USB device to the specified position
6220 in the list of filters.
6221
6222 Positions are numbered starting from <tt>0</tt>. If the specified
6223 position is equal to or greater than the number of elements in
6224 the list, the filter is added at the end of the collection.
6225
6226 <note>
6227 Duplicates are not allowed, so an attempt to insert a
6228 filter that is already in the list, will return an
6229 error.
6230 </note>
6231 <note>
6232 This method may set a @ref com_warnings "warning result code".
6233 </note>
6234 <note>
6235 If USB functionality is not available in the given edition of
6236 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6237 </note>
6238
6239 <see>#USBDeviceFilters</see>
6240
6241 <result name="VBOX_E_INVALID_OBJECT_STATE">
6242 USB device filter is not created within this VirtualBox instance.
6243 </result>
6244 <result name="E_INVALIDARG">
6245 USB device filter already in list.
6246 </result>
6247
6248 </desc>
6249 <param name="position" type="unsigned long" dir="in">
6250 <desc>Position to insert the filter to.</desc>
6251 </param>
6252 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6253 <desc>USB device filter to insert.</desc>
6254 </param>
6255 </method>
6256
6257 <method name="removeUSBDeviceFilter">
6258 <desc>
6259 Removes a USB device filter from the specified position in the
6260 list of filters.
6261
6262 Positions are numbered starting from <tt>0</tt>. Specifying a
6263 position equal to or greater than the number of elements in
6264 the list will produce an error.
6265
6266 <note>
6267 This method may set a @ref com_warnings "warning result code".
6268 </note>
6269 <note>
6270 If USB functionality is not available in the given edition of
6271 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6272 </note>
6273
6274 <see>#USBDeviceFilters</see>
6275
6276 <result name="E_INVALIDARG">
6277 USB device filter list empty or invalid @a position.
6278 </result>
6279
6280 </desc>
6281 <param name="position" type="unsigned long" dir="in">
6282 <desc>Position to remove the filter from.</desc>
6283 </param>
6284 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6285 <desc>Removed USB device filter.</desc>
6286 </param>
6287 </method>
6288
6289 </interface>
6290
6291 <!--
6292 // ISystemProperties
6293 /////////////////////////////////////////////////////////////////////////
6294 -->
6295
6296 <interface
6297 name="ISystemProperties"
6298 extends="$unknown"
6299 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6300 wsmap="managed"
6301 >
6302 <desc>
6303 The ISystemProperties interface represents global properties of the given
6304 VirtualBox installation.
6305
6306 These properties define limits and default values for various attributes
6307 and parameters. Most of the properties are read-only, but some can be
6308 changed by a user.
6309 </desc>
6310
6311 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6312 <desc>Minimum guest system memory in Megabytes.</desc>
6313 </attribute>
6314
6315 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6316 <desc>Maximum guest system memory in Megabytes.</desc>
6317 </attribute>
6318
6319 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6320 <desc>Minimum guest video memory in Megabytes.</desc>
6321 </attribute>
6322
6323 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6324 <desc>Maximum guest video memory in Megabytes.</desc>
6325 </attribute>
6326
6327 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6328 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6329 </attribute>
6330
6331 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6332 <desc>
6333 Number of network adapters associated with every
6334 <link to="IMachine"/> instance.
6335 </desc>
6336 </attribute>
6337
6338 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6339 <desc>
6340 Number of serial ports associated with every
6341 <link to="IMachine"/> instance.
6342 </desc>
6343 </attribute>
6344
6345 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6346 <desc>
6347 Number of parallel ports associated with every
6348 <link to="IMachine"/> instance.
6349 </desc>
6350 </attribute>
6351
6352 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6353 <desc>
6354 Maximum device position in the boot order. This value corresponds
6355 to the total number of devices a machine can boot from, to make it
6356 possible to include all possible devices to the boot list.
6357 <see><link to="IMachine::setBootOrder()"/></see>
6358 </desc>
6359 </attribute>
6360
6361 <attribute name="defaultMachineFolder" type="wstring">
6362 <desc>
6363 Full path to the default directory used to create new or open
6364 existing machines when a settings file name contains no
6365 path.
6366
6367 The initial value of this property is
6368 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6369 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6370
6371 <note>
6372 Setting this property to <tt>null</tt> will restore the
6373 initial value.
6374 </note>
6375 <note>
6376 When settings this property, the specified path can be
6377 absolute (full path) or relative
6378 to the <link to="IVirtualBox::homeFolder">
6379 VirtualBox home directory</link>.
6380 When reading this property, a full path is
6381 always returned.
6382 </note>
6383 <note>
6384 The specified path may not exist, it will be created
6385 when necessary.
6386 </note>
6387
6388 <see>
6389 <link to="IVirtualBox::createMachine()"/>,
6390 <link to="IVirtualBox::openMachine()"/>
6391 </see>
6392 </desc>
6393 </attribute>
6394
6395 <attribute name="defaultHardDiskFolder" type="wstring">
6396 <desc>
6397 Full path to the default directory used to create new or open existing
6398 virtual disks.
6399
6400 This path is used when the storage unit of a hard disk is a regular file
6401 in the host's file system and only a file name that contains no path is
6402 given.
6403
6404 The initial value of this property is
6405 <tt>&lt;</tt>
6406 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6407 <tt>&gt;/HardDisks</tt>.
6408
6409 <note>
6410 Setting this property to <tt>null</tt> will restore the
6411 initial value.
6412 </note>
6413 <note>
6414 When settings this property, the specified path can be relative
6415 to the
6416 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6417 absolute. When reading this property, a full path is
6418 always returned.
6419 </note>
6420 <note>
6421 The specified path may not exist, it will be created
6422 when necessary.
6423 </note>
6424
6425 <see>
6426 IHardDisk2,
6427 <link to="IVirtualBox::createHardDisk2()"/>,
6428 <link to="IVirtualBox::openHardDisk2()"/>,
6429 <link to="IMedium::location"/>
6430 </see>
6431 </desc>
6432 </attribute>
6433
6434 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6435 <desc>
6436 List of all hard disk storage formats supported by this VirtualBox
6437 installation.
6438
6439 Note that the virtual hard disk framework is backend-based, therefore
6440 the list of supported formats depends on what backends are currently
6441 installed.
6442
6443 <see>
6444 <link to="IHardDiskFormat"/>,
6445 </see>
6446 </desc>
6447 </attribute>
6448
6449 <attribute name="defaultHardDiskFormat" type="wstring">
6450 <desc>
6451 Identifier of the default hard disk format used by VirtualBox.
6452
6453 The hard disk format set by this attribute is used by VirtualBox
6454 when the hard disk format was not specified explicitly. One example is
6455 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6456 format argument. A more complex example is implicit creation of
6457 differencing hard disks when taking a snapshot of a virtual machine:
6458 this operation will try to use a format of the parent hard disk first
6459 and if this format does not support differencing hard disks the default
6460 format specified by this argument will be used.
6461
6462 The list of supported hard disk formats may be obtained by the
6463 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6464 format must have a capability to create differencing hard disks;
6465 otherwise opeartions that create hard disks implicitly may fail
6466 unexpectedly.
6467
6468 The initial value of this property is <tt>VDI</tt> in the current
6469 version of the VirtualBox product, but may change in the future.
6470
6471 <note>
6472 Setting this property to <tt>null</tt> will restore the
6473 initial value.
6474 </note>
6475
6476 <see>
6477 <link to="#hardDiskFormats"/>,
6478 <link to="IHardDiskFormat::id"/>,
6479 <link to="IVirtualBox::createHardDisk2()"/>
6480 </see>
6481 </desc>
6482 </attribute>
6483
6484 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6485 <desc>
6486 Library that provides authentication for VRDP clients. The library
6487 is used if a virtual machine's authentication type is set to "external"
6488 in the VM RemoteDisplay configuration.
6489
6490 The system library extension (".DLL" or ".so") must be omitted.
6491 A full path can be specified; if not, then the library must reside on the
6492 system's default library path.
6493
6494 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6495 of that name in one of the default VirtualBox library directories.
6496
6497 For details about VirtualBox authentication libraries and how to implement
6498 them, please refer to the VirtualBox manual.
6499
6500 <note>
6501 Setting this property to <tt>null</tt> will restore the
6502 initial value.
6503 </note>
6504 </desc>
6505 </attribute>
6506
6507 <attribute name="webServiceAuthLibrary" type="wstring">
6508 <desc>
6509 Library that provides authentication for webservice clients. The library
6510 is used if a virtual machine's authentication type is set to "external"
6511 in the VM RemoteDisplay configuration and will be called from
6512 within the <link to="IWebsessionManager::logon" /> implementation.
6513
6514 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6515 there is no per-VM setting for this, as the webservice is a global
6516 resource (if it is running). Only for this setting (for the webservice),
6517 setting this value to a literal "null" string disables authentication,
6518 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
6519 no matter what user name and password are supplied.
6520
6521 The initial value of this property is <tt>VRDPAuth</tt>,
6522 meaning that the webservice will use the same authentication
6523 library that is used by default for VBoxVRDP (again, see
6524 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
6525 The format and calling convention of authentication libraries
6526 is the same for the webservice as it is for VBoxVRDP.
6527
6528 </desc>
6529 </attribute>
6530
6531 <attribute name="HWVirtExEnabled" type="boolean">
6532 <desc>
6533 This specifies the default value for hardware virtualization
6534 extensions. If enabled, virtual machines will make use of
6535 hardware virtualization extensions such as Intel VT-x and
6536 AMD-V by default. This value can be overridden by each VM
6537 using their <link to="IMachine::HWVirtExEnabled" /> property.
6538 </desc>
6539 </attribute>
6540
6541 <attribute name="LogHistoryCount" type="unsigned long">
6542 <desc>
6543 This value specifies how many old release log files are kept.
6544 </desc>
6545 </attribute>
6546 </interface>
6547
6548 <!--
6549 // IGuest
6550 /////////////////////////////////////////////////////////////////////////
6551 -->
6552
6553 <interface
6554 name="IGuestOSType" extends="$unknown"
6555 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
6556 wsmap="struct"
6557 >
6558 <desc>
6559 </desc>
6560
6561 <attribute name="familyId" type="wstring" readonly="yes">
6562 <desc>Guest OS family identifier string.</desc>
6563 </attribute>
6564
6565 <attribute name="familyDescription" type="wstring" readonly="yes">
6566 <desc>Human readable description of the guest OS family.</desc>
6567 </attribute>
6568
6569 <attribute name="id" type="wstring" readonly="yes">
6570 <desc>Guest OS identifier string.</desc>
6571 </attribute>
6572
6573 <attribute name="description" type="wstring" readonly="yes">
6574 <desc>Human readable description of the guest OS.</desc>
6575 </attribute>
6576
6577 <attribute name="is64Bit" type="boolean" readonly="yes">
6578 <desc>Returns @c true if the given OS is 64-bit</desc>
6579 </attribute>
6580
6581 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
6582 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
6583 </attribute>
6584
6585 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
6586 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
6587 </attribute>
6588
6589 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
6590 <desc>Recommended RAM size in Megabytes.</desc>
6591 </attribute>
6592
6593 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
6594 <desc>Recommended video RAM size in Megabytes.</desc>
6595 </attribute>
6596
6597 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
6598 <desc>Recommended hard disk size in Megabytes.</desc>
6599 </attribute>
6600
6601 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
6602 <desc>Returns recommended network adapter for this OS type.</desc>
6603 </attribute>
6604 </interface>
6605
6606
6607 <enumerator
6608 name="IGuestOSTypeEnumerator" type="IGuestOSType"
6609 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
6610 />
6611
6612 <collection
6613 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
6614 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
6615 readonly="yes"
6616 />
6617
6618 <interface
6619 name="IGuest" extends="$unknown"
6620 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
6621
6622 wsmap="suppress"
6623 >
6624 <desc>
6625 The IGuest interface represents information about the operating system
6626 running inside the virtual machine. Used in
6627 <link to="IConsole::guest"/>.
6628
6629 IGuest provides information about the guest operating system, whether
6630 Guest Additions are installed and other OS-specific virtual machine
6631 properties.
6632 </desc>
6633
6634 <attribute name="OSTypeId" type="wstring" readonly="yes">
6635 <desc>
6636 Identifier of the Guest OS type as reported by the Guest
6637 Additions.
6638 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
6639 an IGuestOSType object representing details about the given
6640 Guest OS type.
6641 <note>
6642 If Guest Additions are not installed, this value will be
6643 the same as <link to="IMachine::OSTypeId"/>.
6644 </note>
6645 </desc>
6646 </attribute>
6647
6648 <attribute name="additionsActive" type="boolean" readonly="yes">
6649 <desc>
6650 Flag whether the Guest Additions are installed and active
6651 in which case their version will be returned by the
6652 <link to="#additionsVersion"/> property.
6653 </desc>
6654 </attribute>
6655
6656 <attribute name="additionsVersion" type="wstring" readonly="yes">
6657 <desc>
6658 Version of the Guest Additions (3 decimal numbers separated
6659 by dots) or empty when the Additions are not installed. The
6660 Additions may also report a version but yet not be active as
6661 the version might be refused by VirtualBox (incompatible) or
6662 other failures occurred.
6663 </desc>
6664 </attribute>
6665
6666 <attribute name="supportsSeamless" type="boolean" readonly="yes">
6667 <desc>
6668 Flag whether seamless guest display rendering (seamless desktop
6669 integration) is supported.
6670 </desc>
6671 </attribute>
6672
6673 <attribute name="supportsGraphics" type="boolean" readonly="yes">
6674 <desc>
6675 Flag whether the guest is in graphics mode. If it is not, then
6676 seamless rendering will not work, resize hints are not immediately
6677 acted on and guest display resizes are probably not initiated by
6678 the guest additions.
6679 </desc>
6680 </attribute>
6681
6682 <attribute name="memoryBalloonSize" type="unsigned long">
6683 <desc>Guest system memory balloon size in megabytes.</desc>
6684 </attribute>
6685
6686 <attribute name="statisticsUpdateInterval" type="unsigned long">
6687 <desc>Interval to update guest statistics in seconds.</desc>
6688 </attribute>
6689
6690 <method name="setCredentials">
6691 <desc>
6692 Store login credentials that can be queried by guest operating
6693 systems with Additions installed. The credentials are transient
6694 to the session and the guest may also choose to erase them. Note
6695 that the caller cannot determine whether the guest operating system
6696 has queried or made use of the credentials.
6697
6698 <result name="VBOX_E_VM_ERROR">
6699 VMM device is not available.
6700 </result>
6701
6702 </desc>
6703 <param name="userName" type="wstring" dir="in">
6704 <desc>User name string, can be empty</desc>
6705 </param>
6706 <param name="password" type="wstring" dir="in">
6707 <desc>Password string, can be empty</desc>
6708 </param>
6709 <param name="domain" type="wstring" dir="in">
6710 <desc>Domain name (guest logon scheme specific), can be empty</desc>
6711 </param>
6712 <param name="allowInteractiveLogon" type="boolean" dir="in">
6713 <desc>
6714 Flag whether the guest should alternatively allow the user to
6715 interactively specify different credentials. This flag might
6716 not be supported by all versions of the Additions.
6717 </desc>
6718 </param>
6719 </method>
6720
6721 <method name="getStatistic">
6722 <desc>
6723 Query specified guest statistics as reported by the VirtualBox Additions.
6724 </desc>
6725 <param name="cpuId" type="unsigned long" dir="in">
6726 <desc>Virtual CPU id; not relevant for all statistic types</desc>
6727 </param>
6728 <param name="statistic" type="GuestStatisticType" dir="in">
6729 <desc>Statistic type.</desc>
6730 </param>
6731 <param name="statVal" type="unsigned long" dir="out">
6732 <desc>Statistics value</desc>
6733 </param>
6734 </method>
6735
6736 </interface>
6737
6738
6739 <!--
6740 // IProgress
6741 /////////////////////////////////////////////////////////////////////////
6742 -->
6743
6744 <enumerator
6745 name="IProgressEnumerator" type="IProgress"
6746 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
6747 />
6748
6749 <collection
6750 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
6751 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
6752 readonly="yes"
6753 />
6754
6755 <interface
6756 name="IProgress" extends="$unknown"
6757 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
6758 wsmap="managed"
6759 >
6760 <desc>
6761 The IProgress interface represents a task progress object that allows
6762 to wait for the completion of some asynchronous task.
6763
6764 The task consists of one or more operations that run sequentially,
6765 one after one. There is an individual percent of completion of the
6766 current operation and the percent of completion of the task as a
6767 whole. Similarly, you can wait for the completion of a particular
6768 operation or for the completion of the whole task.
6769
6770 Every operation is identified by a number (starting from 0)
6771 and has a separate description.
6772 </desc>
6773
6774 <attribute name="id" type="uuid" readonly="yes">
6775 <desc>ID of the task.</desc>
6776 </attribute>
6777
6778 <attribute name="description" type="wstring" readonly="yes">
6779 <desc>Description of the task.</desc>
6780 </attribute>
6781
6782 <attribute name="initiator" type="$unknown" readonly="yes">
6783 <desc>Initiator of the task.</desc>
6784 </attribute>
6785
6786 <attribute name="cancelable" type="boolean" readonly="yes">
6787 <desc>Whether the task can be interrupted.</desc>
6788 </attribute>
6789
6790 <attribute name="percent" type="long" readonly="yes">
6791 <desc>
6792 Current task progress value in percent.
6793 This value depends on how many operations are already complete.
6794 </desc>
6795 </attribute>
6796
6797 <attribute name="completed" type="boolean" readonly="yes">
6798 <desc>Whether the task has been completed.</desc>
6799 </attribute>
6800
6801 <attribute name="canceled" type="boolean" readonly="yes">
6802 <desc>Whether the task has been canceled.</desc>
6803 </attribute>
6804
6805 <attribute name="resultCode" type="result" readonly="yes">
6806 <desc>
6807 Result code of the progress task.
6808 Valid only if <link to="#completed"/> is true.
6809 </desc>
6810 </attribute>
6811
6812 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
6813 <desc>
6814 Extended information about the unsuccessful result of the
6815 progress operation. May be NULL when no extended information
6816 is available.
6817 Valid only if <link to="#completed"/> is true and
6818 <link to="#resultCode"/> indicates a failure.
6819 </desc>
6820 </attribute>
6821
6822 <attribute name="operationCount" type="unsigned long" readonly="yes">
6823 <desc>
6824 Number of operations this task is divided into.
6825 Every task consists of at least one operation.
6826 </desc>
6827 </attribute>
6828
6829 <attribute name="operation" type="unsigned long" readonly="yes">
6830 <desc>Number of the operation being currently executed.</desc>
6831 </attribute>
6832
6833 <attribute name="operationDescription" type="wstring" readonly="yes">
6834 <desc>
6835 Description of the operation being currently executed.
6836 </desc>
6837 </attribute>
6838
6839 <attribute name="operationPercent" type="long" readonly="yes">
6840 <desc>Current operation progress value in percent.</desc>
6841 </attribute>
6842
6843 <method name="waitForCompletion">
6844 <desc>
6845 Waits until the task is done (including all operations) with a
6846 given timeout.
6847
6848 <result name="VBOX_E_IPRT_ERROR">
6849 Failed to wait for task completion.
6850 </result>
6851
6852 </desc>
6853 <param name="timeout" type="long" dir="in">
6854 <desc>
6855 Timeout value in milliseconds.
6856 Specify -1 for an indefinite wait.
6857 </desc>
6858 </param>
6859 </method>
6860
6861 <method name="waitForOperationCompletion">
6862 <desc>
6863 Waits until the given operation is done with a given timeout.
6864
6865 <result name="VBOX_E_IPRT_ERROR">
6866 Failed to wait for operation completion.
6867 </result>
6868
6869 </desc>
6870 <param name="operation" type="unsigned long" dir="in">
6871 <desc>
6872 Number of the operation to wait for.
6873 Must be less than <link to="#operationCount"/>.
6874 </desc>
6875 </param>
6876 <param name="timeout" type="long" dir="in">
6877 <desc>
6878 Timeout value in milliseconds.
6879 Specify -1 for an indefinite wait.
6880 </desc>
6881 </param>
6882 </method>
6883
6884 <method name="cancel">
6885 <desc>
6886 Cancels the task.
6887 <note>
6888 If <link to="#cancelable"/> is <tt>false</tt>, then
6889 this method will fail.
6890 </note>
6891
6892 <result name="VBOX_E_INVALID_OBJECT_STATE">
6893 Operation cannot be canceled.
6894 </result>
6895
6896 </desc>
6897 </method>
6898
6899 </interface>
6900
6901
6902 <!--
6903 // ISnapshot
6904 /////////////////////////////////////////////////////////////////////////
6905 -->
6906
6907 <enumerator
6908 name="ISnapshotEnumerator" type="ISnapshot"
6909 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
6910 />
6911
6912 <collection
6913 name="ISnapshotCollection" type="ISnapshot"
6914 enumerator="ISnapshotEnumerator"
6915 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
6916 readonly="yes"
6917 />
6918
6919 <interface
6920 name="ISnapshot" extends="$unknown"
6921 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
6922 wsmap="managed"
6923 >
6924 <desc>
6925 The ISnapshot interface represents a snapshot of the virtual
6926 machine.
6927
6928 The <i>snapshot</i> stores all the information about a virtual
6929 machine necessary to bring it to exactly the same state as it was at
6930 the time of taking the snapshot. The snapshot includes:
6931
6932 <ul>
6933 <li>all settings of the virtual machine (i.e. its hardware
6934 configuration: RAM size, attached hard disks, etc.)
6935 </li>
6936 <li>the execution state of the virtual machine (memory contents,
6937 CPU state, etc.).
6938 </li>
6939 </ul>
6940
6941 Snapshots can be <i>offline</i> (taken when the VM is powered off)
6942 or <i>online</i> (taken when the VM is running). The execution
6943 state of the offline snapshot is called a <i>zero execution state</i>
6944 (it doesn't actually contain any information about memory contents
6945 or the CPU state, assuming that all hardware is just powered off).
6946
6947 <h3>Snapshot branches</h3>
6948
6949 Snapshots can be chained. Chained snapshots form a branch where
6950 every next snapshot is based on the previous one. This chaining is
6951 mostly related to hard disk branching (see <link to="IHardDisk2"/>
6952 description). This means that every time a new snapshot is created,
6953 a new differencing hard disk is implicitly created for all normal
6954 hard disks attached to the given virtual machine. This allows to
6955 fully restore hard disk contents when the machine is later reverted
6956 to a particular snapshot.
6957
6958 In the current implementation, multiple snapshot branches within one
6959 virtual machine are not allowed. Every machine has a single branch,
6960 and <link to="IConsole::takeSnapshot()"/> operation adds a new
6961 snapshot to the top of that branch.
6962
6963 Existing snapshots can be discarded using
6964 <link to="IConsole::discardSnapshot()"/>.
6965
6966 <h3>Current snapshot</h3>
6967
6968 Every virtual machine has a current snapshot, identified by
6969 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
6970 a base for the <i>current machine state</i> (see below), to the effect
6971 that all normal hard disks of the machine and its execution
6972 state are based on this snapshot.
6973
6974 In the current implementation, the current snapshot is always the
6975 last taken snapshot (i.e. the head snapshot on the branch) and it
6976 cannot be changed.
6977
6978 The current snapshot is <tt>null</tt> if the machine doesn't have
6979 snapshots at all; in this case the current machine state is just
6980 current settings of this machine plus its current execution state.
6981
6982 <h3>Current machine state</h3>
6983
6984 The current machine state is what represented by IMachine instances got
6985 directly from IVirtualBox
6986 using <link
6987 to="IVirtualBox::getMachine()">getMachine()</link>, <link
6988 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
6989 to instances returned by <link to="ISnapshot::machine"/>). This state
6990 is always used when the machine is <link to="IConsole::powerUp"> powered
6991 on</link>.
6992
6993 The current machine state also includes the current execution state.
6994 If the machine is being currently executed
6995 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
6996 and above), its execution state is just what's happening now.
6997 If it is powered off (<link to="MachineState_PoweredOff"/> or
6998 <link to="MachineState_Aborted"/>), it has a zero execution state.
6999 If the machine is saved (<link to="MachineState_Saved"/>), its
7000 execution state is what saved in the execution state file
7001 (<link to="IMachine::stateFilePath"/>).
7002
7003 If the machine is in the saved state, then, next time it is powered
7004 on, its execution state will be fully restored from the saved state
7005 file and the execution will continue from the point where the state
7006 was saved.
7007
7008 Similarly to snapshots, the current machine state can be discarded
7009 using <link to="IConsole::discardCurrentState()"/>.
7010
7011 <h3>Taking and discarding snapshots</h3>
7012
7013 The table below briefly explains the meaning of every snapshot
7014 operation:
7015
7016 <table>
7017 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7018
7019 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7020
7021 <td>Save the current state of the virtual machine, including all
7022 settings, contents of normal hard disks and the current modifications
7023 to immutable hard disks (for online snapshots)</td>
7024
7025 <td>The current state is not changed (the machine will continue
7026 execution if it is being executed when the snapshot is
7027 taken)</td></tr>
7028
7029 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7030
7031 <td>Forget the state of the virtual machine stored in the snapshot:
7032 dismiss all saved settings and delete the saved execution state (for
7033 online snapshots)</td>
7034
7035 <td>Other snapshots (including child snapshots, if any) and the
7036 current state are not directly affected</td></tr>
7037
7038 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7039
7040 <td>Restore the current state of the virtual machine from the state
7041 stored in the current snapshot, including all settings and hard disk
7042 contents</td>
7043
7044 <td>The current state of the machine existed prior to this operation
7045 is lost</td></tr>
7046
7047 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7048
7049 <td>Completely revert the virtual machine to the state it was in
7050 before the current snapshot has been taken</td>
7051
7052 <td>The current state, as well as the current snapshot, are
7053 lost</td></tr>
7054
7055 </table>
7056
7057 </desc>
7058
7059 <attribute name="id" type="uuid" readonly="yes">
7060 <desc>UUID of the snapshot.</desc>
7061 </attribute>
7062
7063 <attribute name="name" type="wstring">
7064 <desc>Short name of the snapshot.</desc>
7065 </attribute>
7066
7067 <attribute name="description" type="wstring">
7068 <desc>Optional description of the snapshot.</desc>
7069 </attribute>
7070
7071 <attribute name="timeStamp" type="long long" readonly="yes">
7072 <desc>
7073 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7074 </desc>
7075 </attribute>
7076
7077 <attribute name="online" type="boolean" readonly="yes">
7078 <desc>
7079 <tt>true</tt> if this snapshot is an online snapshot and
7080 <tt>false</tt> otherwise.
7081
7082 <note>
7083 When this attribute is <tt>true</tt>, the
7084 <link to="IMachine::stateFilePath"/> attribute of the
7085 <link to="#machine"/> object associated with this snapshot
7086 will point to the saved state file. Otherwise, it will be
7087 <tt>null</tt>.
7088 </note>
7089 </desc>
7090 </attribute>
7091
7092 <attribute name="machine" type="IMachine" readonly="yes">
7093 <desc>
7094 Virtual machine this snapshot is taken on. This object
7095 stores all settings the machine had when taking this snapshot.
7096 <note>
7097 The returned machine object is immutable, i.e. no
7098 any settings can be changed.
7099 </note>
7100 </desc>
7101 </attribute>
7102
7103 <attribute name="parent" type="ISnapshot" readonly="yes">
7104 <desc>
7105 Parent snapshot (a snapshot this one is based on).
7106 <note>
7107 It's not an error to read this attribute on a snapshot
7108 that doesn't have a parent -- a null object will be
7109 returned to indicate this.
7110 </note>
7111 </desc>
7112 </attribute>
7113
7114 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7115 <desc>
7116 Child snapshots (all snapshots having this one as a parent).
7117 <note>
7118 In the current implementation, there can be only one
7119 child snapshot, or no children at all, meaning this is the
7120 last (head) snapshot.
7121 </note>
7122 </desc>
7123 </attribute>
7124
7125 </interface>
7126
7127
7128 <!--
7129 // IMedia
7130 /////////////////////////////////////////////////////////////////////////
7131 -->
7132
7133 <enum
7134 name="MediaState"
7135 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7136 >
7137 <desc>
7138 Virtual media state.
7139 <see>IMedia</see>
7140 </desc>
7141
7142 <const name="NotCreated" value="0">
7143 <desc>
7144 Associated media storage does not exist (either was not created yet or
7145 was deleted).
7146 </desc>
7147 </const>
7148 <const name="Created" value="1">
7149 <desc>
7150 Associated storage exists and accessible.
7151 </desc>
7152 </const>
7153 <const name="LockedRead" value="2">
7154 <desc>
7155 Media is locked for reading, no data modification is possible.
7156 </desc>
7157 </const>
7158 <const name="LockedWrite" value="3">
7159 <desc>
7160 Media is locked for writing, no concurrent data reading or modification
7161 is possible.
7162 </desc>
7163 </const>
7164 <const name="Inaccessible" value="4">
7165 <desc>
7166 Associated media storage is not accessible.
7167 </desc>
7168 </const>
7169 <const name="Creating" value="5">
7170 <desc>
7171 Associated media storage is being created.
7172 </desc>
7173 </const>
7174 <const name="Deleting" value="6">
7175 <desc>
7176 Associated media storage is being deleted.
7177 </desc>
7178 </const>
7179 </enum>
7180
7181 <interface
7182 name="IMedium" extends="$unknown"
7183 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7184 wsmap="managed"
7185 >
7186 <desc>
7187 The IMedium interface is a common interface for all objects representing
7188 virtual media such as hard disks, DVD images.
7189
7190 Each medium is associated with a storage unit (such as a file on the host
7191 computer or a network resource) that holds actual data. The location of
7192 the storage unit is represented by the #location attribute. The value of
7193 this attribute is media type dependent.
7194
7195 The exact media type may be determined by querying the appropriate
7196 interface such as:
7197 <ul>
7198 <li>IHardDisk2 (virtual hard disks)</li>
7199 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7200 <li>IFloppyImage2 (raw floppy image files)</li>
7201 </ul>
7202
7203 Existing media are opened using the following methods, depending on the
7204 media type:
7205 <ul>
7206 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7207 <li><link to="IVirtualBox::openDVDImage()"/></li>
7208 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7209 </ul>
7210
7211 New hard disk media are created using the
7212 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7213 images are created outside VirtualBox, usually by storing a copy
7214 of the real medium of the corresponding type in a regular file.
7215
7216 <h3>Known Media</h3>
7217
7218 When an existing medium gets opened for the first time, it gets
7219 automatically remembered by the given VirtualBox installation or, in other
7220 words, becomes a <i>known medium</i>. Known media are stored in the media
7221 registry transparently maintained by VirtualBox and stored in settings
7222 files so that this registry is preserved when VirtualBox is not running.
7223
7224 Newly created virtual hard disks get remembered only when the associated
7225 storage unit is actually created (see IHardDisk2 for more details).
7226
7227 All known media can be enumerated using
7228 <link to="IVirtualBox::hardDisks2"/>,
7229 <link to="IVirtualBox::DVDImages"/> and
7230 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7231 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7232 and similar methods or by location using
7233 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7234
7235 Only known media can be attached to virtual machines.
7236
7237 Removing known media from the media registry is performed when the given
7238 medium is closed using the <link to="#close()"/> method or when its
7239 associated storage unit is deleted (only for hard disks).
7240
7241 <h3>Accessibility Checks</h3>
7242
7243 The given medium (with the created storage unit) is considered to be
7244 <i>accessible</i> when its storage unit can be successfully read from.
7245 Accessible media are indicated by the <link to="MediaState_Created"/>
7246 value of the <link to="#state"/> attribute. When the storage unit cannot
7247 be read (for example, because it is located on a disconnected network
7248 resource, or was accidentally deleted outside VirtualBox), the medium is
7249 considered to be <i>inaccessible</i> which is indicated by the
7250 <link to="MediaState_Inaccessible"/> state. The details about the reason
7251 of being inaccessible can be obtained using the
7252 <link to="#lastAccessError"/> attribute.
7253
7254 A new accessibility check is performed each time the <link to="#state"/>
7255 attribute is read. Please note that this check may take long time (several
7256 seconds or even minutes, depending on the storage unit location and
7257 format), and will block the calling thread until finished. For this
7258 reason, it is recommended to never read this attribute on the main UI
7259 thread to avoid making the UI unresponsive.
7260
7261 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7262 created for the first time), all known media are in the
7263 <link to="MediaState_Inaccessible"/> state but the value of the <link
7264 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7265 accessibility check is made on startup. This is done to make the
7266 VirtualBox object ready for serving requests as
7267 fast as possible and let the end-user application decide if it needs to
7268 check media accessibility right away or not.
7269 </desc>
7270
7271 <attribute name="id" type="uuid" readonly="yes">
7272 <desc>
7273 UUID of the medium. For a newly created medium, this value is a randomly
7274 generated UUID.
7275
7276 <note>
7277 For media in one of MediaState_NotCreated, MediaState_Creating or
7278 MediaState_Deleting states, the value of this property is undefined
7279 and will most likely be an empty UUID.
7280 </note>
7281 </desc>
7282 </attribute>
7283
7284 <attribute name="description" type="wstring">
7285 <desc>
7286 Optional description of the medium. For newly created media, the value
7287 of this attribute value is <tt>null</tt>.
7288
7289 Media types that don't support this attribute will return E_NOTIMPL in
7290 attempt to get or set this attribute's value.
7291
7292 <note>
7293 For some storage types, reading this attribute may return an outdated
7294 (last known) value when <link to="#state"/> is <link
7295 to="MediaState_Inaccessible"/> or <link
7296 to="MediaState_LockedWrite"/> because the value of this attribute is
7297 stored within the storage unit itself. Also note that changing the
7298 attribute value is not possible in such case, as well as when the
7299 medium is the <link to="MediaState_LockedRead"/> state.
7300 </note>
7301 </desc>
7302 </attribute>
7303
7304 <attribute name="state" type="MediaState" readonly="yes">
7305 <desc>
7306 Current media state. Inspect <link to="MediaState"/> values for details.
7307
7308 Reading this attribute may take long time because a new accessibility
7309 check of the storage unit is performed every time the attribute is read.
7310 This check may cause a significant delay if the storage unit of the
7311 given medium is, for example, a file located on a network share which is
7312 not currently accessible due to connectivity problems -- the call will
7313 not return until a timeout interval defined by the host OS for this
7314 operation expires.
7315
7316 If the last known state of the medium is <link to="MediaState_Created"/>
7317 and the accessibility check fails then the state would be set to
7318 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7319 may be used to get more details about the failure. If the state of the
7320 medium is <link to="MediaState_LockedRead"/> or
7321 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7322 non-null value of <link to="#lastAccessError"/> will indicate a failed
7323 accessibility check in this case.
7324
7325 Note that not all media states are applicable to certain media types.
7326 For example, states <link to="MediaState_NotCreated"/>,
7327 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7328 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7329 IFloppyImage2 media.
7330 </desc>
7331 </attribute>
7332
7333 <attribute name="location" type="wstring">
7334 <desc>
7335 Location of the storage unit holding media data.
7336
7337 The format of the location string is media type specific. For media
7338 types that use regular files in a host's file system, the location
7339 string is just a full file name.
7340
7341 Some media types may support changing the storage unit location by
7342 simply changing the value of this property. If this operation is not
7343 supported, the implementation will return E_NOTIMPL in attempt to set
7344 this attribute's value.
7345
7346 When setting a value of the location attribute which is a regular file
7347 in the host's file system, the given file name may be either relative to
7348 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7349 absolute. Note that if the given location specification does not contain
7350 the file extension part then a proper default extension will be
7351 automatically appended by the implementation depending on the media type.
7352 </desc>
7353 </attribute>
7354
7355 <attribute name="name" type="wstring" readonly="yes">
7356 <desc>
7357 Name of the storage unit holding media data.
7358
7359 The returned string is a short version of the <link to="#location"/>
7360 attribute that is suitable for representing the medium in situations
7361 where the full location specification is too long (such as lists
7362 and comboboxes in GUI frontends). This string is also used by frontends
7363 to sort the media list alphabetically when needed.
7364
7365 For example, for locations that are regular files in the host's file
7366 system, the value of this attribute is just a file name (+ extension),
7367 without the path specification.
7368
7369 Note that as opposed to the <link to="#location"/> attribute, the name
7370 attribute will not necessary be unique for a list of media of the
7371 given type and format.
7372 </desc>
7373 </attribute>
7374
7375 <attribute name="size" type="unsigned long long" readonly="yes">
7376 <desc>
7377 Physical size of the storage unit used to hold media data (in bytes).
7378
7379 <note>
7380 For media whose <link to="#state"/> is <link
7381 to="MediaState_Inaccessible"/>, the value of this property is the
7382 last known size. For <link to="MediaState_NotCreated"/> media,
7383 the returned value is zero.
7384 </note>
7385 </desc>
7386 </attribute>
7387
7388 <attribute name="lastAccessError" type="wstring" readonly="yes">
7389 <desc>
7390 Text message that represents the result of the last accessibility
7391 check.
7392
7393 Accessibility checks are performed each time the <link to="#state"/>
7394 attribute is read. A @c null string is returned if the last
7395 accessibility check was successful. A non-null string indicates a
7396 failure and should normally describe a reason of the failure (for
7397 example, a file read error).
7398 </desc>
7399 </attribute>
7400
7401 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7402 <desc>
7403 Array of UUIDs of all machines this medium is attached to.
7404
7405 A <tt>null</tt> array is returned if this medium is not attached to any
7406 machine or to any machine's snapshot.
7407
7408 <note>
7409 The returned array will include a machine even if this medium is not
7410 attached to that machine in the current state but attached to it in
7411 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7412 details.
7413 </note>
7414 </desc>
7415 </attribute>
7416
7417 <method name="getSnapshotIds">
7418 <desc>
7419 Returns an array of UUIDs of all snapshots of the given machine where
7420 this medium is attached to it.
7421
7422 If the medium is attached to the machine in the current state, then the
7423 first element in the array will always be the ID of the queried machine
7424 (i.e. the value equal to the @c machineId argument), followed by
7425 snapshot IDs (if any).
7426
7427 If the medium is not attached to the machine in the current state, then
7428 the array will contain only snapshot IDs.
7429
7430 The returned array may be <tt>null</tt> if this medium is not attached
7431 to the given machine at all, neither in the current state nor in one of
7432 snapshots.
7433 </desc>
7434 <param name="machineId" type="uuid" dir="in">
7435 <desc>
7436 UUID of the machine to query.
7437 </desc>
7438 </param>
7439 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7440 <desc>
7441 Array of snapshot UUIDs of the given machine using this medium.
7442 </desc>
7443 </param>
7444 </method>
7445
7446 <method name="lockRead">
7447 <desc>
7448 Locks this medium for reading.
7449
7450 The read lock is shared: many clients can simultaneously lock the
7451 same media for reading unless it is already locked for writing (see
7452 <link to="#lockWrite()"/>) in which case an error is returned.
7453
7454 When the medium is locked for reading, it cannot be modified
7455 from within VirtualBox. This means that any method that changes
7456 the properties of this medium or contents of the storage unit
7457 will return an error (unless explicitly stated otherwise) and
7458 that an attempt to start a virtual machine that wants to modify
7459 the medium will also fail.
7460
7461 When the virtual machine is started up, it locks for reading all
7462 media it uses in read-only mode. If some media cannot be locked
7463 for reading, the startup procedure will fail.
7464
7465 The medium locked for reading must be unlocked using the <link
7466 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7467 can be nested and must be followed by the same number of paired
7468 <link to="#unlockRead()"/> calls.
7469
7470 This method sets the media state to <link
7471 to="MediaState_LockedRead"/> on success. The state prior to
7472 this call must be <link to="MediaState_Created"/>, <link
7473 to="MediaState_Inaccessible"/> or <link
7474 to="MediaState_LockedRead"/>. As you can see, inaccessible
7475 media can be locked too. This is not an error; this method
7476 performs a logical lock that prevents modifications of this
7477 media through the VirtualBox API, not a physical lock of the
7478 underlying storage unit.
7479
7480 This method returns the current state of the medium
7481 <b>before</b> the operation.
7482
7483 <result name="VBOX_E_INVALID_OBJECT_STATE">
7484 Invalid media state (e.g. not created, locked, inaccessible,
7485 creating, deleting).
7486 </result>
7487
7488 </desc>
7489 <param name="state" type="MediaState" dir="return">
7490 <desc>
7491 State of the medium after the operation.
7492 </desc>
7493 </param>
7494 </method>
7495
7496 <method name="unlockRead">
7497 <desc>
7498 Cancels the read lock previously set by <link to="#lockRead()"/>.
7499
7500 Either on success or on failure, this method returns the current state
7501 of the medium <b>after</b> the operation.
7502
7503 See <link to="#lockRead()"/> for more details.
7504
7505 <result name="VBOX_E_INVALID_OBJECT_STATE">
7506 Medium not locked for reading.
7507 </result>
7508
7509 </desc>
7510 <param name="state" type="MediaState" dir="return">
7511 <desc>
7512 State of the medium after the operation.
7513 </desc>
7514 </param>
7515 </method>
7516
7517 <method name="lockWrite">
7518 <desc>
7519 Locks this medium for writing.
7520
7521 The write lock, as opposed to <link to="#lockRead()"/>, is
7522 exclusive: there may be only one client that holds a write lock
7523 and there may be no read locks while the write lock is held.
7524
7525 When the medium is locked for writing, it cannot be modified
7526 from within VirtualBox and it is not guaranteed that the values
7527 of its properties are up-to-date. Any method that changes the
7528 properties of this medium or contents of the storage unit will
7529 return an error ((unless explicitly stated otherwise) and an
7530 attempt to start a virtual machine that wants to modify or to
7531 read the medium will also fail.
7532
7533 When the virtual machine is started up, it locks for writing all
7534 media it uses to write data to. If some media cannot be locked
7535 for writing, the startup procedure will fail.
7536
7537 The medium locked for writing must be unlocked using the <link
7538 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
7539 can <b>not</b> be nested and must be followed by a paired <link
7540 to="#unlockWrite()"/> call.
7541
7542 This method sets the media state to <link
7543 to="MediaState_LockedWrite"/> on success. The state prior to
7544 this call must be <link to="MediaState_Created"/> or <link
7545 to="MediaState_Inaccessible"/>. As you can see, inaccessible
7546 media can be locked too. This is not an error; this method
7547 performs a logical lock that prevents modifications of this
7548 media through the VirtualBox API, not a physical lock of the
7549 underlying storage unit.
7550
7551 Either on success or on failure, this method returns the current
7552 state of the medium <b>before</b> the operation.
7553
7554 <result name="VBOX_E_INVALID_OBJECT_STATE">
7555 Invalid media state (e.g. not created, locked, inaccessible,
7556 creating, deleting).
7557 </result>
7558
7559 </desc>
7560 <param name="state" type="MediaState" dir="return">
7561 <desc>
7562 State of the medium after the operation.
7563 </desc>
7564 </param>
7565 </method>
7566
7567 <method name="unlockWrite">
7568 <desc>
7569 Cancels the write lock previously set by <link to="#lockWrite()"/>.
7570
7571 Either on success or on failure, this method returns the current
7572 state of the medium <b>after</b> the operation.
7573
7574 See <link to="#lockWrite()"/> for more details.
7575
7576 <result name="VBOX_E_INVALID_OBJECT_STATE">
7577 Medium not locked for writing.
7578 </result>
7579
7580 </desc>
7581 <param name="state" type="MediaState" dir="return">
7582 <desc>
7583 State of the medium after the operation.
7584 </desc>
7585 </param>
7586 </method>
7587
7588 <method name="close">
7589 <desc>
7590 Closes this medium.
7591
7592 The hard disk must not be attached to any known virtual machine
7593 and must not have any known child hard disks, otherwise the
7594 operation will fail.
7595
7596 When the hard disk is successfully closed, it gets removed from
7597 the list of remembered hard disks, but its storage unit is not
7598 deleted. In particular, this means that this hard disk can be
7599 later opened again using the <link
7600 to="IVirtualBox::openHardDisk2"/> call.
7601
7602 Note that after this method successfully returns, the given hard
7603 disk object becomes uninitialized. This means that any attempt
7604 to call any of its methods or attributes will fail with the
7605 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
7606
7607 <result name="VBOX_E_INVALID_OBJECT_STATE">
7608 Invalid media state (other than not created, created or
7609 inaccessible).
7610 </result>
7611 <result name="VBOX_E_OBJECT_IN_USE">
7612 Medium attached to virtual machine.
7613 </result>
7614 <result name="VBOX_E_FILE_ERROR">
7615 Settings file not accessible.
7616 </result>
7617 <result name="VBOX_E_XML_ERROR">
7618 Could not parse the settings file.
7619 </result>
7620
7621 </desc>
7622 </method>
7623
7624 </interface>
7625
7626
7627 <!--
7628 // IHardDisk2
7629 /////////////////////////////////////////////////////////////////////////
7630 -->
7631
7632 <enum
7633 name="HardDiskType"
7634 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
7635 >
7636 <desc>
7637 Virtual hard disk type.
7638 <see>IHardDisk</see>
7639 </desc>
7640
7641 <const name="Normal" value="0">
7642 <desc>
7643 Normal hard disk (attached directly or indirectly, preserved
7644 when taking snapshots).
7645 </desc>
7646 </const>
7647 <const name="Immutable" value="1">
7648 <desc>
7649 Immutable hard disk (attached indirectly, changes are wiped out
7650 after powering off the virtual machine).
7651 </desc>
7652 </const>
7653 <const name="Writethrough" value="2">
7654 <desc>
7655 Write through hard disk (attached directly, ignored when
7656 taking snapshots).
7657 </desc>
7658 </const>
7659 </enum>
7660
7661 <interface
7662 name="IHardDisk2Attachment" extends="$unknown"
7663 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
7664 wsmap="struct"
7665 >
7666 <desc>
7667 The IHardDisk2Attachment interface represents a hard disk attachment of a
7668 virtual machine.
7669
7670 Every hard disk attachment specifies a slot of the virtual hard disk
7671 controller and a virtual hard disk attached to this slot.
7672
7673 The array of hard disk attachments is returned by
7674 <link to="IMachine::hardDisk2Attachments"/>.
7675
7676 <note>
7677 With the COM API, this is an interface like all the others. With the
7678 webservice, this is mapped to a structure, so querying the attribute
7679 will not return an object, but a complete structure.
7680 </note>
7681 </desc>
7682 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
7683 <desc>Hard disk object associated with this attachment.</desc>
7684 </attribute>
7685
7686 <attribute name="bus" type="StorageBus" readonly="yes">
7687 <desc>Interface bus of this attachment.</desc>
7688 </attribute>
7689
7690 <attribute name="channel" type="long" readonly="yes">
7691 <desc>Channel number of this attachment.</desc>
7692 </attribute>
7693
7694 <attribute name="device" type="long" readonly="yes">
7695 <desc>Device slot number of this attachment.</desc>
7696 </attribute>
7697
7698 </interface>
7699
7700 <interface
7701 name="IHardDisk2" extends="IMedium"
7702 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
7703 wsmap="managed"
7704 >
7705 <desc>
7706 The IHardDisk2 interface represents a virtual hard disk drive
7707 used by a virtual machine.
7708
7709 Virtual hard disk objects virtualize the hard disk hardware and look like
7710 regular hard disks for the guest OS running inside the virtual machine.
7711
7712 <h3>Hard Disk Types</h3>
7713
7714 There are three types of hard disks:
7715 <link to="HardDiskType_Normal">Normal</link>,
7716 <link to="HardDiskType_Immutable">Immutable</link> and
7717 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
7718 hard disk defines how the hard disk is attached to a virtual machine and
7719 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
7720 machine with the attached hard disk is taken. The type of the hard disk is
7721 defined by the <link to="#type"/> attribute.
7722
7723 All hard disks can be also divided in two big groups: <i>base</i> hard
7724 disks and <i>differencing</i> hard disks. A base hard disk contains all
7725 sectors of the hard disk data in its storage unit and therefore can be
7726 used independently. On the contrary, a differencing hard disk contains
7727 only some part of the hard disk data (a subset of sectors) and needs
7728 another hard disk to get access to the missing sectors of data. This
7729 another hard disk is called a <i>parent</i> hard disk and defines a hard
7730 disk to which this differencing hard disk is known to be <i>linked to</i>.
7731 The parent hard disk may be itself a differencing hard disk. This
7732 way, differencing hard disks form a linked hard disk chain. This chain
7733 always ends with the base hard disk which is sometimes referred to as the
7734 root hard disk of this chain. Note that several differencing hard disks
7735 may be linked to the same parent hard disk. This way, all known hard disks
7736 form a hard disk tree which is based on their parent-child relationship.
7737
7738 Differencing hard disks can be distinguished from base hard disks by
7739 querying the <link to="#parent"/> attribute: base hard disks do not have
7740 parents they would depend on, so the value of this attribute is always
7741 <tt>null</tt> for them. Using this attribute, it is possible to walk up
7742 the hard disk tree (from the child hard disk to its parent). It is also
7743 possible to walk down the tree using the <link to="#children"/>
7744 attribute.
7745
7746 Note that the type of all differencing hard disks is
7747 <link to="HardDiskType_Normal">Normal</link>; all other values are
7748 meaningless for them. Base hard disks may be of any type.
7749
7750 <h3>Creating Hard Disks</h3>
7751
7752 New base hard disks are created using
7753 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
7754 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
7755 disks are usually implicitly created by VirtualBox when needed but may
7756 also be created explicitly using <link to="#createDiffStorage()"/>.
7757
7758 After the hard disk is successfully created (including the storage unit)
7759 or opened, it becomes a known hard disk (remembered in the internal media
7760 registry). Known hard disks can be attached to a virtual machine, accessed
7761 through <link to="IVirtualBox::getHardDisk2()"/> and
7762 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
7763 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
7764
7765 The following methods, besides <link to="IMedium::close()"/>,
7766 automatically remove the hard disk from the media registry:
7767 <ul>
7768 <li><link to="#deleteStorage()"/></li>
7769 <li><link to="#mergeTo()"/></li>
7770 </ul>
7771
7772 If the storage unit of the hard disk is a regular file in the host's
7773 file system then the rules stated in the description of the
7774 <link to="IMedium::location"/> attribute apply when setting its value. In
7775 addition, a plain file name without any path may be given, in which case
7776 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
7777 folder</link> will be prepended to it.
7778
7779 <h4>Automatic composition of the file name part</h4>
7780
7781 Another extension to the <link to="IMedium::location"/> attribute is that
7782 there is a possibility to cause VirtualBox to compose a unique value for
7783 the file name part of the location using the UUID of the hard disk. This
7784 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
7785 e.g. before the storage unit is created, and works as follows. You set the
7786 value of the <link to="IMedium::location"/> attribute to a location
7787 specification which only contains the path specification but not the file
7788 name part and ends with either a forward slash or a backslash character.
7789 In response, VirtualBox will generate a new UUID for the hard disk and
7790 compose the file name using the following pattern:
7791 <pre>
7792 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
7793 </pre>
7794 where <tt>&lt;path&gt;</tt> is the supplied path specification,
7795 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
7796 is the default extension for the storage format of this hard disk. After
7797 that, you may call any of the methods that create a new hard disk storage
7798 unit and they will use the generated UUID and file name.
7799
7800 <h3>Attaching Hard Disks</h3>
7801
7802 Hard disks are attached to virtual machines using the
7803 <link to="IMachine::attachHardDisk2()"/> method and detached using the
7804 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
7805 <link to="#type"/>, hard disks are attached either
7806 <i>directly</i> or <i>indirectly</i>.
7807
7808 When a hard disk is being attached directly, it is associated with the
7809 virtual machine and used for hard disk operations when the machine is
7810 running. When a hard disk is being attached indirectly, a new differencing
7811 hard disk linked to it is implicitly created and this differencing hard
7812 disk is associated with the machine and used for hard disk operations.
7813 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
7814 a direct attachment then the same hard disk will be returned in response
7815 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
7816 an indirect attachment is performed then
7817 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
7818 differencing hard disk, not the original one passed to <link
7819 to="IMachine::attachHardDisk2()"/>. The following table shows the
7820 dependency of the attachment type on the hard disk type:
7821
7822 <table>
7823 <tr>
7824 <th>Hard Disk Type</th>
7825 <th>Direct or Indirect?</th>
7826 </tr>
7827 <tr>
7828 <td>Normal (Base)</td>
7829 <td>
7830 Normal base hard disks that do not have children (i.e. differencing
7831 hard disks linked to them) and that are not already attached to
7832 virtual machines in snapshots are attached <b>directly</b>.
7833 Otherwise, they are attached <b>indirectly</b> because having
7834 dependent children or being part of the snapshot makes it impossible
7835 to modify hard disk contents without breaking the integrity of the
7836 dependent party. The <link to="#readOnly"/> attribute allows to
7837 quickly determine the kind of the attachment for the given hard
7838 disk. Note that if a normal base hard disk is to be indirectly
7839 attached to a virtual machine with snapshots then a special
7840 procedure called <i>smart attachment</i> is performed (see below).
7841 </td>
7842 </tr>
7843 <tr>
7844 <td>Normal (Differencing)</td>
7845 <td>
7846 Differencing hard disks are like normal base hard disks: attached
7847 <b>directly</b> if they do not have children and are not attached to
7848 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
7849 that the smart attachment procedure is never performed for
7850 differencing hard disks.
7851 </td>
7852 </tr>
7853 <tr>
7854 <td>Immutable</td>
7855 <td>
7856 Immutable hard disks are always attached <b>indirectly</b> because
7857 they are designed to be non-writable. If an immutable hard disk is
7858 attached to a virtual machine with snapshots then a special
7859 procedure called smart attachment is performed (see below).
7860 </td>
7861 </tr>
7862 <tr>
7863 <td>Writethrough</td>
7864 <td>
7865 Writethrough hard disks are always attached <b>directly</b>, also as
7866 designed. This also means that writethrough hard disks cannot have
7867 other hard disks linked to them at all.
7868 </td>
7869 </tr>
7870 </table>
7871
7872 Note that the same hard disk, regardless of its type, may be attached to
7873 more than one virtual machine at a time. In this case, the machine that is
7874 started first gains exclusive access to the hard disk and attempts to
7875 start other machines having this hard disk attached will fail until the
7876 first machine is powered down.
7877
7878 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
7879 that the given hard disk remains associated with the given machine after a
7880 successful <link to="IMachine::detachHardDisk2()"/> call until
7881 <link to="IMachine::saveSettings()"/> is called to save all changes to
7882 machine settings to disk. This deferring is necessary to guarantee that
7883 the hard disk configuration may be restored at any time by a call to
7884 <link to="IMachine::discardSettings()"/> before the settings
7885 are saved (committed).
7886
7887 Note that if <link to="IMachine::discardSettings()"/> is called after
7888 indirectly attaching some hard disks to the machine but before a call to
7889 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
7890 all differencing hard disks implicitly created by
7891 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
7892 Such implicitly created hard disks will also be immediately deleted when
7893 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
7894 call if it is made before <link to="IMachine::saveSettings()"/>. This
7895 implicit deletion is safe because newly created differencing hard
7896 disks do not contain any user data.
7897
7898 However, keep in mind that detaching differencing hard disks that were
7899 implicitly created by <link to="IMachine::attachHardDisk2()"/>
7900 before the last <link to="IMachine::saveSettings()"/> call will
7901 <b>not</b> implicitly delete them as they may already contain some data
7902 (for example, as a result of virtual machine execution). If these hard
7903 disks are no more necessary, the caller can always delete them explicitly
7904 using <link to="#deleteStorage()"/> after they are actually de-associated
7905 from this machine by the <link to="IMachine::saveSettings()"/> call.
7906
7907 <h3>Smart Attachment</h3>
7908
7909 When normal base or immutable hard disks are indirectly attached to a
7910 virtual machine then some additional steps are performed to make sure the
7911 virtual machine will have the most recent "view" of the hard disk being
7912 attached. These steps include walking through the machine's snapshots
7913 starting from the current one and going through ancestors up to the first
7914 snapshot. Hard disks attached to the virtual machine in all
7915 of the encountered snapshots are checked whether they are descendants of
7916 the given normal base or immutable hard disk. The first found child (which
7917 is the differencing hard disk) will be used instead of the normal base or
7918 immutable hard disk as a parent for creating a new differencing hard disk
7919 that will be actually attached to the machine. And only if no descendants
7920 are found or if the virtual machine does not have any snapshots then the
7921 normal base or immutable hard disk will be used itself as a parent for
7922 this differencing hard disk.
7923
7924 It is easier to explain what smart attachment does using the
7925 following example:
7926 <pre>
7927BEFORE attaching B.vdi: AFTER attaching B.vdi:
7928
7929Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
7930 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
7931 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
7932 Snapshot 4 (none) Snapshot 4 (none)
7933 CurState (none) CurState (D3->D2.vdi)
7934
7935 NOT
7936 ...
7937 CurState (D3->B.vdi)
7938 </pre>
7939 The first column is the virtual machine configuration before the base hard
7940 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
7941 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
7942 mean that the hard disk that is actually attached to the machine is a
7943 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
7944 another hard disk, <tt>B.vdi</tt>.
7945
7946 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
7947 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
7948 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
7949 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
7950 it cannot be attached directly and needs an indirect attachment (i.e.
7951 implicit creation of a new differencing hard disk). Due to the smart
7952 attachment procedure, the new differencing hard disk
7953 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
7954 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
7955 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
7956 machine.
7957
7958 Note that if there is more than one descendant hard disk of the given base
7959 hard disk found in a snapshot, and there is an exact device, channel and
7960 bus match, then this exact match will be used. Otherwise, the youngest
7961 descendant will be picked up.
7962
7963 There is one more important aspect of the smart attachment procedure which
7964 is not related to snapshots at all. Before walking through the snapshots
7965 as described above, the backup copy of the current list of hard disk
7966 attachment is searched for descendants. This backup copy is created when
7967 the hard disk configuration is changed for the first time after the last
7968 <link to="IMachine::saveSettings()"/> call and used by
7969 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
7970 changes. When such a descendant is found in this backup copy, it will be
7971 simply re-attached back, without creating a new differencing hard disk for
7972 it. This optimization is necessary to make it possible to re-attach the
7973 base or immutable hard disk to a different bus, channel or device slot
7974 without losing the contents of the differencing hard disk actually
7975 attached to the machine in place of it.
7976 </desc>
7977
7978 <attribute name="format" type="wstring" readonly="yes">
7979 <desc>
7980 Storage format of this hard disk.
7981
7982 The value of this attribute is a string that specifies a backend used to
7983 store hard disk data. The storage format is defined when you create a
7984 new hard disk or automatically detected when you open an existing hard
7985 disk medium, and cannot be changed later.
7986
7987 The list of all storage formats supported by this VirtualBox
7988 installation can be obtained using
7989 <link to="ISystemProperties::hardDiskFormats"/>.
7990 </desc>
7991 </attribute>
7992
7993 <attribute name="type" type="HardDiskType">
7994 <desc>
7995 Type (role) of this hard disk.
7996
7997 The following constraints apply when changing the value of this
7998 attribute:
7999 <ul>
8000 <li>If a hard disk is attached to a virtual machine (either in the
8001 current state or in one of the snapshots), its type cannot be
8002 changed.
8003 </li>
8004 <li>As long as the hard disk has children, its type cannot be set
8005 to <link to="HardDiskType_Writethrough"/>.
8006 </li>
8007 <li>The type of all differencing hard disks is
8008 <link to="HardDiskType_Normal"/> and cannot be changed.
8009 </li>
8010 </ul>
8011
8012 The type of a newly created or opened hard disk is set to
8013 <link to="HardDiskType_Normal"/>.
8014 </desc>
8015 </attribute>
8016
8017 <attribute name="parent" type="IHardDisk2" readonly="yes">
8018 <desc>
8019 Parent of this hard disk (a hard disk this hard disk is directly based
8020 on).
8021
8022 Only differencing hard disks have parents. For base (non-differencing)
8023 hard disks, <tt>null</tt> is returned.
8024 </desc>
8025 </attribute>
8026
8027 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8028 <desc>
8029 Children of this hard disk (all differencing hard disks directly based
8030 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8031 does not have any children.
8032 </desc>
8033 </attribute>
8034
8035 <attribute name="root" type="IHardDisk2" readonly="yes">
8036 <desc>
8037 Root hard disk of this hard disk.
8038
8039 If this is a differencing hard disk, its root hard disk is the base hard
8040 disk the given hard disk branch starts from. For all other types of hard
8041 disks, this property returns the hard disk object itself (i.e. the same
8042 object this property is read on).
8043 </desc>
8044 </attribute>
8045
8046 <attribute name="readOnly" type="boolean" readonly="yes">
8047 <desc>
8048 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8049 otherwise.
8050
8051 A hard disk is considered to be read-only when its contents cannot be
8052 modified without breaking the integrity of other parties that depend on
8053 this hard disk such as its child hard disks or snapshots of virtual
8054 machines where this hard disk is attached to these machines. If there
8055 are no children and no such snapshots then there is no dependency and
8056 the hard disk is not read-only.
8057
8058 The value of this attribute can be used to determine the kind of the
8059 attachment that will take place when attaching this hard disk to a
8060 virtual machine. If the value is <tt>false</tt> then the hard disk will
8061 be attached directly. If the value is <tt>true</tt> then the hard disk
8062 will be attached indirectly by creating a new differencing child hard
8063 disk for that. See the interface description for more information.
8064
8065 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8066 disks are always read-only while all
8067 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8068 always not.
8069
8070 <note>
8071 The read-only condition represented by this attribute is related to
8072 the hard disk type and usage, not to the current
8073 <link to="IMedium::state">media state</link> and not to the read-only
8074 state of the storage unit.
8075 </note>
8076 </desc>
8077 </attribute>
8078
8079 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8080 <desc>
8081 Logical size of this hard disk (in megabytes), as reported to the
8082 guest OS running inside the virtual machine this disk is
8083 attached to. The logical size is defined when the hard disk is created
8084 and cannot be changed later.
8085
8086 <note>
8087 Reading this property on a differencing hard disk will return the size
8088 of its <link to="#root"/> hard disk.
8089 </note>
8090 <note>
8091 For hard disks whose state is <link to="#state"/> is <link
8092 to="MediaState_Inaccessible"/>, the value of this property is the
8093 last known logical size. For <link to="MediaState_NotCreated"/> hard
8094 disks, the returned value is zero.
8095 </note>
8096 </desc>
8097 </attribute>
8098
8099 <!-- storage methods -->
8100
8101 <method name="getProperty">
8102 <desc>
8103 Returns the value of the custom hard disk property with the given name.
8104
8105 The list of all properties supported by the given hard disk format can
8106 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8107
8108 Note that if this method returns a <tt>null</tt> @a value, the requested
8109 property is supported but currently not assigned any value.
8110
8111 <result name="VBOX_E_OBJECT_NOT_FOUND">
8112 Requested property does not exist (not supported by the format).
8113 </result>
8114 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8115 </desc>
8116 <param name="name" type="wstring" dir="in">
8117 <desc>Name of the property to get.</desc>
8118 </param>
8119 <param name="value" type="wstring" dir="return">
8120 <desc>Current property value.</desc>
8121 </param>
8122 </method>
8123
8124 <method name="setProperty">
8125 <desc>
8126 Sets the value of the custom hard disk property with the given name.
8127
8128 The list of all properties supported by the given hard disk format can
8129 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8130
8131 Note that setting the property value to <tt>null</tt> is equivalent to
8132 deleting the existing value. A default value (if it is defined for this
8133 property) will be used by the format backend in this case.
8134
8135 <result name="VBOX_E_OBJECT_NOT_FOUND">
8136 Requested property does not exist (not supported by the format).
8137 </result>
8138 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8139 </desc>
8140 <param name="name" type="wstring" dir="in">
8141 <desc>Name of the property to set.</desc>
8142 </param>
8143 <param name="value" type="wstring" dir="in">
8144 <desc>Property value to set.</desc>
8145 </param>
8146 </method>
8147
8148 <method name="getProperties">
8149 <desc>
8150 Returns values for a group of properties in one call.
8151
8152 The names of the properties to get are specified using the @a names
8153 argument which is a list of comma-separated property names or
8154 <tt>null</tt> if all properties are to be returned. Note that currently
8155 the value of this argument is ignored and the method always returns all
8156 existing properties.
8157
8158 The list of all properties supported by the given hard disk format can
8159 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8160
8161 The method returns two arrays, the array of property names corresponding
8162 to the @a names argument and the current values of these properties.
8163 Both arrays have the same number of elements with each elemend at the
8164 given index in the first array corresponds to an element at the same
8165 index in the second array.
8166
8167 Note that for properties that do not have assigned values,
8168 <tt>null</tt> is returned at the appropriate index in the @a
8169 returnValues array.
8170
8171 </desc>
8172 <param name="names" type="wstring" dir="in">
8173 <desc>
8174 Names of properties to get.
8175 </desc>
8176 </param>
8177 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8178 <desc>Names of returned properties.</desc>
8179 </param>
8180 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8181 <desc>Values of returned properties.</desc>
8182 </param>
8183 </method>
8184
8185 <method name="setProperties">
8186 <desc>
8187 Sets values for a group of properties in one call.
8188
8189 The names of the properties to set are passed in the @a names
8190 array along with the new values for them in the @a values array. Both
8191 arrays have the same number of elements with each elemend at the given
8192 index in the first array corresponding to an element at the same index
8193 in the second array.
8194
8195 If there is at least one property name in @a names that is not valid,
8196 the method will fail before changing the values of any other properties
8197 from the @a names array.
8198
8199 Using this method over <link to="#setProperty()"/> is preferred if you
8200 need to set several properties at once since it will result into less
8201 IPC calls.
8202
8203 The list of all properties supported by the given hard disk format can
8204 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8205
8206 Note that setting the property value to <tt>null</tt> is equivalent to
8207 deleting the existing value. A default value (if it is defined for this
8208 property) will be used by the format backend in this case.
8209 </desc>
8210 <param name="names" type="wstring" safearray="yes" dir="in">
8211 <desc>Names of properties to set.</desc>
8212 </param>
8213 <param name="values" type="wstring" safearray="yes" dir="in">
8214 <desc>Values of properties to set.</desc>
8215 </param>
8216 </method>
8217
8218 <!-- storage methods -->
8219
8220 <method name="createDynamicStorage">
8221 <desc>
8222 Starts creating a dynamically expanding hard disk storage unit in the
8223 background. The previous storage unit created for this object, if
8224 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8225 the operation will fail.
8226
8227 Before the operation starts, the hard disk is placed in
8228 <link to="MediaState_Creating"/> state. If the create operation
8229 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8230 state.
8231
8232 After the returned progress object reports that the operation has
8233 successfully completed, the media state will be set to <link
8234 to="MediaState_Created"/>, the hard disk will be remembered by this
8235 VirtualBox installation and may be attached to virtual machines.
8236
8237 <result name="VBOX_E_NOT_SUPPORTED">
8238 Dynamic storage creation operation is not supported. See <link
8239 to="IHardDiskFormat::capabilities"/>.
8240 </result>
8241 </desc>
8242 <param name="logicalSize" type="unsigned long long" dir="in">
8243 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8244 </param>
8245 <param name="progress" type="IProgress" dir="return">
8246 <desc>Progress object to track the operation completion.</desc>
8247 </param>
8248 </method>
8249
8250 <method name="createFixedStorage">
8251 <desc>
8252 Starts creating a fixed-size hard disk storage unit in the background.
8253 The previous storage unit created for this object, if
8254 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8255 the operation will fail.
8256
8257 Before the operation starts, the hard disk is placed to
8258 <link to="MediaState_Creating"/> state. If the create operation
8259 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8260 state.
8261
8262 After the returned progress object reports that the operation is
8263 successfully complete, the media state will be set to <link
8264 to="MediaState_Created"/>, the hard disk will be remembered by this
8265 VirtualBox installation and may be attached to virtual machines.
8266
8267 <result name="VBOX_E_NOT_SUPPORTED">
8268 Fixed storage creation operation is not supported. See
8269 <link to="IHardDiskFormat::capabilities"/>.
8270 </result>
8271 </desc>
8272 <param name="logicalSize" type="unsigned long long" dir="in">
8273 <desc>Logical size of the hard disk in megabytes.</desc>
8274 </param>
8275 <param name="progress" type="IProgress" dir="return">
8276 <desc>Progress object to track the operation completion.</desc>
8277 </param>
8278 </method>
8279
8280 <method name="deleteStorage">
8281 <desc>
8282 Starts deleting the storage unit of this hard disk.
8283
8284 The hard disk must not be attached to any known virtual machine and must
8285 not have any known child hard disks, otherwise the operation will fail.
8286 It will also fail if there is no storage unit to delete or if deletion
8287 is already in progress, or if the hard disk is being in use (locked for
8288 read or for write) or inaccessible. Therefore, the only valid state for
8289 this operation to succeed is <link to="MediaState_Created"/>.
8290
8291 Before the operation starts, the hard disk is placed to
8292 <link to="MediaState_Deleting"/> state and gets removed from the list
8293 of remembered hard disks (media registry). If the delete operation
8294 fails, the media will be remembered again and placed back to
8295 <link to="MediaState_Created"/> state.
8296
8297 After the returned progress object reports that the operation is
8298 complete, the media state will be set to
8299 <link to="MediaState_NotCreated"/> and you will be able to use one of
8300 the storage creation methods to create it again.
8301
8302 <see>#close()</see>
8303
8304 <result name="VBOX_E_OBJECT_IN_USE">
8305 Hard disk is attached to a virtual machine.
8306 </result>
8307 <result name="VBOX_E_NOT_SUPPORTED">
8308 Storage deletion is not allowed because neither of storage creation
8309 operations are supported. See
8310 <link to="IHardDiskFormat::capabilities"/>.
8311 </result>
8312
8313 <note>
8314 If the deletion operation fails, it is not guaranteed that the storage
8315 unit still exists. You may check the <link to="IMedium::state"/> value
8316 to answer this question.
8317 </note>
8318 </desc>
8319 <param name="progress" type="IProgress" dir="return">
8320 <desc>Progress object to track the operation completion.</desc>
8321 </param>
8322 </method>
8323
8324 <!-- diff methods -->
8325
8326 <method name="createDiffStorage">
8327 <desc>
8328 Starts creating an empty differencing storage unit based on this hard
8329 disk in the format and at the location defined by the @a target
8330 argument.
8331
8332 The target hard disk must be in <link to="MediaState_NotCreated"/>
8333 state (i.e. must not have an existing storage unit). Upon successful
8334 completion, this operation will set the type of the target hard disk to
8335 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8336 represent the differencing hard disk data in the given format (according
8337 to the storage format of the target object).
8338
8339 After the returned progress object reports that the operation is
8340 successfully complete, the target hard disk gets remembered by this
8341 VirtualBox installation and may be attached to virtual machines.
8342
8343 <note>
8344 The hard disk will be set to <link to="MediaState_LockedRead"/>
8345 state for the duration of this operation.
8346 </note>
8347 <result name="VBOX_E_OBJECT_IN_USE">
8348 Hard disk not in NotCreated state.
8349 </result>
8350 </desc>
8351 <param name="target" type="IHardDisk2" dir="in">
8352 <desc>Target hard disk.</desc>
8353 </param>
8354 <param name="progress" type="IProgress" dir="return">
8355 <desc>Progress object to track the operation completion.</desc>
8356 </param>
8357 </method>
8358
8359 <method name="mergeTo">
8360 <desc>
8361 Starts merging the contents of this hard disk and all intermediate
8362 differencing hard disks in the chain to the given target hard disk.
8363
8364 The target hard disk must be either a descendant of this hard disk or
8365 its ancestor (otherwise this method will immediately return a failure).
8366 It follows that there are two logical directions of the merge operation:
8367 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8368 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8369 chain:
8370
8371 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8372
8373 Here, calling this method on the <tt>Base</tt> hard disk object with
8374 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8375 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8376 merge. Note that in both cases the contents of the resulting hard disk
8377 will be the same, the only difference is the hard disk object that takes
8378 the result of the merge operation. In case of the forward merge in the
8379 above example, the result will be written to <tt>Diff_2</tt>; in case of
8380 the backward merge, the result will be written to <tt>Base</tt>. In
8381 other words, the result of the operation is always stored in the target
8382 hard disk.
8383
8384 Upon successful operation completion, the storage units of all hard
8385 disks in the chain between this (source) hard disk and the target hard
8386 disk, including the source hard disk itself, will be automatically
8387 deleted and the relevant hard disk objects (including this hard disk)
8388 will become uninitialized. This means that any attempt to call any of
8389 their methods or attributes will fail with the
8390 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8391 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8392 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8393 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8394 disk itself since it will no longer be based on any other hard disk.
8395
8396 Considering the above, all of the following conditions must be met in
8397 order for the merge operation to succeed:
8398 <ul>
8399 <li>
8400 Neither this (source) hard disk nor any intermediate
8401 differencing hard disk in the chain between it and the target
8402 hard disk is attached to any virtual machine.
8403 </li>
8404 <li>
8405 Neither the source hard disk nor the target hard disk is an
8406 <link to="HardDiskType_Immutable"/> hard disk.
8407 </li>
8408 <li>
8409 The part of the hard disk tree from the source hard disk to the
8410 target hard disk is a linear chain, i.e. all hard disks in this
8411 chain have exactly one child which is the next hard disk in this
8412 chain. The only exception from this rule is the target hard disk in
8413 the forward merge operation; it is allowed to have any number of
8414 child hard disks because the merge operation will hot change its
8415 logical contents (as it is seen by the guest OS or by children).
8416 </li>
8417 <li>
8418 None of the involved hard disks are in
8419 <link to="MediaState_LockedRead"/> or
8420 <link to="MediaState_LockedWrite"/> state.
8421 </li>
8422 </ul>
8423
8424 <note>
8425 This (source) hard disk and all intermediates will be placed to <link
8426 to="MediaState_Deleting"/> state and the target hard disk will be
8427 placed to <link to="MediaState_LockedWrite"/> state and for the
8428 duration of this operation.
8429 </note>
8430 </desc>
8431 <param name="targetId" type="uuid" dir="in">
8432 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8433 </param>
8434 <param name="progress" type="IProgress" dir="return">
8435 <desc>Progress object to track the operation completion.</desc>
8436 </param>
8437 </method>
8438
8439 <!-- clone methods -->
8440
8441 <method name="cloneTo">
8442 <desc>
8443 Starts creating a clone of this hard disk in the format and at the
8444 location defined by the @a target argument.
8445
8446 The target hard disk must be in <link to="MediaState_NotCreated"/>
8447 state (i.e. must not have an existing storage unit). Upon successful
8448 completion, the cloned hard disk will contain exactly the same sector
8449 data as the hard disk being cloned, except that a new UUID for the clone
8450 will be randomly generated.
8451
8452 After the returned progress object reports that the operation is
8453 successfully complete, the target hard disk gets remembered by this
8454 VirtualBox installation and may be attached to virtual machines.
8455
8456 <note>
8457 If the cloned hard disk is a differencing hard disk, it will inherit
8458 parent dependency of the original hard disk.
8459 </note>
8460 <note>
8461 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8462 state for the duration of this operation.
8463 </note>
8464 </desc>
8465 <param name="target" type="IHardDisk2" dir="in">
8466 <desc>Target hard disk.</desc>
8467 </param>
8468 <param name="progress" type="IProgress" dir="return">
8469 <desc>Progress object to track the operation completion.</desc>
8470 </param>
8471 </method>
8472
8473 <method name="flattenTo">
8474 <desc>
8475 Starts creating a deep (independent) clone of this hard disk in the
8476 format and at the location defined by the @a target argument.
8477
8478 This operation is similar to <link to="#cloneTo()"/> except that when
8479 applied to a differencing hard disk, it will also copy missing hard disk
8480 data from all parent hard disks it is linked to. This will make the
8481 created clone an independent base hard disk that contains all hard disk
8482 data and does not need any other hard disks to operate.
8483
8484 After the returned progress object reports that the operation is
8485 successfully complete, the target hard disk gets remembered by this
8486 VirtualBox installation and may be attached to virtual machines.
8487
8488 <note>
8489 For base hard disks, this operation is identical to
8490 <link to="#cloneTo()"/>.
8491 </note>
8492 <note>
8493 This hard disk and all its parent hard disks will be placed to <link
8494 to="MediaState_LockedRead"/> state for the duration of this
8495 operation.
8496 </note>
8497 </desc>
8498 <param name="target" type="IHardDisk2" dir="in">
8499 <desc>Target hard disk.</desc>
8500 </param>
8501 <param name="progress" type="IProgress" dir="return">
8502 <desc>Progress object to track the operation completion.</desc>
8503 </param>
8504 </method>
8505
8506 </interface>
8507
8508
8509 <!--
8510 // IHardDiskFormat
8511 /////////////////////////////////////////////////////////////////////////
8512 -->
8513
8514 <enum
8515 name="DataType"
8516 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
8517 >
8518 <const name="Int32" value="0"/>
8519 <const name="Int8" value="1"/>
8520 <const name="String" value="2"/>
8521 </enum>
8522
8523 <enum
8524 name="DataFlags"
8525 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
8526 >
8527 <const name="None" value="0x00"/>
8528 <const name="Mandatory" value="0x01"/>
8529 <const name="Expert" value="0x02"/>
8530 <const name="Array" value="0x04"/>
8531 <const name="FlagMask" value="0x07"/>
8532 </enum>
8533
8534 <enum
8535 name="HardDiskFormatCapabilities"
8536 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
8537 >
8538 <desc>
8539 Hard disk format capability flags.
8540 </desc>
8541
8542 <const name="Uuid" value="0x01">
8543 <desc>
8544 Supports UUIDs as expected by VirtualBox code.
8545 </desc>
8546 </const>
8547
8548 <const name="CreateFixed" value="0x02">
8549 <desc>
8550 Supports creating fixed size images, allocating all space instantly.
8551 </desc>
8552 </const>
8553
8554 <const name="CreateDynamic" value="0x04">
8555 <desc>
8556 Supports creating dynamically growing images, allocating space on
8557 demand.
8558 </desc>
8559 </const>
8560
8561 <const name="CreateSplit2G" value="0x08">
8562 <desc>
8563 Supports creating images split in chunks of a bit less than 2 GBytes.
8564 </desc>
8565 </const>
8566
8567 <const name="Differencing" value="0x10">
8568 <desc>
8569 Supports being used as a format for differencing hard disks (see <link
8570 to="IHardDisk2::createDiffStorage"/>).
8571 </desc>
8572 </const>
8573
8574 <const name="Asynchronous" value="0x20">
8575 <desc>
8576 Supports asynchronous I/O operations for at least some configurations.
8577 </desc>
8578 </const>
8579
8580 <const name="File" value="0x40">
8581 <desc>
8582 The format backend operates on files (the <link to="IMedium::location"/>
8583 attribute of the hard disk specifies a file used to store hard disk
8584 data; for a list of supported file extensions see
8585 <link to="IHardDiskFormat::fileExtensions"/>).
8586 </desc>
8587 </const>
8588
8589 <const name="Properties" value="0x80">
8590 <desc>
8591 The format backend uses the property interface to configure the storage
8592 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
8593 method is used to get access to properties supported by the given hard
8594 disk format).
8595 </desc>
8596 </const>
8597
8598 <const name="CapabilityMask" value="0xFF"/>
8599 </enum>
8600
8601 <interface
8602 name="IHardDiskFormat" extends="$unknown"
8603 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
8604 wsmap="managed"
8605 >
8606 <desc>
8607 The IHardDiskFormat interface represents a virtual hard disk format.
8608
8609 Each hard disk format has an associated backend which is used to handle
8610 hard disks stored in this format. This interface provides information
8611 about the properties of the associated backend.
8612
8613 Each hard disk format is identified by a string represented by the
8614 <link to="#id"/> attribute. This string is used in calls like
8615 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
8616 format.
8617
8618 The list of all supported hard disk formats can be obtained using
8619 <link to="ISystemProperties::hardDiskFormats"/>.
8620
8621 <see>IHardDisk2</see>
8622 </desc>
8623
8624 <attribute name="id" type="wstring" readonly="yes">
8625 <desc>
8626 Identifier of this format.
8627
8628 This string is used in methods of other interfaces where it is necessary
8629 to specify a hard disk format, such as
8630 <link to="IVirtualBox::createHardDisk2()"/>.
8631 </desc>
8632 </attribute>
8633
8634 <attribute name="name" type="wstring" readonly="yes">
8635 <desc>
8636 Human readable description of this format.
8637
8638 Mainly for use in file open dialogs.
8639 </desc>
8640 </attribute>
8641
8642 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
8643 <desc>
8644 Array of strings containing the supported file extensions.
8645
8646 The first extension in the array is the extension preferred by the
8647 backend. It is recommended to use this extension when specifying a
8648 location of the storage unit for a new hard disk.
8649
8650 Note that some backends do not work on files, so this array may be
8651 empty.
8652
8653 <see>IHardDiskFormat::capabilities</see>
8654 </desc>
8655 </attribute>
8656
8657 <attribute name="capabilities" type="unsigned long" readonly="yes">
8658 <desc>
8659 Capabilities of the format as a set of bit flags.
8660
8661 For the meaning of individual capability flags see
8662 <link to="HardDiskFormatCapabilities"/>.
8663 </desc>
8664 </attribute>
8665
8666 <method name="describeProperties">
8667 <desc>
8668 Returns several arrays describing the properties supported by this
8669 format.
8670
8671 An element with the given index in each array describes one
8672 property. Thus, the number of elements in each returned array is the
8673 same and corresponds to the number of supported properties.
8674
8675 The returned arrays are not empty only if the
8676 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
8677
8678 <see>DataType</see>
8679 <see>DataFlags</see>
8680 </desc>
8681
8682 <param name="names" type="wstring" safearray="yes" dir="out">
8683 <desc>Array of property names.</desc>
8684 </param>
8685 <param name="description" type="wstring" safearray="yes" dir="out">
8686 <desc>Array of property descriptions.</desc>
8687 </param>
8688 <param name="types" type="DataType" safearray="yes" dir="out">
8689 <desc>Array of property types.</desc>
8690 </param>
8691 <param name="flags" type="unsigned long" safearray="yes" dir="out">
8692 <desc>Array of property flags.</desc>
8693 </param>
8694 <param name="defaults" type="wstring" safearray="yes" dir="out">
8695 <desc>Array of default property values.</desc>
8696 </param>
8697 </method>
8698
8699 </interface>
8700
8701
8702 <!--
8703 // IFloppyImage2
8704 /////////////////////////////////////////////////////////////////////////
8705 -->
8706
8707 <interface
8708 name="IFloppyImage2" extends="IMedium"
8709 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
8710 wsmap="managed"
8711 >
8712 <desc>
8713 The IFloppyImage2 interface represents a medium containing the image
8714 of a floppy disk.
8715 </desc>
8716
8717 </interface>
8718
8719
8720 <!--
8721 // IDVDImage2
8722 /////////////////////////////////////////////////////////////////////////
8723 -->
8724
8725 <interface
8726 name="IDVDImage2" extends="IMedium"
8727 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
8728 wsmap="managed"
8729 >
8730 <desc>
8731 The IDVDImage2 interface represents a medium containing the image
8732 of a CD or DVD disk in the ISO format.
8733 </desc>
8734
8735 </interface>
8736
8737
8738 <!--
8739 // IDVDDrive
8740 /////////////////////////////////////////////////////////////////////////
8741 -->
8742
8743 <interface
8744 name="IDVDDrive" extends="$unknown"
8745 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
8746 wsmap="managed"
8747 >
8748 <desc>
8749 The IDVDDrive interface represents the virtual CD/DVD drive of the
8750 virtual machine. An object of this type is returned by
8751 <link to="IMachine::DVDDrive"/>.
8752 </desc>
8753
8754 <attribute name="state" type="DriveState" readonly="yes">
8755 <desc>Current drive state.</desc>
8756 </attribute>
8757
8758 <attribute name="passthrough" type="boolean">
8759 <desc>
8760 When a host drive is mounted and passthrough is enabled
8761 the guest OS will be able to directly send SCSI commands to
8762 the host drive. This enables the guest OS to use CD/DVD writers
8763 but is potentially dangerous.
8764 </desc>
8765 </attribute>
8766
8767 <method name="mountImage">
8768 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
8769 <param name="imageId" type="uuid" dir="in"/>
8770 </method>
8771
8772 <method name="captureHostDrive">
8773 <desc>Captures the specified host CD/DVD drive.</desc>
8774 <param name="drive" type="IHostDVDDrive" dir="in"/>
8775 </method>
8776
8777 <method name="unmount">
8778 <desc>Unmounts the currently mounted image or host drive.</desc>
8779 </method>
8780
8781 <method name="getImage">
8782 <desc>Returns the currently mounted CD/DVD image.</desc>
8783 <param name="image" type="IDVDImage2" dir="return"/>
8784 </method>
8785
8786 <method name="getHostDrive">
8787 <desc>Returns the currently mounted host CD/DVD drive.</desc>
8788 <param name="drive" type="IHostDVDDrive" dir="return"/>
8789 </method>
8790
8791 </interface>
8792
8793
8794 <!--
8795 // IFloppyDrive
8796 /////////////////////////////////////////////////////////////////////////
8797 -->
8798
8799 <interface
8800 name="IFloppyDrive" extends="$unknown"
8801 uuid="159412cd-bab8-452e-8097-218a020825a6"
8802 wsmap="managed"
8803 >
8804 <desc>
8805 The IFloppyDrive interface represents the virtual floppy drive of the
8806 virtual machine. An object of this type is returned by
8807 <link to="IMachine::floppyDrive" />.
8808 </desc>
8809
8810 <attribute name="enabled" type="boolean">
8811 <desc>
8812 Flag whether the floppy drive is enabled. If it is disabled,
8813 the floppy drive will not be reported to the guest OS.
8814 </desc>
8815 </attribute>
8816
8817 <attribute name="state" type="DriveState" readonly="yes">
8818 <desc>Current drive state.</desc>
8819 </attribute>
8820
8821 <method name="mountImage">
8822 <desc>Mounts a floppy image with the specified UUID.</desc>
8823 <param name="imageId" type="uuid" dir="in"/>
8824 </method>
8825
8826 <method name="captureHostDrive">
8827 <desc>Captures the specified host floppy drive.</desc>
8828 <param name="drive" type="IHostFloppyDrive" dir="in"/>
8829 </method>
8830
8831 <method name="unmount">
8832 <desc>Unmounts the currently mounted image or host drive.</desc>
8833 </method>
8834
8835 <method name="getImage">
8836 <desc>Returns the currently mounted floppy image.</desc>
8837 <param name="image" type="IFloppyImage2" dir="return"/>
8838 </method>
8839
8840 <method name="getHostDrive">
8841 <desc>Returns the currently mounted host floppy drive.</desc>
8842 <param name="drive" type="IHostFloppyDrive" dir="return"/>
8843 </method>
8844
8845 </interface>
8846
8847
8848 <!--
8849 // IKeyboard
8850 /////////////////////////////////////////////////////////////////////////
8851 -->
8852
8853 <interface
8854 name="IKeyboard" extends="$unknown"
8855 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
8856 wsmap="managed"
8857 >
8858 <desc>
8859 The IKeyboard interface represents the virtual machine's keyboard. Used
8860 in <link to="IConsole::keyboard"/>.
8861
8862 Through this interface, the virtual machine's virtual keyboard can be controlled. One
8863 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
8864 </desc>
8865 <method name="putScancode">
8866 <desc>Sends a scancode to the keyboard.</desc>
8867 <param name="scancode" type="long" dir="in"/>
8868 </method>
8869
8870 <method name="putScancodes">
8871 <desc>Sends an array of scancode to the keyboard.</desc>
8872 <param name="scancodes" type="long" dir="in" safearray="yes"/>
8873 <param name="codesStored" type="unsigned long" dir="return"/>
8874 </method>
8875
8876 <method name="putCAD">
8877 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
8878 </method>
8879
8880 </interface>
8881
8882
8883 <!--
8884 // IMouse
8885 /////////////////////////////////////////////////////////////////////////
8886 -->
8887
8888 <enum
8889 name="MouseButtonState"
8890 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
8891 >
8892 <desc>
8893 Mouse button state.
8894 </desc>
8895
8896 <const name="LeftButton" value="0x01"/>
8897 <const name="RightButton" value="0x02"/>
8898 <const name="MiddleButton" value="0x04"/>
8899 <const name="WheelUp" value="0x08"/>
8900 <const name="WheelDown" value="0x10"/>
8901 <const name="MouseStateMask" value="0x1F"/>
8902 </enum>
8903
8904 <interface
8905 name="IMouse" extends="$unknown"
8906 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
8907 wsmap="managed"
8908 >
8909 <desc>
8910 The IMouse interface represents the virtual machine's mouse. Used in
8911 <link to="IConsole::mouse"/>.
8912
8913 Through this interface, the virtual machine's virtual mouse can be
8914 controlled.
8915 </desc>
8916
8917 <attribute name="absoluteSupported" type="boolean" readonly="yes">
8918 <desc>
8919 Whether the guest OS supports absolute mouse pointer positioning
8920 or not.
8921 <note>
8922 VirtualBox Guest Tools need to be installed to the guest OS
8923 in order to enable absolute mouse positioning support.
8924 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
8925 callback to be instantly informed about changes of this attribute
8926 during virtual machine execution.
8927 </note>
8928 <see><link to="#putMouseEventAbsolute"/></see>
8929 </desc>
8930 </attribute>
8931
8932 <method name="putMouseEvent">
8933 <desc>
8934 Initiates a mouse event using relative pointer movements
8935 along x and y axis.
8936 </desc>
8937
8938 <param name="dx" type="long" dir="in">
8939 <desc>
8940 Amount of pixels the mouse should move to the right.
8941 Negative values move the mouse to the left.
8942 </desc>
8943 </param>
8944 <param name="dy" type="long" dir="in">
8945 <desc>
8946 Amount of pixels the mouse should move downwards.
8947 Negative values move the mouse upwards.
8948 </desc>
8949 </param>
8950 <param name="dz" type="long" dir="in">
8951 <desc>
8952 Amount of mouse wheel moves.
8953 Positive values describe clockwise wheel rotations,
8954 negative values describe counterclockwise rotations.
8955 </desc>
8956 </param>
8957 <param name="buttonState" type="long" dir="in">
8958 <desc>
8959 The current state of mouse buttons. Every bit represents
8960 a mouse button as follows:
8961 <table>
8962 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8963 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8964 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8965 </table>
8966 A value of <tt>1</tt> means the corresponding button is pressed.
8967 otherwise it is released.
8968 </desc>
8969 </param>
8970 </method>
8971
8972 <method name="putMouseEventAbsolute">
8973 <desc>
8974 Positions the mouse pointer using absolute x and y coordinates.
8975 These coordinates are expressed in pixels and
8976 start from <tt>[1,1]</tt> which corresponds to the top left
8977 corner of the virtual display.
8978
8979 <note>
8980 This method will have effect only if absolute mouse
8981 positioning is supported by the guest OS.
8982 </note>
8983
8984 <see><link to="#absoluteSupported"/></see>
8985 </desc>
8986
8987 <param name="x" type="long" dir="in">
8988 <desc>
8989 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
8990 </desc>
8991 </param>
8992 <param name="y" type="long" dir="in">
8993 <desc>
8994 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
8995 </desc>
8996 </param>
8997 <param name="dz" type="long" dir="in">
8998 <desc>
8999 Amount of mouse wheel moves.
9000 Positive values describe clockwise wheel rotations,
9001 negative values describe counterclockwise rotations.
9002 </desc>
9003 </param>
9004 <param name="buttonState" type="long" dir="in">
9005 <desc>
9006 The current state of mouse buttons. Every bit represents
9007 a mouse button as follows:
9008 <table>
9009 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9010 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9011 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9012 </table>
9013 A value of <tt>1</tt> means the corresponding button is pressed.
9014 otherwise it is released.
9015 </desc>
9016 </param>
9017 </method>
9018
9019 </interface>
9020
9021 <!--
9022 // IDisplay
9023 /////////////////////////////////////////////////////////////////////////
9024 -->
9025
9026 <enum
9027 name="FramebufferAccelerationOperation"
9028 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9029 >
9030 <desc>
9031 Frame buffer acceleration operation.
9032 </desc>
9033
9034 <const name="SolidFillAcceleration" value="1"/>
9035 <const name="ScreenCopyAcceleration" value="2"/>
9036 </enum>
9037
9038 <enum
9039 name="FramebufferPixelFormat"
9040 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
9041 >
9042 <desc>
9043 Format of the video memory buffer. Constants represented by this enum can
9044 be used to test for particular values of <link
9045 to="IFramebuffer::pixelFormat"/>. See also <link
9046 to="IFramebuffer::requestResize()"/>.
9047
9048 See also www.fourcc.org for more information about FOURCC pixel formats.
9049 </desc>
9050
9051 <const name="Opaque" value="0xFFFFFFFF">
9052 <desc>
9053 Unknown buffer format (the user may not assume any particular format of
9054 the buffer).
9055 </desc>
9056 </const>
9057 <const name="FOURCC_RGB" value="0x32424752">
9058 <desc>
9059 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9060 bit layout).
9061 </desc>
9062 </const>
9063 </enum>
9064
9065 <interface
9066 name="IFramebuffer" extends="$unknown"
9067 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9068 wsmap="suppress"
9069 >
9070 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9071 <desc>Address of the start byte of the frame buffer.</desc>
9072 </attribute>
9073
9074 <attribute name="width" type="unsigned long" readonly="yes">
9075 <desc>Frame buffer width, in pixels.</desc>
9076 </attribute>
9077
9078 <attribute name="height" type="unsigned long" readonly="yes">
9079 <desc>Frame buffer height, in pixels.</desc>
9080 </attribute>
9081
9082 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9083 <desc>
9084 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9085 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9086 are: 8, 15, 16, 24 and 32.
9087 </desc>
9088 </attribute>
9089
9090 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9091 <desc>
9092 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9093 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9094 size of the scan line must be aligned to 32 bits.
9095 </desc>
9096 </attribute>
9097
9098 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9099 <desc>
9100 Frame buffer pixel format. It's either one of the values defined by <link
9101 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9102 <note>
9103 This attribute must never return <link
9104 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9105 <link to="#address"/> points to must be always known.
9106 </note>
9107 </desc>
9108 </attribute>
9109
9110 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9111 <desc>
9112 Defines whether this frame buffer uses the virtual video card's memory
9113 buffer (guest VRAM) directly or not. See <link
9114 to="IFramebuffer::requestResize()"/> for more information.
9115 </desc>
9116 </attribute>
9117
9118 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9119 <desc>
9120 Hint from the frame buffer about how much of the standard
9121 screen height it wants to use for itself. This information is
9122 exposed to the guest through the VESA BIOS and VMMDev interface
9123 so that it can use it for determining its video mode table. It
9124 is not guaranteed that the guest respects the value.
9125 </desc>
9126 </attribute>
9127
9128 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9129 <desc>
9130 An alpha-blended overlay which is superposed over the frame buffer.
9131 The initial purpose is to allow the display of icons providing
9132 information about the VM state, including disk activity, in front
9133 ends which do not have other means of doing that. The overlay is
9134 designed to controlled exclusively by IDisplay. It has no locking
9135 of its own, and any changes made to it are not guaranteed to be
9136 visible until the affected portion of IFramebuffer is updated. The
9137 overlay can be created lazily the first time it is requested. This
9138 attribute can also return NULL to signal that the overlay is not
9139 implemented.
9140 </desc>
9141 </attribute>
9142
9143 <attribute name="winId" type="unsigned long long" readonly="yes">
9144 <desc>
9145 Platform-dependent identifier of the window where context of this
9146 frame buffer is drawn, or zero if there's no such window.
9147 </desc>
9148 </attribute>
9149
9150 <method name="lock">
9151 <desc>
9152 Locks the frame buffer.
9153 Gets called by the IDisplay object where this frame buffer is
9154 bound to.
9155 </desc>
9156 </method>
9157
9158 <method name="unlock">
9159 <desc>
9160 Unlocks the frame buffer.
9161 Gets called by the IDisplay object where this frame buffer is
9162 bound to.
9163 </desc>
9164 </method>
9165
9166 <method name="notifyUpdate">
9167 <desc>
9168 Informs about an update.
9169 Gets called by the display object where this buffer is
9170 registered.
9171 </desc>
9172 <param name="x" type="unsigned long" dir="in"/>
9173 <param name="y" type="unsigned long" dir="in"/>
9174 <param name="width" type="unsigned long" dir="in"/>
9175 <param name="height" type="unsigned long" dir="in"/>
9176 <param name="finished" type="boolean" dir="return"/>
9177 </method>
9178
9179 <method name="requestResize">
9180 <desc>
9181 Requests a size and pixel format change.
9182
9183 There are two modes of working with the video buffer of the virtual
9184 machine. The <i>indirect</i> mode implies that the IFramebuffer
9185 implementation allocates a memory buffer for the requested display mode
9186 and provides it to the virtual machine. In <i>direct</i> mode, the
9187 IFramebuffer implementation uses the memory buffer allocated and owned
9188 by the virtual machine. This buffer represents the video memory of the
9189 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9190 usually faster because the implementation gets a raw pointer to the
9191 guest VRAM buffer which it can directly use for visualizing the contents
9192 of the virtual display, as opposed to the indirect mode where the
9193 contents of guest VRAM are copied to the memory buffer provided by
9194 the implementation every time a display update occurs.
9195
9196 It is important to note that the direct mode is really fast only when
9197 the implementation uses the given guest VRAM buffer directly, for
9198 example, by blitting it to the window representing the virtual machine's
9199 display, which saves at least one copy operation comparing to the
9200 indirect mode. However, using the guest VRAM buffer directly is not
9201 always possible: the format and the color depth of this buffer may be
9202 not supported by the target window, or it may be unknown (opaque) as in
9203 case of text or non-linear multi-plane VGA video modes. In this case,
9204 the indirect mode (that is always available) should be used as a
9205 fallback: when the guest VRAM contents are copied to the
9206 implementation-provided memory buffer, color and format conversion is
9207 done automatically by the underlying code.
9208
9209 The @a pixelFormat parameter defines whether the direct mode is
9210 available or not. If @a pixelFormat is <link
9211 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9212 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9213 bytesPerLine parameters must be ignored and the implementation must use
9214 the indirect mode (where it provides its own buffer in one of the
9215 supported formats). In all other cases, @a pixelFormat together with @a
9216 bitsPerPixel and @a bytesPerLine define the format of the video memory
9217 buffer pointed to by the @a VRAM parameter and the implementation is
9218 free to choose which mode to use. To indicate that this frame buffer uses
9219 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9220 attribute must return <tt>true</tt> and <link to="#address"/> must
9221 return exactly the same address that is passed in the @a VRAM parameter
9222 of this method; otherwise it is assumed that the indirect strategy is
9223 chosen.
9224
9225 The @a width and @a height parameters represent the size of the
9226 requested display mode in both modes. In case of indirect mode, the
9227 provided memory buffer should be big enough to store data of the given
9228 display mode. In case of direct mode, it is guaranteed that the given @a
9229 VRAM buffer contains enough space to represent the display mode of the
9230 given size. Note that this frame buffer's <link to="#width"/> and <link
9231 to="#height"/> attributes must return exactly the same values as
9232 passed to this method after the resize is completed (see below).
9233
9234 The @a finished output parameter determines if the implementation has
9235 finished resizing the frame buffer or not. If, for some reason, the
9236 resize cannot be finished immediately during this call, @a finished
9237 must be set to @c false, and the implementation must call
9238 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9239 this method as soon as possible. If @a finished is @c false, the
9240 machine will not call any frame buffer methods until
9241 <link to="IDisplay::resizeCompleted()"/> is called.
9242
9243 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9244 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9245 this frame buffer must return exactly the same values as specified in the
9246 parameters of this method, after the resize is completed. If the
9247 indirect mode is chosen, these attributes must return values describing
9248 the format of the implementation's own memory buffer <link
9249 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9250 value must always correlate with <link to="#pixelFormat"/>. Note that
9251 the <link to="#pixelFormat"/> attribute must never return <link
9252 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9253
9254 <note>
9255 This method is called by the IDisplay object under the
9256 <link to="#lock()"/> provided by this IFramebuffer
9257 implementation. If this method returns @c false in @a finished, then
9258 this lock is not released until
9259 <link to="IDisplay::resizeCompleted()"/> is called.
9260 </note>
9261 </desc>
9262 <param name="screenId" type="unsigned long" dir="in">
9263 <desc>
9264 Logical screen number. Must be used in the corresponding call to
9265 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9266 </desc>
9267 </param>
9268 <param name="pixelFormat" type="unsigned long" dir="in">
9269 <desc>
9270 Pixel format of the memory buffer pointed to by @a VRAM.
9271 See also <link to="FramebufferPixelFormat"/>.
9272 </desc>
9273 </param>
9274 <param name="VRAM" type="octet" mod="ptr" dir="in">
9275 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9276 </param>
9277 <param name="bitsPerPixel" type="unsigned long" dir="in">
9278 <desc>Color depth, bits per pixel.</desc>
9279 </param>
9280 <param name="bytesPerLine" type="unsigned long" dir="in">
9281 <desc>Size of one scan line, in bytes.</desc>
9282 </param>
9283 <param name="width" type="unsigned long" dir="in">
9284 <desc>Width of the guest display, in pixels.</desc>
9285 </param>
9286 <param name="height" type="unsigned long" dir="in">
9287 <desc>Height of the guest display, in pixels.</desc>
9288 </param>
9289 <param name="finished" type="boolean" dir="return">
9290 <desc>
9291 Can the VM start using the new frame buffer immediately
9292 after this method returns or it should wait for
9293 <link to="IDisplay::resizeCompleted()"/>.
9294 </desc>
9295 </param>
9296 </method>
9297
9298 <method name="operationSupported">
9299 <desc>
9300 Returns whether the given acceleration operation is supported
9301 by the IFramebuffer implementation. If not, the display object
9302 will not attempt to call the corresponding IFramebuffer entry
9303 point. Even if an operation is indicated to supported, the
9304 IFramebuffer implementation always has the option to return non
9305 supported from the corresponding acceleration method in which
9306 case the operation will be performed by the display engine. This
9307 allows for reduced IFramebuffer implementation complexity where
9308 only common cases are handled.
9309 </desc>
9310 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9311 <param name="supported" type="boolean" dir="return"/>
9312 </method>
9313
9314 <method name="videoModeSupported">
9315 <desc>
9316 Returns whether the frame buffer implementation is willing to
9317 support a given video mode. In case it is not able to render
9318 the video mode (or for some reason not willing), it should
9319 return false. Usually this method is called when the guest
9320 asks the VMM device whether a given video mode is supported
9321 so the information returned is directly exposed to the guest.
9322 It is important that this method returns very quickly.
9323 </desc>
9324 <param name="width" type="unsigned long" dir="in"/>
9325 <param name="height" type="unsigned long" dir="in"/>
9326 <param name="bpp" type="unsigned long" dir="in"/>
9327 <param name="supported" type="boolean" dir="return"/>
9328 </method>
9329
9330 <method name="solidFill">
9331 <desc>
9332 Fills the specified rectangle on screen with a solid color.
9333 </desc>
9334 <param name="x" type="unsigned long" dir="in"/>
9335 <param name="y" type="unsigned long" dir="in"/>
9336 <param name="width" type="unsigned long" dir="in"/>
9337 <param name="height" type="unsigned long" dir="in"/>
9338 <param name="color" type="unsigned long" dir="in"/>
9339 <param name="handled" type="boolean" dir="return"/>
9340 </method>
9341
9342 <method name="copyScreenBits">
9343 <desc>
9344 Copies specified rectangle on the screen.
9345 </desc>
9346 <param name="xDst" type="unsigned long" dir="in"/>
9347 <param name="yDst" type="unsigned long" dir="in"/>
9348 <param name="xSrc" type="unsigned long" dir="in"/>
9349 <param name="ySrc" type="unsigned long" dir="in"/>
9350 <param name="width" type="unsigned long" dir="in"/>
9351 <param name="height" type="unsigned long" dir="in"/>
9352 <param name="handled" type="boolean" dir="return"/>
9353 </method>
9354
9355 <method name="getVisibleRegion">
9356 <desc>
9357 Returns the visible region of this frame buffer.
9358
9359 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9360 @a count parameter is ignored and the number of elements necessary to
9361 describe the current visible region is returned in @a countCopied.
9362
9363 If @a rectangles is not <tt>NULL</tt> but @a count is less
9364 than the required number of elements to store region data, the method
9365 will report a failure. If @a count is equal or greater than the
9366 required number of elements, then the actual number of elements copied
9367 to the provided array will be returned in @a countCopied.
9368
9369 <note>
9370 The address of the provided array must be in the process space of
9371 this IFramebuffer object.
9372 </note>
9373 </desc>
9374 <param name="rectangles" type="octet" mod="ptr" dir="in">
9375 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9376 </param>
9377 <param name="count" type="unsigned long" dir="in">
9378 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9379 </param>
9380 <param name="countCopied" type="unsigned long" dir="return">
9381 <desc>Number of elements copied to the @a rectangles array.</desc>
9382 </param>
9383 </method>
9384
9385 <method name="setVisibleRegion">
9386 <desc>
9387 Suggests a new visible region to this frame buffer. This region
9388 represents the area of the VM display which is a union of regions of
9389 all top-level windows of the guest operating system running inside the
9390 VM (if the Guest Additions for this system support this
9391 functionality). This information may be used by the frontends to
9392 implement the seamless desktop integration feature.
9393
9394 <note>
9395 The address of the provided array must be in the process space of
9396 this IFramebuffer object.
9397 </note>
9398 <note>
9399 The IFramebuffer implementation must make a copy of the provided
9400 array of rectangles.
9401 </note>
9402 </desc>
9403 <param name="rectangles" type="octet" mod="ptr" dir="in">
9404 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9405 </param>
9406 <param name="count" type="unsigned long" dir="in">
9407 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9408 </param>
9409 </method>
9410
9411 </interface>
9412
9413 <interface
9414 name="IFramebufferOverlay" extends="IFrameBuffer"
9415 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9416 wsmap="suppress"
9417 >
9418 <desc>
9419 The IFramebufferOverlay interface represents an alpha blended overlay
9420 for displaying status icons above an IFramebuffer. It is always created
9421 not visible, so that it must be explicitly shown. It only covers a
9422 portion of the IFramebuffer, determined by its width, height and
9423 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9424 that order) format, and may be written to directly. Do re-read the
9425 width though, after setting it, as it may be adjusted (increased) to
9426 make it more suitable for the front end.
9427 </desc>
9428 <attribute name="x" type="unsigned long" readonly="yes">
9429 <desc>X position of the overlay, relative to the frame buffer.</desc>
9430 </attribute>
9431
9432 <attribute name="y" type="unsigned long" readonly="yes">
9433 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9434 </attribute>
9435
9436 <attribute name="visible" type="boolean" readonly="no">
9437 <desc>
9438 Whether the overlay is currently visible.
9439 </desc>
9440 </attribute>
9441
9442 <attribute name="alpha" type="unsigned long" readonly="no">
9443 <desc>
9444 The global alpha value for the overlay. This may or may not be
9445 supported by a given front end.
9446 </desc>
9447 </attribute>
9448
9449 <method name="move">
9450 <desc>
9451 Changes the overlay's position relative to the IFramebuffer.
9452 </desc>
9453 <param name="x" type="unsigned long" dir="in"/>
9454 <param name="y" type="unsigned long" dir="in"/>
9455 </method>
9456
9457 </interface>
9458
9459 <interface
9460 name="IDisplay" extends="$unknown"
9461 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
9462 wsmap="suppress"
9463 >
9464 <desc>
9465 The IDisplay interface represents the virtual machine's display.
9466
9467 The object implementing this interface is contained in each
9468 <link to="IConsole::display"/> attribute and represents the visual
9469 output of the virtual machine.
9470
9471 The virtual display supports pluggable output targets represented by the
9472 IFramebuffer interface. Examples of the output target are a window on
9473 the host computer or an RDP session's display on a remote computer.
9474 </desc>
9475 <attribute name="width" type="unsigned long" readonly="yes">
9476 <desc>Current display width.</desc>
9477 </attribute>
9478
9479 <attribute name="height" type="unsigned long" readonly="yes">
9480 <desc>Current display height.</desc>
9481 </attribute>
9482
9483 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9484 <desc>
9485 Current guest display color depth. Note that this may differ
9486 from <link to="IFramebuffer::bitsPerPixel"/>.
9487 </desc>
9488 </attribute>
9489
9490 <method name="setupInternalFramebuffer">
9491 <desc>
9492 Prepares an internally managed frame buffer.
9493 </desc>
9494 <param name="depth" type="unsigned long" dir="in"/>
9495 </method>
9496
9497 <method name="lockFramebuffer">
9498 <desc>
9499 Requests access to the internal frame buffer.
9500 </desc>
9501 <param name="address" type="octet" mod="ptr" dir="return"/>
9502 </method>
9503
9504 <method name="unlockFramebuffer">
9505 <desc>
9506 Releases access to the internal frame buffer.
9507 </desc>
9508 </method>
9509
9510 <method name="registerExternalFramebuffer">
9511 <desc>
9512 Registers an external frame buffer.
9513 </desc>
9514 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9515 </method>
9516
9517 <method name="setFramebuffer">
9518 <desc>
9519 Sets the framebuffer for given screen.
9520 </desc>
9521 <param name="screenId" type="unsigned long" dir="in"/>
9522 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9523 </method>
9524
9525 <method name="getFramebuffer">
9526 <desc>
9527 Queries the framebuffer for given screen.
9528 </desc>
9529 <param name="screenId" type="unsigned long" dir="in"/>
9530 <param name="framebuffer" type="IFramebuffer" dir="out"/>
9531 <param name="xOrigin" type="long" dir="out"/>
9532 <param name="yOrigin" type="long" dir="out"/>
9533 </method>
9534
9535 <method name="setVideoModeHint">
9536 <desc>
9537 Asks VirtualBox to request the given video mode from
9538 the guest. This is just a hint and it cannot be guaranteed
9539 that the requested resolution will be used. Guest Additions
9540 are required for the request to be seen by guests. The caller
9541 should issue the request and wait for a resolution change and
9542 after a timeout retry.
9543
9544 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
9545 parameters means that the corresponding values should be taken from the
9546 current video mode (i.e. left unchanged).
9547
9548 If the guest OS supports multi-monitor configuration then the @a display
9549 parameter specifies the number of the guest display to send the hint to:
9550 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
9551 so on. If the multi-monitor configuration is not supported, @a display
9552 must be <tt>0</tt>.
9553
9554 </desc>
9555 <param name="width" type="unsigned long" dir="in"/>
9556 <param name="height" type="unsigned long" dir="in"/>
9557 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
9558 <param name="display" type="unsigned long" dir="in"/>
9559 </method>
9560
9561 <method name="setSeamlessMode">
9562 <desc>
9563 Enables or disables seamless guest display rendering (seamless desktop
9564 integration) mode.
9565 <note>
9566 Calling this method has no effect if <link
9567 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
9568 </note>
9569 </desc>
9570 <param name="enabled" type="boolean" dir="in"/>
9571 </method>
9572
9573 <method name="takeScreenShot">
9574 <desc>
9575 Takes a screen shot of the requested size and copies it to the
9576 32-bpp buffer allocated by the caller.
9577 </desc>
9578 <param name="address" type="octet" mod="ptr" dir="in"/>
9579 <param name="width" type="unsigned long" dir="in"/>
9580 <param name="height" type="unsigned long" dir="in"/>
9581 </method>
9582
9583 <method name="drawToScreen">
9584 <desc>
9585 Draws a 32-bpp image of the specified size from the given buffer
9586 to the given point on the VM display.
9587 </desc>
9588 <param name="address" type="octet" mod="ptr" dir="in"/>
9589 <param name="x" type="unsigned long" dir="in"/>
9590 <param name="y" type="unsigned long" dir="in"/>
9591 <param name="width" type="unsigned long" dir="in"/>
9592 <param name="height" type="unsigned long" dir="in"/>
9593 </method>
9594
9595 <method name="invalidateAndUpdate">
9596 <desc>
9597 Does a full invalidation of the VM display and instructs the VM
9598 to update it.
9599 </desc>
9600 </method>
9601
9602 <method name="resizeCompleted">
9603 <desc>
9604 Signals that a framebuffer has completed the resize operation.
9605 </desc>
9606 <param name="screenId" type="unsigned long" dir="in"/>
9607 </method>
9608
9609 <method name="updateCompleted">
9610 <desc>
9611 Signals that a framebuffer has completed the update operation.
9612 </desc>
9613 </method>
9614
9615 </interface>
9616
9617 <!--
9618 // INetworkAdapter
9619 /////////////////////////////////////////////////////////////////////////
9620 -->
9621
9622 <enum
9623 name="NetworkAttachmentType"
9624 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
9625 >
9626 <desc>
9627 Network attachment type.
9628 </desc>
9629
9630 <const name="Null" value="0">
9631 <desc>Null value, also means "not attached".</desc>
9632 </const>
9633 <const name="NAT" value="1"/>
9634 <const name="HostInterface" value="2"/>
9635 <const name="Internal" value="3"/>
9636 </enum>
9637
9638 <enum
9639 name="NetworkAdapterType"
9640 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
9641 >
9642 <desc>
9643 Network adapter type.
9644 </desc>
9645
9646 <const name="Null" value="0">
9647 <desc>Null value (never used by the API).</desc>
9648 </const>
9649 <const name="Am79C970A" value="1"/>
9650 <const name="Am79C973" value="2"/>
9651 <const name="I82540EM" value="3"/>
9652 <const name="I82543GC" value="4"/>
9653 </enum>
9654
9655 <interface
9656 name="INetworkAdapter" extends="$unknown"
9657 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
9658 wsmap="managed"
9659 >
9660 <attribute name="adapterType" type="NetworkAdapterType">
9661 <desc>
9662 Type of the virtual network adapter. Depending on this value,
9663 VirtualBox will provide a different virtual network hardware
9664 to the guest.
9665 </desc>
9666 </attribute>
9667
9668 <attribute name="slot" type="unsigned long" readonly="yes">
9669 <desc>
9670 Slot number this adapter is plugged into. Corresponds to
9671 the value you pass to <link to="IMachine::getNetworkAdapter"/>
9672 to obtain this instance.
9673 </desc>
9674 </attribute>
9675
9676 <attribute name="enabled" type="boolean">
9677 <desc>
9678 Flag whether the network adapter is present in the
9679 guest system. If disabled, the virtual guest hardware will
9680 not contain this network adapter. Can only be changed when
9681 the VM is not running.
9682 </desc>
9683 </attribute>
9684
9685 <attribute name="MACAddress" type="wstring">
9686 <desc>
9687 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
9688 it to NULL, VirtualBox will generate a unique MAC address.
9689 </desc>
9690 </attribute>
9691
9692 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
9693
9694 <attribute name="hostInterface" type="wstring">
9695 <desc>
9696 Name of the Host Network Interface that is currently in use. NULL will be returned
9697 if no device has been allocated. On Linux, setting this refers to a permanent TAP
9698 device. However, a file descriptor has precedence over the interface name on Linux.
9699 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
9700 interface name would have to be determined using the file descriptor and /proc/self/fd.
9701 </desc>
9702 </attribute>
9703
9704<if target="xpidl">
9705 <attribute name="TAPFileDescriptor" type="long">
9706 <desc>
9707 File descriptor of the TAP device. It can either be setup by the caller
9708 which has to supply an existing valid file handle allocated in the parent
9709 process of the VM process or allocated by VirtualBox. The value is -1 if it
9710 has not been defined. This property is non persistent, i.e. it will not be
9711 stored in the VM's configuration data and thus has to be set at each startup.
9712 </desc>
9713 </attribute>
9714 <attribute name="TAPSetupApplication" type="wstring">
9715 <desc>
9716 Application to start to configure the TAP device.
9717 It is being passed two parameters, 1) the file handle (as ASCII),
9718 2) the TAP device name if it is available.
9719 </desc>
9720 </attribute>
9721 <attribute name="TAPTerminateApplication" type="wstring">
9722 <desc>
9723 Application to start before closing a TAP device.
9724 It is being passed two parameters, 1) the file handle (as ASCII),
9725 2) the TAP device name if it is available.
9726 </desc>
9727 </attribute>
9728</if>
9729
9730 <attribute name="internalNetwork" type="wstring">
9731 <desc>
9732 Name of the internal network the VM is attached to.
9733 </desc>
9734 </attribute>
9735
9736 <attribute name="NATNetwork" type="wstring">
9737 <desc>
9738 Name of the NAT network the VM is attached to.
9739 </desc>
9740 </attribute>
9741
9742 <attribute name="cableConnected" type="boolean">
9743 <desc>
9744 Flag whether the adapter reports the cable as connected or not.
9745 It can be used to report offline situations to a VM.
9746 </desc>
9747 </attribute>
9748
9749 <attribute name="lineSpeed" type="unsigned long">
9750 <desc>
9751 Line speed reported by custom drivers, in units of 1 kbps.
9752 </desc>
9753 </attribute>
9754
9755 <attribute name="traceEnabled" type="boolean">
9756 <desc>
9757 Flag whether network traffic from/to the network card should be traced.
9758 Can only be toggled when the VM is turned off.
9759 </desc>
9760 </attribute>
9761
9762 <attribute name="traceFile" type="wstring">
9763 <desc>
9764 Filename where a network trace will be stored. If not set, VBox-pid.pcap
9765 will be used.
9766 </desc>
9767 </attribute>
9768
9769 <method name="attachToNAT">
9770 <desc>
9771 Attach the network adapter to the Network Address Translation (NAT) interface.
9772 </desc>
9773 </method>
9774
9775 <method name="attachToHostInterface">
9776 <desc>
9777 Attach the network adapter to a host interface. On Linux, the TAP
9778 setup application will be executed if configured and unless a device
9779 name and/or file descriptor has been set, a new TAP interface will be
9780 created.
9781 </desc>
9782 </method>
9783
9784 <method name="attachToInternalNetwork">
9785 <desc>
9786 Attach the network adapter to an internal network.
9787 </desc>
9788 </method>
9789
9790 <method name="detach">
9791 <desc>
9792 Detach the network adapter
9793 </desc>
9794 </method>
9795 </interface>
9796
9797
9798 <!--
9799 // ISerialPort
9800 /////////////////////////////////////////////////////////////////////////
9801 -->
9802
9803 <enum
9804 name="PortMode"
9805 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
9806 >
9807 <desc>
9808 The PortMode enumeration represents possible communication modes for
9809 the virtual serial port device.
9810 </desc>
9811
9812 <const name="Disconnected" value="0">
9813 <desc>Virtual device is not attached to any real host device.</desc>
9814 </const>
9815 <const name="HostPipe" value="1">
9816 <desc>Virtual device is attached to a host pipe.</desc>
9817 </const>
9818 <const name="HostDevice" value="2">
9819 <desc>Virtual device is attached to a host device.</desc>
9820 </const>
9821 </enum>
9822
9823 <interface
9824 name="ISerialPort" extends="$unknown"
9825 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
9826 wsmap="managed"
9827 >
9828
9829 <desc>
9830 The ISerialPort interface represents the virtual serial port device.
9831
9832 The virtual serial port device acts like an ordinary serial port
9833 inside the virtual machine. This device communicates to the real
9834 serial port hardware in one of two modes: host pipe or host device.
9835
9836 In host pipe mode, the #path attribute specifies the path to the pipe on
9837 the host computer that represents a serial port. The #server attribute
9838 determines if this pipe is created by the virtual machine process at
9839 machine startup or it must already exist before starting machine
9840 execution.
9841
9842 In host device mode, the #path attribute specifies the name of the
9843 serial port device on the host computer.
9844
9845 There is also a third communication mode: the disconnected mode. In this
9846 mode, the guest OS running inside the virtual machine will be able to
9847 detect the serial port, but all port write operations will be discarded
9848 and all port read operations will return no data.
9849
9850 <see>IMachine::getSerialPort</see>
9851 </desc>
9852
9853 <attribute name="slot" type="unsigned long" readonly="yes">
9854 <desc>
9855 Slot number this serial port is plugged into. Corresponds to
9856 the value you pass to <link to="IMachine::getSerialPort"/>
9857 to obtain this instance.
9858 </desc>
9859 </attribute>
9860
9861 <attribute name="enabled" type="boolean">
9862 <desc>
9863 Flag whether the serial port is enabled. If disabled,
9864 the serial port will not be reported to the guest OS.
9865 </desc>
9866 </attribute>
9867
9868 <attribute name="IOBase" type="unsigned long">
9869 <desc>Base I/O address of the serial port.</desc>
9870 </attribute>
9871
9872 <attribute name="IRQ" type="unsigned long">
9873 <desc>IRQ number of the serial port.</desc>
9874 </attribute>
9875
9876 <attribute name="hostMode" type="PortMode">
9877 <desc>
9878 How is this port connected to the host.
9879 <note>
9880 Changing this attribute may fail if the conditions for
9881 <link to="#path"/> are not met.
9882 </note>
9883 </desc>
9884 </attribute>
9885
9886 <attribute name="server" type="boolean">
9887 <desc>
9888 Flag whether this serial port acts as a server (creates a new pipe on
9889 the host) or as a client (uses the existing pipe). This attribute is
9890 used only when <link to="#hostMode"/> is PortMode_HostPipe.
9891 </desc>
9892 </attribute>
9893
9894 <attribute name="path" type="wstring">
9895 <desc>
9896 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
9897 PortMode_HostPipe, or the host serial device name when
9898 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
9899 cases, setting a @c null or an empty string as the attribute's value
9900 will result into an error. Otherwise, the value of this property is
9901 ignored.
9902 </desc>
9903 </attribute>
9904
9905 </interface>
9906
9907 <!--
9908 // IParallelPort
9909 /////////////////////////////////////////////////////////////////////////
9910 -->
9911
9912 <interface
9913 name="IParallelPort" extends="$unknown"
9914 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
9915 wsmap="managed"
9916 >
9917
9918 <desc>
9919 The IParallelPort interface represents the virtual parallel port device.
9920
9921 The virtual parallel port device acts like an ordinary parallel port
9922 inside the virtual machine. This device communicates to the real
9923 parallel port hardware using the name of the parallel device on the host
9924 computer specified in the #path attribute.
9925
9926 Each virtual parallel port device is assigned a base I/O address and an
9927 IRQ number that will be reported to the guest operating system and used
9928 to operate the given parallel port from within the virtual machine.
9929
9930 <see>IMachine::getParallelPort</see>
9931 </desc>
9932
9933 <attribute name="slot" type="unsigned long" readonly="yes">
9934 <desc>
9935 Slot number this parallel port is plugged into. Corresponds to
9936 the value you pass to <link to="IMachine::getParallelPort"/>
9937 to obtain this instance.
9938 </desc>
9939 </attribute>
9940
9941 <attribute name="enabled" type="boolean">
9942 <desc>
9943 Flag whether the parallel port is enabled. If disabled,
9944 the parallel port will not be reported to the guest OS.
9945 </desc>
9946 </attribute>
9947
9948 <attribute name="IOBase" type="unsigned long">
9949 <desc>Base I/O address of the parallel port.</desc>
9950 </attribute>
9951
9952 <attribute name="IRQ" type="unsigned long">
9953 <desc>IRQ number of the parallel port.</desc>
9954 </attribute>
9955
9956 <attribute name="path" type="wstring">
9957 <desc>
9958 Host parallel device name. If this parallel port is enabled, setting a
9959 @c null or an empty string as this attribute's value will result into
9960 an error.
9961 </desc>
9962 </attribute>
9963
9964 </interface>
9965
9966
9967 <!--
9968 // IMachineDebugger
9969 /////////////////////////////////////////////////////////////////////////
9970 -->
9971
9972 <interface
9973 name="IMachineDebugger" extends="$unknown"
9974 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
9975 wsmap="suppress"
9976 >
9977 <method name="resetStats">
9978 <desc>
9979 Reset VM statistics.
9980 </desc>
9981 <param name="pattern" type="wstring" dir="in">
9982 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9983 </param>
9984 </method>
9985
9986 <method name="dumpStats">
9987 <desc>
9988 Dumps VM statistics.
9989 </desc>
9990 <param name="pattern" type="wstring" dir="in">
9991 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9992 </param>
9993 </method>
9994
9995 <method name="getStats">
9996 <desc>
9997 Get the VM statistics in a XMLish format.
9998 </desc>
9999 <param name="pattern" type="wstring" dir="in">
10000 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10001 </param>
10002 <param name="withDescriptions" type="boolean" dir="in">
10003 <desc>Whether to include the descriptions.</desc>
10004 </param>
10005 <param name="stats" type="wstring" dir="out">
10006 <desc>The XML document containing the statistics.</desc>
10007 </param>
10008 </method>
10009
10010 <method name="injectNMI">
10011 <desc>
10012 Inject an NMI into a running VT-x/AMD-V VM.
10013 </desc>
10014 </method>
10015
10016 <attribute name="singlestep" type="boolean">
10017 <desc>Switch for enabling singlestepping.</desc>
10018 </attribute>
10019
10020 <attribute name="recompileUser" type="boolean">
10021 <desc>Switch for forcing code recompilation for user mode code.</desc>
10022 </attribute>
10023
10024 <attribute name="recompileSupervisor" type="boolean">
10025 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10026 </attribute>
10027
10028 <attribute name="PATMEnabled" type="boolean">
10029 <desc>Switch for enabling and disabling the PATM component.</desc>
10030 </attribute>
10031
10032 <attribute name="CSAMEnabled" type="boolean">
10033 <desc>Switch for enabling and disabling the CSAM component.</desc>
10034 </attribute>
10035
10036 <attribute name="logEnabled" type="boolean">
10037 <desc>Switch for enabling and disabling logging.</desc>
10038 </attribute>
10039
10040 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10041 <desc>
10042 Flag indicating whether the VM is currently making use of CPU hardware
10043 virtualization extensions.
10044 </desc>
10045 </attribute>
10046
10047 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10048 <desc>
10049 Flag indicating whether the VM is currently making use of the nested paging
10050 CPU hardware virtualization extension.
10051 </desc>
10052 </attribute>
10053
10054 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10055 <desc>
10056 Flag indicating whether the VM is currently making use of the VPID
10057 VT-x extension.
10058 </desc>
10059 </attribute>
10060
10061 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10062 <desc>
10063 Flag indicating whether the VM is currently making use of the Physical
10064 Address Extension CPU feature.
10065 </desc>
10066 </attribute>
10067
10068 <attribute name="virtualTimeRate" type="unsigned long">
10069 <desc>
10070 The rate at which the virtual time runs expressed as a percentage.
10071 The accepted range is 2% to 20000%.
10072 </desc>
10073 </attribute>
10074
10075 <!-- @todo method for setting log flags, groups and destination! -->
10076
10077 <attribute name="VM" type="unsigned long long" readonly="yes">
10078 <desc>
10079 Gets the VM handle. This is only for internal use while
10080 we carve the details of this interface.
10081 </desc>
10082 </attribute>
10083
10084 </interface>
10085
10086 <!--
10087 // IUSBController
10088 /////////////////////////////////////////////////////////////////////////
10089 -->
10090
10091 <interface
10092 name="IUSBController" extends="$unknown"
10093 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10094 wsmap="managed"
10095 >
10096 <attribute name="enabled" type="boolean">
10097 <desc>
10098 Flag whether the USB controller is present in the
10099 guest system. If disabled, the virtual guest hardware will
10100 not contain any USB controller. Can only be changed when
10101 the VM is powered off.
10102 </desc>
10103 </attribute>
10104
10105 <attribute name="enabledEhci" type="boolean">
10106 <desc>
10107 Flag whether the USB EHCI controller is present in the
10108 guest system. If disabled, the virtual guest hardware will
10109 not contain a USB EHCI controller. Can only be changed when
10110 the VM is powered off.
10111 </desc>
10112 </attribute>
10113
10114 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10115 <desc>
10116 USB standard version which the controller implements.
10117 This is a BCD which means that the major version is in the
10118 high byte and minor version is in the low byte.
10119 </desc>
10120 </attribute>
10121
10122 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10123 <desc>
10124 List of USB device filters associated with the machine.
10125
10126 If the machine is currently running, these filters are activated
10127 every time a new (supported) USB device is attached to the host
10128 computer that was not ignored by global filters
10129 (<link to="IHost::USBDeviceFilters"/>).
10130
10131 These filters are also activated when the machine is powered up.
10132 They are run against a list of all currently available USB
10133 devices (in states
10134 <link to="USBDeviceState_Available"/>,
10135 <link to="USBDeviceState_Busy"/>,
10136 <link to="USBDeviceState_Held"/>) that were not previously
10137 ignored by global filters.
10138
10139 If at least one filter matches the USB device in question, this
10140 device is automatically captured (attached to) the virtual USB
10141 controller of this machine.
10142
10143 <see>IUSBDeviceFilter, ::IUSBController</see>
10144 </desc>
10145 </attribute>
10146
10147 <method name="createDeviceFilter">
10148 <desc>
10149 Creates a new USB device filter. All attributes except
10150 the filter name are set to <tt>null</tt> (any match),
10151 <i>active</i> is <tt>false</tt> (the filter is not active).
10152
10153 The created filter can then be added to the list of filters using
10154 <link to="#insertDeviceFilter()"/>.
10155
10156 <see>#deviceFilters</see>
10157 </desc>
10158 <param name="name" type="wstring" dir="in">
10159 <desc>
10160 Filter name. See <link to="IUSBDeviceFilter::name"/>
10161 for more info.
10162 </desc>
10163 </param>
10164 <param name="filter" type="IUSBDeviceFilter" dir="return">
10165 <desc>Created filter object.</desc>
10166 </param>
10167 </method>
10168
10169 <method name="insertDeviceFilter">
10170 <desc>
10171 Inserts the given USB device to the specified position
10172 in the list of filters.
10173
10174 Positions are numbered starting from <tt>0</tt>. If the specified
10175 position is equal to or greater than the number of elements in
10176 the list, the filter is added to the end of the collection.
10177
10178 <note>
10179 Duplicates are not allowed, so an attempt to insert a
10180 filter that is already in the collection, will return an
10181 error.
10182 </note>
10183
10184 <see>#deviceFilters</see>
10185 </desc>
10186 <param name="position" type="unsigned long" dir="in">
10187 <desc>Position to insert the filter to.</desc>
10188 </param>
10189 <param name="filter" type="IUSBDeviceFilter" dir="in">
10190 <desc>USB device filter to insert.</desc>
10191 </param>
10192 </method>
10193
10194 <method name="removeDeviceFilter">
10195 <desc>
10196 Removes a USB device filter from the specified position in the
10197 list of filters.
10198
10199 Positions are numbered starting from <tt>0</tt>. Specifying a
10200 position equal to or greater than the number of elements in
10201 the list will produce an error.
10202
10203 <see>#deviceFilters</see>
10204 </desc>
10205 <param name="position" type="unsigned long" dir="in">
10206 <desc>Position to remove the filter from.</desc>
10207 </param>
10208 <param name="filter" type="IUSBDeviceFilter" dir="return">
10209 <desc>Removed USB device filter.</desc>
10210 </param>
10211 </method>
10212
10213 </interface>
10214
10215
10216 <!--
10217 // IUSBDevice
10218 /////////////////////////////////////////////////////////////////////////
10219 -->
10220
10221 <enumerator
10222 name="IUSBDeviceEnumerator" type="IUSBDevice"
10223 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10224 />
10225
10226 <collection
10227 name="IUSBDeviceCollection" type="IUSBDevice"
10228 enumerator="IUSBDeviceEnumerator"
10229 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10230 readonly="yes"
10231 >
10232 <method name="findById">
10233 <desc>
10234 Searches this collection for a USB device with the given UUID.
10235 <note>
10236 The method returns an error if the given UUID does not
10237 correspond to any USB device in the collection.
10238 </note>
10239 <see>IUSBDevice::id</see>
10240 </desc>
10241 <param name="id" type="uuid" dir="in">
10242 <desc>UUID of the USB device to search for.</desc>
10243 </param>
10244 <param name="device" type="IUSBDevice" dir="return">
10245 <desc>Found USB device object.</desc>
10246 </param>
10247 </method>
10248
10249 <method name="findByAddress">
10250 <desc>
10251 Searches this collection for a USB device with the given
10252 host address.
10253 <note>
10254 The method returns an error if the given address does not
10255 correspond to any USB device in the collection.
10256 </note>
10257 <see>IUSBDevice::address</see>
10258 </desc>
10259 <param name="name" type="wstring" dir="in">
10260 <desc>
10261 Address of the USB device (as assigned by the host) to
10262 search for.
10263 </desc>
10264 </param>
10265 <param name="device" type="IUSBDevice" dir="return">
10266 <desc>Found USB device object.</desc>
10267 </param>
10268 </method>
10269
10270 </collection>
10271
10272 <interface
10273 name="IUSBDevice" extends="$unknown"
10274 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10275 wsmap="managed"
10276 >
10277 <desc>
10278 The IUSBDevice interface represents a virtual USB device attached to the
10279 virtual machine.
10280
10281 A collection of objects implementing this interface is stored in the
10282 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10283 attached to a running virtual machine's USB controller.
10284 </desc>
10285
10286 <attribute name="id" type="uuid" readonly="yes">
10287 <desc>
10288 Unique USB device ID. This ID is built from #vendorId,
10289 #productId, #revision and #serialNumber.
10290 </desc>
10291 </attribute>
10292
10293 <attribute name="vendorId" type="unsigned short" readonly="yes">
10294 <desc>Vendor ID.</desc>
10295 </attribute>
10296
10297 <attribute name="productId" type="unsigned short" readonly="yes">
10298 <desc>Product ID.</desc>
10299 </attribute>
10300
10301 <attribute name="revision" type="unsigned short" readonly="yes">
10302 <desc>
10303 Product revision number. This is a packed BCD represented as
10304 unsigned short. The high byte is the integer part and the low
10305 byte is the decimal.
10306 </desc>
10307 </attribute>
10308
10309 <attribute name="manufacturer" type="wstring" readonly="yes">
10310 <desc>Manufacturer string.</desc>
10311 </attribute>
10312
10313 <attribute name="product" type="wstring" readonly="yes">
10314 <desc>Product string.</desc>
10315 </attribute>
10316
10317 <attribute name="serialNumber" type="wstring" readonly="yes">
10318 <desc>Serial number string.</desc>
10319 </attribute>
10320
10321 <attribute name="address" type="wstring" readonly="yes">
10322 <desc>Host specific address of the device.</desc>
10323 </attribute>
10324
10325 <attribute name="port" type="unsigned short" readonly="yes">
10326 <desc>
10327 Host USB port number the device is physically
10328 connected to.
10329 </desc>
10330 </attribute>
10331
10332 <attribute name="version" type="unsigned short" readonly="yes">
10333 <desc>
10334 The major USB version of the device - 1 or 2.
10335 </desc>
10336 </attribute>
10337
10338 <attribute name="portVersion" type="unsigned short" readonly="yes">
10339 <desc>
10340 The major USB version of the host USB port the device is
10341 physically connected to - 1 or 2. For devices not connected to
10342 anything this will have the same value as the version attribute.
10343 </desc>
10344 </attribute>
10345
10346 <attribute name="remote" type="boolean" readonly="yes">
10347 <desc>
10348 Whether the device is physically connected to a remote VRDP
10349 client or to a local host machine.
10350 </desc>
10351 </attribute>
10352
10353 </interface>
10354
10355
10356 <!--
10357 // IUSBDeviceFilter
10358 /////////////////////////////////////////////////////////////////////////
10359 -->
10360
10361 <enumerator
10362 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10363 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10364 />
10365
10366 <collection
10367 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10368 enumerator="IUSBDeviceFilterEnumerator"
10369 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10370 readonly="yes"
10371 />
10372
10373 <interface
10374 name="IUSBDeviceFilter" extends="$unknown"
10375 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10376 wsmap="managed"
10377 >
10378 <desc>
10379 The IUSBDeviceFilter interface represents an USB device filter used
10380 to perform actions on a group of USB devices.
10381
10382 This type of filters is used by running virtual machines to
10383 automatically capture selected USB devices once they are physically
10384 attached to the host computer.
10385
10386 A USB device is matched to the given device filter if and only if all
10387 attributes of the device match the corresponding attributes of the
10388 filter (that is, attributes are joined together using the logical AND
10389 operation). On the other hand, all together, filters in the list of
10390 filters carry the semantics of the logical OR operation. So if it is
10391 desirable to create a match like "this vendor id OR this product id",
10392 one needs to create two filters and specify "any match" (see below)
10393 for unused attributes.
10394
10395 All filter attributes used for matching are strings. Each string
10396 is an expression representing a set of values of the corresponding
10397 device attribute, that will match the given filter. Currently, the
10398 following filtering expressions are supported:
10399
10400 <ul>
10401 <li><i>Interval filters</i>. Used to specify valid intervals for
10402 integer device attributes (Vendor ID, Product ID and Revision).
10403 The format of the string is:
10404
10405 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
10406
10407 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
10408 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
10409 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
10410 is omitted before a dash (<tt>-</tt>), the minimum possible integer
10411 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
10412 possible integer is assumed.
10413 </li>
10414 <li><i>Boolean filters</i>. Used to specify acceptable values for
10415 boolean device attributes. The format of the string is:
10416
10417 <tt>true|false|yes|no|0|1</tt>
10418
10419 </li>
10420 <li><i>Exact match</i>. Used to specify a single value for the given
10421 device attribute. Any string that doesn't start with <tt>int:</tt>
10422 represents the exact match. String device attributes are compared to
10423 this string including case of symbols. Integer attributes are first
10424 converted to a string (see individual filter attributes) and then
10425 compared ignoring case.
10426
10427 </li>
10428 <li><i>Any match</i>. Any value of the corresponding device attribute
10429 will match the given filter. An empty or <tt>null</tt> string is
10430 used to construct this type of filtering expressions.
10431
10432 </li>
10433 </ul>
10434
10435 <note>
10436 On the Windows host platform, interval filters are not currently
10437 available. Also all string filter attributes
10438 (<link to="#manufacturer"/>, <link to="#product"/>,
10439 <link to="#serialNumber"/>) are ignored, so they behave as
10440 <i>any match</i> no matter what string expression is specified.
10441 </note>
10442
10443 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
10444 </desc>
10445
10446 <attribute name="name" type="wstring">
10447 <desc>
10448 Visible name for this filter.
10449 This name is used to visually distinguish one filter from another,
10450 so it can neither be <tt>null</tt> nor an empty string.
10451 </desc>
10452 </attribute>
10453
10454 <attribute name="active" type="boolean">
10455 <desc>Whether this filter active or has been temporarily disabled.</desc>
10456 </attribute>
10457
10458 <attribute name="vendorId" type="wstring">
10459 <desc>
10460 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
10461 The string representation for the <i>exact matching</i>
10462 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10463 (including leading zeroes).
10464 </desc>
10465 </attribute>
10466
10467 <attribute name="productId" type="wstring">
10468 <desc>
10469 <link to="IUSBDevice::productId">Product ID</link> filter.
10470 The string representation for the <i>exact matching</i>
10471 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10472 (including leading zeroes).
10473 </desc>
10474 </attribute>
10475
10476 <attribute name="revision" type="wstring">
10477 <desc>
10478 <link to="IUSBDevice::productId">Product revision number</link>
10479 filter. The string representation for the <i>exact matching</i>
10480 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
10481 of the integer part of the revision, and <tt>F</tt> is the
10482 decimal digit of its fractional part (including leading and
10483 trailing zeros).
10484 Note that for interval filters, it's best to use the hexadecimal
10485 form, because the revision is stored as a 16 bit packed BCD value;
10486 so the expression <tt>int:0x0100-0x0199</tt> will match any
10487 revision from <tt>1.0</tt> to <tt>1.99</tt>.
10488 </desc>
10489 </attribute>
10490
10491 <attribute name="manufacturer" type="wstring">
10492 <desc>
10493 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
10494 </desc>
10495 </attribute>
10496
10497 <attribute name="product" type="wstring">
10498 <desc>
10499 <link to="IUSBDevice::product">Product</link> filter.
10500 </desc>
10501 </attribute>
10502
10503 <attribute name="serialNumber" type="wstring">
10504 <desc>
10505 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
10506 </desc>
10507 </attribute>
10508
10509 <attribute name="port" type="wstring">
10510 <desc>
10511 <link to="IUSBDevice::port">Host USB port</link> filter.
10512 </desc>
10513 </attribute>
10514
10515 <attribute name="remote" type="wstring">
10516 <desc>
10517 <link to="IUSBDevice::remote">Remote state</link> filter.
10518 <note>
10519 This filter makes sense only for machine USB filters,
10520 i.e. it is ignored by IHostUSBDeviceFilter objects.
10521 </note>
10522 </desc>
10523 </attribute>
10524
10525 <attribute name="maskedInterfaces" type="unsigned long">
10526 <desc>
10527 This is an advanced option for hiding one or more USB interfaces
10528 from the guest. The value is a bit mask where the bits that are set
10529 means the corresponding USB interface should be hidden, masked off
10530 if you like.
10531 This feature only works on Linux hosts.
10532 </desc>
10533 </attribute>
10534
10535 </interface>
10536
10537
10538 <!--
10539 // IHostUSBDevice
10540 /////////////////////////////////////////////////////////////////////////
10541 -->
10542
10543 <enum
10544 name="USBDeviceState"
10545 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
10546 >
10547 <desc>
10548 USB device state. This enumeration represents all possible states
10549 of the USB device physically attached to the host computer regarding
10550 its state on the host computer and availability to guest computers
10551 (all currently running virtual machines).
10552
10553 Once a supported USB device is attached to the host, global USB
10554 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
10555 either ignore the device, or put it to USBDeviceState_Held state, or do
10556 nothing. Unless the device is ignored by global filters, filters of all
10557 currently running guests (<link to="IUSBController::deviceFilters"/>) are
10558 activated that can put it to USBDeviceState_Captured state.
10559
10560 If the device was ignored by global filters, or didn't match
10561 any filters at all (including guest ones), it is handled by the host
10562 in a normal way. In this case, the device state is determined by
10563 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
10564 or USBDeviceState_Available, depending on the current device usage.
10565
10566 Besides auto-capturing based on filters, the device can be manually
10567 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
10568 state is USBDeviceState_Busy, USBDeviceState_Available or
10569 USBDeviceState_Held.
10570
10571 <note>
10572 Due to differences in USB stack implementations in Linux and Win32,
10573 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
10574 only to the Linux version of the product. This also means that (<link
10575 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
10576 device state is USBDeviceState_Held.
10577 </note>
10578
10579 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
10580 </desc>
10581
10582 <const name="NotSupported" value="0">
10583 <desc>
10584 Not supported by the VirtualBox server, not available to guests.
10585 </desc>
10586 </const>
10587 <const name="Unavailable" value="1">
10588 <desc>
10589 Being used by the host computer exclusively,
10590 not available to guests.
10591 </desc>
10592 </const>
10593 <const name="Busy" value="2">
10594 <desc>
10595 Being used by the host computer, potentially available to guests.
10596 </desc>
10597 </const>
10598 <const name="Available" value="3">
10599 <desc>
10600 Not used by the host computer, available to guests (the host computer
10601 can also start using the device at any time).
10602 </desc>
10603 </const>
10604 <const name="Held" value="4">
10605 <desc>
10606 Held by the VirtualBox server (ignored by the host computer),
10607 available to guests.
10608 </desc>
10609 </const>
10610 <const name="Captured" value="5">
10611 <desc>
10612 Captured by one of the guest computers, not available
10613 to anybody else.
10614 </desc>
10615 </const>
10616 </enum>
10617
10618 <enumerator
10619 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
10620 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
10621 />
10622
10623 <collection
10624 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
10625 enumerator="IHostUSBDeviceEnumerator"
10626 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
10627 readonly="yes"
10628 >
10629 <method name="findById">
10630 <desc>
10631 Searches this collection for a USB device with the given UUID.
10632 <note>
10633 The method returns an error if the given UUID does not
10634 correspond to any USB device in the collection.
10635 </note>
10636 <see>IHostUSBDevice::id</see>
10637 </desc>
10638 <param name="id" type="uuid" dir="in">
10639 <desc>UUID of the USB device to search for.</desc>
10640 </param>
10641 <param name="device" type="IHostUSBDevice" dir="return">
10642 <desc>Found USB device object.</desc>
10643 </param>
10644 </method>
10645
10646 <method name="findByAddress">
10647 <desc>
10648 Searches this collection for a USB device with the given
10649 host address.
10650 <note>
10651 The method returns an error if the given address does not
10652 correspond to any USB device in the collection.
10653 </note>
10654 <see>IHostUSBDevice::address</see>
10655 </desc>
10656 <param name="name" type="wstring" dir="in">
10657 <desc>
10658 Address of the USB device (as assigned by the host) to
10659 search for.
10660 </desc>
10661 </param>
10662 <param name="device" type="IHostUSBDevice" dir="return">
10663 <desc>Found USB device object.</desc>
10664 </param>
10665 </method>
10666
10667 </collection>
10668
10669 <interface
10670 name="IHostUSBDevice" extends="IUSBDevice"
10671 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
10672 wsmap="managed"
10673 >
10674 <desc>
10675 The IHostUSBDevice interface represents a physical USB device attached
10676 to the host computer.
10677
10678 Besides properties inherited from IUSBDevice, this interface adds the
10679 <link to="#state"/> property that holds the current state of the USB
10680 device.
10681
10682 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
10683 </desc>
10684
10685 <attribute name="state" type="USBDeviceState" readonly="yes">
10686 <desc>
10687 Current state of the device.
10688 </desc>
10689 </attribute>
10690
10691 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
10692
10693 </interface>
10694
10695
10696 <!--
10697 // IHostUSBDeviceFilter
10698 /////////////////////////////////////////////////////////////////////////
10699 -->
10700
10701 <enum
10702 name="USBDeviceFilterAction"
10703 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
10704 >
10705 <desc>
10706 Actions for host USB device filters.
10707 <see>IHostUSBDeviceFilter, USBDeviceState</see>
10708 </desc>
10709
10710 <const name="Null" value="0">
10711 <desc>Null value (never used by the API).</desc>
10712 </const>
10713 <const name="Ignore" value="1">
10714 <desc>Ignore the matched USB device.</desc>
10715 </const>
10716 <const name="Hold" value="2">
10717 <desc>Hold the matched USB device.</desc>
10718 </const>
10719 </enum>
10720
10721 <enumerator
10722 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
10723 uuid="ff735211-903e-4642-9c37-189eb44579fe"
10724 />
10725
10726 <collection
10727 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
10728 enumerator="IHostUSBDeviceFilterEnumerator"
10729 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
10730 readonly="yes"
10731 />
10732
10733 <interface
10734 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
10735 uuid="4cc70246-d74a-400f-8222-3900489c0374"
10736 wsmap="managed"
10737 >
10738 <desc>
10739 The IHostUSBDeviceFilter interface represents a global filter for a
10740 physical USB device used by the host computer. Used indirectly in
10741 <link to="IHost::USBDeviceFilters"/>.
10742
10743 Using filters of this type, the host computer determines the initial
10744 state of the USB device after it is physically attached to the
10745 host's USB controller.
10746
10747 <note>
10748 The <link to="#remote"/> attribute is ignored by this type of
10749 filters, because it makes sense only for
10750 <link to="IUSBController::deviceFilters">machine USB filters</link>.
10751 </note>
10752
10753 <see>IHost::USBDeviceFilters</see>
10754 </desc>
10755
10756 <attribute name="action" type="USBDeviceFilterAction">
10757 <desc>
10758 Action performed by the host when an attached USB device
10759 matches this filter.
10760 </desc>
10761 </attribute>
10762
10763 </interface>
10764
10765 <!--
10766 // IAudioAdapter
10767 /////////////////////////////////////////////////////////////////////////
10768 -->
10769
10770 <enum
10771 name="AudioDriverType"
10772 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
10773 >
10774 <desc>
10775 Host audio driver type.
10776 </desc>
10777
10778 <const name="Null" value="0">
10779 <desc>Null value, also means "dummy audio driver".</desc>
10780 </const>
10781 <const name="WinMM" value="1"/>
10782 <const name="OSS" value="2"/>
10783 <const name="ALSA" value="3"/>
10784 <const name="DirectSound" value="4"/>
10785 <const name="CoreAudio" value="5"/>
10786 <const name="MMPM" value="6"/>
10787 <const name="Pulse" value="7"/>
10788 <const name="SolAudio" value="8"/>
10789 </enum>
10790
10791 <enum
10792 name="AudioControllerType"
10793 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
10794 >
10795 <desc>
10796 Virtual audio controller type.
10797 </desc>
10798
10799 <const name="AC97" value="0"/>
10800 <const name="SB16" value="1"/>
10801 </enum>
10802
10803 <interface
10804 name="IAudioAdapter" extends="$unknown"
10805 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
10806 wsmap="managed"
10807 >
10808 <desc>
10809 The IAudioAdapter interface represents the virtual audio adapter of
10810 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
10811 </desc>
10812 <attribute name="enabled" type="boolean">
10813 <desc>
10814 Flag whether the audio adapter is present in the
10815 guest system. If disabled, the virtual guest hardware will
10816 not contain any audio adapter. Can only be changed when
10817 the VM is not running.
10818 </desc>
10819 </attribute>
10820 <attribute name="audioController" type="AudioControllerType">
10821 <desc>
10822 The audio hardware we emulate.
10823 </desc>
10824 </attribute>
10825 <attribute name="audioDriver" type="AudioDriverType">
10826 <desc>
10827 Audio driver the adapter is connected to. This setting
10828 can only be changed when the VM is not running.
10829 </desc>
10830 </attribute>
10831 </interface>
10832
10833 <!--
10834 // IVRDPServer
10835 /////////////////////////////////////////////////////////////////////////
10836 -->
10837
10838 <enum
10839 name="VRDPAuthType"
10840 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
10841 >
10842 <desc>
10843 VRDP authentication type.
10844 </desc>
10845
10846 <const name="Null" value="0">
10847 <desc>Null value, also means "no authentication".</desc>
10848 </const>
10849 <const name="External" value="1"/>
10850 <const name="Guest" value="2"/>
10851 </enum>
10852
10853 <interface
10854 name="IVRDPServer" extends="$unknown"
10855 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
10856 wsmap="managed"
10857 >
10858 <attribute name="enabled" type="boolean">
10859 <desc>VRDP server status.</desc>
10860 </attribute>
10861
10862 <attribute name="port" type="unsigned long">
10863 <desc>
10864 VRDP server port number.
10865 <note>
10866 Setting the value of this property to <tt>0</tt> will reset the port
10867 number to the default value which is
10868 currently <tt>3389</tt>. Reading this property will always return a
10869 real port number, even after it has been set to <tt>0</tt> (in which
10870 case the default port is returned).
10871 </note>
10872 </desc>
10873 </attribute>
10874
10875 <attribute name="netAddress" type="wstring">
10876 <desc>VRDP server address.</desc>
10877 </attribute>
10878
10879 <attribute name="authType" type="VRDPAuthType">
10880 <desc>VRDP authentication method.</desc>
10881 </attribute>
10882
10883 <attribute name="authTimeout" type="unsigned long">
10884 <desc>Timeout for guest authentication. Milliseconds.</desc>
10885 </attribute>
10886
10887 <attribute name="allowMultiConnection" type="boolean">
10888 <desc>
10889 Flag whether multiple simultaneous connections to the VM are permitted.
10890 Note that this will be replaced by a more powerful mechanism in the future.
10891 </desc>
10892 </attribute>
10893
10894 <attribute name="reuseSingleConnection" type="boolean">
10895 <desc>
10896 Flag whether the existing connection must be dropped and a new connection
10897 must be established by the VRDP server, when a new client connects in single
10898 connection mode.
10899 </desc>
10900 </attribute>
10901
10902 </interface>
10903
10904
10905 <!--
10906 // ISharedFolder
10907 /////////////////////////////////////////////////////////////////////////
10908 -->
10909
10910 <enumerator
10911 name="ISharedFolderEnumerator" type="ISharedFolder"
10912 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
10913 />
10914
10915 <collection
10916 name="ISharedFolderCollection" type="ISharedFolder"
10917 enumerator="ISharedFolderEnumerator"
10918 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
10919 readonly="yes">
10920
10921 <method name="findByName">
10922 <desc>
10923 Searches this collection for a shared folder with the given logical
10924 name.
10925 <note>
10926 The method returns an error if the given name does not correspond to
10927 any shared folder in the collection.
10928 </note>
10929 </desc>
10930 <param name="name" type="wstring" dir="in">
10931 <desc>Logical name of the shared folder to search for</desc>
10932 </param>
10933 <param name="sharedFolder" type="ISharedFolder" dir="return">
10934 <desc>Found shared folder object</desc>
10935 </param>
10936 </method>
10937
10938 </collection>
10939
10940 <interface
10941 name="ISharedFolder" extends="$unknown"
10942 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
10943 wsmap="struct"
10944 >
10945 <desc>
10946 The ISharedFolder interface represents a folder in the host computer's
10947 file system accessible from the guest OS running inside a virtual
10948 machine using an associated logical name.
10949
10950 There are three types of shared folders:
10951 <ul>
10952 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
10953 folders available to all virtual machines.</li>
10954 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
10955 VM-specific shared folders available to the given virtual machine at
10956 startup.</li>
10957 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
10958 VM-specific shared folders created in the session context (for
10959 example, when the virtual machine is running) and automatically
10960 discarded when the session is closed (the VM is powered off).</li>
10961 </ul>
10962
10963 Logical names of shared folders must be unique within the given scope
10964 (global, permanent or transient). However, they do not need to be unique
10965 across scopes. In this case, the definition of the shared folder in a
10966 more specific scope takes precedence over definitions in all other
10967 scopes. The order of precedence is (more specific to more general):
10968 <ol>
10969 <li>Transient definitions</li>
10970 <li>Permanent definitions</li>
10971 <li>Global definitions</li>
10972 </ol>
10973
10974 For example, if MyMachine has a shared folder named
10975 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
10976 transient shared folder named <tt>C_DRIVE</tt> (that points
10977 to <tt>C:\\\\WINDOWS</tt>) will change the definition
10978 of <tt>C_DRIVE</tt> in the guest OS so
10979 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
10980 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
10981 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
10982 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
10983 to <tt>C:\\</tt> if it still exists.
10984
10985 Note that permanent and transient shared folders of different machines
10986 are in different name spaces, so they don't overlap and don't need to
10987 have unique logical names.
10988
10989 <note>
10990 Global shared folders are not implemented in the current version of the
10991 product.
10992 </note>
10993 </desc>
10994
10995 <attribute name="name" type="wstring" readonly="yes">
10996 <desc>Logical name of the shared folder.</desc>
10997 </attribute>
10998
10999 <attribute name="hostPath" type="wstring" readonly="yes">
11000 <desc>Full path to the shared folder in the host file system.</desc>
11001 </attribute>
11002
11003 <attribute name="accessible" type="boolean" readonly="yes">
11004 <desc>
11005 Whether the folder defined by the host path is currently
11006 accessible or not.
11007 For example, the folder can be unaccessible if it is placed
11008 on the network share that is not available by the time
11009 this property is read.
11010 </desc>
11011 </attribute>
11012
11013 <attribute name="writable" type="boolean" readonly="yes">
11014 <desc>
11015 Whether the folder defined by the host path is writable or
11016 not.
11017 </desc>
11018 </attribute>
11019
11020 </interface>
11021
11022 <!--
11023 // ISession
11024 /////////////////////////////////////////////////////////////////////////
11025 -->
11026
11027 <interface
11028 name="IInternalSessionControl" extends="$unknown"
11029 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11030 internal="yes"
11031 wsmap="suppress"
11032 >
11033 <method name="getPID">
11034 <desc>PID of the process that has created this Session object.
11035 </desc>
11036 <param name="pid" type="unsigned long" dir="return"/>
11037 </method>
11038
11039 <method name="getRemoteConsole">
11040 <desc>Returns the console object suitable for remote control.</desc>
11041 <param name="console" type="IConsole" dir="return"/>
11042 </method>
11043
11044 <method name="assignMachine">
11045 <desc>
11046 Assigns the machine object associated with this direct-type
11047 session or informs the session that it will be a remote one
11048 (if machine = NULL).
11049 </desc>
11050 <param name="machine" type="IMachine" dir="in"/>
11051 </method>
11052
11053 <method name="assignRemoteMachine">
11054 <desc>
11055 Assigns the machine and the (remote) console object associated with
11056 this remote-type session.
11057 </desc>
11058 <param name="machine" type="IMachine" dir="in"/>
11059 <param name="console" type="IConsole" dir="in"/>
11060 </method>
11061
11062 <method name="updateMachineState">
11063 <desc>
11064 Updates the machine state in the VM process.
11065 Must be called only in certain cases
11066 (see the method implementation).
11067 </desc>
11068 <param name="aMachineState" type="MachineState" dir="in"/>
11069 </method>
11070
11071 <method name="uninitialize">
11072 <desc>
11073 Uninitializes (closes) this session. Used by VirtualBox to close
11074 the corresponding remote session when the direct session dies
11075 or gets closed.
11076 </desc>
11077 </method>
11078
11079 <method name="onDVDDriveChange">
11080 <desc>
11081 Triggered when settings of the DVD drive object of the
11082 associated virtual machine have changed.
11083 </desc>
11084 </method>
11085
11086 <method name="onFloppyDriveChange">
11087 <desc>
11088 Triggered when settings of the floppy drive object of the
11089 associated virtual machine have changed.
11090 </desc>
11091 </method>
11092
11093 <method name="onNetworkAdapterChange">
11094 <desc>
11095 Triggered when settings of a network adapter of the
11096 associated virtual machine have changed.
11097 </desc>
11098 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11099 </method>
11100
11101 <method name="onSerialPortChange">
11102 <desc>
11103 Triggered when settings of a serial port of the
11104 associated virtual machine have changed.
11105 </desc>
11106 <param name="serialPort" type="ISerialPort" dir="in"/>
11107 </method>
11108
11109 <method name="onParallelPortChange">
11110 <desc>
11111 Triggered when settings of a parallel port of the
11112 associated virtual machine have changed.
11113 </desc>
11114 <param name="parallelPort" type="IParallelPort" dir="in"/>
11115 </method>
11116
11117 <method name="onVRDPServerChange">
11118 <desc>
11119 Triggered when settings of the VRDP server object of the
11120 associated virtual machine have changed.
11121 </desc>
11122 </method>
11123
11124 <method name="onUSBControllerChange">
11125 <desc>
11126 Triggered when settings of the USB controller object of the
11127 associated virtual machine have changed.
11128 </desc>
11129 </method>
11130
11131 <method name="onSharedFolderChange">
11132 <desc>
11133 Triggered when a permanent (global or machine) shared folder has been
11134 created or removed.
11135 <note>
11136 We don't pass shared folder parameters in this notification because
11137 the order in which parallel notifications are delivered is not defined,
11138 therefore it could happen that these parameters were outdated by the
11139 time of processing this notification.
11140 </note>
11141 </desc>
11142 <param name="global" type="boolean" dir="in"/>
11143 </method>
11144
11145 <method name="onUSBDeviceAttach">
11146 <desc>
11147 Triggered when a request to capture a USB device (as a result
11148 of matched USB filters or direct call to
11149 <link to="IConsole::attachUSBDevice"/>) has completed.
11150 A @c null @a error object means success, otherwise it
11151 describes a failure.
11152 </desc>
11153 <param name="device" type="IUSBDevice" dir="in"/>
11154 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11155 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11156 </method>
11157
11158 <method name="onUSBDeviceDetach">
11159 <desc>
11160 Triggered when a request to release the USB device (as a result
11161 of machine termination or direct call to
11162 <link to="IConsole::detachUSBDevice"/>) has completed.
11163 A @c null @a error object means success, otherwise it
11164 </desc>
11165 <param name="id" type="uuid" dir="in"/>
11166 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11167 </method>
11168
11169 <method name="onShowWindow">
11170 <desc>
11171 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11172 <link to="IMachine::showConsoleWindow()"/> in order to notify
11173 console callbacks
11174 <link to="IConsoleCallback::onCanShowWindow()"/>
11175 and <link to="IConsoleCallback::onShowWindow()"/>.
11176 </desc>
11177 <param name="check" type="boolean" dir="in"/>
11178 <param name="canShow" type="boolean" dir="out"/>
11179 <param name="winId" type="unsigned long long" dir="out"/>
11180 </method>
11181
11182 <method name="accessGuestProperty">
11183 <desc>
11184 Called by <link to="IMachine::getGuestProperty()"/> and by
11185 <link to="IMachine::setGuestProperty()"/> in order to read and
11186 modify guest properties.
11187 </desc>
11188 <param name="name" type="wstring" dir="in"/>
11189 <param name="value" type="wstring" dir="in"/>
11190 <param name="flags" type="wstring" dir="in"/>
11191 <param name="isSetter" type="boolean" dir="in"/>
11192 <param name="retValue" type="wstring" dir="out"/>
11193 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11194 <param name="retFlags" type="wstring" dir="out"/>
11195 </method>
11196
11197 <method name="enumerateGuestProperties">
11198 <desc>
11199 Return a list of the guest properties matching a set of patterns along
11200 with their values, time stamps and flags.
11201 </desc>
11202 <param name="patterns" type="wstring" dir="in">
11203 <desc>
11204 The patterns to match the properties against as a comma-separated
11205 string. If this is empty, all properties currently set will be
11206 returned.
11207 </desc>
11208 </param>
11209 <param name="key" type="wstring" dir="out" safearray="yes">
11210 <desc>
11211 The key names of the properties returned.
11212 </desc>
11213 </param>
11214 <param name="value" type="wstring" dir="out" safearray="yes">
11215 <desc>
11216 The values of the properties returned. The array entries match the
11217 corresponding entries in the @a key array.
11218 </desc>
11219 </param>
11220 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11221 <desc>
11222 The time stamps of the properties returned. The array entries match
11223 the corresponding entries in the @a key array.
11224 </desc>
11225 </param>
11226 <param name="flags" type="wstring" dir="out" safearray="yes">
11227 <desc>
11228 The flags of the properties returned. The array entries match the
11229 corresponding entries in the @a key array.
11230 </desc>
11231 </param>
11232 </method>
11233
11234 </interface>
11235
11236 <interface
11237 name="ISession" extends="$dispatched"
11238 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11239 wsmap="managed"
11240 >
11241 <desc>
11242 The ISession interface represents a serialization primitive for virtual
11243 machines.
11244
11245 With VirtualBox, every time one wishes to manipulate a virtual machine
11246 (e.g. change its settings or start execution), a session object is
11247 required. Such an object must be passed to one of the session methods
11248 that open the given session, which then initiates the machine manipulation.
11249
11250 A session serves several purposes: it identifies to the inter-process VirtualBox
11251 code which process is currently working with the virtual machine, and it ensures
11252 that there are no incompatible requests from several processes for the
11253 same virtual machine. Session objects can therefore be thought of as mutex
11254 semaphores that lock virtual machines to prevent conflicting accesses from
11255 several processes.
11256
11257 How sessions objects are used depends on whether you use the Main API
11258 via COM or via the webservice:
11259
11260 <ul>
11261 <li>When using the COM API directly, an object of the Session class from the
11262 VirtualBox type library needs to be created. In regular COM C++ client code,
11263 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
11264 This object will then act as a local session object in further calls to open
11265 a session.
11266 </li>
11267
11268 <li>In the webservice, the session manager (IWebsessionManager) instead creates
11269 one session object automatically when <link to="IWebsessionManager::logon" />
11270 is called. A managed object reference to that session object can be retrieved by
11271 calling <link to="IWebsessionManager::getSessionObject" />. This session object
11272 reference can then be used to open sessions.
11273 </li>
11274 </ul>
11275
11276 Sessions are mainly used in two variations:
11277
11278 <ul>
11279 <li>
11280 To start a virtual machine in a separate process, one would call
11281 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
11282 object as its first parameter. This session then identifies the caller
11283 and lets him control the started machine (for example, pause machine
11284 execution or power it down) as well as be notified about machine
11285 execution state changes.
11286 </li>
11287
11288 <li>To alter machine settings, or to start machine execution within the
11289 current process, one needs to open a direct session for the machine first by
11290 calling <link to="IVirtualBox::openSession"/>. While a direct session
11291 is open within one process, no any other process may open another direct
11292 session for the same machine. This prevents the machine from being changed
11293 by other processes while it is running or while the machine is being configured.
11294 </li>
11295 </ul>
11296
11297 One also can attach to an existing direct session already opened by
11298 another process (for example, in order to send a control request to the
11299 virtual machine such as the pause or the reset request). This is done by
11300 calling <link to="IVirtualBox::openExistingSession"/>.
11301
11302 <note>
11303 Unless you are trying to write a new VirtualBox front-end that
11304 performs direct machine execution (like the VirtualBox or VBoxSDL
11305 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
11306 session opened by <link to="IVirtualBox::openSession"/> and use this
11307 session only to change virtual machine settings. If you simply want to
11308 start virtual machine execution using one of the existing front-ends
11309 (for example the VirtualBox GUI or headless server), simply use
11310 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
11311 will power up the machine automatically for you.
11312 </note>
11313 </desc>
11314
11315 <attribute name="state" type="SessionState" readonly="yes">
11316 <desc>Current state of this session.</desc>
11317 </attribute>
11318
11319 <attribute name="type" type="SessionType" readonly="yes">
11320 <desc>
11321 Type of this session. The value of this attribute is valid only
11322 if the session is currently open (i.e. its #state is
11323 SessionType_SessionOpen), otherwise an error will be returned.
11324 </desc>
11325 </attribute>
11326
11327 <attribute name="machine" type="IMachine" readonly="yes">
11328 <desc>Machine object associated with this session.</desc>
11329 </attribute>
11330
11331 <attribute name="console" type="IConsole" readonly="yes">
11332 <desc>Console object associated with this session.</desc>
11333 </attribute>
11334
11335 <method name="close">
11336 <desc>
11337 Closes a session that was previously opened.
11338
11339 It is recommended that every time an "open session" method (such as
11340 <link to="IVirtualBox::openRemoteSession" /> or
11341 <link to="IVirtualBox::openSession" />) has been called to
11342 manipulate a virtual machine, the caller invoke
11343 ISession::close() when it's done doing so. Since sessions are
11344 serialization primitives much like ordinary mutexes, they are
11345 best used the same way: for each "open" call, there should be
11346 a matching "close" call, even when errors occur.
11347
11348 Otherwise, if a direct session for a machine opened with
11349 <link to="IVirtualBox::openSession()"/> is not explicitly closed
11350 when the application terminates, the state of the machine will
11351 be set to <link to="MachineState_Aborted" /> on the server.
11352
11353 Generally, it is recommended to close all open sessions explicitly
11354 before terminating the application (no matter what is the reason of
11355 the termination).
11356
11357 <note>
11358 Do not expect the session state (<link to="ISession::state" />
11359 to return to "Closed" immediately after you invoke
11360 ISession::close(), particularly if you have started a remote
11361 session to execute the VM in a new process. The session state will
11362 automatically return to "Closed" once the VM is no longer executing,
11363 which can of course take a very long time.
11364 </note>
11365 </desc>
11366 </method>
11367
11368 </interface>
11369
11370 <!--
11371 // ISATAController
11372 /////////////////////////////////////////////////////////////////////////
11373 -->
11374
11375 <interface
11376 name="ISATAController" extends="$unknown"
11377 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
11378 wsmap="managed"
11379 >
11380 <attribute name="enabled" type="boolean">
11381 <desc>
11382 Flag whether the SATA controller is present in the
11383 guest system. If disabled, the virtual guest hardware will
11384 not contain any SATA controller. Can only be changed when
11385 the VM is powered off.
11386 </desc>
11387 </attribute>
11388
11389 <attribute name="portCount" type="unsigned long">
11390 <desc>
11391 The number of usable ports on the SATA controller.
11392 It ranges from 1 to 30.
11393 </desc>
11394 </attribute>
11395
11396 <method name="GetIDEEmulationPort">
11397 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
11398 <param name="devicePosition" type="long" dir="in"/>
11399 <param name="portNumber" type="long" dir="return"/>
11400 </method>
11401
11402 <method name="SetIDEEmulationPort">
11403 <desc>Sets the port number which is emulated as an IDE device.</desc>
11404 <param name="devicePosition" type="long" dir="in"/>
11405 <param name="portNumber" type="long" dir="in"/>
11406 </method>
11407
11408 </interface>
11409
11410<if target="wsdl">
11411
11412 <!--
11413 // IManagedObjectRef
11414 /////////////////////////////////////////////////////////////////////////
11415 -->
11416
11417 <interface
11418 name="IManagedObjectRef" extends="$unknown"
11419 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
11420 internal="yes"
11421 wsmap="managed"
11422 wscpp="hardcoded"
11423 >
11424 <desc>
11425 Managed object reference.
11426
11427 Only within the webservice, a managed object reference (which is really
11428 an opaque number) allows a webservice client to address an object
11429 that lives in the address space of the webservice server.
11430
11431 Behind each managed object reference, there is a COM object that lives
11432 in the webservice server's address space. The COM object is not freed
11433 until the managed object reference is released, either by an explicit
11434 call to <link to="IManagedObjectRef::release" /> or by logging off from
11435 the webservice (<link to="IWebsessionManager::logoff" />), which releases
11436 all objects created during the webservice session.
11437
11438 Whenever a method call of the VirtualBox API returns a COM object, the
11439 webservice representation of that method will instead return a
11440 managed object reference, which can then be used to invoke methods
11441 on that object.
11442 </desc>
11443
11444 <method name="getInterfaceName">
11445 <desc>
11446 Returns the name of the interface that this managed object represents,
11447 for example, "IMachine", as a string.
11448 </desc>
11449 <param name="return" type="wstring" dir="return"/>
11450 </method>
11451
11452 <method name="release">
11453 <desc>
11454 Releases this managed object reference and frees the resources that
11455 were allocated for it in the webservice server process. After calling
11456 this method, the identifier of the reference can no longer be used.
11457 </desc>
11458 </method>
11459
11460 </interface>
11461
11462 <!--
11463 // IWebsessionManager
11464 /////////////////////////////////////////////////////////////////////////
11465 -->
11466
11467 <interface
11468 name="IWebsessionManager" extends="$unknown"
11469 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
11470 internal="yes"
11471 wsmap="global"
11472 wscpp="hardcoded"
11473 >
11474 <desc>
11475 Websession manager. This provides essential services
11476 to webservice clients.
11477 </desc>
11478 <method name="logon">
11479 <desc>
11480 Logs a new client onto the webservice and returns a managed object reference to
11481 the IVirtualBox instance, which the client can then use as a basis to further
11482 queries, since all calls to the VirtualBox API are based on the IVirtualBox
11483 interface, in one way or the other.
11484 </desc>
11485 <param name="username" type="wstring" dir="in"/>
11486 <param name="password" type="wstring" dir="in"/>
11487 <param name="return" type="IVirtualBox" dir="return"/>
11488 </method>
11489
11490 <method name="getSessionObject">
11491 <desc>
11492 Returns a managed object reference to the internal ISession object that was created
11493 for this web service session when the client logged on.
11494
11495 <see>ISession</see>
11496 </desc>
11497 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11498 <param name="return" type="ISession" dir="return"/>
11499 </method>
11500
11501 <method name="logoff">
11502 <desc>
11503 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
11504 and destroys all resources associated with the session (most importantly, all
11505 managed objects created in the server while the session was active).
11506 </desc>
11507 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11508 </method>
11509
11510 </interface>
11511
11512</if>
11513
11514 <!--
11515 // IPerformanceCollector & friends
11516 /////////////////////////////////////////////////////////////////////////
11517 -->
11518
11519 <interface
11520 name="IPerformanceMetric" extends="$unknown"
11521 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
11522 >
11523 <desc>
11524 The IPerformanceMetric interface represents parameters of the given
11525 performance metric.
11526 </desc>
11527
11528 <attribute name="metricName" type="wstring" readonly="yes">
11529 <desc>
11530 Name of the metric.
11531 </desc>
11532 </attribute>
11533
11534 <attribute name="object" type="$unknown" readonly="yes">
11535 <desc>
11536 Object this metric belongs to.
11537 </desc>
11538 </attribute>
11539
11540 <attribute name="description" type="wstring" readonly="yes">
11541 <desc>
11542 Textual description of the metric.
11543 </desc>
11544 </attribute>
11545
11546 <attribute name="period" type="unsigned long" readonly="yes">
11547 <desc>
11548 Time interval between samples, measured in seconds.
11549 </desc>
11550 </attribute>
11551
11552 <attribute name="count" type="unsigned long" readonly="yes">
11553 <desc>
11554 Number of recent samples retained by the performance collector for this
11555 metric.
11556
11557 When the collected sample count exceeds this number, older samples
11558 are discarded.
11559 </desc>
11560 </attribute>
11561
11562 <attribute name="unit" type="wstring" readonly="yes">
11563 <desc>
11564 Unit of measurement.
11565 </desc>
11566 </attribute>
11567
11568 <attribute name="minimumValue" type="long" readonly="yes">
11569 <desc>
11570 Minimum possible value of this metric.
11571 </desc>
11572 </attribute>
11573
11574 <attribute name="maximumValue" type="long" readonly="yes">
11575 <desc>
11576 Maximum possible value of this metric.
11577 </desc>
11578 </attribute>
11579 </interface>
11580
11581 <interface
11582 name="IPerformanceCollector" extends="$unknown"
11583 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
11584 wsmap="managed"
11585 >
11586 <desc>
11587 The IPerformanceCollector interface represents a service that collects and
11588 stores performance metrics data.
11589
11590 Performance metrics are associated with objects like IHost and
11591 IMachine. Each object has a distinct set of performance metrics.
11592 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
11593
11594 Metric data are collected at the specified intervals and are retained
11595 internally. The interval and the number of samples retained can be set
11596 with <link to="IPerformanceCollector::setupMetrics" />.
11597
11598 Metrics are organized hierarchically, each level separated by slash (/).
11599 General scheme for metric name is
11600 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
11601 metric name stands for: CPU category, Load metric, User submetric, average
11602 aggregate. An aggregate function is computed over all retained data. Valid
11603 aggregate functions are:
11604
11605 <ul>
11606 <li>avg -- average</li>
11607 <li>min -- minimum</li>
11608 <li>max -- maximum</li>
11609 </ul>
11610
11611 "Category/Metric" together form base metric name. A base metric is the
11612 smallest unit for which a sampling interval and the number of retained
11613 samples can be set. Only base metrics can be enabled and disabled. All
11614 sub-metrics are collected when their base metric is collected.
11615 Collected values for any set of sub-metrics can be queried with
11616 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
11617 metric parameters, querying metric data, enabling or disabling metrics
11618 wildcards can be used in metric names to specify a subset of metrics. For
11619 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
11620 averages can be queried using <tt>*:avg</tt> and so on. To query metric
11621 values without aggregates <tt>*:</tt> can be used.
11622
11623 The valid names for base metrics are:
11624
11625 <ul>
11626 <li>CPU/Load</li>
11627 <li>CPU/MHz</li>
11628 <li>RAM/Usage</li>
11629 </ul>
11630
11631 The general sequence for collecting and retrieving the metrics is:
11632 <ul>
11633 <li>
11634 Obtain an instance of IPerformanceCollector with
11635 <link to="IVirtualBox::performanceCollector" />
11636 </li>
11637 <li>
11638 Allocate and populate an array with references to objects the metrics
11639 will be collected for. Use references to IHost and IMachine objects.
11640 </li>
11641 <li>
11642 Allocate and populate an array with base metric names the data will be
11643 collected for.
11644 </li>
11645 <li>
11646 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
11647 metric data will be collected and stored.
11648 </li>
11649 <li>
11650 Wait for the data to get collected.
11651 </li>
11652 <li>
11653 Allocate and populate an array with references to objects the metric
11654 values will be queried for. You can re-use the object array used for
11655 setting base metrics.
11656 </li>
11657 <li>
11658 Allocate and populate an array with metric names the data will be
11659 collected for. Note that metric names differ from base metric names.
11660 </li>
11661 <li>
11662 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
11663 have been collected so far are returned. Note that the values are still
11664 retained internally and data collection continues.
11665 </li>
11666 </ul>
11667
11668 For an example of usage refer to the following files in VirtualBox SDK:
11669 <ul>
11670 <li>
11671 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
11672 </li>
11673 <li>
11674 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
11675 </li>
11676 </ul>
11677 </desc>
11678
11679 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
11680 <desc>
11681 Array of unique names of metrics.
11682
11683 This array represents all metrics supported by the performance
11684 collector. Individual objects do not necessarily support all of them.
11685 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
11686 list of supported metrics for a particular object.
11687 </desc>
11688 </attribute>
11689
11690 <method name="getMetrics">
11691 <desc>
11692 Returns parameters of specified metrics for a set of objects.
11693 <note>
11694 @c Null metrics array means all metrics. @c Null object array means
11695 all existing objects.
11696 </note>
11697 </desc>
11698 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11699 <desc>
11700 Metric name filter. Currently, only a comma-separated list of metrics
11701 is supported.
11702 </desc>
11703 </param>
11704 <param name="objects" type="$unknown" dir="in" safearray="yes">
11705 <desc>
11706 Set of objects to return metric parameters for.
11707 </desc>
11708 </param>
11709 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
11710 <desc>
11711 Array of returned metric parameters.
11712 </desc>
11713 </param>
11714 </method>
11715
11716 <method name="setupMetrics">
11717 <desc>
11718 Sets parameters of specified base metrics for a set of objects. Returns
11719 an array of <link to="IPerformanceMetric" /> describing the metrics have
11720 been affected.
11721 <note>
11722 @c Null or empty metric name array means all metrics. @c Null or empty
11723 object array means all existing objects. If metric name array contains
11724 a single element and object array contains many, the single metric
11725 name array element is applied to each object array element to form
11726 metric/object pairs.
11727 </note>
11728 </desc>
11729 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11730 <desc>
11731 Metric name filter. Comma-separated list of metrics with wildcard
11732 support.
11733 </desc>
11734 </param>
11735 <param name="objects" type="$unknown" dir="in" safearray="yes">
11736 <desc>
11737 Set of objects to setup metric parameters for.
11738 </desc>
11739 </param>
11740 <param name="period" type="unsigned long" dir="in">
11741 <desc>
11742 Time interval in seconds between two consecutive samples of performance
11743 data.
11744 </desc>
11745 </param>
11746 <param name="count" type="unsigned long" dir="in">
11747 <desc>
11748 Number of samples to retain in performance data history. Older samples
11749 get discarded.
11750 </desc>
11751 </param>
11752 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11753 <desc>
11754 Array of metrics that have been modified by the call to this method.
11755 </desc>
11756 </param>
11757 </method>
11758
11759 <method name="enableMetrics">
11760 <desc>
11761 Turns on collecting specified base metrics. Returns an array of
11762 <link to="IPerformanceMetric" /> describing the metrics have been
11763 affected.
11764 <note>
11765 @c Null or empty metric name array means all metrics. @c Null or empty
11766 object array means all existing objects. If metric name array contains
11767 a single element and object array contains many, the single metric
11768 name array element is applied to each object array element to form
11769 metric/object pairs.
11770 </note>
11771 </desc>
11772 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11773 <desc>
11774 Metric name filter. Comma-separated list of metrics with wildcard
11775 support.
11776 </desc>
11777 </param>
11778 <param name="objects" type="$unknown" dir="in" safearray="yes">
11779 <desc>
11780 Set of objects to enable metrics for.
11781 </desc>
11782 </param>
11783 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11784 <desc>
11785 Array of metrics that have been modified by the call to this method.
11786 </desc>
11787 </param>
11788 </method>
11789
11790 <method name="disableMetrics">
11791 <desc>
11792 Turns off collecting specified base metrics. Returns an array of
11793 <link to="IPerformanceMetric" /> describing the metrics have been
11794 affected.
11795 <note>
11796 @c Null or empty metric name array means all metrics. @c Null or empty
11797 object array means all existing objects. If metric name array contains
11798 a single element and object array contains many, the single metric
11799 name array element is applied to each object array element to form
11800 metric/object pairs.
11801 </note>
11802 </desc>
11803 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11804 <desc>
11805 Metric name filter. Comma-separated list of metrics with wildcard
11806 support.
11807 </desc>
11808 </param>
11809 <param name="objects" type="$unknown" dir="in" safearray="yes">
11810 <desc>
11811 Set of objects to disable metrics for.
11812 </desc>
11813 </param>
11814 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11815 <desc>
11816 Array of metrics that have been modified by the call to this method.
11817 </desc>
11818 </param>
11819 </method>
11820
11821 <method name="queryMetricsData">
11822 <desc>
11823 Queries collected metrics data for a set of objects.
11824
11825 The data itself and related metric information are returned in seven
11826 parallel and one flattened array of arrays. Elements of
11827 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
11828 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
11829 the same index describe one set of values corresponding to a single
11830 metric.
11831
11832 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
11833 start and length of a sub-array is indicated by
11834 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
11835 value for metric <tt>metricNames[i]</tt> is at
11836 <tt>returnData[returnIndices[i]]</tt>.
11837
11838 <note>
11839 @c Null or empty metric name array means all metrics. @c Null or empty
11840 object array means all existing objects. If metric name array contains
11841 a single element and object array contains many, the single metric
11842 name array element is applied to each object array element to form
11843 metric/object pairs.
11844 </note>
11845 <note>
11846 Data collection continues behind the scenes after call to @c
11847 queryMetricsData. The return data can be seen as the snapshot of
11848 the current state at the time of @c queryMetricsData call. The
11849 internally kept metric values are not cleared by the call. This makes
11850 possible querying different subsets of metrics or aggregates with
11851 subsequent calls. If periodic querying is needed it is highly
11852 suggested to query the values with @c interval*count period to avoid
11853 confusion. This way a completely new set of data values will be
11854 provided by each query.
11855 </note>
11856 </desc>
11857 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11858 <desc>
11859 Metric name filter. Comma-separated list of metrics with wildcard
11860 support.
11861 </desc>
11862 </param>
11863 <param name="objects" type="$unknown" dir="in" safearray="yes">
11864 <desc>
11865 Set of objects to query metrics for.
11866 </desc>
11867 </param>
11868 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
11869 <desc>
11870 Names of metrics returned in @c returnData.
11871 </desc>
11872 </param>
11873 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
11874 <desc>
11875 Objects associated with metrics returned in @c returnData.
11876 </desc>
11877 </param>
11878 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
11879 <desc>
11880 Units of measurement for each returned metric.
11881 </desc>
11882 </param>
11883 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
11884 <desc>
11885 Divisor that should be applied to return values in order to get
11886 floating point values. For example:
11887 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
11888 will retrieve the floating point value of i-th sample of the first
11889 metric.
11890 </desc>
11891 </param>
11892 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
11893 <desc>
11894 Sequence numbers of the first elements of value sequences of particular metrics
11895 returned in @c returnData. For aggregate metrics it is the sequence number of
11896 the sample the aggregate started calculation from.
11897 </desc>
11898 </param>
11899 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
11900 <desc>
11901 Indices of the first elements of value sequences of particular metrics
11902 returned in @c returnData.
11903 </desc>
11904 </param>
11905 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
11906 <desc>
11907 Lengths of value sequences of particular metrics.
11908 </desc>
11909 </param>
11910 <param name="returnData" type="long" dir="return" safearray="yes">
11911 <desc>
11912 Flattened array of all metric data containing sequences of values for
11913 each metric.
11914 </desc>
11915 </param>
11916 </method>
11917
11918 </interface>
11919
11920 <module name="VBoxSVC" context="LocalServer">
11921 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
11922 namespace="virtualbox.org">
11923 <interface name="IVirtualBox" default="yes"/>
11924 </class>
11925 </module>
11926
11927 <module name="VBoxC" context="InprocServer" threadingModel="Free">
11928 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
11929 namespace="virtualbox.org">
11930 <interface name="ISession" default="yes"/>
11931 </class>
11932 </module>
11933
11934</library>
11935
11936</idl>
11937
11938<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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