VirtualBox

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

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

Main: Mention in the docs that hard disk format identifiers are case-insensitive strings.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 443.6 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 16089 2009-01-20 16:19:59Z 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 right 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 in 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 temporary conditions of the virtual machine that will last as
426 long as the operation that initiated such a condition.
427
428 The Stuck state is a special case. 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 when 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
485 <note internal="yes">
486 For whoever decides to touch this enum: In order to keep the
487 comparisons involving FirstOnline and LastOnline pseudo-states valid,
488 the numeric values of these states must be correspondingly updated if
489 needed: for any online VM state, the condition
490 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
491 <tt>true</tt>. The same relates to transient states for which
492 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
493 <tt>true</tt>.
494 </note>
495 </desc>
496
497 <const name="Null" value="0">
498 <desc>Null value (nver used by the API).</desc>
499 </const>
500 <const name="PoweredOff" value="1">
501 <desc>
502 The machine is not running.
503 </desc>
504 </const>
505 <const name="Saved" value="2">
506 <desc>
507 The machine is not currently running, but the execution state of the machine
508 has been saved to an external file when it was running.
509 </desc>
510 </const>
511 <const name="Aborted" value="3">
512 <desc>
513 The process running the machine has terminated abnormally.
514 </desc>
515 </const>
516 <const name="Running" value="4">
517 <desc>
518 The machine is currently being executed.
519 <note internal="yes">
520 For whoever decides to touch this enum: In order to keep the
521 comparisons in the old source code valid, this state must immediately
522 precede the Paused state.
523 </note>
524 </desc>
525 </const>
526 <const name="Paused" value="5">
527 <desc>
528 Execution of the machine has been paused.
529 <note internal="yes">
530 For whoever decides to touch this enum: In order to keep the
531 comparisons in the old source code valid, this state must immediately
532 follow the Running state.
533 </note>
534 </desc>
535 </const>
536 <const name="Stuck" value="6">
537 <desc>
538 Execution of the machine has reached the "Guru Meditation"
539 condition.
540 </desc>
541 </const>
542 <const name="Starting" value="7">
543 <desc>
544 Machine is being started after powering it on from a
545 zero execution state.
546 </desc>
547 </const>
548 <const name="Stopping" value="8">
549 <desc>
550 Machine is being normally stopped powering it off, or after the guest OS
551 has initiated a shutdown sequence.
552 </desc>
553 </const>
554 <const name="Saving" value="9">
555 <desc>
556 Machine is saving its execution state to a file or an online
557 snapshot of the machine is being taken.
558 </desc>
559 </const>
560 <const name="Restoring" value="10">
561 <desc>
562 Execution state of the machine is being restored from a file
563 after powering it on from the saved execution state.
564 </desc>
565 </const>
566 <const name="Discarding" value="11">
567 <desc>
568 Snapshot of the machine is being discarded.
569 </desc>
570 </const>
571 <const name="SettingUp" value="12">
572 <desc>
573 Lengthy setup operation is in progress.
574 </desc>
575 </const>
576
577 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
578 <desc>
579 Pseudo-state: first online state (for use in relational expressions).
580 </desc>
581 </const>
582 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
583 <desc>
584 Pseudo-state: last online state (for use in relational expressions).
585 </desc>
586 </const>
587
588 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
589 <desc>
590 Pseudo-state: first transient state (for use in relational expressions).
591 </desc>
592 </const>
593 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
594 <desc>
595 Pseudo-state: last transient state (for use in relational expressions).
596 </desc>
597 </const>
598
599 </enum>
600
601 <enum
602 name="SessionState"
603 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
604 >
605 <desc>
606 Session state. This enumeration represents possible values of
607 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
608 attributes. See individual enumerator descriptions for the meaning for
609 every value.
610 </desc>
611
612 <const name="Null" value="0">
613 <desc>Null value (never used by the API).</desc>
614 </const>
615 <const name="Closed" value="1">
616 <desc>
617 The machine has no open sessions (<link to="IMachine::sessionState"/>);
618 the session is closed (<link to="ISession::state"/>)
619 </desc>
620 </const>
621 <const name="Open" value="2">
622 <desc>
623 The machine has an open direct session (<link to="IMachine::sessionState"/>);
624 the session is open (<link to="ISession::state"/>)
625 </desc>
626 </const>
627 <const name="Spawning" value="3">
628 <desc>
629 A new (direct) session is being opened for the machine
630 as a result of <link to="IVirtualBox::openRemoteSession()"/>
631 call (<link to="IMachine::sessionState"/>);
632 the session is currently being opened
633 as a result of <link to="IVirtualBox::openRemoteSession()"/>
634 call (<link to="ISession::state"/>)
635 </desc>
636 </const>
637 <const name="Closing" value="4">
638 <desc>
639 The direct session is being closed (<link to="IMachine::sessionState"/>);
640 the session is being closed (<link to="ISession::state"/>)
641 </desc>
642 </const>
643 </enum>
644
645 <enum
646 name="SessionType"
647 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
648 >
649 <desc>
650 Session type. This enumeration represents possible values of the
651 <link to="ISession::type"/> attribute.
652 </desc>
653
654 <const name="Null" value="0">
655 <desc>Null value (never used by the API).</desc>
656 </const>
657 <const name="Direct" value="1">
658 <desc>
659 Direct session
660 (opened by <link to="IVirtualBox::openSession()"/>)
661 </desc>
662 </const>
663 <const name="Remote" value="2">
664 <desc>
665 Remote session
666 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
667 </desc>
668 </const>
669 <const name="Existing" value="3">
670 <desc>
671 Existing session
672 (opened by <link to="IVirtualBox::openExistingSession()"/>)
673 </desc>
674 </const>
675 </enum>
676
677 <enum
678 name="DeviceType"
679 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
680 >
681 <desc>
682 Device type.
683 </desc>
684 <const name="Null" value="0">
685 <desc>
686 Null value, may also mean "no device" (not allowed for
687 <link to="IConsole::getDeviceActivity"/>).
688 </desc>
689 </const>
690 <const name="Floppy" value="1">
691 <desc>Floppy device.</desc>
692 </const>
693 <const name="DVD" value="2">
694 <desc>CD/DVD-ROM device.</desc>
695 </const>
696 <const name="HardDisk" value="3">
697 <desc>Hard disk device.</desc>
698 </const>
699 <const name="Network" value="4">
700 <desc>Network device.</desc>
701 </const>
702 <const name="USB" value="5">
703 <desc>USB device.</desc>
704 </const>
705 <const name="SharedFolder" value="6">
706 <desc>Shared folder device.</desc>
707 </const>
708 </enum>
709
710 <enum
711 name="DeviceActivity"
712 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
713 >
714 <desc>
715 Device activity for <link to="IConsole::getDeviceActivity"/>.
716 </desc>
717
718 <const name="Null" value="0"/>
719 <const name="Idle" value="1"/>
720 <const name="Reading" value="2"/>
721 <const name="Writing" value="3"/>
722 </enum>
723
724 <enum
725 name="StorageBus"
726 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
727 >
728 <desc>Interface bus type for storage devices.</desc>
729
730 <const name="Null" value="0">
731 <desc>Null value (never used by the API).</desc>
732 </const>
733
734 <const name="IDE" value="1"/>
735 <const name="SATA" value="2"/>
736 </enum>
737
738 <enum
739 name="ClipboardMode"
740 uuid="33364716-4008-4701-8f14-be0fa3d62950"
741 >
742 <desc>
743 Host-Guest clipboard interchange mode.
744 </desc>
745
746 <const name="Disabled" value="0"/>
747 <const name="HostToGuest" value="1"/>
748 <const name="GuestToHost" value="2"/>
749 <const name="Bidirectional" value="3"/>
750 </enum>
751
752 <enum
753 name="Scope"
754 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
755 >
756 <desc>
757 Scope of the operation.
758
759 A generic enumeration used in various methods to define the action or
760 argument scope.
761 </desc>
762
763 <const name="Global" value="0"/>
764 <const name="Machine" value="1"/>
765 <const name="Session" value="2"/>
766 </enum>
767
768 <enum
769 name="GuestStatisticType"
770 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
771 >
772 <desc>
773 Statistics type for <link to="IGuest::getStatistic"/>.
774 </desc>
775
776 <const name="CPULoad_Idle" value="0">
777 <desc>
778 Idle CPU load (0-100%) for last interval.
779 </desc>
780 </const>
781 <const name="CPULoad_Kernel" value="1">
782 <desc>
783 Kernel CPU load (0-100%) for last interval.
784 </desc>
785 </const>
786 <const name="CPULoad_User" value="2">
787 <desc>
788 User CPU load (0-100%) for last interval.
789 </desc>
790 </const>
791 <const name="Threads" value="3">
792 <desc>
793 Total number of threads in the system.
794 </desc>
795 </const>
796 <const name="Processes" value="4">
797 <desc>
798 Total number of processes in the system.
799 </desc>
800 </const>
801 <const name="Handles" value="5">
802 <desc>
803 Total number of handles in the system.
804 </desc>
805 </const>
806 <const name="MemoryLoad" value="6">
807 <desc>
808 Memory load (0-100%).
809 </desc>
810 </const>
811 <const name="PhysMemTotal" value="7">
812 <desc>
813 Total physical memory in megabytes.
814 </desc>
815 </const>
816 <const name="PhysMemAvailable" value="8">
817 <desc>
818 Free physical memory in megabytes.
819 </desc>
820 </const>
821 <const name="PhysMemBalloon" value="9">
822 <desc>
823 Ballooned physical memory in megabytes.
824 </desc>
825 </const>
826 <const name="MemCommitTotal" value="10">
827 <desc>
828 Total amount of memory in the committed state in megabytes.
829 </desc>
830 </const>
831 <const name="MemKernelTotal" value="11">
832 <desc>
833 Total amount of memory used by the guest OS's kernel in megabytes.
834 </desc>
835 </const>
836 <const name="MemKernelPaged" value="12">
837 <desc>
838 Total amount of paged memory used by the guest OS's kernel in megabytes.
839 </desc>
840 </const>
841 <const name="MemKernelNonpaged" value="13">
842 <desc>
843 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
844 </desc>
845 </const>
846 <const name="MemSystemCache" value="14">
847 <desc>
848 Total amount of memory used by the guest OS's system cache in megabytes.
849 </desc>
850 </const>
851 <const name="PageFileSize" value="15">
852 <desc>
853 Pagefile size in megabytes.
854 </desc>
855 </const>
856 <const name="SampleNumber" value="16">
857 <desc>
858 Statistics sample number
859 </desc>
860 </const>
861 <const name="MaxVal" value="17"/>
862 </enum>
863
864 <enum
865 name="BIOSBootMenuMode"
866 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
867 >
868 <desc>
869 BIOS boot menu mode.
870 </desc>
871
872 <const name="Disabled" value="0"/>
873 <const name="MenuOnly" value="1"/>
874 <const name="MessageAndMenu" value="2"/>
875 </enum>
876
877 <enum
878 name="IDEControllerType"
879 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
880 >
881 <desc>
882 IDE controller type.
883 </desc>
884
885 <const name="Null" value="0">
886 <desc>Null value (never used by the API).</desc>
887 </const>
888 <const name="PIIX3" value="1"/>
889 <const name="PIIX4" value="2"/>
890 </enum>
891
892 <enum
893 name="DriveState"
894 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
895 >
896 <const name="Null" value="0">
897 <desc>Null value (never used by the API).</desc>
898 </const>
899 <const name="NotMounted" value="1"/>
900 <const name="ImageMounted" value="2"/>
901 <const name="HostDriveCaptured" value="3"/>
902 </enum>
903
904 <enum
905 name="ProcessorFeature"
906 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
907 >
908 <desc>
909 CPU features.
910 </desc>
911
912 <const name="HWVirtEx" value="0"/>
913 <const name="PAE" value="1"/>
914 <const name="LongMode" value="2"/>
915 </enum>
916
917
918 <!--
919 // IVirtualBoxErrorInfo
920 /////////////////////////////////////////////////////////////////////////
921 -->
922
923 <interface
924 name="IVirtualBoxErrorInfo" extends="$errorinfo"
925 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
926 supportsErrorInfo="no"
927 wsmap="suppress"
928 >
929 <desc>
930 The IVirtualBoxErrorInfo interface represents extended error information.
931
932 Extended error information can be set by VirtualBox components after
933 unsuccessful or partially successful method invocation. This information
934 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
935 and then shown to the client in addition to the plain 32-bit result code.
936
937 In MS COM, this interface extends the IErrorInfo interface,
938 in XPCOM, it extends the nsIException interface. In both cases,
939 it provides a set of common attributes to retrieve error
940 information.
941
942 Sometimes invocation of some component's method may involve methods of
943 other components that may also fail (independently of this method's
944 failure), or a series of non-fatal errors may precede a fatal error that
945 causes method failure. In cases like that, it may be desirable to preserve
946 information about all errors happened during method invocation and deliver
947 it to the caller. The <link to="#next"/> attribute is intended
948 specifically for this purpose and allows to represent a chain of errors
949 through a single IVirtualBoxErrorInfo object set after method invocation.
950
951 Note that errors are stored to a chain in the reverse order, i.e. the
952 initial error object you query right after method invocation is the last
953 error set by the callee, the object it points to in the @a next attribute
954 is the previous error and so on, up to the first error (which is the last
955 in the chain).
956 </desc>
957
958 <attribute name="resultCode" type="result" readonly="yes">
959 <desc>
960 Result code of the error.
961 Usually, it will be the same as the result code returned
962 by the method that provided this error information, but not
963 always. For example, on Win32, CoCreateInstance() will most
964 likely return E_NOINTERFACE upon unsuccessful component
965 instantiation attempt, but not the value the component factory
966 returned.
967 <note>
968 In MS COM, there is no equivalent.
969 In XPCOM, it is the same as nsIException::result.
970 </note>
971 </desc>
972 </attribute>
973
974 <attribute name="interfaceID" type="uuid" readonly="yes">
975 <desc>
976 UUID of the interface that defined the error.
977 <note>
978 In MS COM, it is the same as IErrorInfo::GetGUID.
979 In XPCOM, there is no equivalent.
980 </note>
981 </desc>
982 </attribute>
983
984 <attribute name="component" type="wstring" readonly="yes">
985 <desc>
986 Name of the component that generated the error.
987 <note>
988 In MS COM, it is the same as IErrorInfo::GetSource.
989 In XPCOM, there is no equivalent.
990 </note>
991 </desc>
992 </attribute>
993
994 <attribute name="text" type="wstring" readonly="yes">
995 <desc>
996 Text description of the error.
997 <note>
998 In MS COM, it is the same as IErrorInfo::GetDescription.
999 In XPCOM, it is the same as nsIException::message.
1000 </note>
1001 </desc>
1002 </attribute>
1003
1004 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1005 <desc>
1006 Next error object if there is any, or @c null otherwise.
1007 <note>
1008 In MS COM, there is no equivalent.
1009 In XPCOM, it is the same as nsIException::inner.
1010 </note>
1011 </desc>
1012 </attribute>
1013
1014 </interface>
1015
1016
1017 <!--
1018 // IVirtualBox
1019 /////////////////////////////////////////////////////////////////////////
1020 -->
1021
1022 <interface
1023 name="IVirtualBoxCallback" extends="$unknown"
1024 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1025 wsmap="suppress"
1026 >
1027 <method name="onMachineStateChange">
1028 <desc>
1029 The execution state of the given machine has changed.
1030 <see>IMachine::state</see>
1031 </desc>
1032 <param name="machineId" type="uuid" dir="in">
1033 <desc>ID of the machine this event relates to.</desc>
1034 </param>
1035 <param name="state" type="MachineState" dir="in">
1036 <desc>New execution state.</desc>
1037 </param>
1038 </method>
1039
1040 <method name="onMachineDataChange">
1041 <desc>
1042 Any of the settings of the given machine has changed.
1043 </desc>
1044 <param name="machineId" type="uuid" dir="in">
1045 <desc>ID of the machine this event relates to.</desc>
1046 </param>
1047 </method>
1048
1049 <method name="onExtraDataCanChange">
1050 <desc>
1051 Notification when someone tries to change extra data for
1052 either the given machine or (if null) global extra data.
1053 This gives the chance to veto against changes.
1054 </desc>
1055 <param name="machineId" type="uuid" dir="in">
1056 <desc>
1057 ID of the machine this event relates to
1058 (null ID for global extra data change requests).
1059 </desc>
1060 </param>
1061 <param name="key" type="wstring" dir="in">
1062 <desc>
1063 Extra data key for the attempted write.
1064 </desc>
1065 </param>
1066 <param name="value" type="wstring" dir="in">
1067 <desc>
1068 Extra data value for the given key.
1069 </desc>
1070 </param>
1071 <param name="error" type="wstring" dir="out">
1072 <desc>
1073 Optional error message describing the reason of the
1074 veto (ignored if this notification returns @c true).
1075 </desc>
1076 </param>
1077 <param name="allowChange" type="boolean" dir="return">
1078 <desc>
1079 Flag to indicate whether the callee agrees (@c true)
1080 or vetoes against the change (@c false).
1081 </desc>
1082 </param>
1083 </method>
1084
1085 <method name="onExtraDataChange">
1086 <desc>
1087 Notification when machine specific or global extra data
1088 has changed.
1089 </desc>
1090 <param name="machineId" type="uuid" dir="in">
1091 <desc>
1092 ID of the machine this event relates to.
1093 Null for global extra data changes.
1094 </desc>
1095 </param>
1096 <param name="key" type="wstring" dir="in">
1097 <desc>
1098 Extra data key that has changed.
1099 </desc>
1100 </param>
1101 <param name="value" type="wstring" dir="in">
1102 <desc>
1103 Extra data value for the given key.
1104 </desc>
1105 </param>
1106 </method>
1107
1108 <method name="onMediaRegistered">
1109 <desc>
1110 The given media was registered or unregistered
1111 within this VirtualBox installation.
1112
1113 The @a mediaType parameter describes what type of
1114 media the specified @a mediaId refers to. Possible
1115 values are:
1116
1117 <ul>
1118 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1119 that, if registered, can be obtained using the
1120 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1121 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1122 that, if registered, can be obtained using the
1123 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1124 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1125 that, if registered, can be obtained using the
1126 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1127 </ul>
1128
1129 Note that if this is a deregistration notification,
1130 there is no way to access the object representing the
1131 unregistered media. It is supposed that the
1132 application will do required cleanup based on the @a
1133 mediaId value.
1134 </desc>
1135 <param name="mediaId" type="uuid" dir="in">
1136 <desc>ID of the media this event relates to.</desc>
1137 </param>
1138 <param name="mediaType" type="DeviceType" dir="in">
1139 <desc>Type of the media this event relates to.</desc>
1140 </param>
1141 <param name="registered" type="boolean" dir="in">
1142 <desc>
1143 If true, the media was registered, otherwise it was
1144 unregistered.
1145 </desc>
1146 </param>
1147 </method>
1148
1149 <method name="onMachineRegistered">
1150 <desc>
1151 The given machine was registered or unregistered
1152 within this VirtualBox installation.
1153 </desc>
1154 <param name="machineId" type="uuid" dir="in">
1155 <desc>ID of the machine this event relates to.</desc>
1156 </param>
1157 <param name="registered" type="boolean" dir="in">
1158 <desc>
1159 If true, the machine was registered, otherwise it was
1160 unregistered.
1161 </desc>
1162 </param>
1163 </method>
1164
1165 <method name="onSessionStateChange">
1166 <desc>
1167 The state of the session for the given machine was changed.
1168 <see>IMachine::sessionState</see>
1169 </desc>
1170 <param name="machineId" type="uuid" dir="in">
1171 <desc>ID of the machine this event relates to.</desc>
1172 </param>
1173 <param name="state" type="SessionState" dir="in">
1174 <desc>New session state.</desc>
1175 </param>
1176 </method>
1177
1178 <method name="onSnapshotTaken">
1179 <desc>
1180 A new snapshot of the machine has been taken.
1181 <see>ISnapshot</see>
1182 </desc>
1183 <param name="machineId" type="uuid" dir="in">
1184 <desc>ID of the machine this event relates to.</desc>
1185 </param>
1186 <param name="snapshotId" type="uuid" dir="in">
1187 <desc>ID of the new snapshot.</desc>
1188 </param>
1189 </method>
1190
1191 <method name="onSnapshotDiscarded">
1192 <desc>
1193 Snapshot of the given machine has been discarded.
1194
1195 <note>
1196 This notification is delivered <b>after</b> the snapshot
1197 object has been uninitialized on the server (so that any
1198 attempt to call its methods will return an error).
1199 </note>
1200
1201 <see>ISnapshot</see>
1202 </desc>
1203 <param name="machineId" type="uuid" dir="in">
1204 <desc>ID of the machine this event relates to.</desc>
1205 </param>
1206 <param name="snapshotId" type="uuid" dir="in">
1207 <desc>
1208 ID of the discarded snapshot. <tt>null</tt> means the
1209 current machine state has been discarded (restored from
1210 the current snapshot).
1211 </desc>
1212 </param>
1213 </method>
1214
1215 <method name="onSnapshotChange">
1216 <desc>
1217 Snapshot properties (name and/or description) have been changed.
1218 <see>ISnapshot</see>
1219 </desc>
1220 <param name="machineId" type="uuid" dir="in">
1221 <desc>ID of the machine this event relates to.</desc>
1222 </param>
1223 <param name="snapshotId" type="uuid" dir="in">
1224 <desc>ID of the changed snapshot.</desc>
1225 </param>
1226 </method>
1227
1228 <method name="onGuestPropertyChange">
1229 <desc>
1230 Notification when a guest property has changed.
1231 </desc>
1232 <param name="machineId" type="uuid" dir="in">
1233 <desc>
1234 ID of the machine this event relates to.
1235 </desc>
1236 </param>
1237 <param name="name" type="wstring" dir="in">
1238 <desc>
1239 The name of the property that has changed.
1240 </desc>
1241 </param>
1242 <param name="value" type="wstring" dir="in">
1243 <desc>
1244 The new property value.
1245 </desc>
1246 </param>
1247 <param name="flags" type="wstring" dir="in">
1248 <desc>
1249 The new property flags.
1250 </desc>
1251 </param>
1252 </method>
1253
1254 </interface>
1255
1256 <interface
1257 name="IVirtualBox" extends="$dispatched"
1258 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1259 wsmap="managed"
1260 >
1261 <desc>
1262 The IVirtualBox interface represents the main interface exposed by the
1263 product that provides virtual machine management.
1264
1265 An instance of IVirtualBox is required for the product to do anything
1266 useful. Even though the interface does not expose this, internally,
1267 IVirtualBox is implemented as a singleton and actually lives in the
1268 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1269 IVirtualBox can track the state of all virtual machines on a particular
1270 host, regardless of which frontend started them.
1271
1272 To enumerate all the virtual machines on the host, use the
1273 <link to="IVirtualBox::machines2"/> attribute.
1274 </desc>
1275
1276 <attribute name="version" type="wstring" readonly="yes">
1277 <desc>
1278 A string representing the version number of the product. The
1279 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1280 last number represents the build number and will frequently change.
1281 </desc>
1282 </attribute>
1283
1284 <attribute name="revision" type="unsigned long" readonly="yes">
1285 <desc>
1286 The internal build revision number of the product.
1287 </desc>
1288 </attribute>
1289
1290 <attribute name="packageType" type="wstring" readonly="yes">
1291 <desc>
1292 A string representing the package type of this product. The
1293 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1294 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1295 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1296 this.
1297 </desc>
1298 </attribute>
1299
1300 <attribute name="homeFolder" type="wstring" readonly="yes">
1301 <desc>
1302 Full path to the directory where the global settings file,
1303 <tt>VirtualBox.xml</tt>, is stored.
1304
1305 In this version of VirtualBox, the value of this property is
1306 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1307 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1308 as determined by the host OS), and cannot be changed.
1309
1310 This path is also used as the base to resolve relative paths in
1311 places where relative paths are allowed (unless otherwise
1312 expressly indicated).
1313 </desc>
1314 </attribute>
1315
1316 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1317 <desc>
1318 Full name of the global settings file.
1319 The value of this property corresponds to the value of
1320 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1321 </desc>
1322 </attribute>
1323
1324 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1325 <desc>
1326 Current version of the format of the global VirtualBox settings file
1327 (<tt>VirtualBox.xml</tt>).
1328
1329 The version string has the following format:
1330 <pre>
1331 x.y-platform
1332 </pre>
1333 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1334 versions, and <tt>platform</tt> is the platform identifier.
1335
1336 The current version usually matches the value of the
1337 <link to="#settingsFormatVersion"/> attribute unless the
1338 settings file was created by an older version of VirtualBox and there
1339 was a change of the settings file format since then.
1340
1341 Note that VirtualBox automatically converts settings files from older
1342 versions to the most recent version when reading them (usually at
1343 VirtualBox startup) but it doesn't save the changes back until
1344 you call a method that implicitly saves settings (such as
1345 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1346 explicitly. Therefore, if the value of this attribute differs from the
1347 value of <link to="#settingsFormatVersion"/>, then it
1348 means that the settings file was converted but the result of the
1349 conversion is not yet saved to disk.
1350
1351 The above feature may be used by interactive front-ends to inform users
1352 about the settings file format change and offer them to explicitly save
1353 all converted settings files (the global and VM-specific ones),
1354 optionally create backup copies of the old settings files before saving,
1355 etc.
1356
1357 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1358 </desc>
1359 </attribute>
1360
1361 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1362 <desc>
1363 Most recent version of the settings file format.
1364
1365 The version string has the following format:
1366 <pre>
1367 x.y-platform
1368 </pre>
1369 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1370 versions, and <tt>platform</tt> is the platform identifier.
1371
1372 VirtualBox uses this version of the format when saving settings files
1373 (either as a result of method calls that require to save settings or as
1374 a result of an explicit call to <link to="#saveSettings()"/>).
1375
1376 <see>settingsFileVersion</see>
1377 </desc>
1378 </attribute>
1379
1380 <attribute name="host" type="IHost" readonly="yes">
1381 <desc>Associated host object.</desc>
1382 </attribute>
1383
1384 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1385 <desc>Associated system information object.</desc>
1386 </attribute>
1387
1388 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1389 <desc>
1390 Array of machine objects registered within this VirtualBox instance.
1391 </desc>
1392 </attribute>
1393
1394 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1395 <desc>
1396 Array of hard disk objects known to this VirtualBox installation.
1397
1398 This array contains only base (root) hard disks. All differencing
1399 hard disks of the given base hard disk can be enumerated using
1400 <link to="IHardDisk2::children"/>.
1401 </desc>
1402 </attribute>
1403
1404 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1405 <desc>
1406 Array of CD/DVD image objects registered with this VirtualBox instance.
1407 </desc>
1408 </attribute>
1409
1410 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1411 <desc>
1412 Array of floppy image objects registered with this VirtualBox instance.
1413 </desc>
1414 </attribute>
1415
1416 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1417
1418 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1419
1420 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1421 <desc>
1422 Collection of global shared folders. Global shared folders are
1423 available to all virtual machines.
1424
1425 New shared folders are added to the collection using
1426 <link to="#createSharedFolder"/>. Existing shared folders can be
1427 removed using <link to="#removeSharedFolder"/>.
1428
1429 <note>
1430 In the current version of the product, global shared folders are not
1431 implemented and therefore this collection is always empty.
1432 </note>
1433 </desc>
1434 </attribute>
1435
1436 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1437 <desc>
1438 Associated performance collector object.
1439 </desc>
1440 </attribute>
1441
1442 <method name="createMachine">
1443 <desc>
1444 Creates a new virtual machine.
1445
1446 The new machine is created unregistered, with the initial configuration
1447 set according to the specified guest OS type. A typical sequence of
1448 actions to create a new virtual machine is as follows:
1449
1450 <ol>
1451 <li>
1452 Call this method to have a new machine created. The returned machine
1453 object will be "mutable" allowing to change any machine property.
1454 </li>
1455
1456 <li>
1457 Configure the machine using the appropriate attributes and methods.
1458 </li>
1459
1460 <li>
1461 Call <link to="IMachine::saveSettings()" /> to write the settings
1462 to the machine's XML settings file. The configuration of the newly
1463 created machine will not be saved to disk until this method is
1464 called.
1465 </li>
1466
1467 <li>
1468 Call <link to="#registerMachine()" /> to add the machine to the list
1469 of machines known to VirtualBox.
1470 </li>
1471 </ol>
1472
1473 You should specify valid name for the newly created machine when calling
1474 this method. See the <link to="IMachine::name"/> attribute description
1475 for more details about the machine name.
1476
1477 The specified guest OS type identifier must match an ID of one of known
1478 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1479 array.
1480
1481 Every machine has a <i>settings file</i> that is used to store
1482 the machine configuration. This file is stored in a directory called the
1483 <i>machine settings subfolder</i>. Both the settings subfolder and file
1484 will have a name that corresponds to the name of the virtual machine.
1485 You can specify where to create the machine setting subfolder using the
1486 @a baseFolder argument. The base folder can be absolute (full path) or
1487 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1488 directory</link>.
1489
1490 If @a baseFolder is a null or empty string (which is recommended), the
1491 <link to="ISystemProperties::defaultMachineFolder">default machine
1492 settings folder</link> will be used as a base folder for the created
1493 machine. Otherwise the given base folder will be used. In either case,
1494 the full path to the resulting settings file has the following
1495 structure:
1496 <pre>
1497 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1498 </pre>
1499
1500 Note that if the resulting settings file already exists, this method
1501 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1502
1503 Optionally, you may specify an UUID of to assign to the created machine.
1504 However, this is not recommended and you should normally pass an empty
1505 (null) UUID to this method so that a new UUID will be automatically
1506 generated for every created machine.
1507
1508 <note>
1509 There is no way to change the name of the settings file or
1510 subfolder of the created machine directly.
1511 </note>
1512
1513 <result name="VBOX_E_OBJECT_NOT_FOUND">
1514 @a osTypeId is invalid.
1515 </result>
1516 <result name="VBOX_E_FILE_ERROR">
1517 Resulting settings file name is invalid or the settings file already
1518 exists or could not be created due to an I/O error.
1519 </result>
1520 <result name="E_INVALIDARG">
1521 @a name is empty or null.
1522 </result>
1523 </desc>
1524
1525 <param name="name" type="wstring" dir="in">
1526 <desc>Machine name.</desc>
1527 </param>
1528 <param name="osTypeId" type="wstring" dir="in">
1529 <desc>Guest OS Type ID.</desc>
1530 </param>
1531 <param name="baseFolder" type="wstring" dir="in">
1532 <desc>Base machine folder (optional).</desc>
1533 </param>
1534 <param name="id" type="uuid" dir="in">
1535 <desc>Machine UUID (optional).</desc>
1536 </param>
1537 <param name="machine" type="IMachine" dir="return">
1538 <desc>Created machine object.</desc>
1539 </param>
1540 </method>
1541
1542 <method name="createLegacyMachine">
1543 <desc>
1544 Creates a new virtual machine in "legacy" mode, using the specified
1545 settings file to store machine settings.
1546
1547 As opposed to machines created by <link to="#createMachine()"/>,
1548 the settings file of the machine created in "legacy" mode is not
1549 automatically renamed when the machine name is changed -- it will always
1550 remain the same as specified in this method call.
1551
1552 The specified settings file name can be absolute (full path) or relative
1553 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1554 directory</link>. If the file name doesn't contain an extension, the
1555 default extension (.xml) will be appended.
1556
1557 Note that the configuration of the newly created machine is not
1558 saved to disk (and therefore no settings file is created)
1559 until <link to="IMachine::saveSettings()"/> is called. If the
1560 specified settings file already exists, this method
1561 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1562
1563 See <link to="#createMachine()"/> for more information.
1564
1565 @deprecated This method may be removed later. Use <link
1566 to="IVirtualBox::createMachine()"/> instead.
1567
1568 <note>
1569 There is no way to change the name of the settings file
1570 of the machine created in "legacy" mode.
1571 </note>
1572
1573 <result name="VBOX_E_OBJECT_NOT_FOUND">
1574 @a osTypeId is invalid.
1575 </result>
1576 <result name="VBOX_E_FILE_ERROR">
1577 @a settingsFile is invalid or the settings file already exists or
1578 could not be created due to an I/O error.
1579 </result>
1580 <result name="E_INVALIDARG">
1581 @a name or @a settingsFile is empty or null.
1582 </result>
1583 </desc>
1584
1585 <param name="name" type="wstring" dir="in">
1586 <desc>Machine name.</desc>
1587 </param>
1588 <param name="osTypeId" type="wstring" dir="in">
1589 <desc>Machine OS Type ID.</desc>
1590 </param>
1591 <param name="settingsFile" type="wstring" dir="in">
1592 <desc>Name of the machine settings file.</desc>
1593 </param>
1594 <param name="id" type="uuid" dir="in">
1595 <desc>Machine UUID (optional).</desc>
1596 </param>
1597 <param name="machine" type="IMachine" dir="return">
1598 <desc>Created machine object.</desc>
1599 </param>
1600 </method>
1601
1602 <method name="openMachine">
1603 <desc>
1604 Opens a virtual machine from the existing settings file.
1605 The opened machine remains unregistered until you call
1606 <link to="#registerMachine()"/>.
1607
1608 The specified settings file name can be absolute
1609 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1610 VirtualBox home directory</link>. This file must exist
1611 and must be a valid machine settings file whose contents
1612 will be used to construct the machine object.
1613
1614 @deprecated Will be removed soon.
1615 <result name="VBOX_E_FILE_ERROR">
1616 Settings file name invalid, not found or sharing violation.
1617 </result>
1618 </desc>
1619 <param name="settingsFile" type="wstring" dir="in">
1620 <desc>
1621 Name of the machine settings file.
1622 </desc>
1623 </param>
1624 <param name="machine" type="IMachine" dir="return">
1625 <desc>Opened machine object.</desc>
1626 </param>
1627 <note>
1628 <link to="IMachine::settingsModified"/> will return
1629 false for the created machine, until any of machine settings
1630 are changed.
1631 </note>
1632 </method>
1633
1634 <method name="registerMachine">
1635 <desc>
1636
1637 Registers the machine previously created using
1638 <link to="#createMachine()"/> or opened using
1639 <link to="#openMachine()"/> within this VirtualBox installation. After
1640 successful method invocation, the
1641 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1642 to all registered callbacks.
1643
1644 <note>
1645 This method implicitly calls <link to="IMachine::saveSettings"/>
1646 to save all current machine settings before registering it.
1647 </note>
1648
1649 <result name="VBOX_E_OBJECT_NOT_FOUND">
1650 No matching virtual machine found.
1651 </result>
1652 <result name="VBOX_E_INVALID_OBJECT_STATE">
1653 Virtual machine was not created within this VirtualBox instance.
1654 </result>
1655
1656 </desc>
1657 <param name="machine" type="IMachine" dir="in"/>
1658 </method>
1659
1660 <method name="getMachine">
1661 <desc>
1662 Attempts to find a virtual machine given its UUID.
1663 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1664 instead.
1665
1666 <result name="VBOX_E_OBJECT_NOT_FOUND">
1667 Could not find registered machine matching @a id.
1668 </result>
1669
1670 </desc>
1671 <param name="id" type="uuid" dir="in"/>
1672 <param name="machine" type="IMachine" dir="return"/>
1673 </method>
1674
1675 <method name="findMachine">
1676 <desc>
1677 Attempts to find a virtual machine given its name.
1678 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1679 instead.
1680
1681 <result name="VBOX_E_OBJECT_NOT_FOUND">
1682 Could not find registered machine matching @a name.
1683 </result>
1684
1685 </desc>
1686 <param name="name" type="wstring" dir="in"/>
1687 <param name="machine" type="IMachine" dir="return"/>
1688 </method>
1689
1690 <method name="unregisterMachine">
1691 <desc>
1692
1693 Unregisters the machine previously registered using
1694 <link to="#registerMachine"/>. After successful method invocation, the
1695 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1696 to all registered callbacks.
1697
1698 <note>
1699 The specified machine must not be in the Saved state, have an open
1700 (or a spawning) direct session associated with it, have snapshots or
1701 have hard disks attached.
1702 </note>
1703
1704 <note>
1705 This method implicitly calls <link to="IMachine::saveSettings"/> to
1706 save all current machine settings before unregistering it.
1707 </note>
1708
1709 <note>
1710 If the given machine is inaccessible (see
1711 <link to="IMachine::accessible"/>), it will be unregistered and
1712 fully uninitialized right afterwards. As a result, the returned
1713 machine object will be unusable and an attempt to call
1714 <b>any</b> method will return the "Object not ready" error.
1715 </note>
1716
1717 <result name="VBOX_E_OBJECT_NOT_FOUND">
1718 Could not find registered machine matching @a id.
1719 </result>
1720 <result name="VBOX_E_INVALID_VM_STATE">
1721 Machine is in Saved state.
1722 </result>
1723 <result name="VBOX_E_INVALID_OBJECT_STATE">
1724 Machine has snapshot or open session or hard disk attached.
1725 </result>
1726
1727 </desc>
1728 <param name="id" type="uuid" dir="in">
1729 <desc>UUID of the machine to unregister.</desc>
1730 </param>
1731 <param name="machine" type="IMachine" dir="return">
1732 <desc>Unregistered machine object.</desc>
1733 </param>
1734 </method>
1735
1736 <method name="createHardDisk2">
1737 <desc>
1738 Creates a new base hard disk object that will use the given storage
1739 format and location for hard disk data.
1740
1741 Note that the actual storage unit is not created by this method. In
1742 order to do it, and before you are able to attach the created hard disk
1743 to virtual machines, you must call one of the following methods to
1744 allocate a format-specific storage unit at the specified location:
1745 <ul>
1746 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1747 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1748 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1749 </ul>
1750
1751 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1752 remain uninitialized until the hard disk storage unit is successfully
1753 created by one of the above methods.
1754
1755 After the storage unit is successfully created, the hard disk gets
1756 remembered by this VirtualBox installation and will be accessible
1757 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1758 methods. Remembered root (base) hard disks are also returned as part of
1759 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1760
1761 The list of all storage formats supported by this VirtualBox
1762 installation can be obtained using
1763 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1764 attribute is empty or <tt>null</tt> then the default storage format
1765 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1766 be used for creating a storage unit of the hard disk.
1767
1768 Note that the format of the location string is storage format specific.
1769 See <link to="IMedium::location"/>, IHardDisk2 and
1770 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1771
1772 <result name="VBOX_E_OBJECT_NOT_FOUND">
1773 @a format identifier is invalid. See
1774 <link to="ISystemProperties::hardDiskFormats"/>.
1775 </result>
1776 <result name="VBOX_E_FILE_ERROR">
1777 @a location is a not valid file name (for file-based formats only).
1778 </result>
1779 <result name="E_INVALIDARG">
1780 @a format is a null or empty string.
1781 </result>
1782 </desc>
1783 <param name="format" type="wstring" dir="in">
1784 <desc>
1785 Identifier of the storage format to use for the new hard disk.
1786 </desc>
1787 </param>
1788 <param name="location" type="wstring" dir="in">
1789 <desc>
1790 Location of the storage unit for the new hard disk.
1791 </desc>
1792 </param>
1793 <param name="hardDisk" type="IHardDisk2" dir="return">
1794 <desc>Created hard disk object.</desc>
1795 </param>
1796 </method>
1797
1798 <method name="openHardDisk2">
1799 <desc>
1800 Opens a hard disk from an existing location.
1801
1802 After the hard disk is successfully opened by this method, it gets
1803 remembered by (known to) this VirtualBox installation and will be
1804 accessible through <link to="#getHardDisk2()"/> and
1805 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1806 are also returned as part of the <link to="#hardDisks2"/> array and can
1807 be attached to virtual machines. See IHardDisk2 for more details.
1808
1809 If a differencing hard disk is to be opened by this method, the
1810 operation will succeed only if its parent hard disk and all ancestors,
1811 if any, are already known to this VirtualBox installation (for example,
1812 were opened by this method before).
1813
1814 This method tries to guess the storage format of the specified hard disk
1815 by reading hard disk data at the specified location.
1816
1817 Note that the format of the location string is storage format specific.
1818 See <link to="IMedium::location"/>, IHardDisk2 and
1819 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1820
1821
1822 <result name="VBOX_E_FILE_ERROR">
1823 Invalid hard disk storage file location.
1824 </result>
1825 <result name="VBOX_E_IPRT_ERROR">
1826 Could not get hard disk storage format.
1827 </result>
1828 <result name="E_INVALIDARG">
1829 Invalid hard disk storage format.
1830 </result>
1831
1832 </desc>
1833 <param name="location" type="wstring" dir="in">
1834 <desc>
1835 Location of the storage unit that contains hard disk data in one of
1836 the supported storage formats.
1837 </desc>
1838 </param>
1839 <param name="hardDisk" type="IHardDisk2" dir="return">
1840 <desc>Opened hard disk object.</desc>
1841 </param>
1842 </method>
1843
1844 <method name="getHardDisk2" const="yes">
1845 <desc>
1846 Returns a hard disk with the given UUID.
1847
1848 The hard disk with the given UUID must be known to this VirtualBox
1849 installation, i.e. it must be previously created by
1850 <link to="#createHardDisk2()"/> or opened by <link
1851 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1852
1853 <result name="VBOX_E_OBJECT_NOT_FOUND">
1854 No hard disk object matching @a id found.
1855 </result>
1856
1857 </desc>
1858 <param name="id" type="uuid" dir="in">
1859 <desc>UUID of the hard disk to look for.</desc>
1860 </param>
1861 <param name="hardDisk" type="IHardDisk2" dir="return">
1862 <desc>Found hard disk object.</desc>
1863 </param>
1864 </method>
1865
1866 <method name="findHardDisk2">
1867 <desc>
1868 Returns a hard disk that uses the given location to store hard
1869 disk data.
1870
1871 The given hard disk must be known to this VirtualBox installation, i.e.
1872 it must be previously created by
1873 <link to="#createHardDisk2()"/> or opened by <link
1874 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1875
1876 The search is done by comparing the value of the @a location argument to
1877 the <link to="IHardDisk2::location"/> attribute of each known hard
1878 disk.
1879
1880 For locations represented by file names in the host's file system, the
1881 requested location can be a path relative to the
1882 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1883 only a file name without any path is given, the
1884 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1885 folder</link> will be prepended to the file name before searching. Note
1886 that on case sensitive file systems, a case sensitive comparison is
1887 performed, otherwise the case of symbols in the file path is ignored.
1888
1889 <result name="VBOX_E_OBJECT_NOT_FOUND">
1890 No hard disk object matching @a location found.
1891 </result>
1892
1893 </desc>
1894 <param name="location" type="wstring" dir="in">
1895 <desc>Location string to search for.</desc>
1896 </param>
1897 <param name="hardDisk" type="IHardDisk2" dir="return">
1898 <desc>Found hard disk object.</desc>
1899 </param>
1900 </method>
1901
1902 <method name="openDVDImage">
1903 <desc>
1904 Opens a CD/DVD image contained in the specified file of the supported
1905 format and assigns it the given UUID.
1906
1907 After the image is successfully opened by this method, it gets
1908 remembered by (known to) this VirtualBox installation and will be
1909 accessible through <link to="#getDVDImage()"/> and
1910 <link to="#findDVDImage()"/> methods. Remembered images are also
1911 returned as part of the <link to="#DVDImages"/> array and can be mounted
1912 to virtual machines. See IMedium for more details.
1913
1914 See <link to="IMedium::location"/> to get more details about the format
1915 of the location string.
1916
1917 <note>
1918 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1919 </note>
1920
1921 <result name="VBOX_E_INVALID_OBJECT_STATE">
1922 CD/DVD image already exists in the media registry.
1923 </result>
1924
1925 </desc>
1926 <param name="location" type="wstring" dir="in">
1927 <desc>
1928 Full path to the file that contains a valid CD/DVD image.
1929 </desc>
1930 </param>
1931 <param name="id" type="uuid" dir="in">
1932 <desc>
1933 UUID to assign to the given image within this VirtualBox installation.
1934 If an empty (null) UUID is specified, the system will randomly
1935 generate a new UUID.
1936 </desc>
1937 </param>
1938 <param name="image" type="IDVDImage2" dir="return">
1939 <desc>Opened CD/DVD image object.</desc>
1940 </param>
1941 </method>
1942
1943 <method name="getDVDImage">
1944 <desc>
1945 Returns a CD/DVD image with the given UUID.
1946
1947 The image with the given UUID must be known to this VirtualBox
1948 installation, i.e. it must be previously opened by <link
1949 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1950
1951 <result name="VBOX_E_OBJECT_NOT_FOUND">
1952 No matching DVD image found in the media registry.
1953 </result>
1954
1955 </desc>
1956 <param name="id" type="uuid" dir="in">
1957 <desc>UUID of the image to look for.</desc>
1958 </param>
1959 <param name="image" type="IDVDImage2" dir="return">
1960 <desc>Found CD/DVD image object.</desc>
1961 </param>
1962 </method>
1963
1964 <method name="findDVDImage">
1965 <desc>
1966 Returns a CD/DVD image with the given image location.
1967
1968 The image with the given UUID must be known to this VirtualBox
1969 installation, i.e. it must be previously opened by <link
1970 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1971
1972 The search is done by comparing the value of the @a location argument to
1973 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1974
1975 The requested location can be a path relative to the
1976 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1977 only a file name without any path is given, the
1978 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1979 folder</link> will be prepended to the file name before searching. Note
1980 that on case sensitive file systems, a case sensitive comparison is
1981 performed, otherwise the case in the file path is ignored.
1982
1983 <result name="VBOX_E_FILE_ERROR">
1984 Invalid image file location.
1985 </result>
1986 <result name="VBOX_E_OBJECT_NOT_FOUND">
1987 No matching DVD image found in the media registry.
1988 </result>
1989
1990 </desc>
1991 <param name="location" type="wstring" dir="in">
1992 <desc>CD/DVD image file path to look for.</desc>
1993 </param>
1994 <param name="image" type="IDVDImage2" dir="return">
1995 <desc>Found CD/DVD image object.</desc>
1996 </param>
1997 </method>
1998
1999 <method name="openFloppyImage">
2000 <desc>
2001 Opens a floppy image contained in the specified file of the supported
2002 format and assigns it the given UUID.
2003
2004 After the image is successfully opened by this method, it gets
2005 remembered by (known to) this VirtualBox installation and will be
2006 accessible through <link to="#getFloppyImage()"/> and
2007 <link to="#findFloppyImage()"/> methods. Remembered images are also
2008 returned as part of the <link to="#floppyImages"/> array and can be
2009 mounted to virtual machines. See IMedium for more details.
2010
2011 See <link to="IMedium::location"/> to get more details about the format
2012 of the location string.
2013
2014 <result name="VBOX_E_FILE_ERROR">
2015 Floppy image specified by @a location not accessible.
2016 </result>
2017 <result name="VBOX_E_INVALID_OBJECT_STATE">
2018 Floppy image already exists in the media registry.
2019 </result>
2020
2021 <note>
2022 Currently, only raw floppy images are supported by VirtualBox.
2023 </note>
2024 </desc>
2025 <param name="location" type="wstring" dir="in">
2026 <desc>
2027 Full path to the file that contains a valid floppy image.
2028 </desc>
2029 </param>
2030 <param name="id" type="uuid" dir="in">
2031 <desc>
2032 UUID to assign to the given image file within this VirtualBox
2033 installation. If an empty (null) UUID is specified, the system will
2034 randomly generate a new UUID.
2035 </desc>
2036 </param>
2037 <param name="image" type="IFloppyImage2" dir="return">
2038 <desc>Opened floppy image object.</desc>
2039 </param>
2040 </method>
2041
2042 <method name="getFloppyImage">
2043 <desc>
2044 Returns a floppy image with the given UUID.
2045
2046 The image with the given UUID must be known to this VirtualBox
2047 installation, i.e. it must be previously opened by <link
2048 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2049
2050 <result name="VBOX_E_OBJECT_NOT_FOUND">
2051 No matching floppy image found in the media registry.
2052 </result>
2053
2054 </desc>
2055 <param name="id" type="uuid" dir="in">
2056 <desc>UUID of the image to look for.</desc>
2057 </param>
2058 <param name="image" type="IFloppyImage2" dir="return">
2059 <desc>Found floppy image object.</desc>
2060 </param>
2061 </method>
2062
2063 <method name="findFloppyImage">
2064 <desc>
2065 Returns a floppy image with the given image location.
2066
2067 The image with the given UUID must be known to this VirtualBox
2068 installation, i.e. it must be previously opened by <link
2069 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2070
2071 The search is done by comparing the value of the @a location argument to
2072 the <link to="IMedium::location"/> attribute of each known floppy image.
2073
2074 The requested location can be a path relative to the
2075 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2076 only a file name without any path is given, the
2077 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2078 folder</link> will be prepended to the file name before searching. Note
2079 that on case sensitive file systems, a case sensitive comparison is
2080 performed, otherwise the case of symbols in the file path is ignored.
2081
2082 <result name="VBOX_E_FILE_ERROR">
2083 Invalid image file location.
2084 </result>
2085 <result name="VBOX_E_OBJECT_NOT_FOUND">
2086 No matching floppy image found in the media registry.
2087 </result>
2088
2089 </desc>
2090 <param name="location" type="wstring" dir="in">
2091 <desc>Floppy image file path to look for.</desc>
2092 </param>
2093 <param name="image" type="IFloppyImage2" dir="return">
2094 <desc>Found floppy image object.</desc>
2095 </param>
2096 </method>
2097
2098 <method name="getGuestOSType">
2099 <desc>
2100 Returns an object describing the specified guest OS type.
2101
2102 The requested guest OS type is specified using a string which is a
2103 mnemonic identifier of the guest operating system, such as
2104 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2105 particular virtual machine can be read or set using the
2106 <link to="IMachine::OSTypeId"/> attribute.
2107
2108 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2109 available guest OS type objects. Each object has an
2110 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2111 the guest OS this object describes.
2112
2113 <result name="E_INVALIDARG">
2114 @a id is not a valid Guest OS type.
2115 </result>
2116
2117 </desc>
2118 <param name="id" type="wstring" dir="in">
2119 <desc>Guest OS type ID string.</desc>
2120 </param>
2121 <param name="type" type="IGuestOSType" dir="return">
2122 <desc>Guest OS type object.</desc>
2123 </param>
2124 </method>
2125
2126 <method name="createSharedFolder">
2127 <desc>
2128 Creates a new global shared folder by associating the given logical
2129 name with the given host path, adds it to the collection of shared
2130 folders and starts sharing it. Refer to the description of
2131 <link to="ISharedFolder"/> to read more about logical names.
2132 <note>
2133 In the current implementation, this operation is not
2134 implemented.
2135 </note>
2136 </desc>
2137 <param name="name" type="wstring" dir="in">
2138 <desc>Unique logical name of the shared folder.</desc>
2139 </param>
2140 <param name="hostPath" type="wstring" dir="in">
2141 <desc>Full path to the shared folder in the host file system.</desc>
2142 </param>
2143 <param name="writable" type="boolean" dir="in">
2144 <desc>Whether the share is writable or readonly</desc>
2145 </param>
2146 </method>
2147
2148 <method name="removeSharedFolder">
2149 <desc>
2150 Removes the global shared folder with the given name previously
2151 created by <link to="#createSharedFolder"/> from the collection of
2152 shared folders and stops sharing it.
2153 <note>
2154 In the current implementation, this operation is not
2155 implemented.
2156 </note>
2157 </desc>
2158 <param name="name" type="wstring" dir="in">
2159 <desc>Logical name of the shared folder to remove.</desc>
2160 </param>
2161 </method>
2162
2163 <method name="getNextExtraDataKey">
2164 <desc>
2165 Returns the global extra data key name following the supplied key.
2166
2167 An error is returned if the supplied @a key does not exist. @c NULL is
2168 returned in @a nextKey if the supplied key is the last key. When
2169 supplying @c NULL for the @a key, the first key item is returned in @a
2170 nextKey (if there is any). @a nextValue is an optional parameter and
2171 if supplied, the next key's value is returned in it.
2172
2173 <result name="VBOX_E_OBJECT_NOT_FOUND">
2174 Extra data @a key not found.
2175 </result>
2176
2177 </desc>
2178 <param name="key" type="wstring" dir="in">
2179 <desc>Name of the data key to follow.</desc>
2180 </param>
2181 <param name="nextKey" type="wstring" dir="out">
2182 <desc>Name of the next data key.</desc>
2183 </param>
2184 <param name="nextValue" type="wstring" dir="out">
2185 <desc>Value of the next data key.</desc>
2186 </param>
2187 </method>
2188
2189 <method name="getExtraData">
2190 <desc>
2191 Returns associated global extra data.
2192
2193 If the requested data @a key does not exist, this function will
2194 succeed and return @c NULL in the @a value argument.
2195
2196 <result name="VBOX_E_FILE_ERROR">
2197 Settings file not accessible.
2198 </result>
2199 <result name="VBOX_E_XML_ERROR">
2200 Could not parse the settings file.
2201 </result>
2202
2203 </desc>
2204 <param name="key" type="wstring" dir="in">
2205 <desc>Name of the data key to get.</desc>
2206 </param>
2207 <param name="value" type="wstring" dir="return">
2208 <desc>Value of the requested data key.</desc>
2209 </param>
2210 </method>
2211
2212 <method name="setExtraData">
2213 <desc>
2214 Sets associated global extra data.
2215
2216 If you pass @c NULL as a key @a value, the given @a key will be
2217 deleted.
2218
2219 <note>
2220 Before performing the actual data change, this method will ask all
2221 registered callbacks using the
2222 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2223 notification for a permission. If one of the callbacks refuses the
2224 new value, the change will not be performed.
2225 </note>
2226 <note>
2227 On success, the
2228 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2229 is called to inform all registered callbacks about a successful data
2230 change.
2231 </note>
2232
2233 <result name="VBOX_E_FILE_ERROR">
2234 Settings file not accessible.
2235 </result>
2236 <result name="VBOX_E_XML_ERROR">
2237 Could not parse the settings file.
2238 </result>
2239 <result name="E_ACCESSDENIED">
2240 Modification request refused.
2241 </result>
2242
2243 </desc>
2244 <param name="key" type="wstring" dir="in">
2245 <desc>Name of the data key to set.</desc>
2246 </param>
2247 <param name="value" type="wstring" dir="in">
2248 <desc>Value to assign to the key.</desc>
2249 </param>
2250 </method>
2251
2252 <method name="openSession">
2253 <desc>
2254 Opens a new direct session with the given virtual machine.
2255
2256 A direct session acts as a local lock on the given VM.
2257 There can be only one direct session open at a time for every
2258 virtual machine, protecting the VM from being manipulated by
2259 conflicting actions from different processes. Only after a
2260 direct session has been opened, one can change all VM settings
2261 and execute the VM in the process space of the session object.
2262
2263 Sessions therefore can be compared to mutex semaphores that
2264 lock a given VM for modification and execution.
2265 See <link to="ISession">ISession</link> for details.
2266
2267 <note>Unless you are writing a new VM frontend, you will not
2268 want to execute a VM in the current process. To spawn a new
2269 process that executes a VM, use
2270 <link to="IVirtualBox::openRemoteSession" />
2271 instead.</note>
2272
2273 Upon successful return, the session object can be used to
2274 get access to the machine and to the VM console.
2275
2276 In VirtualBox terminology, the machine becomes "mutable" after
2277 a session has been opened. Note that the "mutable" machine
2278 object, on which you may invoke IMachine methods to change its
2279 settings, will be a different object from the immutable IMachine
2280 objects returned by various IVirtualBox methods. To obtain a
2281 mutable IMachine object (upon which you can invoke settings methods),
2282 use the <link to="ISession::machine" /> attribute.
2283
2284 One must always call <link to="ISession::close" /> to release the
2285 lock on the machine, or the machine's state will eventually be
2286 set to "Aborted".
2287
2288 In other words, to change settings on a machine, the following
2289 sequence is typically performed:
2290
2291 <ol>
2292 <li>Call this method (openSession) to have a machine locked for
2293 the current session.</li>
2294
2295 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2296
2297 <li>Change the settings of the machine.</li>
2298
2299 <li>Call <link to="IMachine::saveSettings" />.</li>
2300
2301 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2302 </ol>
2303
2304 <result name="E_UNEXPECTED">
2305 Virtual machine not registered.
2306 </result>
2307 <result name="E_ACCESSDENIED">
2308 Process not started by OpenRemoteSession.
2309 </result>
2310 <result name="VBOX_E_OBJECT_NOT_FOUND">
2311 No matching virtual machine found.
2312 </result>
2313 <result name="VBOX_E_INVALID_OBJECT_STATE">
2314 Session already open or being opened.
2315 </result>
2316 <result name="VBOX_E_VM_ERROR">
2317 Failed to assign machine to session.
2318 </result>
2319
2320 </desc>
2321 <param name="session" type="ISession" dir="in">
2322 <desc>
2323 Session object that will represent the opened session after
2324 successful method invocation. This object must not represent
2325 the already open session.
2326 <note>
2327 This session will be automatically closed if the
2328 VirtualBox server is terminated for some reason.
2329 </note>
2330 </desc>
2331 </param>
2332 <param name="machineId" type="uuid" dir="in">
2333 <desc>ID of the virtual machine to open a session with.</desc>
2334 </param>
2335 </method>
2336
2337 <method name="openRemoteSession">
2338 <desc>
2339 Spawns a new process that executes a virtual machine (called a
2340 "remote session").
2341
2342 Opening a remote session causes the VirtualBox server to start a new
2343 process that opens a direct session with the given VM. As a result, the
2344 VM is locked by that direct session in the new process, preventing
2345 conflicting changes from other processes. Since sessions act as locks
2346 that such prevent conflicting changes, one cannot open a remote session
2347 for a VM that already has another open session (direct or remote), or
2348 is currently in the process of opening one (see <link
2349 to="IMachine::sessionState"/>).
2350
2351 While the remote session still provides some level of control over the
2352 VM execution to the caller (using the <link to="IConsole" /> interface),
2353 not all VM settings are available for modification within the remote
2354 session context.
2355
2356 This operation can take some time (a new VM is started in a new process,
2357 for which memory and other resources need to be set up). Because of this,
2358 an <link to="IProgress" /> is returned to allow the caller to wait for this
2359 asynchronous operation to be completed. Until then, the remote session
2360 object remains in the closed state, and accessing the machine or its
2361 console through it is invalid. It is recommended to use
2362 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2363 completion.
2364
2365 As with all <link to="ISession" /> objects, it is recommended to call
2366 <link to="ISession::close" /> on the local session object once openRemoteSession()
2367 has been called. However, the session's state (see <link to="ISession::state" />)
2368 will not return to "Closed" until the remote session has also closed (i.e.
2369 until the VM is no longer running). In that case, however, the state of
2370 the session will automatically change back to "Closed".
2371
2372 Currently supported session types (values of the @a type
2373 argument) are:
2374 <ul>
2375 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2376 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2377 </ul>
2378
2379 The @a environment argument is a string containing definitions of
2380 environment variables in the following format:
2381 @code
2382 NAME[=VALUE]\n
2383 NAME[=VALUE]\n
2384 ...
2385 @endcode
2386 where <tt>\\n</tt> is the new line character. These environment
2387 variables will be appended to the environment of the VirtualBox server
2388 process. If an environment variable exists both in the server process
2389 and in this list, the value from this list takes precedence over the
2390 server's variable. If the value of the environment variable is
2391 omitted, this variable will be removed from the resulting environment.
2392 If the environment string is @c null, the server environment is
2393 inherited by the started process as is.
2394
2395 <see>openExistingSession</see>
2396
2397 <result name="E_UNEXPECTED">
2398 Virtual machine not registered.
2399 </result>
2400 <result name="E_INVALIDARG">
2401 Invalid session type @a type.
2402 </result>
2403 <result name="VBOX_E_OBJECT_NOT_FOUND">
2404 No machine matching @a machineId found.
2405 </result>
2406 <result name="VBOX_E_INVALID_OBJECT_STATE">
2407 Session already open or being opened.
2408 </result>
2409 <result name="VBOX_E_IPRT_ERROR">
2410 Launching process for machine failed.
2411 </result>
2412 <result name="VBOX_E_VM_ERROR">
2413 Failed to assign machine to session.
2414 </result>
2415
2416 </desc>
2417 <param name="session" type="ISession" dir="in">
2418 <desc>
2419 Session object that will represent the opened remote session
2420 after successful method invocation (this object must not
2421 represent an already open session).
2422 </desc>
2423 </param>
2424 <param name="machineId" type="uuid" dir="in">
2425 <desc>ID of the virtual machine to open a session with.</desc>
2426 </param>
2427 <param name="type" type="wstring" dir="in">
2428 <desc>
2429 Type of the remote session (case sensitive).
2430 </desc>
2431 </param>
2432 <param name="environment" type="wstring" dir="in">
2433 <desc>
2434 Environment to pass to the opened session (may be @c null).
2435 </desc>
2436 </param>
2437 <param name="progress" type="IProgress" dir="return">
2438 <desc>Progress object to track the operation completion.</desc>
2439 </param>
2440 </method>
2441
2442 <method name="openExistingSession">
2443 <desc>
2444 Opens a new remote session with the virtual machine for
2445 which a direct session is already open.
2446
2447 The remote session provides some level of control over the VM
2448 execution (using the IConsole interface) to the caller; however,
2449 within the remote session context, not all VM settings are available
2450 for modification.
2451
2452 As opposed to <link to="#openRemoteSession()"/>, the number of
2453 remote sessions opened this way is not limited by the API
2454
2455 <note>
2456 It is an error to open a remote session with the machine that
2457 doesn't have an open direct session.
2458 </note>
2459
2460 <result name="E_UNEXPECTED">
2461 Virtual machine not registered.
2462 </result>
2463 <result name="VBOX_E_OBJECT_NOT_FOUND">
2464 No machine matching @a machineId found.
2465 </result>
2466 <result name="VBOX_E_INVALID_OBJECT_STATE">
2467 Session already open or being opened.
2468 </result>
2469 <result name="VBOX_E_INVALID_SESSION_STATE">
2470 Direct session state not Open.
2471 </result>
2472 <result name="VBOX_E_VM_ERROR">
2473 Failed to get console object from direct session or assign
2474 machine to session.
2475 </result>
2476
2477 <see>openRemoteSession</see>
2478 </desc>
2479 <param name="session" type="ISession" dir="in">
2480 <desc>
2481 Session object that will represent the open remote session
2482 after successful method invocation. This object must not
2483 represent an already open session.
2484 <note>
2485 This session will be automatically closed when the peer
2486 (direct) session dies or gets closed.
2487 </note>
2488 </desc>
2489 </param>
2490 <param name="machineId" type="uuid" dir="in">
2491 <desc>ID of the virtual machine to open a session with.</desc>
2492 </param>
2493 </method>
2494
2495 <method name="registerCallback">
2496 <desc>
2497 Registers a new global VirtualBox callback. The methods of the given
2498 callback object will be called by VirtualBox when an appropriate
2499 event occurs.
2500
2501 <result name="E_INVALIDARG">
2502 Registering a @c NULL @a callback is pretty pointless, ain't it?
2503 <!-- See if someone is actually reading this and objects :-) -->
2504 </result>
2505
2506 </desc>
2507 <param name="callback" type="IVirtualBoxCallback" dir="in">
2508 <desc>Callback object to register.</desc>
2509 </param>
2510 </method>
2511
2512 <method name="unregisterCallback">
2513 <desc>
2514 Unregisters the previously registered global VirtualBox callback.
2515
2516 <result name="E_INVALIDARG">
2517 Specified @a callback not registered.
2518 </result>
2519
2520 </desc>
2521 <param name="callback" type="IVirtualBoxCallback" dir="in">
2522 <desc>Callback object to unregister.</desc>
2523 </param>
2524 </method>
2525
2526 <method name="waitForPropertyChange">
2527 <desc>
2528 Blocks the caller until any of the properties represented by the @a
2529 what argument changes the value or until the given timeout interval
2530 expires.
2531
2532 The @a what argument is a comma separated list of property masks that
2533 describe properties the caller is interested in. The property mask is
2534 a string in the following format:
2535
2536 <pre>
2537 [[group.]subgroup.]name
2538 </pre>
2539
2540 where @c name is the property name and @c group, @c subgroup are zero
2541 or more property group specifiers. Each element (group or name) in
2542 the property mask may be either a Latin string or an asterisk symbol
2543 (@c "*") which is used to match any string for the given element. A
2544 property mask that doesn't contain asterisk symbols represents a
2545 single fully qualified property name.
2546
2547 Groups in the fully qualified property name go from more generic (the
2548 left-most part) to more specific (the right-most part). The first
2549 element is usually a name of the object the property belongs to. The
2550 second element may be either a property name, or a child object name,
2551 or an index if the preceding element names an object which is one of
2552 many objects of the same type. This way, property names form a
2553 hierarchy of properties. Here are some examples of property names:
2554
2555 <table>
2556 <tr>
2557 <td><tt>VirtualBox.version</tt></td>
2558 <td><link to="IVirtualBox::version"/> property</td>
2559 </tr>
2560 <tr>
2561 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2562 <td><link to="IMachine::name"/> property of the machine with the
2563 given UUID</td>
2564 </tr>
2565 </table>
2566
2567 Most property names directly correspond to the properties of objects
2568 (components) provided by the VirtualBox library and may be used to
2569 track changes to these properties. However, there may be
2570 pseudo-property names that don't correspond to any existing object's
2571 property directly, as well as there may be object properties that
2572 don't have a corresponding property name that is understood by this
2573 method, and therefore changes to such properties cannot be
2574 tracked. See individual object's property descriptions to get a
2575 fully qualified property name that can be used with this method (if
2576 any).
2577
2578 There is a special property mask @c "*" (i.e. a string consisting of a
2579 single asterisk symbol) that can be used to match all properties.
2580 Below are more examples of property masks:
2581
2582 <table>
2583 <tr>
2584 <td><tt>VirtualBox.*</tt></td>
2585 <td>Track all properties of the VirtualBox object</td>
2586 </tr>
2587 <tr>
2588 <td><tt>Machine.*.name</tt></td>
2589 <td>Track changes to the <link to="IMachine::name"/> property of
2590 all registered virtual machines</td>
2591 </tr>
2592 </table>
2593
2594 <note>
2595 This function is not implemented in the current version of the
2596 product.
2597 </note>
2598 </desc>
2599 <param name="what" type="wstring" dir="in">
2600 <desc>Comma separated list of property masks.</desc>
2601 </param>
2602 <param name="timeout" type="unsigned long" dir="in">
2603 <desc>
2604 Wait timeout in milliseconds.
2605 Specify -1 for an indefinite wait.
2606 </desc>
2607 </param>
2608 <param name="changed" type="wstring" dir="out">
2609 <desc>
2610 Comma separated list of properties that have been changed and caused
2611 this method to return to the caller.
2612 </desc>
2613 </param>
2614 <param name="values" type="wstring" dir="out">
2615 <desc>Reserved, not currently used.</desc>
2616 </param>
2617 </method>
2618
2619 <method name="saveSettings">
2620 <desc>
2621 Saves the global settings to the global settings file
2622 (<link to="#settingsFilePath"/>).
2623
2624 This method is only useful for explicitly saving the global settings
2625 file after it has been auto-converted from the old format to the most
2626 recent format (see <link to="#settingsFileVersion"/> for details).
2627 Normally, the global settings file is implicitly saved when a global
2628 setting is changed.
2629
2630 <result name="VBOX_E_FILE_ERROR">
2631 Settings file not accessible.
2632 </result>
2633 <result name="VBOX_E_XML_ERROR">
2634 Could not parse the settings file.
2635 </result>
2636
2637 </desc>
2638 </method>
2639
2640 <method name="saveSettingsWithBackup">
2641 <desc>
2642 Creates a backup copy of the global settings file
2643 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2644 calls <link to="#saveSettings()"/>.
2645
2646 Note that the backup copy is created <b>only</b> if the settings file
2647 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2648 details). Otherwise, this call is fully equivalent to
2649 <link to="#saveSettings()"/> and no backup copying is done.
2650
2651 The backup copy is created in the same directory where the original
2652 settings file is located. It is given the following file name:
2653 <pre>
2654 original.xml.x.y-platform.bak
2655 </pre>
2656 where <tt>original.xml</tt> is the original settings file name
2657 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2658 format of the settings file (before auto-conversion).
2659
2660 If the given backup file already exists, this method will try to add the
2661 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2662 0 to 9) and copy it again until it succeeds. If all suffixes are
2663 occupied, or if any other copy error occurs, this method will return a
2664 failure.
2665
2666 If the copy operation succeeds, the @a bakFileName return argument will
2667 receive a full path to the created backup file (for informational
2668 purposes). Note that this will happen even if the subsequent
2669 <link to="#saveSettings()"/> call performed by this method after the
2670 copy operation, fails.
2671
2672 <note>
2673 The VirtualBox API never calls this method. It is intended purely for
2674 the purposes of creating backup copies of the settings files by
2675 front-ends before saving the results of the automatically performed
2676 settings conversion to disk.
2677 </note>
2678
2679 <see>settingsFileVersion</see>
2680
2681 <result name="VBOX_E_FILE_ERROR">
2682 Settings file not accessible.
2683 </result>
2684 <result name="VBOX_E_XML_ERROR">
2685 Could not parse the settings file.
2686 </result>
2687 <result name="VBOX_E_IPRT_ERROR">
2688 Could not copy the settings file.
2689 </result>
2690
2691 </desc>
2692 <param name="bakFileName" type="wstring" dir="return">
2693 <desc>Full path to the created backup copy.</desc>
2694 </param>
2695 </method>
2696
2697 </interface>
2698
2699 <!--
2700 // IMachine
2701 /////////////////////////////////////////////////////////////////////////
2702 -->
2703
2704 <enumerator
2705 name="IMachineEnumerator" type="IMachine"
2706 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2707 />
2708
2709 <collection
2710 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2711 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2712 readonly="yes"
2713 />
2714
2715 <interface
2716 name="IInternalMachineControl" extends="$unknown"
2717 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2718 internal="yes"
2719 wsmap="suppress"
2720 >
2721 <method name="updateState">
2722 <desc>
2723 Updates the VM state.
2724 <note>
2725 This operation will also update the settings file with
2726 the correct information about the saved state file
2727 and delete this file from disk when appropriate.
2728 </note>
2729 </desc>
2730 <param name="state" type="MachineState" dir="in"/>
2731 </method>
2732
2733 <method name="getIPCId">
2734 <param name="id" type="wstring" dir="return"/>
2735 </method>
2736
2737 <method name="runUSBDeviceFilters">
2738 <desc>
2739 Asks the server to run USB devices filters of the associated
2740 machine against the given USB device and tell if there is
2741 a match.
2742 <note>
2743 Intended to be used only for remote USB devices. Local
2744 ones don't require to call this method (this is done
2745 implicitly by the Host and USBProxyService).
2746 </note>
2747 </desc>
2748 <param name="device" type="IUSBDevice" dir="in"/>
2749 <param name="matched" type="boolean" dir="out"/>
2750 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2751 </method>
2752
2753 <method name="captureUSBDevice">
2754 <desc>
2755 Requests a capture of the given host USB device.
2756 When the request is completed, the VM process will
2757 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2758 notification.
2759 </desc>
2760 <param name="id" type="uuid" dir="in"/>
2761 </method>
2762
2763 <method name="detachUSBDevice">
2764 <desc>
2765 Notification that a VM is going to detach (done = false) or has
2766 already detached (done = true) the given USB device.
2767 When the done = true request is completed, the VM process will
2768 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2769 notification.
2770 <note>
2771 In the done = true case, the server must run its own filters
2772 and filters of all VMs but this one on the detached device
2773 as if it were just attached to the host computer.
2774 </note>
2775 </desc>
2776 <param name="id" type="uuid" dir="in"/>
2777 <param name="done" type="boolean" dir="in"/>
2778 </method>
2779
2780 <method name="autoCaptureUSBDevices">
2781 <desc>
2782 Requests a capture all matching USB devices attached to the host.
2783 When the request is completed, the VM process will
2784 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2785 notification per every captured device.
2786 </desc>
2787 </method>
2788
2789 <method name="detachAllUSBDevices">
2790 <desc>
2791 Notification that a VM that is being powered down. The done
2792 parameter indicates whether which stage of the power down
2793 we're at. When done = false the VM is announcing its
2794 intentions, while when done = true the VM is reporting
2795 what it has done.
2796 <note>
2797 In the done = true case, the server must run its own filters
2798 and filters of all VMs but this one on all detach devices as
2799 if they were just attached to the host computer.
2800 </note>
2801 </desc>
2802 <param name="done" type="boolean" dir="in"/>
2803 </method>
2804
2805 <method name="onSessionEnd">
2806 <desc>
2807 Triggered by the given session object when the session is about
2808 to close normally.
2809 </desc>
2810 <param name="session" type="ISession" dir="in">
2811 <desc>Session that is being closed</desc>
2812 </param>
2813 <param name="progress" type="IProgress" dir="return">
2814 <desc>
2815 Used to wait until the corresponding machine is actually
2816 dissociated from the given session on the server.
2817 Returned only when this session is a direct one.
2818 </desc>
2819 </param>
2820 </method>
2821
2822 <method name="beginSavingState">
2823 <desc>
2824 Called by the VM process to inform the server it wants to
2825 save the current state and stop the VM execution.
2826 </desc>
2827 <param name="progress" type="IProgress" dir="in">
2828 <desc>
2829 Progress object created by the VM process to wait until
2830 the state is saved.
2831 </desc>
2832 </param>
2833 <param name="stateFilePath" type="wstring" dir="out">
2834 <desc>
2835 File path the VM process must save the execution state to.
2836 </desc>
2837 </param>
2838 </method>
2839
2840 <method name="endSavingState">
2841 <desc>
2842 Called by the VM process to inform the server that saving
2843 the state previously requested by #beginSavingState is either
2844 successfully finished or there was a failure.
2845
2846 <result name="VBOX_E_FILE_ERROR">
2847 Settings file not accessible.
2848 </result>
2849 <result name="VBOX_E_XML_ERROR">
2850 Could not parse the settings file.
2851 </result>
2852
2853 </desc>
2854
2855 <param name="success" type="boolean" dir="in">
2856 <desc><tt>true</tt> to indicate success and <tt>false</tt>
2857 otherwise.
2858 </desc>
2859 </param>
2860 </method>
2861
2862 <method name="adoptSavedState">
2863 <desc>
2864 Gets called by IConsole::adoptSavedState.
2865 <result name="VBOX_E_FILE_ERROR">
2866 Invalid saved state file path.
2867 </result>
2868 </desc>
2869 <param name="savedStateFile" type="wstring" dir="in">
2870 <desc>Path to the saved state file to adopt.</desc>
2871 </param>
2872 </method>
2873
2874 <method name="beginTakingSnapshot">
2875 <desc>
2876 Called by the VM process to inform the server it wants to
2877 take a snapshot.
2878
2879 <result name="VBOX_E_FILE_ERROR">
2880 Settings file not accessible.
2881 </result>
2882 <result name="VBOX_E_XML_ERROR">
2883 Could not parse the settings file.
2884 </result>
2885 </desc>
2886 <param name="initiator" type="IConsole" dir="in">
2887 <desc>The console object that initiated this call.</desc>
2888 </param>
2889 <param name="name" type="wstring" dir="in">
2890 <desc>Snapshot name.</desc>
2891 </param>
2892 <param name="description" type="wstring" dir="in">
2893 <desc>Snapshot description.</desc>
2894 </param>
2895 <param name="progress" type="IProgress" dir="in">
2896 <desc>
2897 Progress object created by the VM process to wait until
2898 the state is saved (only for online snapshots).
2899 </desc>
2900 </param>
2901 <param name="stateFilePath" type="wstring" dir="out">
2902 <desc>
2903 File path the VM process must save the execution state to.
2904 </desc>
2905 </param>
2906 <param name="serverProgress" type="IProgress" dir="out">
2907 <desc>
2908 Progress object created by the server process to wait until
2909 the snapshot is taken (VDI diff creation, etc.).
2910 </desc>
2911 </param>
2912 </method>
2913
2914 <method name="endTakingSnapshot">
2915 <desc>
2916 Called by the VM process to inform the server that the snapshot
2917 previously requested by #beginTakingSnapshot is either
2918 successfully taken or there was a failure.
2919 </desc>
2920
2921 <param name="success" type="boolean" dir="in">
2922 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2923 </param>
2924 </method>
2925
2926 <method name="discardSnapshot">
2927 <desc>
2928 Gets called by IConsole::discardSnapshot.
2929 <result name="VBOX_E_INVALID_OBJECT_STATE">
2930 Snapshot has more than one child snapshot.
2931 </result>
2932 </desc>
2933 <param name="initiator" type="IConsole" dir="in">
2934 <desc>The console object that initiated this call.</desc>
2935 </param>
2936 <param name="id" type="uuid" dir="in">
2937 <desc>UUID of the snapshot to discard.</desc>
2938 </param>
2939 <param name="machineState" type="MachineState" dir="out">
2940 <desc>New machine state after this operation is started.</desc>
2941 </param>
2942 <param name="progress" type="IProgress" dir="return">
2943 <desc>Progress object to track the operation completion.</desc>
2944 </param>
2945 </method>
2946
2947 <method name="discardCurrentState">
2948 <desc>
2949 Gets called by IConsole::discardCurrentState.
2950 <result name="VBOX_E_INVALID_OBJECT_STATE">
2951 Virtual machine does not have any snapshot.
2952 </result>
2953 </desc>
2954 <param name="initiator" type="IConsole" dir="in">
2955 <desc>The console object that initiated this call.</desc>
2956 </param>
2957 <param name="machineState" type="MachineState" dir="out">
2958 <desc>New machine state after this operation is started.</desc>
2959 </param>
2960 <param name="progress" type="IProgress" dir="return">
2961 <desc>Progress object to track the operation completion.</desc>
2962 </param>
2963 </method>
2964
2965 <method name="discardCurrentSnapshotAndState">
2966 <desc>
2967 Gets called by IConsole::discardCurrentSnapshotAndState.
2968 <result name="VBOX_E_INVALID_OBJECT_STATE">
2969 Virtual machine does not have any snapshot.
2970 </result>
2971 </desc>
2972 <param name="initiator" type="IConsole" dir="in">
2973 <desc>The console object that initiated this call.</desc>
2974 </param>
2975 <param name="machineState" type="MachineState" dir="out">
2976 <desc>New machine state after this operation is started.</desc>
2977 </param>
2978 <param name="progress" type="IProgress" dir="return">
2979 <desc>Progress object to track the operation completion.</desc>
2980 </param>
2981 </method>
2982
2983 <method name="pullGuestProperties">
2984 <desc>
2985 Get the list of the guest properties matching a set of patterns along
2986 with their values, time stamps and flags and give responsibility for
2987 managing properties to the console.
2988 </desc>
2989 <param name="name" type="wstring" dir="out" safearray="yes">
2990 <desc>
2991 The names of the properties returned.
2992 </desc>
2993 </param>
2994 <param name="value" type="wstring" dir="out" safearray="yes">
2995 <desc>
2996 The values of the properties returned. The array entries match the
2997 corresponding entries in the @a name array.
2998 </desc>
2999 </param>
3000 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3001 <desc>
3002 The time stamps of the properties returned. The array entries match
3003 the corresponding entries in the @a name array.
3004 </desc>
3005 </param>
3006 <param name="flags" type="wstring" dir="out" safearray="yes">
3007 <desc>
3008 The flags of the properties returned. The array entries match the
3009 corresponding entries in the @a name array.
3010 </desc>
3011 </param>
3012 </method>
3013
3014 <method name="pushGuestProperties">
3015 <desc>
3016 Set the list of the guest properties matching a set of patterns along
3017 with their values, time stamps and flags and return responsibility for
3018 managing properties to IMachine.
3019 </desc>
3020 <param name="name" type="wstring" dir="in" safearray="yes">
3021 <desc>
3022 The names of the properties.
3023 </desc>
3024 </param>
3025 <param name="value" type="wstring" dir="in" safearray="yes">
3026 <desc>
3027 The values of the properties. The array entries match the
3028 corresponding entries in the @a name array.
3029 </desc>
3030 </param>
3031 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3032 <desc>
3033 The time stamps of the properties. The array entries match
3034 the corresponding entries in the @a name array.
3035 </desc>
3036 </param>
3037 <param name="flags" type="wstring" dir="in" safearray="yes">
3038 <desc>
3039 The flags of the properties. The array entries match the
3040 corresponding entries in the @a name array.
3041 </desc>
3042 </param>
3043 </method>
3044 <method name="pushGuestProperty">
3045 <desc>
3046 Update a single guest property in IMachine.
3047 </desc>
3048 <param name="name" type="wstring" dir="in">
3049 <desc>
3050 The name of the property to be updated.
3051 </desc>
3052 </param>
3053 <param name="value" type="wstring" dir="in">
3054 <desc>
3055 The value of the property.
3056 </desc>
3057 </param>
3058 <param name="timestamp" type="unsigned long long" dir="in">
3059 <desc>
3060 The timestamp of the property.
3061 </desc>
3062 </param>
3063 <param name="flags" type="wstring" dir="in">
3064 <desc>
3065 The flags of the property.
3066 </desc>
3067 </param>
3068 </method>
3069 </interface>
3070
3071 <interface
3072 name="IBIOSSettings" extends="$unknown"
3073 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3074 wsmap="managed"
3075 >
3076 <desc>
3077 The IBIOSSettings interface represents BIOS settings of the virtual
3078 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3079 </desc>
3080 <attribute name="logoFadeIn" type="boolean">
3081 <desc>Fade in flag for BIOS logo animation.</desc>
3082 </attribute>
3083
3084 <attribute name="logoFadeOut" type="boolean">
3085 <desc>Fade out flag for BIOS logo animation.</desc>
3086 </attribute>
3087
3088 <attribute name="logoDisplayTime" type="unsigned long">
3089 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3090 </attribute>
3091
3092 <attribute name="logoImagePath" type="wstring">
3093 <desc>Local file system path for external BIOS image.</desc>
3094 </attribute>
3095
3096 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3097 <desc>Mode of the BIOS boot device menu.</desc>
3098 </attribute>
3099
3100 <attribute name="ACPIEnabled" type="boolean">
3101 <desc>ACPI support flag.</desc>
3102 </attribute>
3103
3104 <attribute name="IOAPICEnabled" type="boolean">
3105 <desc>
3106 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3107 and support IRQs above 15.
3108 </desc>
3109 </attribute>
3110
3111 <attribute name="timeOffset" type="long long">
3112 <desc>
3113 Offset in milliseconds from the host system time. This allows for
3114 guests running with a different system date/time than the host.
3115 It is equivalent to setting the system date/time in the BIOS except
3116 it is not an absolute value but a relative one. Guest Additions
3117 time synchronization honors this offset.
3118 </desc>
3119 </attribute>
3120
3121 <attribute name="PXEDebugEnabled" type="boolean">
3122 <desc>
3123 PXE debug logging flag. If set, VirtualBox will write extensive
3124 PXE trace information to the release log.
3125 </desc>
3126 </attribute>
3127
3128 <attribute name="IDEControllerType" type="IDEControllerType">
3129 <desc>
3130 Type of the virtual IDE controller. Depending on this value,
3131 VirtualBox will provide different virtual IDE hardware
3132 devices to the guest.
3133 </desc>
3134 </attribute>
3135
3136 </interface>
3137
3138 <interface
3139 name="IMachine" extends="$unknown"
3140 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3141 wsmap="managed"
3142 >
3143 <desc>
3144 The IMachine interface represents a virtual machine, or guest, created
3145 in VirtualBox.
3146
3147 This interface is used in two contexts. First of all, a collection of
3148 objects implementing this interface is stored in the
3149 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3150 machines that are currently registered with this VirtualBox
3151 installation. Also, once a session has been opened for the given virtual
3152 machine (e.g. the virtual machine is running), the machine object
3153 associated with the open session can be queried from the session object;
3154 see <link to="ISession"/> for details.
3155
3156 The main role of this interface is to expose the settings of the virtual
3157 machine and provide methods to change various aspects of the virtual
3158 machine's configuration. For machine objects stored in the
3159 <link to="IVirtualBox::machines2"/> collection, all attributes are
3160 read-only unless explicitly stated otherwise in individual attribute
3161 and method descriptions. In order to change a machine setting, a session
3162 for this machine must be opened using one of
3163 <link to="IVirtualBox::openSession"/>,
3164 <link to="IVirtualBox::openRemoteSession"/> or
3165 <link to="IVirtualBox::openExistingSession"/> methods. After the
3166 session has been successfully opened, a mutable machine object needs to
3167 be queried from the session object and then the desired settings changes
3168 can be applied to the returned object using IMachine attributes and
3169 methods. See the ISession interface description for more information
3170 about sessions.
3171
3172 Note that the IMachine interface does not provide methods to control
3173 virtual machine execution (such as start the machine, or power it
3174 down) -- these methods are grouped in a separate IConsole
3175 interface. Refer to the IConsole interface description to get more
3176 information about this topic.
3177
3178 <see>ISession, IConsole</see>
3179 </desc>
3180
3181 <attribute name="parent" type="IVirtualBox" readonly="yes">
3182 <desc>Associated parent object.</desc>
3183 </attribute>
3184
3185 <attribute name="accessible" type="boolean" readonly="yes">
3186 <desc>
3187 Whether this virtual machine is currently accessible or not.
3188
3189 The machine is considered to be inaccessible when:
3190 <ul>
3191 <li>It is a registered virtual machine, and
3192 </li>
3193 <li>Its settings file is inaccessible (for example, it is
3194 located on a network share that is not accessible during
3195 VirtualBox startup, or becomes inaccessible later, or if
3196 the settings file can be read but is invalid).
3197 </li>
3198 </ul>
3199
3200 Otherwise, the value of this property is always <tt>true</tt>.
3201
3202 Every time this property is read, the accessibility state of
3203 this machine is re-evaluated. If the returned value is |false|,
3204 the <link to="#accessError"/> property may be used to get the
3205 detailed error information describing the reason of
3206 inaccessibility.
3207
3208 When the machine is inaccessible, only the following properties
3209 can be used on it:
3210 <ul>
3211 <li><link to="#parent"/></li>
3212 <li><link to="#id"/></li>
3213 <li><link to="#settingsFilePath"/></li>
3214 <li><link to="#accessible"/></li>
3215 <li><link to="#accessError"/></li>
3216 </ul>
3217
3218 An attempt to access any other property or method will return
3219 an error.
3220
3221 The only possible action you can perform on an inaccessible
3222 machine is to unregister it using the
3223 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3224 for the accessibility state once more by querying this
3225 property).
3226
3227 <note>
3228 In the current implementation, once this property returns
3229 <tt>true</tt>, the machine will never become inaccessible
3230 later, even if its settings file cannot be successfully
3231 read/written any more (at least, until the VirtualBox
3232 server is restarted). This limitation may be removed in
3233 future releases.
3234 </note>
3235 </desc>
3236 </attribute>
3237
3238 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3239 <desc>
3240 Error information describing the reason of machine
3241 inaccessibility.
3242
3243 Reading this property is only valid after the last call to
3244 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3245 machine is currently unaccessible). Otherwise, a null
3246 IVirtualBoxErrorInfo object will be returned.
3247 </desc>
3248 </attribute>
3249
3250 <attribute name="name" type="wstring">
3251 <desc>
3252 Name of the virtual machine.
3253
3254 Besides being used for human-readable identification purposes
3255 everywhere in VirtualBox, the virtual machine name is also used
3256 as a name of the machine's settings file and as a name of the
3257 subdirectory this settings file resides in. Thus, every time you
3258 change the value of this property, the settings file will be
3259 renamed once you call <link to="#saveSettings()"/> to confirm the
3260 change. The containing subdirectory will be also renamed, but
3261 only if it has exactly the same name as the settings file
3262 itself prior to changing this property (for backward compatibility
3263 with previous API releases). The above implies the following
3264 limitations:
3265 <ul>
3266 <li>The machine name cannot be empty.</li>
3267 <li>The machine name can contain only characters that are valid
3268 file name characters according to the rules of the file
3269 system used to store VirtualBox configuration.</li>
3270 <li>You cannot have two or more machines with the same name
3271 if they use the same subdirectory for storing the machine
3272 settings files.</li>
3273 <li>You cannot change the name of the machine if it is running,
3274 or if any file in the directory containing the settings file
3275 is being used by another running machine or by any other
3276 process in the host operating system at a time when
3277 <link to="#saveSettings()"/> is called.
3278 </li>
3279 </ul>
3280 If any of the above limitations are hit, <link to="#saveSettings()"/>
3281 will return an appropriate error message explaining the exact
3282 reason and the changes you made to this machine will not be
3283 saved.
3284 <note>
3285 For "legacy" machines created using the
3286 <link to="IVirtualBox::createLegacyMachine()"/> call,
3287 the above naming limitations do not apply because the
3288 machine name does not affect the settings file name.
3289 The settings file name remains the same as it was specified
3290 during machine creation and never changes.
3291 </note>
3292 </desc>
3293 </attribute>
3294
3295 <attribute name="description" type="wstring">
3296 <desc>
3297 Description of the virtual machine.
3298
3299 The description attribute can contain any text and is
3300 typically used to describe the hardware and software
3301 configuration of the virtual machine in detail (i.e. network
3302 settings, versions of the installed software and so on).
3303 </desc>
3304 </attribute>
3305
3306 <attribute name="id" type="uuid" readonly="yes">
3307 <desc>UUID of the virtual machine.</desc>
3308 </attribute>
3309
3310 <attribute name="OSTypeId" type="wstring">
3311 <desc>
3312 User-defined identifier of the Guest OS type.
3313 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3314 an IGuestOSType object representing details about the given
3315 Guest OS type.
3316 <note>
3317 This value may differ from the value returned by
3318 <link to="IGuest::OSTypeId"/> if Guest Additions are
3319 installed to the guest OS.
3320 </note>
3321 </desc>
3322 </attribute>
3323
3324 <attribute name="HardwareVersion" type="wstring">
3325 <desc>Hardware version identifier. Internal use only for now.</desc>
3326 </attribute>
3327
3328 <attribute name="CPUCount" type="unsigned long">
3329 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3330 </attribute>
3331
3332 <attribute name="memorySize" type="unsigned long">
3333 <desc>System memory size in megabytes.</desc>
3334 </attribute>
3335
3336 <attribute name="memoryBalloonSize" type="unsigned long">
3337 <desc>Initial memory balloon size in megabytes.</desc>
3338 </attribute>
3339
3340 <attribute name="statisticsUpdateInterval" type="unsigned long">
3341 <desc>Initial interval to update guest statistics in seconds.</desc>
3342 </attribute>
3343
3344 <attribute name="VRAMSize" type="unsigned long">
3345 <desc>Video memory size in megabytes.</desc>
3346 </attribute>
3347
3348 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3349 <desc>
3350 This setting determines whether VirtualBox allows guests to make use
3351 of the 3D graphics support available on the host. Currently limited
3352 to OpenGL only. </desc>
3353 </attribute>
3354
3355 <attribute name="monitorCount" type="unsigned long">
3356 <desc>
3357 Number of virtual monitors.
3358 <note>
3359 Only effective on Windows XP and later guests with
3360 Guest Additions installed.
3361 </note>
3362 </desc>
3363 </attribute>
3364
3365 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3366 <desc>Object containing all BIOS settings.</desc>
3367 </attribute>
3368
3369 <attribute name="HWVirtExEnabled" type="TSBool">
3370 <desc>
3371 This setting determines whether VirtualBox will try to make use of
3372 the host CPU's hardware virtualization extensions such as Intel VT-x
3373 and AMD-V. Note that in case such extensions are not available,
3374 they will not be used.
3375 </desc>
3376 </attribute>
3377
3378 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3379 <desc>
3380 This setting determines whether VirtualBox will try to make use of
3381 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3382 such extensions are not available, they will not be used.
3383 </desc>
3384 </attribute>
3385
3386 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3387 <desc>
3388 This setting determines whether VirtualBox will try to make use of
3389 the VPID extension of Intel VT-x. Note that in case such extensions are
3390 not available, they will not be used.
3391 </desc>
3392 </attribute>
3393
3394 <attribute name="PAEEnabled" type="boolean" default="false">
3395 <desc>
3396 This setting determines whether VirtualBox will expose the Physical Address
3397 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3398 is not available, it will not be reported.
3399 </desc>
3400 </attribute>
3401
3402 <attribute name="snapshotFolder" type="wstring">
3403 <desc>
3404 Full path to the directory used to store snapshot data
3405 (differencing hard disks and saved state files) of this machine.
3406
3407 The initial value of this property is
3408 <tt>&lt;</tt><link to="#settingsFilePath">
3409 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3410 <link to="#id">machine_uuid</link>
3411 <tt>&gt;</tt>.
3412
3413 Currently, it is an error to try to change this property on
3414 a machine that has snapshots (because this would require to
3415 move possibly large files to a different location).
3416 A separate method will be available for this purpose later.
3417
3418 <note>
3419 Setting this property to <tt>null</tt> will restore the
3420 initial value.
3421 </note>
3422 <note>
3423 When setting this property, the specified path can be
3424 absolute (full path) or relative to the directory where the
3425 <link to="#settingsFilePath">machine settings file</link>
3426 is located. When reading this property, a full path is
3427 always returned.
3428 </note>
3429 <note>
3430 The specified path may not exist, it will be created
3431 when necessary.
3432 </note>
3433 </desc>
3434 </attribute>
3435
3436 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3437 <desc>VRDP server object.</desc>
3438 </attribute>
3439
3440 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3441 <desc>Array of hard disks attached to this machine.</desc>
3442 </attribute>
3443
3444 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3445 <desc>Associated DVD drive object.</desc>
3446 </attribute>
3447
3448 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3449 <desc>Associated floppy drive object.</desc>
3450 </attribute>
3451
3452 <attribute name="USBController" type="IUSBController" readonly="yes">
3453 <desc>
3454 Associated USB controller object.
3455
3456 <note>
3457 This method may set a @ref com_warnings "warning result code".
3458 </note>
3459 <note>
3460 If USB functionality is not available in the given edition of
3461 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3462 </note>
3463 </desc>
3464 </attribute>
3465
3466 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3467 <desc>Associated audio adapter, always present.</desc>
3468 </attribute>
3469
3470 <attribute name="SATAController" type="ISATAController" readonly="yes">
3471 <desc>
3472 Associated SATA controller object.
3473 </desc>
3474 </attribute>
3475
3476 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3477 <desc>
3478 Full name of the file containing machine settings data.
3479 </desc>
3480 </attribute>
3481
3482 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3483 <desc>
3484 Current version of the format of the settings file of this machine
3485 (<link to="#settingsFilePath"/>).
3486
3487 The version string has the following format:
3488 <pre>
3489 x.y-platform
3490 </pre>
3491 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3492 versions, and <tt>platform</tt> is the platform identifier.
3493
3494 The current version usually matches the value of the
3495 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3496 settings file was created by an older version of VirtualBox and there
3497 was a change of the settings file format since then.
3498
3499 Note that VirtualBox automatically converts settings files from older
3500 versions to the most recent version when reading them (usually at
3501 VirtualBox startup) but it doesn't save the changes back until
3502 you call a method that implicitly saves settings (such as
3503 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3504 explicitly. Therefore, if the value of this attribute differs from the
3505 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3506 means that the settings file was converted but the result of the
3507 conversion is not yet saved to disk.
3508
3509 The above feature may be used by interactive front-ends to inform users
3510 about the settings file format change and offer them to explicitly save
3511 all converted settings files (the global and VM-specific ones),
3512 optionally create backup copies of the old settings files before saving,
3513 etc.
3514
3515 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3516 </desc>
3517 </attribute>
3518
3519 <attribute name="settingsModified" type="boolean" readonly="yes">
3520 <desc>
3521 Whether the settings of this machine have been modified
3522 (but neither yet saved nor discarded).
3523 <note>
3524 Reading this property is only valid on instances returned
3525 by <link to="ISession::machine"/> and on new machines
3526 created by <link to="IVirtualBox::createMachine"/> or opened
3527 by <link to="IVirtualBox::openMachine"/> but not
3528 yet registered, or on unregistered machines after calling
3529 <link to="IVirtualBox::unregisterMachine"/>. For all other
3530 cases, the settings can never be modified.
3531 </note>
3532 <note>
3533 For newly created unregistered machines, the value of this
3534 property is always TRUE until <link to="#saveSettings()"/>
3535 is called (no matter if any machine settings have been
3536 changed after the creation or not). For opened machines
3537 the value is set to FALSE (and then follows to normal rules).
3538 </note>
3539 </desc>
3540 </attribute>
3541
3542 <attribute name="sessionState" type="SessionState" readonly="yes">
3543 <desc>Current session state for this machine.</desc>
3544 </attribute>
3545
3546 <attribute name="sessionType" type="wstring" readonly="yes">
3547 <desc>
3548 Type of the session. If <link to="#sessionState"/> is
3549 SessionSpawning or SessionOpen, this attribute contains the
3550 same value as passed to the
3551 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3552 type parameter. If the session was opened directly using
3553 <link to="IVirtualBox::openSession()"/>, or if
3554 <link to="#sessionState"/> is SessionClosed, the value of this
3555 attribute is @c null.
3556 </desc>
3557 </attribute>
3558
3559 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3560 <desc>
3561 Identifier of the session process. This attribute contains the
3562 platform-dependent identifier of the process that has opened a
3563 direct session for this machine using the
3564 <link to="IVirtualBox::openSession()"/> call. The returned value
3565 is only valid if <link to="#sessionState"/> is SessionOpen or
3566 SessionClosing (i.e. a session is currently open or being
3567 closed) by the time this property is read.
3568 </desc>
3569 </attribute>
3570
3571 <attribute name="state" type="MachineState" readonly="yes">
3572 <desc>Current execution state of this machine.</desc>
3573 </attribute>
3574
3575 <attribute name="lastStateChange" type="long long" readonly="yes">
3576 <desc>
3577 Time stamp of the last execution state change,
3578 in milliseconds since 1970-01-01 UTC.
3579 </desc>
3580 </attribute>
3581
3582 <attribute name="stateFilePath" type="wstring" readonly="yes">
3583 <desc>
3584 Full path to the file that stores the execution state of
3585 the machine when it is in the <link to="MachineState_Saved"/> state.
3586 <note>
3587 When the machine is not in the Saved state, this attribute
3588 <tt>null</tt>.
3589 </note>
3590 </desc>
3591 </attribute>
3592
3593 <attribute name="logFolder" type="wstring" readonly="yes">
3594 <desc>
3595 Full path to the folder that stores a set of rotated log files
3596 recorded during machine execution. The most recent log file is
3597 named <tt>VBox.log</tt>, the previous log file is
3598 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3599 in the current version).
3600 </desc>
3601 </attribute>
3602
3603 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3604 <desc>
3605 Current snapshot of this machine.
3606 <note>
3607 A <tt>null</tt> object is returned if the machine doesn't
3608 have snapshots.
3609 </note>
3610 <see><link to="ISnapshot"/></see>
3611 </desc>
3612 </attribute>
3613
3614 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3615 <desc>
3616 Number of snapshots taken on this machine. Zero means the
3617 machine doesn't have any snapshots.
3618 </desc>
3619 </attribute>
3620
3621 <attribute name="currentStateModified" type="boolean" readonly="yes">
3622 <desc>
3623 Returns <tt>true</tt> if the current state of the machine is not
3624 identical to the state stored in the current snapshot.
3625
3626 The current state is identical to the current snapshot right
3627 after one of the following calls are made:
3628 <ul>
3629 <li><link to="IConsole::discardCurrentState"/> or
3630 <link to="IConsole::discardCurrentSnapshotAndState"/>
3631 </li>
3632 <li><link to="IConsole::takeSnapshot"/> (issued on a
3633 powered off or saved machine, for which
3634 <link to="#settingsModified"/> returns <tt>false</tt>)
3635 </li>
3636 <li><link to="IMachine::setCurrentSnapshot"/>
3637 </li>
3638 </ul>
3639
3640 The current state remains identical until one of the following
3641 happens:
3642 <ul>
3643 <li>settings of the machine are changed</li>
3644 <li>the saved state is discarded</li>
3645 <li>the current snapshot is discarded</li>
3646 <li>an attempt to execute the machine is made</li>
3647 </ul>
3648
3649 <note>
3650 For machines that don't have snapshots, this property is
3651 always <tt>false</tt>.
3652 </note>
3653 </desc>
3654 </attribute>
3655
3656 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3657 <desc>
3658 Collection of shared folders for this machine (permanent shared
3659 folders). These folders are shared automatically at machine startup
3660 and available only to the guest OS installed within this machine.
3661
3662 New shared folders are added to the collection using
3663 <link to="#createSharedFolder"/>. Existing shared folders can be
3664 removed using <link to="#removeSharedFolder"/>.
3665 </desc>
3666 </attribute>
3667
3668 <attribute name="clipboardMode" type="ClipboardMode">
3669 <desc>
3670 Synchronization mode between the host OS clipboard
3671 and the guest OS clipboard.
3672 </desc>
3673 </attribute>
3674
3675 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3676 <desc>
3677 A comma-separated list of simple glob patterns. Changes to guest
3678 properties whose name matches one of the patterns will generate an
3679 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3680 </desc>
3681 </attribute>
3682
3683 <method name="setBootOrder">
3684 <desc>
3685 Puts the given device to the specified position in
3686 the boot order.
3687
3688 To indicate that no device is associated with the given position,
3689 <link to="DeviceType_Null"/> should be used.
3690
3691 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3692
3693 <result name="E_INVALIDARG">
3694 Boot @a position out of range.
3695 </result>
3696 <result name="E_NOTIMPL">
3697 Booting from USB @a device currently not supported.
3698 </result>
3699
3700 </desc>
3701 <param name="position" type="unsigned long" dir="in">
3702 <desc>
3703 Position in the boot order (<tt>1</tt> to the total number of
3704 devices the machine can boot from, as returned by
3705 <link to="ISystemProperties::maxBootPosition"/>).
3706 </desc>
3707 </param>
3708 <param name="device" type="DeviceType" dir="in">
3709 <desc>
3710 The type of the device used to boot at the given position.
3711 </desc>
3712 </param>
3713 </method>
3714
3715 <method name="getBootOrder" const="yes">
3716 <desc>
3717 Returns the device type that occupies the specified
3718 position in the boot order.
3719
3720 @todo [remove?]
3721 If the machine can have more than one device of the returned type
3722 (such as hard disks), then a separate method should be used to
3723 retrieve the individual device that occupies the given position.
3724
3725 If here are no devices at the given position, then
3726 <link to="DeviceType_Null"/> is returned.
3727
3728 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3729
3730 <result name="E_INVALIDARG">
3731 Boot @a position out of range.
3732 </result>
3733
3734 </desc>
3735 <param name="position" type="unsigned long" dir="in">
3736 <desc>
3737 Position in the boot order (<tt>1</tt> to the total number of
3738 devices the machine can boot from, as returned by
3739 <link to="ISystemProperties::maxBootPosition"/>).
3740 </desc>
3741 </param>
3742 <param name="device" type="DeviceType" dir="return">
3743 <desc>
3744 Device at the given position.
3745 </desc>
3746 </param>
3747 </method>
3748
3749 <method name="attachHardDisk2">
3750 <desc>
3751 Attaches a virtual hard disk identified by the given UUID @a id
3752 to a device slot of the specified bus.
3753
3754 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3755 specify the primary or secondary IDE controller, respectively. The
3756 SATA bus supports 30 channels, so this parameter can be a number
3757 ranging from @c 0 to @c 29.
3758
3759 For the primary controller of the IDE bus, the @a device number can be
3760 either @c 0 or @c 1, to specify the master or the slave device,
3761 respectively. For the secondary IDE controller, the device number is
3762 always @c 1 because the master device is reserved for the CD-ROM drive.
3763
3764 For the SATA bus, the @a device parameter is currently unused and
3765 must be @c 0.
3766
3767 The specified device slot must not have another disk attached to it, or
3768 this method will fail.
3769
3770 See <link to="IHardDisk2"/> for more detailed information about
3771 attaching hard disks.
3772
3773 <note>
3774 You cannot attach a hard disk to a running machine. Also, you cannot
3775 attach a hard disk to a newly created machine until this machine's
3776 settings are saved to disk using <link to="#saveSettings()"/>.
3777 </note>
3778 <note>
3779 If the hard disk is being attached indirectly, a new differencing hard
3780 disk will implicitly be created for it and attached instead. If the
3781 changes made to the machine settings (including this indirect
3782 attachment) are later cancelled using <link to="#discardSettings()"/>,
3783 this implicitly created differencing hard disk will implicitly
3784 be deleted.
3785 </note>
3786
3787 <result name="E_INVALIDARG">
3788 SATA device, SATA channel, IDE channel or IDE slot out of range.
3789 </result>
3790 <result name="VBOX_E_INVALID_OBJECT_STATE">
3791 Attempt to attach hard disk to an unregistered virtual machine.
3792 </result>
3793 <result name="VBOX_E_INVALID_VM_STATE">
3794 Invalid machine state.
3795 </result>
3796 <result name="VBOX_E_OBJECT_IN_USE">
3797 Hard disk already attached to this or another virtual machine.
3798 </result>
3799
3800 </desc>
3801 <param name="id" type="uuid" dir="in">
3802 <desc>UUID of the hard disk to attach.</desc>
3803 </param>
3804 <param name="bus" type="StorageBus" dir="in">
3805 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3806 </param>
3807 <param name="channel" type="long" dir="in">
3808 <desc>Channel to attach the hard disk to.</desc>
3809 </param>
3810 <param name="device" type="long" dir="in">
3811 <desc>
3812 Device slot in the given channel to attach the hard disk to.
3813 </desc>
3814 </param>
3815 </method>
3816
3817 <method name="getHardDisk2" const="yes">
3818 <desc>
3819 Returns the virtual hard disk attached to a device slot of the specified
3820 bus.
3821
3822 Note that if the hard disk was indirectly attached by
3823 <link to="#attachHardDisk2()"/> to the given device slot then this
3824 method will return not the same object as passed to the
3825 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3826 more detailed information about attaching hard disks.
3827
3828 <result name="VBOX_E_OBJECT_NOT_FOUND">
3829 No hard disk attached to given slot/bus.
3830 </result>
3831
3832 </desc>
3833 <param name="bus" type="StorageBus" dir="in">
3834 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3835 </param>
3836 <param name="channel" type="long" dir="in">
3837 <desc>Channel to query.</desc>
3838 </param>
3839 <param name="device" type="long" dir="in">
3840 <desc>Device slot in the given channel to query.</desc>
3841 </param>
3842 <param name="hardDisk" type="IHardDisk2" dir="return">
3843 <desc>Attached hard disk object.</desc>
3844 </param>
3845 </method>
3846
3847 <method name="detachHardDisk2">
3848 <desc>
3849 Detaches the virtual hard disk attached to a device slot of the
3850 specified bus.
3851
3852 Detaching the hard disk from the virtual machine is deferred. This means
3853 that the hard disk remains associated with the machine when this method
3854 returns and gets actually de-associated only after a successful
3855 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3856 for more detailed information about attaching hard disks.
3857
3858 <note>
3859 You cannot detach the hard disk from a running machine.
3860 </note>
3861 <note>
3862 Detaching differencing hard disks implicitly created by <link
3863 to="#attachHardDisk2()"/> for the indirect attachment using this
3864 method will <b>not</b> implicitly delete them. The
3865 <link to="IHardDisk2::deleteStorage()"/> operation should be
3866 explicitly performed by the caller after the hard disk is successfully
3867 detached and the settings are saved with
3868 <link to="#saveSettings()"/>, if it is the desired action.
3869 </note>
3870
3871 <result name="VBOX_E_INVALID_VM_STATE">
3872 Attempt to detach hard disk from a running virtual machine.
3873 </result>
3874 <result name="VBOX_E_OBJECT_NOT_FOUND">
3875 No hard disk attached to given slot/bus.
3876 </result>
3877 <result name="VBOX_E_NOT_SUPPORTED">
3878 Hard disk format does not support storage deletion.
3879 </result>
3880
3881 </desc>
3882 <param name="bus" type="StorageBus" dir="in">
3883 <desc>Bus to detach the hard disk from.</desc>
3884 </param>
3885 <param name="channel" type="long" dir="in">
3886 <desc>Channel number to detach the hard disk from.</desc>
3887 </param>
3888 <param name="device" type="long" dir="in">
3889 <desc>Device slot number to detach the hard disk from.</desc>
3890 </param>
3891 </method>
3892
3893 <method name="getNetworkAdapter" const="yes">
3894 <desc>
3895 Returns the network adapter associated with the given slot.
3896 Slots are numbered sequentially, starting with zero. The total
3897 number of adapters per machine is defined by the
3898 <link to="ISystemProperties::networkAdapterCount"/> property,
3899 so the maximum slot number is one less than that property's value.
3900
3901 <result name="E_INVALIDARG">
3902 Invalid @a slot number.
3903 </result>
3904
3905 </desc>
3906 <param name="slot" type="unsigned long" dir="in"/>
3907 <param name="adapter" type="INetworkAdapter" dir="return"/>
3908 </method>
3909
3910 <method name="getSerialPort" const="yes">
3911 <desc>
3912 Returns the serial port associated with the given slot.
3913 Slots are numbered sequentially, starting with zero. The total
3914 number of serial ports per machine is defined by the
3915 <link to="ISystemProperties::serialPortCount"/> property,
3916 so the maximum slot number is one less than that property's value.
3917
3918 <result name="E_INVALIDARG">
3919 Invalid @a slot number.
3920 </result>
3921
3922 </desc>
3923 <param name="slot" type="unsigned long" dir="in"/>
3924 <param name="port" type="ISerialPort" dir="return"/>
3925 </method>
3926
3927 <method name="getParallelPort" const="yes">
3928 <desc>
3929 Returns the parallel port associated with the given slot.
3930 Slots are numbered sequentially, starting with zero. The total
3931 number of parallel ports per machine is defined by the
3932 <link to="ISystemProperties::parallelPortCount"/> property,
3933 so the maximum slot number is one less than that property's value.
3934
3935 <result name="E_INVALIDARG">
3936 Invalid @a slot number.
3937 </result>
3938
3939 </desc>
3940 <param name="slot" type="unsigned long" dir="in"/>
3941 <param name="port" type="IParallelPort" dir="return"/>
3942 </method>
3943
3944 <method name="getNextExtraDataKey">
3945 <desc>
3946 Returns the machine-specific extra data key name following the
3947 supplied key.
3948
3949 An error is returned if the supplied @a key does not exist. @c NULL is
3950 returned in @a nextKey if the supplied key is the last key. When
3951 supplying @c NULL for the @a key, the first key item is returned in @a
3952 nextKey (if there is any). @a nextValue is an optional parameter and
3953 if supplied, the next key's value is returned in it.
3954
3955 <result name="VBOX_E_OBJECT_NOT_FOUND">
3956 Extra data @a key not found.
3957 </result>
3958
3959 </desc>
3960 <param name="key" type="wstring" dir="in">
3961 <desc>Name of the data key to follow.</desc>
3962 </param>
3963 <param name="nextKey" type="wstring" dir="out">
3964 <desc>Name of the next data key.</desc>
3965 </param>
3966 <param name="nextValue" type="wstring" dir="out">
3967 <desc>Value of the next data key.</desc>
3968 </param>
3969 </method>
3970
3971 <method name="getExtraData">
3972 <desc>
3973 Returns associated machine-specific extra data.
3974
3975 If the requested data @a key does not exist, this function will
3976 succeed and return @c NULL in the @a value argument.
3977
3978 <result name="VBOX_E_FILE_ERROR">
3979 Settings file not accessible.
3980 </result>
3981 <result name="VBOX_E_XML_ERROR">
3982 Could not parse the settings file.
3983 </result>
3984
3985 </desc>
3986 <param name="key" type="wstring" dir="in">
3987 <desc>Name of the data key to get.</desc>
3988 </param>
3989 <param name="value" type="wstring" dir="return">
3990 <desc>Value of the requested data key.</desc>
3991 </param>
3992 </method>
3993
3994 <method name="setExtraData">
3995 <desc>
3996 Sets associated machine-specific extra data.
3997
3998 If you pass @c NULL as a key @a value, the given @a key will be
3999 deleted.
4000
4001 <note>
4002 Before performing the actual data change, this method will ask all
4003 registered callbacks using the
4004 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
4005 notification for a permission. If one of the callbacks refuses the
4006 new value, the change will not be performed.
4007 </note>
4008 <note>
4009 On success, the
4010 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4011 is called to inform all registered callbacks about a successful data
4012 change.
4013 </note>
4014 <note>
4015 This method can be called outside the machine session and therefore
4016 it's a caller's responsibility to handle possible race conditions
4017 when several clients change the same key at the same time.
4018 </note>
4019
4020 <result name="VBOX_E_FILE_ERROR">
4021 Settings file not accessible.
4022 </result>
4023 <result name="VBOX_E_XML_ERROR">
4024 Could not parse the settings file.
4025 </result>
4026
4027 </desc>
4028 <param name="key" type="wstring" dir="in">
4029 <desc>Name of the data key to set.</desc>
4030 </param>
4031 <param name="value" type="wstring" dir="in">
4032 <desc>Value to assign to the key.</desc>
4033 </param>
4034 </method>
4035
4036 <method name="saveSettings">
4037 <desc>
4038 Saves any changes to machine settings made since the session
4039 has been opened or a new machine has been created, or since the
4040 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4041 For registered machines, new settings become visible to all
4042 other VirtualBox clients after successful invocation of this
4043 method.
4044 <note>
4045 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4046 notification event after the configuration has been successfully
4047 saved (only for registered machines).
4048 </note>
4049 <note>
4050 Calling this method is only valid on instances returned
4051 by <link to="ISession::machine"/> and on new machines
4052 created by <link to="IVirtualBox::createMachine"/> but not
4053 yet registered, or on unregistered machines after calling
4054 <link to="IVirtualBox::unregisterMachine"/>.
4055 </note>
4056
4057 <result name="VBOX_E_FILE_ERROR">
4058 Settings file not accessible.
4059 </result>
4060 <result name="VBOX_E_XML_ERROR">
4061 Could not parse the settings file.
4062 </result>
4063 <result name="E_ACCESSDENIED">
4064 Modification request refused.
4065 </result>
4066
4067 </desc>
4068 </method>
4069
4070 <method name="saveSettingsWithBackup">
4071 <desc>
4072 Creates a backup copy of the machine settings file (<link
4073 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4074 <link to="#saveSettings()"/>.
4075
4076 Note that the backup copy is created <b>only</b> if the settings file
4077 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4078 details). Otherwise, this call is fully equivalent to
4079 <link to="#saveSettings()"/> and no backup copying is done.
4080
4081 The backup copy is created in the same directory where the original
4082 settings file is located. It is given the following file name:
4083 <pre>
4084 original.xml.x.y-platform.bak
4085 </pre>
4086 where <tt>original.xml</tt> is the original settings file name
4087 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4088 format of the settings file (before auto-conversion).
4089
4090 If the given backup file already exists, this method will try to add the
4091 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4092 0 to 9) and copy it again until it succeeds. If all suffixes are
4093 occupied, or if any other copy error occurs, this method will return a
4094 failure.
4095
4096 If the copy operation succeeds, the @a bakFileName return argument will
4097 receive a full path to the created backup file (for informational
4098 purposes). Note that this will happen even if the subsequent
4099 <link to="#saveSettings()"/> call performed by this method after the
4100 copy operation, fails.
4101
4102 <note>
4103 The VirtualBox API never calls this method. It is intended purely for
4104 the purposes of creating backup copies of the settings files by
4105 front-ends before saving the results of the automatically performed
4106 settings conversion to disk.
4107 </note>
4108
4109 <see>settingsFileVersion</see>
4110
4111 <result name="VBOX_E_FILE_ERROR">
4112 Settings file not accessible.
4113 </result>
4114 <result name="VBOX_E_XML_ERROR">
4115 Could not parse the settings file.
4116 </result>
4117 <result name="VBOX_E_INVALID_VM_STATE">
4118 Virtual machine is not mutable.
4119 </result>
4120 <result name="E_ACCESSDENIED">
4121 Modification request refused.
4122 </result>
4123
4124 </desc>
4125 <param name="bakFileName" type="wstring" dir="return">
4126 <desc>Full path to the created backup copy.</desc>
4127 </param>
4128 </method>
4129
4130 <method name="discardSettings">
4131 <desc>
4132 Discards any changes to the machine settings made since the session
4133 has been opened or since the last call to <link to="#saveSettings()"/>
4134 or <link to="#discardSettings"/>.
4135 <note>
4136 Calling this method is only valid on instances returned
4137 by <link to="ISession::machine"/> and on new machines
4138 created by <link to="IVirtualBox::createMachine"/> or
4139 opened by <link to="IVirtualBox::openMachine"/> but not
4140 yet registered, or on unregistered machines after calling
4141 <link to="IVirtualBox::unregisterMachine"/>.
4142 </note>
4143
4144 <result name="VBOX_E_INVALID_VM_STATE">
4145 Virtual machine is not mutable.
4146 </result>
4147
4148 </desc>
4149 </method>
4150
4151 <method name="deleteSettings">
4152 <desc>
4153 Deletes the settings file of this machine from disk.
4154 The machine must not be registered in order for this operation
4155 to succeed.
4156 <note>
4157 <link to="#settingsModified"/> will return TRUE after this
4158 method successfully returns.
4159 </note>
4160 <note>
4161 Calling this method is only valid on instances returned
4162 by <link to="ISession::machine"/> and on new machines
4163 created by <link to="IVirtualBox::createMachine"/> or
4164 opened by <link to="IVirtualBox::openMachine"/> but not
4165 yet registered, or on unregistered machines after calling
4166 <link to="IVirtualBox::unregisterMachine"/>.
4167 </note>
4168 <note>
4169 The deleted machine settings file can be restored (saved again)
4170 by calling <link to="#saveSettings()"/>.
4171 </note>
4172
4173 <result name="VBOX_E_INVALID_VM_STATE">
4174 Cannot delete settings of a registered machine or
4175 machine not mutable.
4176 </result>
4177 <result name="VBOX_E_IPRT_ERROR">
4178 Could not delete the settings file.
4179 </result>
4180
4181 </desc>
4182 </method>
4183
4184 <method name="getSnapshot">
4185 <desc>
4186 Returns a snapshot of this machine with the given UUID.
4187 A <tt>null</tt> UUID can be used to obtain the first snapshot
4188 taken on this machine. This is useful if you want to traverse
4189 the whole tree of snapshots starting from the root.
4190
4191 <result name="VBOX_E_OBJECT_NOT_FOUND">
4192 Virtual machine has no snapshots or snapshot not found.
4193 </result>
4194
4195 </desc>
4196 <param name="id" type="uuid" dir="in">
4197 <desc>UUID of the snapshot to get</desc>
4198 </param>
4199 <param name="snapshot" type="ISnapshot" dir="return">
4200 <desc>Snapshot object with the given UUID.</desc>
4201 </param>
4202 </method>
4203
4204 <method name="findSnapshot">
4205 <desc>
4206 Returns a snapshot of this machine with the given name.
4207
4208 <result name="VBOX_E_OBJECT_NOT_FOUND">
4209 Virtual machine has no snapshots or snapshot not found.
4210 </result>
4211
4212 </desc>
4213 <param name="name" type="wstring" dir="in">
4214 <desc>Name of the snapshot to find</desc>
4215 </param>
4216 <param name="snapshot" type="ISnapshot" dir="return">
4217 <desc>Snapshot object with the given name.</desc>
4218 </param>
4219 </method>
4220
4221 <method name="setCurrentSnapshot">
4222 <desc>
4223 Sets the current snapshot of this machine.
4224 <note>
4225 In the current implementation, this operation is not
4226 implemented.
4227 </note>
4228 </desc>
4229 <param name="id" type="uuid" dir="in">
4230 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4231 </param>
4232 </method>
4233
4234 <method name="createSharedFolder">
4235 <desc>
4236 Creates a new permanent shared folder by associating the given logical
4237 name with the given host path, adds it to the collection of shared
4238 folders and starts sharing it. Refer to the description of
4239 <link to="ISharedFolder"/> to read more about logical names.
4240
4241 <result name="VBOX_E_OBJECT_IN_USE">
4242 Shared folder already exists.
4243 </result>
4244 <result name="VBOX_E_FILE_ERROR">
4245 Shared folder @a hostPath not accessible.
4246 </result>
4247
4248 </desc>
4249 <param name="name" type="wstring" dir="in">
4250 <desc>Unique logical name of the shared folder.</desc>
4251 </param>
4252 <param name="hostPath" type="wstring" dir="in">
4253 <desc>Full path to the shared folder in the host file system.</desc>
4254 </param>
4255 <param name="writable" type="boolean" dir="in">
4256 <desc>Whether the share is writable or readonly</desc>
4257 </param>
4258 </method>
4259
4260 <method name="removeSharedFolder">
4261 <desc>
4262 Removes the permanent shared folder with the given name previously
4263 created by <link to="#createSharedFolder"/> from the collection of
4264 shared folders and stops sharing it.
4265
4266 <result name="VBOX_E_INVALID_VM_STATE">
4267 Virtual machine is not mutable.
4268 </result>
4269 <result name="VBOX_E_OBJECT_NOT_FOUND">
4270 Shared folder @a name does not exist.
4271 </result>
4272
4273 </desc>
4274 <param name="name" type="wstring" dir="in">
4275 <desc>Logical name of the shared folder to remove.</desc>
4276 </param>
4277 </method>
4278
4279 <method name="canShowConsoleWindow">
4280 <desc>
4281 Returns @c true if the VM console process can activate the
4282 console window and bring it to foreground on the desktop of
4283 the host PC.
4284 <note>
4285 This method will fail if a session for this machine is not
4286 currently open.
4287 </note>
4288
4289 <result name="VBOX_E_INVALID_VM_STATE">
4290 Machine session is not open.
4291 </result>
4292
4293 </desc>
4294 <param name="canShow" type="boolean" dir="return">
4295 <desc>
4296 @c true if the console window can be shown and @c
4297 false otherwise.
4298 </desc>
4299 </param>
4300 </method>
4301
4302 <method name="showConsoleWindow">
4303 <desc>
4304 Activates the console window and brings it to foreground on
4305 the desktop of the host PC. Many modern window managers on
4306 many platforms implement some sort of focus stealing
4307 prevention logic, so that it may be impossible to activate
4308 a window without the help of the currently active
4309 application. In this case, this method will return a non-zero
4310 identifier that represents the top-level window of the VM
4311 console process. The caller, if it represents a currently
4312 active process, is responsible to use this identifier (in a
4313 platform-dependent manner) to perform actual window
4314 activation.
4315 <note>
4316 This method will fail if a session for this machine is not
4317 currently open.
4318 </note>
4319
4320 <result name="VBOX_E_INVALID_VM_STATE">
4321 Machine session is not open.
4322 </result>
4323
4324 </desc>
4325 <param name="winId" type="unsigned long long" dir="return">
4326 <desc>
4327 Platform-dependent identifier of the top-level VM console
4328 window, or zero if this method has performed all actions
4329 necessary to implement the <i>show window</i> semantics for
4330 the given platform and/or VirtualBox front-end.
4331 </desc>
4332 </param>
4333 </method>
4334
4335 <method name="getGuestProperty">
4336 <desc>
4337 Reads an entry from the machine's guest property store.
4338
4339 <result name="VBOX_E_INVALID_VM_STATE">
4340 Machine session is not open.
4341 </result>
4342
4343 </desc>
4344 <param name="name" type="wstring" dir="in">
4345 <desc>
4346 The name of the property to read.
4347 </desc>
4348 </param>
4349 <param name="value" type="wstring" dir="out">
4350 <desc>
4351 The value of the property. If the property does not exist then this
4352 will be empty.
4353 </desc>
4354 </param>
4355 <param name="timestamp" type="unsigned long long" dir="out">
4356 <desc>
4357 The time at which the property was last modified, as seen by the
4358 server process.
4359 </desc>
4360 </param>
4361 <param name="flags" type="wstring" dir="out">
4362 <desc>
4363 Additional property parameters, passed as a comma-separated list of
4364 "name=value" type entries.
4365 </desc>
4366 </param>
4367 </method>
4368
4369 <method name="getGuestPropertyValue">
4370 <desc>
4371 Reads a value from the machine's guest property store.
4372
4373 <result name="VBOX_E_INVALID_VM_STATE">
4374 Machine session is not open.
4375 </result>
4376
4377 </desc>
4378 <param name="property" type="wstring" dir="in">
4379 <desc>
4380 The name of the property to read.
4381 </desc>
4382 </param>
4383 <param name="value" type="wstring" dir="return">
4384 <desc>
4385 The value of the property. If the property does not exist then this
4386 will be empty.
4387 </desc>
4388 </param>
4389 </method>
4390
4391 <method name="getGuestPropertyTimestamp">
4392 <desc>
4393 Reads a property timestamp from the machine's guest property store.
4394
4395 <result name="VBOX_E_INVALID_VM_STATE">
4396 Machine session is not open.
4397 </result>
4398
4399 </desc>
4400 <param name="property" type="wstring" dir="in">
4401 <desc>
4402 The name of the property to read.
4403 </desc>
4404 </param>
4405 <param name="value" type="unsigned long long" dir="return">
4406 <desc>
4407 The timestamp. If the property does not exist then this will be
4408 empty.
4409 </desc>
4410 </param>
4411 </method>
4412
4413 <method name="setGuestProperty">
4414 <desc>
4415 Sets, changes or deletes an entry in the machine's guest property
4416 store.
4417
4418 <result name="E_ACCESSDENIED">
4419 Property cannot be changed.
4420 </result>
4421 <result name="E_INVALIDARG">
4422 Invalid @a flags.
4423 </result>
4424 <result name="VBOX_E_INVALID_VM_STATE">
4425 Virtual machine is not mutable or session not open.
4426 </result>
4427 <result name="VBOX_E_INVALID_OBJECT_STATE">
4428 Cannot set transient property when machine not running.
4429 </result>
4430
4431 </desc>
4432 <param name="property" type="wstring" dir="in">
4433 <desc>
4434 The name of the property to set, change or delete.
4435 </desc>
4436 </param>
4437 <param name="value" type="wstring" dir="in">
4438 <desc>
4439 The new value of the property to set, change or delete. If the
4440 property does not yet exist and value is non-empty, it will be
4441 created. If the value is empty, the key will be deleted if it
4442 exists.
4443 </desc>
4444 </param>
4445 <param name="flags" type="wstring" dir="in">
4446 <desc>
4447 Additional property parameters, passed as a comma-separated list of
4448 "name=value" type entries.
4449 </desc>
4450 </param>
4451 </method>
4452
4453 <method name="setGuestPropertyValue">
4454 <desc>
4455 Sets, changes or deletes a value in the machine's guest property
4456 store. The flags field will be left unchanged or created empty for a
4457 new property.
4458
4459 <result name="E_ACCESSDENIED">
4460 Property cannot be changed.
4461 </result>
4462 <result name="VBOX_E_INVALID_VM_STATE">
4463 Virtual machine is not mutable or session not open.
4464 </result>
4465 <result name="VBOX_E_INVALID_OBJECT_STATE">
4466 Cannot set transient property when machine not running.
4467 </result>
4468 </desc>
4469
4470 <param name="property" type="wstring" dir="in">
4471 <desc>
4472 The name of the property to set, change or delete.
4473 </desc>
4474 </param>
4475 <param name="value" type="wstring" dir="in">
4476 <desc>
4477 The new value of the property to set, change or delete. If the
4478 property does not yet exist and value is non-empty, it will be
4479 created. If value is empty, the property will be deleted if it
4480 exists.
4481 </desc>
4482 </param>
4483 </method>
4484
4485 <method name="enumerateGuestProperties">
4486 <desc>
4487 Return a list of the guest properties matching a set of patterns along
4488 with their values, time stamps and flags.
4489 </desc>
4490 <param name="patterns" type="wstring" dir="in">
4491 <desc>
4492 The patterns to match the properties against, separated by '|'
4493 characters. If this is empty or NULL, all properties will match.
4494 </desc>
4495 </param>
4496 <param name="name" type="wstring" dir="out" safearray="yes">
4497 <desc>
4498 The names of the properties returned.
4499 </desc>
4500 </param>
4501 <param name="value" type="wstring" dir="out" safearray="yes">
4502 <desc>
4503 The values of the properties returned. The array entries match the
4504 corresponding entries in the @a name array.
4505 </desc>
4506 </param>
4507 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4508 <desc>
4509 The time stamps of the properties returned. The array entries match
4510 the corresponding entries in the @a name array.
4511 </desc>
4512 </param>
4513 <param name="flags" type="wstring" dir="out" safearray="yes">
4514 <desc>
4515 The flags of the properties returned. The array entries match the
4516 corresponding entries in the @a name array.
4517 </desc>
4518 </param>
4519 </method>
4520</interface>
4521
4522 <!--
4523 // IConsole
4524 /////////////////////////////////////////////////////////////////////////
4525 -->
4526
4527 <interface
4528 name="IConsoleCallback" extends="$unknown"
4529 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4530 wsmap="suppress"
4531 >
4532
4533 <method name="onMousePointerShapeChange">
4534 <desc>
4535 Notification when the guest mouse pointer shape has
4536 changed. The new shape data is given.
4537 </desc>
4538 <param name="visible" type="boolean" dir="in">
4539 <desc>
4540 Flag whether the pointer is visible.
4541 </desc>
4542 </param>
4543 <param name="alpha" type="boolean" dir="in">
4544 <desc>
4545 Flag whether the pointer has an alpha channel.
4546 </desc>
4547 </param>
4548 <param name="xHot" type="unsigned long" dir="in">
4549 <desc>
4550 The pointer hot spot x coordinate.
4551 </desc>
4552 </param>
4553 <param name="yHot" type="unsigned long" dir="in">
4554 <desc>
4555 The pointer hot spot y coordinate.
4556 </desc>
4557 </param>
4558 <param name="width" type="unsigned long" dir="in">
4559 <desc>
4560 Width of the pointer shape in pixels.
4561 </desc>
4562 </param>
4563 <param name="height" type="unsigned long" dir="in">
4564 <desc>
4565 Height of the pointer shape in pixels.
4566 </desc>
4567 </param>
4568 <param name="shape" type="octet" mod="ptr" dir="in">
4569 <desc>
4570 Address of the shape buffer.
4571
4572 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
4573 followed by a 32-bpp XOR (color) mask.
4574
4575 For pointers without alpha channel the XOR mask pixels are 32
4576 bit values: (lsb)BGR0(msb). For pointers with alpha channel
4577 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
4578
4579 An AND mask is used for pointers with alpha channel, so if the
4580 callback does not support alpha, the pointer could be
4581 displayed as a normal color pointer.
4582
4583 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
4584 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
4585 height</tt>. The padding bits at the end of each scanline are
4586 undefined.
4587
4588 The XOR mask follows the AND mask on the next 4-byte aligned
4589 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
4590 Bytes in the gap between the AND and the XOR mask are undefined.
4591 The XOR mask scanlines have no gap between them and the size of
4592 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
4593
4594 <note>
4595 If @a shape is 0, only the pointer visibility is changed.
4596 </note>
4597 </desc>
4598 </param>
4599 </method>
4600
4601 <method name="onMouseCapabilityChange">
4602 <desc>
4603 Notification when the mouse capabilities reported by the
4604 guest have changed. The new capabilities are passed.
4605 </desc>
4606 <param name="supportsAbsolute" type="boolean" dir="in"/>
4607 <param name="needsHostCursor" type="boolean" dir="in"/>
4608 </method>
4609
4610 <method name="onKeyboardLedsChange">
4611 <desc>
4612 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4613 to alter the state of the keyboard LEDs.
4614 </desc>
4615 <param name="numLock" type="boolean" dir="in"/>
4616 <param name="capsLock" type="boolean" dir="in"/>
4617 <param name="scrollLock" type="boolean" dir="in"/>
4618 </method>
4619
4620 <method name="onStateChange">
4621 <desc>
4622 Notification when the execution state of the machine has changed.
4623 The new state will be given.
4624 </desc>
4625 <param name="state" type="MachineState" dir="in"/>
4626 </method>
4627
4628 <method name="onAdditionsStateChange">
4629 <desc>
4630 Notification when a Guest Additions property changes.
4631 Interested callees should query IGuest attributes to
4632 find out what has changed.
4633 </desc>
4634 </method>
4635
4636 <method name="onDVDDriveChange">
4637 <desc>
4638 Notification when a property of the
4639 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4640 Interested callees should use IDVDDrive methods to find out what has
4641 changed.
4642 </desc>
4643 </method>
4644
4645 <method name="onFloppyDriveChange">
4646 <desc>
4647 Notification when a property of the
4648 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4649 Interested callees should use IFloppyDrive methods to find out what
4650 has changed.
4651 </desc>
4652 </method>
4653
4654 <method name="onNetworkAdapterChange">
4655 <desc>
4656 Notification when a property of one of the
4657 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4658 changes. Interested callees should use INetworkAdapter methods and
4659 attributes to find out what has changed.
4660 </desc>
4661 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4662 <desc>Network adapter that is subject to change.</desc>
4663 </param>
4664 </method>
4665
4666 <method name="onSerialPortChange">
4667 <desc>
4668 Notification when a property of one of the
4669 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4670 Interested callees should use ISerialPort methods and attributes
4671 to find out what has changed.
4672 </desc>
4673 <param name="serialPort" type="ISerialPort" dir="in">
4674 <desc>Serial port that is subject to change.</desc>
4675 </param>
4676 </method>
4677
4678 <method name="onParallelPortChange">
4679 <desc>
4680 Notification when a property of one of the
4681 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4682 changes. Interested callees should use ISerialPort methods and
4683 attributes to find out what has changed.
4684 </desc>
4685 <param name="parallelPort" type="IParallelPort" dir="in">
4686 <desc>Parallel port that is subject to change.</desc>
4687 </param>
4688 </method>
4689
4690 <method name="onVRDPServerChange">
4691 <desc>
4692 Notification when a property of the
4693 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4694 Interested callees should use IVRDPServer methods and attributes to
4695 find out what has changed.
4696 </desc>
4697 </method>
4698
4699 <method name="onUSBControllerChange">
4700 <desc>
4701 Notification when a property of the virtual
4702 <link to="IMachine::USBController">USB controller</link> changes.
4703 Interested callees should use IUSBController methods and attributes to
4704 find out what has changed.
4705 </desc>
4706 </method>
4707
4708 <method name="onUSBDeviceStateChange">
4709 <desc>
4710 Notification when a USB device is attached to or detached from
4711 the virtual USB controller.
4712
4713 This notification is sent as a result of the indirect
4714 request to attach the device because it matches one of the
4715 machine USB filters, or as a result of the direct request
4716 issued by <link to="IConsole::attachUSBDevice"/> or
4717 <link to="IConsole::detachUSBDevice"/>.
4718
4719 This notification is sent in case of both a succeeded and a
4720 failed request completion. When the request succeeds, the @a
4721 error parameter is @c null, and the given device has been
4722 already added to (when @a attached is @c true) or removed from
4723 (when @a attached is @c false) the collection represented by
4724 <link to="IConsole::USBDevices"/>. On failure, the collection
4725 doesn't change and the @a error parameter represents the error
4726 message describing the failure.
4727
4728 </desc>
4729 <param name="device" type="IUSBDevice" dir="in">
4730 <desc>Device that is subject to state change.</desc>
4731 </param>
4732 <param name="attached" type="boolean" dir="in">
4733 <desc>
4734 <tt>true</tt> if the device was attached
4735 and <tt>false</tt> otherwise.
4736 </desc>
4737 </param>
4738 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4739 <desc>
4740 <tt>null</tt> on success or an error message object on
4741 failure.
4742 </desc>
4743 </param>
4744 </method>
4745
4746 <method name="onSharedFolderChange">
4747 <desc>
4748 Notification when a shared folder is added or removed.
4749 The @a scope argument defines one of three scopes:
4750 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4751 (<link to="Scope_Global">Global</link>),
4752 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4753 the machine (<link to="Scope_Machine">Machine</link>) or <link
4754 to="IConsole::sharedFolders">transient shared folders</link> of the
4755 machine (<link to="Scope_Session">Session</link>). Interested callees
4756 should use query the corresponding collections to find out what has
4757 changed.
4758 </desc>
4759 <param name="scope" type="Scope" dir="in">
4760 <desc>Scope of the notification.</desc>
4761 </param>
4762 </method>
4763
4764 <method name="onRuntimeError">
4765 <desc>
4766 Notification when an error happens during the virtual
4767 machine execution.
4768
4769 There are three kinds of runtime errors:
4770 <ul>
4771 <li><i>fatal</i></li>
4772 <li><i>non-fatal with retry</i></li>
4773 <li><i>non-fatal warnings</i></li>
4774 </ul>
4775
4776 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4777 to <tt>true</tt>. In case of fatal errors, the virtual machine
4778 execution is always paused before calling this notification, and
4779 the notification handler is supposed either to immediately save
4780 the virtual machine state using <link to="IConsole::saveState()"/>
4781 or power it off using <link to="IConsole::powerDown()"/>.
4782 Resuming the execution can lead to unpredictable results.
4783
4784 <b>Non-fatal</b> errors and warnings are indicated by the
4785 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4786 is in the Paused state by the time the error notification is
4787 received, it means that the user can <i>try to resume</i> the machine
4788 execution after attempting to solve the problem that caused the
4789 error. In this case, the notification handler is supposed
4790 to show an appropriate message to the user (depending on the
4791 value of the @a id parameter) that offers several actions such
4792 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4793 wants to retry, the notification handler should continue
4794 the machine execution using the <link to="IConsole::resume()"/>
4795 call. If the machine execution is not Paused during this
4796 notification, then it means this notification is a <i>warning</i>
4797 (for example, about a fatal condition that can happen very soon);
4798 no immediate action is required from the user, the machine
4799 continues its normal execution.
4800
4801 Note that in either case the notification handler
4802 <b>must not</b> perform any action directly on a thread
4803 where this notification is called. Everything it is allowed to
4804 do is to post a message to another thread that will then talk
4805 to the user and take the corresponding action.
4806
4807 Currently, the following error identifiers are known:
4808 <ul>
4809 <li><tt>"HostMemoryLow"</tt></li>
4810 <li><tt>"HostAudioNotResponding"</tt></li>
4811 <li><tt>"VDIStorageFull"</tt></li>
4812 </ul>
4813
4814 <note>
4815 This notification is not designed to be implemented by
4816 more than one callback at a time. If you have multiple
4817 IConsoleCallback instances registered on the given
4818 IConsole object, make sure you simply do nothing but
4819 return @c S_OK from all but one of them that does actual
4820 user notification and performs necessary actions.
4821 </note>
4822
4823 </desc>
4824 <param name="fatal" type="boolean" dir="in">
4825 <desc>Whether the error is fatal or not</desc>
4826 </param>
4827 <param name="id" type="wstring" dir="in">
4828 <desc>Error identifier</desc>
4829 </param>
4830 <param name="message" type="wstring" dir="in">
4831 <desc>Optional error message</desc>
4832 </param>
4833 </method>
4834
4835 <method name="onCanShowWindow">
4836 <desc>
4837 Notification when a call to
4838 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4839 front-end to check if a subsequent call to
4840 <link to="IMachine::showConsoleWindow()"/> can succeed.
4841
4842 The callee should give an answer appropriate to the current
4843 machine state in the @a canShow argument. This answer must
4844 remain valid at least until the next
4845 <link to="IConsole::state">machine state</link> change.
4846
4847 <note>
4848 This notification is not designed to be implemented by
4849 more than one callback at a time. If you have multiple
4850 IConsoleCallback instances registered on the given
4851 IConsole object, make sure you simply do nothing but
4852 return @c true and @c S_OK from all but one of them that
4853 actually manages console window activation.
4854 </note>
4855 </desc>
4856 <param name="canShow" type="boolean" dir="return">
4857 <desc>
4858 @c true if the console window can be shown and @c
4859 false otherwise.
4860 </desc>
4861 </param>
4862 </method>
4863
4864 <method name="onShowWindow">
4865 <desc>
4866 Notification when a call to
4867 <link to="IMachine::showConsoleWindow()"/>
4868 requests the console window to be activated and brought to
4869 foreground on the desktop of the host PC.
4870
4871 This notification should cause the VM console process to
4872 perform the requested action as described above. If it is
4873 impossible to do it at a time of this notification, this
4874 method should return a failure.
4875
4876 Note that many modern window managers on many platforms
4877 implement some sort of focus stealing prevention logic, so
4878 that it may be impossible to activate a window without the
4879 help of the currently active application (which is supposedly
4880 an initiator of this notification). In this case, this method
4881 must return a non-zero identifier that represents the
4882 top-level window of the VM console process. The caller, if it
4883 represents a currently active process, is responsible to use
4884 this identifier (in a platform-dependent manner) to perform
4885 actual window activation.
4886
4887 This method must set @a winId to zero if it has performed all
4888 actions necessary to complete the request and the console
4889 window is now active and in foreground, to indicate that no
4890 further action is required on the caller's side.
4891
4892 <note>
4893 This notification is not designed to be implemented by
4894 more than one callback at a time. If you have multiple
4895 IConsoleCallback instances registered on the given
4896 IConsole object, make sure you simply do nothing but
4897 return @c S_OK from all but one of them that actually
4898 manages console window activation.
4899 </note>
4900 </desc>
4901 <param name="winId" type="unsigned long long" dir="return">
4902 <desc>
4903 Platform-dependent identifier of the top-level VM console
4904 window, or zero if this method has performed all actions
4905 necessary to implement the <i>show window</i> semantics for
4906 the given platform and/or this VirtualBox front-end.
4907 </desc>
4908 </param>
4909 </method>
4910
4911 </interface>
4912
4913 <interface
4914 name="IRemoteDisplayInfo" extends="$unknown"
4915 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4916 wsmap="struct"
4917 >
4918 <desc>
4919 Contains information about the remote display (VRDP) capabilities and status.
4920 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4921 </desc>
4922
4923 <attribute name="active" type="boolean" readonly="yes">
4924 <desc>
4925 Whether the remote display connection is active.
4926 </desc>
4927 </attribute>
4928
4929 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4930 <desc>
4931 How many times a client connected.
4932 </desc>
4933 </attribute>
4934
4935 <attribute name="beginTime" type="long long" readonly="yes">
4936 <desc>
4937 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4938 </desc>
4939 </attribute>
4940
4941 <attribute name="endTime" type="long long" readonly="yes">
4942 <desc>
4943 When the last connection was terminated or the current time, if
4944 connection is still active, in milliseconds since 1970-01-01 UTC.
4945 </desc>
4946 </attribute>
4947
4948 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4949 <desc>
4950 How many bytes were sent in last or current, if still active, connection.
4951 </desc>
4952 </attribute>
4953
4954 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4955 <desc>
4956 How many bytes were sent in all connections.
4957 </desc>
4958 </attribute>
4959
4960 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4961 <desc>
4962 How many bytes were received in last or current, if still active, connection.
4963 </desc>
4964 </attribute>
4965
4966 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4967 <desc>
4968 How many bytes were received in all connections.
4969 </desc>
4970 </attribute>
4971
4972 <attribute name="user" type="wstring" readonly="yes">
4973 <desc>
4974 Login user name supplied by the client.
4975 </desc>
4976 </attribute>
4977
4978 <attribute name="domain" type="wstring" readonly="yes">
4979 <desc>
4980 Login domain name supplied by the client.
4981 </desc>
4982 </attribute>
4983
4984 <attribute name="clientName" type="wstring" readonly="yes">
4985 <desc>
4986 The client name supplied by the client.
4987 </desc>
4988 </attribute>
4989
4990 <attribute name="clientIP" type="wstring" readonly="yes">
4991 <desc>
4992 The IP address of the client.
4993 </desc>
4994 </attribute>
4995
4996 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4997 <desc>
4998 The client software version number.
4999 </desc>
5000 </attribute>
5001
5002 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5003 <desc>
5004 Public key exchange method used when connection was established.
5005 Values: 0 - RDP4 public key exchange scheme.
5006 1 - X509 certificates were sent to client.
5007 </desc>
5008 </attribute>
5009
5010 </interface>
5011
5012 <interface
5013 name="IConsole" extends="$unknown"
5014 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5015 wsmap="managed"
5016 >
5017 <desc>
5018 The IConsole interface represents an interface to control virtual
5019 machine execution.
5020
5021 The console object that implements the IConsole interface is obtained
5022 from a session object after the session for the given machine has been
5023 opened using one of <link to="IVirtualBox::openSession"/>,
5024 <link to="IVirtualBox::openRemoteSession"/> or
5025 <link to="IVirtualBox::openExistingSession"/> methods.
5026
5027 Methods of the IConsole interface allow the caller to query the current
5028 virtual machine execution state, pause the machine or power it down, save
5029 the machine state or take a snapshot, attach and detach removable media
5030 and so on.
5031
5032 <see>ISession</see>
5033 </desc>
5034
5035 <attribute name="machine" type="IMachine" readonly="yes">
5036 <desc>
5037 Machine object this console is sessioned with.
5038 <note>
5039 This is a convenience property, it has the same value as
5040 <link to="ISession::machine"/> of the corresponding session
5041 object.
5042 </note>
5043 </desc>
5044 </attribute>
5045
5046 <attribute name="state" type="MachineState" readonly="yes">
5047 <desc>
5048 Current execution state of the machine.
5049 <note>
5050 This property always returns the same value as the corresponding
5051 property of the IMachine object this console is sessioned with.
5052 For the process that owns (executes) the VM, this is the
5053 preferable way of querying the VM state, because no IPC
5054 calls are made.
5055 </note>
5056 </desc>
5057 </attribute>
5058
5059 <attribute name="guest" type="IGuest" readonly="yes">
5060 <desc>Guest object.</desc>
5061 </attribute>
5062
5063 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5064 <desc>
5065 Virtual keyboard object.
5066 <note>
5067 If the machine is not running, any attempt to use
5068 the returned object will result in an error.
5069 </note>
5070 </desc>
5071 </attribute>
5072
5073 <attribute name="mouse" type="IMouse" readonly="yes">
5074 <desc>
5075 Virtual mouse object.
5076 <note>
5077 If the machine is not running, any attempt to use
5078 the returned object will result in an error.
5079 </note>
5080 </desc>
5081 </attribute>
5082
5083 <attribute name="display" type="IDisplay" readonly="yes">
5084 <desc>Virtual display object.
5085 <note>
5086 If the machine is not running, any attempt to use
5087 the returned object will result in an error.
5088 </note>
5089 </desc>
5090 </attribute>
5091
5092 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5093 <desc>Debugging interface.</desc>
5094 </attribute>
5095
5096 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5097 <desc>
5098 Collection of USB devices currently attached to the virtual
5099 USB controller.
5100 <note>
5101 The collection is empty if the machine is not running.
5102 </note>
5103 </desc>
5104 </attribute>
5105
5106 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5107 <desc>
5108 List of USB devices currently attached to the remote VRDP client.
5109 Once a new device is physically attached to the remote host computer,
5110 it appears in this list and remains there until detached.
5111 </desc>
5112 </attribute>
5113
5114 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5115 <desc>
5116 Collection of shared folders for the current session. These folders
5117 are called transient shared folders because they are available to the
5118 guest OS running inside the associated virtual machine only for the
5119 duration of the session (as opposed to
5120 <link to="IMachine::sharedFolders"/> which represent permanent shared
5121 folders). When the session is closed (e.g. the machine is powered down),
5122 these folders are automatically discarded.
5123
5124 New shared folders are added to the collection using
5125 <link to="#createSharedFolder"/>. Existing shared folders can be
5126 removed using <link to="#removeSharedFolder"/>.
5127 </desc>
5128 </attribute>
5129
5130 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5131 <desc>
5132 Interface that provides information on Remote Display (VRDP) connection.
5133 </desc>
5134 </attribute>
5135
5136 <method name="powerUp">
5137 <desc>
5138 Starts the virtual machine execution using the current machine
5139 state (that is, its current execution state, current settings and
5140 current hard disks).
5141
5142 If the machine is powered off or aborted, the execution will
5143 start from the beginning (as if the real hardware were just
5144 powered on).
5145
5146 If the machine is in the <link to="MachineState_Saved"/> state,
5147 it will continue its execution the point where the state has
5148 been saved.
5149
5150 <note>
5151 Unless you are trying to write a new VirtualBox front-end that
5152 performs direct machine execution (like the VirtualBox or VBoxSDL
5153 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5154 session opened by <link to="IVirtualBox::openSession"/> and use this
5155 session only to change virtual machine settings. If you simply want to
5156 start virtual machine execution using one of the existing front-ends
5157 (for example the VirtualBox GUI or headless server), simply use
5158 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5159 power up the machine automatically for you.
5160 </note>
5161
5162 <see>#saveState</see>
5163 <result name="VBOX_E_INVALID_VM_STATE">
5164 Virtual machine already running.
5165 </result>
5166 <result name="VBOX_E_HOST_ERROR">
5167 Host interface does not exist or name not set.
5168 </result>
5169 <result name="VBOX_E_FILE_ERROR">
5170 Invalid saved state file.
5171 </result>
5172 </desc>
5173 <param name="progress" type="IProgress" dir="return">
5174 <desc>Progress object to track the operation completion.</desc>
5175 </param>
5176 </method>
5177
5178 <method name="powerUpPaused">
5179 <desc>
5180 Identical to powerUp except that the VM will enter the
5181 <link to="MachineState_Paused"/> state, instead of
5182 <link to="MachineState_Running"/>.
5183
5184 <see>#powerUp</see>
5185 <result name="VBOX_E_INVALID_VM_STATE">
5186 Virtual machine already running.
5187 </result>
5188 <result name="VBOX_E_HOST_ERROR">
5189 Host interface does not exist or name not set.
5190 </result>
5191 <result name="VBOX_E_FILE_ERROR">
5192 Invalid saved state file.
5193 </result>
5194 </desc>
5195 <param name="progress" type="IProgress" dir="return">
5196 <desc>Progress object to track the operation completion.</desc>
5197 </param>
5198 </method>
5199
5200 <method name="powerDown">
5201 <desc>
5202 Stops the virtual machine execution.
5203 After this operation completes, the machine will go to the
5204 PoweredOff state.
5205
5206 @deprecated This method will be removed in VirtualBox 2.1 where the
5207 powerDownAsync() method will take its name. Do not use this method in
5208 the code.
5209 <result name="VBOX_E_INVALID_VM_STATE">
5210 Virtual machine must be Running, Paused or Stuck to be powered down.
5211 </result>
5212 <result name="VBOX_E_VM_ERROR">
5213 Unable to power off or destroy virtual machine.
5214 </result>
5215 </desc>
5216 </method>
5217
5218 <method name="powerDownAsync">
5219 <desc>
5220 Initiates the power down procedure to stop the virtual machine
5221 execution.
5222
5223 The completion of the power down procedure is tracked using the returned
5224 IProgress object. After the operation is complete, the machine will go
5225 to the PoweredOff state.
5226
5227 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5228 where the original powerDown() method will be removed. You will need to
5229 rename "powerDownAsync" to "powerDown" in your sources to make them
5230 build with version 2.1.
5231 <result name="VBOX_E_INVALID_VM_STATE">
5232 Virtual machine must be Running, Paused or Stuck to be powered down.
5233 </result>
5234 </desc>
5235 <param name="progress" type="IProgress" dir="return">
5236 <desc>Progress object to track the operation completion.</desc>
5237 </param>
5238 </method>
5239
5240 <method name="reset">
5241 <desc>Resets the virtual machine.
5242 <result name="VBOX_E_INVALID_VM_STATE">
5243 Virtual machine not in Running state.
5244 </result>
5245 <result name="VBOX_E_VM_ERROR">
5246 Virtual machine error in reset operation.
5247 </result>
5248 </desc>
5249 </method>
5250
5251 <method name="pause">
5252 <desc>Pauses the virtual machine execution.
5253 <result name="VBOX_E_INVALID_VM_STATE">
5254 Virtual machine not in Running state.
5255 </result>
5256 <result name="VBOX_E_VM_ERROR">
5257 Virtual machine error in suspend operation.
5258 </result>
5259 </desc>
5260 </method>
5261
5262 <method name="resume">
5263 <desc>Resumes the virtual machine execution.
5264 <result name="VBOX_E_INVALID_VM_STATE">
5265 Virtual machine not in Paused state.
5266 </result>
5267 <result name="VBOX_E_VM_ERROR">
5268 Virtual machine error in resume operation.
5269 </result>
5270 </desc>
5271 </method>
5272
5273 <method name="powerButton">
5274 <desc>Sends the ACPI power button event to the guest.
5275 <result name="VBOX_E_INVALID_VM_STATE">
5276 Virtual machine not in Running state.
5277 </result>
5278 <result name="VBOX_E_PDM_ERROR">
5279 Controlled power off failed.
5280 </result>
5281 </desc>
5282 </method>
5283
5284 <method name="sleepButton">
5285 <desc>Sends the ACPI sleep button event to the guest.
5286 <result name="VBOX_E_INVALID_VM_STATE">
5287 Virtual machine not in Running state.
5288 </result>
5289 <result name="VBOX_E_PDM_ERROR">
5290 Sending sleep button event failed.
5291 </result>
5292 </desc>
5293 </method>
5294
5295 <method name="getPowerButtonHandled">
5296 <desc>Checks if the last power button event was handled by guest.
5297 <result name="VBOX_E_PDM_ERROR">
5298 Checking if the event was handled by the guest OS failed.
5299 </result>
5300 </desc>
5301 <param name="handled" type="boolean" dir="return"/>
5302 </method>
5303
5304 <method name="getGuestEnteredACPIMode">
5305 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5306 G1 (sleeping). If this method returns false, the guest will
5307 most likely not respond to external ACPI events.
5308 <result name="VBOX_E_INVALID_VM_STATE">
5309 Virtual machine not in Running state.
5310 </result>
5311 </desc>
5312 <param name="entered" type="boolean" dir="return"/>
5313 </method>
5314
5315 <method name="saveState">
5316 <desc>
5317 Saves the current execution state of a running virtual machine
5318 and stops its execution.
5319
5320 After this operation completes, the machine will go to the
5321 Saved state. Next time it is powered up, this state will
5322 be restored and the machine will continue its execution from
5323 the place where it was saved.
5324
5325 This operation differs from taking a snapshot to the effect
5326 that it doesn't create new differencing hard disks. Also, once
5327 the machine is powered up from the state saved using this method,
5328 the saved state is deleted, so it will be impossible to return
5329 to this state later.
5330
5331 <note>
5332 On success, this method implicitly calls
5333 <link to="IMachine::saveSettings()"/> to save all current machine
5334 settings (including runtime changes to the DVD drive, etc.).
5335 Together with the impossibility to change any VM settings when it is
5336 in the Saved state, this guarantees adequate hardware
5337 configuration of the machine when it is restored from the saved
5338 state file.
5339 </note>
5340
5341 <note>
5342 The machine must be in the Running or Paused state, otherwise
5343 the operation will fail.
5344 </note>
5345 <result name="VBOX_E_INVALID_VM_STATE">
5346 Virtual machine state neither Running nor Paused.
5347 </result>
5348 <result name="VBOX_E_FILE_ERROR">
5349 Failed to create directory for saved state file.
5350 </result>
5351
5352 <see><link to="#takeSnapshot"/></see>
5353 </desc>
5354 <param name="progress" type="IProgress" dir="return">
5355 <desc>Progress object to track the operation completion.</desc>
5356 </param>
5357 </method>
5358
5359 <method name="adoptSavedState">
5360 <desc>
5361 Associates the given saved state file to the virtual machine.
5362
5363 On success, the machine will go to the Saved state. Next time it is
5364 powered up, it will be restored from the adopted saved state and
5365 continue execution from the place where the saved state file was
5366 created.
5367
5368 The specified saved state file path may be absolute or relative to the
5369 folder the VM normally saves the state to (usually,
5370 <link to="IMachine::snapshotFolder"/>).
5371
5372 <note>
5373 It's a caller's responsibility to make sure the given saved state
5374 file is compatible with the settings of this virtual machine that
5375 represent its virtual hardware (memory size, hard disk configuration
5376 etc.). If there is a mismatch, the behavior of the virtual machine
5377 is undefined.
5378 </note>
5379 <result name="VBOX_E_INVALID_VM_STATE">
5380 Virtual machine state neither PoweredOff nor Aborted.
5381 </result>
5382 </desc>
5383 <param name="savedStateFile" type="wstring" dir="in">
5384 <desc>Path to the saved state file to adopt.</desc>
5385 </param>
5386 </method>
5387
5388 <method name="discardSavedState">
5389 <desc>
5390 Discards (deletes) the saved state of the virtual machine
5391 previously created by <link to="#saveState"/>. Next time the
5392 machine is powered up, a clean boot will occur.
5393 <note>
5394 This operation is equivalent to resetting or powering off
5395 the machine without doing a proper shutdown in the guest OS.
5396 </note>
5397 <result name="VBOX_E_INVALID_VM_STATE">
5398 Virtual machine not in state Saved.
5399 </result>
5400 </desc>
5401 </method>
5402
5403 <method name="getDeviceActivity">
5404 <desc>
5405 Gets the current activity type of a given device or device group.
5406 <result name="E_INVALIDARG">
5407 Invalid device type.
5408 </result>
5409 </desc>
5410 <param name="type" type="DeviceType" dir="in"/>
5411 <param name="activity" type="DeviceActivity" dir="return"/>
5412 </method>
5413
5414 <method name="attachUSBDevice">
5415 <desc>
5416 Attaches a host USB device with the given UUID to the
5417 USB controller of the virtual machine.
5418
5419 The device needs to be in one of the following states:
5420 <link to="USBDeviceState_Busy"/>,
5421 <link to="USBDeviceState_Available"/> or
5422 <link to="USBDeviceState_Held"/>,
5423 otherwise an error is immediately returned.
5424
5425 When the device state is
5426 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5427 be returned if the host computer refuses to release it for some reason.
5428
5429 <see>IUSBController::deviceFilters, USBDeviceState</see>
5430 <result name="VBOX_E_INVALID_VM_STATE">
5431 Virtual machine state neither Running nor Paused.
5432 </result>
5433 <result name="VBOX_E_PDM_ERROR">
5434 Virtual machine does not have a USB controller.
5435 </result>
5436 </desc>
5437 <param name="id" type="uuid" dir="in">
5438 <desc>UUID of the host USB device to attach.</desc>
5439 </param>
5440 </method>
5441
5442 <method name="detachUSBDevice">
5443 <desc>
5444 Detaches an USB device with the given UUID from the USB controller
5445 of the virtual machine.
5446
5447 After this method succeeds, the VirtualBox server re-initiates
5448 all USB filters as if the device were just physically attached
5449 to the host, but filters of this machine are ignored to avoid
5450 a possible automatic re-attachment.
5451
5452 <see>IUSBController::deviceFilters, USBDeviceState</see>
5453
5454 <result name="VBOX_E_PDM_ERROR">
5455 Virtual machine does not have a USB controller.
5456 </result>
5457 <result name="E_INVALIDARG">
5458 USB device not attached to this virtual machine.
5459 </result>
5460 </desc>
5461 <param name="id" type="uuid" dir="in">
5462 <desc>UUID of the USB device to detach.</desc>
5463 </param>
5464 <param name="device" type="IUSBDevice" dir="return">
5465 <desc>Detached USB device.</desc>
5466 </param>
5467 </method>
5468
5469 <method name="createSharedFolder">
5470 <desc>
5471 Creates a transient new shared folder by associating the given logical
5472 name with the given host path, adds it to the collection of shared
5473 folders and starts sharing it. Refer to the description of
5474 <link to="ISharedFolder"/> to read more about logical names.
5475
5476 <result name="VBOX_E_INVALID_VM_STATE">
5477 Virtual machine in Saved state or currently changing state.
5478 </result>
5479 <result name="VBOX_E_FILE_ERROR">
5480 Shared folder already exists or not accessible.
5481 </result>
5482 </desc>
5483 <param name="name" type="wstring" dir="in">
5484 <desc>Unique logical name of the shared folder.</desc>
5485 </param>
5486 <param name="hostPath" type="wstring" dir="in">
5487 <desc>Full path to the shared folder in the host file system.</desc>
5488 </param>
5489 <param name="writable" type="boolean" dir="in">
5490 <desc>Whether the share is writable or readonly</desc>
5491 </param>
5492 </method>
5493
5494 <method name="removeSharedFolder">
5495 <desc>
5496 Removes a transient shared folder with the given name previously
5497 created by <link to="#createSharedFolder"/> from the collection of
5498 shared folders and stops sharing it.
5499 <result name="VBOX_E_INVALID_VM_STATE">
5500 Virtual machine in Saved state or currently changing state.
5501 </result>
5502 <result name="VBOX_E_FILE_ERROR">
5503 Shared folder does not exists.
5504 </result>
5505 </desc>
5506 <param name="name" type="wstring" dir="in">
5507 <desc>Logical name of the shared folder to remove.</desc>
5508 </param>
5509 </method>
5510
5511 <method name="takeSnapshot">
5512 <desc>
5513 Saves the current execution state and all settings of the
5514 machine and creates differencing images for all
5515 normal (non-independent) hard disks.
5516
5517 This method can be called for a PoweredOff, Saved, Running or
5518 Paused virtual machine. When the machine is PoweredOff, an
5519 offline <link to="ISnapshot">snapshot</link> is created,
5520 in all other cases -- an online snapshot.
5521
5522 The taken snapshot is always based on the
5523 <link to="IMachine::currentSnapshot">current
5524 snapshot</link> of the associated virtual machine and becomes
5525 a new current snapshot.
5526
5527 <note>
5528 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5529 save all current machine settings before taking an offline snapshot.
5530 </note>
5531
5532 <see>ISnapshot, <link to="#saveState"/></see>
5533 <result name="VBOX_E_INVALID_VM_STATE">
5534 Virtual machine currently changing state.
5535 </result>
5536 </desc>
5537 <param name="name" type="wstring" dir="in">
5538 <desc>Short name for the snapshot.</desc>
5539 </param>
5540 <param name="description" type="wstring" dir="in">
5541 <desc>Optional description of the snapshot.</desc>
5542 </param>
5543 <param name="progress" type="IProgress" dir="return">
5544 <desc>Progress object to track the operation completion.</desc>
5545 </param>
5546 </method>
5547
5548 <method name="discardSnapshot">
5549 <desc>
5550
5551 Starts discarding the specified snapshot. The execution state
5552 and settings of the associated machine stored in the snapshot
5553 will be deleted. The contents of all differencing hard disks of
5554 this snapshot will be merged with the contents of their
5555 dependent child hard disks to keep the, disks valid (in other
5556 words, all changes represented by hard disks being discarded
5557 will be propagated to their child hard disks). After that, this
5558 snapshot's differencing hard disks will be deleted. The parent
5559 of this snapshot will become a new parent for all its child
5560 snapshots.
5561
5562 If the discarded snapshot is the current one, its parent
5563 snapshot will become a new current snapshot. The current machine
5564 state is not directly affected in this case, except that
5565 currently attached differencing hard disks based on hard disks
5566 of the discarded snapshot will be also merged as described
5567 above.
5568
5569 If the discarded snapshot is the first one (the root snapshot)
5570 and it has exactly one child snapshot, this child snapshot will
5571 become the first snapshot after discarding. If there are no
5572 children at all (i.e. the first snapshot is the only snapshot of
5573 the machine), both the current and the first snapshot of the
5574 machine will be set to null. In all other cases, the first
5575 snapshot cannot be discarded.
5576
5577 You cannot discard the snapshot if it
5578 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
5579 hard disks that have differencing hard disks based on them. Snapshots of
5580 such kind can be discarded only when every normal hard disk has either
5581 no children at all or exactly one child. In the former case, the normal
5582 hard disk simply becomes unused (i.e. not attached to any VM). In the
5583 latter case, it receives all the changes stored in the child hard disk,
5584 and then it replaces the child hard disk in the configuration of the
5585 corresponding snapshot or machine.
5586
5587 Also, you cannot discard the snapshot if it stores hard disks
5588 (of any type) having differencing child hard disks that belong
5589 to other machines. Such snapshots can be only discarded after
5590 you discard all snapshots of other machines containing "foreign"
5591 child disks, or detach these "foreign" child disks from machines
5592 they are attached to.
5593
5594 One particular example of the snapshot storing normal hard disks
5595 is the first snapshot of a virtual machine that had normal hard
5596 disks attached when taking the snapshot. Be careful when
5597 discarding such snapshots because this implicitly commits
5598 changes (made since the snapshot being discarded has been taken)
5599 to normal hard disks (as described above), which may be not what
5600 you want.
5601
5602 The virtual machine is put to
5603 the <link to="MachineState_Discarding">Discarding</link> state until
5604 the discard operation is completed.
5605
5606 <note>
5607 The machine must not be running, otherwise the operation
5608 will fail.
5609 </note>
5610
5611 <note>
5612 Child hard disks of all normal hard disks of the discarded snapshot
5613 must be accessible (see <link to="IMedium::state"/>) for this
5614 operation to succeed. In particular, this means that all virtual
5615 machines, whose hard disks are directly or indirectly based on the
5616 hard disks of discarded snapshot, must be powered off.
5617 </note>
5618 <note>
5619 Merging hard disk contents can be very time and disk space
5620 consuming, if these disks are big in size and have many
5621 children. However, if the snapshot being discarded is the last
5622 (head) snapshot on the branch, the operation will be rather
5623 quick.
5624 </note>
5625 <note>
5626 Note that discarding the current snapshot
5627 will implicitly call <link to="IMachine::saveSettings()"/> to
5628 make all current machine settings permanent.
5629 </note>
5630 <result name="VBOX_E_INVALID_VM_STATE">
5631 Virtual machine is running.
5632 </result>
5633 </desc>
5634 <param name="id" type="uuid" dir="in">
5635 <desc>UUID of the snapshot to discard.</desc>
5636 </param>
5637 <param name="progress" type="IProgress" dir="return">
5638 <desc>Progress object to track the operation completion.</desc>
5639 </param>
5640 </method>
5641
5642 <method name="discardCurrentState">
5643 <desc>
5644 This operation is similar to <link to="#discardSnapshot()"/> but
5645 affects the current machine state. This means that the state stored in
5646 the current snapshot will become a new current state, and all current
5647 settings of the machine and changes stored in differencing hard disks
5648 will be lost.
5649
5650 After this operation is successfully completed, new empty differencing
5651 hard disks are created for all normal hard disks of the machine.
5652
5653 If the current snapshot of the machine is an online snapshot, the
5654 machine will go to the <link to="MachineState_Saved"> saved
5655 state</link>, so that the next time it is powered on, the execution
5656 state will be restored from the current snapshot.
5657
5658 <note>
5659 The machine must not be running, otherwise the operation will fail.
5660 </note>
5661
5662 <note>
5663 If the machine state is <link to="MachineState_Saved">Saved</link>
5664 prior to this operation, the saved state file will be implicitly
5665 discarded (as if <link to="IConsole::discardSavedState()"/> were
5666 called).
5667 </note>
5668
5669 <result name="VBOX_E_INVALID_VM_STATE">
5670 Virtual machine is running.
5671 </result>
5672 </desc>
5673 <param name="progress" type="IProgress" dir="return">
5674 <desc>Progress object to track the operation completion.</desc>
5675 </param>
5676 </method>
5677
5678 <method name="discardCurrentSnapshotAndState">
5679 <desc>
5680
5681 This method is equivalent to
5682 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
5683 (currentSnapshot.id(), progress) followed by
5684 <link to="#discardCurrentState()"/>.
5685
5686 As a result, the machine will be fully restored from the
5687 snapshot preceding the current snapshot, while both the current
5688 snapshot and the current machine state will be discarded.
5689
5690 If the current snapshot is the first snapshot of the machine (i.e. it
5691 has the only snapshot), the current machine state will be
5692 discarded <b>before</b> discarding the snapshot. In other words, the
5693 machine will be restored from its last snapshot, before discarding
5694 it. This differs from performing a single
5695 <link to="#discardSnapshot()"/> call (note that no
5696 <link to="#discardCurrentState()"/> will be possible after it)
5697 to the effect that the latter will preserve the current state instead of
5698 discarding it.
5699
5700 Unless explicitly mentioned otherwise, all remarks and
5701 limitations of the above two methods also apply to this method.
5702
5703 <note>
5704 The machine must not be running, otherwise the operation
5705 will fail.
5706 </note>
5707
5708 <note>
5709 If the machine state is <link to="MachineState_Saved">Saved</link>
5710 prior to this operation, the saved state file will be implicitly
5711 discarded (as if <link to="#discardSavedState()"/> were
5712 called).
5713 </note>
5714
5715 <note>
5716 This method is more efficient than calling both of the above
5717 methods separately: it requires less IPC calls and provides
5718 a single progress object.
5719 </note>
5720
5721 <result name="VBOX_E_INVALID_VM_STATE">
5722 Virtual machine is running.
5723 </result>
5724 </desc>
5725 <param name="progress" type="IProgress" dir="return">
5726 <desc>Progress object to track the operation completion.</desc>
5727 </param>
5728 </method>
5729
5730 <method name="registerCallback">
5731 <desc>
5732 Registers a new console callback on this instance. The methods of the
5733 callback interface will be called by this instance when the appropriate
5734 event occurs.
5735 </desc>
5736 <param name="callback" type="IConsoleCallback" dir="in"/>
5737 </method>
5738
5739 <method name="unregisterCallback">
5740 <desc>
5741 Unregisters the console callback previously registered using
5742 <link to="#registerCallback"/>.
5743 <result name="E_INVALIDARG">
5744 Given @a callback handler is not registered.
5745 </result>
5746 </desc>
5747 <param name="callback" type="IConsoleCallback" dir="in"/>
5748 </method>
5749 </interface>
5750
5751 <!--
5752 // IHost
5753 /////////////////////////////////////////////////////////////////////////
5754 -->
5755
5756 <interface
5757 name="IHostDVDDrive" extends="$unknown"
5758 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
5759 wsmap="managed"
5760 >
5761 <desc>
5762 The IHostDVDDrive interface represents the physical CD/DVD drive
5763 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5764 </desc>
5765
5766 <attribute name="name" type="wstring" readonly="yes">
5767 <desc>
5768 Returns the platform-specific device identifier.
5769 On DOS-like platforms, it is a drive name (e.g. R:).
5770 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5771 </desc>
5772 </attribute>
5773 <attribute name="description" type="wstring" readonly="yes">
5774 <desc>
5775 Returns a human readable description for the drive. This
5776 description usually contains the product and vendor name. A
5777 @c null string is returned if the description is not available.
5778 </desc>
5779 </attribute>
5780 <attribute name="udi" type="wstring" readonly="yes">
5781 <desc>
5782 Returns the unique device identifier for the drive. This
5783 attribute is reserved for future use instead of
5784 <link to="#name"/>. Currently it is not used and may return
5785 @c null on some platforms.
5786 </desc>
5787 </attribute>
5788
5789 </interface>
5790
5791 <enumerator
5792 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5793 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5794 />
5795
5796 <collection
5797 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5798 enumerator="IHostDVDDriveEnumerator"
5799 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5800 readonly="yes"
5801 >
5802 <method name="findByName">
5803 <desc>
5804 Searches this collection for a host drive with the given name.
5805 <note>
5806 The method returns an error if the given name does not
5807 correspond to any host drive in the collection.
5808 </note>
5809 </desc>
5810 <param name="name" type="wstring" dir="in">
5811 <desc>Name of the host drive to search for</desc>
5812 </param>
5813 <param name="drive" type="IHostDVDDrive" dir="return">
5814 <desc>Found host drive object</desc>
5815 </param>
5816 </method>
5817 </collection>
5818
5819 <interface
5820 name="IHostFloppyDrive" extends="$unknown"
5821 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5822 wsmap="managed"
5823 >
5824 <desc>
5825 The IHostFloppyDrive interface represents the physical floppy drive
5826 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5827 </desc>
5828 <attribute name="name" type="wstring" readonly="yes">
5829 <desc>
5830 Returns the platform-specific device identifier.
5831 On DOS-like platforms, it is a drive name (e.g. A:).
5832 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5833 </desc>
5834 </attribute>
5835 <attribute name="description" type="wstring" readonly="yes">
5836 <desc>
5837 Returns a human readable description for the drive. This
5838 description usually contains the product and vendor name. A
5839 @c null string is returned if the description is not available.
5840 </desc>
5841 </attribute>
5842 <attribute name="udi" type="wstring" readonly="yes">
5843 <desc>
5844 Returns the unique device identifier for the drive. This
5845 attribute is reserved for future use instead of
5846 <link to="#name"/>. Currently it is not used and may return
5847 @c null on some platforms.
5848 </desc>
5849 </attribute>
5850 </interface>
5851
5852 <enumerator
5853 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5854 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5855 />
5856
5857 <collection
5858 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5859 enumerator="IHostFloppyDriveEnumerator"
5860 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5861 readonly="yes"
5862 >
5863 <method name="findByName">
5864 <desc>
5865 Searches this collection for a host drive with the given name.
5866 <note>
5867 The method returns an error if the given name does not
5868 correspond to any host drive in the collection.
5869 </note>
5870 </desc>
5871 <param name="name" type="wstring" dir="in">
5872 <desc>Name of the host drive to search for</desc>
5873 </param>
5874 <param name="drive" type="IHostFloppyDrive" dir="return">
5875 <desc>Found host drive object</desc>
5876 </param>
5877 </method>
5878 </collection>
5879
5880 <enum
5881 name="HostNetworkInterfaceType"
5882 uuid="763754FA-3246-4539-9590-9E603EDBF706"
5883 >
5884 <desc>
5885 Type of encapsulation. Ethernet encapsulation includes both wired and
5886 wireless Ethernet connections.
5887 <see>IHostNetworkInterface</see>
5888 </desc>
5889
5890 <const name="Unknown" value="0">
5891 <desc>
5892 The type of interface cannot be determined.
5893 </desc>
5894 </const>
5895 <const name="Ethernet" value="1">
5896 <desc>
5897 Ethernet frame encapsulation.
5898 </desc>
5899 </const>
5900 <const name="PPP" value="2">
5901 <desc>
5902 Point-to-point protocol encapsulation.
5903 </desc>
5904 </const>
5905 <const name="SLIP" value="3">
5906 <desc>
5907 Serial line IP encapsulation.
5908 </desc>
5909 </const>
5910 </enum>
5911
5912 <enum
5913 name="HostNetworkInterfaceStatus"
5914 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
5915 >
5916 <desc>
5917 Current status of the interface.
5918 <see>IHostNetworkInterface</see>
5919 </desc>
5920
5921 <const name="Unknown" value="0">
5922 <desc>
5923 The state of interface cannot be determined.
5924 </desc>
5925 </const>
5926 <const name="Up" value="1">
5927 <desc>
5928 The interface is fully operational.
5929 </desc>
5930 </const>
5931 <const name="Down" value="2">
5932 <desc>
5933 The interface is not functioning.
5934 </desc>
5935 </const>
5936 </enum>
5937
5938 <interface
5939 name="IHostNetworkInterface" extends="$unknown"
5940 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
5941 wsmap="managed"
5942 >
5943 <desc>
5944 Reprents one of host's network interfaces. IP V6 address and network
5945 mask are strings of 32 hexdecimal digits grouped by four. Groups are
5946 separated by colons.
5947 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
5948 </desc>
5949 <attribute name="name" type="wstring" readonly="yes">
5950 <desc>Returns the host network interface name.</desc>
5951 </attribute>
5952
5953 <attribute name="id" type="uuid" readonly="yes">
5954 <desc>Returns the interface UUID.</desc>
5955 </attribute>
5956
5957 <attribute name="IPAddress" type="unsigned long" readonly="yes">
5958 <desc>Returns the IP V4 address of the interface.</desc>
5959 </attribute>
5960
5961 <attribute name="networkMask" type="unsigned long" readonly="yes">
5962 <desc>Returns the network mask of the interface.</desc>
5963 </attribute>
5964
5965 <attribute name="IPV6Address" type="wstring" readonly="yes">
5966 <desc>Returns the IP V6 address of the interface.</desc>
5967 </attribute>
5968
5969 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
5970 <desc>Returns the IP V6 network mask of the interface.</desc>
5971 </attribute>
5972
5973 <attribute name="hardwareAddress" type="wstring" readonly="yes">
5974 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
5975 </attribute>
5976
5977 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
5978 <desc>Type of protocol encapsulation used.</desc>
5979 </attribute>
5980
5981 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
5982 <desc>Status of the interface.</desc>
5983 </attribute>
5984 </interface>
5985
5986 <interface
5987 name="IHost" extends="$unknown"
5988 uuid="f39438d7-abfd-409b-bc80-5f5291d92897"
5989 wsmap="managed"
5990 >
5991 <desc>
5992 The IHost interface represents the physical machine that this VirtualBox
5993 installation runs on.
5994
5995 An object implementing this interface is returned by the
5996 <link to="IVirtualBox::host" /> attribute. This interface contains
5997 read-only information about the host's physical hardware (such as what
5998 processors and disks are available, what the host operating system is,
5999 and so on) and also allows for manipulating some of the host's hardware,
6000 such as global USB device filters and host interface networking.
6001
6002 </desc>
6003 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6004 <desc>List of DVD drives available on the host.</desc>
6005 </attribute>
6006
6007 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6008 <desc>List of floppy drives available on the host.</desc>
6009 </attribute>
6010
6011 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6012 <desc>
6013 List of USB devices currently attached to the host.
6014 Once a new device is physically attached to the host computer,
6015 it appears in this list and remains there until detached.
6016
6017 <note>
6018 This method may set a @ref com_warnings "warning result code".
6019 </note>
6020 <note>
6021 If USB functionality is not available in the given edition of
6022 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6023 </note>
6024 </desc>
6025 </attribute>
6026
6027 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6028 <desc>
6029 List of USB device filters in action.
6030 When a new device is physically attached to the host computer,
6031 filters from this list are applied to it (in order they are stored
6032 in the list). The first matched filter will determine the
6033 <link to="IHostUSBDeviceFilter::action">action</link>
6034 performed on the device.
6035
6036 Unless the device is ignored by these filters, filters of all
6037 currently running virtual machines
6038 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6039
6040 <note>
6041 This method may set a @ref com_warnings "warning result code".
6042 </note>
6043 <note>
6044 If USB functionality is not available in the given edition of
6045 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6046 </note>
6047
6048 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6049 </desc>
6050 </attribute>
6051
6052 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6053 <desc>List of host network interfaces currently defined on the host.</desc>
6054 </attribute>
6055
6056 <attribute name="processorCount" type="unsigned long" readonly="yes">
6057 <desc>Number of (logical) CPUs installed in the host system.</desc>
6058 </attribute>
6059
6060 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6061 <desc>Number of (logical) CPUs online in the host system.</desc>
6062 </attribute>
6063
6064 <method name="getProcessorSpeed">
6065 <desc>Query the (approximate) maximum speed of a specified host CPU in
6066 Megahertz.
6067 </desc>
6068 <param name="cpuId" type="unsigned long" dir="in">
6069 <desc>
6070 Identifier of the CPU.
6071 </desc>
6072 </param>
6073 <param name="speed" type="unsigned long" dir="return">
6074 <desc>
6075 Speed value. 0 is returned if value is not known or @a cpuId is
6076 invalid.
6077 </desc>
6078 </param>
6079 </method>
6080
6081 <method name="getProcessorFeature">
6082 <desc>Query whether a CPU feature is supported or not.</desc>
6083 <param name="feature" type="ProcessorFeature" dir="in">
6084 <desc>
6085 CPU Feature identifier.
6086 </desc>
6087 </param>
6088 <param name="supported" type="boolean" dir="return">
6089 <desc>
6090 Feature is supported or not.
6091 </desc>
6092 </param>
6093 </method>
6094
6095 <method name="getProcessorDescription">
6096 <desc>Query the model string of a specified host CPU.
6097 <note>
6098 This function is not implemented in the current version of the
6099 product.
6100 </note>
6101 </desc>
6102 <param name="cpuId" type="unsigned long" dir="in">
6103 <desc>
6104 Identifier of the CPU.
6105 </desc>
6106 </param>
6107 <param name="description" type="wstring" dir="return">
6108 <desc>
6109 Model string. A NULL string is returned if value is not known or
6110 @a cpuId is invalid.
6111 </desc>
6112 </param>
6113 </method>
6114
6115 <attribute name="memorySize" type="unsigned long" readonly="yes">
6116 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6117 </attribute>
6118
6119 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6120 <desc>Available system memory in the host system.</desc>
6121 </attribute>
6122
6123 <attribute name="operatingSystem" type="wstring" readonly="yes">
6124 <desc>Name of the host system's operating system.</desc>
6125 </attribute>
6126
6127 <attribute name="OSVersion" type="wstring" readonly="yes">
6128 <desc>Host operating system's version string.</desc>
6129 </attribute>
6130
6131 <attribute name="UTCTime" type="long long" readonly="yes">
6132 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6133 </attribute>
6134
6135<if target="midl">
6136 <method name="createHostNetworkInterface">
6137 <desc>
6138 Creates a new adapter for Host Interface Networking.
6139 <result name="E_INVALIDARG">
6140 Host network interface @a name already exists.
6141 </result>
6142 </desc>
6143 <param name="name" type="wstring" dir="in">
6144 <desc>
6145 Adapter name.
6146 </desc>
6147 </param>
6148 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6149 <desc>
6150 Created host interface object.
6151 </desc>
6152 </param>
6153 <param name="progress" type="IProgress" dir="return">
6154 <desc>
6155 Progress object to track the operation completion.
6156 </desc>
6157 </param>
6158 </method>
6159 <method name="removeHostNetworkInterface">
6160 <desc>
6161 Removes the given host network interface.
6162 <result name="VBOX_E_OBJECT_NOT_FOUND">
6163 No host network interface matching @a id found.
6164 </result>
6165 </desc>
6166 <param name="id" type="uuid" dir="in">
6167 <desc>
6168 Adapter GUID.
6169 </desc>
6170 </param>
6171 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6172 <desc>
6173 Removed host interface object.
6174 </desc>
6175 </param>
6176 <param name="progress" type="IProgress" dir="return">
6177 <desc>
6178 Progress object to track the operation completion.
6179 </desc>
6180 </param>
6181 </method>
6182</if>
6183
6184 <method name="createUSBDeviceFilter">
6185 <desc>
6186 Creates a new USB device filter. All attributes except
6187 the filter name are set to <tt>null</tt> (any match),
6188 <i>active</i> is <tt>false</tt> (the filter is not active).
6189
6190 The created filter can be added to the list of filters using
6191 <link to="#insertUSBDeviceFilter()"/>.
6192
6193 <see>#USBDeviceFilters</see>
6194 </desc>
6195 <param name="name" type="wstring" dir="in">
6196 <desc>
6197 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6198 for more info.
6199 </desc>
6200 </param>
6201 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6202 <desc>Created filter object.</desc>
6203 </param>
6204 </method>
6205
6206 <method name="insertUSBDeviceFilter">
6207 <desc>
6208 Inserts the given USB device to the specified position
6209 in the list of filters.
6210
6211 Positions are numbered starting from <tt>0</tt>. If the specified
6212 position is equal to or greater than the number of elements in
6213 the list, the filter is added at the end of the collection.
6214
6215 <note>
6216 Duplicates are not allowed, so an attempt to insert a
6217 filter that is already in the list, will return an
6218 error.
6219 </note>
6220 <note>
6221 This method may set a @ref com_warnings "warning result code".
6222 </note>
6223 <note>
6224 If USB functionality is not available in the given edition of
6225 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6226 </note>
6227
6228 <see>#USBDeviceFilters</see>
6229
6230 <result name="VBOX_E_INVALID_OBJECT_STATE">
6231 USB device filter is not created within this VirtualBox instance.
6232 </result>
6233 <result name="E_INVALIDARG">
6234 USB device filter already in list.
6235 </result>
6236
6237 </desc>
6238 <param name="position" type="unsigned long" dir="in">
6239 <desc>Position to insert the filter to.</desc>
6240 </param>
6241 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6242 <desc>USB device filter to insert.</desc>
6243 </param>
6244 </method>
6245
6246 <method name="removeUSBDeviceFilter">
6247 <desc>
6248 Removes a USB device filter from the specified position in the
6249 list of filters.
6250
6251 Positions are numbered starting from <tt>0</tt>. Specifying a
6252 position equal to or greater than the number of elements in
6253 the list will produce an error.
6254
6255 <note>
6256 This method may set a @ref com_warnings "warning result code".
6257 </note>
6258 <note>
6259 If USB functionality is not available in the given edition of
6260 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6261 </note>
6262
6263 <see>#USBDeviceFilters</see>
6264
6265 <result name="E_INVALIDARG">
6266 USB device filter list empty or invalid @a position.
6267 </result>
6268
6269 </desc>
6270 <param name="position" type="unsigned long" dir="in">
6271 <desc>Position to remove the filter from.</desc>
6272 </param>
6273 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6274 <desc>Removed USB device filter.</desc>
6275 </param>
6276 </method>
6277
6278 </interface>
6279
6280 <!--
6281 // ISystemProperties
6282 /////////////////////////////////////////////////////////////////////////
6283 -->
6284
6285 <interface
6286 name="ISystemProperties"
6287 extends="$unknown"
6288 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6289 wsmap="managed"
6290 >
6291 <desc>
6292 The ISystemProperties interface represents global properties of the given
6293 VirtualBox installation.
6294
6295 These properties define limits and default values for various attributes
6296 and parameters. Most of the properties are read-only, but some can be
6297 changed by a user.
6298 </desc>
6299
6300 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6301 <desc>Minimum guest system memory in Megabytes.</desc>
6302 </attribute>
6303
6304 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6305 <desc>Maximum guest system memory in Megabytes.</desc>
6306 </attribute>
6307
6308 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6309 <desc>Minimum guest video memory in Megabytes.</desc>
6310 </attribute>
6311
6312 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6313 <desc>Maximum guest video memory in Megabytes.</desc>
6314 </attribute>
6315
6316 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6317 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6318 </attribute>
6319
6320 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6321 <desc>
6322 Number of network adapters associated with every
6323 <link to="IMachine"/> instance.
6324 </desc>
6325 </attribute>
6326
6327 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6328 <desc>
6329 Number of serial ports associated with every
6330 <link to="IMachine"/> instance.
6331 </desc>
6332 </attribute>
6333
6334 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6335 <desc>
6336 Number of parallel ports associated with every
6337 <link to="IMachine"/> instance.
6338 </desc>
6339 </attribute>
6340
6341 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6342 <desc>
6343 Maximum device position in the boot order. This value corresponds
6344 to the total number of devices a machine can boot from, to make it
6345 possible to include all possible devices to the boot list.
6346 <see><link to="IMachine::setBootOrder()"/></see>
6347 </desc>
6348 </attribute>
6349
6350 <attribute name="defaultMachineFolder" type="wstring">
6351 <desc>
6352 Full path to the default directory used to create new or open
6353 existing machines when a settings file name contains no
6354 path.
6355
6356 The initial value of this property is
6357 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6358 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6359
6360 <note>
6361 Setting this property to <tt>null</tt> will restore the
6362 initial value.
6363 </note>
6364 <note>
6365 When settings this property, the specified path can be
6366 absolute (full path) or relative
6367 to the <link to="IVirtualBox::homeFolder">
6368 VirtualBox home directory</link>.
6369 When reading this property, a full path is
6370 always returned.
6371 </note>
6372 <note>
6373 The specified path may not exist, it will be created
6374 when necessary.
6375 </note>
6376
6377 <see>
6378 <link to="IVirtualBox::createMachine()"/>,
6379 <link to="IVirtualBox::openMachine()"/>
6380 </see>
6381 </desc>
6382 </attribute>
6383
6384 <attribute name="defaultHardDiskFolder" type="wstring">
6385 <desc>
6386 Full path to the default directory used to create new or open existing
6387 virtual disks.
6388
6389 This path is used when the storage unit of a hard disk is a regular file
6390 in the host's file system and only a file name that contains no path is
6391 given.
6392
6393 The initial value of this property is
6394 <tt>&lt;</tt>
6395 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6396 <tt>&gt;/HardDisks</tt>.
6397
6398 <note>
6399 Setting this property to <tt>null</tt> will restore the
6400 initial value.
6401 </note>
6402 <note>
6403 When settings this property, the specified path can be relative
6404 to the
6405 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6406 absolute. When reading this property, a full path is
6407 always returned.
6408 </note>
6409 <note>
6410 The specified path may not exist, it will be created
6411 when necessary.
6412 </note>
6413
6414 <see>
6415 IHardDisk2,
6416 <link to="IVirtualBox::createHardDisk2()"/>,
6417 <link to="IVirtualBox::openHardDisk2()"/>,
6418 <link to="IMedium::location"/>
6419 </see>
6420 </desc>
6421 </attribute>
6422
6423 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6424 <desc>
6425 List of all hard disk storage formats supported by this VirtualBox
6426 installation.
6427
6428 Keep in mind that the hard disk format identifier
6429 (<link to="IHardDiskFormat::id"/>) used in other API calls like
6430 <link to="IVirtualBox::createHardDisk2()"/> to refer to a particular
6431 hard disk format is a case-insensitive string. This means that, for
6432 example, all of the following strings:
6433 <pre>
6434 "VDI"
6435 "vdi"
6436 "VdI"</pre>
6437 refer to the same hard disk format.
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 <method name="compact">
8507 <desc>
8508 Starts compacting of this hard disk. This means that the disk is
8509 transformed into a possibly more compact storage representation.
8510 This potentially creates temporary images, which can require a
8511 substantial amount of additional disk space.
8512
8513 After the returned progress object reports that the operation is
8514 successfully complete, the media state will be set back to the
8515 current state.
8516
8517 <note>
8518 This hard disk and all its parent hard disks will be placed to <link
8519 to="MediaState_LockedRead"/> state for the duration of this
8520 operation.
8521 </note>
8522 </desc>
8523 <param name="progress" type="IProgress" dir="return">
8524 <desc>Progress object to track the operation completion.</desc>
8525 </param>
8526 </method>
8527
8528 </interface>
8529
8530
8531 <!--
8532 // IHardDiskFormat
8533 /////////////////////////////////////////////////////////////////////////
8534 -->
8535
8536 <enum
8537 name="DataType"
8538 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
8539 >
8540 <const name="Int32" value="0"/>
8541 <const name="Int8" value="1"/>
8542 <const name="String" value="2"/>
8543 </enum>
8544
8545 <enum
8546 name="DataFlags"
8547 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
8548 >
8549 <const name="None" value="0x00"/>
8550 <const name="Mandatory" value="0x01"/>
8551 <const name="Expert" value="0x02"/>
8552 <const name="Array" value="0x04"/>
8553 <const name="FlagMask" value="0x07"/>
8554 </enum>
8555
8556 <enum
8557 name="HardDiskFormatCapabilities"
8558 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
8559 >
8560 <desc>
8561 Hard disk format capability flags.
8562 </desc>
8563
8564 <const name="Uuid" value="0x01">
8565 <desc>
8566 Supports UUIDs as expected by VirtualBox code.
8567 </desc>
8568 </const>
8569
8570 <const name="CreateFixed" value="0x02">
8571 <desc>
8572 Supports creating fixed size images, allocating all space instantly.
8573 </desc>
8574 </const>
8575
8576 <const name="CreateDynamic" value="0x04">
8577 <desc>
8578 Supports creating dynamically growing images, allocating space on
8579 demand.
8580 </desc>
8581 </const>
8582
8583 <const name="CreateSplit2G" value="0x08">
8584 <desc>
8585 Supports creating images split in chunks of a bit less than 2 GBytes.
8586 </desc>
8587 </const>
8588
8589 <const name="Differencing" value="0x10">
8590 <desc>
8591 Supports being used as a format for differencing hard disks (see <link
8592 to="IHardDisk2::createDiffStorage"/>).
8593 </desc>
8594 </const>
8595
8596 <const name="Asynchronous" value="0x20">
8597 <desc>
8598 Supports asynchronous I/O operations for at least some configurations.
8599 </desc>
8600 </const>
8601
8602 <const name="File" value="0x40">
8603 <desc>
8604 The format backend operates on files (the <link to="IMedium::location"/>
8605 attribute of the hard disk specifies a file used to store hard disk
8606 data; for a list of supported file extensions see
8607 <link to="IHardDiskFormat::fileExtensions"/>).
8608 </desc>
8609 </const>
8610
8611 <const name="Properties" value="0x80">
8612 <desc>
8613 The format backend uses the property interface to configure the storage
8614 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
8615 method is used to get access to properties supported by the given hard
8616 disk format).
8617 </desc>
8618 </const>
8619
8620 <const name="CapabilityMask" value="0xFF"/>
8621 </enum>
8622
8623 <interface
8624 name="IHardDiskFormat" extends="$unknown"
8625 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
8626 wsmap="managed"
8627 >
8628 <desc>
8629 The IHardDiskFormat interface represents a virtual hard disk format.
8630
8631 Each hard disk format has an associated backend which is used to handle
8632 hard disks stored in this format. This interface provides information
8633 about the properties of the associated backend.
8634
8635 Each hard disk format is identified by a string represented by the
8636 <link to="#id"/> attribute. This string is used in calls like
8637 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
8638 format.
8639
8640 The list of all supported hard disk formats can be obtained using
8641 <link to="ISystemProperties::hardDiskFormats"/>.
8642
8643 <see>IHardDisk2</see>
8644 </desc>
8645
8646 <attribute name="id" type="wstring" readonly="yes">
8647 <desc>
8648 Identifier of this format.
8649
8650 The format identifier is a non-null non-empty ASCII string. Note that
8651 this string is case-insensitive. This means that, for example, all of
8652 the following strings:
8653 <pre>
8654 "VDI"
8655 "vdi"
8656 "VdI"</pre>
8657 refer to the same hard disk format.
8658
8659 This string is used in methods of other interfaces where it is necessary
8660 to specify a hard disk format, such as
8661 <link to="IVirtualBox::createHardDisk2()"/>.
8662 </desc>
8663 </attribute>
8664
8665 <attribute name="name" type="wstring" readonly="yes">
8666 <desc>
8667 Human readable description of this format.
8668
8669 Mainly for use in file open dialogs.
8670 </desc>
8671 </attribute>
8672
8673 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
8674 <desc>
8675 Array of strings containing the supported file extensions.
8676
8677 The first extension in the array is the extension preferred by the
8678 backend. It is recommended to use this extension when specifying a
8679 location of the storage unit for a new hard disk.
8680
8681 Note that some backends do not work on files, so this array may be
8682 empty.
8683
8684 <see>IHardDiskFormat::capabilities</see>
8685 </desc>
8686 </attribute>
8687
8688 <attribute name="capabilities" type="unsigned long" readonly="yes">
8689 <desc>
8690 Capabilities of the format as a set of bit flags.
8691
8692 For the meaning of individual capability flags see
8693 <link to="HardDiskFormatCapabilities"/>.
8694 </desc>
8695 </attribute>
8696
8697 <method name="describeProperties">
8698 <desc>
8699 Returns several arrays describing the properties supported by this
8700 format.
8701
8702 An element with the given index in each array describes one
8703 property. Thus, the number of elements in each returned array is the
8704 same and corresponds to the number of supported properties.
8705
8706 The returned arrays are filled in only if the
8707 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
8708 All arguments must be non-NULL.
8709
8710 <see>DataType</see>
8711 <see>DataFlags</see>
8712 </desc>
8713
8714 <param name="names" type="wstring" safearray="yes" dir="out">
8715 <desc>Array of property names.</desc>
8716 </param>
8717 <param name="description" type="wstring" safearray="yes" dir="out">
8718 <desc>Array of property descriptions.</desc>
8719 </param>
8720 <param name="types" type="DataType" safearray="yes" dir="out">
8721 <desc>Array of property types.</desc>
8722 </param>
8723 <param name="flags" type="unsigned long" safearray="yes" dir="out">
8724 <desc>Array of property flags.</desc>
8725 </param>
8726 <param name="defaults" type="wstring" safearray="yes" dir="out">
8727 <desc>Array of default property values.</desc>
8728 </param>
8729 </method>
8730
8731 </interface>
8732
8733
8734 <!--
8735 // IFloppyImage2
8736 /////////////////////////////////////////////////////////////////////////
8737 -->
8738
8739 <interface
8740 name="IFloppyImage2" extends="IMedium"
8741 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
8742 wsmap="managed"
8743 >
8744 <desc>
8745 The IFloppyImage2 interface represents a medium containing the image
8746 of a floppy disk.
8747 </desc>
8748
8749 </interface>
8750
8751
8752 <!--
8753 // IDVDImage2
8754 /////////////////////////////////////////////////////////////////////////
8755 -->
8756
8757 <interface
8758 name="IDVDImage2" extends="IMedium"
8759 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
8760 wsmap="managed"
8761 >
8762 <desc>
8763 The IDVDImage2 interface represents a medium containing the image
8764 of a CD or DVD disk in the ISO format.
8765 </desc>
8766
8767 </interface>
8768
8769
8770 <!--
8771 // IDVDDrive
8772 /////////////////////////////////////////////////////////////////////////
8773 -->
8774
8775 <interface
8776 name="IDVDDrive" extends="$unknown"
8777 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
8778 wsmap="managed"
8779 >
8780 <desc>
8781 The IDVDDrive interface represents the virtual CD/DVD drive of the
8782 virtual machine. An object of this type is returned by
8783 <link to="IMachine::DVDDrive"/>.
8784 </desc>
8785
8786 <attribute name="state" type="DriveState" readonly="yes">
8787 <desc>Current drive state.</desc>
8788 </attribute>
8789
8790 <attribute name="passthrough" type="boolean">
8791 <desc>
8792 When a host drive is mounted and passthrough is enabled
8793 the guest OS will be able to directly send SCSI commands to
8794 the host drive. This enables the guest OS to use CD/DVD writers
8795 but is potentially dangerous.
8796 </desc>
8797 </attribute>
8798
8799 <method name="mountImage">
8800 <desc>Mounts a CD/DVD image with the specified UUID.
8801
8802 <result name="VBOX_E_FILE_ERROR">
8803 Invalid image file location.
8804 </result>
8805 <result name="VBOX_E_OBJECT_NOT_FOUND">
8806 Could not find a CD/DVD image matching @a imageID.
8807 </result>
8808 <result name="VBOX_E_INVALID_OBJECT_STATE">
8809 Invalid media state.
8810 </result>
8811
8812 </desc>
8813 <param name="imageId" type="uuid" dir="in"/>
8814 </method>
8815
8816 <method name="captureHostDrive">
8817 <desc>Captures the specified host CD/DVD drive.</desc>
8818 <param name="drive" type="IHostDVDDrive" dir="in"/>
8819 </method>
8820
8821 <method name="unmount">
8822 <desc>Unmounts the currently mounted image or host drive.</desc>
8823 </method>
8824
8825 <method name="getImage">
8826 <desc>Returns the currently mounted CD/DVD image.</desc>
8827 <param name="image" type="IDVDImage2" dir="return"/>
8828 </method>
8829
8830 <method name="getHostDrive">
8831 <desc>Returns the currently mounted host CD/DVD drive.</desc>
8832 <param name="drive" type="IHostDVDDrive" dir="return"/>
8833 </method>
8834
8835 </interface>
8836
8837
8838 <!--
8839 // IFloppyDrive
8840 /////////////////////////////////////////////////////////////////////////
8841 -->
8842
8843 <interface
8844 name="IFloppyDrive" extends="$unknown"
8845 uuid="159412cd-bab8-452e-8097-218a020825a6"
8846 wsmap="managed"
8847 >
8848 <desc>
8849 The IFloppyDrive interface represents the virtual floppy drive of the
8850 virtual machine. An object of this type is returned by
8851 <link to="IMachine::floppyDrive" />.
8852 </desc>
8853
8854 <attribute name="enabled" type="boolean">
8855 <desc>
8856 Flag whether the floppy drive is enabled. If it is disabled,
8857 the floppy drive will not be reported to the guest OS.
8858 </desc>
8859 </attribute>
8860
8861 <attribute name="state" type="DriveState" readonly="yes">
8862 <desc>Current drive state.</desc>
8863 </attribute>
8864
8865 <method name="mountImage">
8866 <desc>Mounts a floppy image with the specified UUID.
8867
8868 <result name="VBOX_E_FILE_ERROR">
8869 Invalid image file location.
8870 </result>
8871 <result name="VBOX_E_OBJECT_NOT_FOUND">
8872 Could not find a floppy image matching @a imageID.
8873 </result>
8874 <result name="VBOX_E_INVALID_OBJECT_STATE">
8875 Invalid media state.
8876 </result>
8877
8878 </desc>
8879 <param name="imageId" type="uuid" dir="in"/>
8880 </method>
8881
8882 <method name="captureHostDrive">
8883 <desc>Captures the specified host floppy drive.</desc>
8884 <param name="drive" type="IHostFloppyDrive" dir="in"/>
8885 </method>
8886
8887 <method name="unmount">
8888 <desc>Unmounts the currently mounted image or host drive.</desc>
8889 </method>
8890
8891 <method name="getImage">
8892 <desc>Returns the currently mounted floppy image.</desc>
8893 <param name="image" type="IFloppyImage2" dir="return"/>
8894 </method>
8895
8896 <method name="getHostDrive">
8897 <desc>Returns the currently mounted host floppy drive.</desc>
8898 <param name="drive" type="IHostFloppyDrive" dir="return"/>
8899 </method>
8900
8901 </interface>
8902
8903
8904 <!--
8905 // IKeyboard
8906 /////////////////////////////////////////////////////////////////////////
8907 -->
8908
8909 <interface
8910 name="IKeyboard" extends="$unknown"
8911 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
8912 wsmap="managed"
8913 >
8914 <desc>
8915 The IKeyboard interface represents the virtual machine's keyboard. Used
8916 in <link to="IConsole::keyboard"/>.
8917
8918 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
8919 to the virtual machine.
8920
8921 </desc>
8922 <method name="putScancode">
8923 <desc>Sends a scancode to the keyboard.
8924
8925 <result name="VBOX_E_IPRT_ERROR">
8926 Could not send scan code to virtual keyboard.
8927 </result>
8928
8929 </desc>
8930 <param name="scancode" type="long" dir="in"/>
8931 </method>
8932
8933 <method name="putScancodes">
8934 <desc>Sends an array of scancodes to the keyboard.
8935
8936 <result name="VBOX_E_IPRT_ERROR">
8937 Could not send all scan codes to virtual keyboard.
8938 </result>
8939
8940 </desc>
8941 <param name="scancodes" type="long" dir="in" safearray="yes"/>
8942 <param name="codesStored" type="unsigned long" dir="return"/>
8943 </method>
8944
8945 <method name="putCAD">
8946 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
8947 function is nothing special, it is just a convenience function
8948 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
8949
8950 <result name="VBOX_E_IPRT_ERROR">
8951 Could not send all scan codes to virtual keyboard.
8952 </result>
8953
8954 </desc>
8955 </method>
8956
8957 </interface>
8958
8959
8960 <!--
8961 // IMouse
8962 /////////////////////////////////////////////////////////////////////////
8963 -->
8964
8965 <enum
8966 name="MouseButtonState"
8967 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
8968 >
8969 <desc>
8970 Mouse button state.
8971 </desc>
8972
8973 <const name="LeftButton" value="0x01"/>
8974 <const name="RightButton" value="0x02"/>
8975 <const name="MiddleButton" value="0x04"/>
8976 <const name="WheelUp" value="0x08"/>
8977 <const name="WheelDown" value="0x10"/>
8978 <const name="MouseStateMask" value="0x1F"/>
8979 </enum>
8980
8981 <interface
8982 name="IMouse" extends="$unknown"
8983 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
8984 wsmap="managed"
8985 >
8986 <desc>
8987 The IMouse interface represents the virtual machine's mouse. Used in
8988 <link to="IConsole::mouse"/>.
8989
8990 Through this interface, the virtual machine's virtual mouse can be
8991 controlled.
8992 </desc>
8993
8994 <attribute name="absoluteSupported" type="boolean" readonly="yes">
8995 <desc>
8996 Whether the guest OS supports absolute mouse pointer positioning
8997 or not.
8998 <note>
8999 VirtualBox Guest Tools need to be installed to the guest OS
9000 in order to enable absolute mouse positioning support.
9001 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9002 callback to be instantly informed about changes of this attribute
9003 during virtual machine execution.
9004 </note>
9005 <see><link to="#putMouseEventAbsolute"/></see>
9006 </desc>
9007 </attribute>
9008
9009 <method name="putMouseEvent">
9010 <desc>
9011 Initiates a mouse event using relative pointer movements
9012 along x and y axis.
9013
9014 <result name="E_ACCESSDENIED">
9015 Console not powered up.
9016 </result>
9017 <result name="VBOX_E_IPRT_ERROR">
9018 Could not send mouse event to virtual mouse.
9019 </result>
9020
9021 </desc>
9022
9023 <param name="dx" type="long" dir="in">
9024 <desc>
9025 Amount of pixels the mouse should move to the right.
9026 Negative values move the mouse to the left.
9027 </desc>
9028 </param>
9029 <param name="dy" type="long" dir="in">
9030 <desc>
9031 Amount of pixels the mouse should move downwards.
9032 Negative values move the mouse upwards.
9033 </desc>
9034 </param>
9035 <param name="dz" type="long" dir="in">
9036 <desc>
9037 Amount of mouse wheel moves.
9038 Positive values describe clockwise wheel rotations,
9039 negative values describe counterclockwise rotations.
9040 </desc>
9041 </param>
9042 <param name="buttonState" type="long" dir="in">
9043 <desc>
9044 The current state of mouse buttons. Every bit represents
9045 a mouse button as follows:
9046 <table>
9047 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9048 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9049 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9050 </table>
9051 A value of <tt>1</tt> means the corresponding button is pressed.
9052 otherwise it is released.
9053 </desc>
9054 </param>
9055 </method>
9056
9057 <method name="putMouseEventAbsolute">
9058 <desc>
9059 Positions the mouse pointer using absolute x and y coordinates.
9060 These coordinates are expressed in pixels and
9061 start from <tt>[1,1]</tt> which corresponds to the top left
9062 corner of the virtual display.
9063
9064 <result name="E_ACCESSDENIED">
9065 Console not powered up.
9066 </result>
9067 <result name="VBOX_E_IPRT_ERROR">
9068 Could not send mouse event to virtual mouse.
9069 </result>
9070
9071 <note>
9072 This method will have effect only if absolute mouse
9073 positioning is supported by the guest OS.
9074 </note>
9075
9076 <see><link to="#absoluteSupported"/></see>
9077 </desc>
9078
9079 <param name="x" type="long" dir="in">
9080 <desc>
9081 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9082 </desc>
9083 </param>
9084 <param name="y" type="long" dir="in">
9085 <desc>
9086 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9087 </desc>
9088 </param>
9089 <param name="dz" type="long" dir="in">
9090 <desc>
9091 Amount of mouse wheel moves.
9092 Positive values describe clockwise wheel rotations,
9093 negative values describe counterclockwise rotations.
9094 </desc>
9095 </param>
9096 <param name="buttonState" type="long" dir="in">
9097 <desc>
9098 The current state of mouse buttons. Every bit represents
9099 a mouse button as follows:
9100 <table>
9101 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9102 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9103 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9104 </table>
9105 A value of <tt>1</tt> means the corresponding button is pressed.
9106 otherwise it is released.
9107 </desc>
9108 </param>
9109 </method>
9110
9111 </interface>
9112
9113 <!--
9114 // IDisplay
9115 /////////////////////////////////////////////////////////////////////////
9116 -->
9117
9118 <enum
9119 name="FramebufferAccelerationOperation"
9120 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9121 >
9122 <desc>
9123 Frame buffer acceleration operation.
9124 </desc>
9125
9126 <const name="SolidFillAcceleration" value="1"/>
9127 <const name="ScreenCopyAcceleration" value="2"/>
9128 </enum>
9129
9130 <enum
9131 name="FramebufferPixelFormat"
9132 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
9133 >
9134 <desc>
9135 Format of the video memory buffer. Constants represented by this enum can
9136 be used to test for particular values of <link
9137 to="IFramebuffer::pixelFormat"/>. See also <link
9138 to="IFramebuffer::requestResize()"/>.
9139
9140 See also www.fourcc.org for more information about FOURCC pixel formats.
9141 </desc>
9142
9143 <const name="Opaque" value="0xFFFFFFFF">
9144 <desc>
9145 Unknown buffer format (the user may not assume any particular format of
9146 the buffer).
9147 </desc>
9148 </const>
9149 <const name="FOURCC_RGB" value="0x32424752">
9150 <desc>
9151 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9152 bit layout).
9153 </desc>
9154 </const>
9155 </enum>
9156
9157 <interface
9158 name="IFramebuffer" extends="$unknown"
9159 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9160 wsmap="suppress"
9161 >
9162 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9163 <desc>Address of the start byte of the frame buffer.</desc>
9164 </attribute>
9165
9166 <attribute name="width" type="unsigned long" readonly="yes">
9167 <desc>Frame buffer width, in pixels.</desc>
9168 </attribute>
9169
9170 <attribute name="height" type="unsigned long" readonly="yes">
9171 <desc>Frame buffer height, in pixels.</desc>
9172 </attribute>
9173
9174 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9175 <desc>
9176 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9177 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9178 are: 8, 15, 16, 24 and 32.
9179 </desc>
9180 </attribute>
9181
9182 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9183 <desc>
9184 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9185 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9186 size of the scan line must be aligned to 32 bits.
9187 </desc>
9188 </attribute>
9189
9190 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9191 <desc>
9192 Frame buffer pixel format. It's either one of the values defined by <link
9193 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9194 <note>
9195 This attribute must never return <link
9196 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9197 <link to="#address"/> points to must be always known.
9198 </note>
9199 </desc>
9200 </attribute>
9201
9202 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9203 <desc>
9204 Defines whether this frame buffer uses the virtual video card's memory
9205 buffer (guest VRAM) directly or not. See <link
9206 to="IFramebuffer::requestResize()"/> for more information.
9207 </desc>
9208 </attribute>
9209
9210 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9211 <desc>
9212 Hint from the frame buffer about how much of the standard
9213 screen height it wants to use for itself. This information is
9214 exposed to the guest through the VESA BIOS and VMMDev interface
9215 so that it can use it for determining its video mode table. It
9216 is not guaranteed that the guest respects the value.
9217 </desc>
9218 </attribute>
9219
9220 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9221 <desc>
9222 An alpha-blended overlay which is superposed over the frame buffer.
9223 The initial purpose is to allow the display of icons providing
9224 information about the VM state, including disk activity, in front
9225 ends which do not have other means of doing that. The overlay is
9226 designed to controlled exclusively by IDisplay. It has no locking
9227 of its own, and any changes made to it are not guaranteed to be
9228 visible until the affected portion of IFramebuffer is updated. The
9229 overlay can be created lazily the first time it is requested. This
9230 attribute can also return NULL to signal that the overlay is not
9231 implemented.
9232 </desc>
9233 </attribute>
9234
9235 <attribute name="winId" type="unsigned long long" readonly="yes">
9236 <desc>
9237 Platform-dependent identifier of the window where context of this
9238 frame buffer is drawn, or zero if there's no such window.
9239 </desc>
9240 </attribute>
9241
9242 <method name="lock">
9243 <desc>
9244 Locks the frame buffer.
9245 Gets called by the IDisplay object where this frame buffer is
9246 bound to.
9247 </desc>
9248 </method>
9249
9250 <method name="unlock">
9251 <desc>
9252 Unlocks the frame buffer.
9253 Gets called by the IDisplay object where this frame buffer is
9254 bound to.
9255 </desc>
9256 </method>
9257
9258 <method name="notifyUpdate">
9259 <desc>
9260 Informs about an update.
9261 Gets called by the display object where this buffer is
9262 registered.
9263 </desc>
9264 <param name="x" type="unsigned long" dir="in"/>
9265 <param name="y" type="unsigned long" dir="in"/>
9266 <param name="width" type="unsigned long" dir="in"/>
9267 <param name="height" type="unsigned long" dir="in"/>
9268 <param name="finished" type="boolean" dir="return"/>
9269 </method>
9270
9271 <method name="requestResize">
9272 <desc>
9273 Requests a size and pixel format change.
9274
9275 There are two modes of working with the video buffer of the virtual
9276 machine. The <i>indirect</i> mode implies that the IFramebuffer
9277 implementation allocates a memory buffer for the requested display mode
9278 and provides it to the virtual machine. In <i>direct</i> mode, the
9279 IFramebuffer implementation uses the memory buffer allocated and owned
9280 by the virtual machine. This buffer represents the video memory of the
9281 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9282 usually faster because the implementation gets a raw pointer to the
9283 guest VRAM buffer which it can directly use for visualizing the contents
9284 of the virtual display, as opposed to the indirect mode where the
9285 contents of guest VRAM are copied to the memory buffer provided by
9286 the implementation every time a display update occurs.
9287
9288 It is important to note that the direct mode is really fast only when
9289 the implementation uses the given guest VRAM buffer directly, for
9290 example, by blitting it to the window representing the virtual machine's
9291 display, which saves at least one copy operation comparing to the
9292 indirect mode. However, using the guest VRAM buffer directly is not
9293 always possible: the format and the color depth of this buffer may be
9294 not supported by the target window, or it may be unknown (opaque) as in
9295 case of text or non-linear multi-plane VGA video modes. In this case,
9296 the indirect mode (that is always available) should be used as a
9297 fallback: when the guest VRAM contents are copied to the
9298 implementation-provided memory buffer, color and format conversion is
9299 done automatically by the underlying code.
9300
9301 The @a pixelFormat parameter defines whether the direct mode is
9302 available or not. If @a pixelFormat is <link
9303 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9304 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9305 bytesPerLine parameters must be ignored and the implementation must use
9306 the indirect mode (where it provides its own buffer in one of the
9307 supported formats). In all other cases, @a pixelFormat together with @a
9308 bitsPerPixel and @a bytesPerLine define the format of the video memory
9309 buffer pointed to by the @a VRAM parameter and the implementation is
9310 free to choose which mode to use. To indicate that this frame buffer uses
9311 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9312 attribute must return <tt>true</tt> and <link to="#address"/> must
9313 return exactly the same address that is passed in the @a VRAM parameter
9314 of this method; otherwise it is assumed that the indirect strategy is
9315 chosen.
9316
9317 The @a width and @a height parameters represent the size of the
9318 requested display mode in both modes. In case of indirect mode, the
9319 provided memory buffer should be big enough to store data of the given
9320 display mode. In case of direct mode, it is guaranteed that the given @a
9321 VRAM buffer contains enough space to represent the display mode of the
9322 given size. Note that this frame buffer's <link to="#width"/> and <link
9323 to="#height"/> attributes must return exactly the same values as
9324 passed to this method after the resize is completed (see below).
9325
9326 The @a finished output parameter determines if the implementation has
9327 finished resizing the frame buffer or not. If, for some reason, the
9328 resize cannot be finished immediately during this call, @a finished
9329 must be set to @c false, and the implementation must call
9330 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9331 this method as soon as possible. If @a finished is @c false, the
9332 machine will not call any frame buffer methods until
9333 <link to="IDisplay::resizeCompleted()"/> is called.
9334
9335 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9336 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9337 this frame buffer must return exactly the same values as specified in the
9338 parameters of this method, after the resize is completed. If the
9339 indirect mode is chosen, these attributes must return values describing
9340 the format of the implementation's own memory buffer <link
9341 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9342 value must always correlate with <link to="#pixelFormat"/>. Note that
9343 the <link to="#pixelFormat"/> attribute must never return <link
9344 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9345
9346 <note>
9347 This method is called by the IDisplay object under the
9348 <link to="#lock()"/> provided by this IFramebuffer
9349 implementation. If this method returns @c false in @a finished, then
9350 this lock is not released until
9351 <link to="IDisplay::resizeCompleted()"/> is called.
9352 </note>
9353 </desc>
9354 <param name="screenId" type="unsigned long" dir="in">
9355 <desc>
9356 Logical screen number. Must be used in the corresponding call to
9357 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9358 </desc>
9359 </param>
9360 <param name="pixelFormat" type="unsigned long" dir="in">
9361 <desc>
9362 Pixel format of the memory buffer pointed to by @a VRAM.
9363 See also <link to="FramebufferPixelFormat"/>.
9364 </desc>
9365 </param>
9366 <param name="VRAM" type="octet" mod="ptr" dir="in">
9367 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9368 </param>
9369 <param name="bitsPerPixel" type="unsigned long" dir="in">
9370 <desc>Color depth, bits per pixel.</desc>
9371 </param>
9372 <param name="bytesPerLine" type="unsigned long" dir="in">
9373 <desc>Size of one scan line, in bytes.</desc>
9374 </param>
9375 <param name="width" type="unsigned long" dir="in">
9376 <desc>Width of the guest display, in pixels.</desc>
9377 </param>
9378 <param name="height" type="unsigned long" dir="in">
9379 <desc>Height of the guest display, in pixels.</desc>
9380 </param>
9381 <param name="finished" type="boolean" dir="return">
9382 <desc>
9383 Can the VM start using the new frame buffer immediately
9384 after this method returns or it should wait for
9385 <link to="IDisplay::resizeCompleted()"/>.
9386 </desc>
9387 </param>
9388 </method>
9389
9390 <method name="operationSupported">
9391 <desc>
9392 Returns whether the given acceleration operation is supported
9393 by the IFramebuffer implementation. If not, the display object
9394 will not attempt to call the corresponding IFramebuffer entry
9395 point. Even if an operation is indicated as supported, the
9396 IFramebuffer implementation always has the option to return non
9397 supported from the corresponding acceleration method in which
9398 case the operation will be performed by the display engine. This
9399 allows for reduced IFramebuffer implementation complexity where
9400 only common cases are handled.
9401 </desc>
9402 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9403 <param name="supported" type="boolean" dir="return"/>
9404 </method>
9405
9406 <method name="videoModeSupported">
9407 <desc>
9408 Returns whether the frame buffer implementation is willing to
9409 support a given video mode. In case it is not able to render
9410 the video mode (or for some reason not willing), it should
9411 return false. Usually this method is called when the guest
9412 asks the VMM device whether a given video mode is supported
9413 so the information returned is directly exposed to the guest.
9414 It is important that this method returns very quickly.
9415 </desc>
9416 <param name="width" type="unsigned long" dir="in"/>
9417 <param name="height" type="unsigned long" dir="in"/>
9418 <param name="bpp" type="unsigned long" dir="in"/>
9419 <param name="supported" type="boolean" dir="return"/>
9420 </method>
9421
9422 <method name="solidFill">
9423 <desc>
9424 Fills the specified rectangle on screen with a solid color.
9425 </desc>
9426 <param name="x" type="unsigned long" dir="in"/>
9427 <param name="y" type="unsigned long" dir="in"/>
9428 <param name="width" type="unsigned long" dir="in"/>
9429 <param name="height" type="unsigned long" dir="in"/>
9430 <param name="color" type="unsigned long" dir="in"/>
9431 <param name="handled" type="boolean" dir="return"/>
9432 </method>
9433
9434 <method name="copyScreenBits">
9435 <desc>
9436 Copies specified rectangle on the screen.
9437 </desc>
9438 <param name="xDst" type="unsigned long" dir="in"/>
9439 <param name="yDst" type="unsigned long" dir="in"/>
9440 <param name="xSrc" type="unsigned long" dir="in"/>
9441 <param name="ySrc" type="unsigned long" dir="in"/>
9442 <param name="width" type="unsigned long" dir="in"/>
9443 <param name="height" type="unsigned long" dir="in"/>
9444 <param name="handled" type="boolean" dir="return"/>
9445 </method>
9446
9447 <method name="getVisibleRegion">
9448 <desc>
9449 Returns the visible region of this frame buffer.
9450
9451 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9452 @a count parameter is ignored and the number of elements necessary to
9453 describe the current visible region is returned in @a countCopied.
9454
9455 If @a rectangles is not <tt>NULL</tt> but @a count is less
9456 than the required number of elements to store region data, the method
9457 will report a failure. If @a count is equal or greater than the
9458 required number of elements, then the actual number of elements copied
9459 to the provided array will be returned in @a countCopied.
9460
9461 <note>
9462 The address of the provided array must be in the process space of
9463 this IFramebuffer object.
9464 </note>
9465 <note>
9466 Method not yet implemented.
9467 </note>
9468 </desc>
9469 <param name="rectangles" type="octet" mod="ptr" dir="in">
9470 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9471 </param>
9472 <param name="count" type="unsigned long" dir="in">
9473 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9474 </param>
9475 <param name="countCopied" type="unsigned long" dir="return">
9476 <desc>Number of elements copied to the @a rectangles array.</desc>
9477 </param>
9478 </method>
9479
9480 <method name="setVisibleRegion">
9481 <desc>
9482 Suggests a new visible region to this frame buffer. This region
9483 represents the area of the VM display which is a union of regions of
9484 all top-level windows of the guest operating system running inside the
9485 VM (if the Guest Additions for this system support this
9486 functionality). This information may be used by the frontends to
9487 implement the seamless desktop integration feature.
9488
9489 <note>
9490 The address of the provided array must be in the process space of
9491 this IFramebuffer object.
9492 </note>
9493 <note>
9494 The IFramebuffer implementation must make a copy of the provided
9495 array of rectangles.
9496 </note>
9497 <note>
9498 Method not yet implemented.
9499 </note>
9500 </desc>
9501 <param name="rectangles" type="octet" mod="ptr" dir="in">
9502 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9503 </param>
9504 <param name="count" type="unsigned long" dir="in">
9505 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9506 </param>
9507 </method>
9508
9509 </interface>
9510
9511 <interface
9512 name="IFramebufferOverlay" extends="IFrameBuffer"
9513 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9514 wsmap="suppress"
9515 >
9516 <desc>
9517 The IFramebufferOverlay interface represents an alpha blended overlay
9518 for displaying status icons above an IFramebuffer. It is always created
9519 not visible, so that it must be explicitly shown. It only covers a
9520 portion of the IFramebuffer, determined by its width, height and
9521 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9522 that order) format, and may be written to directly. Do re-read the
9523 width though, after setting it, as it may be adjusted (increased) to
9524 make it more suitable for the front end.
9525 </desc>
9526 <attribute name="x" type="unsigned long" readonly="yes">
9527 <desc>X position of the overlay, relative to the frame buffer.</desc>
9528 </attribute>
9529
9530 <attribute name="y" type="unsigned long" readonly="yes">
9531 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9532 </attribute>
9533
9534 <attribute name="visible" type="boolean" readonly="no">
9535 <desc>
9536 Whether the overlay is currently visible.
9537 </desc>
9538 </attribute>
9539
9540 <attribute name="alpha" type="unsigned long" readonly="no">
9541 <desc>
9542 The global alpha value for the overlay. This may or may not be
9543 supported by a given front end.
9544 </desc>
9545 </attribute>
9546
9547 <method name="move">
9548 <desc>
9549 Changes the overlay's position relative to the IFramebuffer.
9550 </desc>
9551 <param name="x" type="unsigned long" dir="in"/>
9552 <param name="y" type="unsigned long" dir="in"/>
9553 </method>
9554
9555 </interface>
9556
9557 <interface
9558 name="IDisplay" extends="$unknown"
9559 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
9560 wsmap="suppress"
9561 >
9562 <desc>
9563 The IDisplay interface represents the virtual machine's display.
9564
9565 The object implementing this interface is contained in each
9566 <link to="IConsole::display"/> attribute and represents the visual
9567 output of the virtual machine.
9568
9569 The virtual display supports pluggable output targets represented by the
9570 IFramebuffer interface. Examples of the output target are a window on
9571 the host computer or an RDP session's display on a remote computer.
9572 </desc>
9573 <attribute name="width" type="unsigned long" readonly="yes">
9574 <desc>Current display width.</desc>
9575 </attribute>
9576
9577 <attribute name="height" type="unsigned long" readonly="yes">
9578 <desc>Current display height.</desc>
9579 </attribute>
9580
9581 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9582 <desc>
9583 Current guest display color depth. Note that this may differ
9584 from <link to="IFramebuffer::bitsPerPixel"/>.
9585 </desc>
9586 </attribute>
9587
9588 <method name="setupInternalFramebuffer">
9589 <desc>
9590 Prepares an internally managed frame buffer.
9591 </desc>
9592 <param name="depth" type="unsigned long" dir="in"/>
9593 </method>
9594
9595 <method name="lockFramebuffer">
9596 <desc>
9597 Requests access to the internal frame buffer.
9598
9599 <result name="VBOX_E_NOT_SUPPORTED">
9600 Attempt to lock a non-internal frame buffer.
9601 </result>
9602
9603 </desc>
9604 <param name="address" type="octet" mod="ptr" dir="return"/>
9605 </method>
9606
9607 <method name="unlockFramebuffer">
9608 <desc>
9609 Releases access to the internal frame buffer.
9610
9611 <result name="VBOX_E_NOT_SUPPORTED">
9612 Attempt to unlock a non-internal frame buffer.
9613 </result>
9614
9615 </desc>
9616 </method>
9617
9618 <method name="registerExternalFramebuffer">
9619 <desc>
9620 Registers an external frame buffer.
9621 </desc>
9622 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9623 </method>
9624
9625 <method name="setFramebuffer">
9626 <desc>
9627 Sets the framebuffer for given screen.
9628 </desc>
9629 <param name="screenId" type="unsigned long" dir="in"/>
9630 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9631 </method>
9632
9633 <method name="getFramebuffer">
9634 <desc>
9635 Queries the framebuffer for given screen.
9636 </desc>
9637 <param name="screenId" type="unsigned long" dir="in"/>
9638 <param name="framebuffer" type="IFramebuffer" dir="out"/>
9639 <param name="xOrigin" type="long" dir="out"/>
9640 <param name="yOrigin" type="long" dir="out"/>
9641 </method>
9642
9643 <method name="setVideoModeHint">
9644 <desc>
9645 Asks VirtualBox to request the given video mode from
9646 the guest. This is just a hint and it cannot be guaranteed
9647 that the requested resolution will be used. Guest Additions
9648 are required for the request to be seen by guests. The caller
9649 should issue the request and wait for a resolution change and
9650 after a timeout retry.
9651
9652 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
9653 parameters means that the corresponding values should be taken from the
9654 current video mode (i.e. left unchanged).
9655
9656 If the guest OS supports multi-monitor configuration then the @a display
9657 parameter specifies the number of the guest display to send the hint to:
9658 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
9659 so on. If the multi-monitor configuration is not supported, @a display
9660 must be <tt>0</tt>.
9661
9662 <result name="E_INVALIDARG">
9663 The @a display is not associated with any monitor.
9664 </result>
9665
9666 </desc>
9667 <param name="width" type="unsigned long" dir="in"/>
9668 <param name="height" type="unsigned long" dir="in"/>
9669 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
9670 <param name="display" type="unsigned long" dir="in"/>
9671 </method>
9672
9673 <method name="setSeamlessMode">
9674 <desc>
9675 Enables or disables seamless guest display rendering (seamless desktop
9676 integration) mode.
9677 <note>
9678 Calling this method has no effect if <link
9679 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
9680 </note>
9681 </desc>
9682 <param name="enabled" type="boolean" dir="in"/>
9683 </method>
9684
9685 <method name="takeScreenShot">
9686 <desc>
9687 Takes a screen shot of the requested size and copies it to the
9688 32-bpp buffer allocated by the caller.
9689
9690 <result name="E_NOTIMPL">
9691 Feature not implemented.
9692 </result>
9693 <result name="VBOX_E_IPRT_ERROR">
9694 Could not take a screenshot.
9695 </result>
9696
9697 </desc>
9698 <param name="address" type="octet" mod="ptr" dir="in"/>
9699 <param name="width" type="unsigned long" dir="in"/>
9700 <param name="height" type="unsigned long" dir="in"/>
9701 </method>
9702
9703 <method name="drawToScreen">
9704 <desc>
9705 Draws a 32-bpp image of the specified size from the given buffer
9706 to the given point on the VM display.
9707
9708 <result name="E_NOTIMPL">
9709 Feature not implemented.
9710 </result>
9711 <result name="VBOX_E_IPRT_ERROR">
9712 Could not draw to screen.
9713 </result>
9714
9715 </desc>
9716 <param name="address" type="octet" mod="ptr" dir="in"/>
9717 <param name="x" type="unsigned long" dir="in"/>
9718 <param name="y" type="unsigned long" dir="in"/>
9719 <param name="width" type="unsigned long" dir="in"/>
9720 <param name="height" type="unsigned long" dir="in"/>
9721 </method>
9722
9723 <method name="invalidateAndUpdate">
9724 <desc>
9725 Does a full invalidation of the VM display and instructs the VM
9726 to update it.
9727
9728 <result name="VBOX_E_IPRT_ERROR">
9729 Could not invalidate and update screen.
9730 </result>
9731
9732 </desc>
9733 </method>
9734
9735 <method name="resizeCompleted">
9736 <desc>
9737 Signals that a framebuffer has completed the resize operation.
9738
9739 <result name="VBOX_E_NOT_SUPPORTED">
9740 Operation only valid for external frame buffers.
9741 </result>
9742
9743 </desc>
9744 <param name="screenId" type="unsigned long" dir="in"/>
9745 </method>
9746
9747 <method name="updateCompleted">
9748 <desc>
9749 Signals that a framebuffer has completed the update operation.
9750
9751 <result name="VBOX_E_NOT_SUPPORTED">
9752 Operation only valid for external frame buffers.
9753 </result>
9754
9755 </desc>
9756 </method>
9757
9758 </interface>
9759
9760 <!--
9761 // INetworkAdapter
9762 /////////////////////////////////////////////////////////////////////////
9763 -->
9764
9765 <enum
9766 name="NetworkAttachmentType"
9767 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
9768 >
9769 <desc>
9770 Network attachment type.
9771 </desc>
9772
9773 <const name="Null" value="0">
9774 <desc>Null value, also means "not attached".</desc>
9775 </const>
9776 <const name="NAT" value="1"/>
9777 <const name="HostInterface" value="2"/>
9778 <const name="Internal" value="3"/>
9779 </enum>
9780
9781 <enum
9782 name="NetworkAdapterType"
9783 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
9784 >
9785 <desc>
9786 Network adapter type.
9787 </desc>
9788
9789 <const name="Null" value="0">
9790 <desc>Null value (never used by the API).</desc>
9791 </const>
9792 <const name="Am79C970A" value="1"/>
9793 <const name="Am79C973" value="2"/>
9794 <const name="I82540EM" value="3"/>
9795 <const name="I82543GC" value="4"/>
9796 </enum>
9797
9798 <interface
9799 name="INetworkAdapter" extends="$unknown"
9800 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
9801 wsmap="managed"
9802 >
9803 <attribute name="adapterType" type="NetworkAdapterType">
9804 <desc>
9805 Type of the virtual network adapter. Depending on this value,
9806 VirtualBox will provide a different virtual network hardware
9807 to the guest.
9808 </desc>
9809 </attribute>
9810
9811 <attribute name="slot" type="unsigned long" readonly="yes">
9812 <desc>
9813 Slot number this adapter is plugged into. Corresponds to
9814 the value you pass to <link to="IMachine::getNetworkAdapter"/>
9815 to obtain this instance.
9816 </desc>
9817 </attribute>
9818
9819 <attribute name="enabled" type="boolean">
9820 <desc>
9821 Flag whether the network adapter is present in the
9822 guest system. If disabled, the virtual guest hardware will
9823 not contain this network adapter. Can only be changed when
9824 the VM is not running.
9825 </desc>
9826 </attribute>
9827
9828 <attribute name="MACAddress" type="wstring">
9829 <desc>
9830 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
9831 it to NULL, VirtualBox will generate a unique MAC address.
9832 </desc>
9833 </attribute>
9834
9835 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
9836
9837 <attribute name="hostInterface" type="wstring">
9838 <desc>
9839 Name of the host network interface the VM is attached to.
9840 </desc>
9841 </attribute>
9842
9843 <attribute name="internalNetwork" type="wstring">
9844 <desc>
9845 Name of the internal network the VM is attached to.
9846 </desc>
9847 </attribute>
9848
9849 <attribute name="NATNetwork" type="wstring">
9850 <desc>
9851 Name of the NAT network the VM is attached to.
9852 </desc>
9853 </attribute>
9854
9855 <attribute name="cableConnected" type="boolean">
9856 <desc>
9857 Flag whether the adapter reports the cable as connected or not.
9858 It can be used to report offline situations to a VM.
9859 </desc>
9860 </attribute>
9861
9862 <attribute name="lineSpeed" type="unsigned long">
9863 <desc>
9864 Line speed reported by custom drivers, in units of 1 kbps.
9865 </desc>
9866 </attribute>
9867
9868 <attribute name="traceEnabled" type="boolean">
9869 <desc>
9870 Flag whether network traffic from/to the network card should be traced.
9871 Can only be toggled when the VM is turned off.
9872 </desc>
9873 </attribute>
9874
9875 <attribute name="traceFile" type="wstring">
9876 <desc>
9877 Filename where a network trace will be stored. If not set, VBox-pid.pcap
9878 will be used.
9879 </desc>
9880 </attribute>
9881
9882 <method name="attachToNAT">
9883 <desc>
9884 Attach the network adapter to the Network Address Translation (NAT) interface.
9885 </desc>
9886 </method>
9887
9888 <method name="attachToHostInterface">
9889 <desc>
9890 Attach the network adapter to a host interface.
9891 </desc>
9892 </method>
9893
9894 <method name="attachToInternalNetwork">
9895 <desc>
9896 Attach the network adapter to an internal network.
9897 </desc>
9898 </method>
9899
9900 <method name="detach">
9901 <desc>
9902 Detach the network adapter
9903 </desc>
9904 </method>
9905 </interface>
9906
9907
9908 <!--
9909 // ISerialPort
9910 /////////////////////////////////////////////////////////////////////////
9911 -->
9912
9913 <enum
9914 name="PortMode"
9915 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
9916 >
9917 <desc>
9918 The PortMode enumeration represents possible communication modes for
9919 the virtual serial port device.
9920 </desc>
9921
9922 <const name="Disconnected" value="0">
9923 <desc>Virtual device is not attached to any real host device.</desc>
9924 </const>
9925 <const name="HostPipe" value="1">
9926 <desc>Virtual device is attached to a host pipe.</desc>
9927 </const>
9928 <const name="HostDevice" value="2">
9929 <desc>Virtual device is attached to a host device.</desc>
9930 </const>
9931 </enum>
9932
9933 <interface
9934 name="ISerialPort" extends="$unknown"
9935 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
9936 wsmap="managed"
9937 >
9938
9939 <desc>
9940 The ISerialPort interface represents the virtual serial port device.
9941
9942 The virtual serial port device acts like an ordinary serial port
9943 inside the virtual machine. This device communicates to the real
9944 serial port hardware in one of two modes: host pipe or host device.
9945
9946 In host pipe mode, the #path attribute specifies the path to the pipe on
9947 the host computer that represents a serial port. The #server attribute
9948 determines if this pipe is created by the virtual machine process at
9949 machine startup or it must already exist before starting machine
9950 execution.
9951
9952 In host device mode, the #path attribute specifies the name of the
9953 serial port device on the host computer.
9954
9955 There is also a third communication mode: the disconnected mode. In this
9956 mode, the guest OS running inside the virtual machine will be able to
9957 detect the serial port, but all port write operations will be discarded
9958 and all port read operations will return no data.
9959
9960 <see>IMachine::getSerialPort</see>
9961 </desc>
9962
9963 <attribute name="slot" type="unsigned long" readonly="yes">
9964 <desc>
9965 Slot number this serial port is plugged into. Corresponds to
9966 the value you pass to <link to="IMachine::getSerialPort"/>
9967 to obtain this instance.
9968 </desc>
9969 </attribute>
9970
9971 <attribute name="enabled" type="boolean">
9972 <desc>
9973 Flag whether the serial port is enabled. If disabled,
9974 the serial port will not be reported to the guest OS.
9975 </desc>
9976 </attribute>
9977
9978 <attribute name="IOBase" type="unsigned long">
9979 <desc>Base I/O address of the serial port.</desc>
9980 </attribute>
9981
9982 <attribute name="IRQ" type="unsigned long">
9983 <desc>IRQ number of the serial port.</desc>
9984 </attribute>
9985
9986 <attribute name="hostMode" type="PortMode">
9987 <desc>
9988 How is this port connected to the host.
9989 <note>
9990 Changing this attribute may fail if the conditions for
9991 <link to="#path"/> are not met.
9992 </note>
9993 </desc>
9994 </attribute>
9995
9996 <attribute name="server" type="boolean">
9997 <desc>
9998 Flag whether this serial port acts as a server (creates a new pipe on
9999 the host) or as a client (uses the existing pipe). This attribute is
10000 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10001 </desc>
10002 </attribute>
10003
10004 <attribute name="path" type="wstring">
10005 <desc>
10006 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
10007 PortMode_HostPipe, or the host serial device name when
10008 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
10009 cases, setting a @c null or an empty string as the attribute's value
10010 will result into an error. Otherwise, the value of this property is
10011 ignored.
10012 </desc>
10013 </attribute>
10014
10015 </interface>
10016
10017 <!--
10018 // IParallelPort
10019 /////////////////////////////////////////////////////////////////////////
10020 -->
10021
10022 <interface
10023 name="IParallelPort" extends="$unknown"
10024 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10025 wsmap="managed"
10026 >
10027
10028 <desc>
10029 The IParallelPort interface represents the virtual parallel port device.
10030
10031 The virtual parallel port device acts like an ordinary parallel port
10032 inside the virtual machine. This device communicates to the real
10033 parallel port hardware using the name of the parallel device on the host
10034 computer specified in the #path attribute.
10035
10036 Each virtual parallel port device is assigned a base I/O address and an
10037 IRQ number that will be reported to the guest operating system and used
10038 to operate the given parallel port from within the virtual machine.
10039
10040 <see>IMachine::getParallelPort</see>
10041 </desc>
10042
10043 <attribute name="slot" type="unsigned long" readonly="yes">
10044 <desc>
10045 Slot number this parallel port is plugged into. Corresponds to
10046 the value you pass to <link to="IMachine::getParallelPort"/>
10047 to obtain this instance.
10048 </desc>
10049 </attribute>
10050
10051 <attribute name="enabled" type="boolean">
10052 <desc>
10053 Flag whether the parallel port is enabled. If disabled,
10054 the parallel port will not be reported to the guest OS.
10055 </desc>
10056 </attribute>
10057
10058 <attribute name="IOBase" type="unsigned long">
10059 <desc>Base I/O address of the parallel port.</desc>
10060 </attribute>
10061
10062 <attribute name="IRQ" type="unsigned long">
10063 <desc>IRQ number of the parallel port.</desc>
10064 </attribute>
10065
10066 <attribute name="path" type="wstring">
10067 <desc>
10068 Host parallel device name. If this parallel port is enabled, setting a
10069 @c null or an empty string as this attribute's value will result into
10070 an error.
10071 </desc>
10072 </attribute>
10073
10074 </interface>
10075
10076
10077 <!--
10078 // IMachineDebugger
10079 /////////////////////////////////////////////////////////////////////////
10080 -->
10081
10082 <interface
10083 name="IMachineDebugger" extends="$unknown"
10084 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10085 wsmap="suppress"
10086 >
10087 <method name="resetStats">
10088 <desc>
10089 Reset VM statistics.
10090 </desc>
10091 <param name="pattern" type="wstring" dir="in">
10092 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10093 </param>
10094 </method>
10095
10096 <method name="dumpStats">
10097 <desc>
10098 Dumps VM statistics.
10099 </desc>
10100 <param name="pattern" type="wstring" dir="in">
10101 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10102 </param>
10103 </method>
10104
10105 <method name="getStats">
10106 <desc>
10107 Get the VM statistics in a XMLish format.
10108 </desc>
10109 <param name="pattern" type="wstring" dir="in">
10110 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10111 </param>
10112 <param name="withDescriptions" type="boolean" dir="in">
10113 <desc>Whether to include the descriptions.</desc>
10114 </param>
10115 <param name="stats" type="wstring" dir="out">
10116 <desc>The XML document containing the statistics.</desc>
10117 </param>
10118 </method>
10119
10120 <method name="injectNMI">
10121 <desc>
10122 Inject an NMI into a running VT-x/AMD-V VM.
10123 </desc>
10124 </method>
10125
10126 <attribute name="singlestep" type="boolean">
10127 <desc>Switch for enabling singlestepping.</desc>
10128 </attribute>
10129
10130 <attribute name="recompileUser" type="boolean">
10131 <desc>Switch for forcing code recompilation for user mode code.</desc>
10132 </attribute>
10133
10134 <attribute name="recompileSupervisor" type="boolean">
10135 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10136 </attribute>
10137
10138 <attribute name="PATMEnabled" type="boolean">
10139 <desc>Switch for enabling and disabling the PATM component.</desc>
10140 </attribute>
10141
10142 <attribute name="CSAMEnabled" type="boolean">
10143 <desc>Switch for enabling and disabling the CSAM component.</desc>
10144 </attribute>
10145
10146 <attribute name="logEnabled" type="boolean">
10147 <desc>Switch for enabling and disabling logging.</desc>
10148 </attribute>
10149
10150 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10151 <desc>
10152 Flag indicating whether the VM is currently making use of CPU hardware
10153 virtualization extensions.
10154 </desc>
10155 </attribute>
10156
10157 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10158 <desc>
10159 Flag indicating whether the VM is currently making use of the nested paging
10160 CPU hardware virtualization extension.
10161 </desc>
10162 </attribute>
10163
10164 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10165 <desc>
10166 Flag indicating whether the VM is currently making use of the VPID
10167 VT-x extension.
10168 </desc>
10169 </attribute>
10170
10171 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10172 <desc>
10173 Flag indicating whether the VM is currently making use of the Physical
10174 Address Extension CPU feature.
10175 </desc>
10176 </attribute>
10177
10178 <attribute name="virtualTimeRate" type="unsigned long">
10179 <desc>
10180 The rate at which the virtual time runs expressed as a percentage.
10181 The accepted range is 2% to 20000%.
10182 </desc>
10183 </attribute>
10184
10185 <!-- @todo method for setting log flags, groups and destination! -->
10186
10187 <attribute name="VM" type="unsigned long long" readonly="yes">
10188 <desc>
10189 Gets the VM handle. This is only for internal use while
10190 we carve the details of this interface.
10191 </desc>
10192 </attribute>
10193
10194 </interface>
10195
10196 <!--
10197 // IUSBController
10198 /////////////////////////////////////////////////////////////////////////
10199 -->
10200
10201 <interface
10202 name="IUSBController" extends="$unknown"
10203 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10204 wsmap="managed"
10205 >
10206 <attribute name="enabled" type="boolean">
10207 <desc>
10208 Flag whether the USB controller is present in the
10209 guest system. If disabled, the virtual guest hardware will
10210 not contain any USB controller. Can only be changed when
10211 the VM is powered off.
10212 </desc>
10213 </attribute>
10214
10215 <attribute name="enabledEhci" type="boolean">
10216 <desc>
10217 Flag whether the USB EHCI controller is present in the
10218 guest system. If disabled, the virtual guest hardware will
10219 not contain a USB EHCI controller. Can only be changed when
10220 the VM is powered off.
10221 </desc>
10222 </attribute>
10223
10224 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10225 <desc>
10226 USB standard version which the controller implements.
10227 This is a BCD which means that the major version is in the
10228 high byte and minor version is in the low byte.
10229 </desc>
10230 </attribute>
10231
10232 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10233 <desc>
10234 List of USB device filters associated with the machine.
10235
10236 If the machine is currently running, these filters are activated
10237 every time a new (supported) USB device is attached to the host
10238 computer that was not ignored by global filters
10239 (<link to="IHost::USBDeviceFilters"/>).
10240
10241 These filters are also activated when the machine is powered up.
10242 They are run against a list of all currently available USB
10243 devices (in states
10244 <link to="USBDeviceState_Available"/>,
10245 <link to="USBDeviceState_Busy"/>,
10246 <link to="USBDeviceState_Held"/>) that were not previously
10247 ignored by global filters.
10248
10249 If at least one filter matches the USB device in question, this
10250 device is automatically captured (attached to) the virtual USB
10251 controller of this machine.
10252
10253 <see>IUSBDeviceFilter, ::IUSBController</see>
10254 </desc>
10255 </attribute>
10256
10257 <method name="createDeviceFilter">
10258 <desc>
10259 Creates a new USB device filter. All attributes except
10260 the filter name are set to <tt>null</tt> (any match),
10261 <i>active</i> is <tt>false</tt> (the filter is not active).
10262
10263 The created filter can then be added to the list of filters using
10264 <link to="#insertDeviceFilter()"/>.
10265
10266 <result name="VBOX_E_INVALID_VM_STATE">
10267 The virtual machine is not mutable.
10268 </result>
10269
10270 <see>#deviceFilters</see>
10271 </desc>
10272 <param name="name" type="wstring" dir="in">
10273 <desc>
10274 Filter name. See <link to="IUSBDeviceFilter::name"/>
10275 for more info.
10276 </desc>
10277 </param>
10278 <param name="filter" type="IUSBDeviceFilter" dir="return">
10279 <desc>Created filter object.</desc>
10280 </param>
10281 </method>
10282
10283 <method name="insertDeviceFilter">
10284 <desc>
10285 Inserts the given USB device to the specified position
10286 in the list of filters.
10287
10288 Positions are numbered starting from <tt>0</tt>. If the specified
10289 position is equal to or greater than the number of elements in
10290 the list, the filter is added to the end of the collection.
10291
10292 <note>
10293 Duplicates are not allowed, so an attempt to insert a
10294 filter that is already in the collection, will return an
10295 error.
10296 </note>
10297
10298 <result name="VBOX_E_INVALID_VM_STATE">
10299 Virtual machine is not mutable.
10300 </result>
10301 <result name="E_INVALIDARG">
10302 USB device filter not created within this VirtualBox instance.
10303 </result>
10304 <result name="VBOX_E_INVALID_OBJECT_STATE">
10305 USB device filter already in list.
10306 </result>
10307
10308 <see>#deviceFilters</see>
10309 </desc>
10310 <param name="position" type="unsigned long" dir="in">
10311 <desc>Position to insert the filter to.</desc>
10312 </param>
10313 <param name="filter" type="IUSBDeviceFilter" dir="in">
10314 <desc>USB device filter to insert.</desc>
10315 </param>
10316 </method>
10317
10318 <method name="removeDeviceFilter">
10319 <desc>
10320 Removes a USB device filter from the specified position in the
10321 list of filters.
10322
10323 Positions are numbered starting from <tt>0</tt>. Specifying a
10324 position equal to or greater than the number of elements in
10325 the list will produce an error.
10326
10327 <see>#deviceFilters</see>
10328
10329 <result name="VBOX_E_INVALID_VM_STATE">
10330 Virtual machine is not mutable.
10331 </result>
10332 <result name="E_INVALIDARG">
10333 USB device filter list empty or invalid @a position.
10334 </result>
10335
10336 </desc>
10337 <param name="position" type="unsigned long" dir="in">
10338 <desc>Position to remove the filter from.</desc>
10339 </param>
10340 <param name="filter" type="IUSBDeviceFilter" dir="return">
10341 <desc>Removed USB device filter.</desc>
10342 </param>
10343 </method>
10344
10345 </interface>
10346
10347
10348 <!--
10349 // IUSBDevice
10350 /////////////////////////////////////////////////////////////////////////
10351 -->
10352
10353 <enumerator
10354 name="IUSBDeviceEnumerator" type="IUSBDevice"
10355 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10356 />
10357
10358 <collection
10359 name="IUSBDeviceCollection" type="IUSBDevice"
10360 enumerator="IUSBDeviceEnumerator"
10361 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10362 readonly="yes"
10363 >
10364 <method name="findById">
10365 <desc>
10366 Searches this collection for a USB device with the given UUID.
10367 <note>
10368 The method returns an error if the given UUID does not
10369 correspond to any USB device in the collection.
10370 </note>
10371 <see>IUSBDevice::id</see>
10372 </desc>
10373 <param name="id" type="uuid" dir="in">
10374 <desc>UUID of the USB device to search for.</desc>
10375 </param>
10376 <param name="device" type="IUSBDevice" dir="return">
10377 <desc>Found USB device object.</desc>
10378 </param>
10379 </method>
10380
10381 <method name="findByAddress">
10382 <desc>
10383 Searches this collection for a USB device with the given
10384 host address.
10385 <note>
10386 The method returns an error if the given address does not
10387 correspond to any USB device in the collection.
10388 </note>
10389 <see>IUSBDevice::address</see>
10390 </desc>
10391 <param name="name" type="wstring" dir="in">
10392 <desc>
10393 Address of the USB device (as assigned by the host) to
10394 search for.
10395 </desc>
10396 </param>
10397 <param name="device" type="IUSBDevice" dir="return">
10398 <desc>Found USB device object.</desc>
10399 </param>
10400 </method>
10401
10402 </collection>
10403
10404 <interface
10405 name="IUSBDevice" extends="$unknown"
10406 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10407 wsmap="managed"
10408 >
10409 <desc>
10410 The IUSBDevice interface represents a virtual USB device attached to the
10411 virtual machine.
10412
10413 A collection of objects implementing this interface is stored in the
10414 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10415 attached to a running virtual machine's USB controller.
10416 </desc>
10417
10418 <attribute name="id" type="uuid" readonly="yes">
10419 <desc>
10420 Unique USB device ID. This ID is built from #vendorId,
10421 #productId, #revision and #serialNumber.
10422 </desc>
10423 </attribute>
10424
10425 <attribute name="vendorId" type="unsigned short" readonly="yes">
10426 <desc>Vendor ID.</desc>
10427 </attribute>
10428
10429 <attribute name="productId" type="unsigned short" readonly="yes">
10430 <desc>Product ID.</desc>
10431 </attribute>
10432
10433 <attribute name="revision" type="unsigned short" readonly="yes">
10434 <desc>
10435 Product revision number. This is a packed BCD represented as
10436 unsigned short. The high byte is the integer part and the low
10437 byte is the decimal.
10438 </desc>
10439 </attribute>
10440
10441 <attribute name="manufacturer" type="wstring" readonly="yes">
10442 <desc>Manufacturer string.</desc>
10443 </attribute>
10444
10445 <attribute name="product" type="wstring" readonly="yes">
10446 <desc>Product string.</desc>
10447 </attribute>
10448
10449 <attribute name="serialNumber" type="wstring" readonly="yes">
10450 <desc>Serial number string.</desc>
10451 </attribute>
10452
10453 <attribute name="address" type="wstring" readonly="yes">
10454 <desc>Host specific address of the device.</desc>
10455 </attribute>
10456
10457 <attribute name="port" type="unsigned short" readonly="yes">
10458 <desc>
10459 Host USB port number the device is physically
10460 connected to.
10461 </desc>
10462 </attribute>
10463
10464 <attribute name="version" type="unsigned short" readonly="yes">
10465 <desc>
10466 The major USB version of the device - 1 or 2.
10467 </desc>
10468 </attribute>
10469
10470 <attribute name="portVersion" type="unsigned short" readonly="yes">
10471 <desc>
10472 The major USB version of the host USB port the device is
10473 physically connected to - 1 or 2. For devices not connected to
10474 anything this will have the same value as the version attribute.
10475 </desc>
10476 </attribute>
10477
10478 <attribute name="remote" type="boolean" readonly="yes">
10479 <desc>
10480 Whether the device is physically connected to a remote VRDP
10481 client or to a local host machine.
10482 </desc>
10483 </attribute>
10484
10485 </interface>
10486
10487
10488 <!--
10489 // IUSBDeviceFilter
10490 /////////////////////////////////////////////////////////////////////////
10491 -->
10492
10493 <enumerator
10494 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10495 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10496 />
10497
10498 <collection
10499 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10500 enumerator="IUSBDeviceFilterEnumerator"
10501 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10502 readonly="yes"
10503 />
10504
10505 <interface
10506 name="IUSBDeviceFilter" extends="$unknown"
10507 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10508 wsmap="managed"
10509 >
10510 <desc>
10511 The IUSBDeviceFilter interface represents an USB device filter used
10512 to perform actions on a group of USB devices.
10513
10514 This type of filters is used by running virtual machines to
10515 automatically capture selected USB devices once they are physically
10516 attached to the host computer.
10517
10518 A USB device is matched to the given device filter if and only if all
10519 attributes of the device match the corresponding attributes of the
10520 filter (that is, attributes are joined together using the logical AND
10521 operation). On the other hand, all together, filters in the list of
10522 filters carry the semantics of the logical OR operation. So if it is
10523 desirable to create a match like "this vendor id OR this product id",
10524 one needs to create two filters and specify "any match" (see below)
10525 for unused attributes.
10526
10527 All filter attributes used for matching are strings. Each string
10528 is an expression representing a set of values of the corresponding
10529 device attribute, that will match the given filter. Currently, the
10530 following filtering expressions are supported:
10531
10532 <ul>
10533 <li><i>Interval filters</i>. Used to specify valid intervals for
10534 integer device attributes (Vendor ID, Product ID and Revision).
10535 The format of the string is:
10536
10537 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
10538
10539 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
10540 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
10541 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
10542 is omitted before a dash (<tt>-</tt>), the minimum possible integer
10543 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
10544 possible integer is assumed.
10545 </li>
10546 <li><i>Boolean filters</i>. Used to specify acceptable values for
10547 boolean device attributes. The format of the string is:
10548
10549 <tt>true|false|yes|no|0|1</tt>
10550
10551 </li>
10552 <li><i>Exact match</i>. Used to specify a single value for the given
10553 device attribute. Any string that doesn't start with <tt>int:</tt>
10554 represents the exact match. String device attributes are compared to
10555 this string including case of symbols. Integer attributes are first
10556 converted to a string (see individual filter attributes) and then
10557 compared ignoring case.
10558
10559 </li>
10560 <li><i>Any match</i>. Any value of the corresponding device attribute
10561 will match the given filter. An empty or <tt>null</tt> string is
10562 used to construct this type of filtering expressions.
10563
10564 </li>
10565 </ul>
10566
10567 <note>
10568 On the Windows host platform, interval filters are not currently
10569 available. Also all string filter attributes
10570 (<link to="#manufacturer"/>, <link to="#product"/>,
10571 <link to="#serialNumber"/>) are ignored, so they behave as
10572 <i>any match</i> no matter what string expression is specified.
10573 </note>
10574
10575 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
10576 </desc>
10577
10578 <attribute name="name" type="wstring">
10579 <desc>
10580 Visible name for this filter.
10581 This name is used to visually distinguish one filter from another,
10582 so it can neither be <tt>null</tt> nor an empty string.
10583 </desc>
10584 </attribute>
10585
10586 <attribute name="active" type="boolean">
10587 <desc>Whether this filter active or has been temporarily disabled.</desc>
10588 </attribute>
10589
10590 <attribute name="vendorId" type="wstring">
10591 <desc>
10592 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
10593 The string representation for the <i>exact matching</i>
10594 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10595 (including leading zeroes).
10596 </desc>
10597 </attribute>
10598
10599 <attribute name="productId" type="wstring">
10600 <desc>
10601 <link to="IUSBDevice::productId">Product ID</link> filter.
10602 The string representation for the <i>exact matching</i>
10603 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10604 (including leading zeroes).
10605 </desc>
10606 </attribute>
10607
10608 <attribute name="revision" type="wstring">
10609 <desc>
10610 <link to="IUSBDevice::productId">Product revision number</link>
10611 filter. The string representation for the <i>exact matching</i>
10612 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
10613 of the integer part of the revision, and <tt>F</tt> is the
10614 decimal digit of its fractional part (including leading and
10615 trailing zeros).
10616 Note that for interval filters, it's best to use the hexadecimal
10617 form, because the revision is stored as a 16 bit packed BCD value;
10618 so the expression <tt>int:0x0100-0x0199</tt> will match any
10619 revision from <tt>1.0</tt> to <tt>1.99</tt>.
10620 </desc>
10621 </attribute>
10622
10623 <attribute name="manufacturer" type="wstring">
10624 <desc>
10625 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
10626 </desc>
10627 </attribute>
10628
10629 <attribute name="product" type="wstring">
10630 <desc>
10631 <link to="IUSBDevice::product">Product</link> filter.
10632 </desc>
10633 </attribute>
10634
10635 <attribute name="serialNumber" type="wstring">
10636 <desc>
10637 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
10638 </desc>
10639 </attribute>
10640
10641 <attribute name="port" type="wstring">
10642 <desc>
10643 <link to="IUSBDevice::port">Host USB port</link> filter.
10644 </desc>
10645 </attribute>
10646
10647 <attribute name="remote" type="wstring">
10648 <desc>
10649 <link to="IUSBDevice::remote">Remote state</link> filter.
10650 <note>
10651 This filter makes sense only for machine USB filters,
10652 i.e. it is ignored by IHostUSBDeviceFilter objects.
10653 </note>
10654 </desc>
10655 </attribute>
10656
10657 <attribute name="maskedInterfaces" type="unsigned long">
10658 <desc>
10659 This is an advanced option for hiding one or more USB interfaces
10660 from the guest. The value is a bit mask where the bits that are set
10661 means the corresponding USB interface should be hidden, masked off
10662 if you like.
10663 This feature only works on Linux hosts.
10664 </desc>
10665 </attribute>
10666
10667 </interface>
10668
10669
10670 <!--
10671 // IHostUSBDevice
10672 /////////////////////////////////////////////////////////////////////////
10673 -->
10674
10675 <enum
10676 name="USBDeviceState"
10677 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
10678 >
10679 <desc>
10680 USB device state. This enumeration represents all possible states
10681 of the USB device physically attached to the host computer regarding
10682 its state on the host computer and availability to guest computers
10683 (all currently running virtual machines).
10684
10685 Once a supported USB device is attached to the host, global USB
10686 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
10687 either ignore the device, or put it to USBDeviceState_Held state, or do
10688 nothing. Unless the device is ignored by global filters, filters of all
10689 currently running guests (<link to="IUSBController::deviceFilters"/>) are
10690 activated that can put it to USBDeviceState_Captured state.
10691
10692 If the device was ignored by global filters, or didn't match
10693 any filters at all (including guest ones), it is handled by the host
10694 in a normal way. In this case, the device state is determined by
10695 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
10696 or USBDeviceState_Available, depending on the current device usage.
10697
10698 Besides auto-capturing based on filters, the device can be manually
10699 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
10700 state is USBDeviceState_Busy, USBDeviceState_Available or
10701 USBDeviceState_Held.
10702
10703 <note>
10704 Due to differences in USB stack implementations in Linux and Win32,
10705 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
10706 only to the Linux version of the product. This also means that (<link
10707 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
10708 device state is USBDeviceState_Held.
10709 </note>
10710
10711 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
10712 </desc>
10713
10714 <const name="NotSupported" value="0">
10715 <desc>
10716 Not supported by the VirtualBox server, not available to guests.
10717 </desc>
10718 </const>
10719 <const name="Unavailable" value="1">
10720 <desc>
10721 Being used by the host computer exclusively,
10722 not available to guests.
10723 </desc>
10724 </const>
10725 <const name="Busy" value="2">
10726 <desc>
10727 Being used by the host computer, potentially available to guests.
10728 </desc>
10729 </const>
10730 <const name="Available" value="3">
10731 <desc>
10732 Not used by the host computer, available to guests (the host computer
10733 can also start using the device at any time).
10734 </desc>
10735 </const>
10736 <const name="Held" value="4">
10737 <desc>
10738 Held by the VirtualBox server (ignored by the host computer),
10739 available to guests.
10740 </desc>
10741 </const>
10742 <const name="Captured" value="5">
10743 <desc>
10744 Captured by one of the guest computers, not available
10745 to anybody else.
10746 </desc>
10747 </const>
10748 </enum>
10749
10750 <enumerator
10751 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
10752 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
10753 />
10754
10755 <collection
10756 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
10757 enumerator="IHostUSBDeviceEnumerator"
10758 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
10759 readonly="yes"
10760 >
10761 <method name="findById">
10762 <desc>
10763 Searches this collection for a USB device with the given UUID.
10764 <note>
10765 The method returns an error if the given UUID does not
10766 correspond to any USB device in the collection.
10767 </note>
10768 <see>IHostUSBDevice::id</see>
10769 </desc>
10770 <param name="id" type="uuid" dir="in">
10771 <desc>UUID of the USB device to search for.</desc>
10772 </param>
10773 <param name="device" type="IHostUSBDevice" dir="return">
10774 <desc>Found USB device object.</desc>
10775 </param>
10776 </method>
10777
10778 <method name="findByAddress">
10779 <desc>
10780 Searches this collection for a USB device with the given
10781 host address.
10782 <note>
10783 The method returns an error if the given address does not
10784 correspond to any USB device in the collection.
10785 </note>
10786 <see>IHostUSBDevice::address</see>
10787 </desc>
10788 <param name="name" type="wstring" dir="in">
10789 <desc>
10790 Address of the USB device (as assigned by the host) to
10791 search for.
10792 </desc>
10793 </param>
10794 <param name="device" type="IHostUSBDevice" dir="return">
10795 <desc>Found USB device object.</desc>
10796 </param>
10797 </method>
10798
10799 </collection>
10800
10801 <interface
10802 name="IHostUSBDevice" extends="IUSBDevice"
10803 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
10804 wsmap="managed"
10805 >
10806 <desc>
10807 The IHostUSBDevice interface represents a physical USB device attached
10808 to the host computer.
10809
10810 Besides properties inherited from IUSBDevice, this interface adds the
10811 <link to="#state"/> property that holds the current state of the USB
10812 device.
10813
10814 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
10815 </desc>
10816
10817 <attribute name="state" type="USBDeviceState" readonly="yes">
10818 <desc>
10819 Current state of the device.
10820 </desc>
10821 </attribute>
10822
10823 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
10824
10825 </interface>
10826
10827
10828 <!--
10829 // IHostUSBDeviceFilter
10830 /////////////////////////////////////////////////////////////////////////
10831 -->
10832
10833 <enum
10834 name="USBDeviceFilterAction"
10835 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
10836 >
10837 <desc>
10838 Actions for host USB device filters.
10839 <see>IHostUSBDeviceFilter, USBDeviceState</see>
10840 </desc>
10841
10842 <const name="Null" value="0">
10843 <desc>Null value (never used by the API).</desc>
10844 </const>
10845 <const name="Ignore" value="1">
10846 <desc>Ignore the matched USB device.</desc>
10847 </const>
10848 <const name="Hold" value="2">
10849 <desc>Hold the matched USB device.</desc>
10850 </const>
10851 </enum>
10852
10853 <enumerator
10854 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
10855 uuid="ff735211-903e-4642-9c37-189eb44579fe"
10856 />
10857
10858 <collection
10859 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
10860 enumerator="IHostUSBDeviceFilterEnumerator"
10861 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
10862 readonly="yes"
10863 />
10864
10865 <interface
10866 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
10867 uuid="4cc70246-d74a-400f-8222-3900489c0374"
10868 wsmap="managed"
10869 >
10870 <desc>
10871 The IHostUSBDeviceFilter interface represents a global filter for a
10872 physical USB device used by the host computer. Used indirectly in
10873 <link to="IHost::USBDeviceFilters"/>.
10874
10875 Using filters of this type, the host computer determines the initial
10876 state of the USB device after it is physically attached to the
10877 host's USB controller.
10878
10879 <note>
10880 The <link to="#remote"/> attribute is ignored by this type of
10881 filters, because it makes sense only for
10882 <link to="IUSBController::deviceFilters">machine USB filters</link>.
10883 </note>
10884
10885 <see>IHost::USBDeviceFilters</see>
10886 </desc>
10887
10888 <attribute name="action" type="USBDeviceFilterAction">
10889 <desc>
10890 Action performed by the host when an attached USB device
10891 matches this filter.
10892 </desc>
10893 </attribute>
10894
10895 </interface>
10896
10897 <!--
10898 // IAudioAdapter
10899 /////////////////////////////////////////////////////////////////////////
10900 -->
10901
10902 <enum
10903 name="AudioDriverType"
10904 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
10905 >
10906 <desc>
10907 Host audio driver type.
10908 </desc>
10909
10910 <const name="Null" value="0">
10911 <desc>Null value, also means "dummy audio driver".</desc>
10912 </const>
10913 <const name="WinMM" value="1"/>
10914 <const name="OSS" value="2"/>
10915 <const name="ALSA" value="3"/>
10916 <const name="DirectSound" value="4"/>
10917 <const name="CoreAudio" value="5"/>
10918 <const name="MMPM" value="6"/>
10919 <const name="Pulse" value="7"/>
10920 <const name="SolAudio" value="8"/>
10921 </enum>
10922
10923 <enum
10924 name="AudioControllerType"
10925 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
10926 >
10927 <desc>
10928 Virtual audio controller type.
10929 </desc>
10930
10931 <const name="AC97" value="0"/>
10932 <const name="SB16" value="1"/>
10933 </enum>
10934
10935 <interface
10936 name="IAudioAdapter" extends="$unknown"
10937 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
10938 wsmap="managed"
10939 >
10940 <desc>
10941 The IAudioAdapter interface represents the virtual audio adapter of
10942 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
10943 </desc>
10944 <attribute name="enabled" type="boolean">
10945 <desc>
10946 Flag whether the audio adapter is present in the
10947 guest system. If disabled, the virtual guest hardware will
10948 not contain any audio adapter. Can only be changed when
10949 the VM is not running.
10950 </desc>
10951 </attribute>
10952 <attribute name="audioController" type="AudioControllerType">
10953 <desc>
10954 The audio hardware we emulate.
10955 </desc>
10956 </attribute>
10957 <attribute name="audioDriver" type="AudioDriverType">
10958 <desc>
10959 Audio driver the adapter is connected to. This setting
10960 can only be changed when the VM is not running.
10961 </desc>
10962 </attribute>
10963 </interface>
10964
10965 <!--
10966 // IVRDPServer
10967 /////////////////////////////////////////////////////////////////////////
10968 -->
10969
10970 <enum
10971 name="VRDPAuthType"
10972 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
10973 >
10974 <desc>
10975 VRDP authentication type.
10976 </desc>
10977
10978 <const name="Null" value="0">
10979 <desc>Null value, also means "no authentication".</desc>
10980 </const>
10981 <const name="External" value="1"/>
10982 <const name="Guest" value="2"/>
10983 </enum>
10984
10985 <interface
10986 name="IVRDPServer" extends="$unknown"
10987 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
10988 wsmap="managed"
10989 >
10990 <attribute name="enabled" type="boolean">
10991 <desc>VRDP server status.</desc>
10992 </attribute>
10993
10994 <attribute name="port" type="unsigned long">
10995 <desc>
10996 VRDP server port number.
10997 <note>
10998 Setting the value of this property to <tt>0</tt> will reset the port
10999 number to the default value which is
11000 currently <tt>3389</tt>. Reading this property will always return a
11001 real port number, even after it has been set to <tt>0</tt> (in which
11002 case the default port is returned).
11003 </note>
11004 </desc>
11005 </attribute>
11006
11007 <attribute name="netAddress" type="wstring">
11008 <desc>VRDP server address.</desc>
11009 </attribute>
11010
11011 <attribute name="authType" type="VRDPAuthType">
11012 <desc>VRDP authentication method.</desc>
11013 </attribute>
11014
11015 <attribute name="authTimeout" type="unsigned long">
11016 <desc>Timeout for guest authentication. Milliseconds.</desc>
11017 </attribute>
11018
11019 <attribute name="allowMultiConnection" type="boolean">
11020 <desc>
11021 Flag whether multiple simultaneous connections to the VM are permitted.
11022 Note that this will be replaced by a more powerful mechanism in the future.
11023 </desc>
11024 </attribute>
11025
11026 <attribute name="reuseSingleConnection" type="boolean">
11027 <desc>
11028 Flag whether the existing connection must be dropped and a new connection
11029 must be established by the VRDP server, when a new client connects in single
11030 connection mode.
11031 </desc>
11032 </attribute>
11033
11034 </interface>
11035
11036
11037 <!--
11038 // ISharedFolder
11039 /////////////////////////////////////////////////////////////////////////
11040 -->
11041
11042 <enumerator
11043 name="ISharedFolderEnumerator" type="ISharedFolder"
11044 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
11045 />
11046
11047 <collection
11048 name="ISharedFolderCollection" type="ISharedFolder"
11049 enumerator="ISharedFolderEnumerator"
11050 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11051 readonly="yes">
11052
11053 <method name="findByName">
11054 <desc>
11055 Searches this collection for a shared folder with the given logical
11056 name.
11057 <note>
11058 The method returns an error if the given name does not correspond to
11059 any shared folder in the collection.
11060 </note>
11061 </desc>
11062 <param name="name" type="wstring" dir="in">
11063 <desc>Logical name of the shared folder to search for</desc>
11064 </param>
11065 <param name="sharedFolder" type="ISharedFolder" dir="return">
11066 <desc>Found shared folder object</desc>
11067 </param>
11068 </method>
11069
11070 </collection>
11071
11072 <interface
11073 name="ISharedFolder" extends="$unknown"
11074 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
11075 wsmap="struct"
11076 >
11077 <desc>
11078 The ISharedFolder interface represents a folder in the host computer's
11079 file system accessible from the guest OS running inside a virtual
11080 machine using an associated logical name.
11081
11082 There are three types of shared folders:
11083 <ul>
11084 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11085 folders available to all virtual machines.</li>
11086 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11087 VM-specific shared folders available to the given virtual machine at
11088 startup.</li>
11089 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11090 VM-specific shared folders created in the session context (for
11091 example, when the virtual machine is running) and automatically
11092 discarded when the session is closed (the VM is powered off).</li>
11093 </ul>
11094
11095 Logical names of shared folders must be unique within the given scope
11096 (global, permanent or transient). However, they do not need to be unique
11097 across scopes. In this case, the definition of the shared folder in a
11098 more specific scope takes precedence over definitions in all other
11099 scopes. The order of precedence is (more specific to more general):
11100 <ol>
11101 <li>Transient definitions</li>
11102 <li>Permanent definitions</li>
11103 <li>Global definitions</li>
11104 </ol>
11105
11106 For example, if MyMachine has a shared folder named
11107 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11108 transient shared folder named <tt>C_DRIVE</tt> (that points
11109 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11110 of <tt>C_DRIVE</tt> in the guest OS so
11111 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11112 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11113 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11114 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11115 to <tt>C:\\</tt> if it still exists.
11116
11117 Note that permanent and transient shared folders of different machines
11118 are in different name spaces, so they don't overlap and don't need to
11119 have unique logical names.
11120
11121 <note>
11122 Global shared folders are not implemented in the current version of the
11123 product.
11124 </note>
11125 </desc>
11126
11127 <attribute name="name" type="wstring" readonly="yes">
11128 <desc>Logical name of the shared folder.</desc>
11129 </attribute>
11130
11131 <attribute name="hostPath" type="wstring" readonly="yes">
11132 <desc>Full path to the shared folder in the host file system.</desc>
11133 </attribute>
11134
11135 <attribute name="accessible" type="boolean" readonly="yes">
11136 <desc>
11137 Whether the folder defined by the host path is currently
11138 accessible or not.
11139 For example, the folder can be unaccessible if it is placed
11140 on the network share that is not available by the time
11141 this property is read.
11142 </desc>
11143 </attribute>
11144
11145 <attribute name="writable" type="boolean" readonly="yes">
11146 <desc>
11147 Whether the folder defined by the host path is writable or
11148 not.
11149 </desc>
11150 </attribute>
11151
11152 </interface>
11153
11154 <!--
11155 // ISession
11156 /////////////////////////////////////////////////////////////////////////
11157 -->
11158
11159 <interface
11160 name="IInternalSessionControl" extends="$unknown"
11161 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11162 internal="yes"
11163 wsmap="suppress"
11164 >
11165 <method name="getPID">
11166 <desc>PID of the process that has created this Session object.
11167 </desc>
11168 <param name="pid" type="unsigned long" dir="return"/>
11169 </method>
11170
11171 <method name="getRemoteConsole">
11172 <desc>
11173 Returns the console object suitable for remote control.
11174
11175 <result name="VBOX_E_INVALID_VM_STATE">
11176 Session state prevents operation.
11177 </result>
11178 <result name="VBOX_E_INVALID_OBJECT_STATE">
11179 Session type prevents operation.
11180 </result>
11181
11182 </desc>
11183 <param name="console" type="IConsole" dir="return"/>
11184 </method>
11185
11186 <method name="assignMachine">
11187 <desc>
11188 Assigns the machine object associated with this direct-type
11189 session or informs the session that it will be a remote one
11190 (if @a machine == NULL).
11191
11192 <result name="VBOX_E_INVALID_VM_STATE">
11193 Session state prevents operation.
11194 </result>
11195 <result name="VBOX_E_INVALID_OBJECT_STATE">
11196 Session type prevents operation.
11197 </result>
11198
11199 </desc>
11200 <param name="machine" type="IMachine" dir="in"/>
11201 </method>
11202
11203 <method name="assignRemoteMachine">
11204 <desc>
11205 Assigns the machine and the (remote) console object associated with
11206 this remote-type session.
11207
11208 <result name="VBOX_E_INVALID_VM_STATE">
11209 Session state prevents operation.
11210 </result>
11211
11212 </desc>
11213 <param name="machine" type="IMachine" dir="in"/>
11214 <param name="console" type="IConsole" dir="in"/>
11215 </method>
11216
11217 <method name="updateMachineState">
11218 <desc>
11219 Updates the machine state in the VM process.
11220 Must be called only in certain cases
11221 (see the method implementation).
11222
11223 <result name="VBOX_E_INVALID_VM_STATE">
11224 Session state prevents operation.
11225 </result>
11226 <result name="VBOX_E_INVALID_OBJECT_STATE">
11227 Session type prevents operation.
11228 </result>
11229
11230 </desc>
11231 <param name="aMachineState" type="MachineState" dir="in"/>
11232 </method>
11233
11234 <method name="uninitialize">
11235 <desc>
11236 Uninitializes (closes) this session. Used by VirtualBox to close
11237 the corresponding remote session when the direct session dies
11238 or gets closed.
11239
11240 <result name="VBOX_E_INVALID_VM_STATE">
11241 Session state prevents operation.
11242 </result>
11243
11244 </desc>
11245 </method>
11246
11247 <method name="onDVDDriveChange">
11248 <desc>
11249 Triggered when settings of the DVD drive object of the
11250 associated virtual machine have changed.
11251
11252 <result name="VBOX_E_INVALID_VM_STATE">
11253 Session state prevents operation.
11254 </result>
11255 <result name="VBOX_E_INVALID_OBJECT_STATE">
11256 Session type prevents operation.
11257 </result>
11258
11259 </desc>
11260 </method>
11261
11262 <method name="onFloppyDriveChange">
11263 <desc>
11264 Triggered when settings of the floppy drive object of the
11265 associated virtual machine have changed.
11266
11267 <result name="VBOX_E_INVALID_VM_STATE">
11268 Session state prevents operation.
11269 </result>
11270 <result name="VBOX_E_INVALID_OBJECT_STATE">
11271 Session type prevents operation.
11272 </result>
11273
11274 </desc>
11275 </method>
11276
11277 <method name="onNetworkAdapterChange">
11278 <desc>
11279 Triggered when settings of a network adapter of the
11280 associated virtual machine have changed.
11281
11282 <result name="VBOX_E_INVALID_VM_STATE">
11283 Session state prevents operation.
11284 </result>
11285 <result name="VBOX_E_INVALID_OBJECT_STATE">
11286 Session type prevents operation.
11287 </result>
11288
11289 </desc>
11290 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11291 </method>
11292
11293 <method name="onSerialPortChange">
11294 <desc>
11295 Triggered when settings of a serial port of the
11296 associated virtual machine have changed.
11297
11298 <result name="VBOX_E_INVALID_VM_STATE">
11299 Session state prevents operation.
11300 </result>
11301 <result name="VBOX_E_INVALID_OBJECT_STATE">
11302 Session type prevents operation.
11303 </result>
11304
11305 </desc>
11306 <param name="serialPort" type="ISerialPort" dir="in"/>
11307 </method>
11308
11309 <method name="onParallelPortChange">
11310 <desc>
11311 Triggered when settings of a parallel port of the
11312 associated virtual machine have changed.
11313
11314 <result name="VBOX_E_INVALID_VM_STATE">
11315 Session state prevents operation.
11316 </result>
11317 <result name="VBOX_E_INVALID_OBJECT_STATE">
11318 Session type prevents operation.
11319 </result>
11320
11321 </desc>
11322 <param name="parallelPort" type="IParallelPort" dir="in"/>
11323 </method>
11324
11325 <method name="onVRDPServerChange">
11326 <desc>
11327 Triggered when settings of the VRDP server object of the
11328 associated virtual machine have changed.
11329
11330 <result name="VBOX_E_INVALID_VM_STATE">
11331 Session state prevents operation.
11332 </result>
11333 <result name="VBOX_E_INVALID_OBJECT_STATE">
11334 Session type prevents operation.
11335 </result>
11336
11337 </desc>
11338 </method>
11339
11340 <method name="onUSBControllerChange">
11341 <desc>
11342 Triggered when settings of the USB controller object of the
11343 associated virtual machine have changed.
11344
11345 <result name="VBOX_E_INVALID_VM_STATE">
11346 Session state prevents operation.
11347 </result>
11348 <result name="VBOX_E_INVALID_OBJECT_STATE">
11349 Session type prevents operation.
11350 </result>
11351
11352 </desc>
11353 </method>
11354
11355 <method name="onSharedFolderChange">
11356 <desc>
11357 Triggered when a permanent (global or machine) shared folder has been
11358 created or removed.
11359 <note>
11360 We don't pass shared folder parameters in this notification because
11361 the order in which parallel notifications are delivered is not defined,
11362 therefore it could happen that these parameters were outdated by the
11363 time of processing this notification.
11364 </note>
11365
11366 <result name="VBOX_E_INVALID_VM_STATE">
11367 Session state prevents operation.
11368 </result>
11369 <result name="VBOX_E_INVALID_OBJECT_STATE">
11370 Session type prevents operation.
11371 </result>
11372
11373 </desc>
11374 <param name="global" type="boolean" dir="in"/>
11375 </method>
11376
11377 <method name="onUSBDeviceAttach">
11378 <desc>
11379 Triggered when a request to capture a USB device (as a result
11380 of matched USB filters or direct call to
11381 <link to="IConsole::attachUSBDevice"/>) has completed.
11382 A @c null @a error object means success, otherwise it
11383 describes a failure.
11384
11385 <result name="VBOX_E_INVALID_VM_STATE">
11386 Session state prevents operation.
11387 </result>
11388 <result name="VBOX_E_INVALID_OBJECT_STATE">
11389 Session type prevents operation.
11390 </result>
11391
11392 </desc>
11393 <param name="device" type="IUSBDevice" dir="in"/>
11394 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11395 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11396 </method>
11397
11398 <method name="onUSBDeviceDetach">
11399 <desc>
11400 Triggered when a request to release the USB device (as a result
11401 of machine termination or direct call to
11402 <link to="IConsole::detachUSBDevice"/>) has completed.
11403 A @c null @a error object means success, otherwise it
11404
11405 <result name="VBOX_E_INVALID_VM_STATE">
11406 Session state prevents operation.
11407 </result>
11408 <result name="VBOX_E_INVALID_OBJECT_STATE">
11409 Session type prevents operation.
11410 </result>
11411
11412 </desc>
11413 <param name="id" type="uuid" dir="in"/>
11414 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11415 </method>
11416
11417 <method name="onShowWindow">
11418 <desc>
11419 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11420 <link to="IMachine::showConsoleWindow()"/> in order to notify
11421 console callbacks
11422 <link to="IConsoleCallback::onCanShowWindow()"/>
11423 and <link to="IConsoleCallback::onShowWindow()"/>.
11424
11425 <result name="VBOX_E_INVALID_OBJECT_STATE">
11426 Session type prevents operation.
11427 </result>
11428
11429 </desc>
11430 <param name="check" type="boolean" dir="in"/>
11431 <param name="canShow" type="boolean" dir="out"/>
11432 <param name="winId" type="unsigned long long" dir="out"/>
11433 </method>
11434
11435 <method name="accessGuestProperty">
11436 <desc>
11437 Called by <link to="IMachine::getGuestProperty()"/> and by
11438 <link to="IMachine::setGuestProperty()"/> in order to read and
11439 modify guest properties.
11440
11441 <result name="VBOX_E_INVALID_VM_STATE">
11442 Machine session is not open.
11443 </result>
11444 <result name="VBOX_E_INVALID_OBJECT_STATE">
11445 Session type is not direct.
11446 </result>
11447
11448 </desc>
11449 <param name="name" type="wstring" dir="in"/>
11450 <param name="value" type="wstring" dir="in"/>
11451 <param name="flags" type="wstring" dir="in"/>
11452 <param name="isSetter" type="boolean" dir="in"/>
11453 <param name="retValue" type="wstring" dir="out"/>
11454 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11455 <param name="retFlags" type="wstring" dir="out"/>
11456 </method>
11457
11458 <method name="enumerateGuestProperties">
11459 <desc>
11460 Return a list of the guest properties matching a set of patterns along
11461 with their values, time stamps and flags.
11462
11463 <result name="VBOX_E_INVALID_VM_STATE">
11464 Machine session is not open.
11465 </result>
11466 <result name="VBOX_E_INVALID_OBJECT_STATE">
11467 Session type is not direct.
11468 </result>
11469
11470 </desc>
11471 <param name="patterns" type="wstring" dir="in">
11472 <desc>
11473 The patterns to match the properties against as a comma-separated
11474 string. If this is empty, all properties currently set will be
11475 returned.
11476 </desc>
11477 </param>
11478 <param name="key" type="wstring" dir="out" safearray="yes">
11479 <desc>
11480 The key names of the properties returned.
11481 </desc>
11482 </param>
11483 <param name="value" type="wstring" dir="out" safearray="yes">
11484 <desc>
11485 The values of the properties returned. The array entries match the
11486 corresponding entries in the @a key array.
11487 </desc>
11488 </param>
11489 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11490 <desc>
11491 The time stamps of the properties returned. The array entries match
11492 the corresponding entries in the @a key array.
11493 </desc>
11494 </param>
11495 <param name="flags" type="wstring" dir="out" safearray="yes">
11496 <desc>
11497 The flags of the properties returned. The array entries match the
11498 corresponding entries in the @a key array.
11499 </desc>
11500 </param>
11501 </method>
11502
11503 </interface>
11504
11505 <interface
11506 name="ISession" extends="$dispatched"
11507 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11508 wsmap="managed"
11509 >
11510 <desc>
11511 The ISession interface represents a serialization primitive for virtual
11512 machines.
11513
11514 With VirtualBox, every time one wishes to manipulate a virtual machine
11515 (e.g. change its settings or start execution), a session object is
11516 required. Such an object must be passed to one of the session methods
11517 that open the given session, which then initiates the machine manipulation.
11518
11519 A session serves several purposes: it identifies to the inter-process VirtualBox
11520 code which process is currently working with the virtual machine, and it ensures
11521 that there are no incompatible requests from several processes for the
11522 same virtual machine. Session objects can therefore be thought of as mutex
11523 semaphores that lock virtual machines to prevent conflicting accesses from
11524 several processes.
11525
11526 How sessions objects are used depends on whether you use the Main API
11527 via COM or via the webservice:
11528
11529 <ul>
11530 <li>When using the COM API directly, an object of the Session class from the
11531 VirtualBox type library needs to be created. In regular COM C++ client code,
11532 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
11533 This object will then act as a local session object in further calls to open
11534 a session.
11535 </li>
11536
11537 <li>In the webservice, the session manager (IWebsessionManager) instead creates
11538 one session object automatically when <link to="IWebsessionManager::logon" />
11539 is called. A managed object reference to that session object can be retrieved by
11540 calling <link to="IWebsessionManager::getSessionObject" />. This session object
11541 reference can then be used to open sessions.
11542 </li>
11543 </ul>
11544
11545 Sessions are mainly used in two variations:
11546
11547 <ul>
11548 <li>
11549 To start a virtual machine in a separate process, one would call
11550 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
11551 object as its first parameter. This session then identifies the caller
11552 and lets him control the started machine (for example, pause machine
11553 execution or power it down) as well as be notified about machine
11554 execution state changes.
11555 </li>
11556
11557 <li>To alter machine settings, or to start machine execution within the
11558 current process, one needs to open a direct session for the machine first by
11559 calling <link to="IVirtualBox::openSession"/>. While a direct session
11560 is open within one process, no any other process may open another direct
11561 session for the same machine. This prevents the machine from being changed
11562 by other processes while it is running or while the machine is being configured.
11563 </li>
11564 </ul>
11565
11566 One also can attach to an existing direct session already opened by
11567 another process (for example, in order to send a control request to the
11568 virtual machine such as the pause or the reset request). This is done by
11569 calling <link to="IVirtualBox::openExistingSession"/>.
11570
11571 <note>
11572 Unless you are trying to write a new VirtualBox front-end that
11573 performs direct machine execution (like the VirtualBox or VBoxSDL
11574 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
11575 session opened by <link to="IVirtualBox::openSession"/> and use this
11576 session only to change virtual machine settings. If you simply want to
11577 start virtual machine execution using one of the existing front-ends
11578 (for example the VirtualBox GUI or headless server), simply use
11579 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
11580 will power up the machine automatically for you.
11581 </note>
11582 </desc>
11583
11584 <attribute name="state" type="SessionState" readonly="yes">
11585 <desc>Current state of this session.</desc>
11586 </attribute>
11587
11588 <attribute name="type" type="SessionType" readonly="yes">
11589 <desc>
11590 Type of this session. The value of this attribute is valid only
11591 if the session is currently open (i.e. its #state is
11592 SessionType_SessionOpen), otherwise an error will be returned.
11593 </desc>
11594 </attribute>
11595
11596 <attribute name="machine" type="IMachine" readonly="yes">
11597 <desc>Machine object associated with this session.</desc>
11598 </attribute>
11599
11600 <attribute name="console" type="IConsole" readonly="yes">
11601 <desc>Console object associated with this session.</desc>
11602 </attribute>
11603
11604 <method name="close">
11605 <desc>
11606 Closes a session that was previously opened.
11607
11608 It is recommended that every time an "open session" method (such as
11609 <link to="IVirtualBox::openRemoteSession" /> or
11610 <link to="IVirtualBox::openSession" />) has been called to
11611 manipulate a virtual machine, the caller invoke
11612 ISession::close() when it's done doing so. Since sessions are
11613 serialization primitives much like ordinary mutexes, they are
11614 best used the same way: for each "open" call, there should be
11615 a matching "close" call, even when errors occur.
11616
11617 Otherwise, if a direct session for a machine opened with
11618 <link to="IVirtualBox::openSession()"/> is not explicitly closed
11619 when the application terminates, the state of the machine will
11620 be set to <link to="MachineState_Aborted" /> on the server.
11621
11622 Generally, it is recommended to close all open sessions explicitly
11623 before terminating the application (regardless of the reason for
11624 the termination).
11625
11626 <note>
11627 Do not expect the session state (<link to="ISession::state" />
11628 to return to "Closed" immediately after you invoke
11629 ISession::close(), particularly if you have started a remote
11630 session to execute the VM in a new process. The session state will
11631 automatically return to "Closed" once the VM is no longer executing,
11632 which can of course take a very long time.
11633 </note>
11634
11635 <result name="E_UNEXPECTED">
11636 Session is not open.
11637 </result>
11638
11639 </desc>
11640 </method>
11641
11642 </interface>
11643
11644 <!--
11645 // ISATAController
11646 /////////////////////////////////////////////////////////////////////////
11647 -->
11648
11649 <interface
11650 name="ISATAController" extends="$unknown"
11651 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
11652 wsmap="managed"
11653 >
11654 <attribute name="enabled" type="boolean">
11655 <desc>
11656 Flag whether the SATA controller is present in the
11657 guest system. If disabled, the virtual guest hardware will
11658 not contain any SATA controller. Can only be changed when
11659 the VM is powered off.
11660 </desc>
11661 </attribute>
11662
11663 <attribute name="portCount" type="unsigned long">
11664 <desc>
11665 The number of usable ports on the SATA controller.
11666 It ranges from 1 to 30.
11667 </desc>
11668 </attribute>
11669
11670 <method name="GetIDEEmulationPort">
11671 <desc>
11672 Gets the corresponding port number which is emulated as an IDE device.
11673
11674 <result name="E_INVALIDARG">
11675 The @a devicePosition is not in the range 0 to 3.
11676 </result>
11677
11678 </desc>
11679 <param name="devicePosition" type="long" dir="in"/>
11680 <param name="portNumber" type="long" dir="return"/>
11681 </method>
11682
11683 <method name="SetIDEEmulationPort">
11684 <desc>
11685 Sets the port number which is emulated as an IDE device.
11686
11687 <result name="E_INVALIDARG">
11688 The @a devicePosition is not in the range 0 to 3 or the
11689 @a portNumber is not in the range 0 to 29.
11690 </result>
11691
11692 </desc>
11693 <param name="devicePosition" type="long" dir="in"/>
11694 <param name="portNumber" type="long" dir="in"/>
11695 </method>
11696
11697 </interface>
11698
11699<if target="wsdl">
11700
11701 <!--
11702 // IManagedObjectRef
11703 /////////////////////////////////////////////////////////////////////////
11704 -->
11705
11706 <interface
11707 name="IManagedObjectRef" extends="$unknown"
11708 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
11709 internal="yes"
11710 wsmap="managed"
11711 wscpp="hardcoded"
11712 >
11713 <desc>
11714 Managed object reference.
11715
11716 Only within the webservice, a managed object reference (which is really
11717 an opaque number) allows a webservice client to address an object
11718 that lives in the address space of the webservice server.
11719
11720 Behind each managed object reference, there is a COM object that lives
11721 in the webservice server's address space. The COM object is not freed
11722 until the managed object reference is released, either by an explicit
11723 call to <link to="IManagedObjectRef::release" /> or by logging off from
11724 the webservice (<link to="IWebsessionManager::logoff" />), which releases
11725 all objects created during the webservice session.
11726
11727 Whenever a method call of the VirtualBox API returns a COM object, the
11728 webservice representation of that method will instead return a
11729 managed object reference, which can then be used to invoke methods
11730 on that object.
11731 </desc>
11732
11733 <method name="getInterfaceName">
11734 <desc>
11735 Returns the name of the interface that this managed object represents,
11736 for example, "IMachine", as a string.
11737 </desc>
11738 <param name="return" type="wstring" dir="return"/>
11739 </method>
11740
11741 <method name="release">
11742 <desc>
11743 Releases this managed object reference and frees the resources that
11744 were allocated for it in the webservice server process. After calling
11745 this method, the identifier of the reference can no longer be used.
11746 </desc>
11747 </method>
11748
11749 </interface>
11750
11751 <!--
11752 // IWebsessionManager
11753 /////////////////////////////////////////////////////////////////////////
11754 -->
11755
11756 <interface
11757 name="IWebsessionManager" extends="$unknown"
11758 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
11759 internal="yes"
11760 wsmap="global"
11761 wscpp="hardcoded"
11762 >
11763 <desc>
11764 Websession manager. This provides essential services
11765 to webservice clients.
11766 </desc>
11767 <method name="logon">
11768 <desc>
11769 Logs a new client onto the webservice and returns a managed object reference to
11770 the IVirtualBox instance, which the client can then use as a basis to further
11771 queries, since all calls to the VirtualBox API are based on the IVirtualBox
11772 interface, in one way or the other.
11773 </desc>
11774 <param name="username" type="wstring" dir="in"/>
11775 <param name="password" type="wstring" dir="in"/>
11776 <param name="return" type="IVirtualBox" dir="return"/>
11777 </method>
11778
11779 <method name="getSessionObject">
11780 <desc>
11781 Returns a managed object reference to the internal ISession object that was created
11782 for this web service session when the client logged on.
11783
11784 <see>ISession</see>
11785 </desc>
11786 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11787 <param name="return" type="ISession" dir="return"/>
11788 </method>
11789
11790 <method name="logoff">
11791 <desc>
11792 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
11793 and destroys all resources associated with the session (most importantly, all
11794 managed objects created in the server while the session was active).
11795 </desc>
11796 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11797 </method>
11798
11799 </interface>
11800
11801</if>
11802
11803 <!--
11804 // IPerformanceCollector & friends
11805 /////////////////////////////////////////////////////////////////////////
11806 -->
11807
11808 <interface
11809 name="IPerformanceMetric" extends="$unknown"
11810 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
11811 >
11812 <desc>
11813 The IPerformanceMetric interface represents parameters of the given
11814 performance metric.
11815 </desc>
11816
11817 <attribute name="metricName" type="wstring" readonly="yes">
11818 <desc>
11819 Name of the metric.
11820 </desc>
11821 </attribute>
11822
11823 <attribute name="object" type="$unknown" readonly="yes">
11824 <desc>
11825 Object this metric belongs to.
11826 </desc>
11827 </attribute>
11828
11829 <attribute name="description" type="wstring" readonly="yes">
11830 <desc>
11831 Textual description of the metric.
11832 </desc>
11833 </attribute>
11834
11835 <attribute name="period" type="unsigned long" readonly="yes">
11836 <desc>
11837 Time interval between samples, measured in seconds.
11838 </desc>
11839 </attribute>
11840
11841 <attribute name="count" type="unsigned long" readonly="yes">
11842 <desc>
11843 Number of recent samples retained by the performance collector for this
11844 metric.
11845
11846 When the collected sample count exceeds this number, older samples
11847 are discarded.
11848 </desc>
11849 </attribute>
11850
11851 <attribute name="unit" type="wstring" readonly="yes">
11852 <desc>
11853 Unit of measurement.
11854 </desc>
11855 </attribute>
11856
11857 <attribute name="minimumValue" type="long" readonly="yes">
11858 <desc>
11859 Minimum possible value of this metric.
11860 </desc>
11861 </attribute>
11862
11863 <attribute name="maximumValue" type="long" readonly="yes">
11864 <desc>
11865 Maximum possible value of this metric.
11866 </desc>
11867 </attribute>
11868 </interface>
11869
11870 <interface
11871 name="IPerformanceCollector" extends="$unknown"
11872 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
11873 wsmap="managed"
11874 >
11875 <desc>
11876 The IPerformanceCollector interface represents a service that collects and
11877 stores performance metrics data.
11878
11879 Performance metrics are associated with objects like IHost and
11880 IMachine. Each object has a distinct set of performance metrics.
11881 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
11882
11883 Metric data are collected at the specified intervals and are retained
11884 internally. The interval and the number of samples retained can be set
11885 with <link to="IPerformanceCollector::setupMetrics" />.
11886
11887 Metrics are organized hierarchically, each level separated by slash (/).
11888 General scheme for metric name is
11889 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
11890 metric name stands for: CPU category, Load metric, User submetric, average
11891 aggregate. An aggregate function is computed over all retained data. Valid
11892 aggregate functions are:
11893
11894 <ul>
11895 <li>avg -- average</li>
11896 <li>min -- minimum</li>
11897 <li>max -- maximum</li>
11898 </ul>
11899
11900 "Category/Metric" together form base metric name. A base metric is the
11901 smallest unit for which a sampling interval and the number of retained
11902 samples can be set. Only base metrics can be enabled and disabled. All
11903 sub-metrics are collected when their base metric is collected.
11904 Collected values for any set of sub-metrics can be queried with
11905 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
11906 metric parameters, querying metric data, enabling or disabling metrics
11907 wildcards can be used in metric names to specify a subset of metrics. For
11908 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
11909 averages can be queried using <tt>*:avg</tt> and so on. To query metric
11910 values without aggregates <tt>*:</tt> can be used.
11911
11912 The valid names for base metrics are:
11913
11914 <ul>
11915 <li>CPU/Load</li>
11916 <li>CPU/MHz</li>
11917 <li>RAM/Usage</li>
11918 </ul>
11919
11920 The general sequence for collecting and retrieving the metrics is:
11921 <ul>
11922 <li>
11923 Obtain an instance of IPerformanceCollector with
11924 <link to="IVirtualBox::performanceCollector" />
11925 </li>
11926 <li>
11927 Allocate and populate an array with references to objects the metrics
11928 will be collected for. Use references to IHost and IMachine objects.
11929 </li>
11930 <li>
11931 Allocate and populate an array with base metric names the data will be
11932 collected for.
11933 </li>
11934 <li>
11935 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
11936 metric data will be collected and stored.
11937 </li>
11938 <li>
11939 Wait for the data to get collected.
11940 </li>
11941 <li>
11942 Allocate and populate an array with references to objects the metric
11943 values will be queried for. You can re-use the object array used for
11944 setting base metrics.
11945 </li>
11946 <li>
11947 Allocate and populate an array with metric names the data will be
11948 collected for. Note that metric names differ from base metric names.
11949 </li>
11950 <li>
11951 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
11952 have been collected so far are returned. Note that the values are still
11953 retained internally and data collection continues.
11954 </li>
11955 </ul>
11956
11957 For an example of usage refer to the following files in VirtualBox SDK:
11958 <ul>
11959 <li>
11960 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
11961 </li>
11962 <li>
11963 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
11964 </li>
11965 </ul>
11966 </desc>
11967
11968 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
11969 <desc>
11970 Array of unique names of metrics.
11971
11972 This array represents all metrics supported by the performance
11973 collector. Individual objects do not necessarily support all of them.
11974 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
11975 list of supported metrics for a particular object.
11976 </desc>
11977 </attribute>
11978
11979 <method name="getMetrics">
11980 <desc>
11981 Returns parameters of specified metrics for a set of objects.
11982 <note>
11983 @c Null metrics array means all metrics. @c Null object array means
11984 all existing objects.
11985 </note>
11986 </desc>
11987 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11988 <desc>
11989 Metric name filter. Currently, only a comma-separated list of metrics
11990 is supported.
11991 </desc>
11992 </param>
11993 <param name="objects" type="$unknown" dir="in" safearray="yes">
11994 <desc>
11995 Set of objects to return metric parameters for.
11996 </desc>
11997 </param>
11998 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
11999 <desc>
12000 Array of returned metric parameters.
12001 </desc>
12002 </param>
12003 </method>
12004
12005 <method name="setupMetrics">
12006 <desc>
12007 Sets parameters of specified base metrics for a set of objects. Returns
12008 an array of <link to="IPerformanceMetric" /> describing the metrics have
12009 been affected.
12010 <note>
12011 @c Null or empty metric name array means all metrics. @c Null or empty
12012 object array means all existing objects. If metric name array contains
12013 a single element and object array contains many, the single metric
12014 name array element is applied to each object array element to form
12015 metric/object pairs.
12016 </note>
12017 </desc>
12018 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12019 <desc>
12020 Metric name filter. Comma-separated list of metrics with wildcard
12021 support.
12022 </desc>
12023 </param>
12024 <param name="objects" type="$unknown" dir="in" safearray="yes">
12025 <desc>
12026 Set of objects to setup metric parameters for.
12027 </desc>
12028 </param>
12029 <param name="period" type="unsigned long" dir="in">
12030 <desc>
12031 Time interval in seconds between two consecutive samples of performance
12032 data.
12033 </desc>
12034 </param>
12035 <param name="count" type="unsigned long" dir="in">
12036 <desc>
12037 Number of samples to retain in performance data history. Older samples
12038 get discarded.
12039 </desc>
12040 </param>
12041 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12042 <desc>
12043 Array of metrics that have been modified by the call to this method.
12044 </desc>
12045 </param>
12046 </method>
12047
12048 <method name="enableMetrics">
12049 <desc>
12050 Turns on collecting specified base metrics. Returns an array of
12051 <link to="IPerformanceMetric" /> describing the metrics have been
12052 affected.
12053 <note>
12054 @c Null or empty metric name array means all metrics. @c Null or empty
12055 object array means all existing objects. If metric name array contains
12056 a single element and object array contains many, the single metric
12057 name array element is applied to each object array element to form
12058 metric/object pairs.
12059 </note>
12060 </desc>
12061 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12062 <desc>
12063 Metric name filter. Comma-separated list of metrics with wildcard
12064 support.
12065 </desc>
12066 </param>
12067 <param name="objects" type="$unknown" dir="in" safearray="yes">
12068 <desc>
12069 Set of objects to enable metrics for.
12070 </desc>
12071 </param>
12072 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12073 <desc>
12074 Array of metrics that have been modified by the call to this method.
12075 </desc>
12076 </param>
12077 </method>
12078
12079 <method name="disableMetrics">
12080 <desc>
12081 Turns off collecting specified base metrics. Returns an array of
12082 <link to="IPerformanceMetric" /> describing the metrics have been
12083 affected.
12084 <note>
12085 @c Null or empty metric name array means all metrics. @c Null or empty
12086 object array means all existing objects. If metric name array contains
12087 a single element and object array contains many, the single metric
12088 name array element is applied to each object array element to form
12089 metric/object pairs.
12090 </note>
12091 </desc>
12092 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12093 <desc>
12094 Metric name filter. Comma-separated list of metrics with wildcard
12095 support.
12096 </desc>
12097 </param>
12098 <param name="objects" type="$unknown" dir="in" safearray="yes">
12099 <desc>
12100 Set of objects to disable metrics for.
12101 </desc>
12102 </param>
12103 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12104 <desc>
12105 Array of metrics that have been modified by the call to this method.
12106 </desc>
12107 </param>
12108 </method>
12109
12110 <method name="queryMetricsData">
12111 <desc>
12112 Queries collected metrics data for a set of objects.
12113
12114 The data itself and related metric information are returned in seven
12115 parallel and one flattened array of arrays. Elements of
12116 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12117 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12118 the same index describe one set of values corresponding to a single
12119 metric.
12120
12121 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12122 start and length of a sub-array is indicated by
12123 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12124 value for metric <tt>metricNames[i]</tt> is at
12125 <tt>returnData[returnIndices[i]]</tt>.
12126
12127 <note>
12128 @c Null or empty metric name array means all metrics. @c Null or empty
12129 object array means all existing objects. If metric name array contains
12130 a single element and object array contains many, the single metric
12131 name array element is applied to each object array element to form
12132 metric/object pairs.
12133 </note>
12134 <note>
12135 Data collection continues behind the scenes after call to @c
12136 queryMetricsData. The return data can be seen as the snapshot of
12137 the current state at the time of @c queryMetricsData call. The
12138 internally kept metric values are not cleared by the call. This makes
12139 possible querying different subsets of metrics or aggregates with
12140 subsequent calls. If periodic querying is needed it is highly
12141 suggested to query the values with @c interval*count period to avoid
12142 confusion. This way a completely new set of data values will be
12143 provided by each query.
12144 </note>
12145 </desc>
12146 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12147 <desc>
12148 Metric name filter. Comma-separated list of metrics with wildcard
12149 support.
12150 </desc>
12151 </param>
12152 <param name="objects" type="$unknown" dir="in" safearray="yes">
12153 <desc>
12154 Set of objects to query metrics for.
12155 </desc>
12156 </param>
12157 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12158 <desc>
12159 Names of metrics returned in @c returnData.
12160 </desc>
12161 </param>
12162 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12163 <desc>
12164 Objects associated with metrics returned in @c returnData.
12165 </desc>
12166 </param>
12167 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12168 <desc>
12169 Units of measurement for each returned metric.
12170 </desc>
12171 </param>
12172 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12173 <desc>
12174 Divisor that should be applied to return values in order to get
12175 floating point values. For example:
12176 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12177 will retrieve the floating point value of i-th sample of the first
12178 metric.
12179 </desc>
12180 </param>
12181 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12182 <desc>
12183 Sequence numbers of the first elements of value sequences of particular metrics
12184 returned in @c returnData. For aggregate metrics it is the sequence number of
12185 the sample the aggregate started calculation from.
12186 </desc>
12187 </param>
12188 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12189 <desc>
12190 Indices of the first elements of value sequences of particular metrics
12191 returned in @c returnData.
12192 </desc>
12193 </param>
12194 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12195 <desc>
12196 Lengths of value sequences of particular metrics.
12197 </desc>
12198 </param>
12199 <param name="returnData" type="long" dir="return" safearray="yes">
12200 <desc>
12201 Flattened array of all metric data containing sequences of values for
12202 each metric.
12203 </desc>
12204 </param>
12205 </method>
12206
12207 </interface>
12208
12209 <module name="VBoxSVC" context="LocalServer">
12210 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12211 namespace="virtualbox.org">
12212 <interface name="IVirtualBox" default="yes"/>
12213 </class>
12214 </module>
12215
12216 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12217 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12218 namespace="virtualbox.org">
12219 <interface name="ISession" default="yes"/>
12220 </class>
12221 </module>
12222
12223</library>
12224
12225</idl>
12226
12227<!-- 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