VirtualBox

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

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

Main: Exmplicit machine state comparisons replaced with bool "IsMetastate"-like methods.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 437.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 15762 2008-12-25 23:53:50Z 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_INVALID_OBJECT_STATE">
1650 Virtual machine was not created within this VirtualBox instance.
1651 </result>
1652
1653 </desc>
1654 <param name="machine" type="IMachine" dir="in"/>
1655 </method>
1656
1657 <method name="getMachine">
1658 <desc>
1659 Attempts to find a virtual machine given its UUID.
1660 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1661 instead.
1662
1663 <result name="VBOX_E_FILE_ERROR">
1664 Could not find registered machine matching @a id.
1665 </result>
1666
1667 </desc>
1668 <param name="id" type="uuid" dir="in"/>
1669 <param name="machine" type="IMachine" dir="return"/>
1670 </method>
1671
1672 <method name="findMachine">
1673 <desc>
1674 Attempts to find a virtual machine given its name.
1675 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1676 instead.
1677
1678 <result name="VBOX_E_FILE_ERROR">
1679 Could not find registered machine matching @a name.
1680 </result>
1681
1682 </desc>
1683 <param name="name" type="wstring" dir="in"/>
1684 <param name="machine" type="IMachine" dir="return"/>
1685 </method>
1686
1687 <method name="unregisterMachine">
1688 <desc>
1689
1690 Unregisters the machine previously registered using
1691 <link to="#registerMachine"/>. After successful method invocation, the
1692 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1693 to all registered callbacks.
1694
1695 <note>
1696 The specified machine must not be in the Saved state, have an open
1697 (or a spawning) direct session associated with it, have snapshots or
1698 have hard disks attached.
1699 </note>
1700
1701 <note>
1702 This method implicitly calls <link to="IMachine::saveSettings"/> to
1703 save all current machine settings before unregistering it.
1704 </note>
1705
1706 <note>
1707 If the given machine is inaccessible (see
1708 <link to="IMachine::accessible"/>), it will be unregistered and
1709 fully uninitialized right afterwards. As a result, the returned
1710 machine object will be unusable and an attempt to call
1711 <b>any</b> method will return the "Object not ready" error.
1712 </note>
1713
1714 <result name="VBOX_E_FILE_ERROR">
1715 Could not find registered machine matching @a id.
1716 </result>
1717 <result name="VBOX_E_INVALID_VM_STATE">
1718 Machine is in Saved state.
1719 </result>
1720 <result name="VBOX_E_INVALID_OBJECT_STATE">
1721 Machine has snapshot or open session or hard disk attached.
1722 </result>
1723
1724 </desc>
1725 <param name="id" type="uuid" dir="in">
1726 <desc>UUID of the machine to unregister.</desc>
1727 </param>
1728 <param name="machine" type="IMachine" dir="return">
1729 <desc>Unregistered machine object.</desc>
1730 </param>
1731 </method>
1732
1733 <method name="createHardDisk2">
1734 <desc>
1735 Creates a new base hard disk object that will use the given storage
1736 format and location for hard disk data.
1737
1738 Note that the actual storage unit is not created by this method. In
1739 order to do it, and before you are able to attach the created hard disk
1740 to virtual machines, you must call one of the following methods to
1741 allocate a format-specific storage unit at the specified location:
1742 <ul>
1743 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1744 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1745 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1746 </ul>
1747
1748 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1749 remain uninitialized until the hard disk storage unit is successfully
1750 created by one of the above methods.
1751
1752 After the storage unit is successfully created, the hard disk gets
1753 remembered by this VirtualBox installation and will be accessible
1754 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1755 methods. Remembered root (base) hard disks are also returned as part of
1756 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1757
1758 The list of all storage formats supported by this VirtualBox
1759 installation can be obtained using
1760 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1761 attribute is empty or <tt>null</tt> then the default storage format
1762 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1763 be used for creating a storage unit of the hard disk.
1764
1765 Note that the format of the location string is storage format specific.
1766 See <link to="IMedium::location"/>, IHardDisk2 and
1767 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1768
1769 <result name="VBOX_E_OBJECT_NOT_FOUND">
1770 @a format identifier is invalid. See
1771 <link to="ISystemProperties::hardDiskFormats"/>.
1772 </result>
1773 <result name="VBOX_E_FILE_ERROR">
1774 @a location is a not valid file name (for file-based formats only).
1775 </result>
1776 <result name="E_INVALIDARG">
1777 @a format is a null or empty string.
1778 </result>
1779 </desc>
1780 <param name="format" type="wstring" dir="in">
1781 <desc>
1782 Identifier of the storage format to use for the new hard disk.
1783 </desc>
1784 </param>
1785 <param name="location" type="wstring" dir="in">
1786 <desc>
1787 Location of the storage unit for the new hard disk.
1788 </desc>
1789 </param>
1790 <param name="hardDisk" type="IHardDisk2" dir="return">
1791 <desc>Created hard disk object.</desc>
1792 </param>
1793 </method>
1794
1795 <method name="openHardDisk2">
1796 <desc>
1797 Opens a hard disk from an existing location.
1798
1799 After the hard disk is successfully opened by this method, it gets
1800 remembered by (known to) this VirtualBox installation and will be
1801 accessible through <link to="#getHardDisk2()"/> and
1802 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1803 are also returned as part of the <link to="#hardDisks2"/> array and can
1804 be attached to virtual machines. See IHardDisk2 for more details.
1805
1806 If a differencing hard disk is to be opened by this method, the
1807 operation will succeed only if its parent hard disk and all ancestors,
1808 if any, are already known to this VirtualBox installation (for example,
1809 were opened by this method before).
1810
1811 This method tries to guess the storage format of the specified hard disk
1812 by reading hard disk data at the specified location.
1813
1814 Note that the format of the location string is storage format specific.
1815 See <link to="IMedium::location"/>, IHardDisk2 and
1816 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1817
1818
1819 <result name="VBOX_E_FILE_ERROR">
1820 Invalid hard disk storage file location.
1821 </result>
1822 <result name="VBOX_E_IPRT_ERROR">
1823 Could not get hard disk storage format.
1824 </result>
1825 <result name="E_INVALIDARG">
1826 Invalid hard disk storage format.
1827 </result>
1828
1829 </desc>
1830 <param name="location" type="wstring" dir="in">
1831 <desc>
1832 Location of the storage unit that contains hard disk data in one of
1833 the supported storage formats.
1834 </desc>
1835 </param>
1836 <param name="hardDisk" type="IHardDisk2" dir="return">
1837 <desc>Opened hard disk object.</desc>
1838 </param>
1839 </method>
1840
1841 <method name="getHardDisk2" const="yes">
1842 <desc>
1843 Returns a hard disk with the given UUID.
1844
1845 The hard disk with the given UUID must be known to this VirtualBox
1846 installation, i.e. it must be previously created by
1847 <link to="#createHardDisk2()"/> or opened by <link
1848 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1849
1850 <result name="VBOX_E_OBJECT_NOT_FOUND">
1851 No hard disk object matching @a id found.
1852 </result>
1853
1854 </desc>
1855 <param name="id" type="uuid" dir="in">
1856 <desc>UUID of the hard disk to look for.</desc>
1857 </param>
1858 <param name="hardDisk" type="IHardDisk2" dir="return">
1859 <desc>Found hard disk object.</desc>
1860 </param>
1861 </method>
1862
1863 <method name="findHardDisk2">
1864 <desc>
1865 Returns a hard disk that uses the given location to store hard
1866 disk data.
1867
1868 The given hard disk must be known to this VirtualBox installation, i.e.
1869 it must be previously created by
1870 <link to="#createHardDisk2()"/> or opened by <link
1871 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1872
1873 The search is done by comparing the value of the @a location argument to
1874 the <link to="IHardDisk2::location"/> attribute of each known hard
1875 disk.
1876
1877 For locations represented by file names in the host's file system, the
1878 requested location can be a path relative to the
1879 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1880 only a file name without any path is given, the
1881 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1882 folder</link> will be prepended to the file name before searching. Note
1883 that on case sensitive file systems, a case sensitive comparison is
1884 performed, otherwise the case of symbols in the file path is ignored.
1885
1886 <result name="VBOX_E_OBJECT_NOT_FOUND">
1887 No hard disk object matching @a location found.
1888 </result>
1889
1890 </desc>
1891 <param name="location" type="wstring" dir="in">
1892 <desc>Location string to search for.</desc>
1893 </param>
1894 <param name="hardDisk" type="IHardDisk2" dir="return">
1895 <desc>Found hard disk object.</desc>
1896 </param>
1897 </method>
1898
1899 <method name="openDVDImage">
1900 <desc>
1901 Opens a CD/DVD image contained in the specified file of the supported
1902 format and assigns it the given UUID.
1903
1904 After the image is successfully opened by this method, it gets
1905 remembered by (known to) this VirtualBox installation and will be
1906 accessible through <link to="#getDVDImage()"/> and
1907 <link to="#findDVDImage()"/> methods. Remembered images are also
1908 returned as part of the <link to="#DVDImages"/> array and can be mounted
1909 to virtual machines. See IMedium for more details.
1910
1911 See <link to="IMedium::location"/> to get more details about the format
1912 of the location string.
1913
1914 <note>
1915 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1916 </note>
1917
1918 <result name="VBOX_E_INVALID_OBJECT_STATE">
1919 CD/DVD image already exists in the media registry.
1920 </result>
1921
1922 </desc>
1923 <param name="location" type="wstring" dir="in">
1924 <desc>
1925 Full path to the file that contains a valid CD/DVD image.
1926 </desc>
1927 </param>
1928 <param name="id" type="uuid" dir="in">
1929 <desc>
1930 UUID to assign to the given image within this VirtualBox installation.
1931 If an empty (null) UUID is specified, the system will randomly
1932 generate a new UUID.
1933 </desc>
1934 </param>
1935 <param name="image" type="IDVDImage2" dir="return">
1936 <desc>Opened CD/DVD image object.</desc>
1937 </param>
1938 </method>
1939
1940 <method name="getDVDImage">
1941 <desc>
1942 Returns a CD/DVD image with the given UUID.
1943
1944 The image with the given UUID must be known to this VirtualBox
1945 installation, i.e. it must be previously opened by <link
1946 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1947
1948 <result name="VBOX_E_OBJECT_NOT_FOUND">
1949 No matching DVD image found in the media registry.
1950 </result>
1951
1952 </desc>
1953 <param name="id" type="uuid" dir="in">
1954 <desc>UUID of the image to look for.</desc>
1955 </param>
1956 <param name="image" type="IDVDImage2" dir="return">
1957 <desc>Found CD/DVD image object.</desc>
1958 </param>
1959 </method>
1960
1961 <method name="findDVDImage">
1962 <desc>
1963 Returns a CD/DVD image with the given image location.
1964
1965 The image with the given UUID must be known to this VirtualBox
1966 installation, i.e. it must be previously opened by <link
1967 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1968
1969 The search is done by comparing the value of the @a location argument to
1970 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1971
1972 The requested location can be a path relative to the
1973 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1974 only a file name without any path is given, the
1975 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1976 folder</link> will be prepended to the file name before searching. Note
1977 that on case sensitive file systems, a case sensitive comparison is
1978 performed, otherwise the case in the file path is ignored.
1979
1980 <result name="VBOX_E_FILE_ERROR">
1981 Invalid image file location.
1982 </result>
1983 <result name="VBOX_E_OBJECT_NOT_FOUND">
1984 No matching DVD image found in the media registry.
1985 </result>
1986
1987 </desc>
1988 <param name="location" type="wstring" dir="in">
1989 <desc>CD/DVD image file path to look for.</desc>
1990 </param>
1991 <param name="image" type="IDVDImage2" dir="return">
1992 <desc>Found CD/DVD image object.</desc>
1993 </param>
1994 </method>
1995
1996 <method name="openFloppyImage">
1997 <desc>
1998 Opens a floppy image contained in the specified file of the supported
1999 format and assigns it the given UUID.
2000
2001 After the image is successfully opened by this method, it gets
2002 remembered by (known to) this VirtualBox installation and will be
2003 accessible through <link to="#getFloppyImage()"/> and
2004 <link to="#findFloppyImage()"/> methods. Remembered images are also
2005 returned as part of the <link to="#floppyImages"/> array and can be
2006 mounted to virtual machines. See IMedium for more details.
2007
2008 See <link to="IMedium::location"/> to get more details about the format
2009 of the location string.
2010
2011 <result name="VBOX_E_FILE_ERROR">
2012 Floppy image specified by @a location not accessible.
2013 </result>
2014 <result name="VBOX_E_INVALID_OBJECT_STATE">
2015 Floppy image already exists in the media registry.
2016 </result>
2017
2018 <note>
2019 Currently, only raw floppy images are supported by VirtualBox.
2020 </note>
2021 </desc>
2022 <param name="location" type="wstring" dir="in">
2023 <desc>
2024 Full path to the file that contains a valid floppy image.
2025 </desc>
2026 </param>
2027 <param name="id" type="uuid" dir="in">
2028 <desc>
2029 UUID to assign to the given image file within this VirtualBox
2030 installation. If an empty (null) UUID is specified, the system will
2031 randomly generate a new UUID.
2032 </desc>
2033 </param>
2034 <param name="image" type="IFloppyImage2" dir="return">
2035 <desc>Opened floppy image object.</desc>
2036 </param>
2037 </method>
2038
2039 <method name="getFloppyImage">
2040 <desc>
2041 Returns a floppy image with the given UUID.
2042
2043 The image with the given UUID must be known to this VirtualBox
2044 installation, i.e. it must be previously opened by <link
2045 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2046
2047 <result name="VBOX_E_OBJECT_NOT_FOUND">
2048 No matching floppy image found in the media registry.
2049 </result>
2050
2051 </desc>
2052 <param name="id" type="uuid" dir="in">
2053 <desc>UUID of the image to look for.</desc>
2054 </param>
2055 <param name="image" type="IFloppyImage2" dir="return">
2056 <desc>Found floppy image object.</desc>
2057 </param>
2058 </method>
2059
2060 <method name="findFloppyImage">
2061 <desc>
2062 Returns a floppy image with the given image location.
2063
2064 The image with the given UUID must be known to this VirtualBox
2065 installation, i.e. it must be previously opened by <link
2066 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2067
2068 The search is done by comparing the value of the @a location argument to
2069 the <link to="IMedium::location"/> attribute of each known floppy image.
2070
2071 The requested location can be a path relative to the
2072 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2073 only a file name without any path is given, the
2074 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2075 folder</link> will be prepended to the file name before searching. Note
2076 that on case sensitive file systems, a case sensitive comparison is
2077 performed, otherwise the case of symbols in the file path is ignored.
2078
2079 <result name="VBOX_E_FILE_ERROR">
2080 Invalid image file location.
2081 </result>
2082 <result name="VBOX_E_OBJECT_NOT_FOUND">
2083 No matching floppy image found in the media registry.
2084 </result>
2085
2086 </desc>
2087 <param name="location" type="wstring" dir="in">
2088 <desc>Floppy image file path to look for.</desc>
2089 </param>
2090 <param name="image" type="IFloppyImage2" dir="return">
2091 <desc>Found floppy image object.</desc>
2092 </param>
2093 </method>
2094
2095 <method name="getGuestOSType">
2096 <desc>
2097 Returns an object describing the specified guest OS type.
2098
2099 The requested guest OS type is specified using a string which is a
2100 mnemonic identifier of the guest operating system, such as
2101 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2102 particular virtual machine can be read or set using the
2103 <link to="IMachine::OSTypeId"/> attribute.
2104
2105 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2106 available guest OS type objects. Each object has an
2107 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2108 the guest OS this object describes.
2109
2110 <result name="E_INVALIDARG">
2111 @a id is not a valid Guest OS type.
2112 </result>
2113
2114 </desc>
2115 <param name="id" type="wstring" dir="in">
2116 <desc>Guest OS type ID string.</desc>
2117 </param>
2118 <param name="type" type="IGuestOSType" dir="return">
2119 <desc>Guest OS type object.</desc>
2120 </param>
2121 </method>
2122
2123 <method name="createSharedFolder">
2124 <desc>
2125 Creates a new global shared folder by associating the given logical
2126 name with the given host path, adds it to the collection of shared
2127 folders and starts sharing it. Refer to the description of
2128 <link to="ISharedFolder"/> to read more about logical names.
2129 <note>
2130 In the current implementation, this operation is not
2131 implemented.
2132 </note>
2133 </desc>
2134 <param name="name" type="wstring" dir="in">
2135 <desc>Unique logical name of the shared folder.</desc>
2136 </param>
2137 <param name="hostPath" type="wstring" dir="in">
2138 <desc>Full path to the shared folder in the host file system.</desc>
2139 </param>
2140 <param name="writable" type="boolean" dir="in">
2141 <desc>Whether the share is writable or readonly</desc>
2142 </param>
2143 </method>
2144
2145 <method name="removeSharedFolder">
2146 <desc>
2147 Removes the global shared folder with the given name previously
2148 created by <link to="#createSharedFolder"/> from the collection of
2149 shared folders and stops sharing it.
2150 <note>
2151 In the current implementation, this operation is not
2152 implemented.
2153 </note>
2154 </desc>
2155 <param name="name" type="wstring" dir="in">
2156 <desc>Logical name of the shared folder to remove.</desc>
2157 </param>
2158 </method>
2159
2160 <method name="getNextExtraDataKey">
2161 <desc>
2162 Returns the global extra data key name following the supplied key.
2163
2164 An error is returned if the supplied @a key does not exist. @c NULL is
2165 returned in @a nextKey if the supplied key is the last key. When
2166 supplying @c NULL for the @a key, the first key item is returned in @a
2167 nextKey (if there is any). @a nextValue is an optional parameter and
2168 if supplied, the next key's value is returned in it.
2169
2170 <result name="VBOX_E_OBJECT_NOT_FOUND">
2171 Extra data @a key not found.
2172 </result>
2173
2174 </desc>
2175 <param name="key" type="wstring" dir="in">
2176 <desc>Name of the data key to follow.</desc>
2177 </param>
2178 <param name="nextKey" type="wstring" dir="out">
2179 <desc>Name of the next data key.</desc>
2180 </param>
2181 <param name="nextValue" type="wstring" dir="out">
2182 <desc>Value of the next data key.</desc>
2183 </param>
2184 </method>
2185
2186 <method name="getExtraData">
2187 <desc>
2188 Returns associated global extra data.
2189
2190 If the requested data @a key does not exist, this function will
2191 succeed and return @c NULL in the @a value argument.
2192
2193 <result name="VBOX_E_FILE_ERROR">
2194 Settings file not accessible.
2195 </result>
2196 <result name="VBOX_E_XML_ERROR">
2197 Could not parse the settings file.
2198 </result>
2199
2200 </desc>
2201 <param name="key" type="wstring" dir="in">
2202 <desc>Name of the data key to get.</desc>
2203 </param>
2204 <param name="value" type="wstring" dir="return">
2205 <desc>Value of the requested data key.</desc>
2206 </param>
2207 </method>
2208
2209 <method name="setExtraData">
2210 <desc>
2211 Sets associated global extra data.
2212
2213 If you pass @c NULL as a key @a value, the given @a key will be
2214 deleted.
2215
2216 <note>
2217 Before performing the actual data change, this method will ask all
2218 registered callbacks using the
2219 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2220 notification for a permission. If one of the callbacks refuses the
2221 new value, the change will not be performed.
2222 </note>
2223 <note>
2224 On success, the
2225 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2226 is called to inform all registered callbacks about a successful data
2227 change.
2228 </note>
2229
2230 <result name="VBOX_E_FILE_ERROR">
2231 Settings file not accessible.
2232 </result>
2233 <result name="VBOX_E_XML_ERROR">
2234 Could not parse the settings file.
2235 </result>
2236 <result name="E_ACCESSDENIED">
2237 Modification request refused.
2238 </result>
2239
2240 </desc>
2241 <param name="key" type="wstring" dir="in">
2242 <desc>Name of the data key to set.</desc>
2243 </param>
2244 <param name="value" type="wstring" dir="in">
2245 <desc>Value to assign to the key.</desc>
2246 </param>
2247 </method>
2248
2249 <method name="openSession">
2250 <desc>
2251 Opens a new direct session with the given virtual machine.
2252
2253 A direct session acts as a local lock on the given VM.
2254 There can be only one direct session open at a time for every
2255 virtual machine, protecting the VM from being manipulated by
2256 conflicting actions from different processes. Only after a
2257 direct session has been opened, one can change all VM settings
2258 and execute the VM in the process space of the session object.
2259
2260 Sessions therefore can be compared to mutex semaphores that
2261 lock a given VM for modification and execution.
2262 See <link to="ISession">ISession</link> for details.
2263
2264 <note>Unless you are writing a new VM frontend, you will not
2265 want to execute a VM in the current process. To spawn a new
2266 process that executes a VM, use
2267 <link to="IVirtualBox::openRemoteSession" />
2268 instead.</note>
2269
2270 Upon successful return, the session object can be used to
2271 get access to the machine and to the VM console.
2272
2273 In VirtualBox terminology, the machine becomes "mutable" after
2274 a session has been opened. Note that the "mutable" machine
2275 object, on which you may invoke IMachine methods to change its
2276 settings, will be a different object from the immutable IMachine
2277 objects returned by various IVirtualBox methods. To obtain a
2278 mutable IMachine object (upon which you can invoke settings methods),
2279 use the <link to="ISession::machine" /> attribute.
2280
2281 One must always call <link to="ISession::close" /> to release the
2282 lock on the machine, or the machine's state will eventually be
2283 set to "Aborted".
2284
2285 In other words, to change settings on a machine, the following
2286 sequence is typically performed:
2287
2288 <ol>
2289 <li>Call this method (openSession) to have a machine locked for
2290 the current session.</li>
2291
2292 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2293
2294 <li>Change the settings of the machine.</li>
2295
2296 <li>Call <link to="IMachine::saveSettings" />.</li>
2297
2298 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2299 </ol>
2300
2301 <result name="E_UNEXPECTED">
2302 Virtual machine not registered.
2303 </result>
2304 <result name="E_ACCESSDENIED">
2305 Process not started by OpenRemoteSession.
2306 </result>
2307 <result name="VBOX_E_INVALID_OBJECT_STATE">
2308 Session already open or being opened.
2309 </result>
2310 <result name="VBOX_E_VM_ERROR">
2311 Failed to assign machine to session.
2312 </result>
2313
2314 </desc>
2315 <param name="session" type="ISession" dir="in">
2316 <desc>
2317 Session object that will represent the opened session after
2318 successful method invocation. This object must not represent
2319 the already open session.
2320 <note>
2321 This session will be automatically closed if the
2322 VirtualBox server is terminated for some reason.
2323 </note>
2324 </desc>
2325 </param>
2326 <param name="machineId" type="uuid" dir="in">
2327 <desc>ID of the virtual machine to open a session with.</desc>
2328 </param>
2329 </method>
2330
2331 <method name="openRemoteSession">
2332 <desc>
2333 Spawns a new process that executes a virtual machine (called a
2334 "remote session").
2335
2336 Opening a remote session causes the VirtualBox server to start a new
2337 process that opens a direct session with the given VM. As a result, the
2338 VM is locked by that direct session in the new process, preventing
2339 conflicting changes from other processes. Since sessions act as locks
2340 that such prevent conflicting changes, one cannot open a remote session
2341 for a VM that already has another open session (direct or remote), or
2342 is currently in the process of opening one (see <link
2343 to="IMachine::sessionState"/>).
2344
2345 While the remote session still provides some level of control over the
2346 VM execution to the caller (using the <link to="IConsole" /> interface),
2347 not all VM settings are available for modification within the remote
2348 session context.
2349
2350 This operation can take some time (a new VM is started in a new process,
2351 for which memory and other resources need to be set up). Because of this,
2352 an <link to="IProgress" /> is returned to allow the caller to wait for this
2353 asynchronous operation to be completed. Until then, the remote session
2354 object remains in the closed state, and accessing the machine or its
2355 console through it is invalid. It is recommended to use
2356 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2357 completion.
2358
2359 As with all <link to="ISession" /> objects, it is recommended to call
2360 <link to="ISession::close" /> on the local session object once openRemoteSession()
2361 has been called. However, the session's state (see <link to="ISession::state" />)
2362 will not return to "Closed" until the remote session has also closed (i.e.
2363 until the VM is no longer running). In that case, however, the state of
2364 the session will automatically change back to "Closed".
2365
2366 Currently supported session types (values of the @a type
2367 argument) are:
2368 <ul>
2369 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2370 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2371 </ul>
2372
2373 The @a environment argument is a string containing definitions of
2374 environment variables in the following format:
2375 @code
2376 NAME[=VALUE]\n
2377 NAME[=VALUE]\n
2378 ...
2379 @endcode
2380 where <tt>\\n</tt> is the new line character. These environment
2381 variables will be appended to the environment of the VirtualBox server
2382 process. If an environment variable exists both in the server process
2383 and in this list, the value from this list takes precedence over the
2384 server's variable. If the value of the environment variable is
2385 omitted, this variable will be removed from the resulting environment.
2386 If the environment string is @c null, the server environment is
2387 inherited by the started process as is.
2388
2389 <see>openExistingSession</see>
2390
2391 <result name="E_UNEXPECTED">
2392 Virtual machine not registered.
2393 </result>
2394 <result name="E_INVALIDARG">
2395 Invalid session type @a type.
2396 </result>
2397 <result name="VBOX_E_OBJECT_NOT_FOUND">
2398 No machine matching @a machineId found.
2399 </result>
2400 <result name="VBOX_E_INVALID_OBJECT_STATE">
2401 Session already open or being opened.
2402 </result>
2403 <result name="VBOX_E_IPRT_ERROR">
2404 Launching process for machine failed.
2405 </result>
2406 <result name="VBOX_E_VM_ERROR">
2407 Failed to assign machine to session.
2408 </result>
2409
2410 </desc>
2411 <param name="session" type="ISession" dir="in">
2412 <desc>
2413 Session object that will represent the opened remote session
2414 after successful method invocation (this object must not
2415 represent an already open session).
2416 </desc>
2417 </param>
2418 <param name="machineId" type="uuid" dir="in">
2419 <desc>ID of the virtual machine to open a session with.</desc>
2420 </param>
2421 <param name="type" type="wstring" dir="in">
2422 <desc>
2423 Type of the remote session (case sensitive).
2424 </desc>
2425 </param>
2426 <param name="environment" type="wstring" dir="in">
2427 <desc>
2428 Environment to pass to the opened session (may be @c null).
2429 </desc>
2430 </param>
2431 <param name="progress" type="IProgress" dir="return">
2432 <desc>Progress object to track the operation completion.</desc>
2433 </param>
2434 </method>
2435
2436 <method name="openExistingSession">
2437 <desc>
2438 Opens a new remote session with the virtual machine for
2439 which a direct session is already open.
2440
2441 The remote session provides some level of control over the VM
2442 execution (using the IConsole interface) to the caller; however,
2443 within the remote session context, not all VM settings are available
2444 for modification.
2445
2446 As opposed to <link to="#openRemoteSession()"/>, the number of
2447 remote sessions opened this way is not limited by the API
2448
2449 <note>
2450 It is an error to open a remote session with the machine that
2451 doesn't have an open direct session.
2452 </note>
2453
2454 <result name="E_UNEXPECTED">
2455 Virtual machine not registered.
2456 </result>
2457 <result name="VBOX_E_OBJECT_NOT_FOUND">
2458 No machine matching @a machineId found.
2459 </result>
2460 <result name="VBOX_E_INVALID_OBJECT_STATE">
2461 Session already open or being opened.
2462 </result>
2463 <result name="VBOX_E_INVALID_SESSION_STATE">
2464 Direct session state not Open.
2465 </result>
2466 <result name="VBOX_E_VM_ERROR">
2467 Failed to get console object from direct session or assign
2468 machine to session.
2469 </result>
2470
2471 <see>openRemoteSession</see>
2472 </desc>
2473 <param name="session" type="ISession" dir="in">
2474 <desc>
2475 Session object that will represent the open remote session
2476 after successful method invocation. This object must not
2477 represent an already open session.
2478 <note>
2479 This session will be automatically closed when the peer
2480 (direct) session dies or gets closed.
2481 </note>
2482 </desc>
2483 </param>
2484 <param name="machineId" type="uuid" dir="in">
2485 <desc>ID of the virtual machine to open a session with.</desc>
2486 </param>
2487 </method>
2488
2489 <method name="registerCallback">
2490 <desc>
2491 Registers a new global VirtualBox callback. The methods of the given
2492 callback object will be called by VirtualBox when an appropriate
2493 event occurs.
2494
2495 <result name="E_INVALIDARG">
2496 Registering a @c NULL @a callback is pretty pointless, ain't it?
2497 <!-- See if someone is actually reading this and objects :-) -->
2498 </result>
2499
2500 </desc>
2501 <param name="callback" type="IVirtualBoxCallback" dir="in">
2502 <desc>Callback object to register.</desc>
2503 </param>
2504 </method>
2505
2506 <method name="unregisterCallback">
2507 <desc>
2508 Unregisters the previously registered global VirtualBox callback.
2509
2510 <result name="E_INVALIDARG">
2511 Specified @a callback not registered.
2512 </result>
2513
2514 </desc>
2515 <param name="callback" type="IVirtualBoxCallback" dir="in">
2516 <desc>Callback object to unregister.</desc>
2517 </param>
2518 </method>
2519
2520 <method name="waitForPropertyChange">
2521 <desc>
2522 Blocks the caller until any of the properties represented by the @a
2523 what argument changes the value or until the given timeout interval
2524 expires.
2525
2526 The @a what argument is a comma separated list of property masks that
2527 describe properties the caller is interested in. The property mask is
2528 a string in the following format:
2529
2530 <pre>
2531 [[group.]subgroup.]name
2532 </pre>
2533
2534 where @c name is the property name and @c group, @c subgroup are zero
2535 or more property group specifiers. Each element (group or name) in
2536 the property mask may be either a Latin string or an asterisk symbol
2537 (@c "*") which is used to match any string for the given element. A
2538 property mask that doesn't contain asterisk symbols represents a
2539 single fully qualified property name.
2540
2541 Groups in the fully qualified property name go from more generic (the
2542 left-most part) to more specific (the right-most part). The first
2543 element is usually a name of the object the property belongs to. The
2544 second element may be either a property name, or a child object name,
2545 or an index if the preceding element names an object which is one of
2546 many objects of the same type. This way, property names form a
2547 hierarchy of properties. Here are some examples of property names:
2548
2549 <table>
2550 <tr>
2551 <td><tt>VirtualBox.version</tt></td>
2552 <td><link to="IVirtualBox::version"/> property</td>
2553 </tr>
2554 <tr>
2555 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2556 <td><link to="IMachine::name"/> property of the machine with the
2557 given UUID</td>
2558 </tr>
2559 </table>
2560
2561 Most property names directly correspond to the properties of objects
2562 (components) provided by the VirtualBox library and may be used to
2563 track changes to these properties. However, there may be
2564 pseudo-property names that don't correspond to any existing object's
2565 property directly, as well as there may be object properties that
2566 don't have a corresponding property name that is understood by this
2567 method, and therefore changes to such properties cannot be
2568 tracked. See individual object's property descriptions to get a
2569 fully qualified property name that can be used with this method (if
2570 any).
2571
2572 There is a special property mask @c "*" (i.e. a string consisting of a
2573 single asterisk symbol) that can be used to match all properties.
2574 Below are more examples of property masks:
2575
2576 <table>
2577 <tr>
2578 <td><tt>VirtualBox.*</tt></td>
2579 <td>Track all properties of the VirtualBox object</td>
2580 </tr>
2581 <tr>
2582 <td><tt>Machine.*.name</tt></td>
2583 <td>Track changes to the <link to="IMachine::name"/> property of
2584 all registered virtual machines</td>
2585 </tr>
2586 </table>
2587
2588 <note>
2589 This function is not implemented in the current version of the
2590 product.
2591 </note>
2592 </desc>
2593 <param name="what" type="wstring" dir="in">
2594 <desc>Comma separated list of property masks.</desc>
2595 </param>
2596 <param name="timeout" type="unsigned long" dir="in">
2597 <desc>
2598 Wait timeout in milliseconds.
2599 Specify -1 for an indefinite wait.
2600 </desc>
2601 </param>
2602 <param name="changed" type="wstring" dir="out">
2603 <desc>
2604 Comma separated list of properties that have been changed and caused
2605 this method to return to the caller.
2606 </desc>
2607 </param>
2608 <param name="values" type="wstring" dir="out">
2609 <desc>Reserved, not currently used.</desc>
2610 </param>
2611 </method>
2612
2613 <method name="saveSettings">
2614 <desc>
2615 Saves the global settings to the global settings file
2616 (<link to="#settingsFilePath"/>).
2617
2618 This method is only useful for explicitly saving the global settings
2619 file after it has been auto-converted from the old format to the most
2620 recent format (see <link to="#settingsFileVersion"/> for details).
2621 Normally, the global settings file is implicitly saved when a global
2622 setting is changed.
2623
2624 <result name="VBOX_E_FILE_ERROR">
2625 Settings file not accessible.
2626 </result>
2627 <result name="VBOX_E_XML_ERROR">
2628 Could not parse the settings file.
2629 </result>
2630
2631 </desc>
2632 </method>
2633
2634 <method name="saveSettingsWithBackup">
2635 <desc>
2636 Creates a backup copy of the global settings file
2637 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2638 calls <link to="#saveSettings()"/>.
2639
2640 Note that the backup copy is created <b>only</b> if the settings file
2641 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2642 details). Otherwise, this call is fully equivalent to
2643 <link to="#saveSettings()"/> and no backup copying is done.
2644
2645 The backup copy is created in the same directory where the original
2646 settings file is located. It is given the following file name:
2647 <pre>
2648 original.xml.x.y-platform.bak
2649 </pre>
2650 where <tt>original.xml</tt> is the original settings file name
2651 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2652 format of the settings file (before auto-conversion).
2653
2654 If the given backup file already exists, this method will try to add the
2655 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2656 0 to 9) and copy it again until it succeeds. If all suffixes are
2657 occupied, or if any other copy error occurs, this method will return a
2658 failure.
2659
2660 If the copy operation succeeds, the @a bakFileName return argument will
2661 receive a full path to the created backup file (for informational
2662 purposes). Note that this will happen even if the subsequent
2663 <link to="#saveSettings()"/> call performed by this method after the
2664 copy operation, fails.
2665
2666 <note>
2667 The VirtualBox API never calls this method. It is intended purely for
2668 the purposes of creating backup copies of the settings files by
2669 front-ends before saving the results of the automatically performed
2670 settings conversion to disk.
2671 </note>
2672
2673 <see>settingsFileVersion</see>
2674
2675 <result name="VBOX_E_FILE_ERROR">
2676 Settings file not accessible.
2677 </result>
2678 <result name="VBOX_E_XML_ERROR">
2679 Could not parse the settings file.
2680 </result>
2681 <result name="VBOX_E_IPRT_ERROR">
2682 Could not copy the settings file.
2683 </result>
2684
2685 </desc>
2686 <param name="bakFileName" type="wstring" dir="return">
2687 <desc>Full path to the created backup copy.</desc>
2688 </param>
2689 </method>
2690
2691 </interface>
2692
2693 <!--
2694 // IMachine
2695 /////////////////////////////////////////////////////////////////////////
2696 -->
2697
2698 <enumerator
2699 name="IMachineEnumerator" type="IMachine"
2700 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2701 />
2702
2703 <collection
2704 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2705 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2706 readonly="yes"
2707 />
2708
2709 <interface
2710 name="IInternalMachineControl" extends="$unknown"
2711 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2712 internal="yes"
2713 wsmap="suppress"
2714 >
2715 <method name="updateState">
2716 <desc>
2717 Updates the VM state.
2718 <note>
2719 This operation will also update the settings file with
2720 the correct information about the saved state file
2721 and delete this file from disk when appropriate.
2722 </note>
2723 </desc>
2724 <param name="state" type="MachineState" dir="in"/>
2725 </method>
2726
2727 <method name="getIPCId">
2728 <param name="id" type="wstring" dir="return"/>
2729 </method>
2730
2731 <method name="runUSBDeviceFilters">
2732 <desc>
2733 Asks the server to run USB devices filters of the associated
2734 machine against the given USB device and tell if there is
2735 a match.
2736 <note>
2737 Intended to be used only for remote USB devices. Local
2738 ones don't require to call this method (this is done
2739 implicitly by the Host and USBProxyService).
2740 </note>
2741 </desc>
2742 <param name="device" type="IUSBDevice" dir="in"/>
2743 <param name="matched" type="boolean" dir="out"/>
2744 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2745 </method>
2746
2747 <method name="captureUSBDevice">
2748 <desc>
2749 Requests a capture of the given host USB device.
2750 When the request is completed, the VM process will
2751 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2752 notification.
2753 </desc>
2754 <param name="id" type="uuid" dir="in"/>
2755 </method>
2756
2757 <method name="detachUSBDevice">
2758 <desc>
2759 Notification that a VM is going to detach (done = false) or has
2760 already detached (done = true) the given USB device.
2761 When the done = true request is completed, the VM process will
2762 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2763 notification.
2764 <note>
2765 In the done = true case, the server must run its own filters
2766 and filters of all VMs but this one on the detached device
2767 as if it were just attached to the host computer.
2768 </note>
2769 </desc>
2770 <param name="id" type="uuid" dir="in"/>
2771 <param name="done" type="boolean" dir="in"/>
2772 </method>
2773
2774 <method name="autoCaptureUSBDevices">
2775 <desc>
2776 Requests a capture all matching USB devices attached to the host.
2777 When the request is completed, the VM process will
2778 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2779 notification per every captured device.
2780 </desc>
2781 </method>
2782
2783 <method name="detachAllUSBDevices">
2784 <desc>
2785 Notification that a VM that is being powered down. The done
2786 parameter indicates whether which stage of the power down
2787 we're at. When done = false the VM is announcing its
2788 intentions, while when done = true the VM is reporting
2789 what it has done.
2790 <note>
2791 In the done = true case, the server must run its own filters
2792 and filters of all VMs but this one on all detach devices as
2793 if they were just attached to the host computer.
2794 </note>
2795 </desc>
2796 <param name="done" type="boolean" dir="in"/>
2797 </method>
2798
2799 <method name="onSessionEnd">
2800 <desc>
2801 Triggered by the given session object when the session is about
2802 to close normally.
2803 </desc>
2804 <param name="session" type="ISession" dir="in">
2805 <desc>Session that is being closed</desc>
2806 </param>
2807 <param name="progress" type="IProgress" dir="return">
2808 <desc>
2809 Used to wait until the corresponding machine is actually
2810 dissociated from the given session on the server.
2811 Returned only when this session is a direct one.
2812 </desc>
2813 </param>
2814 </method>
2815
2816 <method name="beginSavingState">
2817 <desc>
2818 Called by the VM process to inform the server it wants to
2819 save the current state and stop the VM execution.
2820 </desc>
2821 <param name="progress" type="IProgress" dir="in">
2822 <desc>
2823 Progress object created by the VM process to wait until
2824 the state is saved.
2825 </desc>
2826 </param>
2827 <param name="stateFilePath" type="wstring" dir="out">
2828 <desc>
2829 File path the VM process must save the execution state to.
2830 </desc>
2831 </param>
2832 </method>
2833
2834 <method name="endSavingState">
2835 <desc>
2836 Called by the VM process to inform the server that saving
2837 the state previously requested by #beginSavingState is either
2838 successfully finished or there was a failure.
2839
2840 <result name="VBOX_E_FILE_ERROR">
2841 Settings file not accessible.
2842 </result>
2843 <result name="VBOX_E_XML_ERROR">
2844 Could not parse the settings file.
2845 </result>
2846
2847 </desc>
2848
2849 <param name="success" type="boolean" dir="in">
2850 <desc><tt>true</tt> to indicate success and <tt>false</tt>
2851 otherwise.
2852 </desc>
2853 </param>
2854 </method>
2855
2856 <method name="adoptSavedState">
2857 <desc>
2858 Gets called by IConsole::adoptSavedState.
2859 <result name="VBOX_E_FILE_ERROR">
2860 Invalid saved state file path.
2861 </result>
2862 </desc>
2863 <param name="savedStateFile" type="wstring" dir="in">
2864 <desc>Path to the saved state file to adopt.</desc>
2865 </param>
2866 </method>
2867
2868 <method name="beginTakingSnapshot">
2869 <desc>
2870 Called by the VM process to inform the server it wants to
2871 take a snapshot.
2872
2873 <result name="VBOX_E_FILE_ERROR">
2874 Settings file not accessible.
2875 </result>
2876 <result name="VBOX_E_XML_ERROR">
2877 Could not parse the settings file.
2878 </result>
2879 </desc>
2880 <param name="initiator" type="IConsole" dir="in">
2881 <desc>The console object that initiated this call.</desc>
2882 </param>
2883 <param name="name" type="wstring" dir="in">
2884 <desc>Snapshot name.</desc>
2885 </param>
2886 <param name="description" type="wstring" dir="in">
2887 <desc>Snapshot description.</desc>
2888 </param>
2889 <param name="progress" type="IProgress" dir="in">
2890 <desc>
2891 Progress object created by the VM process to wait until
2892 the state is saved (only for online snapshots).
2893 </desc>
2894 </param>
2895 <param name="stateFilePath" type="wstring" dir="out">
2896 <desc>
2897 File path the VM process must save the execution state to.
2898 </desc>
2899 </param>
2900 <param name="serverProgress" type="IProgress" dir="out">
2901 <desc>
2902 Progress object created by the server process to wait until
2903 the snapshot is taken (VDI diff creation, etc.).
2904 </desc>
2905 </param>
2906 </method>
2907
2908 <method name="endTakingSnapshot">
2909 <desc>
2910 Called by the VM process to inform the server that the snapshot
2911 previously requested by #beginTakingSnapshot is either
2912 successfully taken or there was a failure.
2913 </desc>
2914
2915 <param name="success" type="boolean" dir="in">
2916 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2917 </param>
2918 </method>
2919
2920 <method name="discardSnapshot">
2921 <desc>
2922 Gets called by IConsole::discardSnapshot.
2923 <result name="VBOX_E_INVALID_OBJECT_STATE">
2924 Snapshot has more than one child snapshot.
2925 </result>
2926 </desc>
2927 <param name="initiator" type="IConsole" dir="in">
2928 <desc>The console object that initiated this call.</desc>
2929 </param>
2930 <param name="id" type="uuid" dir="in">
2931 <desc>UUID of the snapshot to discard.</desc>
2932 </param>
2933 <param name="machineState" type="MachineState" dir="out">
2934 <desc>New machine state after this operation is started.</desc>
2935 </param>
2936 <param name="progress" type="IProgress" dir="return">
2937 <desc>Progress object to track the operation completion.</desc>
2938 </param>
2939 </method>
2940
2941 <method name="discardCurrentState">
2942 <desc>
2943 Gets called by IConsole::discardCurrentState.
2944 <result name="VBOX_E_INVALID_OBJECT_STATE">
2945 Virtual machine does not have any snapshot.
2946 </result>
2947 </desc>
2948 <param name="initiator" type="IConsole" dir="in">
2949 <desc>The console object that initiated this call.</desc>
2950 </param>
2951 <param name="machineState" type="MachineState" dir="out">
2952 <desc>New machine state after this operation is started.</desc>
2953 </param>
2954 <param name="progress" type="IProgress" dir="return">
2955 <desc>Progress object to track the operation completion.</desc>
2956 </param>
2957 </method>
2958
2959 <method name="discardCurrentSnapshotAndState">
2960 <desc>
2961 Gets called by IConsole::discardCurrentSnapshotAndState.
2962 <result name="VBOX_E_INVALID_OBJECT_STATE">
2963 Virtual machine does not have any snapshot.
2964 </result>
2965 </desc>
2966 <param name="initiator" type="IConsole" dir="in">
2967 <desc>The console object that initiated this call.</desc>
2968 </param>
2969 <param name="machineState" type="MachineState" dir="out">
2970 <desc>New machine state after this operation is started.</desc>
2971 </param>
2972 <param name="progress" type="IProgress" dir="return">
2973 <desc>Progress object to track the operation completion.</desc>
2974 </param>
2975 </method>
2976
2977 <method name="pullGuestProperties">
2978 <desc>
2979 Get the list of the guest properties matching a set of patterns along
2980 with their values, time stamps and flags and give responsibility for
2981 managing properties to the console.
2982 </desc>
2983 <param name="name" type="wstring" dir="out" safearray="yes">
2984 <desc>
2985 The names of the properties returned.
2986 </desc>
2987 </param>
2988 <param name="value" type="wstring" dir="out" safearray="yes">
2989 <desc>
2990 The values of the properties returned. The array entries match the
2991 corresponding entries in the @a name array.
2992 </desc>
2993 </param>
2994 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2995 <desc>
2996 The time stamps of the properties returned. The array entries match
2997 the corresponding entries in the @a name array.
2998 </desc>
2999 </param>
3000 <param name="flags" type="wstring" dir="out" safearray="yes">
3001 <desc>
3002 The flags of the properties returned. The array entries match the
3003 corresponding entries in the @a name array.
3004 </desc>
3005 </param>
3006 </method>
3007
3008 <method name="pushGuestProperties">
3009 <desc>
3010 Set the list of the guest properties matching a set of patterns along
3011 with their values, time stamps and flags and return responsibility for
3012 managing properties to IMachine.
3013 </desc>
3014 <param name="name" type="wstring" dir="in" safearray="yes">
3015 <desc>
3016 The names of the properties.
3017 </desc>
3018 </param>
3019 <param name="value" type="wstring" dir="in" safearray="yes">
3020 <desc>
3021 The values of the properties. The array entries match the
3022 corresponding entries in the @a name array.
3023 </desc>
3024 </param>
3025 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3026 <desc>
3027 The time stamps of the properties. The array entries match
3028 the corresponding entries in the @a name array.
3029 </desc>
3030 </param>
3031 <param name="flags" type="wstring" dir="in" safearray="yes">
3032 <desc>
3033 The flags of the properties. The array entries match the
3034 corresponding entries in the @a name array.
3035 </desc>
3036 </param>
3037 </method>
3038 <method name="pushGuestProperty">
3039 <desc>
3040 Update a single guest property in IMachine.
3041 </desc>
3042 <param name="name" type="wstring" dir="in">
3043 <desc>
3044 The name of the property to be updated.
3045 </desc>
3046 </param>
3047 <param name="value" type="wstring" dir="in">
3048 <desc>
3049 The value of the property.
3050 </desc>
3051 </param>
3052 <param name="timestamp" type="unsigned long long" dir="in">
3053 <desc>
3054 The timestamp of the property.
3055 </desc>
3056 </param>
3057 <param name="flags" type="wstring" dir="in">
3058 <desc>
3059 The flags of the property.
3060 </desc>
3061 </param>
3062 </method>
3063 </interface>
3064
3065 <interface
3066 name="IBIOSSettings" extends="$unknown"
3067 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3068 wsmap="managed"
3069 >
3070 <desc>
3071 The IBIOSSettings interface represents BIOS settings of the virtual
3072 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3073 </desc>
3074 <attribute name="logoFadeIn" type="boolean">
3075 <desc>Fade in flag for BIOS logo animation.</desc>
3076 </attribute>
3077
3078 <attribute name="logoFadeOut" type="boolean">
3079 <desc>Fade out flag for BIOS logo animation.</desc>
3080 </attribute>
3081
3082 <attribute name="logoDisplayTime" type="unsigned long">
3083 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3084 </attribute>
3085
3086 <attribute name="logoImagePath" type="wstring">
3087 <desc>Local file system path for external BIOS image.</desc>
3088 </attribute>
3089
3090 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3091 <desc>Mode of the BIOS boot device menu.</desc>
3092 </attribute>
3093
3094 <attribute name="ACPIEnabled" type="boolean">
3095 <desc>ACPI support flag.</desc>
3096 </attribute>
3097
3098 <attribute name="IOAPICEnabled" type="boolean">
3099 <desc>
3100 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3101 and support IRQs above 15.
3102 </desc>
3103 </attribute>
3104
3105 <attribute name="timeOffset" type="long long">
3106 <desc>
3107 Offset in milliseconds from the host system time. This allows for
3108 guests running with a different system date/time than the host.
3109 It is equivalent to setting the system date/time in the BIOS except
3110 it is not an absolute value but a relative one. Guest Additions
3111 time synchronization honors this offset.
3112 </desc>
3113 </attribute>
3114
3115 <attribute name="PXEDebugEnabled" type="boolean">
3116 <desc>
3117 PXE debug logging flag. If set, VirtualBox will write extensive
3118 PXE trace information to the release log.
3119 </desc>
3120 </attribute>
3121
3122 <attribute name="IDEControllerType" type="IDEControllerType">
3123 <desc>
3124 Type of the virtual IDE controller. Depending on this value,
3125 VirtualBox will provide different virtual IDE hardware
3126 devices to the guest.
3127 </desc>
3128 </attribute>
3129
3130 </interface>
3131
3132 <interface
3133 name="IMachine" extends="$unknown"
3134 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3135 wsmap="managed"
3136 >
3137 <desc>
3138 The IMachine interface represents a virtual machine, or guest, created
3139 in VirtualBox.
3140
3141 This interface is used in two contexts. First of all, a collection of
3142 objects implementing this interface is stored in the
3143 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3144 machines that are currently registered with this VirtualBox
3145 installation. Also, once a session has been opened for the given virtual
3146 machine (e.g. the virtual machine is running), the machine object
3147 associated with the open session can be queried from the session object;
3148 see <link to="ISession"/> for details.
3149
3150 The main role of this interface is to expose the settings of the virtual
3151 machine and provide methods to change various aspects of the virtual
3152 machine's configuration. For machine objects stored in the
3153 <link to="IVirtualBox::machines2"/> collection, all attributes are
3154 read-only unless explicitly stated otherwise in individual attribute
3155 and method descriptions. In order to change a machine setting, a session
3156 for this machine must be opened using one of
3157 <link to="IVirtualBox::openSession"/>,
3158 <link to="IVirtualBox::openRemoteSession"/> or
3159 <link to="IVirtualBox::openExistingSession"/> methods. After the
3160 session has been successfully opened, a mutable machine object needs to
3161 be queried from the session object and then the desired settings changes
3162 can be applied to the returned object using IMachine attributes and
3163 methods. See the ISession interface description for more information
3164 about sessions.
3165
3166 Note that the IMachine interface does not provide methods to control
3167 virtual machine execution (such as start the machine, or power it
3168 down) -- these methods are grouped in a separate IConsole
3169 interface. Refer to the IConsole interface description to get more
3170 information about this topic.
3171
3172 <see>ISession, IConsole</see>
3173 </desc>
3174
3175 <attribute name="parent" type="IVirtualBox" readonly="yes">
3176 <desc>Associated parent object.</desc>
3177 </attribute>
3178
3179 <attribute name="accessible" type="boolean" readonly="yes">
3180 <desc>
3181 Whether this virtual machine is currently accessible or not.
3182
3183 The machine is considered to be inaccessible when:
3184 <ul>
3185 <li>It is a registered virtual machine, and
3186 </li>
3187 <li>Its settings file is inaccessible (for example, it is
3188 located on a network share that is not accessible during
3189 VirtualBox startup, or becomes inaccessible later, or if
3190 the settings file can be read but is invalid).
3191 </li>
3192 </ul>
3193
3194 Otherwise, the value of this property is always <tt>true</tt>.
3195
3196 Every time this property is read, the accessibility state of
3197 this machine is re-evaluated. If the returned value is |false|,
3198 the <link to="#accessError"/> property may be used to get the
3199 detailed error information describing the reason of
3200 inaccessibility.
3201
3202 When the machine is inaccessible, only the following properties
3203 can be used on it:
3204 <ul>
3205 <li><link to="#parent"/></li>
3206 <li><link to="#id"/></li>
3207 <li><link to="#settingsFilePath"/></li>
3208 <li><link to="#accessible"/></li>
3209 <li><link to="#accessError"/></li>
3210 </ul>
3211
3212 An attempt to access any other property or method will return
3213 an error.
3214
3215 The only possible action you can perform on an inaccessible
3216 machine is to unregister it using the
3217 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3218 for the accessibility state once more by querying this
3219 property).
3220
3221 <note>
3222 In the current implementation, once this property returns
3223 <tt>true</tt>, the machine will never become inaccessible
3224 later, even if its settings file cannot be successfully
3225 read/written any more (at least, until the VirtualBox
3226 server is restarted). This limitation may be removed in
3227 future releases.
3228 </note>
3229 </desc>
3230 </attribute>
3231
3232 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3233 <desc>
3234 Error information describing the reason of machine
3235 inaccessibility.
3236
3237 Reading this property is only valid after the last call to
3238 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3239 machine is currently unaccessible). Otherwise, a null
3240 IVirtualBoxErrorInfo object will be returned.
3241 </desc>
3242 </attribute>
3243
3244 <attribute name="name" type="wstring">
3245 <desc>
3246 Name of the virtual machine.
3247
3248 Besides being used for human-readable identification purposes
3249 everywhere in VirtualBox, the virtual machine name is also used
3250 as a name of the machine's settings file and as a name of the
3251 subdirectory this settings file resides in. Thus, every time you
3252 change the value of this property, the settings file will be
3253 renamed once you call <link to="#saveSettings()"/> to confirm the
3254 change. The containing subdirectory will be also renamed, but
3255 only if it has exactly the same name as the settings file
3256 itself prior to changing this property (for backward compatibility
3257 with previous API releases). The above implies the following
3258 limitations:
3259 <ul>
3260 <li>The machine name cannot be empty.</li>
3261 <li>The machine name can contain only characters that are valid
3262 file name characters according to the rules of the file
3263 system used to store VirtualBox configuration.</li>
3264 <li>You cannot have two or more machines with the same name
3265 if they use the same subdirectory for storing the machine
3266 settings files.</li>
3267 <li>You cannot change the name of the machine if it is running,
3268 or if any file in the directory containing the settings file
3269 is being used by another running machine or by any other
3270 process in the host operating system at a time when
3271 <link to="#saveSettings()"/> is called.
3272 </li>
3273 </ul>
3274 If any of the above limitations are hit, <link to="#saveSettings()"/>
3275 will return an appropriate error message explaining the exact
3276 reason and the changes you made to this machine will not be
3277 saved.
3278 <note>
3279 For "legacy" machines created using the
3280 <link to="IVirtualBox::createLegacyMachine()"/> call,
3281 the above naming limitations do not apply because the
3282 machine name does not affect the settings file name.
3283 The settings file name remains the same as it was specified
3284 during machine creation and never changes.
3285 </note>
3286 </desc>
3287 </attribute>
3288
3289 <attribute name="description" type="wstring">
3290 <desc>
3291 Description of the virtual machine.
3292
3293 The description attribute can contain any text and is
3294 typically used to describe the hardware and software
3295 configuration of the virtual machine in detail (i.e. network
3296 settings, versions of the installed software and so on).
3297 </desc>
3298 </attribute>
3299
3300 <attribute name="id" type="uuid" readonly="yes">
3301 <desc>UUID of the virtual machine.</desc>
3302 </attribute>
3303
3304 <attribute name="OSTypeId" type="wstring">
3305 <desc>
3306 User-defined identifier of the Guest OS type.
3307 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3308 an IGuestOSType object representing details about the given
3309 Guest OS type.
3310 <note>
3311 This value may differ from the value returned by
3312 <link to="IGuest::OSTypeId"/> if Guest Additions are
3313 installed to the guest OS.
3314 </note>
3315 </desc>
3316 </attribute>
3317
3318 <attribute name="HardwareVersion" type="wstring">
3319 <desc>Hardware version identifier. Internal use only for now.</desc>
3320 </attribute>
3321
3322 <attribute name="CPUCount" type="unsigned long">
3323 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3324 </attribute>
3325
3326 <attribute name="memorySize" type="unsigned long">
3327 <desc>System memory size in megabytes.</desc>
3328 </attribute>
3329
3330 <attribute name="memoryBalloonSize" type="unsigned long">
3331 <desc>Initial memory balloon size in megabytes.</desc>
3332 </attribute>
3333
3334 <attribute name="statisticsUpdateInterval" type="unsigned long">
3335 <desc>Initial interval to update guest statistics in seconds.</desc>
3336 </attribute>
3337
3338 <attribute name="VRAMSize" type="unsigned long">
3339 <desc>Video memory size in megabytes.</desc>
3340 </attribute>
3341
3342 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3343 <desc>
3344 This setting determines whether VirtualBox allows guests to make use
3345 of the 3D graphics support available on the host. Currently limited
3346 to OpenGL only. </desc>
3347 </attribute>
3348
3349 <attribute name="monitorCount" type="unsigned long">
3350 <desc>
3351 Number of virtual monitors.
3352 <note>
3353 Only effective on Windows XP and later guests with
3354 Guest Additions installed.
3355 </note>
3356 </desc>
3357 </attribute>
3358
3359 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3360 <desc>Object containing all BIOS settings.</desc>
3361 </attribute>
3362
3363 <attribute name="HWVirtExEnabled" type="TSBool">
3364 <desc>
3365 This setting determines whether VirtualBox will try to make use of
3366 the host CPU's hardware virtualization extensions such as Intel VT-x
3367 and AMD-V. Note that in case such extensions are not available,
3368 they will not be used.
3369 </desc>
3370 </attribute>
3371
3372 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3373 <desc>
3374 This setting determines whether VirtualBox will try to make use of
3375 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3376 such extensions are not available, they will not be used.
3377 </desc>
3378 </attribute>
3379
3380 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3381 <desc>
3382 This setting determines whether VirtualBox will try to make use of
3383 the VPID extension of Intel VT-x. Note that in case such extensions are
3384 not available, they will not be used.
3385 </desc>
3386 </attribute>
3387
3388 <attribute name="PAEEnabled" type="boolean" default="false">
3389 <desc>
3390 This setting determines whether VirtualBox will expose the Physical Address
3391 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3392 is not available, it will not be reported.
3393 </desc>
3394 </attribute>
3395
3396 <attribute name="snapshotFolder" type="wstring">
3397 <desc>
3398 Full path to the directory used to store snapshot data
3399 (differencing hard disks and saved state files) of this machine.
3400
3401 The initial value of this property is
3402 <tt>&lt;</tt><link to="#settingsFilePath">
3403 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3404 <link to="#id">machine_uuid</link>
3405 <tt>&gt;</tt>.
3406
3407 Currently, it is an error to try to change this property on
3408 a machine that has snapshots (because this would require to
3409 move possibly large files to a different location).
3410 A separate method will be available for this purpose later.
3411
3412 <note>
3413 Setting this property to <tt>null</tt> will restore the
3414 initial value.
3415 </note>
3416 <note>
3417 When setting this property, the specified path can be
3418 absolute (full path) or relative to the directory where the
3419 <link to="#settingsFilePath">machine settings file</link>
3420 is located. When reading this property, a full path is
3421 always returned.
3422 </note>
3423 <note>
3424 The specified path may not exist, it will be created
3425 when necessary.
3426 </note>
3427 </desc>
3428 </attribute>
3429
3430 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3431 <desc>VRDP server object.</desc>
3432 </attribute>
3433
3434 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3435 <desc>Array of hard disks attached to this machine.</desc>
3436 </attribute>
3437
3438 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3439 <desc>Associated DVD drive object.</desc>
3440 </attribute>
3441
3442 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3443 <desc>Associated floppy drive object.</desc>
3444 </attribute>
3445
3446 <attribute name="USBController" type="IUSBController" readonly="yes">
3447 <desc>
3448 Associated USB controller object.
3449
3450 <note>
3451 This method may set a @ref com_warnings "warning result code".
3452 </note>
3453 <note>
3454 If USB functionality is not available in the given edition of
3455 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3456 </note>
3457 </desc>
3458 </attribute>
3459
3460 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3461 <desc>Associated audio adapter, always present.</desc>
3462 </attribute>
3463
3464 <attribute name="SATAController" type="ISATAController" readonly="yes">
3465 <desc>
3466 Associated SATA controller object.
3467 </desc>
3468 </attribute>
3469
3470 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3471 <desc>
3472 Full name of the file containing machine settings data.
3473 </desc>
3474 </attribute>
3475
3476 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3477 <desc>
3478 Current version of the format of the settings file of this machine
3479 (<link to="#settingsFilePath"/>).
3480
3481 The version string has the following format:
3482 <pre>
3483 x.y-platform
3484 </pre>
3485 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3486 versions, and <tt>platform</tt> is the platform identifier.
3487
3488 The current version usually matches the value of the
3489 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3490 settings file was created by an older version of VirtualBox and there
3491 was a change of the settings file format since then.
3492
3493 Note that VirtualBox automatically converts settings files from older
3494 versions to the most recent version when reading them (usually at
3495 VirtualBox startup) but it doesn't save the changes back until
3496 you call a method that implicitly saves settings (such as
3497 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3498 explicitly. Therefore, if the value of this attribute differs from the
3499 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3500 means that the settings file was converted but the result of the
3501 conversion is not yet saved to disk.
3502
3503 The above feature may be used by interactive front-ends to inform users
3504 about the settings file format change and offer them to explicitly save
3505 all converted settings files (the global and VM-specific ones),
3506 optionally create backup copies of the old settings files before saving,
3507 etc.
3508
3509 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3510 </desc>
3511 </attribute>
3512
3513 <attribute name="settingsModified" type="boolean" readonly="yes">
3514 <desc>
3515 Whether the settings of this machine have been modified
3516 (but neither yet saved nor discarded).
3517 <note>
3518 Reading this property is only valid on instances returned
3519 by <link to="ISession::machine"/> and on new machines
3520 created by <link to="IVirtualBox::createMachine"/> or opened
3521 by <link to="IVirtualBox::openMachine"/> but not
3522 yet registered, or on unregistered machines after calling
3523 <link to="IVirtualBox::unregisterMachine"/>. For all other
3524 cases, the settings can never be modified.
3525 </note>
3526 <note>
3527 For newly created unregistered machines, the value of this
3528 property is always TRUE until <link to="#saveSettings()"/>
3529 is called (no matter if any machine settings have been
3530 changed after the creation or not). For opened machines
3531 the value is set to FALSE (and then follows to normal rules).
3532 </note>
3533 </desc>
3534 </attribute>
3535
3536 <attribute name="sessionState" type="SessionState" readonly="yes">
3537 <desc>Current session state for this machine.</desc>
3538 </attribute>
3539
3540 <attribute name="sessionType" type="wstring" readonly="yes">
3541 <desc>
3542 Type of the session. If <link to="#sessionState"/> is
3543 SessionSpawning or SessionOpen, this attribute contains the
3544 same value as passed to the
3545 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3546 type parameter. If the session was opened directly using
3547 <link to="IVirtualBox::openSession()"/>, or if
3548 <link to="#sessionState"/> is SessionClosed, the value of this
3549 attribute is @c null.
3550 </desc>
3551 </attribute>
3552
3553 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3554 <desc>
3555 Identifier of the session process. This attribute contains the
3556 platform-dependent identifier of the process that has opened a
3557 direct session for this machine using the
3558 <link to="IVirtualBox::openSession()"/> call. The returned value
3559 is only valid if <link to="#sessionState"/> is SessionOpen or
3560 SessionClosing (i.e. a session is currently open or being
3561 closed) by the time this property is read.
3562 </desc>
3563 </attribute>
3564
3565 <attribute name="state" type="MachineState" readonly="yes">
3566 <desc>Current execution state of this machine.</desc>
3567 </attribute>
3568
3569 <attribute name="lastStateChange" type="long long" readonly="yes">
3570 <desc>
3571 Time stamp of the last execution state change,
3572 in milliseconds since 1970-01-01 UTC.
3573 </desc>
3574 </attribute>
3575
3576 <attribute name="stateFilePath" type="wstring" readonly="yes">
3577 <desc>
3578 Full path to the file that stores the execution state of
3579 the machine when it is in the <link to="MachineState_Saved"/> state.
3580 <note>
3581 When the machine is not in the Saved state, this attribute
3582 <tt>null</tt>.
3583 </note>
3584 </desc>
3585 </attribute>
3586
3587 <attribute name="logFolder" type="wstring" readonly="yes">
3588 <desc>
3589 Full path to the folder that stores a set of rotated log files
3590 recorded during machine execution. The most recent log file is
3591 named <tt>VBox.log</tt>, the previous log file is
3592 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3593 in the current version).
3594 </desc>
3595 </attribute>
3596
3597 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3598 <desc>
3599 Current snapshot of this machine.
3600 <note>
3601 A <tt>null</tt> object is returned if the machine doesn't
3602 have snapshots.
3603 </note>
3604 <see><link to="ISnapshot"/></see>
3605 </desc>
3606 </attribute>
3607
3608 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3609 <desc>
3610 Number of snapshots taken on this machine. Zero means the
3611 machine doesn't have any snapshots.
3612 </desc>
3613 </attribute>
3614
3615 <attribute name="currentStateModified" type="boolean" readonly="yes">
3616 <desc>
3617 Returns <tt>true</tt> if the current state of the machine is not
3618 identical to the state stored in the current snapshot.
3619
3620 The current state is identical to the current snapshot right
3621 after one of the following calls are made:
3622 <ul>
3623 <li><link to="IConsole::discardCurrentState"/> or
3624 <link to="IConsole::discardCurrentSnapshotAndState"/>
3625 </li>
3626 <li><link to="IConsole::takeSnapshot"/> (issued on a
3627 powered off or saved machine, for which
3628 <link to="#settingsModified"/> returns <tt>false</tt>)
3629 </li>
3630 <li><link to="IMachine::setCurrentSnapshot"/>
3631 </li>
3632 </ul>
3633
3634 The current state remains identical until one of the following
3635 happens:
3636 <ul>
3637 <li>settings of the machine are changed</li>
3638 <li>the saved state is discarded</li>
3639 <li>the current snapshot is discarded</li>
3640 <li>an attempt to execute the machine is made</li>
3641 </ul>
3642
3643 <note>
3644 For machines that don't have snapshots, this property is
3645 always <tt>false</tt>.
3646 </note>
3647 </desc>
3648 </attribute>
3649
3650 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3651 <desc>
3652 Collection of shared folders for this machine (permanent shared
3653 folders). These folders are shared automatically at machine startup
3654 and available only to the guest OS installed within this machine.
3655
3656 New shared folders are added to the collection using
3657 <link to="#createSharedFolder"/>. Existing shared folders can be
3658 removed using <link to="#removeSharedFolder"/>.
3659 </desc>
3660 </attribute>
3661
3662 <attribute name="clipboardMode" type="ClipboardMode">
3663 <desc>
3664 Synchronization mode between the host OS clipboard
3665 and the guest OS clipboard.
3666 </desc>
3667 </attribute>
3668
3669 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3670 <desc>
3671 A comma-separated list of simple glob patterns. Changes to guest
3672 properties whose name matches one of the patterns will generate an
3673 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3674 </desc>
3675 </attribute>
3676
3677 <method name="setBootOrder">
3678 <desc>
3679 Puts the given device to the specified position in
3680 the boot order.
3681
3682 To indicate that no device is associated with the given position,
3683 <link to="DeviceType_Null"/> should be used.
3684
3685 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3686
3687 <result name="E_INVALIDARG">
3688 Boot @a position out of range.
3689 </result>
3690 <result name="E_NOTIMPL">
3691 Booting from USB @a device currently not supported.
3692 </result>
3693
3694 </desc>
3695 <param name="position" type="unsigned long" dir="in">
3696 <desc>
3697 Position in the boot order (<tt>1</tt> to the total number of
3698 devices the machine can boot from, as returned by
3699 <link to="ISystemProperties::maxBootPosition"/>).
3700 </desc>
3701 </param>
3702 <param name="device" type="DeviceType" dir="in">
3703 <desc>
3704 The type of the device used to boot at the given position.
3705 </desc>
3706 </param>
3707 </method>
3708
3709 <method name="getBootOrder" const="yes">
3710 <desc>
3711 Returns the device type that occupies the specified
3712 position in the boot order.
3713
3714 @todo [remove?]
3715 If the machine can have more than one device of the returned type
3716 (such as hard disks), then a separate method should be used to
3717 retrieve the individual device that occupies the given position.
3718
3719 If here are no devices at the given position, then
3720 <link to="DeviceType_Null"/> is returned.
3721
3722 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3723
3724 <result name="E_INVALIDARG">
3725 Boot @a position out of range.
3726 </result>
3727
3728 </desc>
3729 <param name="position" type="unsigned long" dir="in">
3730 <desc>
3731 Position in the boot order (<tt>1</tt> to the total number of
3732 devices the machine can boot from, as returned by
3733 <link to="ISystemProperties::maxBootPosition"/>).
3734 </desc>
3735 </param>
3736 <param name="device" type="DeviceType" dir="return">
3737 <desc>
3738 Device at the given position.
3739 </desc>
3740 </param>
3741 </method>
3742
3743 <method name="attachHardDisk2">
3744 <desc>
3745 Attaches a virtual hard disk identified by the given UUID @a id
3746 to a device slot of the specified bus.
3747
3748 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3749 specify the primary or secondary IDE controller, respectively. The
3750 SATA bus supports 30 channels, so this parameter can be a number
3751 ranging from @c 0 to @c 29.
3752
3753 For the primary controller of the IDE bus, the @a device number can be
3754 either @c 0 or @c 1, to specify the master or the slave device,
3755 respectively. For the secondary IDE controller, the device number is
3756 always @c 1 because the master device is reserved for the CD-ROM drive.
3757
3758 For the SATA bus, the @a device parameter is currently unused and
3759 must be @c 0.
3760
3761 The specified device slot must not have another disk attached to it, or
3762 this method will fail.
3763
3764 See <link to="IHardDisk2"/> for more detailed information about
3765 attaching hard disks.
3766
3767 <note>
3768 You cannot attach a hard disk to a running machine. Also, you cannot
3769 attach a hard disk to a newly created machine until this machine's
3770 settings are saved to disk using <link to="#saveSettings()"/>.
3771 </note>
3772 <note>
3773 If the hard disk is being attached indirectly, a new differencing hard
3774 disk will implicitly be created for it and attached instead. If the
3775 changes made to the machine settings (including this indirect
3776 attachment) are later cancelled using <link to="#discardSettings()"/>,
3777 this implicitly created differencing hard disk will implicitly
3778 be deleted.
3779 </note>
3780
3781 <result name="E_INVALIDARG">
3782 SATA device, SATA channel, IDE channel or IDE slot out of range.
3783 </result>
3784 <result name="VBOX_E_INVALID_OBJECT_STATE">
3785 Attempt to attach hard disk to an unregistered virtual machine.
3786 </result>
3787 <result name="VBOX_E_INVALID_VM_STATE">
3788 Invalid machine state.
3789 </result>
3790 <result name="VBOX_E_OBJECT_IN_USE">
3791 Hard disk already attached to this or another virtual machine.
3792 </result>
3793
3794 </desc>
3795 <param name="id" type="uuid" dir="in">
3796 <desc>UUID of the hard disk to attach.</desc>
3797 </param>
3798 <param name="bus" type="StorageBus" dir="in">
3799 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3800 </param>
3801 <param name="channel" type="long" dir="in">
3802 <desc>Channel to attach the hard disk to.</desc>
3803 </param>
3804 <param name="device" type="long" dir="in">
3805 <desc>
3806 Device slot in the given channel to attach the hard disk to.
3807 </desc>
3808 </param>
3809 </method>
3810
3811 <method name="getHardDisk2" const="yes">
3812 <desc>
3813 Returns the virtual hard disk attached to a device slot of the specified
3814 bus.
3815
3816 Note that if the hard disk was indirectly attached by
3817 <link to="#attachHardDisk2()"/> to the given device slot then this
3818 method will return not the same object as passed to the
3819 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3820 more detailed information about attaching hard disks.
3821
3822 <result name="VBOX_E_OBJECT_NOT_FOUND">
3823 No hard disk attached to given slot/bus.
3824 </result>
3825
3826 </desc>
3827 <param name="bus" type="StorageBus" dir="in">
3828 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3829 </param>
3830 <param name="channel" type="long" dir="in">
3831 <desc>Channel to query.</desc>
3832 </param>
3833 <param name="device" type="long" dir="in">
3834 <desc>Device slot in the given channel to query.</desc>
3835 </param>
3836 <param name="hardDisk" type="IHardDisk2" dir="return">
3837 <desc>Attached hard disk object.</desc>
3838 </param>
3839 </method>
3840
3841 <method name="detachHardDisk2">
3842 <desc>
3843 Detaches the virtual hard disk attached to a device slot of the
3844 specified bus.
3845
3846 Detaching the hard disk from the virtual machine is deferred. This means
3847 that the hard disk remains associated with the machine when this method
3848 returns and gets actually de-associated only after a successful
3849 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3850 for more detailed information about attaching hard disks.
3851
3852 <note>
3853 You cannot detach the hard disk from a running machine.
3854 </note>
3855 <note>
3856 Detaching differencing hard disks implicitly created by <link
3857 to="#attachHardDisk2()"/> for the indirect attachment using this
3858 method will <b>not</b> implicitly delete them. The
3859 <link to="IHardDisk2::deleteStorage()"/> operation should be
3860 explicitly performed by the caller after the hard disk is successfully
3861 detached and the settings are saved with
3862 <link to="#saveSettings()"/>, if it is the desired action.
3863 </note>
3864
3865 <result name="VBOX_E_INVALID_VM_STATE">
3866 Attempt to detach hard disk from a running virtual machine.
3867 </result>
3868 <result name="VBOX_E_OBJECT_NOT_FOUND">
3869 No hard disk attached to given slot/bus.
3870 </result>
3871 <result name="VBOX_E_NOT_SUPPORTED">
3872 Hard disk format does not support storage deletion.
3873 </result>
3874
3875 </desc>
3876 <param name="bus" type="StorageBus" dir="in">
3877 <desc>Bus to detach the hard disk from.</desc>
3878 </param>
3879 <param name="channel" type="long" dir="in">
3880 <desc>Channel number to detach the hard disk from.</desc>
3881 </param>
3882 <param name="device" type="long" dir="in">
3883 <desc>Device slot number to detach the hard disk from.</desc>
3884 </param>
3885 </method>
3886
3887 <method name="getNetworkAdapter" const="yes">
3888 <desc>
3889 Returns the network adapter associated with the given slot.
3890 Slots are numbered sequentially, starting with zero. The total
3891 number of adapters per machine is defined by the
3892 <link to="ISystemProperties::networkAdapterCount"/> property,
3893 so the maximum slot number is one less than that property's value.
3894
3895 <result name="E_INVALIDARG">
3896 Invalid @a slot number.
3897 </result>
3898
3899 </desc>
3900 <param name="slot" type="unsigned long" dir="in"/>
3901 <param name="adapter" type="INetworkAdapter" dir="return"/>
3902 </method>
3903
3904 <method name="getSerialPort" const="yes">
3905 <desc>
3906 Returns the serial port associated with the given slot.
3907 Slots are numbered sequentially, starting with zero. The total
3908 number of serial ports per machine is defined by the
3909 <link to="ISystemProperties::serialPortCount"/> property,
3910 so the maximum slot number is one less than that property's value.
3911
3912 <result name="E_INVALIDARG">
3913 Invalid @a slot number.
3914 </result>
3915
3916 </desc>
3917 <param name="slot" type="unsigned long" dir="in"/>
3918 <param name="port" type="ISerialPort" dir="return"/>
3919 </method>
3920
3921 <method name="getParallelPort" const="yes">
3922 <desc>
3923 Returns the parallel port associated with the given slot.
3924 Slots are numbered sequentially, starting with zero. The total
3925 number of parallel ports per machine is defined by the
3926 <link to="ISystemProperties::parallelPortCount"/> property,
3927 so the maximum slot number is one less than that property's value.
3928
3929 <result name="E_INVALIDARG">
3930 Invalid @a slot number.
3931 </result>
3932
3933 </desc>
3934 <param name="slot" type="unsigned long" dir="in"/>
3935 <param name="port" type="IParallelPort" dir="return"/>
3936 </method>
3937
3938 <method name="getNextExtraDataKey">
3939 <desc>
3940 Returns the machine-specific extra data key name following the
3941 supplied key.
3942
3943 An error is returned if the supplied @a key does not exist. @c NULL is
3944 returned in @a nextKey if the supplied key is the last key. When
3945 supplying @c NULL for the @a key, the first key item is returned in @a
3946 nextKey (if there is any). @a nextValue is an optional parameter and
3947 if supplied, the next key's value is returned in it.
3948
3949 <result name="VBOX_E_OBJECT_NOT_FOUND">
3950 Extra data @a key not found.
3951 </result>
3952
3953 </desc>
3954 <param name="key" type="wstring" dir="in">
3955 <desc>Name of the data key to follow.</desc>
3956 </param>
3957 <param name="nextKey" type="wstring" dir="out">
3958 <desc>Name of the next data key.</desc>
3959 </param>
3960 <param name="nextValue" type="wstring" dir="out">
3961 <desc>Value of the next data key.</desc>
3962 </param>
3963 </method>
3964
3965 <method name="getExtraData">
3966 <desc>
3967 Returns associated machine-specific extra data.
3968
3969 If the requested data @a key does not exist, this function will
3970 succeed and return @c NULL in the @a value argument.
3971
3972 <result name="VBOX_E_FILE_ERROR">
3973 Settings file not accessible.
3974 </result>
3975 <result name="VBOX_E_XML_ERROR">
3976 Could not parse the settings file.
3977 </result>
3978
3979 </desc>
3980 <param name="key" type="wstring" dir="in">
3981 <desc>Name of the data key to get.</desc>
3982 </param>
3983 <param name="value" type="wstring" dir="return">
3984 <desc>Value of the requested data key.</desc>
3985 </param>
3986 </method>
3987
3988 <method name="setExtraData">
3989 <desc>
3990 Sets associated machine-specific extra data.
3991
3992 If you pass @c NULL as a key @a value, the given @a key will be
3993 deleted.
3994
3995 <note>
3996 Before performing the actual data change, this method will ask all
3997 registered callbacks using the
3998 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3999 notification for a permission. If one of the callbacks refuses the
4000 new value, the change will not be performed.
4001 </note>
4002 <note>
4003 On success, the
4004 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4005 is called to inform all registered callbacks about a successful data
4006 change.
4007 </note>
4008 <note>
4009 This method can be called outside the machine session and therefore
4010 it's a caller's responsibility to handle possible race conditions
4011 when several clients change the same key at the same time.
4012 </note>
4013
4014 <result name="VBOX_E_FILE_ERROR">
4015 Settings file not accessible.
4016 </result>
4017 <result name="VBOX_E_XML_ERROR">
4018 Could not parse the settings file.
4019 </result>
4020
4021 </desc>
4022 <param name="key" type="wstring" dir="in">
4023 <desc>Name of the data key to set.</desc>
4024 </param>
4025 <param name="value" type="wstring" dir="in">
4026 <desc>Value to assign to the key.</desc>
4027 </param>
4028 </method>
4029
4030 <method name="saveSettings">
4031 <desc>
4032 Saves any changes to machine settings made since the session
4033 has been opened or a new machine has been created, or since the
4034 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4035 For registered machines, new settings become visible to all
4036 other VirtualBox clients after successful invocation of this
4037 method.
4038 <note>
4039 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4040 notification event after the configuration has been successfully
4041 saved (only for registered machines).
4042 </note>
4043 <note>
4044 Calling this method is only valid on instances returned
4045 by <link to="ISession::machine"/> and on new machines
4046 created by <link to="IVirtualBox::createMachine"/> but not
4047 yet registered, or on unregistered machines after calling
4048 <link to="IVirtualBox::unregisterMachine"/>.
4049 </note>
4050
4051 <result name="VBOX_E_FILE_ERROR">
4052 Settings file not accessible.
4053 </result>
4054 <result name="VBOX_E_XML_ERROR">
4055 Could not parse the settings file.
4056 </result>
4057 <result name="E_ACCESSDENIED">
4058 Modification request refused.
4059 </result>
4060
4061 </desc>
4062 </method>
4063
4064 <method name="saveSettingsWithBackup">
4065 <desc>
4066 Creates a backup copy of the machine settings file (<link
4067 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4068 <link to="#saveSettings()"/>.
4069
4070 Note that the backup copy is created <b>only</b> if the settings file
4071 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4072 details). Otherwise, this call is fully equivalent to
4073 <link to="#saveSettings()"/> and no backup copying is done.
4074
4075 The backup copy is created in the same directory where the original
4076 settings file is located. It is given the following file name:
4077 <pre>
4078 original.xml.x.y-platform.bak
4079 </pre>
4080 where <tt>original.xml</tt> is the original settings file name
4081 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4082 format of the settings file (before auto-conversion).
4083
4084 If the given backup file already exists, this method will try to add the
4085 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4086 0 to 9) and copy it again until it succeeds. If all suffixes are
4087 occupied, or if any other copy error occurs, this method will return a
4088 failure.
4089
4090 If the copy operation succeeds, the @a bakFileName return argument will
4091 receive a full path to the created backup file (for informational
4092 purposes). Note that this will happen even if the subsequent
4093 <link to="#saveSettings()"/> call performed by this method after the
4094 copy operation, fails.
4095
4096 <note>
4097 The VirtualBox API never calls this method. It is intended purely for
4098 the purposes of creating backup copies of the settings files by
4099 front-ends before saving the results of the automatically performed
4100 settings conversion to disk.
4101 </note>
4102
4103 <see>settingsFileVersion</see>
4104
4105 <result name="VBOX_E_FILE_ERROR">
4106 Settings file not accessible.
4107 </result>
4108 <result name="VBOX_E_XML_ERROR">
4109 Could not parse the settings file.
4110 </result>
4111 <result name="VBOX_E_INVALID_VM_STATE">
4112 Virtual machine is not mutable.
4113 </result>
4114 <result name="E_ACCESSDENIED">
4115 Modification request refused.
4116 </result>
4117
4118 </desc>
4119 <param name="bakFileName" type="wstring" dir="return">
4120 <desc>Full path to the created backup copy.</desc>
4121 </param>
4122 </method>
4123
4124 <method name="discardSettings">
4125 <desc>
4126 Discards any changes to the machine settings made since the session
4127 has been opened or since the last call to <link to="#saveSettings()"/>
4128 or <link to="#discardSettings"/>.
4129 <note>
4130 Calling this method is only valid on instances returned
4131 by <link to="ISession::machine"/> and on new machines
4132 created by <link to="IVirtualBox::createMachine"/> or
4133 opened by <link to="IVirtualBox::openMachine"/> but not
4134 yet registered, or on unregistered machines after calling
4135 <link to="IVirtualBox::unregisterMachine"/>.
4136 </note>
4137
4138 <result name="VBOX_E_INVALID_VM_STATE">
4139 Virtual machine is not mutable.
4140 </result>
4141
4142 </desc>
4143 </method>
4144
4145 <method name="deleteSettings">
4146 <desc>
4147 Deletes the settings file of this machine from disk.
4148 The machine must not be registered in order for this operation
4149 to succeed.
4150 <note>
4151 <link to="#settingsModified"/> will return TRUE after this
4152 method successfully returns.
4153 </note>
4154 <note>
4155 Calling this method is only valid on instances returned
4156 by <link to="ISession::machine"/> and on new machines
4157 created by <link to="IVirtualBox::createMachine"/> or
4158 opened by <link to="IVirtualBox::openMachine"/> but not
4159 yet registered, or on unregistered machines after calling
4160 <link to="IVirtualBox::unregisterMachine"/>.
4161 </note>
4162 <note>
4163 The deleted machine settings file can be restored (saved again)
4164 by calling <link to="#saveSettings()"/>.
4165 </note>
4166
4167 <result name="VBOX_E_INVALID_VM_STATE">
4168 Cannot delete settings of a registered machine or
4169 machine not mutable.
4170 </result>
4171 <result name="VBOX_E_IPRT_ERROR">
4172 Could not delete the settings file.
4173 </result>
4174
4175 </desc>
4176 </method>
4177
4178 <method name="getSnapshot">
4179 <desc>
4180 Returns a snapshot of this machine with the given UUID.
4181 A <tt>null</tt> UUID can be used to obtain the first snapshot
4182 taken on this machine. This is useful if you want to traverse
4183 the whole tree of snapshots starting from the root.
4184
4185 <result name="VBOX_E_OBJECT_NOT_FOUND">
4186 Virtual machine has no snapshots or snapshot not found.
4187 </result>
4188
4189 </desc>
4190 <param name="id" type="uuid" dir="in">
4191 <desc>UUID of the snapshot to get</desc>
4192 </param>
4193 <param name="snapshot" type="ISnapshot" dir="return">
4194 <desc>Snapshot object with the given UUID.</desc>
4195 </param>
4196 </method>
4197
4198 <method name="findSnapshot">
4199 <desc>
4200 Returns a snapshot of this machine with the given name.
4201
4202 <result name="VBOX_E_OBJECT_NOT_FOUND">
4203 Virtual machine has no snapshots or snapshot not found.
4204 </result>
4205
4206 </desc>
4207 <param name="name" type="wstring" dir="in">
4208 <desc>Name of the snapshot to find</desc>
4209 </param>
4210 <param name="snapshot" type="ISnapshot" dir="return">
4211 <desc>Snapshot object with the given name.</desc>
4212 </param>
4213 </method>
4214
4215 <method name="setCurrentSnapshot">
4216 <desc>
4217 Sets the current snapshot of this machine.
4218 <note>
4219 In the current implementation, this operation is not
4220 implemented.
4221 </note>
4222 </desc>
4223 <param name="id" type="uuid" dir="in">
4224 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4225 </param>
4226 </method>
4227
4228 <method name="createSharedFolder">
4229 <desc>
4230 Creates a new permanent shared folder by associating the given logical
4231 name with the given host path, adds it to the collection of shared
4232 folders and starts sharing it. Refer to the description of
4233 <link to="ISharedFolder"/> to read more about logical names.
4234
4235 <result name="VBOX_E_OBJECT_IN_USE">
4236 Shared folder already exists.
4237 </result>
4238 <result name="VBOX_E_FILE_ERROR">
4239 Shared folder @a hostPath not accessible.
4240 </result>
4241
4242 </desc>
4243 <param name="name" type="wstring" dir="in">
4244 <desc>Unique logical name of the shared folder.</desc>
4245 </param>
4246 <param name="hostPath" type="wstring" dir="in">
4247 <desc>Full path to the shared folder in the host file system.</desc>
4248 </param>
4249 <param name="writable" type="boolean" dir="in">
4250 <desc>Whether the share is writable or readonly</desc>
4251 </param>
4252 </method>
4253
4254 <method name="removeSharedFolder">
4255 <desc>
4256 Removes the permanent shared folder with the given name previously
4257 created by <link to="#createSharedFolder"/> from the collection of
4258 shared folders and stops sharing it.
4259
4260 <result name="VBOX_E_INVALID_VM_STATE">
4261 Virtual machine is not mutable.
4262 </result>
4263 <result name="VBOX_E_OBJECT_NOT_FOUND">
4264 Shared folder @a name does not exist.
4265 </result>
4266
4267 </desc>
4268 <param name="name" type="wstring" dir="in">
4269 <desc>Logical name of the shared folder to remove.</desc>
4270 </param>
4271 </method>
4272
4273 <method name="canShowConsoleWindow">
4274 <desc>
4275 Returns @c true if the VM console process can activate the
4276 console window and bring it to foreground on the desktop of
4277 the host PC.
4278 <note>
4279 This method will fail if a session for this machine is not
4280 currently open.
4281 </note>
4282
4283 <result name="VBOX_E_INVALID_VM_STATE">
4284 Machine session is not open.
4285 </result>
4286
4287 </desc>
4288 <param name="canShow" type="boolean" dir="return">
4289 <desc>
4290 @c true if the console window can be shown and @c
4291 false otherwise.
4292 </desc>
4293 </param>
4294 </method>
4295
4296 <method name="showConsoleWindow">
4297 <desc>
4298 Activates the console window and brings it to foreground on
4299 the desktop of the host PC. Many modern window managers on
4300 many platforms implement some sort of focus stealing
4301 prevention logic, so that it may be impossible to activate
4302 a window without the help of the currently active
4303 application. In this case, this method will return a non-zero
4304 identifier that represents the top-level window of the VM
4305 console process. The caller, if it represents a currently
4306 active process, is responsible to use this identifier (in a
4307 platform-dependent manner) to perform actual window
4308 activation.
4309 <note>
4310 This method will fail if a session for this machine is not
4311 currently open.
4312 </note>
4313
4314 <result name="VBOX_E_INVALID_VM_STATE">
4315 Machine session is not open.
4316 </result>
4317
4318 </desc>
4319 <param name="winId" type="unsigned long long" dir="return">
4320 <desc>
4321 Platform-dependent identifier of the top-level VM console
4322 window, or zero if this method has performed all actions
4323 necessary to implement the <i>show window</i> semantics for
4324 the given platform and/or VirtualBox front-end.
4325 </desc>
4326 </param>
4327 </method>
4328
4329 <method name="getGuestProperty">
4330 <desc>
4331 Reads an entry from the machine's guest property store.
4332
4333 <result name="VBOX_E_INVALID_VM_STATE">
4334 Machine session is not open.
4335 </result>
4336
4337 </desc>
4338 <param name="name" type="wstring" dir="in">
4339 <desc>
4340 The name of the property to read.
4341 </desc>
4342 </param>
4343 <param name="value" type="wstring" dir="out">
4344 <desc>
4345 The value of the property. If the property does not exist then this
4346 will be empty.
4347 </desc>
4348 </param>
4349 <param name="timestamp" type="unsigned long long" dir="out">
4350 <desc>
4351 The time at which the property was last modified, as seen by the
4352 server process.
4353 </desc>
4354 </param>
4355 <param name="flags" type="wstring" dir="out">
4356 <desc>
4357 Additional property parameters, passed as a comma-separated list of
4358 "name=value" type entries.
4359 </desc>
4360 </param>
4361 </method>
4362
4363 <method name="getGuestPropertyValue">
4364 <desc>
4365 Reads a value from the machine's guest property store.
4366
4367 <result name="VBOX_E_INVALID_VM_STATE">
4368 Machine session is not open.
4369 </result>
4370
4371 </desc>
4372 <param name="property" type="wstring" dir="in">
4373 <desc>
4374 The name of the property to read.
4375 </desc>
4376 </param>
4377 <param name="value" type="wstring" dir="return">
4378 <desc>
4379 The value of the property. If the property does not exist then this
4380 will be empty.
4381 </desc>
4382 </param>
4383 </method>
4384
4385 <method name="getGuestPropertyTimestamp">
4386 <desc>
4387 Reads a property timestamp from the machine's guest property store.
4388
4389 <result name="VBOX_E_INVALID_VM_STATE">
4390 Machine session is not open.
4391 </result>
4392
4393 </desc>
4394 <param name="property" type="wstring" dir="in">
4395 <desc>
4396 The name of the property to read.
4397 </desc>
4398 </param>
4399 <param name="value" type="unsigned long long" dir="return">
4400 <desc>
4401 The timestamp. If the property does not exist then this will be
4402 empty.
4403 </desc>
4404 </param>
4405 </method>
4406
4407 <method name="setGuestProperty">
4408 <desc>
4409 Sets, changes or deletes an entry in the machine's guest property
4410 store.
4411
4412 <result name="E_ACCESSDENIED">
4413 Property cannot be changed.
4414 </result>
4415 <result name="E_INVALIDARG">
4416 Invalid @a flags.
4417 </result>
4418 <result name="VBOX_E_INVALID_VM_STATE">
4419 Virtual machine is not mutable or session not open.
4420 </result>
4421 <result name="VBOX_E_INVALID_OBJECT_STATE">
4422 Cannot set transient property when machine not running.
4423 </result>
4424
4425 </desc>
4426 <param name="property" type="wstring" dir="in">
4427 <desc>
4428 The name of the property to set, change or delete.
4429 </desc>
4430 </param>
4431 <param name="value" type="wstring" dir="in">
4432 <desc>
4433 The new value of the property to set, change or delete. If the
4434 property does not yet exist and value is non-empty, it will be
4435 created. If the value is empty, the key will be deleted if it
4436 exists.
4437 </desc>
4438 </param>
4439 <param name="flags" type="wstring" dir="in">
4440 <desc>
4441 Additional property parameters, passed as a comma-separated list of
4442 "name=value" type entries.
4443 </desc>
4444 </param>
4445 </method>
4446
4447 <method name="setGuestPropertyValue">
4448 <desc>
4449 Sets, changes or deletes a value in the machine's guest property
4450 store. The flags field will be left unchanged or created empty for a
4451 new property.
4452
4453 <result name="E_ACCESSDENIED">
4454 Property cannot be changed.
4455 </result>
4456 <result name="VBOX_E_INVALID_VM_STATE">
4457 Virtual machine is not mutable or session not open.
4458 </result>
4459 <result name="VBOX_E_INVALID_OBJECT_STATE">
4460 Cannot set transient property when machine not running.
4461 </result>
4462 </desc>
4463
4464 <param name="property" type="wstring" dir="in">
4465 <desc>
4466 The name of the property to set, change or delete.
4467 </desc>
4468 </param>
4469 <param name="value" type="wstring" dir="in">
4470 <desc>
4471 The new value of the property to set, change or delete. If the
4472 property does not yet exist and value is non-empty, it will be
4473 created. If value is empty, the property will be deleted if it
4474 exists.
4475 </desc>
4476 </param>
4477 </method>
4478
4479 <method name="enumerateGuestProperties">
4480 <desc>
4481 Return a list of the guest properties matching a set of patterns along
4482 with their values, time stamps and flags.
4483 </desc>
4484 <param name="patterns" type="wstring" dir="in">
4485 <desc>
4486 The patterns to match the properties against, separated by '|'
4487 characters. If this is empty or NULL, all properties will match.
4488 </desc>
4489 </param>
4490 <param name="name" type="wstring" dir="out" safearray="yes">
4491 <desc>
4492 The names of the properties returned.
4493 </desc>
4494 </param>
4495 <param name="value" type="wstring" dir="out" safearray="yes">
4496 <desc>
4497 The values of the properties returned. The array entries match the
4498 corresponding entries in the @a name array.
4499 </desc>
4500 </param>
4501 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4502 <desc>
4503 The time stamps of the properties returned. The array entries match
4504 the corresponding entries in the @a name array.
4505 </desc>
4506 </param>
4507 <param name="flags" type="wstring" dir="out" safearray="yes">
4508 <desc>
4509 The flags of the properties returned. The array entries match the
4510 corresponding entries in the @a name array.
4511 </desc>
4512 </param>
4513 </method>
4514</interface>
4515
4516 <!--
4517 // IConsole
4518 /////////////////////////////////////////////////////////////////////////
4519 -->
4520
4521 <interface
4522 name="IConsoleCallback" extends="$unknown"
4523 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4524 wsmap="suppress"
4525 >
4526
4527 <method name="onMousePointerShapeChange">
4528 <desc>
4529 Notification when the guest mouse pointer shape has
4530 changed. The new shape data is given.
4531 </desc>
4532 <param name="visible" type="boolean" dir="in">
4533 <desc>
4534 Flag whether the pointer is visible.
4535 </desc>
4536 </param>
4537 <param name="alpha" type="boolean" dir="in">
4538 <desc>
4539 Flag whether the pointer has an alpha channel.
4540 </desc>
4541 </param>
4542 <param name="xHot" type="unsigned long" dir="in">
4543 <desc>
4544 The pointer hot spot x coordinate.
4545 </desc>
4546 </param>
4547 <param name="yHot" type="unsigned long" dir="in">
4548 <desc>
4549 The pointer hot spot y coordinate.
4550 </desc>
4551 </param>
4552 <param name="width" type="unsigned long" dir="in">
4553 <desc>
4554 Width of the pointer shape in pixels.
4555 </desc>
4556 </param>
4557 <param name="height" type="unsigned long" dir="in">
4558 <desc>
4559 Height of the pointer shape in pixels.
4560 </desc>
4561 </param>
4562 <param name="shape" type="octet" mod="ptr" dir="in">
4563 <desc>
4564 Address of the shape buffer.
4565
4566 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
4567 followed by a 32-bpp XOR (color) mask.
4568
4569 For pointers without alpha channel the XOR mask pixels are 32
4570 bit values: (lsb)BGR0(msb). For pointers with alpha channel
4571 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
4572
4573 An AND mask is used for pointers with alpha channel, so if the
4574 callback does not support alpha, the pointer could be
4575 displayed as a normal color pointer.
4576
4577 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
4578 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
4579 height</tt>. The padding bits at the end of each scanline are
4580 undefined.
4581
4582 The XOR mask follows the AND mask on the next 4-byte aligned
4583 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
4584 Bytes in the gap between the AND and the XOR mask are undefined.
4585 The XOR mask scanlines have no gap between them and the size of
4586 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
4587
4588 <note>
4589 If @a shape is 0, only the pointer visibility is changed.
4590 </note>
4591 </desc>
4592 </param>
4593 </method>
4594
4595 <method name="onMouseCapabilityChange">
4596 <desc>
4597 Notification when the mouse capabilities reported by the
4598 guest have changed. The new capabilities are passed.
4599 </desc>
4600 <param name="supportsAbsolute" type="boolean" dir="in"/>
4601 <param name="needsHostCursor" type="boolean" dir="in"/>
4602 </method>
4603
4604 <method name="onKeyboardLedsChange">
4605 <desc>
4606 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4607 to alter the state of the keyboard LEDs.
4608 </desc>
4609 <param name="numLock" type="boolean" dir="in"/>
4610 <param name="capsLock" type="boolean" dir="in"/>
4611 <param name="scrollLock" type="boolean" dir="in"/>
4612 </method>
4613
4614 <method name="onStateChange">
4615 <desc>
4616 Notification when the execution state of the machine has changed.
4617 The new state will be given.
4618 </desc>
4619 <param name="state" type="MachineState" dir="in"/>
4620 </method>
4621
4622 <method name="onAdditionsStateChange">
4623 <desc>
4624 Notification when a Guest Additions property changes.
4625 Interested callees should query IGuest attributes to
4626 find out what has changed.
4627 </desc>
4628 </method>
4629
4630 <method name="onDVDDriveChange">
4631 <desc>
4632 Notification when a property of the
4633 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4634 Interested callees should use IDVDDrive methods to find out what has
4635 changed.
4636 </desc>
4637 </method>
4638
4639 <method name="onFloppyDriveChange">
4640 <desc>
4641 Notification when a property of the
4642 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4643 Interested callees should use IFloppyDrive methods to find out what
4644 has changed.
4645 </desc>
4646 </method>
4647
4648 <method name="onNetworkAdapterChange">
4649 <desc>
4650 Notification when a property of one of the
4651 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4652 changes. Interested callees should use INetworkAdapter methods and
4653 attributes to find out what has changed.
4654 </desc>
4655 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4656 <desc>Network adapter that is subject to change.</desc>
4657 </param>
4658 </method>
4659
4660 <method name="onSerialPortChange">
4661 <desc>
4662 Notification when a property of one of the
4663 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4664 Interested callees should use ISerialPort methods and attributes
4665 to find out what has changed.
4666 </desc>
4667 <param name="serialPort" type="ISerialPort" dir="in">
4668 <desc>Serial port that is subject to change.</desc>
4669 </param>
4670 </method>
4671
4672 <method name="onParallelPortChange">
4673 <desc>
4674 Notification when a property of one of the
4675 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4676 changes. Interested callees should use ISerialPort methods and
4677 attributes to find out what has changed.
4678 </desc>
4679 <param name="parallelPort" type="IParallelPort" dir="in">
4680 <desc>Parallel port that is subject to change.</desc>
4681 </param>
4682 </method>
4683
4684 <method name="onVRDPServerChange">
4685 <desc>
4686 Notification when a property of the
4687 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4688 Interested callees should use IVRDPServer methods and attributes to
4689 find out what has changed.
4690 </desc>
4691 </method>
4692
4693 <method name="onUSBControllerChange">
4694 <desc>
4695 Notification when a property of the virtual
4696 <link to="IMachine::USBController">USB controller</link> changes.
4697 Interested callees should use IUSBController methods and attributes to
4698 find out what has changed.
4699 </desc>
4700 </method>
4701
4702 <method name="onUSBDeviceStateChange">
4703 <desc>
4704 Notification when a USB device is attached to or detached from
4705 the virtual USB controller.
4706
4707 This notification is sent as a result of the indirect
4708 request to attach the device because it matches one of the
4709 machine USB filters, or as a result of the direct request
4710 issued by <link to="IConsole::attachUSBDevice"/> or
4711 <link to="IConsole::detachUSBDevice"/>.
4712
4713 This notification is sent in case of both a succeeded and a
4714 failed request completion. When the request succeeds, the @a
4715 error parameter is @c null, and the given device has been
4716 already added to (when @a attached is @c true) or removed from
4717 (when @a attached is @c false) the collection represented by
4718 <link to="IConsole::USBDevices"/>. On failure, the collection
4719 doesn't change and the @a error parameter represents the error
4720 message describing the failure.
4721
4722 </desc>
4723 <param name="device" type="IUSBDevice" dir="in">
4724 <desc>Device that is subject to state change.</desc>
4725 </param>
4726 <param name="attached" type="boolean" dir="in">
4727 <desc>
4728 <tt>true</tt> if the device was attached
4729 and <tt>false</tt> otherwise.
4730 </desc>
4731 </param>
4732 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4733 <desc>
4734 <tt>null</tt> on success or an error message object on
4735 failure.
4736 </desc>
4737 </param>
4738 </method>
4739
4740 <method name="onSharedFolderChange">
4741 <desc>
4742 Notification when a shared folder is added or removed.
4743 The @a scope argument defines one of three scopes:
4744 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4745 (<link to="Scope_Global">Global</link>),
4746 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4747 the machine (<link to="Scope_Machine">Machine</link>) or <link
4748 to="IConsole::sharedFolders">transient shared folders</link> of the
4749 machine (<link to="Scope_Session">Session</link>). Interested callees
4750 should use query the corresponding collections to find out what has
4751 changed.
4752 </desc>
4753 <param name="scope" type="Scope" dir="in">
4754 <desc>Scope of the notification.</desc>
4755 </param>
4756 </method>
4757
4758 <method name="onRuntimeError">
4759 <desc>
4760 Notification when an error happens during the virtual
4761 machine execution.
4762
4763 There are three kinds of runtime errors:
4764 <ul>
4765 <li><i>fatal</i></li>
4766 <li><i>non-fatal with retry</i></li>
4767 <li><i>non-fatal warnings</i></li>
4768 </ul>
4769
4770 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4771 to <tt>true</tt>. In case of fatal errors, the virtual machine
4772 execution is always paused before calling this notification, and
4773 the notification handler is supposed either to immediately save
4774 the virtual machine state using <link to="IConsole::saveState()"/>
4775 or power it off using <link to="IConsole::powerDown()"/>.
4776 Resuming the execution can lead to unpredictable results.
4777
4778 <b>Non-fatal</b> errors and warnings are indicated by the
4779 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4780 is in the Paused state by the time the error notification is
4781 received, it means that the user can <i>try to resume</i> the machine
4782 execution after attempting to solve the problem that caused the
4783 error. In this case, the notification handler is supposed
4784 to show an appropriate message to the user (depending on the
4785 value of the @a id parameter) that offers several actions such
4786 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4787 wants to retry, the notification handler should continue
4788 the machine execution using the <link to="IConsole::resume()"/>
4789 call. If the machine execution is not Paused during this
4790 notification, then it means this notification is a <i>warning</i>
4791 (for example, about a fatal condition that can happen very soon);
4792 no immediate action is required from the user, the machine
4793 continues its normal execution.
4794
4795 Note that in either case the notification handler
4796 <b>must not</b> perform any action directly on a thread
4797 where this notification is called. Everything it is allowed to
4798 do is to post a message to another thread that will then talk
4799 to the user and take the corresponding action.
4800
4801 Currently, the following error identifiers are known:
4802 <ul>
4803 <li><tt>"HostMemoryLow"</tt></li>
4804 <li><tt>"HostAudioNotResponding"</tt></li>
4805 <li><tt>"VDIStorageFull"</tt></li>
4806 </ul>
4807
4808 <note>
4809 This notification is not designed to be implemented by
4810 more than one callback at a time. If you have multiple
4811 IConsoleCallback instances registered on the given
4812 IConsole object, make sure you simply do nothing but
4813 return @c S_OK from all but one of them that does actual
4814 user notification and performs necessary actions.
4815 </note>
4816
4817 </desc>
4818 <param name="fatal" type="boolean" dir="in">
4819 <desc>Whether the error is fatal or not</desc>
4820 </param>
4821 <param name="id" type="wstring" dir="in">
4822 <desc>Error identifier</desc>
4823 </param>
4824 <param name="message" type="wstring" dir="in">
4825 <desc>Optional error message</desc>
4826 </param>
4827 </method>
4828
4829 <method name="onCanShowWindow">
4830 <desc>
4831 Notification when a call to
4832 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4833 front-end to check if a subsequent call to
4834 <link to="IMachine::showConsoleWindow()"/> can succeed.
4835
4836 The callee should give an answer appropriate to the current
4837 machine state in the @a canShow argument. This answer must
4838 remain valid at least until the next
4839 <link to="IConsole::state">machine state</link> change.
4840
4841 <note>
4842 This notification is not designed to be implemented by
4843 more than one callback at a time. If you have multiple
4844 IConsoleCallback instances registered on the given
4845 IConsole object, make sure you simply do nothing but
4846 return @c true and @c S_OK from all but one of them that
4847 actually manages console window activation.
4848 </note>
4849 </desc>
4850 <param name="canShow" type="boolean" dir="return">
4851 <desc>
4852 @c true if the console window can be shown and @c
4853 false otherwise.
4854 </desc>
4855 </param>
4856 </method>
4857
4858 <method name="onShowWindow">
4859 <desc>
4860 Notification when a call to
4861 <link to="IMachine::showConsoleWindow()"/>
4862 requests the console window to be activated and brought to
4863 foreground on the desktop of the host PC.
4864
4865 This notification should cause the VM console process to
4866 perform the requested action as described above. If it is
4867 impossible to do it at a time of this notification, this
4868 method should return a failure.
4869
4870 Note that many modern window managers on many platforms
4871 implement some sort of focus stealing prevention logic, so
4872 that it may be impossible to activate a window without the
4873 help of the currently active application (which is supposedly
4874 an initiator of this notification). In this case, this method
4875 must return a non-zero identifier that represents the
4876 top-level window of the VM console process. The caller, if it
4877 represents a currently active process, is responsible to use
4878 this identifier (in a platform-dependent manner) to perform
4879 actual window activation.
4880
4881 This method must set @a winId to zero if it has performed all
4882 actions necessary to complete the request and the console
4883 window is now active and in foreground, to indicate that no
4884 further action is required on the caller's side.
4885
4886 <note>
4887 This notification is not designed to be implemented by
4888 more than one callback at a time. If you have multiple
4889 IConsoleCallback instances registered on the given
4890 IConsole object, make sure you simply do nothing but
4891 return @c S_OK from all but one of them that actually
4892 manages console window activation.
4893 </note>
4894 </desc>
4895 <param name="winId" type="unsigned long long" dir="return">
4896 <desc>
4897 Platform-dependent identifier of the top-level VM console
4898 window, or zero if this method has performed all actions
4899 necessary to implement the <i>show window</i> semantics for
4900 the given platform and/or this VirtualBox front-end.
4901 </desc>
4902 </param>
4903 </method>
4904
4905 </interface>
4906
4907 <interface
4908 name="IRemoteDisplayInfo" extends="$unknown"
4909 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4910 wsmap="struct"
4911 >
4912 <desc>
4913 Contains information about the remote display (VRDP) capabilities and status.
4914 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4915 </desc>
4916
4917 <attribute name="active" type="boolean" readonly="yes">
4918 <desc>
4919 Whether the remote display connection is active.
4920 </desc>
4921 </attribute>
4922
4923 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4924 <desc>
4925 How many times a client connected.
4926 </desc>
4927 </attribute>
4928
4929 <attribute name="beginTime" type="long long" readonly="yes">
4930 <desc>
4931 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4932 </desc>
4933 </attribute>
4934
4935 <attribute name="endTime" type="long long" readonly="yes">
4936 <desc>
4937 When the last connection was terminated or the current time, if
4938 connection is still active, in milliseconds since 1970-01-01 UTC.
4939 </desc>
4940 </attribute>
4941
4942 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4943 <desc>
4944 How many bytes were sent in last or current, if still active, connection.
4945 </desc>
4946 </attribute>
4947
4948 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4949 <desc>
4950 How many bytes were sent in all connections.
4951 </desc>
4952 </attribute>
4953
4954 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4955 <desc>
4956 How many bytes were received in last or current, if still active, connection.
4957 </desc>
4958 </attribute>
4959
4960 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4961 <desc>
4962 How many bytes were received in all connections.
4963 </desc>
4964 </attribute>
4965
4966 <attribute name="user" type="wstring" readonly="yes">
4967 <desc>
4968 Login user name supplied by the client.
4969 </desc>
4970 </attribute>
4971
4972 <attribute name="domain" type="wstring" readonly="yes">
4973 <desc>
4974 Login domain name supplied by the client.
4975 </desc>
4976 </attribute>
4977
4978 <attribute name="clientName" type="wstring" readonly="yes">
4979 <desc>
4980 The client name supplied by the client.
4981 </desc>
4982 </attribute>
4983
4984 <attribute name="clientIP" type="wstring" readonly="yes">
4985 <desc>
4986 The IP address of the client.
4987 </desc>
4988 </attribute>
4989
4990 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4991 <desc>
4992 The client software version number.
4993 </desc>
4994 </attribute>
4995
4996 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4997 <desc>
4998 Public key exchange method used when connection was established.
4999 Values: 0 - RDP4 public key exchange scheme.
5000 1 - X509 certificates were sent to client.
5001 </desc>
5002 </attribute>
5003
5004 </interface>
5005
5006 <interface
5007 name="IConsole" extends="$unknown"
5008 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5009 wsmap="managed"
5010 >
5011 <desc>
5012 The IConsole interface represents an interface to control virtual
5013 machine execution.
5014
5015 The console object that implements the IConsole interface is obtained
5016 from a session object after the session for the given machine has been
5017 opened using one of <link to="IVirtualBox::openSession"/>,
5018 <link to="IVirtualBox::openRemoteSession"/> or
5019 <link to="IVirtualBox::openExistingSession"/> methods.
5020
5021 Methods of the IConsole interface allow the caller to query the current
5022 virtual machine execution state, pause the machine or power it down, save
5023 the machine state or take a snapshot, attach and detach removable media
5024 and so on.
5025
5026 <see>ISession</see>
5027 </desc>
5028
5029 <attribute name="machine" type="IMachine" readonly="yes">
5030 <desc>
5031 Machine object this console is sessioned with.
5032 <note>
5033 This is a convenience property, it has the same value as
5034 <link to="ISession::machine"/> of the corresponding session
5035 object.
5036 </note>
5037 </desc>
5038 </attribute>
5039
5040 <attribute name="state" type="MachineState" readonly="yes">
5041 <desc>
5042 Current execution state of the machine.
5043 <note>
5044 This property always returns the same value as the corresponding
5045 property of the IMachine object this console is sessioned with.
5046 For the process that owns (executes) the VM, this is the
5047 preferable way of querying the VM state, because no IPC
5048 calls are made.
5049 </note>
5050 </desc>
5051 </attribute>
5052
5053 <attribute name="guest" type="IGuest" readonly="yes">
5054 <desc>Guest object.</desc>
5055 </attribute>
5056
5057 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5058 <desc>
5059 Virtual keyboard object.
5060 <note>
5061 If the machine is not running, any attempt to use
5062 the returned object will result in an error.
5063 </note>
5064 </desc>
5065 </attribute>
5066
5067 <attribute name="mouse" type="IMouse" readonly="yes">
5068 <desc>
5069 Virtual mouse object.
5070 <note>
5071 If the machine is not running, any attempt to use
5072 the returned object will result in an error.
5073 </note>
5074 </desc>
5075 </attribute>
5076
5077 <attribute name="display" type="IDisplay" readonly="yes">
5078 <desc>Virtual display object.
5079 <note>
5080 If the machine is not running, any attempt to use
5081 the returned object will result in an error.
5082 </note>
5083 </desc>
5084 </attribute>
5085
5086 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5087 <desc>Debugging interface.</desc>
5088 </attribute>
5089
5090 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5091 <desc>
5092 Collection of USB devices currently attached to the virtual
5093 USB controller.
5094 <note>
5095 The collection is empty if the machine is not running.
5096 </note>
5097 </desc>
5098 </attribute>
5099
5100 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5101 <desc>
5102 List of USB devices currently attached to the remote VRDP client.
5103 Once a new device is physically attached to the remote host computer,
5104 it appears in this list and remains there until detached.
5105 </desc>
5106 </attribute>
5107
5108 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5109 <desc>
5110 Collection of shared folders for the current session. These folders
5111 are called transient shared folders because they are available to the
5112 guest OS running inside the associated virtual machine only for the
5113 duration of the session (as opposed to
5114 <link to="IMachine::sharedFolders"/> which represent permanent shared
5115 folders). When the session is closed (e.g. the machine is powered down),
5116 these folders are automatically discarded.
5117
5118 New shared folders are added to the collection using
5119 <link to="#createSharedFolder"/>. Existing shared folders can be
5120 removed using <link to="#removeSharedFolder"/>.
5121 </desc>
5122 </attribute>
5123
5124 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5125 <desc>
5126 Interface that provides information on Remote Display (VRDP) connection.
5127 </desc>
5128 </attribute>
5129
5130 <method name="powerUp">
5131 <desc>
5132 Starts the virtual machine execution using the current machine
5133 state (that is, its current execution state, current settings and
5134 current hard disks).
5135
5136 If the machine is powered off or aborted, the execution will
5137 start from the beginning (as if the real hardware were just
5138 powered on).
5139
5140 If the machine is in the <link to="MachineState_Saved"/> state,
5141 it will continue its execution the point where the state has
5142 been saved.
5143
5144 <note>
5145 Unless you are trying to write a new VirtualBox front-end that
5146 performs direct machine execution (like the VirtualBox or VBoxSDL
5147 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5148 session opened by <link to="IVirtualBox::openSession"/> and use this
5149 session only to change virtual machine settings. If you simply want to
5150 start virtual machine execution using one of the existing front-ends
5151 (for example the VirtualBox GUI or headless server), simply use
5152 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5153 power up the machine automatically for you.
5154 </note>
5155
5156 <see>#saveState</see>
5157 <result name="VBOX_E_INVALID_VM_STATE">
5158 Virtual machine already running.
5159 </result>
5160 <result name="VBOX_E_HOST_ERROR">
5161 Host interface does not exist or name not set.
5162 </result>
5163 <result name="VBOX_E_FILE_ERROR">
5164 Invalid saved state file.
5165 </result>
5166 </desc>
5167 <param name="progress" type="IProgress" dir="return">
5168 <desc>Progress object to track the operation completion.</desc>
5169 </param>
5170 </method>
5171
5172 <method name="powerUpPaused">
5173 <desc>
5174 Identical to powerUp except that the VM will enter the
5175 <link to="MachineState_Paused"/> state, instead of
5176 <link to="MachineState_Running"/>.
5177
5178 <see>#powerUp</see>
5179 <result name="VBOX_E_INVALID_VM_STATE">
5180 Virtual machine already running.
5181 </result>
5182 <result name="VBOX_E_HOST_ERROR">
5183 Host interface does not exist or name not set.
5184 </result>
5185 <result name="VBOX_E_FILE_ERROR">
5186 Invalid saved state file.
5187 </result>
5188 </desc>
5189 <param name="progress" type="IProgress" dir="return">
5190 <desc>Progress object to track the operation completion.</desc>
5191 </param>
5192 </method>
5193
5194 <method name="powerDown">
5195 <desc>
5196 Stops the virtual machine execution.
5197 After this operation completes, the machine will go to the
5198 PoweredOff state.
5199
5200 @deprecated This method will be removed in VirtualBox 2.1 where the
5201 powerDownAsync() method will take its name. Do not use this method in
5202 the code.
5203 <result name="VBOX_E_INVALID_VM_STATE">
5204 Virtual machine must be Running, Paused or Stuck to be powered down.
5205 </result>
5206 <result name="VBOX_E_VM_ERROR">
5207 Unable to power off or destroy virtual machine.
5208 </result>
5209 </desc>
5210 </method>
5211
5212 <method name="powerDownAsync">
5213 <desc>
5214 Initiates the power down procedure to stop the virtual machine
5215 execution.
5216
5217 The completion of the power down procedure is tracked using the returned
5218 IProgress object. After the operation is complete, the machine will go
5219 to the PoweredOff state.
5220
5221 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5222 where the original powerDown() method will be removed. You will need to
5223 rename "powerDownAsync" to "powerDown" in your sources to make them
5224 build with version 2.1.
5225 <result name="VBOX_E_INVALID_VM_STATE">
5226 Virtual machine must be Running, Paused or Stuck to be powered down.
5227 </result>
5228 </desc>
5229 <param name="progress" type="IProgress" dir="return">
5230 <desc>Progress object to track the operation completion.</desc>
5231 </param>
5232 </method>
5233
5234 <method name="reset">
5235 <desc>Resets the virtual machine.
5236 <result name="VBOX_E_INVALID_VM_STATE">
5237 Virtual machine not in Running state.
5238 </result>
5239 <result name="VBOX_E_VM_ERROR">
5240 Virtual machine error in reset operation.
5241 </result>
5242 </desc>
5243 </method>
5244
5245 <method name="pause">
5246 <desc>Pauses the virtual machine execution.
5247 <result name="VBOX_E_INVALID_VM_STATE">
5248 Virtual machine not in Running state.
5249 </result>
5250 <result name="VBOX_E_VM_ERROR">
5251 Virtual machine error in suspend operation.
5252 </result>
5253 </desc>
5254 </method>
5255
5256 <method name="resume">
5257 <desc>Resumes the virtual machine execution.
5258 <result name="VBOX_E_INVALID_VM_STATE">
5259 Virtual machine not in Paused state.
5260 </result>
5261 <result name="VBOX_E_VM_ERROR">
5262 Virtual machine error in resume operation.
5263 </result>
5264 </desc>
5265 </method>
5266
5267 <method name="powerButton">
5268 <desc>Sends the ACPI power button event to the guest.
5269 <result name="VBOX_E_INVALID_VM_STATE">
5270 Virtual machine not in Running state.
5271 </result>
5272 <result name="VBOX_E_PDM_ERROR">
5273 Controlled power off failed.
5274 </result>
5275 </desc>
5276 </method>
5277
5278 <method name="sleepButton">
5279 <desc>Sends the ACPI sleep button event to the guest.
5280 <result name="VBOX_E_INVALID_VM_STATE">
5281 Virtual machine not in Running state.
5282 </result>
5283 <result name="VBOX_E_PDM_ERROR">
5284 Sending sleep button event failed.
5285 </result>
5286 </desc>
5287 </method>
5288
5289 <method name="getPowerButtonHandled">
5290 <desc>Checks if the last power button event was handled by guest.
5291 <result name="VBOX_E_PDM_ERROR">
5292 Checking if the event was handled by the guest OS failed.
5293 </result>
5294 </desc>
5295 <param name="handled" type="boolean" dir="return"/>
5296 </method>
5297
5298 <method name="getGuestEnteredACPIMode">
5299 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5300 G1 (sleeping). If this method returns false, the guest will
5301 most likely not respond to external ACPI events.
5302 <result name="VBOX_E_INVALID_VM_STATE">
5303 Virtual machine not in Running state.
5304 </result>
5305 </desc>
5306 <param name="entered" type="boolean" dir="return"/>
5307 </method>
5308
5309 <method name="saveState">
5310 <desc>
5311 Saves the current execution state of a running virtual machine
5312 and stops its execution.
5313
5314 After this operation completes, the machine will go to the
5315 Saved state. Next time it is powered up, this state will
5316 be restored and the machine will continue its execution from
5317 the place where it was saved.
5318
5319 This operation differs from taking a snapshot to the effect
5320 that it doesn't create new differencing hard disks. Also, once
5321 the machine is powered up from the state saved using this method,
5322 the saved state is deleted, so it will be impossible to return
5323 to this state later.
5324
5325 <note>
5326 On success, this method implicitly calls
5327 <link to="IMachine::saveSettings()"/> to save all current machine
5328 settings (including runtime changes to the DVD drive, etc.).
5329 Together with the impossibility to change any VM settings when it is
5330 in the Saved state, this guarantees adequate hardware
5331 configuration of the machine when it is restored from the saved
5332 state file.
5333 </note>
5334
5335 <note>
5336 The machine must be in the Running or Paused state, otherwise
5337 the operation will fail.
5338 </note>
5339 <result name="VBOX_E_INVALID_VM_STATE">
5340 Virtual machine state neither Running nor Paused.
5341 </result>
5342 <result name="VBOX_E_FILE_ERROR">
5343 Failed to create directory for saved state file.
5344 </result>
5345
5346 <see><link to="#takeSnapshot"/></see>
5347 </desc>
5348 <param name="progress" type="IProgress" dir="return">
5349 <desc>Progress object to track the operation completion.</desc>
5350 </param>
5351 </method>
5352
5353 <method name="adoptSavedState">
5354 <desc>
5355 Associates the given saved state file to the virtual machine.
5356
5357 On success, the machine will go to the Saved state. Next time it is
5358 powered up, it will be restored from the adopted saved state and
5359 continue execution from the place where the saved state file was
5360 created.
5361
5362 The specified saved state file path may be absolute or relative to the
5363 folder the VM normally saves the state to (usually,
5364 <link to="IMachine::snapshotFolder"/>).
5365
5366 <note>
5367 It's a caller's responsibility to make sure the given saved state
5368 file is compatible with the settings of this virtual machine that
5369 represent its virtual hardware (memory size, hard disk configuration
5370 etc.). If there is a mismatch, the behavior of the virtual machine
5371 is undefined.
5372 </note>
5373 <result name="VBOX_E_INVALID_VM_STATE">
5374 Virtual machine state neither PoweredOff nor Aborted.
5375 </result>
5376 </desc>
5377 <param name="savedStateFile" type="wstring" dir="in">
5378 <desc>Path to the saved state file to adopt.</desc>
5379 </param>
5380 </method>
5381
5382 <method name="discardSavedState">
5383 <desc>
5384 Discards (deletes) the saved state of the virtual machine
5385 previously created by <link to="#saveState"/>. Next time the
5386 machine is powered up, a clean boot will occur.
5387 <note>
5388 This operation is equivalent to resetting or powering off
5389 the machine without doing a proper shutdown in the guest OS.
5390 </note>
5391 <result name="VBOX_E_INVALID_VM_STATE">
5392 Virtual machine not in state Saved.
5393 </result>
5394 </desc>
5395 </method>
5396
5397 <method name="getDeviceActivity">
5398 <desc>
5399 Gets the current activity type of a given device or device group.
5400 <result name="E_INVALIDARG">
5401 Invalid device type.
5402 </result>
5403 </desc>
5404 <param name="type" type="DeviceType" dir="in"/>
5405 <param name="activity" type="DeviceActivity" dir="return"/>
5406 </method>
5407
5408 <method name="attachUSBDevice">
5409 <desc>
5410 Attaches a host USB device with the given UUID to the
5411 USB controller of the virtual machine.
5412
5413 The device needs to be in one of the following states:
5414 <link to="USBDeviceState_Busy"/>,
5415 <link to="USBDeviceState_Available"/> or
5416 <link to="USBDeviceState_Held"/>,
5417 otherwise an error is immediately returned.
5418
5419 When the device state is
5420 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5421 be returned if the host computer refuses to release it for some reason.
5422
5423 <see>IUSBController::deviceFilters, USBDeviceState</see>
5424 <result name="VBOX_E_INVALID_VM_STATE">
5425 Virtual machine state neither Running nor Paused.
5426 </result>
5427 <result name="VBOX_E_PDM_ERROR">
5428 Virtual machine does not have a USB controller.
5429 </result>
5430 </desc>
5431 <param name="id" type="uuid" dir="in">
5432 <desc>UUID of the host USB device to attach.</desc>
5433 </param>
5434 </method>
5435
5436 <method name="detachUSBDevice">
5437 <desc>
5438 Detaches an USB device with the given UUID from the USB controller
5439 of the virtual machine.
5440
5441 After this method succeeds, the VirtualBox server re-initiates
5442 all USB filters as if the device were just physically attached
5443 to the host, but filters of this machine are ignored to avoid
5444 a possible automatic re-attachment.
5445
5446 <see>IUSBController::deviceFilters, USBDeviceState</see>
5447
5448 <result name="VBOX_E_PDM_ERROR">
5449 Virtual machine does not have a USB controller.
5450 </result>
5451 <result name="E_INVALIDARG">
5452 USB device not attached to this virtual machine.
5453 </result>
5454 </desc>
5455 <param name="id" type="uuid" dir="in">
5456 <desc>UUID of the USB device to detach.</desc>
5457 </param>
5458 <param name="device" type="IUSBDevice" dir="return">
5459 <desc>Detached USB device.</desc>
5460 </param>
5461 </method>
5462
5463 <method name="createSharedFolder">
5464 <desc>
5465 Creates a transient new shared folder by associating the given logical
5466 name with the given host path, adds it to the collection of shared
5467 folders and starts sharing it. Refer to the description of
5468 <link to="ISharedFolder"/> to read more about logical names.
5469
5470 <result name="VBOX_E_INVALID_VM_STATE">
5471 Virtual machine in Saved state or currently changing state.
5472 </result>
5473 <result name="VBOX_E_FILE_ERROR">
5474 Shared folder already exists or not accessible.
5475 </result>
5476 </desc>
5477 <param name="name" type="wstring" dir="in">
5478 <desc>Unique logical name of the shared folder.</desc>
5479 </param>
5480 <param name="hostPath" type="wstring" dir="in">
5481 <desc>Full path to the shared folder in the host file system.</desc>
5482 </param>
5483 <param name="writable" type="boolean" dir="in">
5484 <desc>Whether the share is writable or readonly</desc>
5485 </param>
5486 </method>
5487
5488 <method name="removeSharedFolder">
5489 <desc>
5490 Removes a transient shared folder with the given name previously
5491 created by <link to="#createSharedFolder"/> from the collection of
5492 shared folders and stops sharing it.
5493 <result name="VBOX_E_INVALID_VM_STATE">
5494 Virtual machine in Saved state or currently changing state.
5495 </result>
5496 <result name="VBOX_E_FILE_ERROR">
5497 Shared folder does not exists.
5498 </result>
5499 </desc>
5500 <param name="name" type="wstring" dir="in">
5501 <desc>Logical name of the shared folder to remove.</desc>
5502 </param>
5503 </method>
5504
5505 <method name="takeSnapshot">
5506 <desc>
5507 Saves the current execution state and all settings of the
5508 machine and creates differencing images for all
5509 normal (non-independent) hard disks.
5510
5511 This method can be called for a PoweredOff, Saved, Running or
5512 Paused virtual machine. When the machine is PoweredOff, an
5513 offline <link to="ISnapshot">snapshot</link> is created,
5514 in all other cases -- an online snapshot.
5515
5516 The taken snapshot is always based on the
5517 <link to="IMachine::currentSnapshot">current
5518 snapshot</link> of the associated virtual machine and becomes
5519 a new current snapshot.
5520
5521 <note>
5522 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5523 save all current machine settings before taking an offline snapshot.
5524 </note>
5525
5526 <see>ISnapshot, <link to="#saveState"/></see>
5527 <result name="VBOX_E_INVALID_VM_STATE">
5528 Virtual machine currently changing state.
5529 </result>
5530 </desc>
5531 <param name="name" type="wstring" dir="in">
5532 <desc>Short name for the snapshot.</desc>
5533 </param>
5534 <param name="description" type="wstring" dir="in">
5535 <desc>Optional description of the snapshot.</desc>
5536 </param>
5537 <param name="progress" type="IProgress" dir="return">
5538 <desc>Progress object to track the operation completion.</desc>
5539 </param>
5540 </method>
5541
5542 <method name="discardSnapshot">
5543 <desc>
5544
5545 Starts discarding the specified snapshot. The execution state
5546 and settings of the associated machine stored in the snapshot
5547 will be deleted. The contents of all differencing hard disks of
5548 this snapshot will be merged with the contents of their
5549 dependent child hard disks to keep the, disks valid (in other
5550 words, all changes represented by hard disks being discarded
5551 will be propagated to their child hard disks). After that, this
5552 snapshot's differencing hard disks will be deleted. The parent
5553 of this snapshot will become a new parent for all its child
5554 snapshots.
5555
5556 If the discarded snapshot is the current one, its parent
5557 snapshot will become a new current snapshot. The current machine
5558 state is not directly affected in this case, except that
5559 currently attached differencing hard disks based on hard disks
5560 of the discarded snapshot will be also merged as described
5561 above.
5562
5563 If the discarded snapshot is the first one (the root snapshot)
5564 and it has exactly one child snapshot, this child snapshot will
5565 become the first snapshot after discarding. If there are no
5566 children at all (i.e. the first snapshot is the only snapshot of
5567 the machine), both the current and the first snapshot of the
5568 machine will be set to null. In all other cases, the first
5569 snapshot cannot be discarded.
5570
5571 You cannot discard the snapshot if it
5572 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
5573 hard disks that have differencing hard disks based on them. Snapshots of
5574 such kind can be discarded only when every normal hard disk has either
5575 no children at all or exactly one child. In the former case, the normal
5576 hard disk simply becomes unused (i.e. not attached to any VM). In the
5577 latter case, it receives all the changes stored in the child hard disk,
5578 and then it replaces the child hard disk in the configuration of the
5579 corresponding snapshot or machine.
5580
5581 Also, you cannot discard the snapshot if it stores hard disks
5582 (of any type) having differencing child hard disks that belong
5583 to other machines. Such snapshots can be only discarded after
5584 you discard all snapshots of other machines containing "foreign"
5585 child disks, or detach these "foreign" child disks from machines
5586 they are attached to.
5587
5588 One particular example of the snapshot storing normal hard disks
5589 is the first snapshot of a virtual machine that had normal hard
5590 disks attached when taking the snapshot. Be careful when
5591 discarding such snapshots because this implicitly commits
5592 changes (made since the snapshot being discarded has been taken)
5593 to normal hard disks (as described above), which may be not what
5594 you want.
5595
5596 The virtual machine is put to
5597 the <link to="MachineState_Discarding">Discarding</link> state until
5598 the discard operation is completed.
5599
5600 <note>
5601 The machine must not be running, otherwise the operation
5602 will fail.
5603 </note>
5604
5605 <note>
5606 Child hard disks of all normal hard disks of the discarded snapshot
5607 must be accessible (see <link to="IMedium::state"/>) for this
5608 operation to succeed. In particular, this means that all virtual
5609 machines, whose hard disks are directly or indirectly based on the
5610 hard disks of discarded snapshot, must be powered off.
5611 </note>
5612 <note>
5613 Merging hard disk contents can be very time and disk space
5614 consuming, if these disks are big in size and have many
5615 children. However, if the snapshot being discarded is the last
5616 (head) snapshot on the branch, the operation will be rather
5617 quick.
5618 </note>
5619 <note>
5620 Note that discarding the current snapshot
5621 will implicitly call <link to="IMachine::saveSettings()"/> to
5622 make all current machine settings permanent.
5623 </note>
5624 <result name="VBOX_E_INVALID_VM_STATE">
5625 Virtual machine is running.
5626 </result>
5627 </desc>
5628 <param name="id" type="uuid" dir="in">
5629 <desc>UUID of the snapshot to discard.</desc>
5630 </param>
5631 <param name="progress" type="IProgress" dir="return">
5632 <desc>Progress object to track the operation completion.</desc>
5633 </param>
5634 </method>
5635
5636 <method name="discardCurrentState">
5637 <desc>
5638 This operation is similar to <link to="#discardSnapshot()"/> but
5639 affects the current machine state. This means that the state stored in
5640 the current snapshot will become a new current state, and all current
5641 settings of the machine and changes stored in differencing hard disks
5642 will be lost.
5643
5644 After this operation is successfully completed, new empty differencing
5645 hard disks are created for all normal hard disks of the machine.
5646
5647 If the current snapshot of the machine is an online snapshot, the
5648 machine will go to the <link to="MachineState_Saved"> saved
5649 state</link>, so that the next time it is powered on, the execution
5650 state will be restored from the current snapshot.
5651
5652 <note>
5653 The machine must not be running, otherwise the operation will fail.
5654 </note>
5655
5656 <note>
5657 If the machine state is <link to="MachineState_Saved">Saved</link>
5658 prior to this operation, the saved state file will be implicitly
5659 discarded (as if <link to="IConsole::discardSavedState()"/> were
5660 called).
5661 </note>
5662
5663 <result name="VBOX_E_INVALID_VM_STATE">
5664 Virtual machine is running.
5665 </result>
5666 </desc>
5667 <param name="progress" type="IProgress" dir="return">
5668 <desc>Progress object to track the operation completion.</desc>
5669 </param>
5670 </method>
5671
5672 <method name="discardCurrentSnapshotAndState">
5673 <desc>
5674
5675 This method is equivalent to
5676 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
5677 (currentSnapshot.id(), progress) followed by
5678 <link to="#discardCurrentState()"/>.
5679
5680 As a result, the machine will be fully restored from the
5681 snapshot preceding the current snapshot, while both the current
5682 snapshot and the current machine state will be discarded.
5683
5684 If the current snapshot is the first snapshot of the machine (i.e. it
5685 has the only snapshot), the current machine state will be
5686 discarded <b>before</b> discarding the snapshot. In other words, the
5687 machine will be restored from its last snapshot, before discarding
5688 it. This differs from performing a single
5689 <link to="#discardSnapshot()"/> call (note that no
5690 <link to="#discardCurrentState()"/> will be possible after it)
5691 to the effect that the latter will preserve the current state instead of
5692 discarding it.
5693
5694 Unless explicitly mentioned otherwise, all remarks and
5695 limitations of the above two methods also apply to this method.
5696
5697 <note>
5698 The machine must not be running, otherwise the operation
5699 will fail.
5700 </note>
5701
5702 <note>
5703 If the machine state is <link to="MachineState_Saved">Saved</link>
5704 prior to this operation, the saved state file will be implicitly
5705 discarded (as if <link to="#discardSavedState()"/> were
5706 called).
5707 </note>
5708
5709 <note>
5710 This method is more efficient than calling both of the above
5711 methods separately: it requires less IPC calls and provides
5712 a single progress object.
5713 </note>
5714
5715 <result name="VBOX_E_INVALID_VM_STATE">
5716 Virtual machine is running.
5717 </result>
5718 </desc>
5719 <param name="progress" type="IProgress" dir="return">
5720 <desc>Progress object to track the operation completion.</desc>
5721 </param>
5722 </method>
5723
5724 <method name="registerCallback">
5725 <desc>
5726 Registers a new console callback on this instance. The methods of the
5727 callback interface will be called by this instance when the appropriate
5728 event occurs.
5729 </desc>
5730 <param name="callback" type="IConsoleCallback" dir="in"/>
5731 </method>
5732
5733 <method name="unregisterCallback">
5734 <desc>
5735 Unregisters the console callback previously registered using
5736 <link to="#registerCallback"/>.
5737 <result name="E_INVALIDARG">
5738 Given @a callback handler is not registered.
5739 </result>
5740 </desc>
5741 <param name="callback" type="IConsoleCallback" dir="in"/>
5742 </method>
5743 </interface>
5744
5745 <!--
5746 // IHost
5747 /////////////////////////////////////////////////////////////////////////
5748 -->
5749
5750 <interface
5751 name="IHostDVDDrive" extends="$unknown"
5752 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
5753 wsmap="managed"
5754 >
5755 <desc>
5756 The IHostDVDDrive interface represents the physical CD/DVD drive
5757 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5758 </desc>
5759
5760 <attribute name="name" type="wstring" readonly="yes">
5761 <desc>
5762 Returns the platform-specific device identifier.
5763 On DOS-like platforms, it is a drive name (e.g. R:).
5764 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5765 </desc>
5766 </attribute>
5767 <attribute name="description" type="wstring" readonly="yes">
5768 <desc>
5769 Returns a human readable description for the drive. This
5770 description usually contains the product and vendor name. A
5771 @c null string is returned if the description is not available.
5772 </desc>
5773 </attribute>
5774 <attribute name="udi" type="wstring" readonly="yes">
5775 <desc>
5776 Returns the unique device identifier for the drive. This
5777 attribute is reserved for future use instead of
5778 <link to="#name"/>. Currently it is not used and may return
5779 @c null on some platforms.
5780 </desc>
5781 </attribute>
5782
5783 </interface>
5784
5785 <enumerator
5786 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5787 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5788 />
5789
5790 <collection
5791 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5792 enumerator="IHostDVDDriveEnumerator"
5793 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5794 readonly="yes"
5795 >
5796 <method name="findByName">
5797 <desc>
5798 Searches this collection for a host drive with the given name.
5799 <note>
5800 The method returns an error if the given name does not
5801 correspond to any host drive in the collection.
5802 </note>
5803 </desc>
5804 <param name="name" type="wstring" dir="in">
5805 <desc>Name of the host drive to search for</desc>
5806 </param>
5807 <param name="drive" type="IHostDVDDrive" dir="return">
5808 <desc>Found host drive object</desc>
5809 </param>
5810 </method>
5811 </collection>
5812
5813 <interface
5814 name="IHostFloppyDrive" extends="$unknown"
5815 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5816 wsmap="managed"
5817 >
5818 <desc>
5819 The IHostFloppyDrive interface represents the physical floppy drive
5820 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5821 </desc>
5822 <attribute name="name" type="wstring" readonly="yes">
5823 <desc>
5824 Returns the platform-specific device identifier.
5825 On DOS-like platforms, it is a drive name (e.g. A:).
5826 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5827 </desc>
5828 </attribute>
5829 <attribute name="description" type="wstring" readonly="yes">
5830 <desc>
5831 Returns a human readable description for the drive. This
5832 description usually contains the product and vendor name. A
5833 @c null string is returned if the description is not available.
5834 </desc>
5835 </attribute>
5836 <attribute name="udi" type="wstring" readonly="yes">
5837 <desc>
5838 Returns the unique device identifier for the drive. This
5839 attribute is reserved for future use instead of
5840 <link to="#name"/>. Currently it is not used and may return
5841 @c null on some platforms.
5842 </desc>
5843 </attribute>
5844 </interface>
5845
5846 <enumerator
5847 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5848 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5849 />
5850
5851 <collection
5852 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5853 enumerator="IHostFloppyDriveEnumerator"
5854 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5855 readonly="yes"
5856 >
5857 <method name="findByName">
5858 <desc>
5859 Searches this collection for a host drive with the given name.
5860 <note>
5861 The method returns an error if the given name does not
5862 correspond to any host drive in the collection.
5863 </note>
5864 </desc>
5865 <param name="name" type="wstring" dir="in">
5866 <desc>Name of the host drive to search for</desc>
5867 </param>
5868 <param name="drive" type="IHostFloppyDrive" dir="return">
5869 <desc>Found host drive object</desc>
5870 </param>
5871 </method>
5872 </collection>
5873
5874 <enum
5875 name="HostNetworkInterfaceType"
5876 uuid="763754FA-3246-4539-9590-9E603EDBF706"
5877 >
5878 <desc>
5879 Type of encapsulation. Ethernet encapsulation includes both wired and
5880 wireless Ethernet connections.
5881 <see>IHostNetworkInterface</see>
5882 </desc>
5883
5884 <const name="Unknown" value="0">
5885 <desc>
5886 The type of interface cannot be determined.
5887 </desc>
5888 </const>
5889 <const name="Ethernet" value="1">
5890 <desc>
5891 Ethernet frame encapsulation.
5892 </desc>
5893 </const>
5894 <const name="PPP" value="2">
5895 <desc>
5896 Point-to-point protocol encapsulation.
5897 </desc>
5898 </const>
5899 <const name="SLIP" value="3">
5900 <desc>
5901 Serial line IP encapsulation.
5902 </desc>
5903 </const>
5904 </enum>
5905
5906 <enum
5907 name="HostNetworkInterfaceStatus"
5908 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
5909 >
5910 <desc>
5911 Current status of the interface.
5912 <see>IHostNetworkInterface</see>
5913 </desc>
5914
5915 <const name="Unknown" value="0">
5916 <desc>
5917 The state of interface cannot be determined.
5918 </desc>
5919 </const>
5920 <const name="Up" value="1">
5921 <desc>
5922 The interface is fully operational.
5923 </desc>
5924 </const>
5925 <const name="Down" value="2">
5926 <desc>
5927 The interface is not functioning.
5928 </desc>
5929 </const>
5930 </enum>
5931
5932 <interface
5933 name="IHostNetworkInterface" extends="$unknown"
5934 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
5935 wsmap="managed"
5936 >
5937 <desc>
5938 Reprents one of host's network interfaces. IP V6 address and network
5939 mask are strings of 32 hexdecimal digits grouped by four. Groups are
5940 separated by colons.
5941 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
5942 </desc>
5943 <attribute name="name" type="wstring" readonly="yes">
5944 <desc>Returns the host network interface name.</desc>
5945 </attribute>
5946
5947 <attribute name="id" type="uuid" readonly="yes">
5948 <desc>Returns the interface UUID.</desc>
5949 </attribute>
5950
5951 <attribute name="IPAddress" type="unsigned long" readonly="yes">
5952 <desc>Returns the IP V4 address of the interface.</desc>
5953 </attribute>
5954
5955 <attribute name="networkMask" type="unsigned long" readonly="yes">
5956 <desc>Returns the network mask of the interface.</desc>
5957 </attribute>
5958
5959 <attribute name="IPV6Address" type="wstring" readonly="yes">
5960 <desc>Returns the IP V6 address of the interface.</desc>
5961 </attribute>
5962
5963 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
5964 <desc>Returns the IP V6 network mask of the interface.</desc>
5965 </attribute>
5966
5967 <attribute name="hardwareAddress" type="wstring" readonly="yes">
5968 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
5969 </attribute>
5970
5971 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
5972 <desc>Type of protocol encapsulation used.</desc>
5973 </attribute>
5974
5975 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
5976 <desc>Status of the interface.</desc>
5977 </attribute>
5978 </interface>
5979
5980 <interface
5981 name="IHost" extends="$unknown"
5982 uuid="f39438d7-abfd-409b-bc80-5f5291d92897"
5983 wsmap="managed"
5984 >
5985 <desc>
5986 The IHost interface represents the physical machine that this VirtualBox
5987 installation runs on.
5988
5989 An object implementing this interface is returned by the
5990 <link to="IVirtualBox::host" /> attribute. This interface contains
5991 read-only information about the host's physical hardware (such as what
5992 processors and disks are available, what the host operating system is,
5993 and so on) and also allows for manipulating some of the host's hardware,
5994 such as global USB device filters and host interface networking.
5995
5996 </desc>
5997 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5998 <desc>List of DVD drives available on the host.</desc>
5999 </attribute>
6000
6001 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6002 <desc>List of floppy drives available on the host.</desc>
6003 </attribute>
6004
6005 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6006 <desc>
6007 List of USB devices currently attached to the host.
6008 Once a new device is physically attached to the host computer,
6009 it appears in this list and remains there until detached.
6010
6011 <note>
6012 This method may set a @ref com_warnings "warning result code".
6013 </note>
6014 <note>
6015 If USB functionality is not available in the given edition of
6016 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6017 </note>
6018 </desc>
6019 </attribute>
6020
6021 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6022 <desc>
6023 List of USB device filters in action.
6024 When a new device is physically attached to the host computer,
6025 filters from this list are applied to it (in order they are stored
6026 in the list). The first matched filter will determine the
6027 <link to="IHostUSBDeviceFilter::action">action</link>
6028 performed on the device.
6029
6030 Unless the device is ignored by these filters, filters of all
6031 currently running virtual machines
6032 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6033
6034 <note>
6035 This method may set a @ref com_warnings "warning result code".
6036 </note>
6037 <note>
6038 If USB functionality is not available in the given edition of
6039 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6040 </note>
6041
6042 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6043 </desc>
6044 </attribute>
6045
6046 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6047 <desc>List of host network interfaces currently defined on the host.</desc>
6048 </attribute>
6049
6050 <attribute name="processorCount" type="unsigned long" readonly="yes">
6051 <desc>Number of (logical) CPUs installed in the host system.</desc>
6052 </attribute>
6053
6054 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6055 <desc>Number of (logical) CPUs online in the host system.</desc>
6056 </attribute>
6057
6058 <method name="getProcessorSpeed">
6059 <desc>Query the (approximate) maximum speed of a specified host CPU in
6060 Megahertz.
6061 </desc>
6062 <param name="cpuId" type="unsigned long" dir="in">
6063 <desc>
6064 Identifier of the CPU.
6065 </desc>
6066 </param>
6067 <param name="speed" type="unsigned long" dir="return">
6068 <desc>
6069 Speed value. 0 is returned if value is not known or @a cpuId is
6070 invalid.
6071 </desc>
6072 </param>
6073 </method>
6074
6075 <method name="getProcessorFeature">
6076 <desc>Query whether a CPU feature is supported or not.</desc>
6077 <param name="feature" type="ProcessorFeature" dir="in">
6078 <desc>
6079 CPU Feature identifier.
6080 </desc>
6081 </param>
6082 <param name="supported" type="boolean" dir="return">
6083 <desc>
6084 Feature is supported or not.
6085 </desc>
6086 </param>
6087 </method>
6088
6089 <method name="getProcessorDescription">
6090 <desc>Query the model string of a specified host CPU.
6091 <note>
6092 This function is not implemented in the current version of the
6093 product.
6094 </note>
6095 </desc>
6096 <param name="cpuId" type="unsigned long" dir="in">
6097 <desc>
6098 Identifier of the CPU.
6099 </desc>
6100 </param>
6101 <param name="description" type="wstring" dir="return">
6102 <desc>
6103 Model string. A NULL string is returned if value is not known or
6104 @a cpuId is invalid.
6105 </desc>
6106 </param>
6107 </method>
6108
6109 <attribute name="memorySize" type="unsigned long" readonly="yes">
6110 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6111 </attribute>
6112
6113 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6114 <desc>Available system memory in the host system.</desc>
6115 </attribute>
6116
6117 <attribute name="operatingSystem" type="wstring" readonly="yes">
6118 <desc>Name of the host system's operating system.</desc>
6119 </attribute>
6120
6121 <attribute name="OSVersion" type="wstring" readonly="yes">
6122 <desc>Host operating system's version string.</desc>
6123 </attribute>
6124
6125 <attribute name="UTCTime" type="long long" readonly="yes">
6126 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6127 </attribute>
6128
6129<if target="midl">
6130 <method name="createHostNetworkInterface">
6131 <desc>
6132 Creates a new adapter for Host Interface Networking.
6133 <result name="E_INVALIDARG">
6134 Host network interface @a name already exists.
6135 </result>
6136 </desc>
6137 <param name="name" type="wstring" dir="in">
6138 <desc>
6139 Adapter name.
6140 </desc>
6141 </param>
6142 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6143 <desc>
6144 Created host interface object.
6145 </desc>
6146 </param>
6147 <param name="progress" type="IProgress" dir="return">
6148 <desc>
6149 Progress object to track the operation completion.
6150 </desc>
6151 </param>
6152 </method>
6153 <method name="removeHostNetworkInterface">
6154 <desc>
6155 Removes the given host network interface.
6156 <result name="VBOX_E_OBJECT_NOT_FOUND">
6157 No host network interface matching @a id found.
6158 </result>
6159 </desc>
6160 <param name="id" type="uuid" dir="in">
6161 <desc>
6162 Adapter GUID.
6163 </desc>
6164 </param>
6165 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6166 <desc>
6167 Removed host interface object.
6168 </desc>
6169 </param>
6170 <param name="progress" type="IProgress" dir="return">
6171 <desc>
6172 Progress object to track the operation completion.
6173 </desc>
6174 </param>
6175 </method>
6176</if>
6177
6178 <method name="createUSBDeviceFilter">
6179 <desc>
6180 Creates a new USB device filter. All attributes except
6181 the filter name are set to <tt>null</tt> (any match),
6182 <i>active</i> is <tt>false</tt> (the filter is not active).
6183
6184 The created filter can be added to the list of filters using
6185 <link to="#insertUSBDeviceFilter()"/>.
6186
6187 <see>#USBDeviceFilters</see>
6188 </desc>
6189 <param name="name" type="wstring" dir="in">
6190 <desc>
6191 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6192 for more info.
6193 </desc>
6194 </param>
6195 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6196 <desc>Created filter object.</desc>
6197 </param>
6198 </method>
6199
6200 <method name="insertUSBDeviceFilter">
6201 <desc>
6202 Inserts the given USB device to the specified position
6203 in the list of filters.
6204
6205 Positions are numbered starting from <tt>0</tt>. If the specified
6206 position is equal to or greater than the number of elements in
6207 the list, the filter is added at the end of the collection.
6208
6209 <note>
6210 Duplicates are not allowed, so an attempt to insert a
6211 filter that is already in the list, will return an
6212 error.
6213 </note>
6214 <note>
6215 This method may set a @ref com_warnings "warning result code".
6216 </note>
6217 <note>
6218 If USB functionality is not available in the given edition of
6219 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6220 </note>
6221
6222 <see>#USBDeviceFilters</see>
6223
6224 <result name="VBOX_E_INVALID_OBJECT_STATE">
6225 USB device filter is not created within this VirtualBox instance.
6226 </result>
6227 <result name="E_INVALIDARG">
6228 USB device filter already in list.
6229 </result>
6230
6231 </desc>
6232 <param name="position" type="unsigned long" dir="in">
6233 <desc>Position to insert the filter to.</desc>
6234 </param>
6235 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6236 <desc>USB device filter to insert.</desc>
6237 </param>
6238 </method>
6239
6240 <method name="removeUSBDeviceFilter">
6241 <desc>
6242 Removes a USB device filter from the specified position in the
6243 list of filters.
6244
6245 Positions are numbered starting from <tt>0</tt>. Specifying a
6246 position equal to or greater than the number of elements in
6247 the list will produce an error.
6248
6249 <note>
6250 This method may set a @ref com_warnings "warning result code".
6251 </note>
6252 <note>
6253 If USB functionality is not available in the given edition of
6254 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6255 </note>
6256
6257 <see>#USBDeviceFilters</see>
6258
6259 <result name="E_INVALIDARG">
6260 USB device filter list empty or invalid @a position.
6261 </result>
6262
6263 </desc>
6264 <param name="position" type="unsigned long" dir="in">
6265 <desc>Position to remove the filter from.</desc>
6266 </param>
6267 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6268 <desc>Removed USB device filter.</desc>
6269 </param>
6270 </method>
6271
6272 </interface>
6273
6274 <!--
6275 // ISystemProperties
6276 /////////////////////////////////////////////////////////////////////////
6277 -->
6278
6279 <interface
6280 name="ISystemProperties"
6281 extends="$unknown"
6282 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6283 wsmap="managed"
6284 >
6285 <desc>
6286 The ISystemProperties interface represents global properties of the given
6287 VirtualBox installation.
6288
6289 These properties define limits and default values for various attributes
6290 and parameters. Most of the properties are read-only, but some can be
6291 changed by a user.
6292 </desc>
6293
6294 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6295 <desc>Minimum guest system memory in Megabytes.</desc>
6296 </attribute>
6297
6298 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6299 <desc>Maximum guest system memory in Megabytes.</desc>
6300 </attribute>
6301
6302 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6303 <desc>Minimum guest video memory in Megabytes.</desc>
6304 </attribute>
6305
6306 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6307 <desc>Maximum guest video memory in Megabytes.</desc>
6308 </attribute>
6309
6310 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6311 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6312 </attribute>
6313
6314 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6315 <desc>
6316 Number of network adapters associated with every
6317 <link to="IMachine"/> instance.
6318 </desc>
6319 </attribute>
6320
6321 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6322 <desc>
6323 Number of serial ports associated with every
6324 <link to="IMachine"/> instance.
6325 </desc>
6326 </attribute>
6327
6328 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6329 <desc>
6330 Number of parallel ports associated with every
6331 <link to="IMachine"/> instance.
6332 </desc>
6333 </attribute>
6334
6335 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6336 <desc>
6337 Maximum device position in the boot order. This value corresponds
6338 to the total number of devices a machine can boot from, to make it
6339 possible to include all possible devices to the boot list.
6340 <see><link to="IMachine::setBootOrder()"/></see>
6341 </desc>
6342 </attribute>
6343
6344 <attribute name="defaultMachineFolder" type="wstring">
6345 <desc>
6346 Full path to the default directory used to create new or open
6347 existing machines when a settings file name contains no
6348 path.
6349
6350 The initial value of this property is
6351 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6352 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6353
6354 <note>
6355 Setting this property to <tt>null</tt> will restore the
6356 initial value.
6357 </note>
6358 <note>
6359 When settings this property, the specified path can be
6360 absolute (full path) or relative
6361 to the <link to="IVirtualBox::homeFolder">
6362 VirtualBox home directory</link>.
6363 When reading this property, a full path is
6364 always returned.
6365 </note>
6366 <note>
6367 The specified path may not exist, it will be created
6368 when necessary.
6369 </note>
6370
6371 <see>
6372 <link to="IVirtualBox::createMachine()"/>,
6373 <link to="IVirtualBox::openMachine()"/>
6374 </see>
6375 </desc>
6376 </attribute>
6377
6378 <attribute name="defaultHardDiskFolder" type="wstring">
6379 <desc>
6380 Full path to the default directory used to create new or open existing
6381 virtual disks.
6382
6383 This path is used when the storage unit of a hard disk is a regular file
6384 in the host's file system and only a file name that contains no path is
6385 given.
6386
6387 The initial value of this property is
6388 <tt>&lt;</tt>
6389 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6390 <tt>&gt;/HardDisks</tt>.
6391
6392 <note>
6393 Setting this property to <tt>null</tt> will restore the
6394 initial value.
6395 </note>
6396 <note>
6397 When settings this property, the specified path can be relative
6398 to the
6399 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6400 absolute. When reading this property, a full path is
6401 always returned.
6402 </note>
6403 <note>
6404 The specified path may not exist, it will be created
6405 when necessary.
6406 </note>
6407
6408 <see>
6409 IHardDisk2,
6410 <link to="IVirtualBox::createHardDisk2()"/>,
6411 <link to="IVirtualBox::openHardDisk2()"/>,
6412 <link to="IMedium::location"/>
6413 </see>
6414 </desc>
6415 </attribute>
6416
6417 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6418 <desc>
6419 List of all hard disk storage formats supported by this VirtualBox
6420 installation.
6421
6422 Note that the virtual hard disk framework is backend-based, therefore
6423 the list of supported formats depends on what backends are currently
6424 installed.
6425
6426 <see>
6427 <link to="IHardDiskFormat"/>,
6428 </see>
6429 </desc>
6430 </attribute>
6431
6432 <attribute name="defaultHardDiskFormat" type="wstring">
6433 <desc>
6434 Identifier of the default hard disk format used by VirtualBox.
6435
6436 The hard disk format set by this attribute is used by VirtualBox
6437 when the hard disk format was not specified explicitly. One example is
6438 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6439 format argument. A more complex example is implicit creation of
6440 differencing hard disks when taking a snapshot of a virtual machine:
6441 this operation will try to use a format of the parent hard disk first
6442 and if this format does not support differencing hard disks the default
6443 format specified by this argument will be used.
6444
6445 The list of supported hard disk formats may be obtained by the
6446 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6447 format must have a capability to create differencing hard disks;
6448 otherwise opeartions that create hard disks implicitly may fail
6449 unexpectedly.
6450
6451 The initial value of this property is <tt>VDI</tt> in the current
6452 version of the VirtualBox product, but may change in the future.
6453
6454 <note>
6455 Setting this property to <tt>null</tt> will restore the
6456 initial value.
6457 </note>
6458
6459 <see>
6460 <link to="#hardDiskFormats"/>,
6461 <link to="IHardDiskFormat::id"/>,
6462 <link to="IVirtualBox::createHardDisk2()"/>
6463 </see>
6464 </desc>
6465 </attribute>
6466
6467 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6468 <desc>
6469 Library that provides authentication for VRDP clients. The library
6470 is used if a virtual machine's authentication type is set to "external"
6471 in the VM RemoteDisplay configuration.
6472
6473 The system library extension (".DLL" or ".so") must be omitted.
6474 A full path can be specified; if not, then the library must reside on the
6475 system's default library path.
6476
6477 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6478 of that name in one of the default VirtualBox library directories.
6479
6480 For details about VirtualBox authentication libraries and how to implement
6481 them, please refer to the VirtualBox manual.
6482
6483 <note>
6484 Setting this property to <tt>null</tt> will restore the
6485 initial value.
6486 </note>
6487 </desc>
6488 </attribute>
6489
6490 <attribute name="webServiceAuthLibrary" type="wstring">
6491 <desc>
6492 Library that provides authentication for webservice clients. The library
6493 is used if a virtual machine's authentication type is set to "external"
6494 in the VM RemoteDisplay configuration and will be called from
6495 within the <link to="IWebsessionManager::logon" /> implementation.
6496
6497 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6498 there is no per-VM setting for this, as the webservice is a global
6499 resource (if it is running). Only for this setting (for the webservice),
6500 setting this value to a literal "null" string disables authentication,
6501 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
6502 no matter what user name and password are supplied.
6503
6504 The initial value of this property is <tt>VRDPAuth</tt>,
6505 meaning that the webservice will use the same authentication
6506 library that is used by default for VBoxVRDP (again, see
6507 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
6508 The format and calling convention of authentication libraries
6509 is the same for the webservice as it is for VBoxVRDP.
6510
6511 </desc>
6512 </attribute>
6513
6514 <attribute name="HWVirtExEnabled" type="boolean">
6515 <desc>
6516 This specifies the default value for hardware virtualization
6517 extensions. If enabled, virtual machines will make use of
6518 hardware virtualization extensions such as Intel VT-x and
6519 AMD-V by default. This value can be overridden by each VM
6520 using their <link to="IMachine::HWVirtExEnabled" /> property.
6521 </desc>
6522 </attribute>
6523
6524 <attribute name="LogHistoryCount" type="unsigned long">
6525 <desc>
6526 This value specifies how many old release log files are kept.
6527 </desc>
6528 </attribute>
6529 </interface>
6530
6531 <!--
6532 // IGuest
6533 /////////////////////////////////////////////////////////////////////////
6534 -->
6535
6536 <interface
6537 name="IGuestOSType" extends="$unknown"
6538 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
6539 wsmap="struct"
6540 >
6541 <desc>
6542 </desc>
6543
6544 <attribute name="familyId" type="wstring" readonly="yes">
6545 <desc>Guest OS family identifier string.</desc>
6546 </attribute>
6547
6548 <attribute name="familyDescription" type="wstring" readonly="yes">
6549 <desc>Human readable description of the guest OS family.</desc>
6550 </attribute>
6551
6552 <attribute name="id" type="wstring" readonly="yes">
6553 <desc>Guest OS identifier string.</desc>
6554 </attribute>
6555
6556 <attribute name="description" type="wstring" readonly="yes">
6557 <desc>Human readable description of the guest OS.</desc>
6558 </attribute>
6559
6560 <attribute name="is64Bit" type="boolean" readonly="yes">
6561 <desc>Returns @c true if the given OS is 64-bit</desc>
6562 </attribute>
6563
6564 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
6565 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
6566 </attribute>
6567
6568 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
6569 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
6570 </attribute>
6571
6572 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
6573 <desc>Recommended RAM size in Megabytes.</desc>
6574 </attribute>
6575
6576 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
6577 <desc>Recommended video RAM size in Megabytes.</desc>
6578 </attribute>
6579
6580 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
6581 <desc>Recommended hard disk size in Megabytes.</desc>
6582 </attribute>
6583
6584 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
6585 <desc>Returns recommended network adapter for this OS type.</desc>
6586 </attribute>
6587 </interface>
6588
6589
6590 <enumerator
6591 name="IGuestOSTypeEnumerator" type="IGuestOSType"
6592 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
6593 />
6594
6595 <collection
6596 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
6597 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
6598 readonly="yes"
6599 />
6600
6601 <interface
6602 name="IGuest" extends="$unknown"
6603 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
6604
6605 wsmap="suppress"
6606 >
6607 <desc>
6608 The IGuest interface represents information about the operating system
6609 running inside the virtual machine. Used in
6610 <link to="IConsole::guest"/>.
6611
6612 IGuest provides information about the guest operating system, whether
6613 Guest Additions are installed and other OS-specific virtual machine
6614 properties.
6615 </desc>
6616
6617 <attribute name="OSTypeId" type="wstring" readonly="yes">
6618 <desc>
6619 Identifier of the Guest OS type as reported by the Guest
6620 Additions.
6621 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
6622 an IGuestOSType object representing details about the given
6623 Guest OS type.
6624 <note>
6625 If Guest Additions are not installed, this value will be
6626 the same as <link to="IMachine::OSTypeId"/>.
6627 </note>
6628 </desc>
6629 </attribute>
6630
6631 <attribute name="additionsActive" type="boolean" readonly="yes">
6632 <desc>
6633 Flag whether the Guest Additions are installed and active
6634 in which case their version will be returned by the
6635 <link to="#additionsVersion"/> property.
6636 </desc>
6637 </attribute>
6638
6639 <attribute name="additionsVersion" type="wstring" readonly="yes">
6640 <desc>
6641 Version of the Guest Additions (3 decimal numbers separated
6642 by dots) or empty when the Additions are not installed. The
6643 Additions may also report a version but yet not be active as
6644 the version might be refused by VirtualBox (incompatible) or
6645 other failures occurred.
6646 </desc>
6647 </attribute>
6648
6649 <attribute name="supportsSeamless" type="boolean" readonly="yes">
6650 <desc>
6651 Flag whether seamless guest display rendering (seamless desktop
6652 integration) is supported.
6653 </desc>
6654 </attribute>
6655
6656 <attribute name="supportsGraphics" type="boolean" readonly="yes">
6657 <desc>
6658 Flag whether the guest is in graphics mode. If it is not, then
6659 seamless rendering will not work, resize hints are not immediately
6660 acted on and guest display resizes are probably not initiated by
6661 the guest additions.
6662 </desc>
6663 </attribute>
6664
6665 <attribute name="memoryBalloonSize" type="unsigned long">
6666 <desc>Guest system memory balloon size in megabytes.</desc>
6667 </attribute>
6668
6669 <attribute name="statisticsUpdateInterval" type="unsigned long">
6670 <desc>Interval to update guest statistics in seconds.</desc>
6671 </attribute>
6672
6673 <method name="setCredentials">
6674 <desc>
6675 Store login credentials that can be queried by guest operating
6676 systems with Additions installed. The credentials are transient
6677 to the session and the guest may also choose to erase them. Note
6678 that the caller cannot determine whether the guest operating system
6679 has queried or made use of the credentials.
6680
6681 <result name="VBOX_E_VM_ERROR">
6682 VMM device is not available.
6683 </result>
6684
6685 </desc>
6686 <param name="userName" type="wstring" dir="in">
6687 <desc>User name string, can be empty</desc>
6688 </param>
6689 <param name="password" type="wstring" dir="in">
6690 <desc>Password string, can be empty</desc>
6691 </param>
6692 <param name="domain" type="wstring" dir="in">
6693 <desc>Domain name (guest logon scheme specific), can be empty</desc>
6694 </param>
6695 <param name="allowInteractiveLogon" type="boolean" dir="in">
6696 <desc>
6697 Flag whether the guest should alternatively allow the user to
6698 interactively specify different credentials. This flag might
6699 not be supported by all versions of the Additions.
6700 </desc>
6701 </param>
6702 </method>
6703
6704 <method name="getStatistic">
6705 <desc>
6706 Query specified guest statistics as reported by the VirtualBox Additions.
6707 </desc>
6708 <param name="cpuId" type="unsigned long" dir="in">
6709 <desc>Virtual CPU id; not relevant for all statistic types</desc>
6710 </param>
6711 <param name="statistic" type="GuestStatisticType" dir="in">
6712 <desc>Statistic type.</desc>
6713 </param>
6714 <param name="statVal" type="unsigned long" dir="out">
6715 <desc>Statistics value</desc>
6716 </param>
6717 </method>
6718
6719 </interface>
6720
6721
6722 <!--
6723 // IProgress
6724 /////////////////////////////////////////////////////////////////////////
6725 -->
6726
6727 <enumerator
6728 name="IProgressEnumerator" type="IProgress"
6729 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
6730 />
6731
6732 <collection
6733 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
6734 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
6735 readonly="yes"
6736 />
6737
6738 <interface
6739 name="IProgress" extends="$unknown"
6740 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
6741 wsmap="managed"
6742 >
6743 <desc>
6744 The IProgress interface represents a task progress object that allows
6745 to wait for the completion of some asynchronous task.
6746
6747 The task consists of one or more operations that run sequentially,
6748 one after one. There is an individual percent of completion of the
6749 current operation and the percent of completion of the task as a
6750 whole. Similarly, you can wait for the completion of a particular
6751 operation or for the completion of the whole task.
6752
6753 Every operation is identified by a number (starting from 0)
6754 and has a separate description.
6755 </desc>
6756
6757 <attribute name="id" type="uuid" readonly="yes">
6758 <desc>ID of the task.</desc>
6759 </attribute>
6760
6761 <attribute name="description" type="wstring" readonly="yes">
6762 <desc>Description of the task.</desc>
6763 </attribute>
6764
6765 <attribute name="initiator" type="$unknown" readonly="yes">
6766 <desc>Initiator of the task.</desc>
6767 </attribute>
6768
6769 <attribute name="cancelable" type="boolean" readonly="yes">
6770 <desc>Whether the task can be interrupted.</desc>
6771 </attribute>
6772
6773 <attribute name="percent" type="long" readonly="yes">
6774 <desc>
6775 Current task progress value in percent.
6776 This value depends on how many operations are already complete.
6777 </desc>
6778 </attribute>
6779
6780 <attribute name="completed" type="boolean" readonly="yes">
6781 <desc>Whether the task has been completed.</desc>
6782 </attribute>
6783
6784 <attribute name="canceled" type="boolean" readonly="yes">
6785 <desc>Whether the task has been canceled.</desc>
6786 </attribute>
6787
6788 <attribute name="resultCode" type="result" readonly="yes">
6789 <desc>
6790 Result code of the progress task.
6791 Valid only if <link to="#completed"/> is true.
6792 </desc>
6793 </attribute>
6794
6795 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
6796 <desc>
6797 Extended information about the unsuccessful result of the
6798 progress operation. May be NULL when no extended information
6799 is available.
6800 Valid only if <link to="#completed"/> is true and
6801 <link to="#resultCode"/> indicates a failure.
6802 </desc>
6803 </attribute>
6804
6805 <attribute name="operationCount" type="unsigned long" readonly="yes">
6806 <desc>
6807 Number of operations this task is divided into.
6808 Every task consists of at least one operation.
6809 </desc>
6810 </attribute>
6811
6812 <attribute name="operation" type="unsigned long" readonly="yes">
6813 <desc>Number of the operation being currently executed.</desc>
6814 </attribute>
6815
6816 <attribute name="operationDescription" type="wstring" readonly="yes">
6817 <desc>
6818 Description of the operation being currently executed.
6819 </desc>
6820 </attribute>
6821
6822 <attribute name="operationPercent" type="long" readonly="yes">
6823 <desc>Current operation progress value in percent.</desc>
6824 </attribute>
6825
6826 <method name="waitForCompletion">
6827 <desc>
6828 Waits until the task is done (including all operations) with a
6829 given timeout.
6830
6831 <result name="VBOX_E_IPRT_ERROR">
6832 Failed to wait for task completion.
6833 </result>
6834
6835 </desc>
6836 <param name="timeout" type="long" dir="in">
6837 <desc>
6838 Timeout value in milliseconds.
6839 Specify -1 for an indefinite wait.
6840 </desc>
6841 </param>
6842 </method>
6843
6844 <method name="waitForOperationCompletion">
6845 <desc>
6846 Waits until the given operation is done with a given timeout.
6847
6848 <result name="VBOX_E_IPRT_ERROR">
6849 Failed to wait for operation completion.
6850 </result>
6851
6852 </desc>
6853 <param name="operation" type="unsigned long" dir="in">
6854 <desc>
6855 Number of the operation to wait for.
6856 Must be less than <link to="#operationCount"/>.
6857 </desc>
6858 </param>
6859 <param name="timeout" type="long" dir="in">
6860 <desc>
6861 Timeout value in milliseconds.
6862 Specify -1 for an indefinite wait.
6863 </desc>
6864 </param>
6865 </method>
6866
6867 <method name="cancel">
6868 <desc>
6869 Cancels the task.
6870 <note>
6871 If <link to="#cancelable"/> is <tt>false</tt>, then
6872 this method will fail.
6873 </note>
6874
6875 <result name="VBOX_E_INVALID_OBJECT_STATE">
6876 Operation cannot be canceled.
6877 </result>
6878
6879 </desc>
6880 </method>
6881
6882 </interface>
6883
6884
6885 <!--
6886 // ISnapshot
6887 /////////////////////////////////////////////////////////////////////////
6888 -->
6889
6890 <enumerator
6891 name="ISnapshotEnumerator" type="ISnapshot"
6892 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
6893 />
6894
6895 <collection
6896 name="ISnapshotCollection" type="ISnapshot"
6897 enumerator="ISnapshotEnumerator"
6898 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
6899 readonly="yes"
6900 />
6901
6902 <interface
6903 name="ISnapshot" extends="$unknown"
6904 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
6905 wsmap="managed"
6906 >
6907 <desc>
6908 The ISnapshot interface represents a snapshot of the virtual
6909 machine.
6910
6911 The <i>snapshot</i> stores all the information about a virtual
6912 machine necessary to bring it to exactly the same state as it was at
6913 the time of taking the snapshot. The snapshot includes:
6914
6915 <ul>
6916 <li>all settings of the virtual machine (i.e. its hardware
6917 configuration: RAM size, attached hard disks, etc.)
6918 </li>
6919 <li>the execution state of the virtual machine (memory contents,
6920 CPU state, etc.).
6921 </li>
6922 </ul>
6923
6924 Snapshots can be <i>offline</i> (taken when the VM is powered off)
6925 or <i>online</i> (taken when the VM is running). The execution
6926 state of the offline snapshot is called a <i>zero execution state</i>
6927 (it doesn't actually contain any information about memory contents
6928 or the CPU state, assuming that all hardware is just powered off).
6929
6930 <h3>Snapshot branches</h3>
6931
6932 Snapshots can be chained. Chained snapshots form a branch where
6933 every next snapshot is based on the previous one. This chaining is
6934 mostly related to hard disk branching (see <link to="IHardDisk2"/>
6935 description). This means that every time a new snapshot is created,
6936 a new differencing hard disk is implicitly created for all normal
6937 hard disks attached to the given virtual machine. This allows to
6938 fully restore hard disk contents when the machine is later reverted
6939 to a particular snapshot.
6940
6941 In the current implementation, multiple snapshot branches within one
6942 virtual machine are not allowed. Every machine has a single branch,
6943 and <link to="IConsole::takeSnapshot()"/> operation adds a new
6944 snapshot to the top of that branch.
6945
6946 Existing snapshots can be discarded using
6947 <link to="IConsole::discardSnapshot()"/>.
6948
6949 <h3>Current snapshot</h3>
6950
6951 Every virtual machine has a current snapshot, identified by
6952 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
6953 a base for the <i>current machine state</i> (see below), to the effect
6954 that all normal hard disks of the machine and its execution
6955 state are based on this snapshot.
6956
6957 In the current implementation, the current snapshot is always the
6958 last taken snapshot (i.e. the head snapshot on the branch) and it
6959 cannot be changed.
6960
6961 The current snapshot is <tt>null</tt> if the machine doesn't have
6962 snapshots at all; in this case the current machine state is just
6963 current settings of this machine plus its current execution state.
6964
6965 <h3>Current machine state</h3>
6966
6967 The current machine state is what represented by IMachine instances got
6968 directly from IVirtualBox
6969 using <link
6970 to="IVirtualBox::getMachine()">getMachine()</link>, <link
6971 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
6972 to instances returned by <link to="ISnapshot::machine"/>). This state
6973 is always used when the machine is <link to="IConsole::powerUp"> powered
6974 on</link>.
6975
6976 The current machine state also includes the current execution state.
6977 If the machine is being currently executed
6978 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
6979 and above), its execution state is just what's happening now.
6980 If it is powered off (<link to="MachineState_PoweredOff"/> or
6981 <link to="MachineState_Aborted"/>), it has a zero execution state.
6982 If the machine is saved (<link to="MachineState_Saved"/>), its
6983 execution state is what saved in the execution state file
6984 (<link to="IMachine::stateFilePath"/>).
6985
6986 If the machine is in the saved state, then, next time it is powered
6987 on, its execution state will be fully restored from the saved state
6988 file and the execution will continue from the point where the state
6989 was saved.
6990
6991 Similarly to snapshots, the current machine state can be discarded
6992 using <link to="IConsole::discardCurrentState()"/>.
6993
6994 <h3>Taking and discarding snapshots</h3>
6995
6996 The table below briefly explains the meaning of every snapshot
6997 operation:
6998
6999 <table>
7000 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7001
7002 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7003
7004 <td>Save the current state of the virtual machine, including all
7005 settings, contents of normal hard disks and the current modifications
7006 to immutable hard disks (for online snapshots)</td>
7007
7008 <td>The current state is not changed (the machine will continue
7009 execution if it is being executed when the snapshot is
7010 taken)</td></tr>
7011
7012 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7013
7014 <td>Forget the state of the virtual machine stored in the snapshot:
7015 dismiss all saved settings and delete the saved execution state (for
7016 online snapshots)</td>
7017
7018 <td>Other snapshots (including child snapshots, if any) and the
7019 current state are not directly affected</td></tr>
7020
7021 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7022
7023 <td>Restore the current state of the virtual machine from the state
7024 stored in the current snapshot, including all settings and hard disk
7025 contents</td>
7026
7027 <td>The current state of the machine existed prior to this operation
7028 is lost</td></tr>
7029
7030 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7031
7032 <td>Completely revert the virtual machine to the state it was in
7033 before the current snapshot has been taken</td>
7034
7035 <td>The current state, as well as the current snapshot, are
7036 lost</td></tr>
7037
7038 </table>
7039
7040 </desc>
7041
7042 <attribute name="id" type="uuid" readonly="yes">
7043 <desc>UUID of the snapshot.</desc>
7044 </attribute>
7045
7046 <attribute name="name" type="wstring">
7047 <desc>Short name of the snapshot.</desc>
7048 </attribute>
7049
7050 <attribute name="description" type="wstring">
7051 <desc>Optional description of the snapshot.</desc>
7052 </attribute>
7053
7054 <attribute name="timeStamp" type="long long" readonly="yes">
7055 <desc>
7056 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7057 </desc>
7058 </attribute>
7059
7060 <attribute name="online" type="boolean" readonly="yes">
7061 <desc>
7062 <tt>true</tt> if this snapshot is an online snapshot and
7063 <tt>false</tt> otherwise.
7064
7065 <note>
7066 When this attribute is <tt>true</tt>, the
7067 <link to="IMachine::stateFilePath"/> attribute of the
7068 <link to="#machine"/> object associated with this snapshot
7069 will point to the saved state file. Otherwise, it will be
7070 <tt>null</tt>.
7071 </note>
7072 </desc>
7073 </attribute>
7074
7075 <attribute name="machine" type="IMachine" readonly="yes">
7076 <desc>
7077 Virtual machine this snapshot is taken on. This object
7078 stores all settings the machine had when taking this snapshot.
7079 <note>
7080 The returned machine object is immutable, i.e. no
7081 any settings can be changed.
7082 </note>
7083 </desc>
7084 </attribute>
7085
7086 <attribute name="parent" type="ISnapshot" readonly="yes">
7087 <desc>
7088 Parent snapshot (a snapshot this one is based on).
7089 <note>
7090 It's not an error to read this attribute on a snapshot
7091 that doesn't have a parent -- a null object will be
7092 returned to indicate this.
7093 </note>
7094 </desc>
7095 </attribute>
7096
7097 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7098 <desc>
7099 Child snapshots (all snapshots having this one as a parent).
7100 <note>
7101 In the current implementation, there can be only one
7102 child snapshot, or no children at all, meaning this is the
7103 last (head) snapshot.
7104 </note>
7105 </desc>
7106 </attribute>
7107
7108 </interface>
7109
7110
7111 <!--
7112 // IMedia
7113 /////////////////////////////////////////////////////////////////////////
7114 -->
7115
7116 <enum
7117 name="MediaState"
7118 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7119 >
7120 <desc>
7121 Virtual media state.
7122 <see>IMedia</see>
7123 </desc>
7124
7125 <const name="NotCreated" value="0">
7126 <desc>
7127 Associated media storage does not exist (either was not created yet or
7128 was deleted).
7129 </desc>
7130 </const>
7131 <const name="Created" value="1">
7132 <desc>
7133 Associated storage exists and accessible.
7134 </desc>
7135 </const>
7136 <const name="LockedRead" value="2">
7137 <desc>
7138 Media is locked for reading, no data modification is possible.
7139 </desc>
7140 </const>
7141 <const name="LockedWrite" value="3">
7142 <desc>
7143 Media is locked for writing, no concurrent data reading or modification
7144 is possible.
7145 </desc>
7146 </const>
7147 <const name="Inaccessible" value="4">
7148 <desc>
7149 Associated media storage is not accessible.
7150 </desc>
7151 </const>
7152 <const name="Creating" value="5">
7153 <desc>
7154 Associated media storage is being created.
7155 </desc>
7156 </const>
7157 <const name="Deleting" value="6">
7158 <desc>
7159 Associated media storage is being deleted.
7160 </desc>
7161 </const>
7162 </enum>
7163
7164 <interface
7165 name="IMedium" extends="$unknown"
7166 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7167 wsmap="managed"
7168 >
7169 <desc>
7170 The IMedium interface is a common interface for all objects representing
7171 virtual media such as hard disks, DVD images.
7172
7173 Each medium is associated with a storage unit (such as a file on the host
7174 computer or a network resource) that holds actual data. The location of
7175 the storage unit is represented by the #location attribute. The value of
7176 this attribute is media type dependent.
7177
7178 The exact media type may be determined by querying the appropriate
7179 interface such as:
7180 <ul>
7181 <li>IHardDisk2 (virtual hard disks)</li>
7182 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7183 <li>IFloppyImage2 (raw floppy image files)</li>
7184 </ul>
7185
7186 Existing media are opened using the following methods, depending on the
7187 media type:
7188 <ul>
7189 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7190 <li><link to="IVirtualBox::openDVDImage()"/></li>
7191 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7192 </ul>
7193
7194 New hard disk media are created using the
7195 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7196 images are created outside VirtualBox, usually by storing a copy
7197 of the real medium of the corresponding type in a regular file.
7198
7199 <h3>Known Media</h3>
7200
7201 When an existing medium gets opened for the first time, it gets
7202 automatically remembered by the given VirtualBox installation or, in other
7203 words, becomes a <i>known medium</i>. Known media are stored in the media
7204 registry transparently maintained by VirtualBox and stored in settings
7205 files so that this registry is preserved when VirtualBox is not running.
7206
7207 Newly created virtual hard disks get remembered only when the associated
7208 storage unit is actually created (see IHardDisk2 for more details).
7209
7210 All known media can be enumerated using
7211 <link to="IVirtualBox::hardDisks2"/>,
7212 <link to="IVirtualBox::DVDImages"/> and
7213 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7214 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7215 and similar methods or by location using
7216 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7217
7218 Only known media can be attached to virtual machines.
7219
7220 Removing known media from the media registry is performed when the given
7221 medium is closed using the <link to="#close()"/> method or when its
7222 associated storage unit is deleted (only for hard disks).
7223
7224 <h3>Accessibility Checks</h3>
7225
7226 The given medium (with the created storage unit) is considered to be
7227 <i>accessible</i> when its storage unit can be successfully read from.
7228 Accessible media are indicated by the <link to="MediaState_Created"/>
7229 value of the <link to="#state"/> attribute. When the storage unit cannot
7230 be read (for example, because it is located on a disconnected network
7231 resource, or was accidentally deleted outside VirtualBox), the medium is
7232 considered to be <i>inaccessible</i> which is indicated by the
7233 <link to="MediaState_Inaccessible"/> state. The details about the reason
7234 of being inaccessible can be obtained using the
7235 <link to="#lastAccessError"/> attribute.
7236
7237 A new accessibility check is performed each time the <link to="#state"/>
7238 attribute is read. Please note that this check may take long time (several
7239 seconds or even minutes, depending on the storage unit location and
7240 format), and will block the calling thread until finished. For this
7241 reason, it is recommended to never read this attribute on the main UI
7242 thread to avoid making the UI unresponsive.
7243
7244 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7245 created for the first time), all known media are in the
7246 <link to="MediaState_Inaccessible"/> state but the value of the <link
7247 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7248 accessibility check is made on startup. This is done to make the
7249 VirtualBox object ready for serving requests as
7250 fast as possible and let the end-user application decide if it needs to
7251 check media accessibility right away or not.
7252 </desc>
7253
7254 <attribute name="id" type="uuid" readonly="yes">
7255 <desc>
7256 UUID of the medium. For a newly created medium, this value is a randomly
7257 generated UUID.
7258
7259 <note>
7260 For media in one of MediaState_NotCreated, MediaState_Creating or
7261 MediaState_Deleting states, the value of this property is undefined
7262 and will most likely be an empty UUID.
7263 </note>
7264 </desc>
7265 </attribute>
7266
7267 <attribute name="description" type="wstring">
7268 <desc>
7269 Optional description of the medium. For newly created media, the value
7270 of this attribute value is <tt>null</tt>.
7271
7272 Media types that don't support this attribute will return E_NOTIMPL in
7273 attempt to get or set this attribute's value.
7274
7275 <note>
7276 For some storage types, reading this attribute may return an outdated
7277 (last known) value when <link to="#state"/> is <link
7278 to="MediaState_Inaccessible"/> or <link
7279 to="MediaState_LockedWrite"/> because the value of this attribute is
7280 stored within the storage unit itself. Also note that changing the
7281 attribute value is not possible in such case, as well as when the
7282 medium is the <link to="MediaState_LockedRead"/> state.
7283 </note>
7284 </desc>
7285 </attribute>
7286
7287 <attribute name="state" type="MediaState" readonly="yes">
7288 <desc>
7289 Current media state. Inspect <link to="MediaState"/> values for details.
7290
7291 Reading this attribute may take long time because a new accessibility
7292 check of the storage unit is performed every time the attribute is read.
7293 This check may cause a significant delay if the storage unit of the
7294 given medium is, for example, a file located on a network share which is
7295 not currently accessible due to connectivity problems -- the call will
7296 not return until a timeout interval defined by the host OS for this
7297 operation expires.
7298
7299 If the last known state of the medium is <link to="MediaState_Created"/>
7300 and the accessibility check fails then the state would be set to
7301 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7302 may be used to get more details about the failure. If the state of the
7303 medium is <link to="MediaState_LockedRead"/> or
7304 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7305 non-null value of <link to="#lastAccessError"/> will indicate a failed
7306 accessibility check in this case.
7307
7308 Note that not all media states are applicable to certain media types.
7309 For example, states <link to="MediaState_NotCreated"/>,
7310 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7311 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7312 IFloppyImage2 media.
7313 </desc>
7314 </attribute>
7315
7316 <attribute name="location" type="wstring">
7317 <desc>
7318 Location of the storage unit holding media data.
7319
7320 The format of the location string is media type specific. For media
7321 types that use regular files in a host's file system, the location
7322 string is just a full file name.
7323
7324 Some media types may support changing the storage unit location by
7325 simply changing the value of this property. If this operation is not
7326 supported, the implementation will return E_NOTIMPL in attempt to set
7327 this attribute's value.
7328
7329 When setting a value of the location attribute which is a regular file
7330 in the host's file system, the given file name may be either relative to
7331 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7332 absolute. Note that if the given location specification does not contain
7333 the file extension part then a proper default extension will be
7334 automatically appended by the implementation depending on the media type.
7335 </desc>
7336 </attribute>
7337
7338 <attribute name="name" type="wstring" readonly="yes">
7339 <desc>
7340 Name of the storage unit holding media data.
7341
7342 The returned string is a short version of the <link to="#location"/>
7343 attribute that is suitable for representing the medium in situations
7344 where the full location specification is too long (such as lists
7345 and comboboxes in GUI frontends). This string is also used by frontends
7346 to sort the media list alphabetically when needed.
7347
7348 For example, for locations that are regular files in the host's file
7349 system, the value of this attribute is just a file name (+ extension),
7350 without the path specification.
7351
7352 Note that as opposed to the <link to="#location"/> attribute, the name
7353 attribute will not necessary be unique for a list of media of the
7354 given type and format.
7355 </desc>
7356 </attribute>
7357
7358 <attribute name="size" type="unsigned long long" readonly="yes">
7359 <desc>
7360 Physical size of the storage unit used to hold media data (in bytes).
7361
7362 <note>
7363 For media whose <link to="#state"/> is <link
7364 to="MediaState_Inaccessible"/>, the value of this property is the
7365 last known size. For <link to="MediaState_NotCreated"/> media,
7366 the returned value is zero.
7367 </note>
7368 </desc>
7369 </attribute>
7370
7371 <attribute name="lastAccessError" type="wstring" readonly="yes">
7372 <desc>
7373 Text message that represents the result of the last accessibility
7374 check.
7375
7376 Accessibility checks are performed each time the <link to="#state"/>
7377 attribute is read. A @c null string is returned if the last
7378 accessibility check was successful. A non-null string indicates a
7379 failure and should normally describe a reason of the failure (for
7380 example, a file read error).
7381 </desc>
7382 </attribute>
7383
7384 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7385 <desc>
7386 Array of UUIDs of all machines this medium is attached to.
7387
7388 A <tt>null</tt> array is returned if this medium is not attached to any
7389 machine or to any machine's snapshot.
7390
7391 <note>
7392 The returned array will include a machine even if this medium is not
7393 attached to that machine in the current state but attached to it in
7394 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7395 details.
7396 </note>
7397 </desc>
7398 </attribute>
7399
7400 <method name="getSnapshotIds">
7401 <desc>
7402 Returns an array of UUIDs of all snapshots of the given machine where
7403 this medium is attached to it.
7404
7405 If the medium is attached to the machine in the current state, then the
7406 first element in the array will always be the ID of the queried machine
7407 (i.e. the value equal to the @c machineId argument), followed by
7408 snapshot IDs (if any).
7409
7410 If the medium is not attached to the machine in the current state, then
7411 the array will contain only snapshot IDs.
7412
7413 The returned array may be <tt>null</tt> if this medium is not attached
7414 to the given machine at all, neither in the current state nor in one of
7415 snapshots.
7416 </desc>
7417 <param name="machineId" type="uuid" dir="in">
7418 <desc>
7419 UUID of the machine to query.
7420 </desc>
7421 </param>
7422 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7423 <desc>
7424 Array of snapshot UUIDs of the given machine using this medium.
7425 </desc>
7426 </param>
7427 </method>
7428
7429 <method name="lockRead">
7430 <desc>
7431 Locks this medium for reading.
7432
7433 The read lock is shared: many clients can simultaneously lock the
7434 same media for reading unless it is already locked for writing (see
7435 <link to="#lockWrite()"/>) in which case an error is returned.
7436
7437 When the medium is locked for reading, it cannot be modified
7438 from within VirtualBox. This means that any method that changes
7439 the properties of this medium or contents of the storage unit
7440 will return an error (unless explicitly stated otherwise) and
7441 that an attempt to start a virtual machine that wants to modify
7442 the medium will also fail.
7443
7444 When the virtual machine is started up, it locks for reading all
7445 media it uses in read-only mode. If some media cannot be locked
7446 for reading, the startup procedure will fail.
7447
7448 The medium locked for reading must be unlocked using the <link
7449 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7450 can be nested and must be followed by the same number of paired
7451 <link to="#unlockRead()"/> calls.
7452
7453 This method sets the media state to <link
7454 to="MediaState_LockedRead"/> on success. The state prior to
7455 this call must be <link to="MediaState_Created"/>, <link
7456 to="MediaState_Inaccessible"/> or <link
7457 to="MediaState_LockedRead"/>. As you can see, inaccessible
7458 media can be locked too. This is not an error; this method
7459 performs a logical lock that prevents modifications of this
7460 media through the VirtualBox API, not a physical lock of the
7461 underlying storage unit.
7462
7463 This method returns the current state of the medium
7464 <b>before</b> the operation.
7465
7466 <result name="VBOX_E_INVALID_OBJECT_STATE">
7467 Invalid media state (e.g. not created, locked, inaccessible,
7468 creating, deleting).
7469 </result>
7470
7471 </desc>
7472 <param name="state" type="MediaState" dir="return">
7473 <desc>
7474 State of the medium after the operation.
7475 </desc>
7476 </param>
7477 </method>
7478
7479 <method name="unlockRead">
7480 <desc>
7481 Cancels the read lock previously set by <link to="#lockRead()"/>.
7482
7483 Either on success or on failure, this method returns the current state
7484 of the medium <b>after</b> the operation.
7485
7486 See <link to="#lockRead()"/> for more details.
7487
7488 <result name="VBOX_E_INVALID_OBJECT_STATE">
7489 Medium not locked for reading.
7490 </result>
7491
7492 </desc>
7493 <param name="state" type="MediaState" dir="return">
7494 <desc>
7495 State of the medium after the operation.
7496 </desc>
7497 </param>
7498 </method>
7499
7500 <method name="lockWrite">
7501 <desc>
7502 Locks this medium for writing.
7503
7504 The write lock, as opposed to <link to="#lockRead()"/>, is
7505 exclusive: there may be only one client that holds a write lock
7506 and there may be no read locks while the write lock is held.
7507
7508 When the medium is locked for writing, it cannot be modified
7509 from within VirtualBox and it is not guaranteed that the values
7510 of its properties are up-to-date. Any method that changes the
7511 properties of this medium or contents of the storage unit will
7512 return an error ((unless explicitly stated otherwise) and an
7513 attempt to start a virtual machine that wants to modify or to
7514 read the medium will also fail.
7515
7516 When the virtual machine is started up, it locks for writing all
7517 media it uses to write data to. If some media cannot be locked
7518 for writing, the startup procedure will fail.
7519
7520 The medium locked for writing must be unlocked using the <link
7521 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
7522 can <b>not</b> be nested and must be followed by a paired <link
7523 to="#unlockWrite()"/> call.
7524
7525 This method sets the media state to <link
7526 to="MediaState_LockedWrite"/> on success. The state prior to
7527 this call must be <link to="MediaState_Created"/> or <link
7528 to="MediaState_Inaccessible"/>. As you can see, inaccessible
7529 media can be locked too. This is not an error; this method
7530 performs a logical lock that prevents modifications of this
7531 media through the VirtualBox API, not a physical lock of the
7532 underlying storage unit.
7533
7534 Either on success or on failure, this method returns the current
7535 state of the medium <b>before</b> the operation.
7536
7537 <result name="VBOX_E_INVALID_OBJECT_STATE">
7538 Invalid media state (e.g. not created, locked, inaccessible,
7539 creating, deleting).
7540 </result>
7541
7542 </desc>
7543 <param name="state" type="MediaState" dir="return">
7544 <desc>
7545 State of the medium after the operation.
7546 </desc>
7547 </param>
7548 </method>
7549
7550 <method name="unlockWrite">
7551 <desc>
7552 Cancels the write lock previously set by <link to="#lockWrite()"/>.
7553
7554 Either on success or on failure, this method returns the current
7555 state of the medium <b>after</b> the operation.
7556
7557 See <link to="#lockWrite()"/> for more details.
7558
7559 <result name="VBOX_E_INVALID_OBJECT_STATE">
7560 Medium not locked for writing.
7561 </result>
7562
7563 </desc>
7564 <param name="state" type="MediaState" dir="return">
7565 <desc>
7566 State of the medium after the operation.
7567 </desc>
7568 </param>
7569 </method>
7570
7571 <method name="close">
7572 <desc>
7573 Closes this medium.
7574
7575 The hard disk must not be attached to any known virtual machine
7576 and must not have any known child hard disks, otherwise the
7577 operation will fail.
7578
7579 When the hard disk is successfully closed, it gets removed from
7580 the list of remembered hard disks, but its storage unit is not
7581 deleted. In particular, this means that this hard disk can be
7582 later opened again using the <link
7583 to="IVirtualBox::openHardDisk2"/> call.
7584
7585 Note that after this method successfully returns, the given hard
7586 disk object becomes uninitialized. This means that any attempt
7587 to call any of its methods or attributes will fail with the
7588 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
7589
7590 <result name="VBOX_E_INVALID_OBJECT_STATE">
7591 Invalid media state (other than not created, created or
7592 inaccessible).
7593 </result>
7594 <result name="VBOX_E_OBJECT_IN_USE">
7595 Medium attached to virtual machine.
7596 </result>
7597 <result name="VBOX_E_FILE_ERROR">
7598 Settings file not accessible.
7599 </result>
7600 <result name="VBOX_E_XML_ERROR">
7601 Could not parse the settings file.
7602 </result>
7603
7604 </desc>
7605 </method>
7606
7607 </interface>
7608
7609
7610 <!--
7611 // IHardDisk2
7612 /////////////////////////////////////////////////////////////////////////
7613 -->
7614
7615 <enum
7616 name="HardDiskType"
7617 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
7618 >
7619 <desc>
7620 Virtual hard disk type.
7621 <see>IHardDisk</see>
7622 </desc>
7623
7624 <const name="Normal" value="0">
7625 <desc>
7626 Normal hard disk (attached directly or indirectly, preserved
7627 when taking snapshots).
7628 </desc>
7629 </const>
7630 <const name="Immutable" value="1">
7631 <desc>
7632 Immutable hard disk (attached indirectly, changes are wiped out
7633 after powering off the virtual machine).
7634 </desc>
7635 </const>
7636 <const name="Writethrough" value="2">
7637 <desc>
7638 Write through hard disk (attached directly, ignored when
7639 taking snapshots).
7640 </desc>
7641 </const>
7642 </enum>
7643
7644 <interface
7645 name="IHardDisk2Attachment" extends="$unknown"
7646 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
7647 wsmap="struct"
7648 >
7649 <desc>
7650 The IHardDisk2Attachment interface represents a hard disk attachment of a
7651 virtual machine.
7652
7653 Every hard disk attachment specifies a slot of the virtual hard disk
7654 controller and a virtual hard disk attached to this slot.
7655
7656 The array of hard disk attachments is returned by
7657 <link to="IMachine::hardDisk2Attachments"/>.
7658
7659 <note>
7660 With the COM API, this is an interface like all the others. With the
7661 webservice, this is mapped to a structure, so querying the attribute
7662 will not return an object, but a complete structure.
7663 </note>
7664 </desc>
7665 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
7666 <desc>Hard disk object associated with this attachment.</desc>
7667 </attribute>
7668
7669 <attribute name="bus" type="StorageBus" readonly="yes">
7670 <desc>Interface bus of this attachment.</desc>
7671 </attribute>
7672
7673 <attribute name="channel" type="long" readonly="yes">
7674 <desc>Channel number of this attachment.</desc>
7675 </attribute>
7676
7677 <attribute name="device" type="long" readonly="yes">
7678 <desc>Device slot number of this attachment.</desc>
7679 </attribute>
7680
7681 </interface>
7682
7683 <interface
7684 name="IHardDisk2" extends="IMedium"
7685 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
7686 wsmap="managed"
7687 >
7688 <desc>
7689 The IHardDisk2 interface represents a virtual hard disk drive
7690 used by a virtual machine.
7691
7692 Virtual hard disk objects virtualize the hard disk hardware and look like
7693 regular hard disks for the guest OS running inside the virtual machine.
7694
7695 <h3>Hard Disk Types</h3>
7696
7697 There are three types of hard disks:
7698 <link to="HardDiskType_Normal">Normal</link>,
7699 <link to="HardDiskType_Immutable">Immutable</link> and
7700 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
7701 hard disk defines how the hard disk is attached to a virtual machine and
7702 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
7703 machine with the attached hard disk is taken. The type of the hard disk is
7704 defined by the <link to="#type"/> attribute.
7705
7706 All hard disks can be also divided in two big groups: <i>base</i> hard
7707 disks and <i>differencing</i> hard disks. A base hard disk contains all
7708 sectors of the hard disk data in its storage unit and therefore can be
7709 used independently. On the contrary, a differencing hard disk contains
7710 only some part of the hard disk data (a subset of sectors) and needs
7711 another hard disk to get access to the missing sectors of data. This
7712 another hard disk is called a <i>parent</i> hard disk and defines a hard
7713 disk to which this differencing hard disk is known to be <i>linked to</i>.
7714 The parent hard disk may be itself a differencing hard disk. This
7715 way, differencing hard disks form a linked hard disk chain. This chain
7716 always ends with the base hard disk which is sometimes referred to as the
7717 root hard disk of this chain. Note that several differencing hard disks
7718 may be linked to the same parent hard disk. This way, all known hard disks
7719 form a hard disk tree which is based on their parent-child relationship.
7720
7721 Differencing hard disks can be distinguished from base hard disks by
7722 querying the <link to="#parent"/> attribute: base hard disks do not have
7723 parents they would depend on, so the value of this attribute is always
7724 <tt>null</tt> for them. Using this attribute, it is possible to walk up
7725 the hard disk tree (from the child hard disk to its parent). It is also
7726 possible to walk down the tree using the <link to="#children"/>
7727 attribute.
7728
7729 Note that the type of all differencing hard disks is
7730 <link to="HardDiskType_Normal">Normal</link>; all other values are
7731 meaningless for them. Base hard disks may be of any type.
7732
7733 <h3>Creating Hard Disks</h3>
7734
7735 New base hard disks are created using
7736 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
7737 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
7738 disks are usually implicitly created by VirtualBox when needed but may
7739 also be created explicitly using <link to="#createDiffStorage()"/>.
7740
7741 After the hard disk is successfully created (including the storage unit)
7742 or opened, it becomes a known hard disk (remembered in the internal media
7743 registry). Known hard disks can be attached to a virtual machine, accessed
7744 through <link to="IVirtualBox::getHardDisk2()"/> and
7745 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
7746 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
7747
7748 The following methods, besides <link to="IMedium::close()"/>,
7749 automatically remove the hard disk from the media registry:
7750 <ul>
7751 <li><link to="#deleteStorage()"/></li>
7752 <li><link to="#mergeTo()"/></li>
7753 </ul>
7754
7755 If the storage unit of the hard disk is a regular file in the host's
7756 file system then the rules stated in the description of the
7757 <link to="IMedium::location"/> attribute apply when setting its value. In
7758 addition, a plain file name without any path may be given, in which case
7759 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
7760 folder</link> will be prepended to it.
7761
7762 <h4>Automatic composition of the file name part</h4>
7763
7764 Another extension to the <link to="IMedium::location"/> attribute is that
7765 there is a possibility to cause VirtualBox to compose a unique value for
7766 the file name part of the location using the UUID of the hard disk. This
7767 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
7768 e.g. before the storage unit is created, and works as follows. You set the
7769 value of the <link to="IMedium::location"/> attribute to a location
7770 specification which only contains the path specification but not the file
7771 name part and ends with either a forward slash or a backslash character.
7772 In response, VirtualBox will generate a new UUID for the hard disk and
7773 compose the file name using the following pattern:
7774 <pre>
7775 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
7776 </pre>
7777 where <tt>&lt;path&gt;</tt> is the supplied path specification,
7778 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
7779 is the default extension for the storage format of this hard disk. After
7780 that, you may call any of the methods that create a new hard disk storage
7781 unit and they will use the generated UUID and file name.
7782
7783 <h3>Attaching Hard Disks</h3>
7784
7785 Hard disks are attached to virtual machines using the
7786 <link to="IMachine::attachHardDisk2()"/> method and detached using the
7787 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
7788 <link to="#type"/>, hard disks are attached either
7789 <i>directly</i> or <i>indirectly</i>.
7790
7791 When a hard disk is being attached directly, it is associated with the
7792 virtual machine and used for hard disk operations when the machine is
7793 running. When a hard disk is being attached indirectly, a new differencing
7794 hard disk linked to it is implicitly created and this differencing hard
7795 disk is associated with the machine and used for hard disk operations.
7796 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
7797 a direct attachment then the same hard disk will be returned in response
7798 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
7799 an indirect attachment is performed then
7800 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
7801 differencing hard disk, not the original one passed to <link
7802 to="IMachine::attachHardDisk2()"/>. The following table shows the
7803 dependency of the attachment type on the hard disk type:
7804
7805 <table>
7806 <tr>
7807 <th>Hard Disk Type</th>
7808 <th>Direct or Indirect?</th>
7809 </tr>
7810 <tr>
7811 <td>Normal (Base)</td>
7812 <td>
7813 Normal base hard disks that do not have children (i.e. differencing
7814 hard disks linked to them) and that are not already attached to
7815 virtual machines in snapshots are attached <b>directly</b>.
7816 Otherwise, they are attached <b>indirectly</b> because having
7817 dependent children or being part of the snapshot makes it impossible
7818 to modify hard disk contents without breaking the integrity of the
7819 dependent party. The <link to="#readOnly"/> attribute allows to
7820 quickly determine the kind of the attachment for the given hard
7821 disk. Note that if a normal base hard disk is to be indirectly
7822 attached to a virtual machine with snapshots then a special
7823 procedure called <i>smart attachment</i> is performed (see below).
7824 </td>
7825 </tr>
7826 <tr>
7827 <td>Normal (Differencing)</td>
7828 <td>
7829 Differencing hard disks are like normal base hard disks: attached
7830 <b>directly</b> if they do not have children and are not attached to
7831 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
7832 that the smart attachment procedure is never performed for
7833 differencing hard disks.
7834 </td>
7835 </tr>
7836 <tr>
7837 <td>Immutable</td>
7838 <td>
7839 Immutable hard disks are always attached <b>indirectly</b> because
7840 they are designed to be non-writable. If an immutable hard disk is
7841 attached to a virtual machine with snapshots then a special
7842 procedure called smart attachment is performed (see below).
7843 </td>
7844 </tr>
7845 <tr>
7846 <td>Writethrough</td>
7847 <td>
7848 Writethrough hard disks are always attached <b>directly</b>, also as
7849 designed. This also means that writethrough hard disks cannot have
7850 other hard disks linked to them at all.
7851 </td>
7852 </tr>
7853 </table>
7854
7855 Note that the same hard disk, regardless of its type, may be attached to
7856 more than one virtual machine at a time. In this case, the machine that is
7857 started first gains exclusive access to the hard disk and attempts to
7858 start other machines having this hard disk attached will fail until the
7859 first machine is powered down.
7860
7861 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
7862 that the given hard disk remains associated with the given machine after a
7863 successful <link to="IMachine::detachHardDisk2()"/> call until
7864 <link to="IMachine::saveSettings()"/> is called to save all changes to
7865 machine settings to disk. This deferring is necessary to guarantee that
7866 the hard disk configuration may be restored at any time by a call to
7867 <link to="IMachine::discardSettings()"/> before the settings
7868 are saved (committed).
7869
7870 Note that if <link to="IMachine::discardSettings()"/> is called after
7871 indirectly attaching some hard disks to the machine but before a call to
7872 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
7873 all differencing hard disks implicitly created by
7874 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
7875 Such implicitly created hard disks will also be immediately deleted when
7876 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
7877 call if it is made before <link to="IMachine::saveSettings()"/>. This
7878 implicit deletion is safe because newly created differencing hard
7879 disks do not contain any user data.
7880
7881 However, keep in mind that detaching differencing hard disks that were
7882 implicitly created by <link to="IMachine::attachHardDisk2()"/>
7883 before the last <link to="IMachine::saveSettings()"/> call will
7884 <b>not</b> implicitly delete them as they may already contain some data
7885 (for example, as a result of virtual machine execution). If these hard
7886 disks are no more necessary, the caller can always delete them explicitly
7887 using <link to="#deleteStorage()"/> after they are actually de-associated
7888 from this machine by the <link to="IMachine::saveSettings()"/> call.
7889
7890 <h3>Smart Attachment</h3>
7891
7892 When normal base or immutable hard disks are indirectly attached to a
7893 virtual machine then some additional steps are performed to make sure the
7894 virtual machine will have the most recent "view" of the hard disk being
7895 attached. These steps include walking through the machine's snapshots
7896 starting from the current one and going through ancestors up to the first
7897 snapshot. Hard disks attached to the virtual machine in all
7898 of the encountered snapshots are checked whether they are descendants of
7899 the given normal base or immutable hard disk. The first found child (which
7900 is the differencing hard disk) will be used instead of the normal base or
7901 immutable hard disk as a parent for creating a new differencing hard disk
7902 that will be actually attached to the machine. And only if no descendants
7903 are found or if the virtual machine does not have any snapshots then the
7904 normal base or immutable hard disk will be used itself as a parent for
7905 this differencing hard disk.
7906
7907 It is easier to explain what smart attachment does using the
7908 following example:
7909 <pre>
7910BEFORE attaching B.vdi: AFTER attaching B.vdi:
7911
7912Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
7913 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
7914 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
7915 Snapshot 4 (none) Snapshot 4 (none)
7916 CurState (none) CurState (D3->D2.vdi)
7917
7918 NOT
7919 ...
7920 CurState (D3->B.vdi)
7921 </pre>
7922 The first column is the virtual machine configuration before the base hard
7923 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
7924 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
7925 mean that the hard disk that is actually attached to the machine is a
7926 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
7927 another hard disk, <tt>B.vdi</tt>.
7928
7929 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
7930 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
7931 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
7932 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
7933 it cannot be attached directly and needs an indirect attachment (i.e.
7934 implicit creation of a new differencing hard disk). Due to the smart
7935 attachment procedure, the new differencing hard disk
7936 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
7937 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
7938 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
7939 machine.
7940
7941 Note that if there is more than one descendant hard disk of the given base
7942 hard disk found in a snapshot, and there is an exact device, channel and
7943 bus match, then this exact match will be used. Otherwise, the youngest
7944 descendant will be picked up.
7945
7946 There is one more important aspect of the smart attachment procedure which
7947 is not related to snapshots at all. Before walking through the snapshots
7948 as described above, the backup copy of the current list of hard disk
7949 attachment is searched for descendants. This backup copy is created when
7950 the hard disk configuration is changed for the first time after the last
7951 <link to="IMachine::saveSettings()"/> call and used by
7952 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
7953 changes. When such a descendant is found in this backup copy, it will be
7954 simply re-attached back, without creating a new differencing hard disk for
7955 it. This optimization is necessary to make it possible to re-attach the
7956 base or immutable hard disk to a different bus, channel or device slot
7957 without losing the contents of the differencing hard disk actually
7958 attached to the machine in place of it.
7959 </desc>
7960
7961 <attribute name="format" type="wstring" readonly="yes">
7962 <desc>
7963 Storage format of this hard disk.
7964
7965 The value of this attribute is a string that specifies a backend used to
7966 store hard disk data. The storage format is defined when you create a
7967 new hard disk or automatically detected when you open an existing hard
7968 disk medium, and cannot be changed later.
7969
7970 The list of all storage formats supported by this VirtualBox
7971 installation can be obtained using
7972 <link to="ISystemProperties::hardDiskFormats"/>.
7973 </desc>
7974 </attribute>
7975
7976 <attribute name="type" type="HardDiskType">
7977 <desc>
7978 Type (role) of this hard disk.
7979
7980 The following constraints apply when changing the value of this
7981 attribute:
7982 <ul>
7983 <li>If a hard disk is attached to a virtual machine (either in the
7984 current state or in one of the snapshots), its type cannot be
7985 changed.
7986 </li>
7987 <li>As long as the hard disk has children, its type cannot be set
7988 to <link to="HardDiskType_Writethrough"/>.
7989 </li>
7990 <li>The type of all differencing hard disks is
7991 <link to="HardDiskType_Normal"/> and cannot be changed.
7992 </li>
7993 </ul>
7994
7995 The type of a newly created or opened hard disk is set to
7996 <link to="HardDiskType_Normal"/>.
7997 </desc>
7998 </attribute>
7999
8000 <attribute name="parent" type="IHardDisk2" readonly="yes">
8001 <desc>
8002 Parent of this hard disk (a hard disk this hard disk is directly based
8003 on).
8004
8005 Only differencing hard disks have parents. For base (non-differencing)
8006 hard disks, <tt>null</tt> is returned.
8007 </desc>
8008 </attribute>
8009
8010 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8011 <desc>
8012 Children of this hard disk (all differencing hard disks directly based
8013 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8014 does not have any children.
8015 </desc>
8016 </attribute>
8017
8018 <attribute name="root" type="IHardDisk2" readonly="yes">
8019 <desc>
8020 Root hard disk of this hard disk.
8021
8022 If this is a differencing hard disk, its root hard disk is the base hard
8023 disk the given hard disk branch starts from. For all other types of hard
8024 disks, this property returns the hard disk object itself (i.e. the same
8025 object this property is read on).
8026 </desc>
8027 </attribute>
8028
8029 <attribute name="readOnly" type="boolean" readonly="yes">
8030 <desc>
8031 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8032 otherwise.
8033
8034 A hard disk is considered to be read-only when its contents cannot be
8035 modified without breaking the integrity of other parties that depend on
8036 this hard disk such as its child hard disks or snapshots of virtual
8037 machines where this hard disk is attached to these machines. If there
8038 are no children and no such snapshots then there is no dependency and
8039 the hard disk is not read-only.
8040
8041 The value of this attribute can be used to determine the kind of the
8042 attachment that will take place when attaching this hard disk to a
8043 virtual machine. If the value is <tt>false</tt> then the hard disk will
8044 be attached directly. If the value is <tt>true</tt> then the hard disk
8045 will be attached indirectly by creating a new differencing child hard
8046 disk for that. See the interface description for more information.
8047
8048 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8049 disks are always read-only while all
8050 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8051 always not.
8052
8053 <note>
8054 The read-only condition represented by this attribute is related to
8055 the hard disk type and usage, not to the current
8056 <link to="IMedium::state">media state</link> and not to the read-only
8057 state of the storage unit.
8058 </note>
8059 </desc>
8060 </attribute>
8061
8062 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8063 <desc>
8064 Logical size of this hard disk (in megabytes), as reported to the
8065 guest OS running inside the virtual machine this disk is
8066 attached to. The logical size is defined when the hard disk is created
8067 and cannot be changed later.
8068
8069 <note>
8070 Reading this property on a differencing hard disk will return the size
8071 of its <link to="#root"/> hard disk.
8072 </note>
8073 <note>
8074 For hard disks whose state is <link to="#state"/> is <link
8075 to="MediaState_Inaccessible"/>, the value of this property is the
8076 last known logical size. For <link to="MediaState_NotCreated"/> hard
8077 disks, the returned value is zero.
8078 </note>
8079 </desc>
8080 </attribute>
8081
8082 <!-- storage methods -->
8083
8084 <method name="getProperty">
8085 <desc>
8086 Returns the value of the custom hard disk property with the given name.
8087
8088 The list of all properties supported by the given hard disk format can
8089 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8090
8091 Note that if this method returns a <tt>null</tt> @a value, the requested
8092 property is supported but currently not assigned any value.
8093
8094 <result name="VBOX_E_OBJECT_NOT_FOUND">
8095 Requested property does not exist (not supported by the format).
8096 </result>
8097 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8098 </desc>
8099 <param name="name" type="wstring" dir="in">
8100 <desc>Name of the property to get.</desc>
8101 </param>
8102 <param name="value" type="wstring" dir="return">
8103 <desc>Current property value.</desc>
8104 </param>
8105 </method>
8106
8107 <method name="setProperty">
8108 <desc>
8109 Sets the value of the custom hard disk property with the given name.
8110
8111 The list of all properties supported by the given hard disk format can
8112 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8113
8114 Note that setting the property value to <tt>null</tt> is equivalent to
8115 deleting the existing value. A default value (if it is defined for this
8116 property) will be used by the format backend in this case.
8117
8118 <result name="VBOX_E_OBJECT_NOT_FOUND">
8119 Requested property does not exist (not supported by the format).
8120 </result>
8121 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8122 </desc>
8123 <param name="name" type="wstring" dir="in">
8124 <desc>Name of the property to set.</desc>
8125 </param>
8126 <param name="value" type="wstring" dir="in">
8127 <desc>Property value to set.</desc>
8128 </param>
8129 </method>
8130
8131 <method name="getProperties">
8132 <desc>
8133 Returns values for a group of properties in one call.
8134
8135 The names of the properties to get are specified using the @a names
8136 argument which is a list of comma-separated property names or
8137 <tt>null</tt> if all properties are to be returned. Note that currently
8138 the value of this argument is ignored and the method always returns all
8139 existing properties.
8140
8141 The list of all properties supported by the given hard disk format can
8142 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8143
8144 The method returns two arrays, the array of property names corresponding
8145 to the @a names argument and the current values of these properties.
8146 Both arrays have the same number of elements with each elemend at the
8147 given index in the first array corresponds to an element at the same
8148 index in the second array.
8149
8150 Note that for properties that do not have assigned values,
8151 <tt>null</tt> is returned at the appropriate index in the @a
8152 returnValues array.
8153
8154 </desc>
8155 <param name="names" type="wstring" dir="in">
8156 <desc>
8157 Names of properties to get.
8158 </desc>
8159 </param>
8160 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8161 <desc>Names of returned properties.</desc>
8162 </param>
8163 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8164 <desc>Values of returned properties.</desc>
8165 </param>
8166 </method>
8167
8168 <method name="setProperties">
8169 <desc>
8170 Sets values for a group of properties in one call.
8171
8172 The names of the properties to set are passed in the @a names
8173 array along with the new values for them in the @a values array. Both
8174 arrays have the same number of elements with each elemend at the given
8175 index in the first array corresponding to an element at the same index
8176 in the second array.
8177
8178 If there is at least one property name in @a names that is not valid,
8179 the method will fail before changing the values of any other properties
8180 from the @a names array.
8181
8182 Using this method over <link to="#setProperty()"/> is preferred if you
8183 need to set several properties at once since it will result into less
8184 IPC calls.
8185
8186 The list of all properties supported by the given hard disk format can
8187 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8188
8189 Note that setting the property value to <tt>null</tt> is equivalent to
8190 deleting the existing value. A default value (if it is defined for this
8191 property) will be used by the format backend in this case.
8192 </desc>
8193 <param name="names" type="wstring" safearray="yes" dir="in">
8194 <desc>Names of properties to set.</desc>
8195 </param>
8196 <param name="values" type="wstring" safearray="yes" dir="in">
8197 <desc>Values of properties to set.</desc>
8198 </param>
8199 </method>
8200
8201 <!-- storage methods -->
8202
8203 <method name="createDynamicStorage">
8204 <desc>
8205 Starts creating a dynamically expanding hard disk storage unit in the
8206 background. The previous storage unit created for this object, if
8207 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8208 the operation will fail.
8209
8210 Before the operation starts, the hard disk is placed in
8211 <link to="MediaState_Creating"/> state. If the create operation
8212 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8213 state.
8214
8215 After the returned progress object reports that the operation has
8216 successfully completed, the media state will be set to <link
8217 to="MediaState_Created"/>, the hard disk will be remembered by this
8218 VirtualBox installation and may be attached to virtual machines.
8219
8220 <result name="VBOX_E_NOT_SUPPORTED">
8221 Dynamic storage creation operation is not supported. See <link
8222 to="IHardDiskFormat::capabilities"/>.
8223 </result>
8224 </desc>
8225 <param name="logicalSize" type="unsigned long long" dir="in">
8226 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8227 </param>
8228 <param name="progress" type="IProgress" dir="return">
8229 <desc>Progress object to track the operation completion.</desc>
8230 </param>
8231 </method>
8232
8233 <method name="createFixedStorage">
8234 <desc>
8235 Starts creating a fixed-size hard disk storage unit in the background.
8236 The previous storage unit created for this object, if
8237 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8238 the operation will fail.
8239
8240 Before the operation starts, the hard disk is placed to
8241 <link to="MediaState_Creating"/> state. If the create operation
8242 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8243 state.
8244
8245 After the returned progress object reports that the operation is
8246 successfully complete, the media state will be set to <link
8247 to="MediaState_Created"/>, the hard disk will be remembered by this
8248 VirtualBox installation and may be attached to virtual machines.
8249
8250 <result name="VBOX_E_NOT_SUPPORTED">
8251 Fixed storage creation operation is not supported. See
8252 <link to="IHardDiskFormat::capabilities"/>.
8253 </result>
8254 </desc>
8255 <param name="logicalSize" type="unsigned long long" dir="in">
8256 <desc>Logical size of the hard disk in megabytes.</desc>
8257 </param>
8258 <param name="progress" type="IProgress" dir="return">
8259 <desc>Progress object to track the operation completion.</desc>
8260 </param>
8261 </method>
8262
8263 <method name="deleteStorage">
8264 <desc>
8265 Starts deleting the storage unit of this hard disk.
8266
8267 The hard disk must not be attached to any known virtual machine and must
8268 not have any known child hard disks, otherwise the operation will fail.
8269 It will also fail if there is no storage unit to delete or if deletion
8270 is already in progress, or if the hard disk is being in use (locked for
8271 read or for write) or inaccessible. Therefore, the only valid state for
8272 this operation to succeed is <link to="MediaState_Created"/>.
8273
8274 Before the operation starts, the hard disk is placed to
8275 <link to="MediaState_Deleting"/> state and gets removed from the list
8276 of remembered hard disks (media registry). If the delete operation
8277 fails, the media will be remembered again and placed back to
8278 <link to="MediaState_Created"/> state.
8279
8280 After the returned progress object reports that the operation is
8281 complete, the media state will be set to
8282 <link to="MediaState_NotCreated"/> and you will be able to use one of
8283 the storage creation methods to create it again.
8284
8285 <see>#close()</see>
8286
8287 <result name="VBOX_E_OBJECT_IN_USE">
8288 Hard disk is attached to a virtual machine.
8289 </result>
8290 <result name="VBOX_E_NOT_SUPPORTED">
8291 Storage deletion is not allowed because neither of storage creation
8292 operations are supported. See
8293 <link to="IHardDiskFormat::capabilities"/>.
8294 </result>
8295
8296 <note>
8297 If the deletion operation fails, it is not guaranteed that the storage
8298 unit still exists. You may check the <link to="IMedium::state"/> value
8299 to answer this question.
8300 </note>
8301 </desc>
8302 <param name="progress" type="IProgress" dir="return">
8303 <desc>Progress object to track the operation completion.</desc>
8304 </param>
8305 </method>
8306
8307 <!-- diff methods -->
8308
8309 <method name="createDiffStorage">
8310 <desc>
8311 Starts creating an empty differencing storage unit based on this hard
8312 disk in the format and at the location defined by the @a target
8313 argument.
8314
8315 The target hard disk must be in <link to="MediaState_NotCreated"/>
8316 state (i.e. must not have an existing storage unit). Upon successful
8317 completion, this operation will set the type of the target hard disk to
8318 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8319 represent the differencing hard disk data in the given format (according
8320 to the storage format of the target object).
8321
8322 After the returned progress object reports that the operation is
8323 successfully complete, the target hard disk gets remembered by this
8324 VirtualBox installation and may be attached to virtual machines.
8325
8326 <note>
8327 The hard disk will be set to <link to="MediaState_LockedRead"/>
8328 state for the duration of this operation.
8329 </note>
8330 <result name="VBOX_E_OBJECT_IN_USE">
8331 Hard disk not in NotCreated state.
8332 </result>
8333 </desc>
8334 <param name="target" type="IHardDisk2" dir="in">
8335 <desc>Target hard disk.</desc>
8336 </param>
8337 <param name="progress" type="IProgress" dir="return">
8338 <desc>Progress object to track the operation completion.</desc>
8339 </param>
8340 </method>
8341
8342 <method name="mergeTo">
8343 <desc>
8344 Starts merging the contents of this hard disk and all intermediate
8345 differencing hard disks in the chain to the given target hard disk.
8346
8347 The target hard disk must be either a descendant of this hard disk or
8348 its ancestor (otherwise this method will immediately return a failure).
8349 It follows that there are two logical directions of the merge operation:
8350 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8351 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8352 chain:
8353
8354 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8355
8356 Here, calling this method on the <tt>Base</tt> hard disk object with
8357 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8358 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8359 merge. Note that in both cases the contents of the resulting hard disk
8360 will be the same, the only difference is the hard disk object that takes
8361 the result of the merge operation. In case of the forward merge in the
8362 above example, the result will be written to <tt>Diff_2</tt>; in case of
8363 the backward merge, the result will be written to <tt>Base</tt>. In
8364 other words, the result of the operation is always stored in the target
8365 hard disk.
8366
8367 Upon successful operation completion, the storage units of all hard
8368 disks in the chain between this (source) hard disk and the target hard
8369 disk, including the source hard disk itself, will be automatically
8370 deleted and the relevant hard disk objects (including this hard disk)
8371 will become uninitialized. This means that any attempt to call any of
8372 their methods or attributes will fail with the
8373 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8374 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8375 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8376 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8377 disk itself since it will no longer be based on any other hard disk.
8378
8379 Considering the above, all of the following conditions must be met in
8380 order for the merge operation to succeed:
8381 <ul>
8382 <li>
8383 Neither this (source) hard disk nor any intermediate
8384 differencing hard disk in the chain between it and the target
8385 hard disk is attached to any virtual machine.
8386 </li>
8387 <li>
8388 Neither the source hard disk nor the target hard disk is an
8389 <link to="HardDiskType_Immutable"/> hard disk.
8390 </li>
8391 <li>
8392 The part of the hard disk tree from the source hard disk to the
8393 target hard disk is a linear chain, i.e. all hard disks in this
8394 chain have exactly one child which is the next hard disk in this
8395 chain. The only exception from this rule is the target hard disk in
8396 the forward merge operation; it is allowed to have any number of
8397 child hard disks because the merge operation will hot change its
8398 logical contents (as it is seen by the guest OS or by children).
8399 </li>
8400 <li>
8401 None of the involved hard disks are in
8402 <link to="MediaState_LockedRead"/> or
8403 <link to="MediaState_LockedWrite"/> state.
8404 </li>
8405 </ul>
8406
8407 <note>
8408 This (source) hard disk and all intermediates will be placed to <link
8409 to="MediaState_Deleting"/> state and the target hard disk will be
8410 placed to <link to="MediaState_LockedWrite"/> state and for the
8411 duration of this operation.
8412 </note>
8413 </desc>
8414 <param name="targetId" type="uuid" dir="in">
8415 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8416 </param>
8417 <param name="progress" type="IProgress" dir="return">
8418 <desc>Progress object to track the operation completion.</desc>
8419 </param>
8420 </method>
8421
8422 <!-- clone methods -->
8423
8424 <method name="cloneTo">
8425 <desc>
8426 Starts creating a clone of this hard disk in the format and at the
8427 location defined by the @a target argument.
8428
8429 The target hard disk must be in <link to="MediaState_NotCreated"/>
8430 state (i.e. must not have an existing storage unit). Upon successful
8431 completion, the cloned hard disk will contain exactly the same sector
8432 data as the hard disk being cloned, except that a new UUID for the clone
8433 will be randomly generated.
8434
8435 After the returned progress object reports that the operation is
8436 successfully complete, the target hard disk gets remembered by this
8437 VirtualBox installation and may be attached to virtual machines.
8438
8439 <note>
8440 If the cloned hard disk is a differencing hard disk, it will inherit
8441 parent dependency of the original hard disk.
8442 </note>
8443 <note>
8444 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8445 state for the duration of this operation.
8446 </note>
8447 </desc>
8448 <param name="target" type="IHardDisk2" dir="in">
8449 <desc>Target hard disk.</desc>
8450 </param>
8451 <param name="progress" type="IProgress" dir="return">
8452 <desc>Progress object to track the operation completion.</desc>
8453 </param>
8454 </method>
8455
8456 <method name="flattenTo">
8457 <desc>
8458 Starts creating a deep (independent) clone of this hard disk in the
8459 format and at the location defined by the @a target argument.
8460
8461 This operation is similar to <link to="#cloneTo()"/> except that when
8462 applied to a differencing hard disk, it will also copy missing hard disk
8463 data from all parent hard disks it is linked to. This will make the
8464 created clone an independent base hard disk that contains all hard disk
8465 data and does not need any other hard disks to operate.
8466
8467 After the returned progress object reports that the operation is
8468 successfully complete, the target hard disk gets remembered by this
8469 VirtualBox installation and may be attached to virtual machines.
8470
8471 <note>
8472 For base hard disks, this operation is identical to
8473 <link to="#cloneTo()"/>.
8474 </note>
8475 <note>
8476 This hard disk and all its parent hard disks will be placed to <link
8477 to="MediaState_LockedRead"/> state for the duration of this
8478 operation.
8479 </note>
8480 </desc>
8481 <param name="target" type="IHardDisk2" dir="in">
8482 <desc>Target hard disk.</desc>
8483 </param>
8484 <param name="progress" type="IProgress" dir="return">
8485 <desc>Progress object to track the operation completion.</desc>
8486 </param>
8487 </method>
8488
8489 <method name="compact">
8490 <desc>
8491 Starts compacting of this hard disk. This means that the disk is
8492 transformed into a possibly more compact storage representation.
8493 This potentially creates temporary images, which can require a
8494 substantial amount of additional disk space.
8495
8496 After the returned progress object reports that the operation is
8497 successfully complete, the media state will be set back to the
8498 current state.
8499
8500 <note>
8501 This hard disk and all its parent hard disks will be placed to <link
8502 to="MediaState_LockedRead"/> state for the duration of this
8503 operation.
8504 </note>
8505 </desc>
8506 <param name="progress" type="IProgress" dir="return">
8507 <desc>Progress object to track the operation completion.</desc>
8508 </param>
8509 </method>
8510
8511 </interface>
8512
8513
8514 <!--
8515 // IHardDiskFormat
8516 /////////////////////////////////////////////////////////////////////////
8517 -->
8518
8519 <enum
8520 name="DataType"
8521 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
8522 >
8523 <const name="Int32" value="0"/>
8524 <const name="Int8" value="1"/>
8525 <const name="String" value="2"/>
8526 </enum>
8527
8528 <enum
8529 name="DataFlags"
8530 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
8531 >
8532 <const name="None" value="0x00"/>
8533 <const name="Mandatory" value="0x01"/>
8534 <const name="Expert" value="0x02"/>
8535 <const name="Array" value="0x04"/>
8536 <const name="FlagMask" value="0x07"/>
8537 </enum>
8538
8539 <enum
8540 name="HardDiskFormatCapabilities"
8541 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
8542 >
8543 <desc>
8544 Hard disk format capability flags.
8545 </desc>
8546
8547 <const name="Uuid" value="0x01">
8548 <desc>
8549 Supports UUIDs as expected by VirtualBox code.
8550 </desc>
8551 </const>
8552
8553 <const name="CreateFixed" value="0x02">
8554 <desc>
8555 Supports creating fixed size images, allocating all space instantly.
8556 </desc>
8557 </const>
8558
8559 <const name="CreateDynamic" value="0x04">
8560 <desc>
8561 Supports creating dynamically growing images, allocating space on
8562 demand.
8563 </desc>
8564 </const>
8565
8566 <const name="CreateSplit2G" value="0x08">
8567 <desc>
8568 Supports creating images split in chunks of a bit less than 2 GBytes.
8569 </desc>
8570 </const>
8571
8572 <const name="Differencing" value="0x10">
8573 <desc>
8574 Supports being used as a format for differencing hard disks (see <link
8575 to="IHardDisk2::createDiffStorage"/>).
8576 </desc>
8577 </const>
8578
8579 <const name="Asynchronous" value="0x20">
8580 <desc>
8581 Supports asynchronous I/O operations for at least some configurations.
8582 </desc>
8583 </const>
8584
8585 <const name="File" value="0x40">
8586 <desc>
8587 The format backend operates on files (the <link to="IMedium::location"/>
8588 attribute of the hard disk specifies a file used to store hard disk
8589 data; for a list of supported file extensions see
8590 <link to="IHardDiskFormat::fileExtensions"/>).
8591 </desc>
8592 </const>
8593
8594 <const name="Properties" value="0x80">
8595 <desc>
8596 The format backend uses the property interface to configure the storage
8597 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
8598 method is used to get access to properties supported by the given hard
8599 disk format).
8600 </desc>
8601 </const>
8602
8603 <const name="CapabilityMask" value="0xFF"/>
8604 </enum>
8605
8606 <interface
8607 name="IHardDiskFormat" extends="$unknown"
8608 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
8609 wsmap="managed"
8610 >
8611 <desc>
8612 The IHardDiskFormat interface represents a virtual hard disk format.
8613
8614 Each hard disk format has an associated backend which is used to handle
8615 hard disks stored in this format. This interface provides information
8616 about the properties of the associated backend.
8617
8618 Each hard disk format is identified by a string represented by the
8619 <link to="#id"/> attribute. This string is used in calls like
8620 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
8621 format.
8622
8623 The list of all supported hard disk formats can be obtained using
8624 <link to="ISystemProperties::hardDiskFormats"/>.
8625
8626 <see>IHardDisk2</see>
8627 </desc>
8628
8629 <attribute name="id" type="wstring" readonly="yes">
8630 <desc>
8631 Identifier of this format.
8632
8633 This string is used in methods of other interfaces where it is necessary
8634 to specify a hard disk format, such as
8635 <link to="IVirtualBox::createHardDisk2()"/>.
8636 </desc>
8637 </attribute>
8638
8639 <attribute name="name" type="wstring" readonly="yes">
8640 <desc>
8641 Human readable description of this format.
8642
8643 Mainly for use in file open dialogs.
8644 </desc>
8645 </attribute>
8646
8647 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
8648 <desc>
8649 Array of strings containing the supported file extensions.
8650
8651 The first extension in the array is the extension preferred by the
8652 backend. It is recommended to use this extension when specifying a
8653 location of the storage unit for a new hard disk.
8654
8655 Note that some backends do not work on files, so this array may be
8656 empty.
8657
8658 <see>IHardDiskFormat::capabilities</see>
8659 </desc>
8660 </attribute>
8661
8662 <attribute name="capabilities" type="unsigned long" readonly="yes">
8663 <desc>
8664 Capabilities of the format as a set of bit flags.
8665
8666 For the meaning of individual capability flags see
8667 <link to="HardDiskFormatCapabilities"/>.
8668 </desc>
8669 </attribute>
8670
8671 <method name="describeProperties">
8672 <desc>
8673 Returns several arrays describing the properties supported by this
8674 format.
8675
8676 An element with the given index in each array describes one
8677 property. Thus, the number of elements in each returned array is the
8678 same and corresponds to the number of supported properties.
8679
8680 The returned arrays are filled in only if the
8681 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
8682 All arguments must be non-NULL.
8683
8684 <see>DataType</see>
8685 <see>DataFlags</see>
8686 </desc>
8687
8688 <param name="names" type="wstring" safearray="yes" dir="out">
8689 <desc>Array of property names.</desc>
8690 </param>
8691 <param name="description" type="wstring" safearray="yes" dir="out">
8692 <desc>Array of property descriptions.</desc>
8693 </param>
8694 <param name="types" type="DataType" safearray="yes" dir="out">
8695 <desc>Array of property types.</desc>
8696 </param>
8697 <param name="flags" type="unsigned long" safearray="yes" dir="out">
8698 <desc>Array of property flags.</desc>
8699 </param>
8700 <param name="defaults" type="wstring" safearray="yes" dir="out">
8701 <desc>Array of default property values.</desc>
8702 </param>
8703 </method>
8704
8705 </interface>
8706
8707
8708 <!--
8709 // IFloppyImage2
8710 /////////////////////////////////////////////////////////////////////////
8711 -->
8712
8713 <interface
8714 name="IFloppyImage2" extends="IMedium"
8715 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
8716 wsmap="managed"
8717 >
8718 <desc>
8719 The IFloppyImage2 interface represents a medium containing the image
8720 of a floppy disk.
8721 </desc>
8722
8723 </interface>
8724
8725
8726 <!--
8727 // IDVDImage2
8728 /////////////////////////////////////////////////////////////////////////
8729 -->
8730
8731 <interface
8732 name="IDVDImage2" extends="IMedium"
8733 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
8734 wsmap="managed"
8735 >
8736 <desc>
8737 The IDVDImage2 interface represents a medium containing the image
8738 of a CD or DVD disk in the ISO format.
8739 </desc>
8740
8741 </interface>
8742
8743
8744 <!--
8745 // IDVDDrive
8746 /////////////////////////////////////////////////////////////////////////
8747 -->
8748
8749 <interface
8750 name="IDVDDrive" extends="$unknown"
8751 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
8752 wsmap="managed"
8753 >
8754 <desc>
8755 The IDVDDrive interface represents the virtual CD/DVD drive of the
8756 virtual machine. An object of this type is returned by
8757 <link to="IMachine::DVDDrive"/>.
8758 </desc>
8759
8760 <attribute name="state" type="DriveState" readonly="yes">
8761 <desc>Current drive state.</desc>
8762 </attribute>
8763
8764 <attribute name="passthrough" type="boolean">
8765 <desc>
8766 When a host drive is mounted and passthrough is enabled
8767 the guest OS will be able to directly send SCSI commands to
8768 the host drive. This enables the guest OS to use CD/DVD writers
8769 but is potentially dangerous.
8770 </desc>
8771 </attribute>
8772
8773 <method name="mountImage">
8774 <desc>Mounts a CD/DVD image with the specified UUID.
8775
8776 <result name="VBOX_E_FILE_ERROR">
8777 Invalid image file location.
8778 </result>
8779 <result name="VBOX_E_OBJECT_NOT_FOUND">
8780 Could not find a CD/DVD image matching @a imageID.
8781 </result>
8782 <result name="VBOX_E_INVALID_OBJECT_STATE">
8783 Invalid media state.
8784 </result>
8785
8786 </desc>
8787 <param name="imageId" type="uuid" dir="in"/>
8788 </method>
8789
8790 <method name="captureHostDrive">
8791 <desc>Captures the specified host CD/DVD drive.</desc>
8792 <param name="drive" type="IHostDVDDrive" dir="in"/>
8793 </method>
8794
8795 <method name="unmount">
8796 <desc>Unmounts the currently mounted image or host drive.</desc>
8797 </method>
8798
8799 <method name="getImage">
8800 <desc>Returns the currently mounted CD/DVD image.</desc>
8801 <param name="image" type="IDVDImage2" dir="return"/>
8802 </method>
8803
8804 <method name="getHostDrive">
8805 <desc>Returns the currently mounted host CD/DVD drive.</desc>
8806 <param name="drive" type="IHostDVDDrive" dir="return"/>
8807 </method>
8808
8809 </interface>
8810
8811
8812 <!--
8813 // IFloppyDrive
8814 /////////////////////////////////////////////////////////////////////////
8815 -->
8816
8817 <interface
8818 name="IFloppyDrive" extends="$unknown"
8819 uuid="159412cd-bab8-452e-8097-218a020825a6"
8820 wsmap="managed"
8821 >
8822 <desc>
8823 The IFloppyDrive interface represents the virtual floppy drive of the
8824 virtual machine. An object of this type is returned by
8825 <link to="IMachine::floppyDrive" />.
8826 </desc>
8827
8828 <attribute name="enabled" type="boolean">
8829 <desc>
8830 Flag whether the floppy drive is enabled. If it is disabled,
8831 the floppy drive will not be reported to the guest OS.
8832 </desc>
8833 </attribute>
8834
8835 <attribute name="state" type="DriveState" readonly="yes">
8836 <desc>Current drive state.</desc>
8837 </attribute>
8838
8839 <method name="mountImage">
8840 <desc>Mounts a floppy image with the specified UUID.
8841
8842 <result name="VBOX_E_FILE_ERROR">
8843 Invalid image file location.
8844 </result>
8845 <result name="VBOX_E_OBJECT_NOT_FOUND">
8846 Could not find a floppy image matching @a imageID.
8847 </result>
8848 <result name="VBOX_E_INVALID_OBJECT_STATE">
8849 Invalid media state.
8850 </result>
8851
8852 </desc>
8853 <param name="imageId" type="uuid" dir="in"/>
8854 </method>
8855
8856 <method name="captureHostDrive">
8857 <desc>Captures the specified host floppy drive.</desc>
8858 <param name="drive" type="IHostFloppyDrive" dir="in"/>
8859 </method>
8860
8861 <method name="unmount">
8862 <desc>Unmounts the currently mounted image or host drive.</desc>
8863 </method>
8864
8865 <method name="getImage">
8866 <desc>Returns the currently mounted floppy image.</desc>
8867 <param name="image" type="IFloppyImage2" dir="return"/>
8868 </method>
8869
8870 <method name="getHostDrive">
8871 <desc>Returns the currently mounted host floppy drive.</desc>
8872 <param name="drive" type="IHostFloppyDrive" dir="return"/>
8873 </method>
8874
8875 </interface>
8876
8877
8878 <!--
8879 // IKeyboard
8880 /////////////////////////////////////////////////////////////////////////
8881 -->
8882
8883 <interface
8884 name="IKeyboard" extends="$unknown"
8885 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
8886 wsmap="managed"
8887 >
8888 <desc>
8889 The IKeyboard interface represents the virtual machine's keyboard. Used
8890 in <link to="IConsole::keyboard"/>.
8891
8892 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
8893 to the virtual machine.
8894
8895 </desc>
8896 <method name="putScancode">
8897 <desc>Sends a scancode to the keyboard.
8898
8899 <result name="VBOX_E_IPRT_ERROR">
8900 Could not send scan code to virtual keyboard.
8901 </result>
8902
8903 </desc>
8904 <param name="scancode" type="long" dir="in"/>
8905 </method>
8906
8907 <method name="putScancodes">
8908 <desc>Sends an array of scancodes to the keyboard.
8909
8910 <result name="VBOX_E_IPRT_ERROR">
8911 Could not send all scan codes to virtual keyboard.
8912 </result>
8913
8914 </desc>
8915 <param name="scancodes" type="long" dir="in" safearray="yes"/>
8916 <param name="codesStored" type="unsigned long" dir="return"/>
8917 </method>
8918
8919 <method name="putCAD">
8920 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
8921 function is nothing special, it is just a convenience function
8922 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
8923
8924 <result name="VBOX_E_IPRT_ERROR">
8925 Could not send all scan codes to virtual keyboard.
8926 </result>
8927
8928 </desc>
8929 </method>
8930
8931 </interface>
8932
8933
8934 <!--
8935 // IMouse
8936 /////////////////////////////////////////////////////////////////////////
8937 -->
8938
8939 <enum
8940 name="MouseButtonState"
8941 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
8942 >
8943 <desc>
8944 Mouse button state.
8945 </desc>
8946
8947 <const name="LeftButton" value="0x01"/>
8948 <const name="RightButton" value="0x02"/>
8949 <const name="MiddleButton" value="0x04"/>
8950 <const name="WheelUp" value="0x08"/>
8951 <const name="WheelDown" value="0x10"/>
8952 <const name="MouseStateMask" value="0x1F"/>
8953 </enum>
8954
8955 <interface
8956 name="IMouse" extends="$unknown"
8957 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
8958 wsmap="managed"
8959 >
8960 <desc>
8961 The IMouse interface represents the virtual machine's mouse. Used in
8962 <link to="IConsole::mouse"/>.
8963
8964 Through this interface, the virtual machine's virtual mouse can be
8965 controlled.
8966 </desc>
8967
8968 <attribute name="absoluteSupported" type="boolean" readonly="yes">
8969 <desc>
8970 Whether the guest OS supports absolute mouse pointer positioning
8971 or not.
8972 <note>
8973 VirtualBox Guest Tools need to be installed to the guest OS
8974 in order to enable absolute mouse positioning support.
8975 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
8976 callback to be instantly informed about changes of this attribute
8977 during virtual machine execution.
8978 </note>
8979 <see><link to="#putMouseEventAbsolute"/></see>
8980 </desc>
8981 </attribute>
8982
8983 <method name="putMouseEvent">
8984 <desc>
8985 Initiates a mouse event using relative pointer movements
8986 along x and y axis.
8987
8988 <result name="E_ACCESSDENIED">
8989 Console not powered up.
8990 </result>
8991 <result name="VBOX_E_IPRT_ERROR">
8992 Could not send mouse event to virtual mouse.
8993 </result>
8994
8995 </desc>
8996
8997 <param name="dx" type="long" dir="in">
8998 <desc>
8999 Amount of pixels the mouse should move to the right.
9000 Negative values move the mouse to the left.
9001 </desc>
9002 </param>
9003 <param name="dy" type="long" dir="in">
9004 <desc>
9005 Amount of pixels the mouse should move downwards.
9006 Negative values move the mouse upwards.
9007 </desc>
9008 </param>
9009 <param name="dz" type="long" dir="in">
9010 <desc>
9011 Amount of mouse wheel moves.
9012 Positive values describe clockwise wheel rotations,
9013 negative values describe counterclockwise rotations.
9014 </desc>
9015 </param>
9016 <param name="buttonState" type="long" dir="in">
9017 <desc>
9018 The current state of mouse buttons. Every bit represents
9019 a mouse button as follows:
9020 <table>
9021 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9022 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9023 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9024 </table>
9025 A value of <tt>1</tt> means the corresponding button is pressed.
9026 otherwise it is released.
9027 </desc>
9028 </param>
9029 </method>
9030
9031 <method name="putMouseEventAbsolute">
9032 <desc>
9033 Positions the mouse pointer using absolute x and y coordinates.
9034 These coordinates are expressed in pixels and
9035 start from <tt>[1,1]</tt> which corresponds to the top left
9036 corner of the virtual display.
9037
9038 <result name="E_ACCESSDENIED">
9039 Console not powered up.
9040 </result>
9041 <result name="VBOX_E_IPRT_ERROR">
9042 Could not send mouse event to virtual mouse.
9043 </result>
9044
9045 <note>
9046 This method will have effect only if absolute mouse
9047 positioning is supported by the guest OS.
9048 </note>
9049
9050 <see><link to="#absoluteSupported"/></see>
9051 </desc>
9052
9053 <param name="x" type="long" dir="in">
9054 <desc>
9055 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9056 </desc>
9057 </param>
9058 <param name="y" type="long" dir="in">
9059 <desc>
9060 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9061 </desc>
9062 </param>
9063 <param name="dz" type="long" dir="in">
9064 <desc>
9065 Amount of mouse wheel moves.
9066 Positive values describe clockwise wheel rotations,
9067 negative values describe counterclockwise rotations.
9068 </desc>
9069 </param>
9070 <param name="buttonState" type="long" dir="in">
9071 <desc>
9072 The current state of mouse buttons. Every bit represents
9073 a mouse button as follows:
9074 <table>
9075 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9076 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9077 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9078 </table>
9079 A value of <tt>1</tt> means the corresponding button is pressed.
9080 otherwise it is released.
9081 </desc>
9082 </param>
9083 </method>
9084
9085 </interface>
9086
9087 <!--
9088 // IDisplay
9089 /////////////////////////////////////////////////////////////////////////
9090 -->
9091
9092 <enum
9093 name="FramebufferAccelerationOperation"
9094 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9095 >
9096 <desc>
9097 Frame buffer acceleration operation.
9098 </desc>
9099
9100 <const name="SolidFillAcceleration" value="1"/>
9101 <const name="ScreenCopyAcceleration" value="2"/>
9102 </enum>
9103
9104 <enum
9105 name="FramebufferPixelFormat"
9106 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
9107 >
9108 <desc>
9109 Format of the video memory buffer. Constants represented by this enum can
9110 be used to test for particular values of <link
9111 to="IFramebuffer::pixelFormat"/>. See also <link
9112 to="IFramebuffer::requestResize()"/>.
9113
9114 See also www.fourcc.org for more information about FOURCC pixel formats.
9115 </desc>
9116
9117 <const name="Opaque" value="0xFFFFFFFF">
9118 <desc>
9119 Unknown buffer format (the user may not assume any particular format of
9120 the buffer).
9121 </desc>
9122 </const>
9123 <const name="FOURCC_RGB" value="0x32424752">
9124 <desc>
9125 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9126 bit layout).
9127 </desc>
9128 </const>
9129 </enum>
9130
9131 <interface
9132 name="IFramebuffer" extends="$unknown"
9133 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9134 wsmap="suppress"
9135 >
9136 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9137 <desc>Address of the start byte of the frame buffer.</desc>
9138 </attribute>
9139
9140 <attribute name="width" type="unsigned long" readonly="yes">
9141 <desc>Frame buffer width, in pixels.</desc>
9142 </attribute>
9143
9144 <attribute name="height" type="unsigned long" readonly="yes">
9145 <desc>Frame buffer height, in pixels.</desc>
9146 </attribute>
9147
9148 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9149 <desc>
9150 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9151 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9152 are: 8, 15, 16, 24 and 32.
9153 </desc>
9154 </attribute>
9155
9156 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9157 <desc>
9158 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9159 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9160 size of the scan line must be aligned to 32 bits.
9161 </desc>
9162 </attribute>
9163
9164 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9165 <desc>
9166 Frame buffer pixel format. It's either one of the values defined by <link
9167 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9168 <note>
9169 This attribute must never return <link
9170 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9171 <link to="#address"/> points to must be always known.
9172 </note>
9173 </desc>
9174 </attribute>
9175
9176 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9177 <desc>
9178 Defines whether this frame buffer uses the virtual video card's memory
9179 buffer (guest VRAM) directly or not. See <link
9180 to="IFramebuffer::requestResize()"/> for more information.
9181 </desc>
9182 </attribute>
9183
9184 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9185 <desc>
9186 Hint from the frame buffer about how much of the standard
9187 screen height it wants to use for itself. This information is
9188 exposed to the guest through the VESA BIOS and VMMDev interface
9189 so that it can use it for determining its video mode table. It
9190 is not guaranteed that the guest respects the value.
9191 </desc>
9192 </attribute>
9193
9194 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9195 <desc>
9196 An alpha-blended overlay which is superposed over the frame buffer.
9197 The initial purpose is to allow the display of icons providing
9198 information about the VM state, including disk activity, in front
9199 ends which do not have other means of doing that. The overlay is
9200 designed to controlled exclusively by IDisplay. It has no locking
9201 of its own, and any changes made to it are not guaranteed to be
9202 visible until the affected portion of IFramebuffer is updated. The
9203 overlay can be created lazily the first time it is requested. This
9204 attribute can also return NULL to signal that the overlay is not
9205 implemented.
9206 </desc>
9207 </attribute>
9208
9209 <attribute name="winId" type="unsigned long long" readonly="yes">
9210 <desc>
9211 Platform-dependent identifier of the window where context of this
9212 frame buffer is drawn, or zero if there's no such window.
9213 </desc>
9214 </attribute>
9215
9216 <method name="lock">
9217 <desc>
9218 Locks the frame buffer.
9219 Gets called by the IDisplay object where this frame buffer is
9220 bound to.
9221 </desc>
9222 </method>
9223
9224 <method name="unlock">
9225 <desc>
9226 Unlocks the frame buffer.
9227 Gets called by the IDisplay object where this frame buffer is
9228 bound to.
9229 </desc>
9230 </method>
9231
9232 <method name="notifyUpdate">
9233 <desc>
9234 Informs about an update.
9235 Gets called by the display object where this buffer is
9236 registered.
9237 </desc>
9238 <param name="x" type="unsigned long" dir="in"/>
9239 <param name="y" type="unsigned long" dir="in"/>
9240 <param name="width" type="unsigned long" dir="in"/>
9241 <param name="height" type="unsigned long" dir="in"/>
9242 <param name="finished" type="boolean" dir="return"/>
9243 </method>
9244
9245 <method name="requestResize">
9246 <desc>
9247 Requests a size and pixel format change.
9248
9249 There are two modes of working with the video buffer of the virtual
9250 machine. The <i>indirect</i> mode implies that the IFramebuffer
9251 implementation allocates a memory buffer for the requested display mode
9252 and provides it to the virtual machine. In <i>direct</i> mode, the
9253 IFramebuffer implementation uses the memory buffer allocated and owned
9254 by the virtual machine. This buffer represents the video memory of the
9255 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9256 usually faster because the implementation gets a raw pointer to the
9257 guest VRAM buffer which it can directly use for visualizing the contents
9258 of the virtual display, as opposed to the indirect mode where the
9259 contents of guest VRAM are copied to the memory buffer provided by
9260 the implementation every time a display update occurs.
9261
9262 It is important to note that the direct mode is really fast only when
9263 the implementation uses the given guest VRAM buffer directly, for
9264 example, by blitting it to the window representing the virtual machine's
9265 display, which saves at least one copy operation comparing to the
9266 indirect mode. However, using the guest VRAM buffer directly is not
9267 always possible: the format and the color depth of this buffer may be
9268 not supported by the target window, or it may be unknown (opaque) as in
9269 case of text or non-linear multi-plane VGA video modes. In this case,
9270 the indirect mode (that is always available) should be used as a
9271 fallback: when the guest VRAM contents are copied to the
9272 implementation-provided memory buffer, color and format conversion is
9273 done automatically by the underlying code.
9274
9275 The @a pixelFormat parameter defines whether the direct mode is
9276 available or not. If @a pixelFormat is <link
9277 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9278 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9279 bytesPerLine parameters must be ignored and the implementation must use
9280 the indirect mode (where it provides its own buffer in one of the
9281 supported formats). In all other cases, @a pixelFormat together with @a
9282 bitsPerPixel and @a bytesPerLine define the format of the video memory
9283 buffer pointed to by the @a VRAM parameter and the implementation is
9284 free to choose which mode to use. To indicate that this frame buffer uses
9285 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9286 attribute must return <tt>true</tt> and <link to="#address"/> must
9287 return exactly the same address that is passed in the @a VRAM parameter
9288 of this method; otherwise it is assumed that the indirect strategy is
9289 chosen.
9290
9291 The @a width and @a height parameters represent the size of the
9292 requested display mode in both modes. In case of indirect mode, the
9293 provided memory buffer should be big enough to store data of the given
9294 display mode. In case of direct mode, it is guaranteed that the given @a
9295 VRAM buffer contains enough space to represent the display mode of the
9296 given size. Note that this frame buffer's <link to="#width"/> and <link
9297 to="#height"/> attributes must return exactly the same values as
9298 passed to this method after the resize is completed (see below).
9299
9300 The @a finished output parameter determines if the implementation has
9301 finished resizing the frame buffer or not. If, for some reason, the
9302 resize cannot be finished immediately during this call, @a finished
9303 must be set to @c false, and the implementation must call
9304 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9305 this method as soon as possible. If @a finished is @c false, the
9306 machine will not call any frame buffer methods until
9307 <link to="IDisplay::resizeCompleted()"/> is called.
9308
9309 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9310 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9311 this frame buffer must return exactly the same values as specified in the
9312 parameters of this method, after the resize is completed. If the
9313 indirect mode is chosen, these attributes must return values describing
9314 the format of the implementation's own memory buffer <link
9315 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9316 value must always correlate with <link to="#pixelFormat"/>. Note that
9317 the <link to="#pixelFormat"/> attribute must never return <link
9318 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9319
9320 <note>
9321 This method is called by the IDisplay object under the
9322 <link to="#lock()"/> provided by this IFramebuffer
9323 implementation. If this method returns @c false in @a finished, then
9324 this lock is not released until
9325 <link to="IDisplay::resizeCompleted()"/> is called.
9326 </note>
9327 </desc>
9328 <param name="screenId" type="unsigned long" dir="in">
9329 <desc>
9330 Logical screen number. Must be used in the corresponding call to
9331 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9332 </desc>
9333 </param>
9334 <param name="pixelFormat" type="unsigned long" dir="in">
9335 <desc>
9336 Pixel format of the memory buffer pointed to by @a VRAM.
9337 See also <link to="FramebufferPixelFormat"/>.
9338 </desc>
9339 </param>
9340 <param name="VRAM" type="octet" mod="ptr" dir="in">
9341 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9342 </param>
9343 <param name="bitsPerPixel" type="unsigned long" dir="in">
9344 <desc>Color depth, bits per pixel.</desc>
9345 </param>
9346 <param name="bytesPerLine" type="unsigned long" dir="in">
9347 <desc>Size of one scan line, in bytes.</desc>
9348 </param>
9349 <param name="width" type="unsigned long" dir="in">
9350 <desc>Width of the guest display, in pixels.</desc>
9351 </param>
9352 <param name="height" type="unsigned long" dir="in">
9353 <desc>Height of the guest display, in pixels.</desc>
9354 </param>
9355 <param name="finished" type="boolean" dir="return">
9356 <desc>
9357 Can the VM start using the new frame buffer immediately
9358 after this method returns or it should wait for
9359 <link to="IDisplay::resizeCompleted()"/>.
9360 </desc>
9361 </param>
9362 </method>
9363
9364 <method name="operationSupported">
9365 <desc>
9366 Returns whether the given acceleration operation is supported
9367 by the IFramebuffer implementation. If not, the display object
9368 will not attempt to call the corresponding IFramebuffer entry
9369 point. Even if an operation is indicated as supported, the
9370 IFramebuffer implementation always has the option to return non
9371 supported from the corresponding acceleration method in which
9372 case the operation will be performed by the display engine. This
9373 allows for reduced IFramebuffer implementation complexity where
9374 only common cases are handled.
9375 </desc>
9376 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9377 <param name="supported" type="boolean" dir="return"/>
9378 </method>
9379
9380 <method name="videoModeSupported">
9381 <desc>
9382 Returns whether the frame buffer implementation is willing to
9383 support a given video mode. In case it is not able to render
9384 the video mode (or for some reason not willing), it should
9385 return false. Usually this method is called when the guest
9386 asks the VMM device whether a given video mode is supported
9387 so the information returned is directly exposed to the guest.
9388 It is important that this method returns very quickly.
9389 </desc>
9390 <param name="width" type="unsigned long" dir="in"/>
9391 <param name="height" type="unsigned long" dir="in"/>
9392 <param name="bpp" type="unsigned long" dir="in"/>
9393 <param name="supported" type="boolean" dir="return"/>
9394 </method>
9395
9396 <method name="solidFill">
9397 <desc>
9398 Fills the specified rectangle on screen with a solid color.
9399 </desc>
9400 <param name="x" type="unsigned long" dir="in"/>
9401 <param name="y" type="unsigned long" dir="in"/>
9402 <param name="width" type="unsigned long" dir="in"/>
9403 <param name="height" type="unsigned long" dir="in"/>
9404 <param name="color" type="unsigned long" dir="in"/>
9405 <param name="handled" type="boolean" dir="return"/>
9406 </method>
9407
9408 <method name="copyScreenBits">
9409 <desc>
9410 Copies specified rectangle on the screen.
9411 </desc>
9412 <param name="xDst" type="unsigned long" dir="in"/>
9413 <param name="yDst" type="unsigned long" dir="in"/>
9414 <param name="xSrc" type="unsigned long" dir="in"/>
9415 <param name="ySrc" type="unsigned long" dir="in"/>
9416 <param name="width" type="unsigned long" dir="in"/>
9417 <param name="height" type="unsigned long" dir="in"/>
9418 <param name="handled" type="boolean" dir="return"/>
9419 </method>
9420
9421 <method name="getVisibleRegion">
9422 <desc>
9423 Returns the visible region of this frame buffer.
9424
9425 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9426 @a count parameter is ignored and the number of elements necessary to
9427 describe the current visible region is returned in @a countCopied.
9428
9429 If @a rectangles is not <tt>NULL</tt> but @a count is less
9430 than the required number of elements to store region data, the method
9431 will report a failure. If @a count is equal or greater than the
9432 required number of elements, then the actual number of elements copied
9433 to the provided array will be returned in @a countCopied.
9434
9435 <note>
9436 The address of the provided array must be in the process space of
9437 this IFramebuffer object.
9438 </note>
9439 <note>
9440 Method not yet implemented.
9441 </note>
9442 </desc>
9443 <param name="rectangles" type="octet" mod="ptr" dir="in">
9444 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9445 </param>
9446 <param name="count" type="unsigned long" dir="in">
9447 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9448 </param>
9449 <param name="countCopied" type="unsigned long" dir="return">
9450 <desc>Number of elements copied to the @a rectangles array.</desc>
9451 </param>
9452 </method>
9453
9454 <method name="setVisibleRegion">
9455 <desc>
9456 Suggests a new visible region to this frame buffer. This region
9457 represents the area of the VM display which is a union of regions of
9458 all top-level windows of the guest operating system running inside the
9459 VM (if the Guest Additions for this system support this
9460 functionality). This information may be used by the frontends to
9461 implement the seamless desktop integration feature.
9462
9463 <note>
9464 The address of the provided array must be in the process space of
9465 this IFramebuffer object.
9466 </note>
9467 <note>
9468 The IFramebuffer implementation must make a copy of the provided
9469 array of rectangles.
9470 </note>
9471 <note>
9472 Method not yet implemented.
9473 </note>
9474 </desc>
9475 <param name="rectangles" type="octet" mod="ptr" dir="in">
9476 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9477 </param>
9478 <param name="count" type="unsigned long" dir="in">
9479 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9480 </param>
9481 </method>
9482
9483 </interface>
9484
9485 <interface
9486 name="IFramebufferOverlay" extends="IFrameBuffer"
9487 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9488 wsmap="suppress"
9489 >
9490 <desc>
9491 The IFramebufferOverlay interface represents an alpha blended overlay
9492 for displaying status icons above an IFramebuffer. It is always created
9493 not visible, so that it must be explicitly shown. It only covers a
9494 portion of the IFramebuffer, determined by its width, height and
9495 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9496 that order) format, and may be written to directly. Do re-read the
9497 width though, after setting it, as it may be adjusted (increased) to
9498 make it more suitable for the front end.
9499 </desc>
9500 <attribute name="x" type="unsigned long" readonly="yes">
9501 <desc>X position of the overlay, relative to the frame buffer.</desc>
9502 </attribute>
9503
9504 <attribute name="y" type="unsigned long" readonly="yes">
9505 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9506 </attribute>
9507
9508 <attribute name="visible" type="boolean" readonly="no">
9509 <desc>
9510 Whether the overlay is currently visible.
9511 </desc>
9512 </attribute>
9513
9514 <attribute name="alpha" type="unsigned long" readonly="no">
9515 <desc>
9516 The global alpha value for the overlay. This may or may not be
9517 supported by a given front end.
9518 </desc>
9519 </attribute>
9520
9521 <method name="move">
9522 <desc>
9523 Changes the overlay's position relative to the IFramebuffer.
9524 </desc>
9525 <param name="x" type="unsigned long" dir="in"/>
9526 <param name="y" type="unsigned long" dir="in"/>
9527 </method>
9528
9529 </interface>
9530
9531 <interface
9532 name="IDisplay" extends="$unknown"
9533 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
9534 wsmap="suppress"
9535 >
9536 <desc>
9537 The IDisplay interface represents the virtual machine's display.
9538
9539 The object implementing this interface is contained in each
9540 <link to="IConsole::display"/> attribute and represents the visual
9541 output of the virtual machine.
9542
9543 The virtual display supports pluggable output targets represented by the
9544 IFramebuffer interface. Examples of the output target are a window on
9545 the host computer or an RDP session's display on a remote computer.
9546 </desc>
9547 <attribute name="width" type="unsigned long" readonly="yes">
9548 <desc>Current display width.</desc>
9549 </attribute>
9550
9551 <attribute name="height" type="unsigned long" readonly="yes">
9552 <desc>Current display height.</desc>
9553 </attribute>
9554
9555 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9556 <desc>
9557 Current guest display color depth. Note that this may differ
9558 from <link to="IFramebuffer::bitsPerPixel"/>.
9559 </desc>
9560 </attribute>
9561
9562 <method name="setupInternalFramebuffer">
9563 <desc>
9564 Prepares an internally managed frame buffer.
9565 </desc>
9566 <param name="depth" type="unsigned long" dir="in"/>
9567 </method>
9568
9569 <method name="lockFramebuffer">
9570 <desc>
9571 Requests access to the internal frame buffer.
9572
9573 <result name="VBOX_E_NOT_SUPPORTED">
9574 Attempt to lock a non-internal frame buffer.
9575 </result>
9576
9577 </desc>
9578 <param name="address" type="octet" mod="ptr" dir="return"/>
9579 </method>
9580
9581 <method name="unlockFramebuffer">
9582 <desc>
9583 Releases access to the internal frame buffer.
9584
9585 <result name="VBOX_E_NOT_SUPPORTED">
9586 Attempt to unlock a non-internal frame buffer.
9587 </result>
9588
9589 </desc>
9590 </method>
9591
9592 <method name="registerExternalFramebuffer">
9593 <desc>
9594 Registers an external frame buffer.
9595 </desc>
9596 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9597 </method>
9598
9599 <method name="setFramebuffer">
9600 <desc>
9601 Sets the framebuffer for given screen.
9602 </desc>
9603 <param name="screenId" type="unsigned long" dir="in"/>
9604 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9605 </method>
9606
9607 <method name="getFramebuffer">
9608 <desc>
9609 Queries the framebuffer for given screen.
9610 </desc>
9611 <param name="screenId" type="unsigned long" dir="in"/>
9612 <param name="framebuffer" type="IFramebuffer" dir="out"/>
9613 <param name="xOrigin" type="long" dir="out"/>
9614 <param name="yOrigin" type="long" dir="out"/>
9615 </method>
9616
9617 <method name="setVideoModeHint">
9618 <desc>
9619 Asks VirtualBox to request the given video mode from
9620 the guest. This is just a hint and it cannot be guaranteed
9621 that the requested resolution will be used. Guest Additions
9622 are required for the request to be seen by guests. The caller
9623 should issue the request and wait for a resolution change and
9624 after a timeout retry.
9625
9626 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
9627 parameters means that the corresponding values should be taken from the
9628 current video mode (i.e. left unchanged).
9629
9630 If the guest OS supports multi-monitor configuration then the @a display
9631 parameter specifies the number of the guest display to send the hint to:
9632 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
9633 so on. If the multi-monitor configuration is not supported, @a display
9634 must be <tt>0</tt>.
9635
9636 <result name="E_INVALIDARG">
9637 The @a display is not associated with any monitor.
9638 </result>
9639
9640 </desc>
9641 <param name="width" type="unsigned long" dir="in"/>
9642 <param name="height" type="unsigned long" dir="in"/>
9643 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
9644 <param name="display" type="unsigned long" dir="in"/>
9645 </method>
9646
9647 <method name="setSeamlessMode">
9648 <desc>
9649 Enables or disables seamless guest display rendering (seamless desktop
9650 integration) mode.
9651 <note>
9652 Calling this method has no effect if <link
9653 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
9654 </note>
9655 </desc>
9656 <param name="enabled" type="boolean" dir="in"/>
9657 </method>
9658
9659 <method name="takeScreenShot">
9660 <desc>
9661 Takes a screen shot of the requested size and copies it to the
9662 32-bpp buffer allocated by the caller.
9663
9664 <result name="E_NOTIMPL">
9665 Feature not implemented.
9666 </result>
9667 <result name="VBOX_E_IPRT_ERROR">
9668 Could not take a screenshot.
9669 </result>
9670
9671 </desc>
9672 <param name="address" type="octet" mod="ptr" dir="in"/>
9673 <param name="width" type="unsigned long" dir="in"/>
9674 <param name="height" type="unsigned long" dir="in"/>
9675 </method>
9676
9677 <method name="drawToScreen">
9678 <desc>
9679 Draws a 32-bpp image of the specified size from the given buffer
9680 to the given point on the VM display.
9681
9682 <result name="E_NOTIMPL">
9683 Feature not implemented.
9684 </result>
9685 <result name="VBOX_E_IPRT_ERROR">
9686 Could not draw to screen.
9687 </result>
9688
9689 </desc>
9690 <param name="address" type="octet" mod="ptr" dir="in"/>
9691 <param name="x" type="unsigned long" dir="in"/>
9692 <param name="y" type="unsigned long" dir="in"/>
9693 <param name="width" type="unsigned long" dir="in"/>
9694 <param name="height" type="unsigned long" dir="in"/>
9695 </method>
9696
9697 <method name="invalidateAndUpdate">
9698 <desc>
9699 Does a full invalidation of the VM display and instructs the VM
9700 to update it.
9701
9702 <result name="VBOX_E_IPRT_ERROR">
9703 Could not invalidate and update screen.
9704 </result>
9705
9706 </desc>
9707 </method>
9708
9709 <method name="resizeCompleted">
9710 <desc>
9711 Signals that a framebuffer has completed the resize operation.
9712
9713 <result name="VBOX_E_NOT_SUPPORTED">
9714 Operation only valid for external frame buffers.
9715 </result>
9716
9717 </desc>
9718 <param name="screenId" type="unsigned long" dir="in"/>
9719 </method>
9720
9721 <method name="updateCompleted">
9722 <desc>
9723 Signals that a framebuffer has completed the update operation.
9724
9725 <result name="VBOX_E_NOT_SUPPORTED">
9726 Operation only valid for external frame buffers.
9727 </result>
9728
9729 </desc>
9730 </method>
9731
9732 </interface>
9733
9734 <!--
9735 // INetworkAdapter
9736 /////////////////////////////////////////////////////////////////////////
9737 -->
9738
9739 <enum
9740 name="NetworkAttachmentType"
9741 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
9742 >
9743 <desc>
9744 Network attachment type.
9745 </desc>
9746
9747 <const name="Null" value="0">
9748 <desc>Null value, also means "not attached".</desc>
9749 </const>
9750 <const name="NAT" value="1"/>
9751 <const name="HostInterface" value="2"/>
9752 <const name="Internal" value="3"/>
9753 </enum>
9754
9755 <enum
9756 name="NetworkAdapterType"
9757 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
9758 >
9759 <desc>
9760 Network adapter type.
9761 </desc>
9762
9763 <const name="Null" value="0">
9764 <desc>Null value (never used by the API).</desc>
9765 </const>
9766 <const name="Am79C970A" value="1"/>
9767 <const name="Am79C973" value="2"/>
9768 <const name="I82540EM" value="3"/>
9769 <const name="I82543GC" value="4"/>
9770 </enum>
9771
9772 <interface
9773 name="INetworkAdapter" extends="$unknown"
9774 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
9775 wsmap="managed"
9776 >
9777 <attribute name="adapterType" type="NetworkAdapterType">
9778 <desc>
9779 Type of the virtual network adapter. Depending on this value,
9780 VirtualBox will provide a different virtual network hardware
9781 to the guest.
9782 </desc>
9783 </attribute>
9784
9785 <attribute name="slot" type="unsigned long" readonly="yes">
9786 <desc>
9787 Slot number this adapter is plugged into. Corresponds to
9788 the value you pass to <link to="IMachine::getNetworkAdapter"/>
9789 to obtain this instance.
9790 </desc>
9791 </attribute>
9792
9793 <attribute name="enabled" type="boolean">
9794 <desc>
9795 Flag whether the network adapter is present in the
9796 guest system. If disabled, the virtual guest hardware will
9797 not contain this network adapter. Can only be changed when
9798 the VM is not running.
9799 </desc>
9800 </attribute>
9801
9802 <attribute name="MACAddress" type="wstring">
9803 <desc>
9804 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
9805 it to NULL, VirtualBox will generate a unique MAC address.
9806 </desc>
9807 </attribute>
9808
9809 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
9810
9811 <attribute name="hostInterface" type="wstring">
9812 <desc>
9813 Name of the host network interface the VM is attached to.
9814 </desc>
9815 </attribute>
9816
9817 <attribute name="internalNetwork" type="wstring">
9818 <desc>
9819 Name of the internal network the VM is attached to.
9820 </desc>
9821 </attribute>
9822
9823 <attribute name="NATNetwork" type="wstring">
9824 <desc>
9825 Name of the NAT network the VM is attached to.
9826 </desc>
9827 </attribute>
9828
9829 <attribute name="cableConnected" type="boolean">
9830 <desc>
9831 Flag whether the adapter reports the cable as connected or not.
9832 It can be used to report offline situations to a VM.
9833 </desc>
9834 </attribute>
9835
9836 <attribute name="lineSpeed" type="unsigned long">
9837 <desc>
9838 Line speed reported by custom drivers, in units of 1 kbps.
9839 </desc>
9840 </attribute>
9841
9842 <attribute name="traceEnabled" type="boolean">
9843 <desc>
9844 Flag whether network traffic from/to the network card should be traced.
9845 Can only be toggled when the VM is turned off.
9846 </desc>
9847 </attribute>
9848
9849 <attribute name="traceFile" type="wstring">
9850 <desc>
9851 Filename where a network trace will be stored. If not set, VBox-pid.pcap
9852 will be used.
9853 </desc>
9854 </attribute>
9855
9856 <method name="attachToNAT">
9857 <desc>
9858 Attach the network adapter to the Network Address Translation (NAT) interface.
9859 </desc>
9860 </method>
9861
9862 <method name="attachToHostInterface">
9863 <desc>
9864 Attach the network adapter to a host interface.
9865 </desc>
9866 </method>
9867
9868 <method name="attachToInternalNetwork">
9869 <desc>
9870 Attach the network adapter to an internal network.
9871 </desc>
9872 </method>
9873
9874 <method name="detach">
9875 <desc>
9876 Detach the network adapter
9877 </desc>
9878 </method>
9879 </interface>
9880
9881
9882 <!--
9883 // ISerialPort
9884 /////////////////////////////////////////////////////////////////////////
9885 -->
9886
9887 <enum
9888 name="PortMode"
9889 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
9890 >
9891 <desc>
9892 The PortMode enumeration represents possible communication modes for
9893 the virtual serial port device.
9894 </desc>
9895
9896 <const name="Disconnected" value="0">
9897 <desc>Virtual device is not attached to any real host device.</desc>
9898 </const>
9899 <const name="HostPipe" value="1">
9900 <desc>Virtual device is attached to a host pipe.</desc>
9901 </const>
9902 <const name="HostDevice" value="2">
9903 <desc>Virtual device is attached to a host device.</desc>
9904 </const>
9905 </enum>
9906
9907 <interface
9908 name="ISerialPort" extends="$unknown"
9909 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
9910 wsmap="managed"
9911 >
9912
9913 <desc>
9914 The ISerialPort interface represents the virtual serial port device.
9915
9916 The virtual serial port device acts like an ordinary serial port
9917 inside the virtual machine. This device communicates to the real
9918 serial port hardware in one of two modes: host pipe or host device.
9919
9920 In host pipe mode, the #path attribute specifies the path to the pipe on
9921 the host computer that represents a serial port. The #server attribute
9922 determines if this pipe is created by the virtual machine process at
9923 machine startup or it must already exist before starting machine
9924 execution.
9925
9926 In host device mode, the #path attribute specifies the name of the
9927 serial port device on the host computer.
9928
9929 There is also a third communication mode: the disconnected mode. In this
9930 mode, the guest OS running inside the virtual machine will be able to
9931 detect the serial port, but all port write operations will be discarded
9932 and all port read operations will return no data.
9933
9934 <see>IMachine::getSerialPort</see>
9935 </desc>
9936
9937 <attribute name="slot" type="unsigned long" readonly="yes">
9938 <desc>
9939 Slot number this serial port is plugged into. Corresponds to
9940 the value you pass to <link to="IMachine::getSerialPort"/>
9941 to obtain this instance.
9942 </desc>
9943 </attribute>
9944
9945 <attribute name="enabled" type="boolean">
9946 <desc>
9947 Flag whether the serial port is enabled. If disabled,
9948 the serial port will not be reported to the guest OS.
9949 </desc>
9950 </attribute>
9951
9952 <attribute name="IOBase" type="unsigned long">
9953 <desc>Base I/O address of the serial port.</desc>
9954 </attribute>
9955
9956 <attribute name="IRQ" type="unsigned long">
9957 <desc>IRQ number of the serial port.</desc>
9958 </attribute>
9959
9960 <attribute name="hostMode" type="PortMode">
9961 <desc>
9962 How is this port connected to the host.
9963 <note>
9964 Changing this attribute may fail if the conditions for
9965 <link to="#path"/> are not met.
9966 </note>
9967 </desc>
9968 </attribute>
9969
9970 <attribute name="server" type="boolean">
9971 <desc>
9972 Flag whether this serial port acts as a server (creates a new pipe on
9973 the host) or as a client (uses the existing pipe). This attribute is
9974 used only when <link to="#hostMode"/> is PortMode_HostPipe.
9975 </desc>
9976 </attribute>
9977
9978 <attribute name="path" type="wstring">
9979 <desc>
9980 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
9981 PortMode_HostPipe, or the host serial device name when
9982 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
9983 cases, setting a @c null or an empty string as the attribute's value
9984 will result into an error. Otherwise, the value of this property is
9985 ignored.
9986 </desc>
9987 </attribute>
9988
9989 </interface>
9990
9991 <!--
9992 // IParallelPort
9993 /////////////////////////////////////////////////////////////////////////
9994 -->
9995
9996 <interface
9997 name="IParallelPort" extends="$unknown"
9998 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
9999 wsmap="managed"
10000 >
10001
10002 <desc>
10003 The IParallelPort interface represents the virtual parallel port device.
10004
10005 The virtual parallel port device acts like an ordinary parallel port
10006 inside the virtual machine. This device communicates to the real
10007 parallel port hardware using the name of the parallel device on the host
10008 computer specified in the #path attribute.
10009
10010 Each virtual parallel port device is assigned a base I/O address and an
10011 IRQ number that will be reported to the guest operating system and used
10012 to operate the given parallel port from within the virtual machine.
10013
10014 <see>IMachine::getParallelPort</see>
10015 </desc>
10016
10017 <attribute name="slot" type="unsigned long" readonly="yes">
10018 <desc>
10019 Slot number this parallel port is plugged into. Corresponds to
10020 the value you pass to <link to="IMachine::getParallelPort"/>
10021 to obtain this instance.
10022 </desc>
10023 </attribute>
10024
10025 <attribute name="enabled" type="boolean">
10026 <desc>
10027 Flag whether the parallel port is enabled. If disabled,
10028 the parallel port will not be reported to the guest OS.
10029 </desc>
10030 </attribute>
10031
10032 <attribute name="IOBase" type="unsigned long">
10033 <desc>Base I/O address of the parallel port.</desc>
10034 </attribute>
10035
10036 <attribute name="IRQ" type="unsigned long">
10037 <desc>IRQ number of the parallel port.</desc>
10038 </attribute>
10039
10040 <attribute name="path" type="wstring">
10041 <desc>
10042 Host parallel device name. If this parallel port is enabled, setting a
10043 @c null or an empty string as this attribute's value will result into
10044 an error.
10045 </desc>
10046 </attribute>
10047
10048 </interface>
10049
10050
10051 <!--
10052 // IMachineDebugger
10053 /////////////////////////////////////////////////////////////////////////
10054 -->
10055
10056 <interface
10057 name="IMachineDebugger" extends="$unknown"
10058 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10059 wsmap="suppress"
10060 >
10061 <method name="resetStats">
10062 <desc>
10063 Reset VM statistics.
10064 </desc>
10065 <param name="pattern" type="wstring" dir="in">
10066 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10067 </param>
10068 </method>
10069
10070 <method name="dumpStats">
10071 <desc>
10072 Dumps VM statistics.
10073 </desc>
10074 <param name="pattern" type="wstring" dir="in">
10075 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10076 </param>
10077 </method>
10078
10079 <method name="getStats">
10080 <desc>
10081 Get the VM statistics in a XMLish format.
10082 </desc>
10083 <param name="pattern" type="wstring" dir="in">
10084 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10085 </param>
10086 <param name="withDescriptions" type="boolean" dir="in">
10087 <desc>Whether to include the descriptions.</desc>
10088 </param>
10089 <param name="stats" type="wstring" dir="out">
10090 <desc>The XML document containing the statistics.</desc>
10091 </param>
10092 </method>
10093
10094 <method name="injectNMI">
10095 <desc>
10096 Inject an NMI into a running VT-x/AMD-V VM.
10097 </desc>
10098 </method>
10099
10100 <attribute name="singlestep" type="boolean">
10101 <desc>Switch for enabling singlestepping.</desc>
10102 </attribute>
10103
10104 <attribute name="recompileUser" type="boolean">
10105 <desc>Switch for forcing code recompilation for user mode code.</desc>
10106 </attribute>
10107
10108 <attribute name="recompileSupervisor" type="boolean">
10109 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10110 </attribute>
10111
10112 <attribute name="PATMEnabled" type="boolean">
10113 <desc>Switch for enabling and disabling the PATM component.</desc>
10114 </attribute>
10115
10116 <attribute name="CSAMEnabled" type="boolean">
10117 <desc>Switch for enabling and disabling the CSAM component.</desc>
10118 </attribute>
10119
10120 <attribute name="logEnabled" type="boolean">
10121 <desc>Switch for enabling and disabling logging.</desc>
10122 </attribute>
10123
10124 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10125 <desc>
10126 Flag indicating whether the VM is currently making use of CPU hardware
10127 virtualization extensions.
10128 </desc>
10129 </attribute>
10130
10131 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10132 <desc>
10133 Flag indicating whether the VM is currently making use of the nested paging
10134 CPU hardware virtualization extension.
10135 </desc>
10136 </attribute>
10137
10138 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10139 <desc>
10140 Flag indicating whether the VM is currently making use of the VPID
10141 VT-x extension.
10142 </desc>
10143 </attribute>
10144
10145 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10146 <desc>
10147 Flag indicating whether the VM is currently making use of the Physical
10148 Address Extension CPU feature.
10149 </desc>
10150 </attribute>
10151
10152 <attribute name="virtualTimeRate" type="unsigned long">
10153 <desc>
10154 The rate at which the virtual time runs expressed as a percentage.
10155 The accepted range is 2% to 20000%.
10156 </desc>
10157 </attribute>
10158
10159 <!-- @todo method for setting log flags, groups and destination! -->
10160
10161 <attribute name="VM" type="unsigned long long" readonly="yes">
10162 <desc>
10163 Gets the VM handle. This is only for internal use while
10164 we carve the details of this interface.
10165 </desc>
10166 </attribute>
10167
10168 </interface>
10169
10170 <!--
10171 // IUSBController
10172 /////////////////////////////////////////////////////////////////////////
10173 -->
10174
10175 <interface
10176 name="IUSBController" extends="$unknown"
10177 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10178 wsmap="managed"
10179 >
10180 <attribute name="enabled" type="boolean">
10181 <desc>
10182 Flag whether the USB controller is present in the
10183 guest system. If disabled, the virtual guest hardware will
10184 not contain any USB controller. Can only be changed when
10185 the VM is powered off.
10186 </desc>
10187 </attribute>
10188
10189 <attribute name="enabledEhci" type="boolean">
10190 <desc>
10191 Flag whether the USB EHCI controller is present in the
10192 guest system. If disabled, the virtual guest hardware will
10193 not contain a USB EHCI controller. Can only be changed when
10194 the VM is powered off.
10195 </desc>
10196 </attribute>
10197
10198 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10199 <desc>
10200 USB standard version which the controller implements.
10201 This is a BCD which means that the major version is in the
10202 high byte and minor version is in the low byte.
10203 </desc>
10204 </attribute>
10205
10206 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10207 <desc>
10208 List of USB device filters associated with the machine.
10209
10210 If the machine is currently running, these filters are activated
10211 every time a new (supported) USB device is attached to the host
10212 computer that was not ignored by global filters
10213 (<link to="IHost::USBDeviceFilters"/>).
10214
10215 These filters are also activated when the machine is powered up.
10216 They are run against a list of all currently available USB
10217 devices (in states
10218 <link to="USBDeviceState_Available"/>,
10219 <link to="USBDeviceState_Busy"/>,
10220 <link to="USBDeviceState_Held"/>) that were not previously
10221 ignored by global filters.
10222
10223 If at least one filter matches the USB device in question, this
10224 device is automatically captured (attached to) the virtual USB
10225 controller of this machine.
10226
10227 <see>IUSBDeviceFilter, ::IUSBController</see>
10228 </desc>
10229 </attribute>
10230
10231 <method name="createDeviceFilter">
10232 <desc>
10233 Creates a new USB device filter. All attributes except
10234 the filter name are set to <tt>null</tt> (any match),
10235 <i>active</i> is <tt>false</tt> (the filter is not active).
10236
10237 The created filter can then be added to the list of filters using
10238 <link to="#insertDeviceFilter()"/>.
10239
10240 <see>#deviceFilters</see>
10241 </desc>
10242 <param name="name" type="wstring" dir="in">
10243 <desc>
10244 Filter name. See <link to="IUSBDeviceFilter::name"/>
10245 for more info.
10246 </desc>
10247 </param>
10248 <param name="filter" type="IUSBDeviceFilter" dir="return">
10249 <desc>Created filter object.</desc>
10250 </param>
10251 </method>
10252
10253 <method name="insertDeviceFilter">
10254 <desc>
10255 Inserts the given USB device to the specified position
10256 in the list of filters.
10257
10258 Positions are numbered starting from <tt>0</tt>. If the specified
10259 position is equal to or greater than the number of elements in
10260 the list, the filter is added to the end of the collection.
10261
10262 <note>
10263 Duplicates are not allowed, so an attempt to insert a
10264 filter that is already in the collection, will return an
10265 error.
10266 </note>
10267
10268 <see>#deviceFilters</see>
10269 </desc>
10270 <param name="position" type="unsigned long" dir="in">
10271 <desc>Position to insert the filter to.</desc>
10272 </param>
10273 <param name="filter" type="IUSBDeviceFilter" dir="in">
10274 <desc>USB device filter to insert.</desc>
10275 </param>
10276 </method>
10277
10278 <method name="removeDeviceFilter">
10279 <desc>
10280 Removes a USB device filter from the specified position in the
10281 list of filters.
10282
10283 Positions are numbered starting from <tt>0</tt>. Specifying a
10284 position equal to or greater than the number of elements in
10285 the list will produce an error.
10286
10287 <see>#deviceFilters</see>
10288 </desc>
10289 <param name="position" type="unsigned long" dir="in">
10290 <desc>Position to remove the filter from.</desc>
10291 </param>
10292 <param name="filter" type="IUSBDeviceFilter" dir="return">
10293 <desc>Removed USB device filter.</desc>
10294 </param>
10295 </method>
10296
10297 </interface>
10298
10299
10300 <!--
10301 // IUSBDevice
10302 /////////////////////////////////////////////////////////////////////////
10303 -->
10304
10305 <enumerator
10306 name="IUSBDeviceEnumerator" type="IUSBDevice"
10307 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10308 />
10309
10310 <collection
10311 name="IUSBDeviceCollection" type="IUSBDevice"
10312 enumerator="IUSBDeviceEnumerator"
10313 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10314 readonly="yes"
10315 >
10316 <method name="findById">
10317 <desc>
10318 Searches this collection for a USB device with the given UUID.
10319 <note>
10320 The method returns an error if the given UUID does not
10321 correspond to any USB device in the collection.
10322 </note>
10323 <see>IUSBDevice::id</see>
10324 </desc>
10325 <param name="id" type="uuid" dir="in">
10326 <desc>UUID of the USB device to search for.</desc>
10327 </param>
10328 <param name="device" type="IUSBDevice" dir="return">
10329 <desc>Found USB device object.</desc>
10330 </param>
10331 </method>
10332
10333 <method name="findByAddress">
10334 <desc>
10335 Searches this collection for a USB device with the given
10336 host address.
10337 <note>
10338 The method returns an error if the given address does not
10339 correspond to any USB device in the collection.
10340 </note>
10341 <see>IUSBDevice::address</see>
10342 </desc>
10343 <param name="name" type="wstring" dir="in">
10344 <desc>
10345 Address of the USB device (as assigned by the host) to
10346 search for.
10347 </desc>
10348 </param>
10349 <param name="device" type="IUSBDevice" dir="return">
10350 <desc>Found USB device object.</desc>
10351 </param>
10352 </method>
10353
10354 </collection>
10355
10356 <interface
10357 name="IUSBDevice" extends="$unknown"
10358 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10359 wsmap="managed"
10360 >
10361 <desc>
10362 The IUSBDevice interface represents a virtual USB device attached to the
10363 virtual machine.
10364
10365 A collection of objects implementing this interface is stored in the
10366 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10367 attached to a running virtual machine's USB controller.
10368 </desc>
10369
10370 <attribute name="id" type="uuid" readonly="yes">
10371 <desc>
10372 Unique USB device ID. This ID is built from #vendorId,
10373 #productId, #revision and #serialNumber.
10374 </desc>
10375 </attribute>
10376
10377 <attribute name="vendorId" type="unsigned short" readonly="yes">
10378 <desc>Vendor ID.</desc>
10379 </attribute>
10380
10381 <attribute name="productId" type="unsigned short" readonly="yes">
10382 <desc>Product ID.</desc>
10383 </attribute>
10384
10385 <attribute name="revision" type="unsigned short" readonly="yes">
10386 <desc>
10387 Product revision number. This is a packed BCD represented as
10388 unsigned short. The high byte is the integer part and the low
10389 byte is the decimal.
10390 </desc>
10391 </attribute>
10392
10393 <attribute name="manufacturer" type="wstring" readonly="yes">
10394 <desc>Manufacturer string.</desc>
10395 </attribute>
10396
10397 <attribute name="product" type="wstring" readonly="yes">
10398 <desc>Product string.</desc>
10399 </attribute>
10400
10401 <attribute name="serialNumber" type="wstring" readonly="yes">
10402 <desc>Serial number string.</desc>
10403 </attribute>
10404
10405 <attribute name="address" type="wstring" readonly="yes">
10406 <desc>Host specific address of the device.</desc>
10407 </attribute>
10408
10409 <attribute name="port" type="unsigned short" readonly="yes">
10410 <desc>
10411 Host USB port number the device is physically
10412 connected to.
10413 </desc>
10414 </attribute>
10415
10416 <attribute name="version" type="unsigned short" readonly="yes">
10417 <desc>
10418 The major USB version of the device - 1 or 2.
10419 </desc>
10420 </attribute>
10421
10422 <attribute name="portVersion" type="unsigned short" readonly="yes">
10423 <desc>
10424 The major USB version of the host USB port the device is
10425 physically connected to - 1 or 2. For devices not connected to
10426 anything this will have the same value as the version attribute.
10427 </desc>
10428 </attribute>
10429
10430 <attribute name="remote" type="boolean" readonly="yes">
10431 <desc>
10432 Whether the device is physically connected to a remote VRDP
10433 client or to a local host machine.
10434 </desc>
10435 </attribute>
10436
10437 </interface>
10438
10439
10440 <!--
10441 // IUSBDeviceFilter
10442 /////////////////////////////////////////////////////////////////////////
10443 -->
10444
10445 <enumerator
10446 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10447 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10448 />
10449
10450 <collection
10451 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10452 enumerator="IUSBDeviceFilterEnumerator"
10453 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10454 readonly="yes"
10455 />
10456
10457 <interface
10458 name="IUSBDeviceFilter" extends="$unknown"
10459 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10460 wsmap="managed"
10461 >
10462 <desc>
10463 The IUSBDeviceFilter interface represents an USB device filter used
10464 to perform actions on a group of USB devices.
10465
10466 This type of filters is used by running virtual machines to
10467 automatically capture selected USB devices once they are physically
10468 attached to the host computer.
10469
10470 A USB device is matched to the given device filter if and only if all
10471 attributes of the device match the corresponding attributes of the
10472 filter (that is, attributes are joined together using the logical AND
10473 operation). On the other hand, all together, filters in the list of
10474 filters carry the semantics of the logical OR operation. So if it is
10475 desirable to create a match like "this vendor id OR this product id",
10476 one needs to create two filters and specify "any match" (see below)
10477 for unused attributes.
10478
10479 All filter attributes used for matching are strings. Each string
10480 is an expression representing a set of values of the corresponding
10481 device attribute, that will match the given filter. Currently, the
10482 following filtering expressions are supported:
10483
10484 <ul>
10485 <li><i>Interval filters</i>. Used to specify valid intervals for
10486 integer device attributes (Vendor ID, Product ID and Revision).
10487 The format of the string is:
10488
10489 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
10490
10491 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
10492 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
10493 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
10494 is omitted before a dash (<tt>-</tt>), the minimum possible integer
10495 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
10496 possible integer is assumed.
10497 </li>
10498 <li><i>Boolean filters</i>. Used to specify acceptable values for
10499 boolean device attributes. The format of the string is:
10500
10501 <tt>true|false|yes|no|0|1</tt>
10502
10503 </li>
10504 <li><i>Exact match</i>. Used to specify a single value for the given
10505 device attribute. Any string that doesn't start with <tt>int:</tt>
10506 represents the exact match. String device attributes are compared to
10507 this string including case of symbols. Integer attributes are first
10508 converted to a string (see individual filter attributes) and then
10509 compared ignoring case.
10510
10511 </li>
10512 <li><i>Any match</i>. Any value of the corresponding device attribute
10513 will match the given filter. An empty or <tt>null</tt> string is
10514 used to construct this type of filtering expressions.
10515
10516 </li>
10517 </ul>
10518
10519 <note>
10520 On the Windows host platform, interval filters are not currently
10521 available. Also all string filter attributes
10522 (<link to="#manufacturer"/>, <link to="#product"/>,
10523 <link to="#serialNumber"/>) are ignored, so they behave as
10524 <i>any match</i> no matter what string expression is specified.
10525 </note>
10526
10527 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
10528 </desc>
10529
10530 <attribute name="name" type="wstring">
10531 <desc>
10532 Visible name for this filter.
10533 This name is used to visually distinguish one filter from another,
10534 so it can neither be <tt>null</tt> nor an empty string.
10535 </desc>
10536 </attribute>
10537
10538 <attribute name="active" type="boolean">
10539 <desc>Whether this filter active or has been temporarily disabled.</desc>
10540 </attribute>
10541
10542 <attribute name="vendorId" type="wstring">
10543 <desc>
10544 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
10545 The string representation for the <i>exact matching</i>
10546 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10547 (including leading zeroes).
10548 </desc>
10549 </attribute>
10550
10551 <attribute name="productId" type="wstring">
10552 <desc>
10553 <link to="IUSBDevice::productId">Product ID</link> filter.
10554 The string representation for the <i>exact matching</i>
10555 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10556 (including leading zeroes).
10557 </desc>
10558 </attribute>
10559
10560 <attribute name="revision" type="wstring">
10561 <desc>
10562 <link to="IUSBDevice::productId">Product revision number</link>
10563 filter. The string representation for the <i>exact matching</i>
10564 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
10565 of the integer part of the revision, and <tt>F</tt> is the
10566 decimal digit of its fractional part (including leading and
10567 trailing zeros).
10568 Note that for interval filters, it's best to use the hexadecimal
10569 form, because the revision is stored as a 16 bit packed BCD value;
10570 so the expression <tt>int:0x0100-0x0199</tt> will match any
10571 revision from <tt>1.0</tt> to <tt>1.99</tt>.
10572 </desc>
10573 </attribute>
10574
10575 <attribute name="manufacturer" type="wstring">
10576 <desc>
10577 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
10578 </desc>
10579 </attribute>
10580
10581 <attribute name="product" type="wstring">
10582 <desc>
10583 <link to="IUSBDevice::product">Product</link> filter.
10584 </desc>
10585 </attribute>
10586
10587 <attribute name="serialNumber" type="wstring">
10588 <desc>
10589 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
10590 </desc>
10591 </attribute>
10592
10593 <attribute name="port" type="wstring">
10594 <desc>
10595 <link to="IUSBDevice::port">Host USB port</link> filter.
10596 </desc>
10597 </attribute>
10598
10599 <attribute name="remote" type="wstring">
10600 <desc>
10601 <link to="IUSBDevice::remote">Remote state</link> filter.
10602 <note>
10603 This filter makes sense only for machine USB filters,
10604 i.e. it is ignored by IHostUSBDeviceFilter objects.
10605 </note>
10606 </desc>
10607 </attribute>
10608
10609 <attribute name="maskedInterfaces" type="unsigned long">
10610 <desc>
10611 This is an advanced option for hiding one or more USB interfaces
10612 from the guest. The value is a bit mask where the bits that are set
10613 means the corresponding USB interface should be hidden, masked off
10614 if you like.
10615 This feature only works on Linux hosts.
10616 </desc>
10617 </attribute>
10618
10619 </interface>
10620
10621
10622 <!--
10623 // IHostUSBDevice
10624 /////////////////////////////////////////////////////////////////////////
10625 -->
10626
10627 <enum
10628 name="USBDeviceState"
10629 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
10630 >
10631 <desc>
10632 USB device state. This enumeration represents all possible states
10633 of the USB device physically attached to the host computer regarding
10634 its state on the host computer and availability to guest computers
10635 (all currently running virtual machines).
10636
10637 Once a supported USB device is attached to the host, global USB
10638 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
10639 either ignore the device, or put it to USBDeviceState_Held state, or do
10640 nothing. Unless the device is ignored by global filters, filters of all
10641 currently running guests (<link to="IUSBController::deviceFilters"/>) are
10642 activated that can put it to USBDeviceState_Captured state.
10643
10644 If the device was ignored by global filters, or didn't match
10645 any filters at all (including guest ones), it is handled by the host
10646 in a normal way. In this case, the device state is determined by
10647 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
10648 or USBDeviceState_Available, depending on the current device usage.
10649
10650 Besides auto-capturing based on filters, the device can be manually
10651 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
10652 state is USBDeviceState_Busy, USBDeviceState_Available or
10653 USBDeviceState_Held.
10654
10655 <note>
10656 Due to differences in USB stack implementations in Linux and Win32,
10657 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
10658 only to the Linux version of the product. This also means that (<link
10659 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
10660 device state is USBDeviceState_Held.
10661 </note>
10662
10663 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
10664 </desc>
10665
10666 <const name="NotSupported" value="0">
10667 <desc>
10668 Not supported by the VirtualBox server, not available to guests.
10669 </desc>
10670 </const>
10671 <const name="Unavailable" value="1">
10672 <desc>
10673 Being used by the host computer exclusively,
10674 not available to guests.
10675 </desc>
10676 </const>
10677 <const name="Busy" value="2">
10678 <desc>
10679 Being used by the host computer, potentially available to guests.
10680 </desc>
10681 </const>
10682 <const name="Available" value="3">
10683 <desc>
10684 Not used by the host computer, available to guests (the host computer
10685 can also start using the device at any time).
10686 </desc>
10687 </const>
10688 <const name="Held" value="4">
10689 <desc>
10690 Held by the VirtualBox server (ignored by the host computer),
10691 available to guests.
10692 </desc>
10693 </const>
10694 <const name="Captured" value="5">
10695 <desc>
10696 Captured by one of the guest computers, not available
10697 to anybody else.
10698 </desc>
10699 </const>
10700 </enum>
10701
10702 <enumerator
10703 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
10704 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
10705 />
10706
10707 <collection
10708 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
10709 enumerator="IHostUSBDeviceEnumerator"
10710 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
10711 readonly="yes"
10712 >
10713 <method name="findById">
10714 <desc>
10715 Searches this collection for a USB device with the given UUID.
10716 <note>
10717 The method returns an error if the given UUID does not
10718 correspond to any USB device in the collection.
10719 </note>
10720 <see>IHostUSBDevice::id</see>
10721 </desc>
10722 <param name="id" type="uuid" dir="in">
10723 <desc>UUID of the USB device to search for.</desc>
10724 </param>
10725 <param name="device" type="IHostUSBDevice" dir="return">
10726 <desc>Found USB device object.</desc>
10727 </param>
10728 </method>
10729
10730 <method name="findByAddress">
10731 <desc>
10732 Searches this collection for a USB device with the given
10733 host address.
10734 <note>
10735 The method returns an error if the given address does not
10736 correspond to any USB device in the collection.
10737 </note>
10738 <see>IHostUSBDevice::address</see>
10739 </desc>
10740 <param name="name" type="wstring" dir="in">
10741 <desc>
10742 Address of the USB device (as assigned by the host) to
10743 search for.
10744 </desc>
10745 </param>
10746 <param name="device" type="IHostUSBDevice" dir="return">
10747 <desc>Found USB device object.</desc>
10748 </param>
10749 </method>
10750
10751 </collection>
10752
10753 <interface
10754 name="IHostUSBDevice" extends="IUSBDevice"
10755 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
10756 wsmap="managed"
10757 >
10758 <desc>
10759 The IHostUSBDevice interface represents a physical USB device attached
10760 to the host computer.
10761
10762 Besides properties inherited from IUSBDevice, this interface adds the
10763 <link to="#state"/> property that holds the current state of the USB
10764 device.
10765
10766 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
10767 </desc>
10768
10769 <attribute name="state" type="USBDeviceState" readonly="yes">
10770 <desc>
10771 Current state of the device.
10772 </desc>
10773 </attribute>
10774
10775 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
10776
10777 </interface>
10778
10779
10780 <!--
10781 // IHostUSBDeviceFilter
10782 /////////////////////////////////////////////////////////////////////////
10783 -->
10784
10785 <enum
10786 name="USBDeviceFilterAction"
10787 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
10788 >
10789 <desc>
10790 Actions for host USB device filters.
10791 <see>IHostUSBDeviceFilter, USBDeviceState</see>
10792 </desc>
10793
10794 <const name="Null" value="0">
10795 <desc>Null value (never used by the API).</desc>
10796 </const>
10797 <const name="Ignore" value="1">
10798 <desc>Ignore the matched USB device.</desc>
10799 </const>
10800 <const name="Hold" value="2">
10801 <desc>Hold the matched USB device.</desc>
10802 </const>
10803 </enum>
10804
10805 <enumerator
10806 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
10807 uuid="ff735211-903e-4642-9c37-189eb44579fe"
10808 />
10809
10810 <collection
10811 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
10812 enumerator="IHostUSBDeviceFilterEnumerator"
10813 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
10814 readonly="yes"
10815 />
10816
10817 <interface
10818 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
10819 uuid="4cc70246-d74a-400f-8222-3900489c0374"
10820 wsmap="managed"
10821 >
10822 <desc>
10823 The IHostUSBDeviceFilter interface represents a global filter for a
10824 physical USB device used by the host computer. Used indirectly in
10825 <link to="IHost::USBDeviceFilters"/>.
10826
10827 Using filters of this type, the host computer determines the initial
10828 state of the USB device after it is physically attached to the
10829 host's USB controller.
10830
10831 <note>
10832 The <link to="#remote"/> attribute is ignored by this type of
10833 filters, because it makes sense only for
10834 <link to="IUSBController::deviceFilters">machine USB filters</link>.
10835 </note>
10836
10837 <see>IHost::USBDeviceFilters</see>
10838 </desc>
10839
10840 <attribute name="action" type="USBDeviceFilterAction">
10841 <desc>
10842 Action performed by the host when an attached USB device
10843 matches this filter.
10844 </desc>
10845 </attribute>
10846
10847 </interface>
10848
10849 <!--
10850 // IAudioAdapter
10851 /////////////////////////////////////////////////////////////////////////
10852 -->
10853
10854 <enum
10855 name="AudioDriverType"
10856 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
10857 >
10858 <desc>
10859 Host audio driver type.
10860 </desc>
10861
10862 <const name="Null" value="0">
10863 <desc>Null value, also means "dummy audio driver".</desc>
10864 </const>
10865 <const name="WinMM" value="1"/>
10866 <const name="OSS" value="2"/>
10867 <const name="ALSA" value="3"/>
10868 <const name="DirectSound" value="4"/>
10869 <const name="CoreAudio" value="5"/>
10870 <const name="MMPM" value="6"/>
10871 <const name="Pulse" value="7"/>
10872 <const name="SolAudio" value="8"/>
10873 </enum>
10874
10875 <enum
10876 name="AudioControllerType"
10877 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
10878 >
10879 <desc>
10880 Virtual audio controller type.
10881 </desc>
10882
10883 <const name="AC97" value="0"/>
10884 <const name="SB16" value="1"/>
10885 </enum>
10886
10887 <interface
10888 name="IAudioAdapter" extends="$unknown"
10889 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
10890 wsmap="managed"
10891 >
10892 <desc>
10893 The IAudioAdapter interface represents the virtual audio adapter of
10894 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
10895 </desc>
10896 <attribute name="enabled" type="boolean">
10897 <desc>
10898 Flag whether the audio adapter is present in the
10899 guest system. If disabled, the virtual guest hardware will
10900 not contain any audio adapter. Can only be changed when
10901 the VM is not running.
10902 </desc>
10903 </attribute>
10904 <attribute name="audioController" type="AudioControllerType">
10905 <desc>
10906 The audio hardware we emulate.
10907 </desc>
10908 </attribute>
10909 <attribute name="audioDriver" type="AudioDriverType">
10910 <desc>
10911 Audio driver the adapter is connected to. This setting
10912 can only be changed when the VM is not running.
10913 </desc>
10914 </attribute>
10915 </interface>
10916
10917 <!--
10918 // IVRDPServer
10919 /////////////////////////////////////////////////////////////////////////
10920 -->
10921
10922 <enum
10923 name="VRDPAuthType"
10924 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
10925 >
10926 <desc>
10927 VRDP authentication type.
10928 </desc>
10929
10930 <const name="Null" value="0">
10931 <desc>Null value, also means "no authentication".</desc>
10932 </const>
10933 <const name="External" value="1"/>
10934 <const name="Guest" value="2"/>
10935 </enum>
10936
10937 <interface
10938 name="IVRDPServer" extends="$unknown"
10939 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
10940 wsmap="managed"
10941 >
10942 <attribute name="enabled" type="boolean">
10943 <desc>VRDP server status.</desc>
10944 </attribute>
10945
10946 <attribute name="port" type="unsigned long">
10947 <desc>
10948 VRDP server port number.
10949 <note>
10950 Setting the value of this property to <tt>0</tt> will reset the port
10951 number to the default value which is
10952 currently <tt>3389</tt>. Reading this property will always return a
10953 real port number, even after it has been set to <tt>0</tt> (in which
10954 case the default port is returned).
10955 </note>
10956 </desc>
10957 </attribute>
10958
10959 <attribute name="netAddress" type="wstring">
10960 <desc>VRDP server address.</desc>
10961 </attribute>
10962
10963 <attribute name="authType" type="VRDPAuthType">
10964 <desc>VRDP authentication method.</desc>
10965 </attribute>
10966
10967 <attribute name="authTimeout" type="unsigned long">
10968 <desc>Timeout for guest authentication. Milliseconds.</desc>
10969 </attribute>
10970
10971 <attribute name="allowMultiConnection" type="boolean">
10972 <desc>
10973 Flag whether multiple simultaneous connections to the VM are permitted.
10974 Note that this will be replaced by a more powerful mechanism in the future.
10975 </desc>
10976 </attribute>
10977
10978 <attribute name="reuseSingleConnection" type="boolean">
10979 <desc>
10980 Flag whether the existing connection must be dropped and a new connection
10981 must be established by the VRDP server, when a new client connects in single
10982 connection mode.
10983 </desc>
10984 </attribute>
10985
10986 </interface>
10987
10988
10989 <!--
10990 // ISharedFolder
10991 /////////////////////////////////////////////////////////////////////////
10992 -->
10993
10994 <enumerator
10995 name="ISharedFolderEnumerator" type="ISharedFolder"
10996 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
10997 />
10998
10999 <collection
11000 name="ISharedFolderCollection" type="ISharedFolder"
11001 enumerator="ISharedFolderEnumerator"
11002 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11003 readonly="yes">
11004
11005 <method name="findByName">
11006 <desc>
11007 Searches this collection for a shared folder with the given logical
11008 name.
11009 <note>
11010 The method returns an error if the given name does not correspond to
11011 any shared folder in the collection.
11012 </note>
11013 </desc>
11014 <param name="name" type="wstring" dir="in">
11015 <desc>Logical name of the shared folder to search for</desc>
11016 </param>
11017 <param name="sharedFolder" type="ISharedFolder" dir="return">
11018 <desc>Found shared folder object</desc>
11019 </param>
11020 </method>
11021
11022 </collection>
11023
11024 <interface
11025 name="ISharedFolder" extends="$unknown"
11026 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
11027 wsmap="struct"
11028 >
11029 <desc>
11030 The ISharedFolder interface represents a folder in the host computer's
11031 file system accessible from the guest OS running inside a virtual
11032 machine using an associated logical name.
11033
11034 There are three types of shared folders:
11035 <ul>
11036 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11037 folders available to all virtual machines.</li>
11038 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11039 VM-specific shared folders available to the given virtual machine at
11040 startup.</li>
11041 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11042 VM-specific shared folders created in the session context (for
11043 example, when the virtual machine is running) and automatically
11044 discarded when the session is closed (the VM is powered off).</li>
11045 </ul>
11046
11047 Logical names of shared folders must be unique within the given scope
11048 (global, permanent or transient). However, they do not need to be unique
11049 across scopes. In this case, the definition of the shared folder in a
11050 more specific scope takes precedence over definitions in all other
11051 scopes. The order of precedence is (more specific to more general):
11052 <ol>
11053 <li>Transient definitions</li>
11054 <li>Permanent definitions</li>
11055 <li>Global definitions</li>
11056 </ol>
11057
11058 For example, if MyMachine has a shared folder named
11059 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11060 transient shared folder named <tt>C_DRIVE</tt> (that points
11061 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11062 of <tt>C_DRIVE</tt> in the guest OS so
11063 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11064 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11065 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11066 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11067 to <tt>C:\\</tt> if it still exists.
11068
11069 Note that permanent and transient shared folders of different machines
11070 are in different name spaces, so they don't overlap and don't need to
11071 have unique logical names.
11072
11073 <note>
11074 Global shared folders are not implemented in the current version of the
11075 product.
11076 </note>
11077 </desc>
11078
11079 <attribute name="name" type="wstring" readonly="yes">
11080 <desc>Logical name of the shared folder.</desc>
11081 </attribute>
11082
11083 <attribute name="hostPath" type="wstring" readonly="yes">
11084 <desc>Full path to the shared folder in the host file system.</desc>
11085 </attribute>
11086
11087 <attribute name="accessible" type="boolean" readonly="yes">
11088 <desc>
11089 Whether the folder defined by the host path is currently
11090 accessible or not.
11091 For example, the folder can be unaccessible if it is placed
11092 on the network share that is not available by the time
11093 this property is read.
11094 </desc>
11095 </attribute>
11096
11097 <attribute name="writable" type="boolean" readonly="yes">
11098 <desc>
11099 Whether the folder defined by the host path is writable or
11100 not.
11101 </desc>
11102 </attribute>
11103
11104 </interface>
11105
11106 <!--
11107 // ISession
11108 /////////////////////////////////////////////////////////////////////////
11109 -->
11110
11111 <interface
11112 name="IInternalSessionControl" extends="$unknown"
11113 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11114 internal="yes"
11115 wsmap="suppress"
11116 >
11117 <method name="getPID">
11118 <desc>PID of the process that has created this Session object.
11119 </desc>
11120 <param name="pid" type="unsigned long" dir="return"/>
11121 </method>
11122
11123 <method name="getRemoteConsole">
11124 <desc>Returns the console object suitable for remote control.</desc>
11125 <param name="console" type="IConsole" dir="return"/>
11126 </method>
11127
11128 <method name="assignMachine">
11129 <desc>
11130 Assigns the machine object associated with this direct-type
11131 session or informs the session that it will be a remote one
11132 (if machine = NULL).
11133 </desc>
11134 <param name="machine" type="IMachine" dir="in"/>
11135 </method>
11136
11137 <method name="assignRemoteMachine">
11138 <desc>
11139 Assigns the machine and the (remote) console object associated with
11140 this remote-type session.
11141 </desc>
11142 <param name="machine" type="IMachine" dir="in"/>
11143 <param name="console" type="IConsole" dir="in"/>
11144 </method>
11145
11146 <method name="updateMachineState">
11147 <desc>
11148 Updates the machine state in the VM process.
11149 Must be called only in certain cases
11150 (see the method implementation).
11151 </desc>
11152 <param name="aMachineState" type="MachineState" dir="in"/>
11153 </method>
11154
11155 <method name="uninitialize">
11156 <desc>
11157 Uninitializes (closes) this session. Used by VirtualBox to close
11158 the corresponding remote session when the direct session dies
11159 or gets closed.
11160 </desc>
11161 </method>
11162
11163 <method name="onDVDDriveChange">
11164 <desc>
11165 Triggered when settings of the DVD drive object of the
11166 associated virtual machine have changed.
11167 </desc>
11168 </method>
11169
11170 <method name="onFloppyDriveChange">
11171 <desc>
11172 Triggered when settings of the floppy drive object of the
11173 associated virtual machine have changed.
11174 </desc>
11175 </method>
11176
11177 <method name="onNetworkAdapterChange">
11178 <desc>
11179 Triggered when settings of a network adapter of the
11180 associated virtual machine have changed.
11181 </desc>
11182 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11183 </method>
11184
11185 <method name="onSerialPortChange">
11186 <desc>
11187 Triggered when settings of a serial port of the
11188 associated virtual machine have changed.
11189 </desc>
11190 <param name="serialPort" type="ISerialPort" dir="in"/>
11191 </method>
11192
11193 <method name="onParallelPortChange">
11194 <desc>
11195 Triggered when settings of a parallel port of the
11196 associated virtual machine have changed.
11197 </desc>
11198 <param name="parallelPort" type="IParallelPort" dir="in"/>
11199 </method>
11200
11201 <method name="onVRDPServerChange">
11202 <desc>
11203 Triggered when settings of the VRDP server object of the
11204 associated virtual machine have changed.
11205 </desc>
11206 </method>
11207
11208 <method name="onUSBControllerChange">
11209 <desc>
11210 Triggered when settings of the USB controller object of the
11211 associated virtual machine have changed.
11212 </desc>
11213 </method>
11214
11215 <method name="onSharedFolderChange">
11216 <desc>
11217 Triggered when a permanent (global or machine) shared folder has been
11218 created or removed.
11219 <note>
11220 We don't pass shared folder parameters in this notification because
11221 the order in which parallel notifications are delivered is not defined,
11222 therefore it could happen that these parameters were outdated by the
11223 time of processing this notification.
11224 </note>
11225 </desc>
11226 <param name="global" type="boolean" dir="in"/>
11227 </method>
11228
11229 <method name="onUSBDeviceAttach">
11230 <desc>
11231 Triggered when a request to capture a USB device (as a result
11232 of matched USB filters or direct call to
11233 <link to="IConsole::attachUSBDevice"/>) has completed.
11234 A @c null @a error object means success, otherwise it
11235 describes a failure.
11236 </desc>
11237 <param name="device" type="IUSBDevice" dir="in"/>
11238 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11239 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11240 </method>
11241
11242 <method name="onUSBDeviceDetach">
11243 <desc>
11244 Triggered when a request to release the USB device (as a result
11245 of machine termination or direct call to
11246 <link to="IConsole::detachUSBDevice"/>) has completed.
11247 A @c null @a error object means success, otherwise it
11248 </desc>
11249 <param name="id" type="uuid" dir="in"/>
11250 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11251 </method>
11252
11253 <method name="onShowWindow">
11254 <desc>
11255 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11256 <link to="IMachine::showConsoleWindow()"/> in order to notify
11257 console callbacks
11258 <link to="IConsoleCallback::onCanShowWindow()"/>
11259 and <link to="IConsoleCallback::onShowWindow()"/>.
11260 </desc>
11261 <param name="check" type="boolean" dir="in"/>
11262 <param name="canShow" type="boolean" dir="out"/>
11263 <param name="winId" type="unsigned long long" dir="out"/>
11264 </method>
11265
11266 <method name="accessGuestProperty">
11267 <desc>
11268 Called by <link to="IMachine::getGuestProperty()"/> and by
11269 <link to="IMachine::setGuestProperty()"/> in order to read and
11270 modify guest properties.
11271 </desc>
11272 <param name="name" type="wstring" dir="in"/>
11273 <param name="value" type="wstring" dir="in"/>
11274 <param name="flags" type="wstring" dir="in"/>
11275 <param name="isSetter" type="boolean" dir="in"/>
11276 <param name="retValue" type="wstring" dir="out"/>
11277 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11278 <param name="retFlags" type="wstring" dir="out"/>
11279 </method>
11280
11281 <method name="enumerateGuestProperties">
11282 <desc>
11283 Return a list of the guest properties matching a set of patterns along
11284 with their values, time stamps and flags.
11285 </desc>
11286 <param name="patterns" type="wstring" dir="in">
11287 <desc>
11288 The patterns to match the properties against as a comma-separated
11289 string. If this is empty, all properties currently set will be
11290 returned.
11291 </desc>
11292 </param>
11293 <param name="key" type="wstring" dir="out" safearray="yes">
11294 <desc>
11295 The key names of the properties returned.
11296 </desc>
11297 </param>
11298 <param name="value" type="wstring" dir="out" safearray="yes">
11299 <desc>
11300 The values of the properties returned. The array entries match the
11301 corresponding entries in the @a key array.
11302 </desc>
11303 </param>
11304 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11305 <desc>
11306 The time stamps of the properties returned. The array entries match
11307 the corresponding entries in the @a key array.
11308 </desc>
11309 </param>
11310 <param name="flags" type="wstring" dir="out" safearray="yes">
11311 <desc>
11312 The flags of the properties returned. The array entries match the
11313 corresponding entries in the @a key array.
11314 </desc>
11315 </param>
11316 </method>
11317
11318 </interface>
11319
11320 <interface
11321 name="ISession" extends="$dispatched"
11322 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11323 wsmap="managed"
11324 >
11325 <desc>
11326 The ISession interface represents a serialization primitive for virtual
11327 machines.
11328
11329 With VirtualBox, every time one wishes to manipulate a virtual machine
11330 (e.g. change its settings or start execution), a session object is
11331 required. Such an object must be passed to one of the session methods
11332 that open the given session, which then initiates the machine manipulation.
11333
11334 A session serves several purposes: it identifies to the inter-process VirtualBox
11335 code which process is currently working with the virtual machine, and it ensures
11336 that there are no incompatible requests from several processes for the
11337 same virtual machine. Session objects can therefore be thought of as mutex
11338 semaphores that lock virtual machines to prevent conflicting accesses from
11339 several processes.
11340
11341 How sessions objects are used depends on whether you use the Main API
11342 via COM or via the webservice:
11343
11344 <ul>
11345 <li>When using the COM API directly, an object of the Session class from the
11346 VirtualBox type library needs to be created. In regular COM C++ client code,
11347 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
11348 This object will then act as a local session object in further calls to open
11349 a session.
11350 </li>
11351
11352 <li>In the webservice, the session manager (IWebsessionManager) instead creates
11353 one session object automatically when <link to="IWebsessionManager::logon" />
11354 is called. A managed object reference to that session object can be retrieved by
11355 calling <link to="IWebsessionManager::getSessionObject" />. This session object
11356 reference can then be used to open sessions.
11357 </li>
11358 </ul>
11359
11360 Sessions are mainly used in two variations:
11361
11362 <ul>
11363 <li>
11364 To start a virtual machine in a separate process, one would call
11365 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
11366 object as its first parameter. This session then identifies the caller
11367 and lets him control the started machine (for example, pause machine
11368 execution or power it down) as well as be notified about machine
11369 execution state changes.
11370 </li>
11371
11372 <li>To alter machine settings, or to start machine execution within the
11373 current process, one needs to open a direct session for the machine first by
11374 calling <link to="IVirtualBox::openSession"/>. While a direct session
11375 is open within one process, no any other process may open another direct
11376 session for the same machine. This prevents the machine from being changed
11377 by other processes while it is running or while the machine is being configured.
11378 </li>
11379 </ul>
11380
11381 One also can attach to an existing direct session already opened by
11382 another process (for example, in order to send a control request to the
11383 virtual machine such as the pause or the reset request). This is done by
11384 calling <link to="IVirtualBox::openExistingSession"/>.
11385
11386 <note>
11387 Unless you are trying to write a new VirtualBox front-end that
11388 performs direct machine execution (like the VirtualBox or VBoxSDL
11389 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
11390 session opened by <link to="IVirtualBox::openSession"/> and use this
11391 session only to change virtual machine settings. If you simply want to
11392 start virtual machine execution using one of the existing front-ends
11393 (for example the VirtualBox GUI or headless server), simply use
11394 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
11395 will power up the machine automatically for you.
11396 </note>
11397 </desc>
11398
11399 <attribute name="state" type="SessionState" readonly="yes">
11400 <desc>Current state of this session.</desc>
11401 </attribute>
11402
11403 <attribute name="type" type="SessionType" readonly="yes">
11404 <desc>
11405 Type of this session. The value of this attribute is valid only
11406 if the session is currently open (i.e. its #state is
11407 SessionType_SessionOpen), otherwise an error will be returned.
11408 </desc>
11409 </attribute>
11410
11411 <attribute name="machine" type="IMachine" readonly="yes">
11412 <desc>Machine object associated with this session.</desc>
11413 </attribute>
11414
11415 <attribute name="console" type="IConsole" readonly="yes">
11416 <desc>Console object associated with this session.</desc>
11417 </attribute>
11418
11419 <method name="close">
11420 <desc>
11421 Closes a session that was previously opened.
11422
11423 It is recommended that every time an "open session" method (such as
11424 <link to="IVirtualBox::openRemoteSession" /> or
11425 <link to="IVirtualBox::openSession" />) has been called to
11426 manipulate a virtual machine, the caller invoke
11427 ISession::close() when it's done doing so. Since sessions are
11428 serialization primitives much like ordinary mutexes, they are
11429 best used the same way: for each "open" call, there should be
11430 a matching "close" call, even when errors occur.
11431
11432 Otherwise, if a direct session for a machine opened with
11433 <link to="IVirtualBox::openSession()"/> is not explicitly closed
11434 when the application terminates, the state of the machine will
11435 be set to <link to="MachineState_Aborted" /> on the server.
11436
11437 Generally, it is recommended to close all open sessions explicitly
11438 before terminating the application (no matter what is the reason of
11439 the termination).
11440
11441 <note>
11442 Do not expect the session state (<link to="ISession::state" />
11443 to return to "Closed" immediately after you invoke
11444 ISession::close(), particularly if you have started a remote
11445 session to execute the VM in a new process. The session state will
11446 automatically return to "Closed" once the VM is no longer executing,
11447 which can of course take a very long time.
11448 </note>
11449 </desc>
11450 </method>
11451
11452 </interface>
11453
11454 <!--
11455 // ISATAController
11456 /////////////////////////////////////////////////////////////////////////
11457 -->
11458
11459 <interface
11460 name="ISATAController" extends="$unknown"
11461 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
11462 wsmap="managed"
11463 >
11464 <attribute name="enabled" type="boolean">
11465 <desc>
11466 Flag whether the SATA controller is present in the
11467 guest system. If disabled, the virtual guest hardware will
11468 not contain any SATA controller. Can only be changed when
11469 the VM is powered off.
11470 </desc>
11471 </attribute>
11472
11473 <attribute name="portCount" type="unsigned long">
11474 <desc>
11475 The number of usable ports on the SATA controller.
11476 It ranges from 1 to 30.
11477 </desc>
11478 </attribute>
11479
11480 <method name="GetIDEEmulationPort">
11481 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
11482 <param name="devicePosition" type="long" dir="in"/>
11483 <param name="portNumber" type="long" dir="return"/>
11484 </method>
11485
11486 <method name="SetIDEEmulationPort">
11487 <desc>Sets the port number which is emulated as an IDE device.</desc>
11488 <param name="devicePosition" type="long" dir="in"/>
11489 <param name="portNumber" type="long" dir="in"/>
11490 </method>
11491
11492 </interface>
11493
11494<if target="wsdl">
11495
11496 <!--
11497 // IManagedObjectRef
11498 /////////////////////////////////////////////////////////////////////////
11499 -->
11500
11501 <interface
11502 name="IManagedObjectRef" extends="$unknown"
11503 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
11504 internal="yes"
11505 wsmap="managed"
11506 wscpp="hardcoded"
11507 >
11508 <desc>
11509 Managed object reference.
11510
11511 Only within the webservice, a managed object reference (which is really
11512 an opaque number) allows a webservice client to address an object
11513 that lives in the address space of the webservice server.
11514
11515 Behind each managed object reference, there is a COM object that lives
11516 in the webservice server's address space. The COM object is not freed
11517 until the managed object reference is released, either by an explicit
11518 call to <link to="IManagedObjectRef::release" /> or by logging off from
11519 the webservice (<link to="IWebsessionManager::logoff" />), which releases
11520 all objects created during the webservice session.
11521
11522 Whenever a method call of the VirtualBox API returns a COM object, the
11523 webservice representation of that method will instead return a
11524 managed object reference, which can then be used to invoke methods
11525 on that object.
11526 </desc>
11527
11528 <method name="getInterfaceName">
11529 <desc>
11530 Returns the name of the interface that this managed object represents,
11531 for example, "IMachine", as a string.
11532 </desc>
11533 <param name="return" type="wstring" dir="return"/>
11534 </method>
11535
11536 <method name="release">
11537 <desc>
11538 Releases this managed object reference and frees the resources that
11539 were allocated for it in the webservice server process. After calling
11540 this method, the identifier of the reference can no longer be used.
11541 </desc>
11542 </method>
11543
11544 </interface>
11545
11546 <!--
11547 // IWebsessionManager
11548 /////////////////////////////////////////////////////////////////////////
11549 -->
11550
11551 <interface
11552 name="IWebsessionManager" extends="$unknown"
11553 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
11554 internal="yes"
11555 wsmap="global"
11556 wscpp="hardcoded"
11557 >
11558 <desc>
11559 Websession manager. This provides essential services
11560 to webservice clients.
11561 </desc>
11562 <method name="logon">
11563 <desc>
11564 Logs a new client onto the webservice and returns a managed object reference to
11565 the IVirtualBox instance, which the client can then use as a basis to further
11566 queries, since all calls to the VirtualBox API are based on the IVirtualBox
11567 interface, in one way or the other.
11568 </desc>
11569 <param name="username" type="wstring" dir="in"/>
11570 <param name="password" type="wstring" dir="in"/>
11571 <param name="return" type="IVirtualBox" dir="return"/>
11572 </method>
11573
11574 <method name="getSessionObject">
11575 <desc>
11576 Returns a managed object reference to the internal ISession object that was created
11577 for this web service session when the client logged on.
11578
11579 <see>ISession</see>
11580 </desc>
11581 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11582 <param name="return" type="ISession" dir="return"/>
11583 </method>
11584
11585 <method name="logoff">
11586 <desc>
11587 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
11588 and destroys all resources associated with the session (most importantly, all
11589 managed objects created in the server while the session was active).
11590 </desc>
11591 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11592 </method>
11593
11594 </interface>
11595
11596</if>
11597
11598 <!--
11599 // IPerformanceCollector & friends
11600 /////////////////////////////////////////////////////////////////////////
11601 -->
11602
11603 <interface
11604 name="IPerformanceMetric" extends="$unknown"
11605 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
11606 >
11607 <desc>
11608 The IPerformanceMetric interface represents parameters of the given
11609 performance metric.
11610 </desc>
11611
11612 <attribute name="metricName" type="wstring" readonly="yes">
11613 <desc>
11614 Name of the metric.
11615 </desc>
11616 </attribute>
11617
11618 <attribute name="object" type="$unknown" readonly="yes">
11619 <desc>
11620 Object this metric belongs to.
11621 </desc>
11622 </attribute>
11623
11624 <attribute name="description" type="wstring" readonly="yes">
11625 <desc>
11626 Textual description of the metric.
11627 </desc>
11628 </attribute>
11629
11630 <attribute name="period" type="unsigned long" readonly="yes">
11631 <desc>
11632 Time interval between samples, measured in seconds.
11633 </desc>
11634 </attribute>
11635
11636 <attribute name="count" type="unsigned long" readonly="yes">
11637 <desc>
11638 Number of recent samples retained by the performance collector for this
11639 metric.
11640
11641 When the collected sample count exceeds this number, older samples
11642 are discarded.
11643 </desc>
11644 </attribute>
11645
11646 <attribute name="unit" type="wstring" readonly="yes">
11647 <desc>
11648 Unit of measurement.
11649 </desc>
11650 </attribute>
11651
11652 <attribute name="minimumValue" type="long" readonly="yes">
11653 <desc>
11654 Minimum possible value of this metric.
11655 </desc>
11656 </attribute>
11657
11658 <attribute name="maximumValue" type="long" readonly="yes">
11659 <desc>
11660 Maximum possible value of this metric.
11661 </desc>
11662 </attribute>
11663 </interface>
11664
11665 <interface
11666 name="IPerformanceCollector" extends="$unknown"
11667 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
11668 wsmap="managed"
11669 >
11670 <desc>
11671 The IPerformanceCollector interface represents a service that collects and
11672 stores performance metrics data.
11673
11674 Performance metrics are associated with objects like IHost and
11675 IMachine. Each object has a distinct set of performance metrics.
11676 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
11677
11678 Metric data are collected at the specified intervals and are retained
11679 internally. The interval and the number of samples retained can be set
11680 with <link to="IPerformanceCollector::setupMetrics" />.
11681
11682 Metrics are organized hierarchically, each level separated by slash (/).
11683 General scheme for metric name is
11684 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
11685 metric name stands for: CPU category, Load metric, User submetric, average
11686 aggregate. An aggregate function is computed over all retained data. Valid
11687 aggregate functions are:
11688
11689 <ul>
11690 <li>avg -- average</li>
11691 <li>min -- minimum</li>
11692 <li>max -- maximum</li>
11693 </ul>
11694
11695 "Category/Metric" together form base metric name. A base metric is the
11696 smallest unit for which a sampling interval and the number of retained
11697 samples can be set. Only base metrics can be enabled and disabled. All
11698 sub-metrics are collected when their base metric is collected.
11699 Collected values for any set of sub-metrics can be queried with
11700 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
11701 metric parameters, querying metric data, enabling or disabling metrics
11702 wildcards can be used in metric names to specify a subset of metrics. For
11703 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
11704 averages can be queried using <tt>*:avg</tt> and so on. To query metric
11705 values without aggregates <tt>*:</tt> can be used.
11706
11707 The valid names for base metrics are:
11708
11709 <ul>
11710 <li>CPU/Load</li>
11711 <li>CPU/MHz</li>
11712 <li>RAM/Usage</li>
11713 </ul>
11714
11715 The general sequence for collecting and retrieving the metrics is:
11716 <ul>
11717 <li>
11718 Obtain an instance of IPerformanceCollector with
11719 <link to="IVirtualBox::performanceCollector" />
11720 </li>
11721 <li>
11722 Allocate and populate an array with references to objects the metrics
11723 will be collected for. Use references to IHost and IMachine objects.
11724 </li>
11725 <li>
11726 Allocate and populate an array with base metric names the data will be
11727 collected for.
11728 </li>
11729 <li>
11730 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
11731 metric data will be collected and stored.
11732 </li>
11733 <li>
11734 Wait for the data to get collected.
11735 </li>
11736 <li>
11737 Allocate and populate an array with references to objects the metric
11738 values will be queried for. You can re-use the object array used for
11739 setting base metrics.
11740 </li>
11741 <li>
11742 Allocate and populate an array with metric names the data will be
11743 collected for. Note that metric names differ from base metric names.
11744 </li>
11745 <li>
11746 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
11747 have been collected so far are returned. Note that the values are still
11748 retained internally and data collection continues.
11749 </li>
11750 </ul>
11751
11752 For an example of usage refer to the following files in VirtualBox SDK:
11753 <ul>
11754 <li>
11755 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
11756 </li>
11757 <li>
11758 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
11759 </li>
11760 </ul>
11761 </desc>
11762
11763 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
11764 <desc>
11765 Array of unique names of metrics.
11766
11767 This array represents all metrics supported by the performance
11768 collector. Individual objects do not necessarily support all of them.
11769 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
11770 list of supported metrics for a particular object.
11771 </desc>
11772 </attribute>
11773
11774 <method name="getMetrics">
11775 <desc>
11776 Returns parameters of specified metrics for a set of objects.
11777 <note>
11778 @c Null metrics array means all metrics. @c Null object array means
11779 all existing objects.
11780 </note>
11781 </desc>
11782 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11783 <desc>
11784 Metric name filter. Currently, only a comma-separated list of metrics
11785 is supported.
11786 </desc>
11787 </param>
11788 <param name="objects" type="$unknown" dir="in" safearray="yes">
11789 <desc>
11790 Set of objects to return metric parameters for.
11791 </desc>
11792 </param>
11793 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
11794 <desc>
11795 Array of returned metric parameters.
11796 </desc>
11797 </param>
11798 </method>
11799
11800 <method name="setupMetrics">
11801 <desc>
11802 Sets parameters of specified base metrics for a set of objects. Returns
11803 an array of <link to="IPerformanceMetric" /> describing the metrics have
11804 been affected.
11805 <note>
11806 @c Null or empty metric name array means all metrics. @c Null or empty
11807 object array means all existing objects. If metric name array contains
11808 a single element and object array contains many, the single metric
11809 name array element is applied to each object array element to form
11810 metric/object pairs.
11811 </note>
11812 </desc>
11813 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11814 <desc>
11815 Metric name filter. Comma-separated list of metrics with wildcard
11816 support.
11817 </desc>
11818 </param>
11819 <param name="objects" type="$unknown" dir="in" safearray="yes">
11820 <desc>
11821 Set of objects to setup metric parameters for.
11822 </desc>
11823 </param>
11824 <param name="period" type="unsigned long" dir="in">
11825 <desc>
11826 Time interval in seconds between two consecutive samples of performance
11827 data.
11828 </desc>
11829 </param>
11830 <param name="count" type="unsigned long" dir="in">
11831 <desc>
11832 Number of samples to retain in performance data history. Older samples
11833 get discarded.
11834 </desc>
11835 </param>
11836 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11837 <desc>
11838 Array of metrics that have been modified by the call to this method.
11839 </desc>
11840 </param>
11841 </method>
11842
11843 <method name="enableMetrics">
11844 <desc>
11845 Turns on collecting specified base metrics. Returns an array of
11846 <link to="IPerformanceMetric" /> describing the metrics have been
11847 affected.
11848 <note>
11849 @c Null or empty metric name array means all metrics. @c Null or empty
11850 object array means all existing objects. If metric name array contains
11851 a single element and object array contains many, the single metric
11852 name array element is applied to each object array element to form
11853 metric/object pairs.
11854 </note>
11855 </desc>
11856 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11857 <desc>
11858 Metric name filter. Comma-separated list of metrics with wildcard
11859 support.
11860 </desc>
11861 </param>
11862 <param name="objects" type="$unknown" dir="in" safearray="yes">
11863 <desc>
11864 Set of objects to enable metrics for.
11865 </desc>
11866 </param>
11867 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11868 <desc>
11869 Array of metrics that have been modified by the call to this method.
11870 </desc>
11871 </param>
11872 </method>
11873
11874 <method name="disableMetrics">
11875 <desc>
11876 Turns off collecting specified base metrics. Returns an array of
11877 <link to="IPerformanceMetric" /> describing the metrics have been
11878 affected.
11879 <note>
11880 @c Null or empty metric name array means all metrics. @c Null or empty
11881 object array means all existing objects. If metric name array contains
11882 a single element and object array contains many, the single metric
11883 name array element is applied to each object array element to form
11884 metric/object pairs.
11885 </note>
11886 </desc>
11887 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11888 <desc>
11889 Metric name filter. Comma-separated list of metrics with wildcard
11890 support.
11891 </desc>
11892 </param>
11893 <param name="objects" type="$unknown" dir="in" safearray="yes">
11894 <desc>
11895 Set of objects to disable metrics for.
11896 </desc>
11897 </param>
11898 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11899 <desc>
11900 Array of metrics that have been modified by the call to this method.
11901 </desc>
11902 </param>
11903 </method>
11904
11905 <method name="queryMetricsData">
11906 <desc>
11907 Queries collected metrics data for a set of objects.
11908
11909 The data itself and related metric information are returned in seven
11910 parallel and one flattened array of arrays. Elements of
11911 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
11912 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
11913 the same index describe one set of values corresponding to a single
11914 metric.
11915
11916 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
11917 start and length of a sub-array is indicated by
11918 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
11919 value for metric <tt>metricNames[i]</tt> is at
11920 <tt>returnData[returnIndices[i]]</tt>.
11921
11922 <note>
11923 @c Null or empty metric name array means all metrics. @c Null or empty
11924 object array means all existing objects. If metric name array contains
11925 a single element and object array contains many, the single metric
11926 name array element is applied to each object array element to form
11927 metric/object pairs.
11928 </note>
11929 <note>
11930 Data collection continues behind the scenes after call to @c
11931 queryMetricsData. The return data can be seen as the snapshot of
11932 the current state at the time of @c queryMetricsData call. The
11933 internally kept metric values are not cleared by the call. This makes
11934 possible querying different subsets of metrics or aggregates with
11935 subsequent calls. If periodic querying is needed it is highly
11936 suggested to query the values with @c interval*count period to avoid
11937 confusion. This way a completely new set of data values will be
11938 provided by each query.
11939 </note>
11940 </desc>
11941 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11942 <desc>
11943 Metric name filter. Comma-separated list of metrics with wildcard
11944 support.
11945 </desc>
11946 </param>
11947 <param name="objects" type="$unknown" dir="in" safearray="yes">
11948 <desc>
11949 Set of objects to query metrics for.
11950 </desc>
11951 </param>
11952 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
11953 <desc>
11954 Names of metrics returned in @c returnData.
11955 </desc>
11956 </param>
11957 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
11958 <desc>
11959 Objects associated with metrics returned in @c returnData.
11960 </desc>
11961 </param>
11962 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
11963 <desc>
11964 Units of measurement for each returned metric.
11965 </desc>
11966 </param>
11967 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
11968 <desc>
11969 Divisor that should be applied to return values in order to get
11970 floating point values. For example:
11971 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
11972 will retrieve the floating point value of i-th sample of the first
11973 metric.
11974 </desc>
11975 </param>
11976 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
11977 <desc>
11978 Sequence numbers of the first elements of value sequences of particular metrics
11979 returned in @c returnData. For aggregate metrics it is the sequence number of
11980 the sample the aggregate started calculation from.
11981 </desc>
11982 </param>
11983 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
11984 <desc>
11985 Indices of the first elements of value sequences of particular metrics
11986 returned in @c returnData.
11987 </desc>
11988 </param>
11989 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
11990 <desc>
11991 Lengths of value sequences of particular metrics.
11992 </desc>
11993 </param>
11994 <param name="returnData" type="long" dir="return" safearray="yes">
11995 <desc>
11996 Flattened array of all metric data containing sequences of values for
11997 each metric.
11998 </desc>
11999 </param>
12000 </method>
12001
12002 </interface>
12003
12004 <module name="VBoxSVC" context="LocalServer">
12005 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12006 namespace="virtualbox.org">
12007 <interface name="IVirtualBox" default="yes"/>
12008 </class>
12009 </module>
12010
12011 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12012 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12013 namespace="virtualbox.org">
12014 <interface name="ISession" default="yes"/>
12015 </class>
12016 </module>
12017
12018</library>
12019
12020</idl>
12021
12022<!-- 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