VirtualBox

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

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

#3285: Improve error handling API to include unique error numbers
Document

  • IHardDiskFormat::describeProperties
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 435.7 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 15649 2008-12-18 12:37:11Z 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 </desc>
485
486 <const name="Null" value="0">
487 <desc>Null value (nver used by the API).</desc>
488 </const>
489 <const name="PoweredOff" value="1">
490 <desc>
491 The machine is not running.
492 </desc>
493 </const>
494 <const name="Saved" value="2">
495 <desc>
496 The machine is not currently running, but the execution state of the machine
497 has been saved to an external file when it was running.
498 </desc>
499 </const>
500 <const name="Aborted" value="3">
501 <desc>
502 The process running the machine has terminated abnormally.
503 </desc>
504 </const>
505 <const name="Running" value="4">
506 <desc>
507 The machine is currently being executed.
508 <note internal="yes">
509 For whoever decides to touch this enum: In order to keep the
510 comparisons in the source code valid, this state must immediately
511 precede the Paused state.
512 </note>
513 </desc>
514 </const>
515 <const name="Paused" value="5">
516 <desc>
517 Execution of the machine has been paused.
518 <note internal="yes">
519 For whoever decides to touch this enum: In order to keep the
520 comparisons in the source code valid, this state must immediately
521 follow the Running state.
522 </note>
523 </desc>
524 </const>
525 <const name="Stuck" value="6">
526 <desc>
527 Execution of the machine has reached the "Guru Meditation"
528 condition.
529 </desc>
530 </const>
531 <const name="Starting" value="7">
532 <desc>
533 Machine is being started after powering it on from a
534 zero execution state.
535 </desc>
536 </const>
537 <const name="Stopping" value="8">
538 <desc>
539 Machine is being normally stopped powering it off, or after the guest OS
540 has initiated a shutdown sequence.
541 </desc>
542 </const>
543 <const name="Saving" value="9">
544 <desc>
545 Machine is saving its execution state to a file or an online
546 snapshot of the machine is being taken.
547 </desc>
548 </const>
549 <const name="Restoring" value="10">
550 <desc>
551 Execution state of the machine is being restored from a file
552 after powering it on from the saved execution state.
553 </desc>
554 </const>
555 <const name="Discarding" value="11">
556 <desc>
557 Snapshot of the machine is being discarded.
558 </desc>
559 </const>
560 <const name="SettingUp" value="12">
561 <desc>
562 Lengthy setup operation is in progress.
563 </desc>
564 </const>
565
566 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
567 <desc>
568 Pseudo-state: first online state (for use in relational expressions).
569 <note internal="yes">
570 For whoever decides to touch this enum: In order to keep the
571 comparisons involving FirstOnline and LastOnline pseudo-states valid,
572 the numeric values of these states must be correspondingly updated if
573 needed: for any online VM state, the condition
574 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
575 <tt>true</tt>.
576 </note>
577 </desc>
578 </const>
579 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
580 <desc>
581 Pseudo-state: last online state (for use in relational expressions).
582 <note internal="yes">
583 For whoever decides to touch this enum: In order to keep the
584 comparisons involving FirstOnline and LastOnline pseudo-states valid,
585 the numeric values of these states must be correspondingly updated if
586 needed: for any online VM state, the condition
587 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
588 <tt>true</tt>.
589 </note>
590 </desc>
591 </const>
592
593 </enum>
594
595 <enum
596 name="SessionState"
597 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
598 >
599 <desc>
600 Session state. This enumeration represents possible values of
601 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
602 attributes. See individual enumerator descriptions for the meaning for
603 every value.
604 </desc>
605
606 <const name="Null" value="0">
607 <desc>Null value (never used by the API).</desc>
608 </const>
609 <const name="Closed" value="1">
610 <desc>
611 The machine has no open sessions (<link to="IMachine::sessionState"/>);
612 the session is closed (<link to="ISession::state"/>)
613 </desc>
614 </const>
615 <const name="Open" value="2">
616 <desc>
617 The machine has an open direct session (<link to="IMachine::sessionState"/>);
618 the session is open (<link to="ISession::state"/>)
619 </desc>
620 </const>
621 <const name="Spawning" value="3">
622 <desc>
623 A new (direct) session is being opened for the machine
624 as a result of <link to="IVirtualBox::openRemoteSession()"/>
625 call (<link to="IMachine::sessionState"/>);
626 the session is currently being opened
627 as a result of <link to="IVirtualBox::openRemoteSession()"/>
628 call (<link to="ISession::state"/>)
629 </desc>
630 </const>
631 <const name="Closing" value="4">
632 <desc>
633 The direct session is being closed (<link to="IMachine::sessionState"/>);
634 the session is being closed (<link to="ISession::state"/>)
635 </desc>
636 </const>
637 </enum>
638
639 <enum
640 name="SessionType"
641 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
642 >
643 <desc>
644 Session type. This enumeration represents possible values of the
645 <link to="ISession::type"/> attribute.
646 </desc>
647
648 <const name="Null" value="0">
649 <desc>Null value (never used by the API).</desc>
650 </const>
651 <const name="Direct" value="1">
652 <desc>
653 Direct session
654 (opened by <link to="IVirtualBox::openSession()"/>)
655 </desc>
656 </const>
657 <const name="Remote" value="2">
658 <desc>
659 Remote session
660 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
661 </desc>
662 </const>
663 <const name="Existing" value="3">
664 <desc>
665 Existing session
666 (opened by <link to="IVirtualBox::openExistingSession()"/>)
667 </desc>
668 </const>
669 </enum>
670
671 <enum
672 name="DeviceType"
673 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
674 >
675 <desc>
676 Device type.
677 </desc>
678 <const name="Null" value="0">
679 <desc>
680 Null value, may also mean "no device" (not allowed for
681 <link to="IConsole::getDeviceActivity"/>).
682 </desc>
683 </const>
684 <const name="Floppy" value="1">
685 <desc>Floppy device.</desc>
686 </const>
687 <const name="DVD" value="2">
688 <desc>CD/DVD-ROM device.</desc>
689 </const>
690 <const name="HardDisk" value="3">
691 <desc>Hard disk device.</desc>
692 </const>
693 <const name="Network" value="4">
694 <desc>Network device.</desc>
695 </const>
696 <const name="USB" value="5">
697 <desc>USB device.</desc>
698 </const>
699 <const name="SharedFolder" value="6">
700 <desc>Shared folder device.</desc>
701 </const>
702 </enum>
703
704 <enum
705 name="DeviceActivity"
706 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
707 >
708 <desc>
709 Device activity for <link to="IConsole::getDeviceActivity"/>.
710 </desc>
711
712 <const name="Null" value="0"/>
713 <const name="Idle" value="1"/>
714 <const name="Reading" value="2"/>
715 <const name="Writing" value="3"/>
716 </enum>
717
718 <enum
719 name="StorageBus"
720 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
721 >
722 <desc>Interface bus type for storage devices.</desc>
723
724 <const name="Null" value="0">
725 <desc>Null value (never used by the API).</desc>
726 </const>
727
728 <const name="IDE" value="1"/>
729 <const name="SATA" value="2"/>
730 </enum>
731
732 <enum
733 name="ClipboardMode"
734 uuid="33364716-4008-4701-8f14-be0fa3d62950"
735 >
736 <desc>
737 Host-Guest clipboard interchange mode.
738 </desc>
739
740 <const name="Disabled" value="0"/>
741 <const name="HostToGuest" value="1"/>
742 <const name="GuestToHost" value="2"/>
743 <const name="Bidirectional" value="3"/>
744 </enum>
745
746 <enum
747 name="Scope"
748 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
749 >
750 <desc>
751 Scope of the operation.
752
753 A generic enumeration used in various methods to define the action or
754 argument scope.
755 </desc>
756
757 <const name="Global" value="0"/>
758 <const name="Machine" value="1"/>
759 <const name="Session" value="2"/>
760 </enum>
761
762 <enum
763 name="GuestStatisticType"
764 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
765 >
766 <desc>
767 Statistics type for <link to="IGuest::getStatistic"/>.
768 </desc>
769
770 <const name="CPULoad_Idle" value="0">
771 <desc>
772 Idle CPU load (0-100%) for last interval.
773 </desc>
774 </const>
775 <const name="CPULoad_Kernel" value="1">
776 <desc>
777 Kernel CPU load (0-100%) for last interval.
778 </desc>
779 </const>
780 <const name="CPULoad_User" value="2">
781 <desc>
782 User CPU load (0-100%) for last interval.
783 </desc>
784 </const>
785 <const name="Threads" value="3">
786 <desc>
787 Total number of threads in the system.
788 </desc>
789 </const>
790 <const name="Processes" value="4">
791 <desc>
792 Total number of processes in the system.
793 </desc>
794 </const>
795 <const name="Handles" value="5">
796 <desc>
797 Total number of handles in the system.
798 </desc>
799 </const>
800 <const name="MemoryLoad" value="6">
801 <desc>
802 Memory load (0-100%).
803 </desc>
804 </const>
805 <const name="PhysMemTotal" value="7">
806 <desc>
807 Total physical memory in megabytes.
808 </desc>
809 </const>
810 <const name="PhysMemAvailable" value="8">
811 <desc>
812 Free physical memory in megabytes.
813 </desc>
814 </const>
815 <const name="PhysMemBalloon" value="9">
816 <desc>
817 Ballooned physical memory in megabytes.
818 </desc>
819 </const>
820 <const name="MemCommitTotal" value="10">
821 <desc>
822 Total amount of memory in the committed state in megabytes.
823 </desc>
824 </const>
825 <const name="MemKernelTotal" value="11">
826 <desc>
827 Total amount of memory used by the guest OS's kernel in megabytes.
828 </desc>
829 </const>
830 <const name="MemKernelPaged" value="12">
831 <desc>
832 Total amount of paged memory used by the guest OS's kernel in megabytes.
833 </desc>
834 </const>
835 <const name="MemKernelNonpaged" value="13">
836 <desc>
837 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
838 </desc>
839 </const>
840 <const name="MemSystemCache" value="14">
841 <desc>
842 Total amount of memory used by the guest OS's system cache in megabytes.
843 </desc>
844 </const>
845 <const name="PageFileSize" value="15">
846 <desc>
847 Pagefile size in megabytes.
848 </desc>
849 </const>
850 <const name="SampleNumber" value="16">
851 <desc>
852 Statistics sample number
853 </desc>
854 </const>
855 <const name="MaxVal" value="17"/>
856 </enum>
857
858 <enum
859 name="BIOSBootMenuMode"
860 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
861 >
862 <desc>
863 BIOS boot menu mode.
864 </desc>
865
866 <const name="Disabled" value="0"/>
867 <const name="MenuOnly" value="1"/>
868 <const name="MessageAndMenu" value="2"/>
869 </enum>
870
871 <enum
872 name="IDEControllerType"
873 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
874 >
875 <desc>
876 IDE controller type.
877 </desc>
878
879 <const name="Null" value="0">
880 <desc>Null value (never used by the API).</desc>
881 </const>
882 <const name="PIIX3" value="1"/>
883 <const name="PIIX4" value="2"/>
884 </enum>
885
886 <enum
887 name="DriveState"
888 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
889 >
890 <const name="Null" value="0">
891 <desc>Null value (never used by the API).</desc>
892 </const>
893 <const name="NotMounted" value="1"/>
894 <const name="ImageMounted" value="2"/>
895 <const name="HostDriveCaptured" value="3"/>
896 </enum>
897
898 <enum
899 name="ProcessorFeature"
900 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
901 >
902 <desc>
903 CPU features.
904 </desc>
905
906 <const name="HWVirtEx" value="0"/>
907 <const name="PAE" value="1"/>
908 <const name="LongMode" value="2"/>
909 </enum>
910
911
912 <!--
913 // IVirtualBoxErrorInfo
914 /////////////////////////////////////////////////////////////////////////
915 -->
916
917 <interface
918 name="IVirtualBoxErrorInfo" extends="$errorinfo"
919 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
920 supportsErrorInfo="no"
921 wsmap="suppress"
922 >
923 <desc>
924 The IVirtualBoxErrorInfo interface represents extended error information.
925
926 Extended error information can be set by VirtualBox components after
927 unsuccessful or partially successful method invocation. This information
928 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
929 and then shown to the client in addition to the plain 32-bit result code.
930
931 In MS COM, this interface extends the IErrorInfo interface,
932 in XPCOM, it extends the nsIException interface. In both cases,
933 it provides a set of common attributes to retrieve error
934 information.
935
936 Sometimes invocation of some component's method may involve methods of
937 other components that may also fail (independently of this method's
938 failure), or a series of non-fatal errors may precede a fatal error that
939 causes method failure. In cases like that, it may be desirable to preserve
940 information about all errors happened during method invocation and deliver
941 it to the caller. The <link to="#next"/> attribute is intended
942 specifically for this purpose and allows to represent a chain of errors
943 through a single IVirtualBoxErrorInfo object set after method invocation.
944
945 Note that errors are stored to a chain in the reverse order, i.e. the
946 initial error object you query right after method invocation is the last
947 error set by the callee, the object it points to in the @a next attribute
948 is the previous error and so on, up to the first error (which is the last
949 in the chain).
950 </desc>
951
952 <attribute name="resultCode" type="result" readonly="yes">
953 <desc>
954 Result code of the error.
955 Usually, it will be the same as the result code returned
956 by the method that provided this error information, but not
957 always. For example, on Win32, CoCreateInstance() will most
958 likely return E_NOINTERFACE upon unsuccessful component
959 instantiation attempt, but not the value the component factory
960 returned.
961 <note>
962 In MS COM, there is no equivalent.
963 In XPCOM, it is the same as nsIException::result.
964 </note>
965 </desc>
966 </attribute>
967
968 <attribute name="interfaceID" type="uuid" readonly="yes">
969 <desc>
970 UUID of the interface that defined the error.
971 <note>
972 In MS COM, it is the same as IErrorInfo::GetGUID.
973 In XPCOM, there is no equivalent.
974 </note>
975 </desc>
976 </attribute>
977
978 <attribute name="component" type="wstring" readonly="yes">
979 <desc>
980 Name of the component that generated the error.
981 <note>
982 In MS COM, it is the same as IErrorInfo::GetSource.
983 In XPCOM, there is no equivalent.
984 </note>
985 </desc>
986 </attribute>
987
988 <attribute name="text" type="wstring" readonly="yes">
989 <desc>
990 Text description of the error.
991 <note>
992 In MS COM, it is the same as IErrorInfo::GetDescription.
993 In XPCOM, it is the same as nsIException::message.
994 </note>
995 </desc>
996 </attribute>
997
998 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
999 <desc>
1000 Next error object if there is any, or @c null otherwise.
1001 <note>
1002 In MS COM, there is no equivalent.
1003 In XPCOM, it is the same as nsIException::inner.
1004 </note>
1005 </desc>
1006 </attribute>
1007
1008 </interface>
1009
1010
1011 <!--
1012 // IVirtualBox
1013 /////////////////////////////////////////////////////////////////////////
1014 -->
1015
1016 <interface
1017 name="IVirtualBoxCallback" extends="$unknown"
1018 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1019 wsmap="suppress"
1020 >
1021 <method name="onMachineStateChange">
1022 <desc>
1023 The execution state of the given machine has changed.
1024 <see>IMachine::state</see>
1025 </desc>
1026 <param name="machineId" type="uuid" dir="in">
1027 <desc>ID of the machine this event relates to.</desc>
1028 </param>
1029 <param name="state" type="MachineState" dir="in">
1030 <desc>New execution state.</desc>
1031 </param>
1032 </method>
1033
1034 <method name="onMachineDataChange">
1035 <desc>
1036 Any of the settings of the given machine has changed.
1037 </desc>
1038 <param name="machineId" type="uuid" dir="in">
1039 <desc>ID of the machine this event relates to.</desc>
1040 </param>
1041 </method>
1042
1043 <method name="onExtraDataCanChange">
1044 <desc>
1045 Notification when someone tries to change extra data for
1046 either the given machine or (if null) global extra data.
1047 This gives the chance to veto against changes.
1048 </desc>
1049 <param name="machineId" type="uuid" dir="in">
1050 <desc>
1051 ID of the machine this event relates to
1052 (null ID for global extra data change requests).
1053 </desc>
1054 </param>
1055 <param name="key" type="wstring" dir="in">
1056 <desc>
1057 Extra data key for the attempted write.
1058 </desc>
1059 </param>
1060 <param name="value" type="wstring" dir="in">
1061 <desc>
1062 Extra data value for the given key.
1063 </desc>
1064 </param>
1065 <param name="error" type="wstring" dir="out">
1066 <desc>
1067 Optional error message describing the reason of the
1068 veto (ignored if this notification returns @c true).
1069 </desc>
1070 </param>
1071 <param name="allowChange" type="boolean" dir="return">
1072 <desc>
1073 Flag to indicate whether the callee agrees (@c true)
1074 or vetoes against the change (@c false).
1075 </desc>
1076 </param>
1077 </method>
1078
1079 <method name="onExtraDataChange">
1080 <desc>
1081 Notification when machine specific or global extra data
1082 has changed.
1083 </desc>
1084 <param name="machineId" type="uuid" dir="in">
1085 <desc>
1086 ID of the machine this event relates to.
1087 Null for global extra data changes.
1088 </desc>
1089 </param>
1090 <param name="key" type="wstring" dir="in">
1091 <desc>
1092 Extra data key that has changed.
1093 </desc>
1094 </param>
1095 <param name="value" type="wstring" dir="in">
1096 <desc>
1097 Extra data value for the given key.
1098 </desc>
1099 </param>
1100 </method>
1101
1102 <method name="onMediaRegistered">
1103 <desc>
1104 The given media was registered or unregistered
1105 within this VirtualBox installation.
1106
1107 The @a mediaType parameter describes what type of
1108 media the specified @a mediaId refers to. Possible
1109 values are:
1110
1111 <ul>
1112 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1113 that, if registered, can be obtained using the
1114 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1115 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1116 that, if registered, can be obtained using the
1117 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1118 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1119 that, if registered, can be obtained using the
1120 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1121 </ul>
1122
1123 Note that if this is a deregistration notification,
1124 there is no way to access the object representing the
1125 unregistered media. It is supposed that the
1126 application will do required cleanup based on the @a
1127 mediaId value.
1128 </desc>
1129 <param name="mediaId" type="uuid" dir="in">
1130 <desc>ID of the media this event relates to.</desc>
1131 </param>
1132 <param name="mediaType" type="DeviceType" dir="in">
1133 <desc>Type of the media this event relates to.</desc>
1134 </param>
1135 <param name="registered" type="boolean" dir="in">
1136 <desc>
1137 If true, the media was registered, otherwise it was
1138 unregistered.
1139 </desc>
1140 </param>
1141 </method>
1142
1143 <method name="onMachineRegistered">
1144 <desc>
1145 The given machine was registered or unregistered
1146 within this VirtualBox installation.
1147 </desc>
1148 <param name="machineId" type="uuid" dir="in">
1149 <desc>ID of the machine this event relates to.</desc>
1150 </param>
1151 <param name="registered" type="boolean" dir="in">
1152 <desc>
1153 If true, the machine was registered, otherwise it was
1154 unregistered.
1155 </desc>
1156 </param>
1157 </method>
1158
1159 <method name="onSessionStateChange">
1160 <desc>
1161 The state of the session for the given machine was changed.
1162 <see>IMachine::sessionState</see>
1163 </desc>
1164 <param name="machineId" type="uuid" dir="in">
1165 <desc>ID of the machine this event relates to.</desc>
1166 </param>
1167 <param name="state" type="SessionState" dir="in">
1168 <desc>New session state.</desc>
1169 </param>
1170 </method>
1171
1172 <method name="onSnapshotTaken">
1173 <desc>
1174 A new snapshot of the machine has been taken.
1175 <see>ISnapshot</see>
1176 </desc>
1177 <param name="machineId" type="uuid" dir="in">
1178 <desc>ID of the machine this event relates to.</desc>
1179 </param>
1180 <param name="snapshotId" type="uuid" dir="in">
1181 <desc>ID of the new snapshot.</desc>
1182 </param>
1183 </method>
1184
1185 <method name="onSnapshotDiscarded">
1186 <desc>
1187 Snapshot of the given machine has been discarded.
1188
1189 <note>
1190 This notification is delivered <b>after</b> the snapshot
1191 object has been uninitialized on the server (so that any
1192 attempt to call its methods will return an error).
1193 </note>
1194
1195 <see>ISnapshot</see>
1196 </desc>
1197 <param name="machineId" type="uuid" dir="in">
1198 <desc>ID of the machine this event relates to.</desc>
1199 </param>
1200 <param name="snapshotId" type="uuid" dir="in">
1201 <desc>
1202 ID of the discarded snapshot. <tt>null</tt> means the
1203 current machine state has been discarded (restored from
1204 the current snapshot).
1205 </desc>
1206 </param>
1207 </method>
1208
1209 <method name="onSnapshotChange">
1210 <desc>
1211 Snapshot properties (name and/or description) have been changed.
1212 <see>ISnapshot</see>
1213 </desc>
1214 <param name="machineId" type="uuid" dir="in">
1215 <desc>ID of the machine this event relates to.</desc>
1216 </param>
1217 <param name="snapshotId" type="uuid" dir="in">
1218 <desc>ID of the changed snapshot.</desc>
1219 </param>
1220 </method>
1221
1222 <method name="onGuestPropertyChange">
1223 <desc>
1224 Notification when a guest property has changed.
1225 </desc>
1226 <param name="machineId" type="uuid" dir="in">
1227 <desc>
1228 ID of the machine this event relates to.
1229 </desc>
1230 </param>
1231 <param name="name" type="wstring" dir="in">
1232 <desc>
1233 The name of the property that has changed.
1234 </desc>
1235 </param>
1236 <param name="value" type="wstring" dir="in">
1237 <desc>
1238 The new property value.
1239 </desc>
1240 </param>
1241 <param name="flags" type="wstring" dir="in">
1242 <desc>
1243 The new property flags.
1244 </desc>
1245 </param>
1246 </method>
1247
1248 </interface>
1249
1250 <interface
1251 name="IVirtualBox" extends="$dispatched"
1252 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1253 wsmap="managed"
1254 >
1255 <desc>
1256 The IVirtualBox interface represents the main interface exposed by the
1257 product that provides virtual machine management.
1258
1259 An instance of IVirtualBox is required for the product to do anything
1260 useful. Even though the interface does not expose this, internally,
1261 IVirtualBox is implemented as a singleton and actually lives in the
1262 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1263 IVirtualBox can track the state of all virtual machines on a particular
1264 host, regardless of which frontend started them.
1265
1266 To enumerate all the virtual machines on the host, use the
1267 <link to="IVirtualBox::machines2"/> attribute.
1268 </desc>
1269
1270 <attribute name="version" type="wstring" readonly="yes">
1271 <desc>
1272 A string representing the version number of the product. The
1273 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1274 last number represents the build number and will frequently change.
1275 </desc>
1276 </attribute>
1277
1278 <attribute name="revision" type="unsigned long" readonly="yes">
1279 <desc>
1280 The internal build revision number of the product.
1281 </desc>
1282 </attribute>
1283
1284 <attribute name="packageType" type="wstring" readonly="yes">
1285 <desc>
1286 A string representing the package type of this product. The
1287 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1288 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1289 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1290 this.
1291 </desc>
1292 </attribute>
1293
1294 <attribute name="homeFolder" type="wstring" readonly="yes">
1295 <desc>
1296 Full path to the directory where the global settings file,
1297 <tt>VirtualBox.xml</tt>, is stored.
1298
1299 In this version of VirtualBox, the value of this property is
1300 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1301 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1302 as determined by the host OS), and cannot be changed.
1303
1304 This path is also used as the base to resolve relative paths in
1305 places where relative paths are allowed (unless otherwise
1306 expressly indicated).
1307 </desc>
1308 </attribute>
1309
1310 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1311 <desc>
1312 Full name of the global settings file.
1313 The value of this property corresponds to the value of
1314 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1315 </desc>
1316 </attribute>
1317
1318 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1319 <desc>
1320 Current version of the format of the global VirtualBox settings file
1321 (<tt>VirtualBox.xml</tt>).
1322
1323 The version string has the following format:
1324 <pre>
1325 x.y-platform
1326 </pre>
1327 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1328 versions, and <tt>platform</tt> is the platform identifier.
1329
1330 The current version usually matches the value of the
1331 <link to="#settingsFormatVersion"/> attribute unless the
1332 settings file was created by an older version of VirtualBox and there
1333 was a change of the settings file format since then.
1334
1335 Note that VirtualBox automatically converts settings files from older
1336 versions to the most recent version when reading them (usually at
1337 VirtualBox startup) but it doesn't save the changes back until
1338 you call a method that implicitly saves settings (such as
1339 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1340 explicitly. Therefore, if the value of this attribute differs from the
1341 value of <link to="#settingsFormatVersion"/>, then it
1342 means that the settings file was converted but the result of the
1343 conversion is not yet saved to disk.
1344
1345 The above feature may be used by interactive front-ends to inform users
1346 about the settings file format change and offer them to explicitly save
1347 all converted settings files (the global and VM-specific ones),
1348 optionally create backup copies of the old settings files before saving,
1349 etc.
1350
1351 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1352 </desc>
1353 </attribute>
1354
1355 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1356 <desc>
1357 Most recent version of the settings file format.
1358
1359 The version string has the following format:
1360 <pre>
1361 x.y-platform
1362 </pre>
1363 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1364 versions, and <tt>platform</tt> is the platform identifier.
1365
1366 VirtualBox uses this version of the format when saving settings files
1367 (either as a result of method calls that require to save settings or as
1368 a result of an explicit call to <link to="#saveSettings()"/>).
1369
1370 <see>settingsFileVersion</see>
1371 </desc>
1372 </attribute>
1373
1374 <attribute name="host" type="IHost" readonly="yes">
1375 <desc>Associated host object.</desc>
1376 </attribute>
1377
1378 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1379 <desc>Associated system information object.</desc>
1380 </attribute>
1381
1382 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1383 <desc>
1384 Array of machine objects registered within this VirtualBox instance.
1385 </desc>
1386 </attribute>
1387
1388 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1389 <desc>
1390 Array of hard disk objects known to this VirtualBox installation.
1391
1392 This array contains only base (root) hard disks. All differencing
1393 hard disks of the given base hard disk can be enumerated using
1394 <link to="IHardDisk2::children"/>.
1395 </desc>
1396 </attribute>
1397
1398 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1399 <desc>
1400 Array of CD/DVD image objects registered with this VirtualBox instance.
1401 </desc>
1402 </attribute>
1403
1404 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1405 <desc>
1406 Array of floppy image objects registered with this VirtualBox instance.
1407 </desc>
1408 </attribute>
1409
1410 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1411
1412 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1413
1414 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1415 <desc>
1416 Collection of global shared folders. Global shared folders are
1417 available to all virtual machines.
1418
1419 New shared folders are added to the collection using
1420 <link to="#createSharedFolder"/>. Existing shared folders can be
1421 removed using <link to="#removeSharedFolder"/>.
1422
1423 <note>
1424 In the current version of the product, global shared folders are not
1425 implemented and therefore this collection is always empty.
1426 </note>
1427 </desc>
1428 </attribute>
1429
1430 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1431 <desc>
1432 Associated performance collector object.
1433 </desc>
1434 </attribute>
1435
1436 <method name="createMachine">
1437 <desc>
1438 Creates a new virtual machine.
1439
1440 The new machine is created unregistered, with the initial configuration
1441 set according to the specified guest OS type. A typical sequence of
1442 actions to create a new virtual machine is as follows:
1443
1444 <ol>
1445 <li>
1446 Call this method to have a new machine created. The returned machine
1447 object will be "mutable" allowing to change any machine property.
1448 </li>
1449
1450 <li>
1451 Configure the machine using the appropriate attributes and methods.
1452 </li>
1453
1454 <li>
1455 Call <link to="IMachine::saveSettings()" /> to write the settings
1456 to the machine's XML settings file. The configuration of the newly
1457 created machine will not be saved to disk until this method is
1458 called.
1459 </li>
1460
1461 <li>
1462 Call <link to="#registerMachine()" /> to add the machine to the list
1463 of machines known to VirtualBox.
1464 </li>
1465 </ol>
1466
1467 You should specify valid name for the newly created machine when calling
1468 this method. See the <link to="IMachine::name"/> attribute description
1469 for more details about the machine name.
1470
1471 The specified guest OS type identifier must match an ID of one of known
1472 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1473 array.
1474
1475 Every machine has a <i>settings file</i> that is used to store
1476 the machine configuration. This file is stored in a directory called the
1477 <i>machine settings subfolder</i>. Both the settings subfolder and file
1478 will have a name that corresponds to the name of the virtual machine.
1479 You can specify where to create the machine setting subfolder using the
1480 @a baseFolder argument. The base folder can be absolute (full path) or
1481 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1482 directory</link>.
1483
1484 If @a baseFolder is a null or empty string (which is recommended), the
1485 <link to="ISystemProperties::defaultMachineFolder">default machine
1486 settings folder</link> will be used as a base folder for the created
1487 machine. Otherwise the given base folder will be used. In either case,
1488 the full path to the resulting settings file has the following
1489 structure:
1490 <pre>
1491 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1492 </pre>
1493
1494 Note that if the resulting settings file already exists, this method
1495 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1496
1497 Optionally, you may specify an UUID of to assign to the created machine.
1498 However, this is not recommended and you should normally pass an empty
1499 (null) UUID to this method so that a new UUID will be automatically
1500 generated for every created machine.
1501
1502 <note>
1503 There is no way to change the name of the settings file or
1504 subfolder of the created machine directly.
1505 </note>
1506
1507 <result name="VBOX_E_OBJECT_NOT_FOUND">
1508 @a osTypeId is invalid.
1509 </result>
1510 <result name="VBOX_E_FILE_ERROR">
1511 Resulting settings file name is invalid or the settings file already
1512 exists or could not be created due to an I/O error.
1513 </result>
1514 <result name="E_INVALIDARG">
1515 @a name is empty or null.
1516 </result>
1517 </desc>
1518
1519 <param name="name" type="wstring" dir="in">
1520 <desc>Machine name.</desc>
1521 </param>
1522 <param name="osTypeId" type="wstring" dir="in">
1523 <desc>Guest OS Type ID.</desc>
1524 </param>
1525 <param name="baseFolder" type="wstring" dir="in">
1526 <desc>Base machine folder (optional).</desc>
1527 </param>
1528 <param name="id" type="uuid" dir="in">
1529 <desc>Machine UUID (optional).</desc>
1530 </param>
1531 <param name="machine" type="IMachine" dir="return">
1532 <desc>Created machine object.</desc>
1533 </param>
1534 </method>
1535
1536 <method name="createLegacyMachine">
1537 <desc>
1538 Creates a new virtual machine in "legacy" mode, using the specified
1539 settings file to store machine settings.
1540
1541 As opposed to machines created by <link to="#createMachine()"/>,
1542 the settings file of the machine created in "legacy" mode is not
1543 automatically renamed when the machine name is changed -- it will always
1544 remain the same as specified in this method call.
1545
1546 The specified settings file name can be absolute (full path) or relative
1547 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1548 directory</link>. If the file name doesn't contain an extension, the
1549 default extension (.xml) will be appended.
1550
1551 Note that the configuration of the newly created machine is not
1552 saved to disk (and therefore no settings file is created)
1553 until <link to="IMachine::saveSettings()"/> is called. If the
1554 specified settings file already exists, this method
1555 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1556
1557 See <link to="#createMachine()"/> for more information.
1558
1559 @deprecated This method may be removed later. Use <link
1560 to="IVirtualBox::createMachine()"/> instead.
1561
1562 <note>
1563 There is no way to change the name of the settings file
1564 of the machine created in "legacy" mode.
1565 </note>
1566
1567 <result name="VBOX_E_OBJECT_NOT_FOUND">
1568 @a osTypeId is invalid.
1569 </result>
1570 <result name="VBOX_E_FILE_ERROR">
1571 @a settingsFile is invalid or the settings file already exists or
1572 could not be created due to an I/O error.
1573 </result>
1574 <result name="E_INVALIDARG">
1575 @a name or @a settingsFile is empty or null.
1576 </result>
1577 </desc>
1578
1579 <param name="name" type="wstring" dir="in">
1580 <desc>Machine name.</desc>
1581 </param>
1582 <param name="osTypeId" type="wstring" dir="in">
1583 <desc>Machine OS Type ID.</desc>
1584 </param>
1585 <param name="settingsFile" type="wstring" dir="in">
1586 <desc>Name of the machine settings file.</desc>
1587 </param>
1588 <param name="id" type="uuid" dir="in">
1589 <desc>Machine UUID (optional).</desc>
1590 </param>
1591 <param name="machine" type="IMachine" dir="return">
1592 <desc>Created machine object.</desc>
1593 </param>
1594 </method>
1595
1596 <method name="openMachine">
1597 <desc>
1598 Opens a virtual machine from the existing settings file.
1599 The opened machine remains unregistered until you call
1600 <link to="#registerMachine()"/>.
1601
1602 The specified settings file name can be absolute
1603 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1604 VirtualBox home directory</link>. This file must exist
1605 and must be a valid machine settings file whose contents
1606 will be used to construct the machine object.
1607
1608 @deprecated Will be removed soon.
1609 <result name="VBOX_E_FILE_ERROR">
1610 Settings file name invalid, not found or sharing violation.
1611 </result>
1612 </desc>
1613 <param name="settingsFile" type="wstring" dir="in">
1614 <desc>
1615 Name of the machine settings file.
1616 </desc>
1617 </param>
1618 <param name="machine" type="IMachine" dir="return">
1619 <desc>Opened machine object.</desc>
1620 </param>
1621 <note>
1622 <link to="IMachine::settingsModified"/> will return
1623 false for the created machine, until any of machine settings
1624 are changed.
1625 </note>
1626 </method>
1627
1628 <method name="registerMachine">
1629 <desc>
1630
1631 Registers the machine previously created using
1632 <link to="#createMachine()"/> or opened using
1633 <link to="#openMachine()"/> within this VirtualBox installation. After
1634 successful method invocation, the
1635 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1636 to all registered callbacks.
1637
1638 <note>
1639 This method implicitly calls <link to="IMachine::saveSettings"/>
1640 to save all current machine settings before registering it.
1641 </note>
1642
1643 <result name="VBOX_E_INVALID_OBJECT_STATE">
1644 Virtual machine was not created within this VirtualBox instance.
1645 </result>
1646
1647 </desc>
1648 <param name="machine" type="IMachine" dir="in"/>
1649 </method>
1650
1651 <method name="getMachine">
1652 <desc>
1653 Attempts to find a virtual machine given its UUID.
1654 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1655 instead.
1656
1657 <result name="VBOX_E_FILE_ERROR">
1658 Could not find registered machine matching @a id.
1659 </result>
1660
1661 </desc>
1662 <param name="id" type="uuid" dir="in"/>
1663 <param name="machine" type="IMachine" dir="return"/>
1664 </method>
1665
1666 <method name="findMachine">
1667 <desc>
1668 Attempts to find a virtual machine given its name.
1669 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1670 instead.
1671
1672 <result name="VBOX_E_FILE_ERROR">
1673 Could not find registered machine matching @a name.
1674 </result>
1675
1676 </desc>
1677 <param name="name" type="wstring" dir="in"/>
1678 <param name="machine" type="IMachine" dir="return"/>
1679 </method>
1680
1681 <method name="unregisterMachine">
1682 <desc>
1683
1684 Unregisters the machine previously registered using
1685 <link to="#registerMachine"/>. After successful method invocation, the
1686 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1687 to all registered callbacks.
1688
1689 <note>
1690 The specified machine must not be in the Saved state, have an open
1691 (or a spawning) direct session associated with it, have snapshots or
1692 have hard disks attached.
1693 </note>
1694
1695 <note>
1696 This method implicitly calls <link to="IMachine::saveSettings"/> to
1697 save all current machine settings before unregistering it.
1698 </note>
1699
1700 <note>
1701 If the given machine is inaccessible (see
1702 <link to="IMachine::accessible"/>), it will be unregistered and
1703 fully uninitialized right afterwards. As a result, the returned
1704 machine object will be unusable and an attempt to call
1705 <b>any</b> method will return the "Object not ready" error.
1706 </note>
1707
1708 <result name="VBOX_E_FILE_ERROR">
1709 Could not find registered machine matching @a id.
1710 </result>
1711 <result name="VBOX_E_INVALID_VM_STATE">
1712 Machine is in Saved state.
1713 </result>
1714 <result name="VBOX_E_INVALID_OBJECT_STATE">
1715 Machine has snapshot or open session or hard disk attached.
1716 </result>
1717
1718 </desc>
1719 <param name="id" type="uuid" dir="in">
1720 <desc>UUID of the machine to unregister.</desc>
1721 </param>
1722 <param name="machine" type="IMachine" dir="return">
1723 <desc>Unregistered machine object.</desc>
1724 </param>
1725 </method>
1726
1727 <method name="createHardDisk2">
1728 <desc>
1729 Creates a new base hard disk object that will use the given storage
1730 format and location for hard disk data.
1731
1732 Note that the actual storage unit is not created by this method. In
1733 order to do it, and before you are able to attach the created hard disk
1734 to virtual machines, you must call one of the following methods to
1735 allocate a format-specific storage unit at the specified location:
1736 <ul>
1737 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1738 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1739 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1740 </ul>
1741
1742 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1743 remain uninitialized until the hard disk storage unit is successfully
1744 created by one of the above methods.
1745
1746 After the storage unit is successfully created, the hard disk gets
1747 remembered by this VirtualBox installation and will be accessible
1748 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1749 methods. Remembered root (base) hard disks are also returned as part of
1750 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1751
1752 The list of all storage formats supported by this VirtualBox
1753 installation can be obtained using
1754 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1755 attribute is empty or <tt>null</tt> then the default storage format
1756 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1757 be used for creating a storage unit of the hard disk.
1758
1759 Note that the format of the location string is storage format specific.
1760 See <link to="IMedium::location"/>, IHardDisk2 and
1761 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1762
1763 <result name="VBOX_E_OBJECT_NOT_FOUND">
1764 @a format identifier is invalid. See
1765 <link to="ISystemProperties::hardDiskFormats"/>.
1766 </result>
1767 <result name="VBOX_E_FILE_ERROR">
1768 @a location is a not valid file name (for file-based formats only).
1769 </result>
1770 <result name="E_INVALIDARG">
1771 @a format is a null or empty string.
1772 </result>
1773 </desc>
1774 <param name="format" type="wstring" dir="in">
1775 <desc>
1776 Identifier of the storage format to use for the new hard disk.
1777 </desc>
1778 </param>
1779 <param name="location" type="wstring" dir="in">
1780 <desc>
1781 Location of the storage unit for the new hard disk.
1782 </desc>
1783 </param>
1784 <param name="hardDisk" type="IHardDisk2" dir="return">
1785 <desc>Created hard disk object.</desc>
1786 </param>
1787 </method>
1788
1789 <method name="openHardDisk2">
1790 <desc>
1791 Opens a hard disk from an existing location.
1792
1793 After the hard disk is successfully opened by this method, it gets
1794 remembered by (known to) this VirtualBox installation and will be
1795 accessible through <link to="#getHardDisk2()"/> and
1796 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1797 are also returned as part of the <link to="#hardDisks2"/> array and can
1798 be attached to virtual machines. See IHardDisk2 for more details.
1799
1800 If a differencing hard disk is to be opened by this method, the
1801 operation will succeed only if its parent hard disk and all ancestors,
1802 if any, are already known to this VirtualBox installation (for example,
1803 were opened by this method before).
1804
1805 This method tries to guess the storage format of the specified hard disk
1806 by reading hard disk data at the specified location.
1807
1808 Note that the format of the location string is storage format specific.
1809 See <link to="IMedium::location"/>, IHardDisk2 and
1810 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1811
1812
1813 <result name="VBOX_E_FILE_ERROR">
1814 Invalid hard disk storage file location.
1815 </result>
1816 <result name="VBOX_E_IPRT_ERROR">
1817 Could not get hard disk storage format.
1818 </result>
1819 <result name="E_INVALIDARG">
1820 Invalid hard disk storage format.
1821 </result>
1822
1823 </desc>
1824 <param name="location" type="wstring" dir="in">
1825 <desc>
1826 Location of the storage unit that contains hard disk data in one of
1827 the supported storage formats.
1828 </desc>
1829 </param>
1830 <param name="hardDisk" type="IHardDisk2" dir="return">
1831 <desc>Opened hard disk object.</desc>
1832 </param>
1833 </method>
1834
1835 <method name="getHardDisk2" const="yes">
1836 <desc>
1837 Returns a hard disk with the given UUID.
1838
1839 The hard disk with the given UUID must be known to this VirtualBox
1840 installation, i.e. it must be previously created by
1841 <link to="#createHardDisk2()"/> or opened by <link
1842 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1843
1844 <result name="VBOX_E_OBJECT_NOT_FOUND">
1845 No hard disk object matching @a id found.
1846 </result>
1847
1848 </desc>
1849 <param name="id" type="uuid" dir="in">
1850 <desc>UUID of the hard disk to look for.</desc>
1851 </param>
1852 <param name="hardDisk" type="IHardDisk2" dir="return">
1853 <desc>Found hard disk object.</desc>
1854 </param>
1855 </method>
1856
1857 <method name="findHardDisk2">
1858 <desc>
1859 Returns a hard disk that uses the given location to store hard
1860 disk data.
1861
1862 The given hard disk must be known to this VirtualBox installation, i.e.
1863 it must be previously created by
1864 <link to="#createHardDisk2()"/> or opened by <link
1865 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1866
1867 The search is done by comparing the value of the @a location argument to
1868 the <link to="IHardDisk2::location"/> attribute of each known hard
1869 disk.
1870
1871 For locations represented by file names in the host's file system, the
1872 requested location can be a path relative to the
1873 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1874 only a file name without any path is given, the
1875 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1876 folder</link> will be prepended to the file name before searching. Note
1877 that on case sensitive file systems, a case sensitive comparison is
1878 performed, otherwise the case of symbols in the file path is ignored.
1879
1880 <result name="VBOX_E_OBJECT_NOT_FOUND">
1881 No hard disk object matching @a location found.
1882 </result>
1883
1884 </desc>
1885 <param name="location" type="wstring" dir="in">
1886 <desc>Location string to search for.</desc>
1887 </param>
1888 <param name="hardDisk" type="IHardDisk2" dir="return">
1889 <desc>Found hard disk object.</desc>
1890 </param>
1891 </method>
1892
1893 <method name="openDVDImage">
1894 <desc>
1895 Opens a CD/DVD image contained in the specified file of the supported
1896 format and assigns it the given UUID.
1897
1898 After the image is successfully opened by this method, it gets
1899 remembered by (known to) this VirtualBox installation and will be
1900 accessible through <link to="#getDVDImage()"/> and
1901 <link to="#findDVDImage()"/> methods. Remembered images are also
1902 returned as part of the <link to="#DVDImages"/> array and can be mounted
1903 to virtual machines. See IMedium for more details.
1904
1905 See <link to="IMedium::location"/> to get more details about the format
1906 of the location string.
1907
1908 <note>
1909 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1910 </note>
1911
1912 <result name="VBOX_E_INVALID_OBJECT_STATE">
1913 CD/DVD image already exists in the media registry.
1914 </result>
1915
1916 </desc>
1917 <param name="location" type="wstring" dir="in">
1918 <desc>
1919 Full path to the file that contains a valid CD/DVD image.
1920 </desc>
1921 </param>
1922 <param name="id" type="uuid" dir="in">
1923 <desc>
1924 UUID to assign to the given image within this VirtualBox installation.
1925 If an empty (null) UUID is specified, the system will randomly
1926 generate a new UUID.
1927 </desc>
1928 </param>
1929 <param name="image" type="IDVDImage2" dir="return">
1930 <desc>Opened CD/DVD image object.</desc>
1931 </param>
1932 </method>
1933
1934 <method name="getDVDImage">
1935 <desc>
1936 Returns a CD/DVD image with the given UUID.
1937
1938 The image with the given UUID must be known to this VirtualBox
1939 installation, i.e. it must be previously opened by <link
1940 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1941
1942 <result name="VBOX_E_OBJECT_NOT_FOUND">
1943 No matching DVD image found in the media registry.
1944 </result>
1945
1946 </desc>
1947 <param name="id" type="uuid" dir="in">
1948 <desc>UUID of the image to look for.</desc>
1949 </param>
1950 <param name="image" type="IDVDImage2" dir="return">
1951 <desc>Found CD/DVD image object.</desc>
1952 </param>
1953 </method>
1954
1955 <method name="findDVDImage">
1956 <desc>
1957 Returns a CD/DVD image with the given image location.
1958
1959 The image with the given UUID must be known to this VirtualBox
1960 installation, i.e. it must be previously opened by <link
1961 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1962
1963 The search is done by comparing the value of the @a location argument to
1964 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1965
1966 The requested location can be a path relative to the
1967 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1968 only a file name without any path is given, the
1969 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1970 folder</link> will be prepended to the file name before searching. Note
1971 that on case sensitive file systems, a case sensitive comparison is
1972 performed, otherwise the case in the file path is ignored.
1973
1974 <result name="VBOX_E_FILE_ERROR">
1975 Invalid image file location.
1976 </result>
1977 <result name="VBOX_E_OBJECT_NOT_FOUND">
1978 No matching DVD image found in the media registry.
1979 </result>
1980
1981 </desc>
1982 <param name="location" type="wstring" dir="in">
1983 <desc>CD/DVD image file path to look for.</desc>
1984 </param>
1985 <param name="image" type="IDVDImage2" dir="return">
1986 <desc>Found CD/DVD image object.</desc>
1987 </param>
1988 </method>
1989
1990 <method name="openFloppyImage">
1991 <desc>
1992 Opens a floppy image contained in the specified file of the supported
1993 format and assigns it the given UUID.
1994
1995 After the image is successfully opened by this method, it gets
1996 remembered by (known to) this VirtualBox installation and will be
1997 accessible through <link to="#getFloppyImage()"/> and
1998 <link to="#findFloppyImage()"/> methods. Remembered images are also
1999 returned as part of the <link to="#floppyImages"/> array and can be
2000 mounted to virtual machines. See IMedium for more details.
2001
2002 See <link to="IMedium::location"/> to get more details about the format
2003 of the location string.
2004
2005 <result name="VBOX_E_FILE_ERROR">
2006 Floppy image specified by @a location not accessible.
2007 </result>
2008 <result name="VBOX_E_INVALID_OBJECT_STATE">
2009 Floppy image already exists in the media registry.
2010 </result>
2011
2012 <note>
2013 Currently, only raw floppy images are supported by VirtualBox.
2014 </note>
2015 </desc>
2016 <param name="location" type="wstring" dir="in">
2017 <desc>
2018 Full path to the file that contains a valid floppy image.
2019 </desc>
2020 </param>
2021 <param name="id" type="uuid" dir="in">
2022 <desc>
2023 UUID to assign to the given image file within this VirtualBox
2024 installation. If an empty (null) UUID is specified, the system will
2025 randomly generate a new UUID.
2026 </desc>
2027 </param>
2028 <param name="image" type="IFloppyImage2" dir="return">
2029 <desc>Opened floppy image object.</desc>
2030 </param>
2031 </method>
2032
2033 <method name="getFloppyImage">
2034 <desc>
2035 Returns a floppy image with the given UUID.
2036
2037 The image with the given UUID must be known to this VirtualBox
2038 installation, i.e. it must be previously opened by <link
2039 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2040
2041 <result name="VBOX_E_OBJECT_NOT_FOUND">
2042 No matching floppy image found in the media registry.
2043 </result>
2044
2045 </desc>
2046 <param name="id" type="uuid" dir="in">
2047 <desc>UUID of the image to look for.</desc>
2048 </param>
2049 <param name="image" type="IFloppyImage2" dir="return">
2050 <desc>Found floppy image object.</desc>
2051 </param>
2052 </method>
2053
2054 <method name="findFloppyImage">
2055 <desc>
2056 Returns a floppy image with the given image location.
2057
2058 The image with the given UUID must be known to this VirtualBox
2059 installation, i.e. it must be previously opened by <link
2060 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2061
2062 The search is done by comparing the value of the @a location argument to
2063 the <link to="IMedium::location"/> attribute of each known floppy image.
2064
2065 The requested location can be a path relative to the
2066 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2067 only a file name without any path is given, the
2068 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2069 folder</link> will be prepended to the file name before searching. Note
2070 that on case sensitive file systems, a case sensitive comparison is
2071 performed, otherwise the case of symbols in the file path is ignored.
2072
2073 <result name="VBOX_E_FILE_ERROR">
2074 Invalid image file location.
2075 </result>
2076 <result name="VBOX_E_OBJECT_NOT_FOUND">
2077 No matching floppy image found in the media registry.
2078 </result>
2079
2080 </desc>
2081 <param name="location" type="wstring" dir="in">
2082 <desc>Floppy image file path to look for.</desc>
2083 </param>
2084 <param name="image" type="IFloppyImage2" dir="return">
2085 <desc>Found floppy image object.</desc>
2086 </param>
2087 </method>
2088
2089 <method name="getGuestOSType">
2090 <desc>
2091 Returns an object describing the specified guest OS type.
2092
2093 The requested guest OS type is specified using a string which is a
2094 mnemonic identifier of the guest operating system, such as
2095 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2096 particular virtual machine can be read or set using the
2097 <link to="IMachine::OSTypeId"/> attribute.
2098
2099 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2100 available guest OS type objects. Each object has an
2101 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2102 the guest OS this object describes.
2103
2104 <result name="E_INVALIDARG">
2105 @a id is not a valid Guest OS type.
2106 </result>
2107
2108 </desc>
2109 <param name="id" type="wstring" dir="in">
2110 <desc>Guest OS type ID string.</desc>
2111 </param>
2112 <param name="type" type="IGuestOSType" dir="return">
2113 <desc>Guest OS type object.</desc>
2114 </param>
2115 </method>
2116
2117 <method name="createSharedFolder">
2118 <desc>
2119 Creates a new global shared folder by associating the given logical
2120 name with the given host path, adds it to the collection of shared
2121 folders and starts sharing it. Refer to the description of
2122 <link to="ISharedFolder"/> to read more about logical names.
2123 <note>
2124 In the current implementation, this operation is not
2125 implemented.
2126 </note>
2127 </desc>
2128 <param name="name" type="wstring" dir="in">
2129 <desc>Unique logical name of the shared folder.</desc>
2130 </param>
2131 <param name="hostPath" type="wstring" dir="in">
2132 <desc>Full path to the shared folder in the host file system.</desc>
2133 </param>
2134 <param name="writable" type="boolean" dir="in">
2135 <desc>Whether the share is writable or readonly</desc>
2136 </param>
2137 </method>
2138
2139 <method name="removeSharedFolder">
2140 <desc>
2141 Removes the global shared folder with the given name previously
2142 created by <link to="#createSharedFolder"/> from the collection of
2143 shared folders and stops sharing it.
2144 <note>
2145 In the current implementation, this operation is not
2146 implemented.
2147 </note>
2148 </desc>
2149 <param name="name" type="wstring" dir="in">
2150 <desc>Logical name of the shared folder to remove.</desc>
2151 </param>
2152 </method>
2153
2154 <method name="getNextExtraDataKey">
2155 <desc>
2156 Returns the global extra data key name following the supplied key.
2157
2158 An error is returned if the supplied @a key does not exist. @c NULL is
2159 returned in @a nextKey if the supplied key is the last key. When
2160 supplying @c NULL for the @a key, the first key item is returned in @a
2161 nextKey (if there is any). @a nextValue is an optional parameter and
2162 if supplied, the next key's value is returned in it.
2163
2164 <result name="VBOX_E_OBJECT_NOT_FOUND">
2165 Extra data @a key not found.
2166 </result>
2167
2168 </desc>
2169 <param name="key" type="wstring" dir="in">
2170 <desc>Name of the data key to follow.</desc>
2171 </param>
2172 <param name="nextKey" type="wstring" dir="out">
2173 <desc>Name of the next data key.</desc>
2174 </param>
2175 <param name="nextValue" type="wstring" dir="out">
2176 <desc>Value of the next data key.</desc>
2177 </param>
2178 </method>
2179
2180 <method name="getExtraData">
2181 <desc>
2182 Returns associated global extra data.
2183
2184 If the requested data @a key does not exist, this function will
2185 succeed and return @c NULL in the @a value argument.
2186
2187 <result name="VBOX_E_FILE_ERROR">
2188 Settings file not accessible.
2189 </result>
2190 <result name="VBOX_E_XML_ERROR">
2191 Could not parse the settings file.
2192 </result>
2193
2194 </desc>
2195 <param name="key" type="wstring" dir="in">
2196 <desc>Name of the data key to get.</desc>
2197 </param>
2198 <param name="value" type="wstring" dir="return">
2199 <desc>Value of the requested data key.</desc>
2200 </param>
2201 </method>
2202
2203 <method name="setExtraData">
2204 <desc>
2205 Sets associated global extra data.
2206
2207 If you pass @c NULL as a key @a value, the given @a key will be
2208 deleted.
2209
2210 <note>
2211 Before performing the actual data change, this method will ask all
2212 registered callbacks using the
2213 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2214 notification for a permission. If one of the callbacks refuses the
2215 new value, the change will not be performed.
2216 </note>
2217 <note>
2218 On success, the
2219 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2220 is called to inform all registered callbacks about a successful data
2221 change.
2222 </note>
2223
2224 <result name="VBOX_E_FILE_ERROR">
2225 Settings file not accessible.
2226 </result>
2227 <result name="VBOX_E_XML_ERROR">
2228 Could not parse the settings file.
2229 </result>
2230 <result name="E_ACCESSDENIED">
2231 Modification request refused.
2232 </result>
2233
2234 </desc>
2235 <param name="key" type="wstring" dir="in">
2236 <desc>Name of the data key to set.</desc>
2237 </param>
2238 <param name="value" type="wstring" dir="in">
2239 <desc>Value to assign to the key.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="openSession">
2244 <desc>
2245 Opens a new direct session with the given virtual machine.
2246
2247 A direct session acts as a local lock on the given VM.
2248 There can be only one direct session open at a time for every
2249 virtual machine, protecting the VM from being manipulated by
2250 conflicting actions from different processes. Only after a
2251 direct session has been opened, one can change all VM settings
2252 and execute the VM in the process space of the session object.
2253
2254 Sessions therefore can be compared to mutex semaphores that
2255 lock a given VM for modification and execution.
2256 See <link to="ISession">ISession</link> for details.
2257
2258 <note>Unless you are writing a new VM frontend, you will not
2259 want to execute a VM in the current process. To spawn a new
2260 process that executes a VM, use
2261 <link to="IVirtualBox::openRemoteSession" />
2262 instead.</note>
2263
2264 Upon successful return, the session object can be used to
2265 get access to the machine and to the VM console.
2266
2267 In VirtualBox terminology, the machine becomes "mutable" after
2268 a session has been opened. Note that the "mutable" machine
2269 object, on which you may invoke IMachine methods to change its
2270 settings, will be a different object from the immutable IMachine
2271 objects returned by various IVirtualBox methods. To obtain a
2272 mutable IMachine object (upon which you can invoke settings methods),
2273 use the <link to="ISession::machine" /> attribute.
2274
2275 One must always call <link to="ISession::close" /> to release the
2276 lock on the machine, or the machine's state will eventually be
2277 set to "Aborted".
2278
2279 In other words, to change settings on a machine, the following
2280 sequence is typically performed:
2281
2282 <ol>
2283 <li>Call this method (openSession) to have a machine locked for
2284 the current session.</li>
2285
2286 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2287
2288 <li>Change the settings of the machine.</li>
2289
2290 <li>Call <link to="IMachine::saveSettings" />.</li>
2291
2292 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2293 </ol>
2294
2295 <result name="E_UNEXPECTED">
2296 Virtual machine not registered.
2297 </result>
2298 <result name="E_ACCESSDENIED">
2299 Process not started by OpenRemoteSession.
2300 </result>
2301 <result name="VBOX_E_INVALID_OBJECT_STATE">
2302 Session already open or being opened.
2303 </result>
2304 <result name="VBOX_E_VM_ERROR">
2305 Failed to assign machine to session.
2306 </result>
2307
2308 </desc>
2309 <param name="session" type="ISession" dir="in">
2310 <desc>
2311 Session object that will represent the opened session after
2312 successful method invocation. This object must not represent
2313 the already open session.
2314 <note>
2315 This session will be automatically closed if the
2316 VirtualBox server is terminated for some reason.
2317 </note>
2318 </desc>
2319 </param>
2320 <param name="machineId" type="uuid" dir="in">
2321 <desc>ID of the virtual machine to open a session with.</desc>
2322 </param>
2323 </method>
2324
2325 <method name="openRemoteSession">
2326 <desc>
2327 Spawns a new process that executes a virtual machine (called a
2328 "remote session").
2329
2330 Opening a remote session causes the VirtualBox server to start a new
2331 process that opens a direct session with the given VM. As a result, the
2332 VM is locked by that direct session in the new process, preventing
2333 conflicting changes from other processes. Since sessions act as locks
2334 that such prevent conflicting changes, one cannot open a remote session
2335 for a VM that already has another open session (direct or remote), or
2336 is currently in the process of opening one (see <link
2337 to="IMachine::sessionState"/>).
2338
2339 While the remote session still provides some level of control over the
2340 VM execution to the caller (using the <link to="IConsole" /> interface),
2341 not all VM settings are available for modification within the remote
2342 session context.
2343
2344 This operation can take some time (a new VM is started in a new process,
2345 for which memory and other resources need to be set up). Because of this,
2346 an <link to="IProgress" /> is returned to allow the caller to wait for this
2347 asynchronous operation to be completed. Until then, the remote session
2348 object remains in the closed state, and accessing the machine or its
2349 console through it is invalid. It is recommended to use
2350 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2351 completion.
2352
2353 As with all <link to="ISession" /> objects, it is recommended to call
2354 <link to="ISession::close" /> on the local session object once openRemoteSession()
2355 has been called. However, the session's state (see <link to="ISession::state" />)
2356 will not return to "Closed" until the remote session has also closed (i.e.
2357 until the VM is no longer running). In that case, however, the state of
2358 the session will automatically change back to "Closed".
2359
2360 Currently supported session types (values of the @a type
2361 argument) are:
2362 <ul>
2363 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2364 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2365 </ul>
2366
2367 The @a environment argument is a string containing definitions of
2368 environment variables in the following format:
2369 @code
2370 NAME[=VALUE]\n
2371 NAME[=VALUE]\n
2372 ...
2373 @endcode
2374 where <tt>\\n</tt> is the new line character. These environment
2375 variables will be appended to the environment of the VirtualBox server
2376 process. If an environment variable exists both in the server process
2377 and in this list, the value from this list takes precedence over the
2378 server's variable. If the value of the environment variable is
2379 omitted, this variable will be removed from the resulting environment.
2380 If the environment string is @c null, the server environment is
2381 inherited by the started process as is.
2382
2383 <see>openExistingSession</see>
2384
2385 <result name="E_UNEXPECTED">
2386 Virtual machine not registered.
2387 </result>
2388 <result name="E_INVALIDARG">
2389 Invalid session type @a type.
2390 </result>
2391 <result name="VBOX_E_OBJECT_NOT_FOUND">
2392 No machine matching @a machineId found.
2393 </result>
2394 <result name="VBOX_E_INVALID_OBJECT_STATE">
2395 Session already open or being opened.
2396 </result>
2397 <result name="VBOX_E_IPRT_ERROR">
2398 Launching process for machine failed.
2399 </result>
2400 <result name="VBOX_E_VM_ERROR">
2401 Failed to assign machine to session.
2402 </result>
2403
2404 </desc>
2405 <param name="session" type="ISession" dir="in">
2406 <desc>
2407 Session object that will represent the opened remote session
2408 after successful method invocation (this object must not
2409 represent an already open session).
2410 </desc>
2411 </param>
2412 <param name="machineId" type="uuid" dir="in">
2413 <desc>ID of the virtual machine to open a session with.</desc>
2414 </param>
2415 <param name="type" type="wstring" dir="in">
2416 <desc>
2417 Type of the remote session (case sensitive).
2418 </desc>
2419 </param>
2420 <param name="environment" type="wstring" dir="in">
2421 <desc>
2422 Environment to pass to the opened session (may be @c null).
2423 </desc>
2424 </param>
2425 <param name="progress" type="IProgress" dir="return">
2426 <desc>Progress object to track the operation completion.</desc>
2427 </param>
2428 </method>
2429
2430 <method name="openExistingSession">
2431 <desc>
2432 Opens a new remote session with the virtual machine for
2433 which a direct session is already open.
2434
2435 The remote session provides some level of control over the VM
2436 execution (using the IConsole interface) to the caller; however,
2437 within the remote session context, not all VM settings are available
2438 for modification.
2439
2440 As opposed to <link to="#openRemoteSession()"/>, the number of
2441 remote sessions opened this way is not limited by the API
2442
2443 <note>
2444 It is an error to open a remote session with the machine that
2445 doesn't have an open direct session.
2446 </note>
2447
2448 <result name="E_UNEXPECTED">
2449 Virtual machine not registered.
2450 </result>
2451 <result name="VBOX_E_OBJECT_NOT_FOUND">
2452 No machine matching @a machineId found.
2453 </result>
2454 <result name="VBOX_E_INVALID_OBJECT_STATE">
2455 Session already open or being opened.
2456 </result>
2457 <result name="VBOX_E_INVALID_SESSION_STATE">
2458 Direct session state not Open.
2459 </result>
2460 <result name="VBOX_E_VM_ERROR">
2461 Failed to get console object from direct session or assign
2462 machine to session.
2463 </result>
2464
2465 <see>openRemoteSession</see>
2466 </desc>
2467 <param name="session" type="ISession" dir="in">
2468 <desc>
2469 Session object that will represent the open remote session
2470 after successful method invocation. This object must not
2471 represent an already open session.
2472 <note>
2473 This session will be automatically closed when the peer
2474 (direct) session dies or gets closed.
2475 </note>
2476 </desc>
2477 </param>
2478 <param name="machineId" type="uuid" dir="in">
2479 <desc>ID of the virtual machine to open a session with.</desc>
2480 </param>
2481 </method>
2482
2483 <method name="registerCallback">
2484 <desc>
2485 Registers a new global VirtualBox callback. The methods of the given
2486 callback object will be called by VirtualBox when an appropriate
2487 event occurs.
2488
2489 <result name="E_INVALIDARG">
2490 Registering a @c NULL @a callback is pretty pointless, ain't it?
2491 <!-- See if someone is actually reading this and objects :-) -->
2492 </result>
2493
2494 </desc>
2495 <param name="callback" type="IVirtualBoxCallback" dir="in">
2496 <desc>Callback object to register.</desc>
2497 </param>
2498 </method>
2499
2500 <method name="unregisterCallback">
2501 <desc>
2502 Unregisters the previously registered global VirtualBox callback.
2503
2504 <result name="E_INVALIDARG">
2505 Specified @a callback not registered.
2506 </result>
2507
2508 </desc>
2509 <param name="callback" type="IVirtualBoxCallback" dir="in">
2510 <desc>Callback object to unregister.</desc>
2511 </param>
2512 </method>
2513
2514 <method name="waitForPropertyChange">
2515 <desc>
2516 Blocks the caller until any of the properties represented by the @a
2517 what argument changes the value or until the given timeout interval
2518 expires.
2519
2520 The @a what argument is a comma separated list of property masks that
2521 describe properties the caller is interested in. The property mask is
2522 a string in the following format:
2523
2524 <pre>
2525 [[group.]subgroup.]name
2526 </pre>
2527
2528 where @c name is the property name and @c group, @c subgroup are zero
2529 or more property group specifiers. Each element (group or name) in
2530 the property mask may be either a Latin string or an asterisk symbol
2531 (@c "*") which is used to match any string for the given element. A
2532 property mask that doesn't contain asterisk symbols represents a
2533 single fully qualified property name.
2534
2535 Groups in the fully qualified property name go from more generic (the
2536 left-most part) to more specific (the right-most part). The first
2537 element is usually a name of the object the property belongs to. The
2538 second element may be either a property name, or a child object name,
2539 or an index if the preceding element names an object which is one of
2540 many objects of the same type. This way, property names form a
2541 hierarchy of properties. Here are some examples of property names:
2542
2543 <table>
2544 <tr>
2545 <td><tt>VirtualBox.version</tt></td>
2546 <td><link to="IVirtualBox::version"/> property</td>
2547 </tr>
2548 <tr>
2549 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2550 <td><link to="IMachine::name"/> property of the machine with the
2551 given UUID</td>
2552 </tr>
2553 </table>
2554
2555 Most property names directly correspond to the properties of objects
2556 (components) provided by the VirtualBox library and may be used to
2557 track changes to these properties. However, there may be
2558 pseudo-property names that don't correspond to any existing object's
2559 property directly, as well as there may be object properties that
2560 don't have a corresponding property name that is understood by this
2561 method, and therefore changes to such properties cannot be
2562 tracked. See individual object's property descriptions to get a
2563 fully qualified property name that can be used with this method (if
2564 any).
2565
2566 There is a special property mask @c "*" (i.e. a string consisting of a
2567 single asterisk symbol) that can be used to match all properties.
2568 Below are more examples of property masks:
2569
2570 <table>
2571 <tr>
2572 <td><tt>VirtualBox.*</tt></td>
2573 <td>Track all properties of the VirtualBox object</td>
2574 </tr>
2575 <tr>
2576 <td><tt>Machine.*.name</tt></td>
2577 <td>Track changes to the <link to="IMachine::name"/> property of
2578 all registered virtual machines</td>
2579 </tr>
2580 </table>
2581
2582 <note>
2583 This function is not implemented in the current version of the
2584 product.
2585 </note>
2586 </desc>
2587 <param name="what" type="wstring" dir="in">
2588 <desc>Comma separated list of property masks.</desc>
2589 </param>
2590 <param name="timeout" type="unsigned long" dir="in">
2591 <desc>
2592 Wait timeout in milliseconds.
2593 Specify -1 for an indefinite wait.
2594 </desc>
2595 </param>
2596 <param name="changed" type="wstring" dir="out">
2597 <desc>
2598 Comma separated list of properties that have been changed and caused
2599 this method to return to the caller.
2600 </desc>
2601 </param>
2602 <param name="values" type="wstring" dir="out">
2603 <desc>Reserved, not currently used.</desc>
2604 </param>
2605 </method>
2606
2607 <method name="saveSettings">
2608 <desc>
2609 Saves the global settings to the global settings file
2610 (<link to="#settingsFilePath"/>).
2611
2612 This method is only useful for explicitly saving the global settings
2613 file after it has been auto-converted from the old format to the most
2614 recent format (see <link to="#settingsFileVersion"/> for details).
2615 Normally, the global settings file is implicitly saved when a global
2616 setting is changed.
2617
2618 <result name="VBOX_E_FILE_ERROR">
2619 Settings file not accessible.
2620 </result>
2621 <result name="VBOX_E_XML_ERROR">
2622 Could not parse the settings file.
2623 </result>
2624
2625 </desc>
2626 </method>
2627
2628 <method name="saveSettingsWithBackup">
2629 <desc>
2630 Creates a backup copy of the global settings file
2631 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2632 calls <link to="#saveSettings()"/>.
2633
2634 Note that the backup copy is created <b>only</b> if the settings file
2635 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2636 details). Otherwise, this call is fully equivalent to
2637 <link to="#saveSettings()"/> and no backup copying is done.
2638
2639 The backup copy is created in the same directory where the original
2640 settings file is located. It is given the following file name:
2641 <pre>
2642 original.xml.x.y-platform.bak
2643 </pre>
2644 where <tt>original.xml</tt> is the original settings file name
2645 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2646 format of the settings file (before auto-conversion).
2647
2648 If the given backup file already exists, this method will try to add the
2649 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2650 0 to 9) and copy it again until it succeeds. If all suffixes are
2651 occupied, or if any other copy error occurs, this method will return a
2652 failure.
2653
2654 If the copy operation succeeds, the @a bakFileName return argument will
2655 receive a full path to the created backup file (for informational
2656 purposes). Note that this will happen even if the subsequent
2657 <link to="#saveSettings()"/> call performed by this method after the
2658 copy operation, fails.
2659
2660 <note>
2661 The VirtualBox API never calls this method. It is intended purely for
2662 the purposes of creating backup copies of the settings files by
2663 front-ends before saving the results of the automatically performed
2664 settings conversion to disk.
2665 </note>
2666
2667 <see>settingsFileVersion</see>
2668
2669 <result name="VBOX_E_FILE_ERROR">
2670 Settings file not accessible.
2671 </result>
2672 <result name="VBOX_E_XML_ERROR">
2673 Could not parse the settings file.
2674 </result>
2675 <result name="VBOX_E_IPRT_ERROR">
2676 Could not copy the settings file.
2677 </result>
2678
2679 </desc>
2680 <param name="bakFileName" type="wstring" dir="return">
2681 <desc>Full path to the created backup copy.</desc>
2682 </param>
2683 </method>
2684
2685 </interface>
2686
2687 <!--
2688 // IMachine
2689 /////////////////////////////////////////////////////////////////////////
2690 -->
2691
2692 <enumerator
2693 name="IMachineEnumerator" type="IMachine"
2694 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2695 />
2696
2697 <collection
2698 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2699 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2700 readonly="yes"
2701 />
2702
2703 <interface
2704 name="IInternalMachineControl" extends="$unknown"
2705 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2706 internal="yes"
2707 wsmap="suppress"
2708 >
2709 <method name="updateState">
2710 <desc>
2711 Updates the VM state.
2712 <note>
2713 This operation will also update the settings file with
2714 the correct information about the saved state file
2715 and delete this file from disk when appropriate.
2716 </note>
2717 </desc>
2718 <param name="state" type="MachineState" dir="in"/>
2719 </method>
2720
2721 <method name="getIPCId">
2722 <param name="id" type="wstring" dir="return"/>
2723 </method>
2724
2725 <method name="runUSBDeviceFilters">
2726 <desc>
2727 Asks the server to run USB devices filters of the associated
2728 machine against the given USB device and tell if there is
2729 a match.
2730 <note>
2731 Intended to be used only for remote USB devices. Local
2732 ones don't require to call this method (this is done
2733 implicitly by the Host and USBProxyService).
2734 </note>
2735 </desc>
2736 <param name="device" type="IUSBDevice" dir="in"/>
2737 <param name="matched" type="boolean" dir="out"/>
2738 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2739 </method>
2740
2741 <method name="captureUSBDevice">
2742 <desc>
2743 Requests a capture of the given host USB device.
2744 When the request is completed, the VM process will
2745 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2746 notification.
2747 </desc>
2748 <param name="id" type="uuid" dir="in"/>
2749 </method>
2750
2751 <method name="detachUSBDevice">
2752 <desc>
2753 Notification that a VM is going to detach (done = false) or has
2754 already detached (done = true) the given USB device.
2755 When the done = true request is completed, the VM process will
2756 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2757 notification.
2758 <note>
2759 In the done = true case, the server must run its own filters
2760 and filters of all VMs but this one on the detached device
2761 as if it were just attached to the host computer.
2762 </note>
2763 </desc>
2764 <param name="id" type="uuid" dir="in"/>
2765 <param name="done" type="boolean" dir="in"/>
2766 </method>
2767
2768 <method name="autoCaptureUSBDevices">
2769 <desc>
2770 Requests a capture all matching USB devices attached to the host.
2771 When the request is completed, the VM process will
2772 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2773 notification per every captured device.
2774 </desc>
2775 </method>
2776
2777 <method name="detachAllUSBDevices">
2778 <desc>
2779 Notification that a VM that is being powered down. The done
2780 parameter indicates whether which stage of the power down
2781 we're at. When done = false the VM is announcing its
2782 intentions, while when done = true the VM is reporting
2783 what it has done.
2784 <note>
2785 In the done = true case, the server must run its own filters
2786 and filters of all VMs but this one on all detach devices as
2787 if they were just attached to the host computer.
2788 </note>
2789 </desc>
2790 <param name="done" type="boolean" dir="in"/>
2791 </method>
2792
2793 <method name="onSessionEnd">
2794 <desc>
2795 Triggered by the given session object when the session is about
2796 to close normally.
2797 </desc>
2798 <param name="session" type="ISession" dir="in">
2799 <desc>Session that is being closed</desc>
2800 </param>
2801 <param name="progress" type="IProgress" dir="return">
2802 <desc>
2803 Used to wait until the corresponding machine is actually
2804 dissociated from the given session on the server.
2805 Returned only when this session is a direct one.
2806 </desc>
2807 </param>
2808 </method>
2809
2810 <method name="beginSavingState">
2811 <desc>
2812 Called by the VM process to inform the server it wants to
2813 save the current state and stop the VM execution.
2814 </desc>
2815 <param name="progress" type="IProgress" dir="in">
2816 <desc>
2817 Progress object created by the VM process to wait until
2818 the state is saved.
2819 </desc>
2820 </param>
2821 <param name="stateFilePath" type="wstring" dir="out">
2822 <desc>
2823 File path the VM process must save the execution state to.
2824 </desc>
2825 </param>
2826 </method>
2827
2828 <method name="endSavingState">
2829 <desc>
2830 Called by the VM process to inform the server that saving
2831 the state previously requested by #beginSavingState is either
2832 successfully finished or there was a failure.
2833
2834 <result name="VBOX_E_FILE_ERROR">
2835 Settings file not accessible.
2836 </result>
2837 <result name="VBOX_E_XML_ERROR">
2838 Could not parse the settings file.
2839 </result>
2840
2841 </desc>
2842
2843 <param name="success" type="boolean" dir="in">
2844 <desc><tt>true</tt> to indicate success and <tt>false</tt>
2845 otherwise.
2846 </desc>
2847 </param>
2848 </method>
2849
2850 <method name="adoptSavedState">
2851 <desc>
2852 Gets called by IConsole::adoptSavedState.
2853 <result name="VBOX_E_FILE_ERROR">
2854 Invalid saved state file path.
2855 </result>
2856 </desc>
2857 <param name="savedStateFile" type="wstring" dir="in">
2858 <desc>Path to the saved state file to adopt.</desc>
2859 </param>
2860 </method>
2861
2862 <method name="beginTakingSnapshot">
2863 <desc>
2864 Called by the VM process to inform the server it wants to
2865 take a snapshot.
2866
2867 <result name="VBOX_E_FILE_ERROR">
2868 Settings file not accessible.
2869 </result>
2870 <result name="VBOX_E_XML_ERROR">
2871 Could not parse the settings file.
2872 </result>
2873 </desc>
2874 <param name="initiator" type="IConsole" dir="in">
2875 <desc>The console object that initiated this call.</desc>
2876 </param>
2877 <param name="name" type="wstring" dir="in">
2878 <desc>Snapshot name.</desc>
2879 </param>
2880 <param name="description" type="wstring" dir="in">
2881 <desc>Snapshot description.</desc>
2882 </param>
2883 <param name="progress" type="IProgress" dir="in">
2884 <desc>
2885 Progress object created by the VM process to wait until
2886 the state is saved (only for online snapshots).
2887 </desc>
2888 </param>
2889 <param name="stateFilePath" type="wstring" dir="out">
2890 <desc>
2891 File path the VM process must save the execution state to.
2892 </desc>
2893 </param>
2894 <param name="serverProgress" type="IProgress" dir="out">
2895 <desc>
2896 Progress object created by the server process to wait until
2897 the snapshot is taken (VDI diff creation, etc.).
2898 </desc>
2899 </param>
2900 </method>
2901
2902 <method name="endTakingSnapshot">
2903 <desc>
2904 Called by the VM process to inform the server that the snapshot
2905 previously requested by #beginTakingSnapshot is either
2906 successfully taken or there was a failure.
2907 </desc>
2908
2909 <param name="success" type="boolean" dir="in">
2910 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2911 </param>
2912 </method>
2913
2914 <method name="discardSnapshot">
2915 <desc>
2916 Gets called by IConsole::discardSnapshot.
2917 <result name="VBOX_E_INVALID_OBJECT_STATE">
2918 Snapshot has more than one child snapshot.
2919 </result>
2920 </desc>
2921 <param name="initiator" type="IConsole" dir="in">
2922 <desc>The console object that initiated this call.</desc>
2923 </param>
2924 <param name="id" type="uuid" dir="in">
2925 <desc>UUID of the snapshot to discard.</desc>
2926 </param>
2927 <param name="machineState" type="MachineState" dir="out">
2928 <desc>New machine state after this operation is started.</desc>
2929 </param>
2930 <param name="progress" type="IProgress" dir="return">
2931 <desc>Progress object to track the operation completion.</desc>
2932 </param>
2933 </method>
2934
2935 <method name="discardCurrentState">
2936 <desc>
2937 Gets called by IConsole::discardCurrentState.
2938 <result name="VBOX_E_INVALID_OBJECT_STATE">
2939 Virtual machine does not have any snapshot.
2940 </result>
2941 </desc>
2942 <param name="initiator" type="IConsole" dir="in">
2943 <desc>The console object that initiated this call.</desc>
2944 </param>
2945 <param name="machineState" type="MachineState" dir="out">
2946 <desc>New machine state after this operation is started.</desc>
2947 </param>
2948 <param name="progress" type="IProgress" dir="return">
2949 <desc>Progress object to track the operation completion.</desc>
2950 </param>
2951 </method>
2952
2953 <method name="discardCurrentSnapshotAndState">
2954 <desc>
2955 Gets called by IConsole::discardCurrentSnapshotAndState.
2956 <result name="VBOX_E_INVALID_OBJECT_STATE">
2957 Virtual machine does not have any snapshot.
2958 </result>
2959 </desc>
2960 <param name="initiator" type="IConsole" dir="in">
2961 <desc>The console object that initiated this call.</desc>
2962 </param>
2963 <param name="machineState" type="MachineState" dir="out">
2964 <desc>New machine state after this operation is started.</desc>
2965 </param>
2966 <param name="progress" type="IProgress" dir="return">
2967 <desc>Progress object to track the operation completion.</desc>
2968 </param>
2969 </method>
2970
2971 <method name="pullGuestProperties">
2972 <desc>
2973 Get the list of the guest properties matching a set of patterns along
2974 with their values, time stamps and flags and give responsibility for
2975 managing properties to the console.
2976 </desc>
2977 <param name="name" type="wstring" dir="out" safearray="yes">
2978 <desc>
2979 The names of the properties returned.
2980 </desc>
2981 </param>
2982 <param name="value" type="wstring" dir="out" safearray="yes">
2983 <desc>
2984 The values of the properties returned. The array entries match the
2985 corresponding entries in the @a name array.
2986 </desc>
2987 </param>
2988 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
2989 <desc>
2990 The time stamps of the properties returned. The array entries match
2991 the corresponding entries in the @a name array.
2992 </desc>
2993 </param>
2994 <param name="flags" type="wstring" dir="out" safearray="yes">
2995 <desc>
2996 The flags of the properties returned. The array entries match the
2997 corresponding entries in the @a name array.
2998 </desc>
2999 </param>
3000 </method>
3001
3002 <method name="pushGuestProperties">
3003 <desc>
3004 Set the list of the guest properties matching a set of patterns along
3005 with their values, time stamps and flags and return responsibility for
3006 managing properties to IMachine.
3007 </desc>
3008 <param name="name" type="wstring" dir="in" safearray="yes">
3009 <desc>
3010 The names of the properties.
3011 </desc>
3012 </param>
3013 <param name="value" type="wstring" dir="in" safearray="yes">
3014 <desc>
3015 The values of the properties. The array entries match the
3016 corresponding entries in the @a name array.
3017 </desc>
3018 </param>
3019 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3020 <desc>
3021 The time stamps of the properties. The array entries match
3022 the corresponding entries in the @a name array.
3023 </desc>
3024 </param>
3025 <param name="flags" type="wstring" dir="in" safearray="yes">
3026 <desc>
3027 The flags of the properties. The array entries match the
3028 corresponding entries in the @a name array.
3029 </desc>
3030 </param>
3031 </method>
3032 <method name="pushGuestProperty">
3033 <desc>
3034 Update a single guest property in IMachine.
3035 </desc>
3036 <param name="name" type="wstring" dir="in">
3037 <desc>
3038 The name of the property to be updated.
3039 </desc>
3040 </param>
3041 <param name="value" type="wstring" dir="in">
3042 <desc>
3043 The value of the property.
3044 </desc>
3045 </param>
3046 <param name="timestamp" type="unsigned long long" dir="in">
3047 <desc>
3048 The timestamp of the property.
3049 </desc>
3050 </param>
3051 <param name="flags" type="wstring" dir="in">
3052 <desc>
3053 The flags of the property.
3054 </desc>
3055 </param>
3056 </method>
3057 </interface>
3058
3059 <interface
3060 name="IBIOSSettings" extends="$unknown"
3061 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3062 wsmap="managed"
3063 >
3064 <desc>
3065 The IBIOSSettings interface represents BIOS settings of the virtual
3066 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3067 </desc>
3068 <attribute name="logoFadeIn" type="boolean">
3069 <desc>Fade in flag for BIOS logo animation.</desc>
3070 </attribute>
3071
3072 <attribute name="logoFadeOut" type="boolean">
3073 <desc>Fade out flag for BIOS logo animation.</desc>
3074 </attribute>
3075
3076 <attribute name="logoDisplayTime" type="unsigned long">
3077 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3078 </attribute>
3079
3080 <attribute name="logoImagePath" type="wstring">
3081 <desc>Local file system path for external BIOS image.</desc>
3082 </attribute>
3083
3084 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3085 <desc>Mode of the BIOS boot device menu.</desc>
3086 </attribute>
3087
3088 <attribute name="ACPIEnabled" type="boolean">
3089 <desc>ACPI support flag.</desc>
3090 </attribute>
3091
3092 <attribute name="IOAPICEnabled" type="boolean">
3093 <desc>
3094 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3095 and support IRQs above 15.
3096 </desc>
3097 </attribute>
3098
3099 <attribute name="timeOffset" type="long long">
3100 <desc>
3101 Offset in milliseconds from the host system time. This allows for
3102 guests running with a different system date/time than the host.
3103 It is equivalent to setting the system date/time in the BIOS except
3104 it is not an absolute value but a relative one. Guest Additions
3105 time synchronization honors this offset.
3106 </desc>
3107 </attribute>
3108
3109 <attribute name="PXEDebugEnabled" type="boolean">
3110 <desc>
3111 PXE debug logging flag. If set, VirtualBox will write extensive
3112 PXE trace information to the release log.
3113 </desc>
3114 </attribute>
3115
3116 <attribute name="IDEControllerType" type="IDEControllerType">
3117 <desc>
3118 Type of the virtual IDE controller. Depending on this value,
3119 VirtualBox will provide different virtual IDE hardware
3120 devices to the guest.
3121 </desc>
3122 </attribute>
3123
3124 </interface>
3125
3126 <interface
3127 name="IMachine" extends="$unknown"
3128 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3129 wsmap="managed"
3130 >
3131 <desc>
3132 The IMachine interface represents a virtual machine, or guest, created
3133 in VirtualBox.
3134
3135 This interface is used in two contexts. First of all, a collection of
3136 objects implementing this interface is stored in the
3137 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3138 machines that are currently registered with this VirtualBox
3139 installation. Also, once a session has been opened for the given virtual
3140 machine (e.g. the virtual machine is running), the machine object
3141 associated with the open session can be queried from the session object;
3142 see <link to="ISession"/> for details.
3143
3144 The main role of this interface is to expose the settings of the virtual
3145 machine and provide methods to change various aspects of the virtual
3146 machine's configuration. For machine objects stored in the
3147 <link to="IVirtualBox::machines2"/> collection, all attributes are
3148 read-only unless explicitly stated otherwise in individual attribute
3149 and method descriptions. In order to change a machine setting, a session
3150 for this machine must be opened using one of
3151 <link to="IVirtualBox::openSession"/>,
3152 <link to="IVirtualBox::openRemoteSession"/> or
3153 <link to="IVirtualBox::openExistingSession"/> methods. After the
3154 session has been successfully opened, a mutable machine object needs to
3155 be queried from the session object and then the desired settings changes
3156 can be applied to the returned object using IMachine attributes and
3157 methods. See the ISession interface description for more information
3158 about sessions.
3159
3160 Note that the IMachine interface does not provide methods to control
3161 virtual machine execution (such as start the machine, or power it
3162 down) -- these methods are grouped in a separate IConsole
3163 interface. Refer to the IConsole interface description to get more
3164 information about this topic.
3165
3166 <see>ISession, IConsole</see>
3167 </desc>
3168
3169 <attribute name="parent" type="IVirtualBox" readonly="yes">
3170 <desc>Associated parent object.</desc>
3171 </attribute>
3172
3173 <attribute name="accessible" type="boolean" readonly="yes">
3174 <desc>
3175 Whether this virtual machine is currently accessible or not.
3176
3177 The machine is considered to be inaccessible when:
3178 <ul>
3179 <li>It is a registered virtual machine, and
3180 </li>
3181 <li>Its settings file is inaccessible (for example, it is
3182 located on a network share that is not accessible during
3183 VirtualBox startup, or becomes inaccessible later, or if
3184 the settings file can be read but is invalid).
3185 </li>
3186 </ul>
3187
3188 Otherwise, the value of this property is always <tt>true</tt>.
3189
3190 Every time this property is read, the accessibility state of
3191 this machine is re-evaluated. If the returned value is |false|,
3192 the <link to="#accessError"/> property may be used to get the
3193 detailed error information describing the reason of
3194 inaccessibility.
3195
3196 When the machine is inaccessible, only the following properties
3197 can be used on it:
3198 <ul>
3199 <li><link to="#parent"/></li>
3200 <li><link to="#id"/></li>
3201 <li><link to="#settingsFilePath"/></li>
3202 <li><link to="#accessible"/></li>
3203 <li><link to="#accessError"/></li>
3204 </ul>
3205
3206 An attempt to access any other property or method will return
3207 an error.
3208
3209 The only possible action you can perform on an inaccessible
3210 machine is to unregister it using the
3211 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3212 for the accessibility state once more by querying this
3213 property).
3214
3215 <note>
3216 In the current implementation, once this property returns
3217 <tt>true</tt>, the machine will never become inaccessible
3218 later, even if its settings file cannot be successfully
3219 read/written any more (at least, until the VirtualBox
3220 server is restarted). This limitation may be removed in
3221 future releases.
3222 </note>
3223 </desc>
3224 </attribute>
3225
3226 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3227 <desc>
3228 Error information describing the reason of machine
3229 inaccessibility.
3230
3231 Reading this property is only valid after the last call to
3232 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3233 machine is currently unaccessible). Otherwise, a null
3234 IVirtualBoxErrorInfo object will be returned.
3235 </desc>
3236 </attribute>
3237
3238 <attribute name="name" type="wstring">
3239 <desc>
3240 Name of the virtual machine.
3241
3242 Besides being used for human-readable identification purposes
3243 everywhere in VirtualBox, the virtual machine name is also used
3244 as a name of the machine's settings file and as a name of the
3245 subdirectory this settings file resides in. Thus, every time you
3246 change the value of this property, the settings file will be
3247 renamed once you call <link to="#saveSettings()"/> to confirm the
3248 change. The containing subdirectory will be also renamed, but
3249 only if it has exactly the same name as the settings file
3250 itself prior to changing this property (for backward compatibility
3251 with previous API releases). The above implies the following
3252 limitations:
3253 <ul>
3254 <li>The machine name cannot be empty.</li>
3255 <li>The machine name can contain only characters that are valid
3256 file name characters according to the rules of the file
3257 system used to store VirtualBox configuration.</li>
3258 <li>You cannot have two or more machines with the same name
3259 if they use the same subdirectory for storing the machine
3260 settings files.</li>
3261 <li>You cannot change the name of the machine if it is running,
3262 or if any file in the directory containing the settings file
3263 is being used by another running machine or by any other
3264 process in the host operating system at a time when
3265 <link to="#saveSettings()"/> is called.
3266 </li>
3267 </ul>
3268 If any of the above limitations are hit, <link to="#saveSettings()"/>
3269 will return an appropriate error message explaining the exact
3270 reason and the changes you made to this machine will not be
3271 saved.
3272 <note>
3273 For "legacy" machines created using the
3274 <link to="IVirtualBox::createLegacyMachine()"/> call,
3275 the above naming limitations do not apply because the
3276 machine name does not affect the settings file name.
3277 The settings file name remains the same as it was specified
3278 during machine creation and never changes.
3279 </note>
3280 </desc>
3281 </attribute>
3282
3283 <attribute name="description" type="wstring">
3284 <desc>
3285 Description of the virtual machine.
3286
3287 The description attribute can contain any text and is
3288 typically used to describe the hardware and software
3289 configuration of the virtual machine in detail (i.e. network
3290 settings, versions of the installed software and so on).
3291 </desc>
3292 </attribute>
3293
3294 <attribute name="id" type="uuid" readonly="yes">
3295 <desc>UUID of the virtual machine.</desc>
3296 </attribute>
3297
3298 <attribute name="OSTypeId" type="wstring">
3299 <desc>
3300 User-defined identifier of the Guest OS type.
3301 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3302 an IGuestOSType object representing details about the given
3303 Guest OS type.
3304 <note>
3305 This value may differ from the value returned by
3306 <link to="IGuest::OSTypeId"/> if Guest Additions are
3307 installed to the guest OS.
3308 </note>
3309 </desc>
3310 </attribute>
3311
3312 <attribute name="HardwareVersion" type="wstring">
3313 <desc>Hardware version identifier. Internal use only for now.</desc>
3314 </attribute>
3315
3316 <attribute name="CPUCount" type="unsigned long">
3317 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3318 </attribute>
3319
3320 <attribute name="memorySize" type="unsigned long">
3321 <desc>System memory size in megabytes.</desc>
3322 </attribute>
3323
3324 <attribute name="memoryBalloonSize" type="unsigned long">
3325 <desc>Initial memory balloon size in megabytes.</desc>
3326 </attribute>
3327
3328 <attribute name="statisticsUpdateInterval" type="unsigned long">
3329 <desc>Initial interval to update guest statistics in seconds.</desc>
3330 </attribute>
3331
3332 <attribute name="VRAMSize" type="unsigned long">
3333 <desc>Video memory size in megabytes.</desc>
3334 </attribute>
3335
3336 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3337 <desc>
3338 This setting determines whether VirtualBox allows guests to make use
3339 of the 3D graphics support available on the host. Currently limited
3340 to OpenGL only. </desc>
3341 </attribute>
3342
3343 <attribute name="monitorCount" type="unsigned long">
3344 <desc>
3345 Number of virtual monitors.
3346 <note>
3347 Only effective on Windows XP and later guests with
3348 Guest Additions installed.
3349 </note>
3350 </desc>
3351 </attribute>
3352
3353 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3354 <desc>Object containing all BIOS settings.</desc>
3355 </attribute>
3356
3357 <attribute name="HWVirtExEnabled" type="TSBool">
3358 <desc>
3359 This setting determines whether VirtualBox will try to make use of
3360 the host CPU's hardware virtualization extensions such as Intel VT-x
3361 and AMD-V. Note that in case such extensions are not available,
3362 they will not be used.
3363 </desc>
3364 </attribute>
3365
3366 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3367 <desc>
3368 This setting determines whether VirtualBox will try to make use of
3369 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3370 such extensions are not available, they will not be used.
3371 </desc>
3372 </attribute>
3373
3374 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3375 <desc>
3376 This setting determines whether VirtualBox will try to make use of
3377 the VPID extension of Intel VT-x. Note that in case such extensions are
3378 not available, they will not be used.
3379 </desc>
3380 </attribute>
3381
3382 <attribute name="PAEEnabled" type="boolean" default="false">
3383 <desc>
3384 This setting determines whether VirtualBox will expose the Physical Address
3385 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3386 is not available, it will not be reported.
3387 </desc>
3388 </attribute>
3389
3390 <attribute name="snapshotFolder" type="wstring">
3391 <desc>
3392 Full path to the directory used to store snapshot data
3393 (differencing hard disks and saved state files) of this machine.
3394
3395 The initial value of this property is
3396 <tt>&lt;</tt><link to="#settingsFilePath">
3397 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3398 <link to="#id">machine_uuid</link>
3399 <tt>&gt;</tt>.
3400
3401 Currently, it is an error to try to change this property on
3402 a machine that has snapshots (because this would require to
3403 move possibly large files to a different location).
3404 A separate method will be available for this purpose later.
3405
3406 <note>
3407 Setting this property to <tt>null</tt> will restore the
3408 initial value.
3409 </note>
3410 <note>
3411 When setting this property, the specified path can be
3412 absolute (full path) or relative to the directory where the
3413 <link to="#settingsFilePath">machine settings file</link>
3414 is located. When reading this property, a full path is
3415 always returned.
3416 </note>
3417 <note>
3418 The specified path may not exist, it will be created
3419 when necessary.
3420 </note>
3421 </desc>
3422 </attribute>
3423
3424 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3425 <desc>VRDP server object.</desc>
3426 </attribute>
3427
3428 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3429 <desc>Array of hard disks attached to this machine.</desc>
3430 </attribute>
3431
3432 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3433 <desc>Associated DVD drive object.</desc>
3434 </attribute>
3435
3436 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3437 <desc>Associated floppy drive object.</desc>
3438 </attribute>
3439
3440 <attribute name="USBController" type="IUSBController" readonly="yes">
3441 <desc>
3442 Associated USB controller object.
3443
3444 <note>
3445 This method may set a @ref com_warnings "warning result code".
3446 </note>
3447 <note>
3448 If USB functionality is not available in the given edition of
3449 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3450 </note>
3451 </desc>
3452 </attribute>
3453
3454 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3455 <desc>Associated audio adapter, always present.</desc>
3456 </attribute>
3457
3458 <attribute name="SATAController" type="ISATAController" readonly="yes">
3459 <desc>
3460 Associated SATA controller object.
3461 </desc>
3462 </attribute>
3463
3464 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3465 <desc>
3466 Full name of the file containing machine settings data.
3467 </desc>
3468 </attribute>
3469
3470 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3471 <desc>
3472 Current version of the format of the settings file of this machine
3473 (<link to="#settingsFilePath"/>).
3474
3475 The version string has the following format:
3476 <pre>
3477 x.y-platform
3478 </pre>
3479 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3480 versions, and <tt>platform</tt> is the platform identifier.
3481
3482 The current version usually matches the value of the
3483 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3484 settings file was created by an older version of VirtualBox and there
3485 was a change of the settings file format since then.
3486
3487 Note that VirtualBox automatically converts settings files from older
3488 versions to the most recent version when reading them (usually at
3489 VirtualBox startup) but it doesn't save the changes back until
3490 you call a method that implicitly saves settings (such as
3491 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3492 explicitly. Therefore, if the value of this attribute differs from the
3493 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3494 means that the settings file was converted but the result of the
3495 conversion is not yet saved to disk.
3496
3497 The above feature may be used by interactive front-ends to inform users
3498 about the settings file format change and offer them to explicitly save
3499 all converted settings files (the global and VM-specific ones),
3500 optionally create backup copies of the old settings files before saving,
3501 etc.
3502
3503 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3504 </desc>
3505 </attribute>
3506
3507 <attribute name="settingsModified" type="boolean" readonly="yes">
3508 <desc>
3509 Whether the settings of this machine have been modified
3510 (but neither yet saved nor discarded).
3511 <note>
3512 Reading this property is only valid on instances returned
3513 by <link to="ISession::machine"/> and on new machines
3514 created by <link to="IVirtualBox::createMachine"/> or opened
3515 by <link to="IVirtualBox::openMachine"/> but not
3516 yet registered, or on unregistered machines after calling
3517 <link to="IVirtualBox::unregisterMachine"/>. For all other
3518 cases, the settings can never be modified.
3519 </note>
3520 <note>
3521 For newly created unregistered machines, the value of this
3522 property is always TRUE until <link to="#saveSettings()"/>
3523 is called (no matter if any machine settings have been
3524 changed after the creation or not). For opened machines
3525 the value is set to FALSE (and then follows to normal rules).
3526 </note>
3527 </desc>
3528 </attribute>
3529
3530 <attribute name="sessionState" type="SessionState" readonly="yes">
3531 <desc>Current session state for this machine.</desc>
3532 </attribute>
3533
3534 <attribute name="sessionType" type="wstring" readonly="yes">
3535 <desc>
3536 Type of the session. If <link to="#sessionState"/> is
3537 SessionSpawning or SessionOpen, this attribute contains the
3538 same value as passed to the
3539 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3540 type parameter. If the session was opened directly using
3541 <link to="IVirtualBox::openSession()"/>, or if
3542 <link to="#sessionState"/> is SessionClosed, the value of this
3543 attribute is @c null.
3544 </desc>
3545 </attribute>
3546
3547 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3548 <desc>
3549 Identifier of the session process. This attribute contains the
3550 platform-dependent identifier of the process that has opened a
3551 direct session for this machine using the
3552 <link to="IVirtualBox::openSession()"/> call. The returned value
3553 is only valid if <link to="#sessionState"/> is SessionOpen or
3554 SessionClosing (i.e. a session is currently open or being
3555 closed) by the time this property is read.
3556 </desc>
3557 </attribute>
3558
3559 <attribute name="state" type="MachineState" readonly="yes">
3560 <desc>Current execution state of this machine.</desc>
3561 </attribute>
3562
3563 <attribute name="lastStateChange" type="long long" readonly="yes">
3564 <desc>
3565 Time stamp of the last execution state change,
3566 in milliseconds since 1970-01-01 UTC.
3567 </desc>
3568 </attribute>
3569
3570 <attribute name="stateFilePath" type="wstring" readonly="yes">
3571 <desc>
3572 Full path to the file that stores the execution state of
3573 the machine when it is in the <link to="MachineState_Saved"/> state.
3574 <note>
3575 When the machine is not in the Saved state, this attribute
3576 <tt>null</tt>.
3577 </note>
3578 </desc>
3579 </attribute>
3580
3581 <attribute name="logFolder" type="wstring" readonly="yes">
3582 <desc>
3583 Full path to the folder that stores a set of rotated log files
3584 recorded during machine execution. The most recent log file is
3585 named <tt>VBox.log</tt>, the previous log file is
3586 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3587 in the current version).
3588 </desc>
3589 </attribute>
3590
3591 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3592 <desc>
3593 Current snapshot of this machine.
3594 <note>
3595 A <tt>null</tt> object is returned if the machine doesn't
3596 have snapshots.
3597 </note>
3598 <see><link to="ISnapshot"/></see>
3599 </desc>
3600 </attribute>
3601
3602 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3603 <desc>
3604 Number of snapshots taken on this machine. Zero means the
3605 machine doesn't have any snapshots.
3606 </desc>
3607 </attribute>
3608
3609 <attribute name="currentStateModified" type="boolean" readonly="yes">
3610 <desc>
3611 Returns <tt>true</tt> if the current state of the machine is not
3612 identical to the state stored in the current snapshot.
3613
3614 The current state is identical to the current snapshot right
3615 after one of the following calls are made:
3616 <ul>
3617 <li><link to="IConsole::discardCurrentState"/> or
3618 <link to="IConsole::discardCurrentSnapshotAndState"/>
3619 </li>
3620 <li><link to="IConsole::takeSnapshot"/> (issued on a
3621 powered off or saved machine, for which
3622 <link to="#settingsModified"/> returns <tt>false</tt>)
3623 </li>
3624 <li><link to="IMachine::setCurrentSnapshot"/>
3625 </li>
3626 </ul>
3627
3628 The current state remains identical until one of the following
3629 happens:
3630 <ul>
3631 <li>settings of the machine are changed</li>
3632 <li>the saved state is discarded</li>
3633 <li>the current snapshot is discarded</li>
3634 <li>an attempt to execute the machine is made</li>
3635 </ul>
3636
3637 <note>
3638 For machines that don't have snapshots, this property is
3639 always <tt>false</tt>.
3640 </note>
3641 </desc>
3642 </attribute>
3643
3644 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3645 <desc>
3646 Collection of shared folders for this machine (permanent shared
3647 folders). These folders are shared automatically at machine startup
3648 and available only to the guest OS installed within this machine.
3649
3650 New shared folders are added to the collection using
3651 <link to="#createSharedFolder"/>. Existing shared folders can be
3652 removed using <link to="#removeSharedFolder"/>.
3653 </desc>
3654 </attribute>
3655
3656 <attribute name="clipboardMode" type="ClipboardMode">
3657 <desc>
3658 Synchronization mode between the host OS clipboard
3659 and the guest OS clipboard.
3660 </desc>
3661 </attribute>
3662
3663 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3664 <desc>
3665 A comma-separated list of simple glob patterns. Changes to guest
3666 properties whose name matches one of the patterns will generate an
3667 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3668 </desc>
3669 </attribute>
3670
3671 <method name="setBootOrder">
3672 <desc>
3673 Puts the given device to the specified position in
3674 the boot order.
3675
3676 To indicate that no device is associated with the given position,
3677 <link to="DeviceType_Null"/> should be used.
3678
3679 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3680
3681 <result name="E_INVALIDARG">
3682 Boot @a position out of range.
3683 </result>
3684 <result name="E_NOTIMPL">
3685 Booting from USB @a device currently not supported.
3686 </result>
3687
3688 </desc>
3689 <param name="position" type="unsigned long" dir="in">
3690 <desc>
3691 Position in the boot order (<tt>1</tt> to the total number of
3692 devices the machine can boot from, as returned by
3693 <link to="ISystemProperties::maxBootPosition"/>).
3694 </desc>
3695 </param>
3696 <param name="device" type="DeviceType" dir="in">
3697 <desc>
3698 The type of the device used to boot at the given position.
3699 </desc>
3700 </param>
3701 </method>
3702
3703 <method name="getBootOrder" const="yes">
3704 <desc>
3705 Returns the device type that occupies the specified
3706 position in the boot order.
3707
3708 @todo [remove?]
3709 If the machine can have more than one device of the returned type
3710 (such as hard disks), then a separate method should be used to
3711 retrieve the individual device that occupies the given position.
3712
3713 If here are no devices at the given position, then
3714 <link to="DeviceType_Null"/> is returned.
3715
3716 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3717
3718 <result name="E_INVALIDARG">
3719 Boot @a position out of range.
3720 </result>
3721
3722 </desc>
3723 <param name="position" type="unsigned long" dir="in">
3724 <desc>
3725 Position in the boot order (<tt>1</tt> to the total number of
3726 devices the machine can boot from, as returned by
3727 <link to="ISystemProperties::maxBootPosition"/>).
3728 </desc>
3729 </param>
3730 <param name="device" type="DeviceType" dir="return">
3731 <desc>
3732 Device at the given position.
3733 </desc>
3734 </param>
3735 </method>
3736
3737 <method name="attachHardDisk2">
3738 <desc>
3739 Attaches a virtual hard disk identified by the given UUID @a id
3740 to a device slot of the specified bus.
3741
3742 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3743 specify the primary or secondary IDE controller, respectively. The
3744 SATA bus supports 30 channels, so this parameter can be a number
3745 ranging from @c 0 to @c 29.
3746
3747 For the primary controller of the IDE bus, the @a device number can be
3748 either @c 0 or @c 1, to specify the master or the slave device,
3749 respectively. For the secondary IDE controller, the device number is
3750 always @c 1 because the master device is reserved for the CD-ROM drive.
3751
3752 For the SATA bus, the @a device parameter is currently unused and
3753 must be @c 0.
3754
3755 The specified device slot must not have another disk attached to it, or
3756 this method will fail.
3757
3758 See <link to="IHardDisk2"/> for more detailed information about
3759 attaching hard disks.
3760
3761 <note>
3762 You cannot attach a hard disk to a running machine. Also, you cannot
3763 attach a hard disk to a newly created machine until this machine's
3764 settings are saved to disk using <link to="#saveSettings()"/>.
3765 </note>
3766 <note>
3767 If the hard disk is being attached indirectly, a new differencing hard
3768 disk will implicitly be created for it and attached instead. If the
3769 changes made to the machine settings (including this indirect
3770 attachment) are later cancelled using <link to="#discardSettings()"/>,
3771 this implicitly created differencing hard disk will implicitly
3772 be deleted.
3773 </note>
3774
3775 <result name="E_INVALIDARG">
3776 SATA device, SATA channel, IDE channel or IDE slot out of range.
3777 </result>
3778 <result name="VBOX_E_INVALID_OBJECT_STATE">
3779 Attempt to attach hard disk to an unregistered virtual machine.
3780 </result>
3781 <result name="VBOX_E_INVALID_VM_STATE">
3782 Invalid machine state.
3783 </result>
3784 <result name="VBOX_E_OBJECT_IN_USE">
3785 Hard disk already attached to this or another virtual machine.
3786 </result>
3787
3788 </desc>
3789 <param name="id" type="uuid" dir="in">
3790 <desc>UUID of the hard disk to attach.</desc>
3791 </param>
3792 <param name="bus" type="StorageBus" dir="in">
3793 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3794 </param>
3795 <param name="channel" type="long" dir="in">
3796 <desc>Channel to attach the hard disk to.</desc>
3797 </param>
3798 <param name="device" type="long" dir="in">
3799 <desc>
3800 Device slot in the given channel to attach the hard disk to.
3801 </desc>
3802 </param>
3803 </method>
3804
3805 <method name="getHardDisk2" const="yes">
3806 <desc>
3807 Returns the virtual hard disk attached to a device slot of the specified
3808 bus.
3809
3810 Note that if the hard disk was indirectly attached by
3811 <link to="#attachHardDisk2()"/> to the given device slot then this
3812 method will return not the same object as passed to the
3813 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3814 more detailed information about attaching hard disks.
3815
3816 <result name="VBOX_E_OBJECT_NOT_FOUND">
3817 No hard disk attached to given slot/bus.
3818 </result>
3819
3820 </desc>
3821 <param name="bus" type="StorageBus" dir="in">
3822 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3823 </param>
3824 <param name="channel" type="long" dir="in">
3825 <desc>Channel to query.</desc>
3826 </param>
3827 <param name="device" type="long" dir="in">
3828 <desc>Device slot in the given channel to query.</desc>
3829 </param>
3830 <param name="hardDisk" type="IHardDisk2" dir="return">
3831 <desc>Attached hard disk object.</desc>
3832 </param>
3833 </method>
3834
3835 <method name="detachHardDisk2">
3836 <desc>
3837 Detaches the virtual hard disk attached to a device slot of the
3838 specified bus.
3839
3840 Detaching the hard disk from the virtual machine is deferred. This means
3841 that the hard disk remains associated with the machine when this method
3842 returns and gets actually de-associated only after a successful
3843 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3844 for more detailed information about attaching hard disks.
3845
3846 <note>
3847 You cannot detach the hard disk from a running machine.
3848 </note>
3849 <note>
3850 Detaching differencing hard disks implicitly created by <link
3851 to="#attachHardDisk2()"/> for the indirect attachment using this
3852 method will <b>not</b> implicitly delete them. The
3853 <link to="IHardDisk2::deleteStorage()"/> operation should be
3854 explicitly performed by the caller after the hard disk is successfully
3855 detached and the settings are saved with
3856 <link to="#saveSettings()"/>, if it is the desired action.
3857 </note>
3858
3859 <result name="VBOX_E_INVALID_VM_STATE">
3860 Attempt to detach hard disk from a running virtual machine.
3861 </result>
3862 <result name="VBOX_E_OBJECT_NOT_FOUND">
3863 No hard disk attached to given slot/bus.
3864 </result>
3865 <result name="VBOX_E_NOT_SUPPORTED">
3866 Hard disk format does not support storage deletion.
3867 </result>
3868
3869 </desc>
3870 <param name="bus" type="StorageBus" dir="in">
3871 <desc>Bus to detach the hard disk from.</desc>
3872 </param>
3873 <param name="channel" type="long" dir="in">
3874 <desc>Channel number to detach the hard disk from.</desc>
3875 </param>
3876 <param name="device" type="long" dir="in">
3877 <desc>Device slot number to detach the hard disk from.</desc>
3878 </param>
3879 </method>
3880
3881 <method name="getNetworkAdapter" const="yes">
3882 <desc>
3883 Returns the network adapter associated with the given slot.
3884 Slots are numbered sequentially, starting with zero. The total
3885 number of adapters per machine is defined by the
3886 <link to="ISystemProperties::networkAdapterCount"/> property,
3887 so the maximum slot number is one less than that property's value.
3888
3889 <result name="E_INVALIDARG">
3890 Invalid @a slot number.
3891 </result>
3892
3893 </desc>
3894 <param name="slot" type="unsigned long" dir="in"/>
3895 <param name="adapter" type="INetworkAdapter" dir="return"/>
3896 </method>
3897
3898 <method name="getSerialPort" const="yes">
3899 <desc>
3900 Returns the serial port associated with the given slot.
3901 Slots are numbered sequentially, starting with zero. The total
3902 number of serial ports per machine is defined by the
3903 <link to="ISystemProperties::serialPortCount"/> property,
3904 so the maximum slot number is one less than that property's value.
3905
3906 <result name="E_INVALIDARG">
3907 Invalid @a slot number.
3908 </result>
3909
3910 </desc>
3911 <param name="slot" type="unsigned long" dir="in"/>
3912 <param name="port" type="ISerialPort" dir="return"/>
3913 </method>
3914
3915 <method name="getParallelPort" const="yes">
3916 <desc>
3917 Returns the parallel port associated with the given slot.
3918 Slots are numbered sequentially, starting with zero. The total
3919 number of parallel ports per machine is defined by the
3920 <link to="ISystemProperties::parallelPortCount"/> property,
3921 so the maximum slot number is one less than that property's value.
3922
3923 <result name="E_INVALIDARG">
3924 Invalid @a slot number.
3925 </result>
3926
3927 </desc>
3928 <param name="slot" type="unsigned long" dir="in"/>
3929 <param name="port" type="IParallelPort" dir="return"/>
3930 </method>
3931
3932 <method name="getNextExtraDataKey">
3933 <desc>
3934 Returns the machine-specific extra data key name following the
3935 supplied key.
3936
3937 An error is returned if the supplied @a key does not exist. @c NULL is
3938 returned in @a nextKey if the supplied key is the last key. When
3939 supplying @c NULL for the @a key, the first key item is returned in @a
3940 nextKey (if there is any). @a nextValue is an optional parameter and
3941 if supplied, the next key's value is returned in it.
3942
3943 <result name="VBOX_E_OBJECT_NOT_FOUND">
3944 Extra data @a key not found.
3945 </result>
3946
3947 </desc>
3948 <param name="key" type="wstring" dir="in">
3949 <desc>Name of the data key to follow.</desc>
3950 </param>
3951 <param name="nextKey" type="wstring" dir="out">
3952 <desc>Name of the next data key.</desc>
3953 </param>
3954 <param name="nextValue" type="wstring" dir="out">
3955 <desc>Value of the next data key.</desc>
3956 </param>
3957 </method>
3958
3959 <method name="getExtraData">
3960 <desc>
3961 Returns associated machine-specific extra data.
3962
3963 If the requested data @a key does not exist, this function will
3964 succeed and return @c NULL in the @a value argument.
3965
3966 <result name="VBOX_E_FILE_ERROR">
3967 Settings file not accessible.
3968 </result>
3969 <result name="VBOX_E_XML_ERROR">
3970 Could not parse the settings file.
3971 </result>
3972
3973 </desc>
3974 <param name="key" type="wstring" dir="in">
3975 <desc>Name of the data key to get.</desc>
3976 </param>
3977 <param name="value" type="wstring" dir="return">
3978 <desc>Value of the requested data key.</desc>
3979 </param>
3980 </method>
3981
3982 <method name="setExtraData">
3983 <desc>
3984 Sets associated machine-specific extra data.
3985
3986 If you pass @c NULL as a key @a value, the given @a key will be
3987 deleted.
3988
3989 <note>
3990 Before performing the actual data change, this method will ask all
3991 registered callbacks using the
3992 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
3993 notification for a permission. If one of the callbacks refuses the
3994 new value, the change will not be performed.
3995 </note>
3996 <note>
3997 On success, the
3998 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
3999 is called to inform all registered callbacks about a successful data
4000 change.
4001 </note>
4002 <note>
4003 This method can be called outside the machine session and therefore
4004 it's a caller's responsibility to handle possible race conditions
4005 when several clients change the same key at the same time.
4006 </note>
4007
4008 <result name="VBOX_E_FILE_ERROR">
4009 Settings file not accessible.
4010 </result>
4011 <result name="VBOX_E_XML_ERROR">
4012 Could not parse the settings file.
4013 </result>
4014
4015 </desc>
4016 <param name="key" type="wstring" dir="in">
4017 <desc>Name of the data key to set.</desc>
4018 </param>
4019 <param name="value" type="wstring" dir="in">
4020 <desc>Value to assign to the key.</desc>
4021 </param>
4022 </method>
4023
4024 <method name="saveSettings">
4025 <desc>
4026 Saves any changes to machine settings made since the session
4027 has been opened or a new machine has been created, or since the
4028 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4029 For registered machines, new settings become visible to all
4030 other VirtualBox clients after successful invocation of this
4031 method.
4032 <note>
4033 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4034 notification event after the configuration has been successfully
4035 saved (only for registered machines).
4036 </note>
4037 <note>
4038 Calling this method is only valid on instances returned
4039 by <link to="ISession::machine"/> and on new machines
4040 created by <link to="IVirtualBox::createMachine"/> but not
4041 yet registered, or on unregistered machines after calling
4042 <link to="IVirtualBox::unregisterMachine"/>.
4043 </note>
4044
4045 <result name="VBOX_E_FILE_ERROR">
4046 Settings file not accessible.
4047 </result>
4048 <result name="VBOX_E_XML_ERROR">
4049 Could not parse the settings file.
4050 </result>
4051 <result name="E_ACCESSDENIED">
4052 Modification request refused.
4053 </result>
4054
4055 </desc>
4056 </method>
4057
4058 <method name="saveSettingsWithBackup">
4059 <desc>
4060 Creates a backup copy of the machine settings file (<link
4061 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4062 <link to="#saveSettings()"/>.
4063
4064 Note that the backup copy is created <b>only</b> if the settings file
4065 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4066 details). Otherwise, this call is fully equivalent to
4067 <link to="#saveSettings()"/> and no backup copying is done.
4068
4069 The backup copy is created in the same directory where the original
4070 settings file is located. It is given the following file name:
4071 <pre>
4072 original.xml.x.y-platform.bak
4073 </pre>
4074 where <tt>original.xml</tt> is the original settings file name
4075 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4076 format of the settings file (before auto-conversion).
4077
4078 If the given backup file already exists, this method will try to add the
4079 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4080 0 to 9) and copy it again until it succeeds. If all suffixes are
4081 occupied, or if any other copy error occurs, this method will return a
4082 failure.
4083
4084 If the copy operation succeeds, the @a bakFileName return argument will
4085 receive a full path to the created backup file (for informational
4086 purposes). Note that this will happen even if the subsequent
4087 <link to="#saveSettings()"/> call performed by this method after the
4088 copy operation, fails.
4089
4090 <note>
4091 The VirtualBox API never calls this method. It is intended purely for
4092 the purposes of creating backup copies of the settings files by
4093 front-ends before saving the results of the automatically performed
4094 settings conversion to disk.
4095 </note>
4096
4097 <see>settingsFileVersion</see>
4098
4099 <result name="VBOX_E_FILE_ERROR">
4100 Settings file not accessible.
4101 </result>
4102 <result name="VBOX_E_XML_ERROR">
4103 Could not parse the settings file.
4104 </result>
4105 <result name="VBOX_E_INVALID_VM_STATE">
4106 Virtual machine is not mutable.
4107 </result>
4108 <result name="E_ACCESSDENIED">
4109 Modification request refused.
4110 </result>
4111
4112 </desc>
4113 <param name="bakFileName" type="wstring" dir="return">
4114 <desc>Full path to the created backup copy.</desc>
4115 </param>
4116 </method>
4117
4118 <method name="discardSettings">
4119 <desc>
4120 Discards any changes to the machine settings made since the session
4121 has been opened or since the last call to <link to="#saveSettings()"/>
4122 or <link to="#discardSettings"/>.
4123 <note>
4124 Calling this method is only valid on instances returned
4125 by <link to="ISession::machine"/> and on new machines
4126 created by <link to="IVirtualBox::createMachine"/> or
4127 opened by <link to="IVirtualBox::openMachine"/> but not
4128 yet registered, or on unregistered machines after calling
4129 <link to="IVirtualBox::unregisterMachine"/>.
4130 </note>
4131
4132 <result name="VBOX_E_INVALID_VM_STATE">
4133 Virtual machine is not mutable.
4134 </result>
4135
4136 </desc>
4137 </method>
4138
4139 <method name="deleteSettings">
4140 <desc>
4141 Deletes the settings file of this machine from disk.
4142 The machine must not be registered in order for this operation
4143 to succeed.
4144 <note>
4145 <link to="#settingsModified"/> will return TRUE after this
4146 method successfully returns.
4147 </note>
4148 <note>
4149 Calling this method is only valid on instances returned
4150 by <link to="ISession::machine"/> and on new machines
4151 created by <link to="IVirtualBox::createMachine"/> or
4152 opened by <link to="IVirtualBox::openMachine"/> but not
4153 yet registered, or on unregistered machines after calling
4154 <link to="IVirtualBox::unregisterMachine"/>.
4155 </note>
4156 <note>
4157 The deleted machine settings file can be restored (saved again)
4158 by calling <link to="#saveSettings()"/>.
4159 </note>
4160
4161 <result name="VBOX_E_INVALID_VM_STATE">
4162 Cannot delete settings of a registered machine or
4163 machine not mutable.
4164 </result>
4165 <result name="VBOX_E_IPRT_ERROR">
4166 Could not delete the settings file.
4167 </result>
4168
4169 </desc>
4170 </method>
4171
4172 <method name="getSnapshot">
4173 <desc>
4174 Returns a snapshot of this machine with the given UUID.
4175 A <tt>null</tt> UUID can be used to obtain the first snapshot
4176 taken on this machine. This is useful if you want to traverse
4177 the whole tree of snapshots starting from the root.
4178
4179 <result name="VBOX_E_OBJECT_NOT_FOUND">
4180 Virtual machine has no snapshots or snapshot not found.
4181 </result>
4182
4183 </desc>
4184 <param name="id" type="uuid" dir="in">
4185 <desc>UUID of the snapshot to get</desc>
4186 </param>
4187 <param name="snapshot" type="ISnapshot" dir="return">
4188 <desc>Snapshot object with the given UUID.</desc>
4189 </param>
4190 </method>
4191
4192 <method name="findSnapshot">
4193 <desc>
4194 Returns a snapshot of this machine with the given name.
4195
4196 <result name="VBOX_E_OBJECT_NOT_FOUND">
4197 Virtual machine has no snapshots or snapshot not found.
4198 </result>
4199
4200 </desc>
4201 <param name="name" type="wstring" dir="in">
4202 <desc>Name of the snapshot to find</desc>
4203 </param>
4204 <param name="snapshot" type="ISnapshot" dir="return">
4205 <desc>Snapshot object with the given name.</desc>
4206 </param>
4207 </method>
4208
4209 <method name="setCurrentSnapshot">
4210 <desc>
4211 Sets the current snapshot of this machine.
4212 <note>
4213 In the current implementation, this operation is not
4214 implemented.
4215 </note>
4216 </desc>
4217 <param name="id" type="uuid" dir="in">
4218 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4219 </param>
4220 </method>
4221
4222 <method name="createSharedFolder">
4223 <desc>
4224 Creates a new permanent shared folder by associating the given logical
4225 name with the given host path, adds it to the collection of shared
4226 folders and starts sharing it. Refer to the description of
4227 <link to="ISharedFolder"/> to read more about logical names.
4228
4229 <result name="VBOX_E_OBJECT_IN_USE">
4230 Shared folder already exists.
4231 </result>
4232 <result name="VBOX_E_FILE_ERROR">
4233 Shared folder @a hostPath not accessible.
4234 </result>
4235
4236 </desc>
4237 <param name="name" type="wstring" dir="in">
4238 <desc>Unique logical name of the shared folder.</desc>
4239 </param>
4240 <param name="hostPath" type="wstring" dir="in">
4241 <desc>Full path to the shared folder in the host file system.</desc>
4242 </param>
4243 <param name="writable" type="boolean" dir="in">
4244 <desc>Whether the share is writable or readonly</desc>
4245 </param>
4246 </method>
4247
4248 <method name="removeSharedFolder">
4249 <desc>
4250 Removes the permanent shared folder with the given name previously
4251 created by <link to="#createSharedFolder"/> from the collection of
4252 shared folders and stops sharing it.
4253
4254 <result name="VBOX_E_INVALID_VM_STATE">
4255 Virtual machine is not mutable.
4256 </result>
4257 <result name="VBOX_E_OBJECT_NOT_FOUND">
4258 Shared folder @a name does not exist.
4259 </result>
4260
4261 </desc>
4262 <param name="name" type="wstring" dir="in">
4263 <desc>Logical name of the shared folder to remove.</desc>
4264 </param>
4265 </method>
4266
4267 <method name="canShowConsoleWindow">
4268 <desc>
4269 Returns @c true if the VM console process can activate the
4270 console window and bring it to foreground on the desktop of
4271 the host PC.
4272 <note>
4273 This method will fail if a session for this machine is not
4274 currently open.
4275 </note>
4276
4277 <result name="VBOX_E_INVALID_VM_STATE">
4278 Machine session is not open.
4279 </result>
4280
4281 </desc>
4282 <param name="canShow" type="boolean" dir="return">
4283 <desc>
4284 @c true if the console window can be shown and @c
4285 false otherwise.
4286 </desc>
4287 </param>
4288 </method>
4289
4290 <method name="showConsoleWindow">
4291 <desc>
4292 Activates the console window and brings it to foreground on
4293 the desktop of the host PC. Many modern window managers on
4294 many platforms implement some sort of focus stealing
4295 prevention logic, so that it may be impossible to activate
4296 a window without the help of the currently active
4297 application. In this case, this method will return a non-zero
4298 identifier that represents the top-level window of the VM
4299 console process. The caller, if it represents a currently
4300 active process, is responsible to use this identifier (in a
4301 platform-dependent manner) to perform actual window
4302 activation.
4303 <note>
4304 This method will fail if a session for this machine is not
4305 currently open.
4306 </note>
4307
4308 <result name="VBOX_E_INVALID_VM_STATE">
4309 Machine session is not open.
4310 </result>
4311
4312 </desc>
4313 <param name="winId" type="unsigned long long" dir="return">
4314 <desc>
4315 Platform-dependent identifier of the top-level VM console
4316 window, or zero if this method has performed all actions
4317 necessary to implement the <i>show window</i> semantics for
4318 the given platform and/or VirtualBox front-end.
4319 </desc>
4320 </param>
4321 </method>
4322
4323 <method name="getGuestProperty">
4324 <desc>
4325 Reads an entry from the machine's guest property store.
4326
4327 <result name="VBOX_E_INVALID_VM_STATE">
4328 Machine session is not open.
4329 </result>
4330
4331 </desc>
4332 <param name="name" type="wstring" dir="in">
4333 <desc>
4334 The name of the property to read.
4335 </desc>
4336 </param>
4337 <param name="value" type="wstring" dir="out">
4338 <desc>
4339 The value of the property. If the property does not exist then this
4340 will be empty.
4341 </desc>
4342 </param>
4343 <param name="timestamp" type="unsigned long long" dir="out">
4344 <desc>
4345 The time at which the property was last modified, as seen by the
4346 server process.
4347 </desc>
4348 </param>
4349 <param name="flags" type="wstring" dir="out">
4350 <desc>
4351 Additional property parameters, passed as a comma-separated list of
4352 "name=value" type entries.
4353 </desc>
4354 </param>
4355 </method>
4356
4357 <method name="getGuestPropertyValue">
4358 <desc>
4359 Reads a value from the machine's guest property store.
4360
4361 <result name="VBOX_E_INVALID_VM_STATE">
4362 Machine session is not open.
4363 </result>
4364
4365 </desc>
4366 <param name="property" type="wstring" dir="in">
4367 <desc>
4368 The name of the property to read.
4369 </desc>
4370 </param>
4371 <param name="value" type="wstring" dir="return">
4372 <desc>
4373 The value of the property. If the property does not exist then this
4374 will be empty.
4375 </desc>
4376 </param>
4377 </method>
4378
4379 <method name="getGuestPropertyTimestamp">
4380 <desc>
4381 Reads a property timestamp from the machine's guest property store.
4382
4383 <result name="VBOX_E_INVALID_VM_STATE">
4384 Machine session is not open.
4385 </result>
4386
4387 </desc>
4388 <param name="property" type="wstring" dir="in">
4389 <desc>
4390 The name of the property to read.
4391 </desc>
4392 </param>
4393 <param name="value" type="unsigned long long" dir="return">
4394 <desc>
4395 The timestamp. If the property does not exist then this will be
4396 empty.
4397 </desc>
4398 </param>
4399 </method>
4400
4401 <method name="setGuestProperty">
4402 <desc>
4403 Sets, changes or deletes an entry in the machine's guest property
4404 store.
4405
4406 <result name="E_ACCESSDENIED">
4407 Property cannot be changed.
4408 </result>
4409 <result name="E_INVALIDARG">
4410 Invalid @a flags.
4411 </result>
4412 <result name="VBOX_E_INVALID_VM_STATE">
4413 Virtual machine is not mutable or session not open.
4414 </result>
4415 <result name="VBOX_E_INVALID_OBJECT_STATE">
4416 Cannot set transient property when machine not running.
4417 </result>
4418
4419 </desc>
4420 <param name="property" type="wstring" dir="in">
4421 <desc>
4422 The name of the property to set, change or delete.
4423 </desc>
4424 </param>
4425 <param name="value" type="wstring" dir="in">
4426 <desc>
4427 The new value of the property to set, change or delete. If the
4428 property does not yet exist and value is non-empty, it will be
4429 created. If the value is empty, the key will be deleted if it
4430 exists.
4431 </desc>
4432 </param>
4433 <param name="flags" type="wstring" dir="in">
4434 <desc>
4435 Additional property parameters, passed as a comma-separated list of
4436 "name=value" type entries.
4437 </desc>
4438 </param>
4439 </method>
4440
4441 <method name="setGuestPropertyValue">
4442 <desc>
4443 Sets, changes or deletes a value in the machine's guest property
4444 store. The flags field will be left unchanged or created empty for a
4445 new property.
4446
4447 <result name="E_ACCESSDENIED">
4448 Property cannot be changed.
4449 </result>
4450 <result name="VBOX_E_INVALID_VM_STATE">
4451 Virtual machine is not mutable or session not open.
4452 </result>
4453 <result name="VBOX_E_INVALID_OBJECT_STATE">
4454 Cannot set transient property when machine not running.
4455 </result>
4456 </desc>
4457
4458 <param name="property" type="wstring" dir="in">
4459 <desc>
4460 The name of the property to set, change or delete.
4461 </desc>
4462 </param>
4463 <param name="value" type="wstring" dir="in">
4464 <desc>
4465 The new value of the property to set, change or delete. If the
4466 property does not yet exist and value is non-empty, it will be
4467 created. If value is empty, the property will be deleted if it
4468 exists.
4469 </desc>
4470 </param>
4471 </method>
4472
4473 <method name="enumerateGuestProperties">
4474 <desc>
4475 Return a list of the guest properties matching a set of patterns along
4476 with their values, time stamps and flags.
4477 </desc>
4478 <param name="patterns" type="wstring" dir="in">
4479 <desc>
4480 The patterns to match the properties against, separated by '|'
4481 characters. If this is empty or NULL, all properties will match.
4482 </desc>
4483 </param>
4484 <param name="name" type="wstring" dir="out" safearray="yes">
4485 <desc>
4486 The names of the properties returned.
4487 </desc>
4488 </param>
4489 <param name="value" type="wstring" dir="out" safearray="yes">
4490 <desc>
4491 The values of the properties returned. The array entries match the
4492 corresponding entries in the @a name array.
4493 </desc>
4494 </param>
4495 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4496 <desc>
4497 The time stamps of the properties returned. The array entries match
4498 the corresponding entries in the @a name array.
4499 </desc>
4500 </param>
4501 <param name="flags" type="wstring" dir="out" safearray="yes">
4502 <desc>
4503 The flags of the properties returned. The array entries match the
4504 corresponding entries in the @a name array.
4505 </desc>
4506 </param>
4507 </method>
4508</interface>
4509
4510 <!--
4511 // IConsole
4512 /////////////////////////////////////////////////////////////////////////
4513 -->
4514
4515 <interface
4516 name="IConsoleCallback" extends="$unknown"
4517 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4518 wsmap="suppress"
4519 >
4520
4521 <method name="onMousePointerShapeChange">
4522 <desc>
4523 Notification when the guest mouse pointer shape has
4524 changed. The new shape data is given.
4525 </desc>
4526 <param name="visible" type="boolean" dir="in">
4527 <desc>
4528 Flag whether the pointer is visible.
4529 </desc>
4530 </param>
4531 <param name="alpha" type="boolean" dir="in">
4532 <desc>
4533 Flag whether the pointer has an alpha channel.
4534 </desc>
4535 </param>
4536 <param name="xHot" type="unsigned long" dir="in">
4537 <desc>
4538 The pointer hot spot x coordinate.
4539 </desc>
4540 </param>
4541 <param name="yHot" type="unsigned long" dir="in">
4542 <desc>
4543 The pointer hot spot y coordinate.
4544 </desc>
4545 </param>
4546 <param name="width" type="unsigned long" dir="in">
4547 <desc>
4548 Width of the pointer shape in pixels.
4549 </desc>
4550 </param>
4551 <param name="height" type="unsigned long" dir="in">
4552 <desc>
4553 Height of the pointer shape in pixels.
4554 </desc>
4555 </param>
4556 <param name="shape" type="octet" mod="ptr" dir="in">
4557 <desc>
4558 Address of the shape buffer.
4559
4560 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
4561 followed by a 32-bpp XOR (color) mask.
4562
4563 For pointers without alpha channel the XOR mask pixels are 32
4564 bit values: (lsb)BGR0(msb). For pointers with alpha channel
4565 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
4566
4567 An AND mask is used for pointers with alpha channel, so if the
4568 callback does not support alpha, the pointer could be
4569 displayed as a normal color pointer.
4570
4571 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
4572 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
4573 height</tt>. The padding bits at the end of each scanline are
4574 undefined.
4575
4576 The XOR mask follows the AND mask on the next 4-byte aligned
4577 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
4578 Bytes in the gap between the AND and the XOR mask are undefined.
4579 The XOR mask scanlines have no gap between them and the size of
4580 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
4581
4582 <note>
4583 If @a shape is 0, only the pointer visibility is changed.
4584 </note>
4585 </desc>
4586 </param>
4587 </method>
4588
4589 <method name="onMouseCapabilityChange">
4590 <desc>
4591 Notification when the mouse capabilities reported by the
4592 guest have changed. The new capabilities are passed.
4593 </desc>
4594 <param name="supportsAbsolute" type="boolean" dir="in"/>
4595 <param name="needsHostCursor" type="boolean" dir="in"/>
4596 </method>
4597
4598 <method name="onKeyboardLedsChange">
4599 <desc>
4600 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4601 to alter the state of the keyboard LEDs.
4602 </desc>
4603 <param name="numLock" type="boolean" dir="in"/>
4604 <param name="capsLock" type="boolean" dir="in"/>
4605 <param name="scrollLock" type="boolean" dir="in"/>
4606 </method>
4607
4608 <method name="onStateChange">
4609 <desc>
4610 Notification when the execution state of the machine has changed.
4611 The new state will be given.
4612 </desc>
4613 <param name="state" type="MachineState" dir="in"/>
4614 </method>
4615
4616 <method name="onAdditionsStateChange">
4617 <desc>
4618 Notification when a Guest Additions property changes.
4619 Interested callees should query IGuest attributes to
4620 find out what has changed.
4621 </desc>
4622 </method>
4623
4624 <method name="onDVDDriveChange">
4625 <desc>
4626 Notification when a property of the
4627 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4628 Interested callees should use IDVDDrive methods to find out what has
4629 changed.
4630 </desc>
4631 </method>
4632
4633 <method name="onFloppyDriveChange">
4634 <desc>
4635 Notification when a property of the
4636 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4637 Interested callees should use IFloppyDrive methods to find out what
4638 has changed.
4639 </desc>
4640 </method>
4641
4642 <method name="onNetworkAdapterChange">
4643 <desc>
4644 Notification when a property of one of the
4645 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4646 changes. Interested callees should use INetworkAdapter methods and
4647 attributes to find out what has changed.
4648 </desc>
4649 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4650 <desc>Network adapter that is subject to change.</desc>
4651 </param>
4652 </method>
4653
4654 <method name="onSerialPortChange">
4655 <desc>
4656 Notification when a property of one of the
4657 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4658 Interested callees should use ISerialPort methods and attributes
4659 to find out what has changed.
4660 </desc>
4661 <param name="serialPort" type="ISerialPort" dir="in">
4662 <desc>Serial port that is subject to change.</desc>
4663 </param>
4664 </method>
4665
4666 <method name="onParallelPortChange">
4667 <desc>
4668 Notification when a property of one of the
4669 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4670 changes. Interested callees should use ISerialPort methods and
4671 attributes to find out what has changed.
4672 </desc>
4673 <param name="parallelPort" type="IParallelPort" dir="in">
4674 <desc>Parallel port that is subject to change.</desc>
4675 </param>
4676 </method>
4677
4678 <method name="onVRDPServerChange">
4679 <desc>
4680 Notification when a property of the
4681 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4682 Interested callees should use IVRDPServer methods and attributes to
4683 find out what has changed.
4684 </desc>
4685 </method>
4686
4687 <method name="onUSBControllerChange">
4688 <desc>
4689 Notification when a property of the virtual
4690 <link to="IMachine::USBController">USB controller</link> changes.
4691 Interested callees should use IUSBController methods and attributes to
4692 find out what has changed.
4693 </desc>
4694 </method>
4695
4696 <method name="onUSBDeviceStateChange">
4697 <desc>
4698 Notification when a USB device is attached to or detached from
4699 the virtual USB controller.
4700
4701 This notification is sent as a result of the indirect
4702 request to attach the device because it matches one of the
4703 machine USB filters, or as a result of the direct request
4704 issued by <link to="IConsole::attachUSBDevice"/> or
4705 <link to="IConsole::detachUSBDevice"/>.
4706
4707 This notification is sent in case of both a succeeded and a
4708 failed request completion. When the request succeeds, the @a
4709 error parameter is @c null, and the given device has been
4710 already added to (when @a attached is @c true) or removed from
4711 (when @a attached is @c false) the collection represented by
4712 <link to="IConsole::USBDevices"/>. On failure, the collection
4713 doesn't change and the @a error parameter represents the error
4714 message describing the failure.
4715
4716 </desc>
4717 <param name="device" type="IUSBDevice" dir="in">
4718 <desc>Device that is subject to state change.</desc>
4719 </param>
4720 <param name="attached" type="boolean" dir="in">
4721 <desc>
4722 <tt>true</tt> if the device was attached
4723 and <tt>false</tt> otherwise.
4724 </desc>
4725 </param>
4726 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4727 <desc>
4728 <tt>null</tt> on success or an error message object on
4729 failure.
4730 </desc>
4731 </param>
4732 </method>
4733
4734 <method name="onSharedFolderChange">
4735 <desc>
4736 Notification when a shared folder is added or removed.
4737 The @a scope argument defines one of three scopes:
4738 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4739 (<link to="Scope_Global">Global</link>),
4740 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4741 the machine (<link to="Scope_Machine">Machine</link>) or <link
4742 to="IConsole::sharedFolders">transient shared folders</link> of the
4743 machine (<link to="Scope_Session">Session</link>). Interested callees
4744 should use query the corresponding collections to find out what has
4745 changed.
4746 </desc>
4747 <param name="scope" type="Scope" dir="in">
4748 <desc>Scope of the notification.</desc>
4749 </param>
4750 </method>
4751
4752 <method name="onRuntimeError">
4753 <desc>
4754 Notification when an error happens during the virtual
4755 machine execution.
4756
4757 There are three kinds of runtime errors:
4758 <ul>
4759 <li><i>fatal</i></li>
4760 <li><i>non-fatal with retry</i></li>
4761 <li><i>non-fatal warnings</i></li>
4762 </ul>
4763
4764 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4765 to <tt>true</tt>. In case of fatal errors, the virtual machine
4766 execution is always paused before calling this notification, and
4767 the notification handler is supposed either to immediately save
4768 the virtual machine state using <link to="IConsole::saveState()"/>
4769 or power it off using <link to="IConsole::powerDown()"/>.
4770 Resuming the execution can lead to unpredictable results.
4771
4772 <b>Non-fatal</b> errors and warnings are indicated by the
4773 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4774 is in the Paused state by the time the error notification is
4775 received, it means that the user can <i>try to resume</i> the machine
4776 execution after attempting to solve the problem that caused the
4777 error. In this case, the notification handler is supposed
4778 to show an appropriate message to the user (depending on the
4779 value of the @a id parameter) that offers several actions such
4780 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4781 wants to retry, the notification handler should continue
4782 the machine execution using the <link to="IConsole::resume()"/>
4783 call. If the machine execution is not Paused during this
4784 notification, then it means this notification is a <i>warning</i>
4785 (for example, about a fatal condition that can happen very soon);
4786 no immediate action is required from the user, the machine
4787 continues its normal execution.
4788
4789 Note that in either case the notification handler
4790 <b>must not</b> perform any action directly on a thread
4791 where this notification is called. Everything it is allowed to
4792 do is to post a message to another thread that will then talk
4793 to the user and take the corresponding action.
4794
4795 Currently, the following error identifiers are known:
4796 <ul>
4797 <li><tt>"HostMemoryLow"</tt></li>
4798 <li><tt>"HostAudioNotResponding"</tt></li>
4799 <li><tt>"VDIStorageFull"</tt></li>
4800 </ul>
4801
4802 <note>
4803 This notification is not designed to be implemented by
4804 more than one callback at a time. If you have multiple
4805 IConsoleCallback instances registered on the given
4806 IConsole object, make sure you simply do nothing but
4807 return @c S_OK from all but one of them that does actual
4808 user notification and performs necessary actions.
4809 </note>
4810
4811 </desc>
4812 <param name="fatal" type="boolean" dir="in">
4813 <desc>Whether the error is fatal or not</desc>
4814 </param>
4815 <param name="id" type="wstring" dir="in">
4816 <desc>Error identifier</desc>
4817 </param>
4818 <param name="message" type="wstring" dir="in">
4819 <desc>Optional error message</desc>
4820 </param>
4821 </method>
4822
4823 <method name="onCanShowWindow">
4824 <desc>
4825 Notification when a call to
4826 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4827 front-end to check if a subsequent call to
4828 <link to="IMachine::showConsoleWindow()"/> can succeed.
4829
4830 The callee should give an answer appropriate to the current
4831 machine state in the @a canShow argument. This answer must
4832 remain valid at least until the next
4833 <link to="IConsole::state">machine state</link> change.
4834
4835 <note>
4836 This notification is not designed to be implemented by
4837 more than one callback at a time. If you have multiple
4838 IConsoleCallback instances registered on the given
4839 IConsole object, make sure you simply do nothing but
4840 return @c true and @c S_OK from all but one of them that
4841 actually manages console window activation.
4842 </note>
4843 </desc>
4844 <param name="canShow" type="boolean" dir="return">
4845 <desc>
4846 @c true if the console window can be shown and @c
4847 false otherwise.
4848 </desc>
4849 </param>
4850 </method>
4851
4852 <method name="onShowWindow">
4853 <desc>
4854 Notification when a call to
4855 <link to="IMachine::showConsoleWindow()"/>
4856 requests the console window to be activated and brought to
4857 foreground on the desktop of the host PC.
4858
4859 This notification should cause the VM console process to
4860 perform the requested action as described above. If it is
4861 impossible to do it at a time of this notification, this
4862 method should return a failure.
4863
4864 Note that many modern window managers on many platforms
4865 implement some sort of focus stealing prevention logic, so
4866 that it may be impossible to activate a window without the
4867 help of the currently active application (which is supposedly
4868 an initiator of this notification). In this case, this method
4869 must return a non-zero identifier that represents the
4870 top-level window of the VM console process. The caller, if it
4871 represents a currently active process, is responsible to use
4872 this identifier (in a platform-dependent manner) to perform
4873 actual window activation.
4874
4875 This method must set @a winId to zero if it has performed all
4876 actions necessary to complete the request and the console
4877 window is now active and in foreground, to indicate that no
4878 further action is required on the caller's side.
4879
4880 <note>
4881 This notification is not designed to be implemented by
4882 more than one callback at a time. If you have multiple
4883 IConsoleCallback instances registered on the given
4884 IConsole object, make sure you simply do nothing but
4885 return @c S_OK from all but one of them that actually
4886 manages console window activation.
4887 </note>
4888 </desc>
4889 <param name="winId" type="unsigned long long" dir="return">
4890 <desc>
4891 Platform-dependent identifier of the top-level VM console
4892 window, or zero if this method has performed all actions
4893 necessary to implement the <i>show window</i> semantics for
4894 the given platform and/or this VirtualBox front-end.
4895 </desc>
4896 </param>
4897 </method>
4898
4899 </interface>
4900
4901 <interface
4902 name="IRemoteDisplayInfo" extends="$unknown"
4903 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4904 wsmap="struct"
4905 >
4906 <desc>
4907 Contains information about the remote display (VRDP) capabilities and status.
4908 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4909 </desc>
4910
4911 <attribute name="active" type="boolean" readonly="yes">
4912 <desc>
4913 Whether the remote display connection is active.
4914 </desc>
4915 </attribute>
4916
4917 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4918 <desc>
4919 How many times a client connected.
4920 </desc>
4921 </attribute>
4922
4923 <attribute name="beginTime" type="long long" readonly="yes">
4924 <desc>
4925 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4926 </desc>
4927 </attribute>
4928
4929 <attribute name="endTime" type="long long" readonly="yes">
4930 <desc>
4931 When the last connection was terminated or the current time, if
4932 connection is still active, in milliseconds since 1970-01-01 UTC.
4933 </desc>
4934 </attribute>
4935
4936 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4937 <desc>
4938 How many bytes were sent in last or current, if still active, connection.
4939 </desc>
4940 </attribute>
4941
4942 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4943 <desc>
4944 How many bytes were sent in all connections.
4945 </desc>
4946 </attribute>
4947
4948 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4949 <desc>
4950 How many bytes were received in last or current, if still active, connection.
4951 </desc>
4952 </attribute>
4953
4954 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4955 <desc>
4956 How many bytes were received in all connections.
4957 </desc>
4958 </attribute>
4959
4960 <attribute name="user" type="wstring" readonly="yes">
4961 <desc>
4962 Login user name supplied by the client.
4963 </desc>
4964 </attribute>
4965
4966 <attribute name="domain" type="wstring" readonly="yes">
4967 <desc>
4968 Login domain name supplied by the client.
4969 </desc>
4970 </attribute>
4971
4972 <attribute name="clientName" type="wstring" readonly="yes">
4973 <desc>
4974 The client name supplied by the client.
4975 </desc>
4976 </attribute>
4977
4978 <attribute name="clientIP" type="wstring" readonly="yes">
4979 <desc>
4980 The IP address of the client.
4981 </desc>
4982 </attribute>
4983
4984 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4985 <desc>
4986 The client software version number.
4987 </desc>
4988 </attribute>
4989
4990 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
4991 <desc>
4992 Public key exchange method used when connection was established.
4993 Values: 0 - RDP4 public key exchange scheme.
4994 1 - X509 certificates were sent to client.
4995 </desc>
4996 </attribute>
4997
4998 </interface>
4999
5000 <interface
5001 name="IConsole" extends="$unknown"
5002 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5003 wsmap="managed"
5004 >
5005 <desc>
5006 The IConsole interface represents an interface to control virtual
5007 machine execution.
5008
5009 The console object that implements the IConsole interface is obtained
5010 from a session object after the session for the given machine has been
5011 opened using one of <link to="IVirtualBox::openSession"/>,
5012 <link to="IVirtualBox::openRemoteSession"/> or
5013 <link to="IVirtualBox::openExistingSession"/> methods.
5014
5015 Methods of the IConsole interface allow the caller to query the current
5016 virtual machine execution state, pause the machine or power it down, save
5017 the machine state or take a snapshot, attach and detach removable media
5018 and so on.
5019
5020 <see>ISession</see>
5021 </desc>
5022
5023 <attribute name="machine" type="IMachine" readonly="yes">
5024 <desc>
5025 Machine object this console is sessioned with.
5026 <note>
5027 This is a convenience property, it has the same value as
5028 <link to="ISession::machine"/> of the corresponding session
5029 object.
5030 </note>
5031 </desc>
5032 </attribute>
5033
5034 <attribute name="state" type="MachineState" readonly="yes">
5035 <desc>
5036 Current execution state of the machine.
5037 <note>
5038 This property always returns the same value as the corresponding
5039 property of the IMachine object this console is sessioned with.
5040 For the process that owns (executes) the VM, this is the
5041 preferable way of querying the VM state, because no IPC
5042 calls are made.
5043 </note>
5044 </desc>
5045 </attribute>
5046
5047 <attribute name="guest" type="IGuest" readonly="yes">
5048 <desc>Guest object.</desc>
5049 </attribute>
5050
5051 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5052 <desc>
5053 Virtual keyboard object.
5054 <note>
5055 If the machine is not running, any attempt to use
5056 the returned object will result in an error.
5057 </note>
5058 </desc>
5059 </attribute>
5060
5061 <attribute name="mouse" type="IMouse" readonly="yes">
5062 <desc>
5063 Virtual mouse object.
5064 <note>
5065 If the machine is not running, any attempt to use
5066 the returned object will result in an error.
5067 </note>
5068 </desc>
5069 </attribute>
5070
5071 <attribute name="display" type="IDisplay" readonly="yes">
5072 <desc>Virtual display object.
5073 <note>
5074 If the machine is not running, any attempt to use
5075 the returned object will result in an error.
5076 </note>
5077 </desc>
5078 </attribute>
5079
5080 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5081 <desc>Debugging interface.</desc>
5082 </attribute>
5083
5084 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5085 <desc>
5086 Collection of USB devices currently attached to the virtual
5087 USB controller.
5088 <note>
5089 The collection is empty if the machine is not running.
5090 </note>
5091 </desc>
5092 </attribute>
5093
5094 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5095 <desc>
5096 List of USB devices currently attached to the remote VRDP client.
5097 Once a new device is physically attached to the remote host computer,
5098 it appears in this list and remains there until detached.
5099 </desc>
5100 </attribute>
5101
5102 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5103 <desc>
5104 Collection of shared folders for the current session. These folders
5105 are called transient shared folders because they are available to the
5106 guest OS running inside the associated virtual machine only for the
5107 duration of the session (as opposed to
5108 <link to="IMachine::sharedFolders"/> which represent permanent shared
5109 folders). When the session is closed (e.g. the machine is powered down),
5110 these folders are automatically discarded.
5111
5112 New shared folders are added to the collection using
5113 <link to="#createSharedFolder"/>. Existing shared folders can be
5114 removed using <link to="#removeSharedFolder"/>.
5115 </desc>
5116 </attribute>
5117
5118 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5119 <desc>
5120 Interface that provides information on Remote Display (VRDP) connection.
5121 </desc>
5122 </attribute>
5123
5124 <method name="powerUp">
5125 <desc>
5126 Starts the virtual machine execution using the current machine
5127 state (that is, its current execution state, current settings and
5128 current hard disks).
5129
5130 If the machine is powered off or aborted, the execution will
5131 start from the beginning (as if the real hardware were just
5132 powered on).
5133
5134 If the machine is in the <link to="MachineState_Saved"/> state,
5135 it will continue its execution the point where the state has
5136 been saved.
5137
5138 <note>
5139 Unless you are trying to write a new VirtualBox front-end that
5140 performs direct machine execution (like the VirtualBox or VBoxSDL
5141 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5142 session opened by <link to="IVirtualBox::openSession"/> and use this
5143 session only to change virtual machine settings. If you simply want to
5144 start virtual machine execution using one of the existing front-ends
5145 (for example the VirtualBox GUI or headless server), simply use
5146 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5147 power up the machine automatically for you.
5148 </note>
5149
5150 <see>#saveState</see>
5151 <result name="VBOX_E_INVALID_VM_STATE">
5152 Virtual machine already running.
5153 </result>
5154 <result name="VBOX_E_HOST_ERROR">
5155 Host interface does not exist or name not set.
5156 </result>
5157 <result name="VBOX_E_FILE_ERROR">
5158 Invalid saved state file.
5159 </result>
5160 </desc>
5161 <param name="progress" type="IProgress" dir="return">
5162 <desc>Progress object to track the operation completion.</desc>
5163 </param>
5164 </method>
5165
5166 <method name="powerUpPaused">
5167 <desc>
5168 Identical to powerUp except that the VM will enter the
5169 <link to="MachineState_Paused"/> state, instead of
5170 <link to="MachineState_Running"/>.
5171
5172 <see>#powerUp</see>
5173 <result name="VBOX_E_INVALID_VM_STATE">
5174 Virtual machine already running.
5175 </result>
5176 <result name="VBOX_E_HOST_ERROR">
5177 Host interface does not exist or name not set.
5178 </result>
5179 <result name="VBOX_E_FILE_ERROR">
5180 Invalid saved state file.
5181 </result>
5182 </desc>
5183 <param name="progress" type="IProgress" dir="return">
5184 <desc>Progress object to track the operation completion.</desc>
5185 </param>
5186 </method>
5187
5188 <method name="powerDown">
5189 <desc>
5190 Stops the virtual machine execution.
5191 After this operation completes, the machine will go to the
5192 PoweredOff state.
5193
5194 @deprecated This method will be removed in VirtualBox 2.1 where the
5195 powerDownAsync() method will take its name. Do not use this method in
5196 the code.
5197 <result name="VBOX_E_INVALID_VM_STATE">
5198 Virtual machine must be Running, Paused or Stuck to be powered down.
5199 </result>
5200 <result name="VBOX_E_VM_ERROR">
5201 Unable to power off or destroy virtual machine.
5202 </result>
5203 </desc>
5204 </method>
5205
5206 <method name="powerDownAsync">
5207 <desc>
5208 Initiates the power down procedure to stop the virtual machine
5209 execution.
5210
5211 The completion of the power down procedure is tracked using the returned
5212 IProgress object. After the operation is complete, the machine will go
5213 to the PoweredOff state.
5214
5215 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5216 where the original powerDown() method will be removed. You will need to
5217 rename "powerDownAsync" to "powerDown" in your sources to make them
5218 build with version 2.1.
5219 <result name="VBOX_E_INVALID_VM_STATE">
5220 Virtual machine must be Running, Paused or Stuck to be powered down.
5221 </result>
5222 </desc>
5223 <param name="progress" type="IProgress" dir="return">
5224 <desc>Progress object to track the operation completion.</desc>
5225 </param>
5226 </method>
5227
5228 <method name="reset">
5229 <desc>Resets the virtual machine.
5230 <result name="VBOX_E_INVALID_VM_STATE">
5231 Virtual machine not in Running state.
5232 </result>
5233 <result name="VBOX_E_VM_ERROR">
5234 Virtual machine error in reset operation.
5235 </result>
5236 </desc>
5237 </method>
5238
5239 <method name="pause">
5240 <desc>Pauses the virtual machine execution.
5241 <result name="VBOX_E_INVALID_VM_STATE">
5242 Virtual machine not in Running state.
5243 </result>
5244 <result name="VBOX_E_VM_ERROR">
5245 Virtual machine error in suspend operation.
5246 </result>
5247 </desc>
5248 </method>
5249
5250 <method name="resume">
5251 <desc>Resumes the virtual machine execution.
5252 <result name="VBOX_E_INVALID_VM_STATE">
5253 Virtual machine not in Paused state.
5254 </result>
5255 <result name="VBOX_E_VM_ERROR">
5256 Virtual machine error in resume operation.
5257 </result>
5258 </desc>
5259 </method>
5260
5261 <method name="powerButton">
5262 <desc>Sends the ACPI power button event to the guest.
5263 <result name="VBOX_E_INVALID_VM_STATE">
5264 Virtual machine not in Running state.
5265 </result>
5266 <result name="VBOX_E_PDM_ERROR">
5267 Controlled power off failed.
5268 </result>
5269 </desc>
5270 </method>
5271
5272 <method name="sleepButton">
5273 <desc>Sends the ACPI sleep button event to the guest.
5274 <result name="VBOX_E_INVALID_VM_STATE">
5275 Virtual machine not in Running state.
5276 </result>
5277 <result name="VBOX_E_PDM_ERROR">
5278 Sending sleep button event failed.
5279 </result>
5280 </desc>
5281 </method>
5282
5283 <method name="getPowerButtonHandled">
5284 <desc>Checks if the last power button event was handled by guest.
5285 <result name="VBOX_E_PDM_ERROR">
5286 Checking if the event was handled by the guest OS failed.
5287 </result>
5288 </desc>
5289 <param name="handled" type="boolean" dir="return"/>
5290 </method>
5291
5292 <method name="getGuestEnteredACPIMode">
5293 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5294 G1 (sleeping). If this method returns false, the guest will
5295 most likely not respond to external ACPI events.
5296 <result name="VBOX_E_INVALID_VM_STATE">
5297 Virtual machine not in Running state.
5298 </result>
5299 </desc>
5300 <param name="entered" type="boolean" dir="return"/>
5301 </method>
5302
5303 <method name="saveState">
5304 <desc>
5305 Saves the current execution state of a running virtual machine
5306 and stops its execution.
5307
5308 After this operation completes, the machine will go to the
5309 Saved state. Next time it is powered up, this state will
5310 be restored and the machine will continue its execution from
5311 the place where it was saved.
5312
5313 This operation differs from taking a snapshot to the effect
5314 that it doesn't create new differencing hard disks. Also, once
5315 the machine is powered up from the state saved using this method,
5316 the saved state is deleted, so it will be impossible to return
5317 to this state later.
5318
5319 <note>
5320 On success, this method implicitly calls
5321 <link to="IMachine::saveSettings()"/> to save all current machine
5322 settings (including runtime changes to the DVD drive, etc.).
5323 Together with the impossibility to change any VM settings when it is
5324 in the Saved state, this guarantees adequate hardware
5325 configuration of the machine when it is restored from the saved
5326 state file.
5327 </note>
5328
5329 <note>
5330 The machine must be in the Running or Paused state, otherwise
5331 the operation will fail.
5332 </note>
5333 <result name="VBOX_E_INVALID_VM_STATE">
5334 Virtual machine state neither Running nor Paused.
5335 </result>
5336 <result name="VBOX_E_FILE_ERROR">
5337 Failed to create directory for saved state file.
5338 </result>
5339
5340 <see><link to="#takeSnapshot"/></see>
5341 </desc>
5342 <param name="progress" type="IProgress" dir="return">
5343 <desc>Progress object to track the operation completion.</desc>
5344 </param>
5345 </method>
5346
5347 <method name="adoptSavedState">
5348 <desc>
5349 Associates the given saved state file to the virtual machine.
5350
5351 On success, the machine will go to the Saved state. Next time it is
5352 powered up, it will be restored from the adopted saved state and
5353 continue execution from the place where the saved state file was
5354 created.
5355
5356 The specified saved state file path may be absolute or relative to the
5357 folder the VM normally saves the state to (usually,
5358 <link to="IMachine::snapshotFolder"/>).
5359
5360 <note>
5361 It's a caller's responsibility to make sure the given saved state
5362 file is compatible with the settings of this virtual machine that
5363 represent its virtual hardware (memory size, hard disk configuration
5364 etc.). If there is a mismatch, the behavior of the virtual machine
5365 is undefined.
5366 </note>
5367 <result name="VBOX_E_INVALID_VM_STATE">
5368 Virtual machine state neither PoweredOff nor Aborted.
5369 </result>
5370 </desc>
5371 <param name="savedStateFile" type="wstring" dir="in">
5372 <desc>Path to the saved state file to adopt.</desc>
5373 </param>
5374 </method>
5375
5376 <method name="discardSavedState">
5377 <desc>
5378 Discards (deletes) the saved state of the virtual machine
5379 previously created by <link to="#saveState"/>. Next time the
5380 machine is powered up, a clean boot will occur.
5381 <note>
5382 This operation is equivalent to resetting or powering off
5383 the machine without doing a proper shutdown in the guest OS.
5384 </note>
5385 <result name="VBOX_E_INVALID_VM_STATE">
5386 Virtual machine not in state Saved.
5387 </result>
5388 </desc>
5389 </method>
5390
5391 <method name="getDeviceActivity">
5392 <desc>
5393 Gets the current activity type of a given device or device group.
5394 <result name="E_INVALIDARG">
5395 Invalid device type.
5396 </result>
5397 </desc>
5398 <param name="type" type="DeviceType" dir="in"/>
5399 <param name="activity" type="DeviceActivity" dir="return"/>
5400 </method>
5401
5402 <method name="attachUSBDevice">
5403 <desc>
5404 Attaches a host USB device with the given UUID to the
5405 USB controller of the virtual machine.
5406
5407 The device needs to be in one of the following states:
5408 <link to="USBDeviceState_Busy"/>,
5409 <link to="USBDeviceState_Available"/> or
5410 <link to="USBDeviceState_Held"/>,
5411 otherwise an error is immediately returned.
5412
5413 When the device state is
5414 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5415 be returned if the host computer refuses to release it for some reason.
5416
5417 <see>IUSBController::deviceFilters, USBDeviceState</see>
5418 <result name="VBOX_E_INVALID_VM_STATE">
5419 Virtual machine state neither Running nor Paused.
5420 </result>
5421 <result name="VBOX_E_PDM_ERROR">
5422 Virtual machine does not have a USB controller.
5423 </result>
5424 </desc>
5425 <param name="id" type="uuid" dir="in">
5426 <desc>UUID of the host USB device to attach.</desc>
5427 </param>
5428 </method>
5429
5430 <method name="detachUSBDevice">
5431 <desc>
5432 Detaches an USB device with the given UUID from the USB controller
5433 of the virtual machine.
5434
5435 After this method succeeds, the VirtualBox server re-initiates
5436 all USB filters as if the device were just physically attached
5437 to the host, but filters of this machine are ignored to avoid
5438 a possible automatic re-attachment.
5439
5440 <see>IUSBController::deviceFilters, USBDeviceState</see>
5441
5442 <result name="VBOX_E_PDM_ERROR">
5443 Virtual machine does not have a USB controller.
5444 </result>
5445 <result name="E_INVALIDARG">
5446 USB device not attached to this virtual machine.
5447 </result>
5448 </desc>
5449 <param name="id" type="uuid" dir="in">
5450 <desc>UUID of the USB device to detach.</desc>
5451 </param>
5452 <param name="device" type="IUSBDevice" dir="return">
5453 <desc>Detached USB device.</desc>
5454 </param>
5455 </method>
5456
5457 <method name="createSharedFolder">
5458 <desc>
5459 Creates a transient new shared folder by associating the given logical
5460 name with the given host path, adds it to the collection of shared
5461 folders and starts sharing it. Refer to the description of
5462 <link to="ISharedFolder"/> to read more about logical names.
5463
5464 <result name="VBOX_E_INVALID_VM_STATE">
5465 Virtual machine in Saved state or currently changing state.
5466 </result>
5467 <result name="VBOX_E_FILE_ERROR">
5468 Shared folder already exists or not accessible.
5469 </result>
5470 </desc>
5471 <param name="name" type="wstring" dir="in">
5472 <desc>Unique logical name of the shared folder.</desc>
5473 </param>
5474 <param name="hostPath" type="wstring" dir="in">
5475 <desc>Full path to the shared folder in the host file system.</desc>
5476 </param>
5477 <param name="writable" type="boolean" dir="in">
5478 <desc>Whether the share is writable or readonly</desc>
5479 </param>
5480 </method>
5481
5482 <method name="removeSharedFolder">
5483 <desc>
5484 Removes a transient shared folder with the given name previously
5485 created by <link to="#createSharedFolder"/> from the collection of
5486 shared folders and stops sharing it.
5487 <result name="VBOX_E_INVALID_VM_STATE">
5488 Virtual machine in Saved state or currently changing state.
5489 </result>
5490 <result name="VBOX_E_FILE_ERROR">
5491 Shared folder does not exists.
5492 </result>
5493 </desc>
5494 <param name="name" type="wstring" dir="in">
5495 <desc>Logical name of the shared folder to remove.</desc>
5496 </param>
5497 </method>
5498
5499 <method name="takeSnapshot">
5500 <desc>
5501 Saves the current execution state and all settings of the
5502 machine and creates differencing images for all
5503 normal (non-independent) hard disks.
5504
5505 This method can be called for a PoweredOff, Saved, Running or
5506 Paused virtual machine. When the machine is PoweredOff, an
5507 offline <link to="ISnapshot">snapshot</link> is created,
5508 in all other cases -- an online snapshot.
5509
5510 The taken snapshot is always based on the
5511 <link to="IMachine::currentSnapshot">current
5512 snapshot</link> of the associated virtual machine and becomes
5513 a new current snapshot.
5514
5515 <note>
5516 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5517 save all current machine settings before taking an offline snapshot.
5518 </note>
5519
5520 <see>ISnapshot, <link to="#saveState"/></see>
5521 <result name="VBOX_E_INVALID_VM_STATE">
5522 Virtual machine currently changing state.
5523 </result>
5524 </desc>
5525 <param name="name" type="wstring" dir="in">
5526 <desc>Short name for the snapshot.</desc>
5527 </param>
5528 <param name="description" type="wstring" dir="in">
5529 <desc>Optional description of the snapshot.</desc>
5530 </param>
5531 <param name="progress" type="IProgress" dir="return">
5532 <desc>Progress object to track the operation completion.</desc>
5533 </param>
5534 </method>
5535
5536 <method name="discardSnapshot">
5537 <desc>
5538
5539 Starts discarding the specified snapshot. The execution state
5540 and settings of the associated machine stored in the snapshot
5541 will be deleted. The contents of all differencing hard disks of
5542 this snapshot will be merged with the contents of their
5543 dependent child hard disks to keep the, disks valid (in other
5544 words, all changes represented by hard disks being discarded
5545 will be propagated to their child hard disks). After that, this
5546 snapshot's differencing hard disks will be deleted. The parent
5547 of this snapshot will become a new parent for all its child
5548 snapshots.
5549
5550 If the discarded snapshot is the current one, its parent
5551 snapshot will become a new current snapshot. The current machine
5552 state is not directly affected in this case, except that
5553 currently attached differencing hard disks based on hard disks
5554 of the discarded snapshot will be also merged as described
5555 above.
5556
5557 If the discarded snapshot is the first one (the root snapshot)
5558 and it has exactly one child snapshot, this child snapshot will
5559 become the first snapshot after discarding. If there are no
5560 children at all (i.e. the first snapshot is the only snapshot of
5561 the machine), both the current and the first snapshot of the
5562 machine will be set to null. In all other cases, the first
5563 snapshot cannot be discarded.
5564
5565 You cannot discard the snapshot if it
5566 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
5567 hard disks that have differencing hard disks based on them. Snapshots of
5568 such kind can be discarded only when every normal hard disk has either
5569 no children at all or exactly one child. In the former case, the normal
5570 hard disk simply becomes unused (i.e. not attached to any VM). In the
5571 latter case, it receives all the changes stored in the child hard disk,
5572 and then it replaces the child hard disk in the configuration of the
5573 corresponding snapshot or machine.
5574
5575 Also, you cannot discard the snapshot if it stores hard disks
5576 (of any type) having differencing child hard disks that belong
5577 to other machines. Such snapshots can be only discarded after
5578 you discard all snapshots of other machines containing "foreign"
5579 child disks, or detach these "foreign" child disks from machines
5580 they are attached to.
5581
5582 One particular example of the snapshot storing normal hard disks
5583 is the first snapshot of a virtual machine that had normal hard
5584 disks attached when taking the snapshot. Be careful when
5585 discarding such snapshots because this implicitly commits
5586 changes (made since the snapshot being discarded has been taken)
5587 to normal hard disks (as described above), which may be not what
5588 you want.
5589
5590 The virtual machine is put to
5591 the <link to="MachineState_Discarding">Discarding</link> state until
5592 the discard operation is completed.
5593
5594 <note>
5595 The machine must not be running, otherwise the operation
5596 will fail.
5597 </note>
5598
5599 <note>
5600 Child hard disks of all normal hard disks of the discarded snapshot
5601 must be accessible (see <link to="IMedium::state"/>) for this
5602 operation to succeed. In particular, this means that all virtual
5603 machines, whose hard disks are directly or indirectly based on the
5604 hard disks of discarded snapshot, must be powered off.
5605 </note>
5606 <note>
5607 Merging hard disk contents can be very time and disk space
5608 consuming, if these disks are big in size and have many
5609 children. However, if the snapshot being discarded is the last
5610 (head) snapshot on the branch, the operation will be rather
5611 quick.
5612 </note>
5613 <note>
5614 Note that discarding the current snapshot
5615 will implicitly call <link to="IMachine::saveSettings()"/> to
5616 make all current machine settings permanent.
5617 </note>
5618 <result name="VBOX_E_INVALID_VM_STATE">
5619 Virtual machine is running.
5620 </result>
5621 </desc>
5622 <param name="id" type="uuid" dir="in">
5623 <desc>UUID of the snapshot to discard.</desc>
5624 </param>
5625 <param name="progress" type="IProgress" dir="return">
5626 <desc>Progress object to track the operation completion.</desc>
5627 </param>
5628 </method>
5629
5630 <method name="discardCurrentState">
5631 <desc>
5632 This operation is similar to <link to="#discardSnapshot()"/> but
5633 affects the current machine state. This means that the state stored in
5634 the current snapshot will become a new current state, and all current
5635 settings of the machine and changes stored in differencing hard disks
5636 will be lost.
5637
5638 After this operation is successfully completed, new empty differencing
5639 hard disks are created for all normal hard disks of the machine.
5640
5641 If the current snapshot of the machine is an online snapshot, the
5642 machine will go to the <link to="MachineState_Saved"> saved
5643 state</link>, so that the next time it is powered on, the execution
5644 state will be restored from the current snapshot.
5645
5646 <note>
5647 The machine must not be running, otherwise the operation will fail.
5648 </note>
5649
5650 <note>
5651 If the machine state is <link to="MachineState_Saved">Saved</link>
5652 prior to this operation, the saved state file will be implicitly
5653 discarded (as if <link to="IConsole::discardSavedState()"/> were
5654 called).
5655 </note>
5656
5657 <result name="VBOX_E_INVALID_VM_STATE">
5658 Virtual machine is running.
5659 </result>
5660 </desc>
5661 <param name="progress" type="IProgress" dir="return">
5662 <desc>Progress object to track the operation completion.</desc>
5663 </param>
5664 </method>
5665
5666 <method name="discardCurrentSnapshotAndState">
5667 <desc>
5668
5669 This method is equivalent to
5670 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
5671 (currentSnapshot.id(), progress) followed by
5672 <link to="#discardCurrentState()"/>.
5673
5674 As a result, the machine will be fully restored from the
5675 snapshot preceding the current snapshot, while both the current
5676 snapshot and the current machine state will be discarded.
5677
5678 If the current snapshot is the first snapshot of the machine (i.e. it
5679 has the only snapshot), the current machine state will be
5680 discarded <b>before</b> discarding the snapshot. In other words, the
5681 machine will be restored from its last snapshot, before discarding
5682 it. This differs from performing a single
5683 <link to="#discardSnapshot()"/> call (note that no
5684 <link to="#discardCurrentState()"/> will be possible after it)
5685 to the effect that the latter will preserve the current state instead of
5686 discarding it.
5687
5688 Unless explicitly mentioned otherwise, all remarks and
5689 limitations of the above two methods also apply to this method.
5690
5691 <note>
5692 The machine must not be running, otherwise the operation
5693 will fail.
5694 </note>
5695
5696 <note>
5697 If the machine state is <link to="MachineState_Saved">Saved</link>
5698 prior to this operation, the saved state file will be implicitly
5699 discarded (as if <link to="#discardSavedState()"/> were
5700 called).
5701 </note>
5702
5703 <note>
5704 This method is more efficient than calling both of the above
5705 methods separately: it requires less IPC calls and provides
5706 a single progress object.
5707 </note>
5708
5709 <result name="VBOX_E_INVALID_VM_STATE">
5710 Virtual machine is running.
5711 </result>
5712 </desc>
5713 <param name="progress" type="IProgress" dir="return">
5714 <desc>Progress object to track the operation completion.</desc>
5715 </param>
5716 </method>
5717
5718 <method name="registerCallback">
5719 <desc>
5720 Registers a new console callback on this instance. The methods of the
5721 callback interface will be called by this instance when the appropriate
5722 event occurs.
5723 </desc>
5724 <param name="callback" type="IConsoleCallback" dir="in"/>
5725 </method>
5726
5727 <method name="unregisterCallback">
5728 <desc>
5729 Unregisters the console callback previously registered using
5730 <link to="#registerCallback"/>.
5731 <result name="E_INVALIDARG">
5732 Given @a callback handler is not registered.
5733 </result>
5734 </desc>
5735 <param name="callback" type="IConsoleCallback" dir="in"/>
5736 </method>
5737 </interface>
5738
5739 <!--
5740 // IHost
5741 /////////////////////////////////////////////////////////////////////////
5742 -->
5743
5744 <interface
5745 name="IHostDVDDrive" extends="$unknown"
5746 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
5747 wsmap="managed"
5748 >
5749 <desc>
5750 The IHostDVDDrive interface represents the physical CD/DVD drive
5751 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5752 </desc>
5753
5754 <attribute name="name" type="wstring" readonly="yes">
5755 <desc>
5756 Returns the platform-specific device identifier.
5757 On DOS-like platforms, it is a drive name (e.g. R:).
5758 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5759 </desc>
5760 </attribute>
5761 <attribute name="description" type="wstring" readonly="yes">
5762 <desc>
5763 Returns a human readable description for the drive. This
5764 description usually contains the product and vendor name. A
5765 @c null string is returned if the description is not available.
5766 </desc>
5767 </attribute>
5768 <attribute name="udi" type="wstring" readonly="yes">
5769 <desc>
5770 Returns the unique device identifier for the drive. This
5771 attribute is reserved for future use instead of
5772 <link to="#name"/>. Currently it is not used and may return
5773 @c null on some platforms.
5774 </desc>
5775 </attribute>
5776
5777 </interface>
5778
5779 <enumerator
5780 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5781 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5782 />
5783
5784 <collection
5785 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5786 enumerator="IHostDVDDriveEnumerator"
5787 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5788 readonly="yes"
5789 >
5790 <method name="findByName">
5791 <desc>
5792 Searches this collection for a host drive with the given name.
5793 <note>
5794 The method returns an error if the given name does not
5795 correspond to any host drive in the collection.
5796 </note>
5797 </desc>
5798 <param name="name" type="wstring" dir="in">
5799 <desc>Name of the host drive to search for</desc>
5800 </param>
5801 <param name="drive" type="IHostDVDDrive" dir="return">
5802 <desc>Found host drive object</desc>
5803 </param>
5804 </method>
5805 </collection>
5806
5807 <interface
5808 name="IHostFloppyDrive" extends="$unknown"
5809 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5810 wsmap="managed"
5811 >
5812 <desc>
5813 The IHostFloppyDrive interface represents the physical floppy drive
5814 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5815 </desc>
5816 <attribute name="name" type="wstring" readonly="yes">
5817 <desc>
5818 Returns the platform-specific device identifier.
5819 On DOS-like platforms, it is a drive name (e.g. A:).
5820 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5821 </desc>
5822 </attribute>
5823 <attribute name="description" type="wstring" readonly="yes">
5824 <desc>
5825 Returns a human readable description for the drive. This
5826 description usually contains the product and vendor name. A
5827 @c null string is returned if the description is not available.
5828 </desc>
5829 </attribute>
5830 <attribute name="udi" type="wstring" readonly="yes">
5831 <desc>
5832 Returns the unique device identifier for the drive. This
5833 attribute is reserved for future use instead of
5834 <link to="#name"/>. Currently it is not used and may return
5835 @c null on some platforms.
5836 </desc>
5837 </attribute>
5838 </interface>
5839
5840 <enumerator
5841 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5842 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5843 />
5844
5845 <collection
5846 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5847 enumerator="IHostFloppyDriveEnumerator"
5848 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5849 readonly="yes"
5850 >
5851 <method name="findByName">
5852 <desc>
5853 Searches this collection for a host drive with the given name.
5854 <note>
5855 The method returns an error if the given name does not
5856 correspond to any host drive in the collection.
5857 </note>
5858 </desc>
5859 <param name="name" type="wstring" dir="in">
5860 <desc>Name of the host drive to search for</desc>
5861 </param>
5862 <param name="drive" type="IHostFloppyDrive" dir="return">
5863 <desc>Found host drive object</desc>
5864 </param>
5865 </method>
5866 </collection>
5867
5868 <enum
5869 name="HostNetworkInterfaceType"
5870 uuid="763754FA-3246-4539-9590-9E603EDBF706"
5871 >
5872 <desc>
5873 Type of encapsulation. Ethernet encapsulation includes both wired and
5874 wireless Ethernet connections.
5875 <see>IHostNetworkInterface</see>
5876 </desc>
5877
5878 <const name="Unknown" value="0">
5879 <desc>
5880 The type of interface cannot be determined.
5881 </desc>
5882 </const>
5883 <const name="Ethernet" value="1">
5884 <desc>
5885 Ethernet frame encapsulation.
5886 </desc>
5887 </const>
5888 <const name="PPP" value="2">
5889 <desc>
5890 Point-to-point protocol encapsulation.
5891 </desc>
5892 </const>
5893 <const name="SLIP" value="3">
5894 <desc>
5895 Serial line IP encapsulation.
5896 </desc>
5897 </const>
5898 </enum>
5899
5900 <enum
5901 name="HostNetworkInterfaceStatus"
5902 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
5903 >
5904 <desc>
5905 Current status of the interface.
5906 <see>IHostNetworkInterface</see>
5907 </desc>
5908
5909 <const name="Unknown" value="0">
5910 <desc>
5911 The state of interface cannot be determined.
5912 </desc>
5913 </const>
5914 <const name="Up" value="1">
5915 <desc>
5916 The interface is fully operational.
5917 </desc>
5918 </const>
5919 <const name="Down" value="2">
5920 <desc>
5921 The interface is not functioning.
5922 </desc>
5923 </const>
5924 </enum>
5925
5926 <interface
5927 name="IHostNetworkInterface" extends="$unknown"
5928 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
5929 wsmap="managed"
5930 >
5931 <desc>
5932 Reprents one of host's network interfaces. IP V6 address and network
5933 mask are strings of 32 hexdecimal digits grouped by four. Groups are
5934 separated by colons.
5935 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
5936 </desc>
5937 <attribute name="name" type="wstring" readonly="yes">
5938 <desc>Returns the host network interface name.</desc>
5939 </attribute>
5940
5941 <attribute name="id" type="uuid" readonly="yes">
5942 <desc>Returns the interface UUID.</desc>
5943 </attribute>
5944
5945 <attribute name="IPAddress" type="unsigned long" readonly="yes">
5946 <desc>Returns the IP V4 address of the interface.</desc>
5947 </attribute>
5948
5949 <attribute name="networkMask" type="unsigned long" readonly="yes">
5950 <desc>Returns the network mask of the interface.</desc>
5951 </attribute>
5952
5953 <attribute name="IPV6Address" type="wstring" readonly="yes">
5954 <desc>Returns the IP V6 address of the interface.</desc>
5955 </attribute>
5956
5957 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
5958 <desc>Returns the IP V6 network mask of the interface.</desc>
5959 </attribute>
5960
5961 <attribute name="hardwareAddress" type="wstring" readonly="yes">
5962 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
5963 </attribute>
5964
5965 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
5966 <desc>Type of protocol encapsulation used.</desc>
5967 </attribute>
5968
5969 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
5970 <desc>Status of the interface.</desc>
5971 </attribute>
5972 </interface>
5973
5974 <interface
5975 name="IHost" extends="$unknown"
5976 uuid="f39438d7-abfd-409b-bc80-5f5291d92897"
5977 wsmap="managed"
5978 >
5979 <desc>
5980 The IHost interface represents the physical machine that this VirtualBox
5981 installation runs on.
5982
5983 An object implementing this interface is returned by the
5984 <link to="IVirtualBox::host" /> attribute. This interface contains
5985 read-only information about the host's physical hardware (such as what
5986 processors and disks are available, what the host operating system is,
5987 and so on) and also allows for manipulating some of the host's hardware,
5988 such as global USB device filters and host interface networking.
5989
5990 </desc>
5991 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
5992 <desc>List of DVD drives available on the host.</desc>
5993 </attribute>
5994
5995 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
5996 <desc>List of floppy drives available on the host.</desc>
5997 </attribute>
5998
5999 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6000 <desc>
6001 List of USB devices currently attached to the host.
6002 Once a new device is physically attached to the host computer,
6003 it appears in this list and remains there until detached.
6004
6005 <note>
6006 This method may set a @ref com_warnings "warning result code".
6007 </note>
6008 <note>
6009 If USB functionality is not available in the given edition of
6010 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6011 </note>
6012 </desc>
6013 </attribute>
6014
6015 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6016 <desc>
6017 List of USB device filters in action.
6018 When a new device is physically attached to the host computer,
6019 filters from this list are applied to it (in order they are stored
6020 in the list). The first matched filter will determine the
6021 <link to="IHostUSBDeviceFilter::action">action</link>
6022 performed on the device.
6023
6024 Unless the device is ignored by these filters, filters of all
6025 currently running virtual machines
6026 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6027
6028 <note>
6029 This method may set a @ref com_warnings "warning result code".
6030 </note>
6031 <note>
6032 If USB functionality is not available in the given edition of
6033 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6034 </note>
6035
6036 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6037 </desc>
6038 </attribute>
6039
6040 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6041 <desc>List of host network interfaces currently defined on the host.</desc>
6042 </attribute>
6043
6044 <attribute name="processorCount" type="unsigned long" readonly="yes">
6045 <desc>Number of (logical) CPUs installed in the host system.</desc>
6046 </attribute>
6047
6048 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6049 <desc>Number of (logical) CPUs online in the host system.</desc>
6050 </attribute>
6051
6052 <method name="getProcessorSpeed">
6053 <desc>Query the (approximate) maximum speed of a specified host CPU in
6054 Megahertz.
6055 </desc>
6056 <param name="cpuId" type="unsigned long" dir="in">
6057 <desc>
6058 Identifier of the CPU.
6059 </desc>
6060 </param>
6061 <param name="speed" type="unsigned long" dir="return">
6062 <desc>
6063 Speed value. 0 is returned if value is not known or @a cpuId is
6064 invalid.
6065 </desc>
6066 </param>
6067 </method>
6068
6069 <method name="getProcessorFeature">
6070 <desc>Query whether a CPU feature is supported or not.</desc>
6071 <param name="feature" type="ProcessorFeature" dir="in">
6072 <desc>
6073 CPU Feature identifier.
6074 </desc>
6075 </param>
6076 <param name="supported" type="boolean" dir="return">
6077 <desc>
6078 Feature is supported or not.
6079 </desc>
6080 </param>
6081 </method>
6082
6083 <method name="getProcessorDescription">
6084 <desc>Query the model string of a specified host CPU.
6085 <note>
6086 This function is not implemented in the current version of the
6087 product.
6088 </note>
6089 </desc>
6090 <param name="cpuId" type="unsigned long" dir="in">
6091 <desc>
6092 Identifier of the CPU.
6093 </desc>
6094 </param>
6095 <param name="description" type="wstring" dir="return">
6096 <desc>
6097 Model string. A NULL string is returned if value is not known or
6098 @a cpuId is invalid.
6099 </desc>
6100 </param>
6101 </method>
6102
6103 <attribute name="memorySize" type="unsigned long" readonly="yes">
6104 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6105 </attribute>
6106
6107 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6108 <desc>Available system memory in the host system.</desc>
6109 </attribute>
6110
6111 <attribute name="operatingSystem" type="wstring" readonly="yes">
6112 <desc>Name of the host system's operating system.</desc>
6113 </attribute>
6114
6115 <attribute name="OSVersion" type="wstring" readonly="yes">
6116 <desc>Host operating system's version string.</desc>
6117 </attribute>
6118
6119 <attribute name="UTCTime" type="long long" readonly="yes">
6120 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6121 </attribute>
6122
6123<if target="midl">
6124 <method name="createHostNetworkInterface">
6125 <desc>
6126 Creates a new adapter for Host Interface Networking.
6127 <result name="E_INVALIDARG">
6128 Host network interface @a name already exists.
6129 </result>
6130 </desc>
6131 <param name="name" type="wstring" dir="in">
6132 <desc>
6133 Adapter name.
6134 </desc>
6135 </param>
6136 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6137 <desc>
6138 Created host interface object.
6139 </desc>
6140 </param>
6141 <param name="progress" type="IProgress" dir="return">
6142 <desc>
6143 Progress object to track the operation completion.
6144 </desc>
6145 </param>
6146 </method>
6147 <method name="removeHostNetworkInterface">
6148 <desc>
6149 Removes the given host network interface.
6150 <result name="VBOX_E_OBJECT_NOT_FOUND">
6151 No host network interface matching @a id found.
6152 </result>
6153 </desc>
6154 <param name="id" type="uuid" dir="in">
6155 <desc>
6156 Adapter GUID.
6157 </desc>
6158 </param>
6159 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6160 <desc>
6161 Removed host interface object.
6162 </desc>
6163 </param>
6164 <param name="progress" type="IProgress" dir="return">
6165 <desc>
6166 Progress object to track the operation completion.
6167 </desc>
6168 </param>
6169 </method>
6170</if>
6171
6172 <method name="createUSBDeviceFilter">
6173 <desc>
6174 Creates a new USB device filter. All attributes except
6175 the filter name are set to <tt>null</tt> (any match),
6176 <i>active</i> is <tt>false</tt> (the filter is not active).
6177
6178 The created filter can be added to the list of filters using
6179 <link to="#insertUSBDeviceFilter()"/>.
6180
6181 <see>#USBDeviceFilters</see>
6182 </desc>
6183 <param name="name" type="wstring" dir="in">
6184 <desc>
6185 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6186 for more info.
6187 </desc>
6188 </param>
6189 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6190 <desc>Created filter object.</desc>
6191 </param>
6192 </method>
6193
6194 <method name="insertUSBDeviceFilter">
6195 <desc>
6196 Inserts the given USB device to the specified position
6197 in the list of filters.
6198
6199 Positions are numbered starting from <tt>0</tt>. If the specified
6200 position is equal to or greater than the number of elements in
6201 the list, the filter is added at the end of the collection.
6202
6203 <note>
6204 Duplicates are not allowed, so an attempt to insert a
6205 filter that is already in the list, will return an
6206 error.
6207 </note>
6208 <note>
6209 This method may set a @ref com_warnings "warning result code".
6210 </note>
6211 <note>
6212 If USB functionality is not available in the given edition of
6213 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6214 </note>
6215
6216 <see>#USBDeviceFilters</see>
6217
6218 <result name="VBOX_E_INVALID_OBJECT_STATE">
6219 USB device filter is not created within this VirtualBox instance.
6220 </result>
6221 <result name="E_INVALIDARG">
6222 USB device filter already in list.
6223 </result>
6224
6225 </desc>
6226 <param name="position" type="unsigned long" dir="in">
6227 <desc>Position to insert the filter to.</desc>
6228 </param>
6229 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6230 <desc>USB device filter to insert.</desc>
6231 </param>
6232 </method>
6233
6234 <method name="removeUSBDeviceFilter">
6235 <desc>
6236 Removes a USB device filter from the specified position in the
6237 list of filters.
6238
6239 Positions are numbered starting from <tt>0</tt>. Specifying a
6240 position equal to or greater than the number of elements in
6241 the list will produce an error.
6242
6243 <note>
6244 This method may set a @ref com_warnings "warning result code".
6245 </note>
6246 <note>
6247 If USB functionality is not available in the given edition of
6248 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6249 </note>
6250
6251 <see>#USBDeviceFilters</see>
6252
6253 <result name="E_INVALIDARG">
6254 USB device filter list empty or invalid @a position.
6255 </result>
6256
6257 </desc>
6258 <param name="position" type="unsigned long" dir="in">
6259 <desc>Position to remove the filter from.</desc>
6260 </param>
6261 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6262 <desc>Removed USB device filter.</desc>
6263 </param>
6264 </method>
6265
6266 </interface>
6267
6268 <!--
6269 // ISystemProperties
6270 /////////////////////////////////////////////////////////////////////////
6271 -->
6272
6273 <interface
6274 name="ISystemProperties"
6275 extends="$unknown"
6276 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6277 wsmap="managed"
6278 >
6279 <desc>
6280 The ISystemProperties interface represents global properties of the given
6281 VirtualBox installation.
6282
6283 These properties define limits and default values for various attributes
6284 and parameters. Most of the properties are read-only, but some can be
6285 changed by a user.
6286 </desc>
6287
6288 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6289 <desc>Minimum guest system memory in Megabytes.</desc>
6290 </attribute>
6291
6292 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6293 <desc>Maximum guest system memory in Megabytes.</desc>
6294 </attribute>
6295
6296 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6297 <desc>Minimum guest video memory in Megabytes.</desc>
6298 </attribute>
6299
6300 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6301 <desc>Maximum guest video memory in Megabytes.</desc>
6302 </attribute>
6303
6304 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6305 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6306 </attribute>
6307
6308 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6309 <desc>
6310 Number of network adapters associated with every
6311 <link to="IMachine"/> instance.
6312 </desc>
6313 </attribute>
6314
6315 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6316 <desc>
6317 Number of serial ports associated with every
6318 <link to="IMachine"/> instance.
6319 </desc>
6320 </attribute>
6321
6322 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6323 <desc>
6324 Number of parallel ports associated with every
6325 <link to="IMachine"/> instance.
6326 </desc>
6327 </attribute>
6328
6329 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6330 <desc>
6331 Maximum device position in the boot order. This value corresponds
6332 to the total number of devices a machine can boot from, to make it
6333 possible to include all possible devices to the boot list.
6334 <see><link to="IMachine::setBootOrder()"/></see>
6335 </desc>
6336 </attribute>
6337
6338 <attribute name="defaultMachineFolder" type="wstring">
6339 <desc>
6340 Full path to the default directory used to create new or open
6341 existing machines when a settings file name contains no
6342 path.
6343
6344 The initial value of this property is
6345 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6346 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6347
6348 <note>
6349 Setting this property to <tt>null</tt> will restore the
6350 initial value.
6351 </note>
6352 <note>
6353 When settings this property, the specified path can be
6354 absolute (full path) or relative
6355 to the <link to="IVirtualBox::homeFolder">
6356 VirtualBox home directory</link>.
6357 When reading this property, a full path is
6358 always returned.
6359 </note>
6360 <note>
6361 The specified path may not exist, it will be created
6362 when necessary.
6363 </note>
6364
6365 <see>
6366 <link to="IVirtualBox::createMachine()"/>,
6367 <link to="IVirtualBox::openMachine()"/>
6368 </see>
6369 </desc>
6370 </attribute>
6371
6372 <attribute name="defaultHardDiskFolder" type="wstring">
6373 <desc>
6374 Full path to the default directory used to create new or open existing
6375 virtual disks.
6376
6377 This path is used when the storage unit of a hard disk is a regular file
6378 in the host's file system and only a file name that contains no path is
6379 given.
6380
6381 The initial value of this property is
6382 <tt>&lt;</tt>
6383 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6384 <tt>&gt;/HardDisks</tt>.
6385
6386 <note>
6387 Setting this property to <tt>null</tt> will restore the
6388 initial value.
6389 </note>
6390 <note>
6391 When settings this property, the specified path can be relative
6392 to the
6393 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6394 absolute. When reading this property, a full path is
6395 always returned.
6396 </note>
6397 <note>
6398 The specified path may not exist, it will be created
6399 when necessary.
6400 </note>
6401
6402 <see>
6403 IHardDisk2,
6404 <link to="IVirtualBox::createHardDisk2()"/>,
6405 <link to="IVirtualBox::openHardDisk2()"/>,
6406 <link to="IMedium::location"/>
6407 </see>
6408 </desc>
6409 </attribute>
6410
6411 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6412 <desc>
6413 List of all hard disk storage formats supported by this VirtualBox
6414 installation.
6415
6416 Note that the virtual hard disk framework is backend-based, therefore
6417 the list of supported formats depends on what backends are currently
6418 installed.
6419
6420 <see>
6421 <link to="IHardDiskFormat"/>,
6422 </see>
6423 </desc>
6424 </attribute>
6425
6426 <attribute name="defaultHardDiskFormat" type="wstring">
6427 <desc>
6428 Identifier of the default hard disk format used by VirtualBox.
6429
6430 The hard disk format set by this attribute is used by VirtualBox
6431 when the hard disk format was not specified explicitly. One example is
6432 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6433 format argument. A more complex example is implicit creation of
6434 differencing hard disks when taking a snapshot of a virtual machine:
6435 this operation will try to use a format of the parent hard disk first
6436 and if this format does not support differencing hard disks the default
6437 format specified by this argument will be used.
6438
6439 The list of supported hard disk formats may be obtained by the
6440 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6441 format must have a capability to create differencing hard disks;
6442 otherwise opeartions that create hard disks implicitly may fail
6443 unexpectedly.
6444
6445 The initial value of this property is <tt>VDI</tt> in the current
6446 version of the VirtualBox product, but may change in the future.
6447
6448 <note>
6449 Setting this property to <tt>null</tt> will restore the
6450 initial value.
6451 </note>
6452
6453 <see>
6454 <link to="#hardDiskFormats"/>,
6455 <link to="IHardDiskFormat::id"/>,
6456 <link to="IVirtualBox::createHardDisk2()"/>
6457 </see>
6458 </desc>
6459 </attribute>
6460
6461 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6462 <desc>
6463 Library that provides authentication for VRDP clients. The library
6464 is used if a virtual machine's authentication type is set to "external"
6465 in the VM RemoteDisplay configuration.
6466
6467 The system library extension (".DLL" or ".so") must be omitted.
6468 A full path can be specified; if not, then the library must reside on the
6469 system's default library path.
6470
6471 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6472 of that name in one of the default VirtualBox library directories.
6473
6474 For details about VirtualBox authentication libraries and how to implement
6475 them, please refer to the VirtualBox manual.
6476
6477 <note>
6478 Setting this property to <tt>null</tt> will restore the
6479 initial value.
6480 </note>
6481 </desc>
6482 </attribute>
6483
6484 <attribute name="webServiceAuthLibrary" type="wstring">
6485 <desc>
6486 Library that provides authentication for webservice clients. The library
6487 is used if a virtual machine's authentication type is set to "external"
6488 in the VM RemoteDisplay configuration and will be called from
6489 within the <link to="IWebsessionManager::logon" /> implementation.
6490
6491 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6492 there is no per-VM setting for this, as the webservice is a global
6493 resource (if it is running). Only for this setting (for the webservice),
6494 setting this value to a literal "null" string disables authentication,
6495 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
6496 no matter what user name and password are supplied.
6497
6498 The initial value of this property is <tt>VRDPAuth</tt>,
6499 meaning that the webservice will use the same authentication
6500 library that is used by default for VBoxVRDP (again, see
6501 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
6502 The format and calling convention of authentication libraries
6503 is the same for the webservice as it is for VBoxVRDP.
6504
6505 </desc>
6506 </attribute>
6507
6508 <attribute name="HWVirtExEnabled" type="boolean">
6509 <desc>
6510 This specifies the default value for hardware virtualization
6511 extensions. If enabled, virtual machines will make use of
6512 hardware virtualization extensions such as Intel VT-x and
6513 AMD-V by default. This value can be overridden by each VM
6514 using their <link to="IMachine::HWVirtExEnabled" /> property.
6515 </desc>
6516 </attribute>
6517
6518 <attribute name="LogHistoryCount" type="unsigned long">
6519 <desc>
6520 This value specifies how many old release log files are kept.
6521 </desc>
6522 </attribute>
6523 </interface>
6524
6525 <!--
6526 // IGuest
6527 /////////////////////////////////////////////////////////////////////////
6528 -->
6529
6530 <interface
6531 name="IGuestOSType" extends="$unknown"
6532 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
6533 wsmap="struct"
6534 >
6535 <desc>
6536 </desc>
6537
6538 <attribute name="familyId" type="wstring" readonly="yes">
6539 <desc>Guest OS family identifier string.</desc>
6540 </attribute>
6541
6542 <attribute name="familyDescription" type="wstring" readonly="yes">
6543 <desc>Human readable description of the guest OS family.</desc>
6544 </attribute>
6545
6546 <attribute name="id" type="wstring" readonly="yes">
6547 <desc>Guest OS identifier string.</desc>
6548 </attribute>
6549
6550 <attribute name="description" type="wstring" readonly="yes">
6551 <desc>Human readable description of the guest OS.</desc>
6552 </attribute>
6553
6554 <attribute name="is64Bit" type="boolean" readonly="yes">
6555 <desc>Returns @c true if the given OS is 64-bit</desc>
6556 </attribute>
6557
6558 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
6559 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
6560 </attribute>
6561
6562 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
6563 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
6564 </attribute>
6565
6566 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
6567 <desc>Recommended RAM size in Megabytes.</desc>
6568 </attribute>
6569
6570 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
6571 <desc>Recommended video RAM size in Megabytes.</desc>
6572 </attribute>
6573
6574 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
6575 <desc>Recommended hard disk size in Megabytes.</desc>
6576 </attribute>
6577
6578 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
6579 <desc>Returns recommended network adapter for this OS type.</desc>
6580 </attribute>
6581 </interface>
6582
6583
6584 <enumerator
6585 name="IGuestOSTypeEnumerator" type="IGuestOSType"
6586 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
6587 />
6588
6589 <collection
6590 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
6591 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
6592 readonly="yes"
6593 />
6594
6595 <interface
6596 name="IGuest" extends="$unknown"
6597 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
6598
6599 wsmap="suppress"
6600 >
6601 <desc>
6602 The IGuest interface represents information about the operating system
6603 running inside the virtual machine. Used in
6604 <link to="IConsole::guest"/>.
6605
6606 IGuest provides information about the guest operating system, whether
6607 Guest Additions are installed and other OS-specific virtual machine
6608 properties.
6609 </desc>
6610
6611 <attribute name="OSTypeId" type="wstring" readonly="yes">
6612 <desc>
6613 Identifier of the Guest OS type as reported by the Guest
6614 Additions.
6615 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
6616 an IGuestOSType object representing details about the given
6617 Guest OS type.
6618 <note>
6619 If Guest Additions are not installed, this value will be
6620 the same as <link to="IMachine::OSTypeId"/>.
6621 </note>
6622 </desc>
6623 </attribute>
6624
6625 <attribute name="additionsActive" type="boolean" readonly="yes">
6626 <desc>
6627 Flag whether the Guest Additions are installed and active
6628 in which case their version will be returned by the
6629 <link to="#additionsVersion"/> property.
6630 </desc>
6631 </attribute>
6632
6633 <attribute name="additionsVersion" type="wstring" readonly="yes">
6634 <desc>
6635 Version of the Guest Additions (3 decimal numbers separated
6636 by dots) or empty when the Additions are not installed. The
6637 Additions may also report a version but yet not be active as
6638 the version might be refused by VirtualBox (incompatible) or
6639 other failures occurred.
6640 </desc>
6641 </attribute>
6642
6643 <attribute name="supportsSeamless" type="boolean" readonly="yes">
6644 <desc>
6645 Flag whether seamless guest display rendering (seamless desktop
6646 integration) is supported.
6647 </desc>
6648 </attribute>
6649
6650 <attribute name="supportsGraphics" type="boolean" readonly="yes">
6651 <desc>
6652 Flag whether the guest is in graphics mode. If it is not, then
6653 seamless rendering will not work, resize hints are not immediately
6654 acted on and guest display resizes are probably not initiated by
6655 the guest additions.
6656 </desc>
6657 </attribute>
6658
6659 <attribute name="memoryBalloonSize" type="unsigned long">
6660 <desc>Guest system memory balloon size in megabytes.</desc>
6661 </attribute>
6662
6663 <attribute name="statisticsUpdateInterval" type="unsigned long">
6664 <desc>Interval to update guest statistics in seconds.</desc>
6665 </attribute>
6666
6667 <method name="setCredentials">
6668 <desc>
6669 Store login credentials that can be queried by guest operating
6670 systems with Additions installed. The credentials are transient
6671 to the session and the guest may also choose to erase them. Note
6672 that the caller cannot determine whether the guest operating system
6673 has queried or made use of the credentials.
6674
6675 <result name="VBOX_E_VM_ERROR">
6676 VMM device is not available.
6677 </result>
6678
6679 </desc>
6680 <param name="userName" type="wstring" dir="in">
6681 <desc>User name string, can be empty</desc>
6682 </param>
6683 <param name="password" type="wstring" dir="in">
6684 <desc>Password string, can be empty</desc>
6685 </param>
6686 <param name="domain" type="wstring" dir="in">
6687 <desc>Domain name (guest logon scheme specific), can be empty</desc>
6688 </param>
6689 <param name="allowInteractiveLogon" type="boolean" dir="in">
6690 <desc>
6691 Flag whether the guest should alternatively allow the user to
6692 interactively specify different credentials. This flag might
6693 not be supported by all versions of the Additions.
6694 </desc>
6695 </param>
6696 </method>
6697
6698 <method name="getStatistic">
6699 <desc>
6700 Query specified guest statistics as reported by the VirtualBox Additions.
6701 </desc>
6702 <param name="cpuId" type="unsigned long" dir="in">
6703 <desc>Virtual CPU id; not relevant for all statistic types</desc>
6704 </param>
6705 <param name="statistic" type="GuestStatisticType" dir="in">
6706 <desc>Statistic type.</desc>
6707 </param>
6708 <param name="statVal" type="unsigned long" dir="out">
6709 <desc>Statistics value</desc>
6710 </param>
6711 </method>
6712
6713 </interface>
6714
6715
6716 <!--
6717 // IProgress
6718 /////////////////////////////////////////////////////////////////////////
6719 -->
6720
6721 <enumerator
6722 name="IProgressEnumerator" type="IProgress"
6723 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
6724 />
6725
6726 <collection
6727 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
6728 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
6729 readonly="yes"
6730 />
6731
6732 <interface
6733 name="IProgress" extends="$unknown"
6734 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
6735 wsmap="managed"
6736 >
6737 <desc>
6738 The IProgress interface represents a task progress object that allows
6739 to wait for the completion of some asynchronous task.
6740
6741 The task consists of one or more operations that run sequentially,
6742 one after one. There is an individual percent of completion of the
6743 current operation and the percent of completion of the task as a
6744 whole. Similarly, you can wait for the completion of a particular
6745 operation or for the completion of the whole task.
6746
6747 Every operation is identified by a number (starting from 0)
6748 and has a separate description.
6749 </desc>
6750
6751 <attribute name="id" type="uuid" readonly="yes">
6752 <desc>ID of the task.</desc>
6753 </attribute>
6754
6755 <attribute name="description" type="wstring" readonly="yes">
6756 <desc>Description of the task.</desc>
6757 </attribute>
6758
6759 <attribute name="initiator" type="$unknown" readonly="yes">
6760 <desc>Initiator of the task.</desc>
6761 </attribute>
6762
6763 <attribute name="cancelable" type="boolean" readonly="yes">
6764 <desc>Whether the task can be interrupted.</desc>
6765 </attribute>
6766
6767 <attribute name="percent" type="long" readonly="yes">
6768 <desc>
6769 Current task progress value in percent.
6770 This value depends on how many operations are already complete.
6771 </desc>
6772 </attribute>
6773
6774 <attribute name="completed" type="boolean" readonly="yes">
6775 <desc>Whether the task has been completed.</desc>
6776 </attribute>
6777
6778 <attribute name="canceled" type="boolean" readonly="yes">
6779 <desc>Whether the task has been canceled.</desc>
6780 </attribute>
6781
6782 <attribute name="resultCode" type="result" readonly="yes">
6783 <desc>
6784 Result code of the progress task.
6785 Valid only if <link to="#completed"/> is true.
6786 </desc>
6787 </attribute>
6788
6789 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
6790 <desc>
6791 Extended information about the unsuccessful result of the
6792 progress operation. May be NULL when no extended information
6793 is available.
6794 Valid only if <link to="#completed"/> is true and
6795 <link to="#resultCode"/> indicates a failure.
6796 </desc>
6797 </attribute>
6798
6799 <attribute name="operationCount" type="unsigned long" readonly="yes">
6800 <desc>
6801 Number of operations this task is divided into.
6802 Every task consists of at least one operation.
6803 </desc>
6804 </attribute>
6805
6806 <attribute name="operation" type="unsigned long" readonly="yes">
6807 <desc>Number of the operation being currently executed.</desc>
6808 </attribute>
6809
6810 <attribute name="operationDescription" type="wstring" readonly="yes">
6811 <desc>
6812 Description of the operation being currently executed.
6813 </desc>
6814 </attribute>
6815
6816 <attribute name="operationPercent" type="long" readonly="yes">
6817 <desc>Current operation progress value in percent.</desc>
6818 </attribute>
6819
6820 <method name="waitForCompletion">
6821 <desc>
6822 Waits until the task is done (including all operations) with a
6823 given timeout.
6824
6825 <result name="VBOX_E_IPRT_ERROR">
6826 Failed to wait for task completion.
6827 </result>
6828
6829 </desc>
6830 <param name="timeout" type="long" dir="in">
6831 <desc>
6832 Timeout value in milliseconds.
6833 Specify -1 for an indefinite wait.
6834 </desc>
6835 </param>
6836 </method>
6837
6838 <method name="waitForOperationCompletion">
6839 <desc>
6840 Waits until the given operation is done with a given timeout.
6841
6842 <result name="VBOX_E_IPRT_ERROR">
6843 Failed to wait for operation completion.
6844 </result>
6845
6846 </desc>
6847 <param name="operation" type="unsigned long" dir="in">
6848 <desc>
6849 Number of the operation to wait for.
6850 Must be less than <link to="#operationCount"/>.
6851 </desc>
6852 </param>
6853 <param name="timeout" type="long" dir="in">
6854 <desc>
6855 Timeout value in milliseconds.
6856 Specify -1 for an indefinite wait.
6857 </desc>
6858 </param>
6859 </method>
6860
6861 <method name="cancel">
6862 <desc>
6863 Cancels the task.
6864 <note>
6865 If <link to="#cancelable"/> is <tt>false</tt>, then
6866 this method will fail.
6867 </note>
6868
6869 <result name="VBOX_E_INVALID_OBJECT_STATE">
6870 Operation cannot be canceled.
6871 </result>
6872
6873 </desc>
6874 </method>
6875
6876 </interface>
6877
6878
6879 <!--
6880 // ISnapshot
6881 /////////////////////////////////////////////////////////////////////////
6882 -->
6883
6884 <enumerator
6885 name="ISnapshotEnumerator" type="ISnapshot"
6886 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
6887 />
6888
6889 <collection
6890 name="ISnapshotCollection" type="ISnapshot"
6891 enumerator="ISnapshotEnumerator"
6892 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
6893 readonly="yes"
6894 />
6895
6896 <interface
6897 name="ISnapshot" extends="$unknown"
6898 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
6899 wsmap="managed"
6900 >
6901 <desc>
6902 The ISnapshot interface represents a snapshot of the virtual
6903 machine.
6904
6905 The <i>snapshot</i> stores all the information about a virtual
6906 machine necessary to bring it to exactly the same state as it was at
6907 the time of taking the snapshot. The snapshot includes:
6908
6909 <ul>
6910 <li>all settings of the virtual machine (i.e. its hardware
6911 configuration: RAM size, attached hard disks, etc.)
6912 </li>
6913 <li>the execution state of the virtual machine (memory contents,
6914 CPU state, etc.).
6915 </li>
6916 </ul>
6917
6918 Snapshots can be <i>offline</i> (taken when the VM is powered off)
6919 or <i>online</i> (taken when the VM is running). The execution
6920 state of the offline snapshot is called a <i>zero execution state</i>
6921 (it doesn't actually contain any information about memory contents
6922 or the CPU state, assuming that all hardware is just powered off).
6923
6924 <h3>Snapshot branches</h3>
6925
6926 Snapshots can be chained. Chained snapshots form a branch where
6927 every next snapshot is based on the previous one. This chaining is
6928 mostly related to hard disk branching (see <link to="IHardDisk2"/>
6929 description). This means that every time a new snapshot is created,
6930 a new differencing hard disk is implicitly created for all normal
6931 hard disks attached to the given virtual machine. This allows to
6932 fully restore hard disk contents when the machine is later reverted
6933 to a particular snapshot.
6934
6935 In the current implementation, multiple snapshot branches within one
6936 virtual machine are not allowed. Every machine has a single branch,
6937 and <link to="IConsole::takeSnapshot()"/> operation adds a new
6938 snapshot to the top of that branch.
6939
6940 Existing snapshots can be discarded using
6941 <link to="IConsole::discardSnapshot()"/>.
6942
6943 <h3>Current snapshot</h3>
6944
6945 Every virtual machine has a current snapshot, identified by
6946 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
6947 a base for the <i>current machine state</i> (see below), to the effect
6948 that all normal hard disks of the machine and its execution
6949 state are based on this snapshot.
6950
6951 In the current implementation, the current snapshot is always the
6952 last taken snapshot (i.e. the head snapshot on the branch) and it
6953 cannot be changed.
6954
6955 The current snapshot is <tt>null</tt> if the machine doesn't have
6956 snapshots at all; in this case the current machine state is just
6957 current settings of this machine plus its current execution state.
6958
6959 <h3>Current machine state</h3>
6960
6961 The current machine state is what represented by IMachine instances got
6962 directly from IVirtualBox
6963 using <link
6964 to="IVirtualBox::getMachine()">getMachine()</link>, <link
6965 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
6966 to instances returned by <link to="ISnapshot::machine"/>). This state
6967 is always used when the machine is <link to="IConsole::powerUp"> powered
6968 on</link>.
6969
6970 The current machine state also includes the current execution state.
6971 If the machine is being currently executed
6972 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
6973 and above), its execution state is just what's happening now.
6974 If it is powered off (<link to="MachineState_PoweredOff"/> or
6975 <link to="MachineState_Aborted"/>), it has a zero execution state.
6976 If the machine is saved (<link to="MachineState_Saved"/>), its
6977 execution state is what saved in the execution state file
6978 (<link to="IMachine::stateFilePath"/>).
6979
6980 If the machine is in the saved state, then, next time it is powered
6981 on, its execution state will be fully restored from the saved state
6982 file and the execution will continue from the point where the state
6983 was saved.
6984
6985 Similarly to snapshots, the current machine state can be discarded
6986 using <link to="IConsole::discardCurrentState()"/>.
6987
6988 <h3>Taking and discarding snapshots</h3>
6989
6990 The table below briefly explains the meaning of every snapshot
6991 operation:
6992
6993 <table>
6994 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
6995
6996 <tr><td><link to="IConsole::takeSnapshot()"/></td>
6997
6998 <td>Save the current state of the virtual machine, including all
6999 settings, contents of normal hard disks and the current modifications
7000 to immutable hard disks (for online snapshots)</td>
7001
7002 <td>The current state is not changed (the machine will continue
7003 execution if it is being executed when the snapshot is
7004 taken)</td></tr>
7005
7006 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7007
7008 <td>Forget the state of the virtual machine stored in the snapshot:
7009 dismiss all saved settings and delete the saved execution state (for
7010 online snapshots)</td>
7011
7012 <td>Other snapshots (including child snapshots, if any) and the
7013 current state are not directly affected</td></tr>
7014
7015 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7016
7017 <td>Restore the current state of the virtual machine from the state
7018 stored in the current snapshot, including all settings and hard disk
7019 contents</td>
7020
7021 <td>The current state of the machine existed prior to this operation
7022 is lost</td></tr>
7023
7024 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7025
7026 <td>Completely revert the virtual machine to the state it was in
7027 before the current snapshot has been taken</td>
7028
7029 <td>The current state, as well as the current snapshot, are
7030 lost</td></tr>
7031
7032 </table>
7033
7034 </desc>
7035
7036 <attribute name="id" type="uuid" readonly="yes">
7037 <desc>UUID of the snapshot.</desc>
7038 </attribute>
7039
7040 <attribute name="name" type="wstring">
7041 <desc>Short name of the snapshot.</desc>
7042 </attribute>
7043
7044 <attribute name="description" type="wstring">
7045 <desc>Optional description of the snapshot.</desc>
7046 </attribute>
7047
7048 <attribute name="timeStamp" type="long long" readonly="yes">
7049 <desc>
7050 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7051 </desc>
7052 </attribute>
7053
7054 <attribute name="online" type="boolean" readonly="yes">
7055 <desc>
7056 <tt>true</tt> if this snapshot is an online snapshot and
7057 <tt>false</tt> otherwise.
7058
7059 <note>
7060 When this attribute is <tt>true</tt>, the
7061 <link to="IMachine::stateFilePath"/> attribute of the
7062 <link to="#machine"/> object associated with this snapshot
7063 will point to the saved state file. Otherwise, it will be
7064 <tt>null</tt>.
7065 </note>
7066 </desc>
7067 </attribute>
7068
7069 <attribute name="machine" type="IMachine" readonly="yes">
7070 <desc>
7071 Virtual machine this snapshot is taken on. This object
7072 stores all settings the machine had when taking this snapshot.
7073 <note>
7074 The returned machine object is immutable, i.e. no
7075 any settings can be changed.
7076 </note>
7077 </desc>
7078 </attribute>
7079
7080 <attribute name="parent" type="ISnapshot" readonly="yes">
7081 <desc>
7082 Parent snapshot (a snapshot this one is based on).
7083 <note>
7084 It's not an error to read this attribute on a snapshot
7085 that doesn't have a parent -- a null object will be
7086 returned to indicate this.
7087 </note>
7088 </desc>
7089 </attribute>
7090
7091 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7092 <desc>
7093 Child snapshots (all snapshots having this one as a parent).
7094 <note>
7095 In the current implementation, there can be only one
7096 child snapshot, or no children at all, meaning this is the
7097 last (head) snapshot.
7098 </note>
7099 </desc>
7100 </attribute>
7101
7102 </interface>
7103
7104
7105 <!--
7106 // IMedia
7107 /////////////////////////////////////////////////////////////////////////
7108 -->
7109
7110 <enum
7111 name="MediaState"
7112 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7113 >
7114 <desc>
7115 Virtual media state.
7116 <see>IMedia</see>
7117 </desc>
7118
7119 <const name="NotCreated" value="0">
7120 <desc>
7121 Associated media storage does not exist (either was not created yet or
7122 was deleted).
7123 </desc>
7124 </const>
7125 <const name="Created" value="1">
7126 <desc>
7127 Associated storage exists and accessible.
7128 </desc>
7129 </const>
7130 <const name="LockedRead" value="2">
7131 <desc>
7132 Media is locked for reading, no data modification is possible.
7133 </desc>
7134 </const>
7135 <const name="LockedWrite" value="3">
7136 <desc>
7137 Media is locked for writing, no concurrent data reading or modification
7138 is possible.
7139 </desc>
7140 </const>
7141 <const name="Inaccessible" value="4">
7142 <desc>
7143 Associated media storage is not accessible.
7144 </desc>
7145 </const>
7146 <const name="Creating" value="5">
7147 <desc>
7148 Associated media storage is being created.
7149 </desc>
7150 </const>
7151 <const name="Deleting" value="6">
7152 <desc>
7153 Associated media storage is being deleted.
7154 </desc>
7155 </const>
7156 </enum>
7157
7158 <interface
7159 name="IMedium" extends="$unknown"
7160 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7161 wsmap="managed"
7162 >
7163 <desc>
7164 The IMedium interface is a common interface for all objects representing
7165 virtual media such as hard disks, DVD images.
7166
7167 Each medium is associated with a storage unit (such as a file on the host
7168 computer or a network resource) that holds actual data. The location of
7169 the storage unit is represented by the #location attribute. The value of
7170 this attribute is media type dependent.
7171
7172 The exact media type may be determined by querying the appropriate
7173 interface such as:
7174 <ul>
7175 <li>IHardDisk2 (virtual hard disks)</li>
7176 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7177 <li>IFloppyImage2 (raw floppy image files)</li>
7178 </ul>
7179
7180 Existing media are opened using the following methods, depending on the
7181 media type:
7182 <ul>
7183 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7184 <li><link to="IVirtualBox::openDVDImage()"/></li>
7185 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7186 </ul>
7187
7188 New hard disk media are created using the
7189 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7190 images are created outside VirtualBox, usually by storing a copy
7191 of the real medium of the corresponding type in a regular file.
7192
7193 <h3>Known Media</h3>
7194
7195 When an existing medium gets opened for the first time, it gets
7196 automatically remembered by the given VirtualBox installation or, in other
7197 words, becomes a <i>known medium</i>. Known media are stored in the media
7198 registry transparently maintained by VirtualBox and stored in settings
7199 files so that this registry is preserved when VirtualBox is not running.
7200
7201 Newly created virtual hard disks get remembered only when the associated
7202 storage unit is actually created (see IHardDisk2 for more details).
7203
7204 All known media can be enumerated using
7205 <link to="IVirtualBox::hardDisks2"/>,
7206 <link to="IVirtualBox::DVDImages"/> and
7207 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7208 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7209 and similar methods or by location using
7210 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7211
7212 Only known media can be attached to virtual machines.
7213
7214 Removing known media from the media registry is performed when the given
7215 medium is closed using the <link to="#close()"/> method or when its
7216 associated storage unit is deleted (only for hard disks).
7217
7218 <h3>Accessibility Checks</h3>
7219
7220 The given medium (with the created storage unit) is considered to be
7221 <i>accessible</i> when its storage unit can be successfully read from.
7222 Accessible media are indicated by the <link to="MediaState_Created"/>
7223 value of the <link to="#state"/> attribute. When the storage unit cannot
7224 be read (for example, because it is located on a disconnected network
7225 resource, or was accidentally deleted outside VirtualBox), the medium is
7226 considered to be <i>inaccessible</i> which is indicated by the
7227 <link to="MediaState_Inaccessible"/> state. The details about the reason
7228 of being inaccessible can be obtained using the
7229 <link to="#lastAccessError"/> attribute.
7230
7231 A new accessibility check is performed each time the <link to="#state"/>
7232 attribute is read. Please note that this check may take long time (several
7233 seconds or even minutes, depending on the storage unit location and
7234 format), and will block the calling thread until finished. For this
7235 reason, it is recommended to never read this attribute on the main UI
7236 thread to avoid making the UI unresponsive.
7237
7238 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7239 created for the first time), all known media are in the
7240 <link to="MediaState_Inaccessible"/> state but the value of the <link
7241 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7242 accessibility check is made on startup. This is done to make the
7243 VirtualBox object ready for serving requests as
7244 fast as possible and let the end-user application decide if it needs to
7245 check media accessibility right away or not.
7246 </desc>
7247
7248 <attribute name="id" type="uuid" readonly="yes">
7249 <desc>
7250 UUID of the medium. For a newly created medium, this value is a randomly
7251 generated UUID.
7252
7253 <note>
7254 For media in one of MediaState_NotCreated, MediaState_Creating or
7255 MediaState_Deleting states, the value of this property is undefined
7256 and will most likely be an empty UUID.
7257 </note>
7258 </desc>
7259 </attribute>
7260
7261 <attribute name="description" type="wstring">
7262 <desc>
7263 Optional description of the medium. For newly created media, the value
7264 of this attribute value is <tt>null</tt>.
7265
7266 Media types that don't support this attribute will return E_NOTIMPL in
7267 attempt to get or set this attribute's value.
7268
7269 <note>
7270 For some storage types, reading this attribute may return an outdated
7271 (last known) value when <link to="#state"/> is <link
7272 to="MediaState_Inaccessible"/> or <link
7273 to="MediaState_LockedWrite"/> because the value of this attribute is
7274 stored within the storage unit itself. Also note that changing the
7275 attribute value is not possible in such case, as well as when the
7276 medium is the <link to="MediaState_LockedRead"/> state.
7277 </note>
7278 </desc>
7279 </attribute>
7280
7281 <attribute name="state" type="MediaState" readonly="yes">
7282 <desc>
7283 Current media state. Inspect <link to="MediaState"/> values for details.
7284
7285 Reading this attribute may take long time because a new accessibility
7286 check of the storage unit is performed every time the attribute is read.
7287 This check may cause a significant delay if the storage unit of the
7288 given medium is, for example, a file located on a network share which is
7289 not currently accessible due to connectivity problems -- the call will
7290 not return until a timeout interval defined by the host OS for this
7291 operation expires.
7292
7293 If the last known state of the medium is <link to="MediaState_Created"/>
7294 and the accessibility check fails then the state would be set to
7295 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7296 may be used to get more details about the failure. If the state of the
7297 medium is <link to="MediaState_LockedRead"/> or
7298 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7299 non-null value of <link to="#lastAccessError"/> will indicate a failed
7300 accessibility check in this case.
7301
7302 Note that not all media states are applicable to certain media types.
7303 For example, states <link to="MediaState_NotCreated"/>,
7304 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7305 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7306 IFloppyImage2 media.
7307 </desc>
7308 </attribute>
7309
7310 <attribute name="location" type="wstring">
7311 <desc>
7312 Location of the storage unit holding media data.
7313
7314 The format of the location string is media type specific. For media
7315 types that use regular files in a host's file system, the location
7316 string is just a full file name.
7317
7318 Some media types may support changing the storage unit location by
7319 simply changing the value of this property. If this operation is not
7320 supported, the implementation will return E_NOTIMPL in attempt to set
7321 this attribute's value.
7322
7323 When setting a value of the location attribute which is a regular file
7324 in the host's file system, the given file name may be either relative to
7325 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7326 absolute. Note that if the given location specification does not contain
7327 the file extension part then a proper default extension will be
7328 automatically appended by the implementation depending on the media type.
7329 </desc>
7330 </attribute>
7331
7332 <attribute name="name" type="wstring" readonly="yes">
7333 <desc>
7334 Name of the storage unit holding media data.
7335
7336 The returned string is a short version of the <link to="#location"/>
7337 attribute that is suitable for representing the medium in situations
7338 where the full location specification is too long (such as lists
7339 and comboboxes in GUI frontends). This string is also used by frontends
7340 to sort the media list alphabetically when needed.
7341
7342 For example, for locations that are regular files in the host's file
7343 system, the value of this attribute is just a file name (+ extension),
7344 without the path specification.
7345
7346 Note that as opposed to the <link to="#location"/> attribute, the name
7347 attribute will not necessary be unique for a list of media of the
7348 given type and format.
7349 </desc>
7350 </attribute>
7351
7352 <attribute name="size" type="unsigned long long" readonly="yes">
7353 <desc>
7354 Physical size of the storage unit used to hold media data (in bytes).
7355
7356 <note>
7357 For media whose <link to="#state"/> is <link
7358 to="MediaState_Inaccessible"/>, the value of this property is the
7359 last known size. For <link to="MediaState_NotCreated"/> media,
7360 the returned value is zero.
7361 </note>
7362 </desc>
7363 </attribute>
7364
7365 <attribute name="lastAccessError" type="wstring" readonly="yes">
7366 <desc>
7367 Text message that represents the result of the last accessibility
7368 check.
7369
7370 Accessibility checks are performed each time the <link to="#state"/>
7371 attribute is read. A @c null string is returned if the last
7372 accessibility check was successful. A non-null string indicates a
7373 failure and should normally describe a reason of the failure (for
7374 example, a file read error).
7375 </desc>
7376 </attribute>
7377
7378 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7379 <desc>
7380 Array of UUIDs of all machines this medium is attached to.
7381
7382 A <tt>null</tt> array is returned if this medium is not attached to any
7383 machine or to any machine's snapshot.
7384
7385 <note>
7386 The returned array will include a machine even if this medium is not
7387 attached to that machine in the current state but attached to it in
7388 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7389 details.
7390 </note>
7391 </desc>
7392 </attribute>
7393
7394 <method name="getSnapshotIds">
7395 <desc>
7396 Returns an array of UUIDs of all snapshots of the given machine where
7397 this medium is attached to it.
7398
7399 If the medium is attached to the machine in the current state, then the
7400 first element in the array will always be the ID of the queried machine
7401 (i.e. the value equal to the @c machineId argument), followed by
7402 snapshot IDs (if any).
7403
7404 If the medium is not attached to the machine in the current state, then
7405 the array will contain only snapshot IDs.
7406
7407 The returned array may be <tt>null</tt> if this medium is not attached
7408 to the given machine at all, neither in the current state nor in one of
7409 snapshots.
7410 </desc>
7411 <param name="machineId" type="uuid" dir="in">
7412 <desc>
7413 UUID of the machine to query.
7414 </desc>
7415 </param>
7416 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7417 <desc>
7418 Array of snapshot UUIDs of the given machine using this medium.
7419 </desc>
7420 </param>
7421 </method>
7422
7423 <method name="lockRead">
7424 <desc>
7425 Locks this medium for reading.
7426
7427 The read lock is shared: many clients can simultaneously lock the
7428 same media for reading unless it is already locked for writing (see
7429 <link to="#lockWrite()"/>) in which case an error is returned.
7430
7431 When the medium is locked for reading, it cannot be modified
7432 from within VirtualBox. This means that any method that changes
7433 the properties of this medium or contents of the storage unit
7434 will return an error (unless explicitly stated otherwise) and
7435 that an attempt to start a virtual machine that wants to modify
7436 the medium will also fail.
7437
7438 When the virtual machine is started up, it locks for reading all
7439 media it uses in read-only mode. If some media cannot be locked
7440 for reading, the startup procedure will fail.
7441
7442 The medium locked for reading must be unlocked using the <link
7443 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7444 can be nested and must be followed by the same number of paired
7445 <link to="#unlockRead()"/> calls.
7446
7447 This method sets the media state to <link
7448 to="MediaState_LockedRead"/> on success. The state prior to
7449 this call must be <link to="MediaState_Created"/>, <link
7450 to="MediaState_Inaccessible"/> or <link
7451 to="MediaState_LockedRead"/>. As you can see, inaccessible
7452 media can be locked too. This is not an error; this method
7453 performs a logical lock that prevents modifications of this
7454 media through the VirtualBox API, not a physical lock of the
7455 underlying storage unit.
7456
7457 This method returns the current state of the medium
7458 <b>before</b> the operation.
7459
7460 <result name="VBOX_E_INVALID_OBJECT_STATE">
7461 Invalid media state (e.g. not created, locked, inaccessible,
7462 creating, deleting).
7463 </result>
7464
7465 </desc>
7466 <param name="state" type="MediaState" dir="return">
7467 <desc>
7468 State of the medium after the operation.
7469 </desc>
7470 </param>
7471 </method>
7472
7473 <method name="unlockRead">
7474 <desc>
7475 Cancels the read lock previously set by <link to="#lockRead()"/>.
7476
7477 Either on success or on failure, this method returns the current state
7478 of the medium <b>after</b> the operation.
7479
7480 See <link to="#lockRead()"/> for more details.
7481
7482 <result name="VBOX_E_INVALID_OBJECT_STATE">
7483 Medium not locked for reading.
7484 </result>
7485
7486 </desc>
7487 <param name="state" type="MediaState" dir="return">
7488 <desc>
7489 State of the medium after the operation.
7490 </desc>
7491 </param>
7492 </method>
7493
7494 <method name="lockWrite">
7495 <desc>
7496 Locks this medium for writing.
7497
7498 The write lock, as opposed to <link to="#lockRead()"/>, is
7499 exclusive: there may be only one client that holds a write lock
7500 and there may be no read locks while the write lock is held.
7501
7502 When the medium is locked for writing, it cannot be modified
7503 from within VirtualBox and it is not guaranteed that the values
7504 of its properties are up-to-date. Any method that changes the
7505 properties of this medium or contents of the storage unit will
7506 return an error ((unless explicitly stated otherwise) and an
7507 attempt to start a virtual machine that wants to modify or to
7508 read the medium will also fail.
7509
7510 When the virtual machine is started up, it locks for writing all
7511 media it uses to write data to. If some media cannot be locked
7512 for writing, the startup procedure will fail.
7513
7514 The medium locked for writing must be unlocked using the <link
7515 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
7516 can <b>not</b> be nested and must be followed by a paired <link
7517 to="#unlockWrite()"/> call.
7518
7519 This method sets the media state to <link
7520 to="MediaState_LockedWrite"/> on success. The state prior to
7521 this call must be <link to="MediaState_Created"/> or <link
7522 to="MediaState_Inaccessible"/>. As you can see, inaccessible
7523 media can be locked too. This is not an error; this method
7524 performs a logical lock that prevents modifications of this
7525 media through the VirtualBox API, not a physical lock of the
7526 underlying storage unit.
7527
7528 Either on success or on failure, this method returns the current
7529 state of the medium <b>before</b> the operation.
7530
7531 <result name="VBOX_E_INVALID_OBJECT_STATE">
7532 Invalid media state (e.g. not created, locked, inaccessible,
7533 creating, deleting).
7534 </result>
7535
7536 </desc>
7537 <param name="state" type="MediaState" dir="return">
7538 <desc>
7539 State of the medium after the operation.
7540 </desc>
7541 </param>
7542 </method>
7543
7544 <method name="unlockWrite">
7545 <desc>
7546 Cancels the write lock previously set by <link to="#lockWrite()"/>.
7547
7548 Either on success or on failure, this method returns the current
7549 state of the medium <b>after</b> the operation.
7550
7551 See <link to="#lockWrite()"/> for more details.
7552
7553 <result name="VBOX_E_INVALID_OBJECT_STATE">
7554 Medium not locked for writing.
7555 </result>
7556
7557 </desc>
7558 <param name="state" type="MediaState" dir="return">
7559 <desc>
7560 State of the medium after the operation.
7561 </desc>
7562 </param>
7563 </method>
7564
7565 <method name="close">
7566 <desc>
7567 Closes this medium.
7568
7569 The hard disk must not be attached to any known virtual machine
7570 and must not have any known child hard disks, otherwise the
7571 operation will fail.
7572
7573 When the hard disk is successfully closed, it gets removed from
7574 the list of remembered hard disks, but its storage unit is not
7575 deleted. In particular, this means that this hard disk can be
7576 later opened again using the <link
7577 to="IVirtualBox::openHardDisk2"/> call.
7578
7579 Note that after this method successfully returns, the given hard
7580 disk object becomes uninitialized. This means that any attempt
7581 to call any of its methods or attributes will fail with the
7582 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
7583
7584 <result name="VBOX_E_INVALID_OBJECT_STATE">
7585 Invalid media state (other than not created, created or
7586 inaccessible).
7587 </result>
7588 <result name="VBOX_E_OBJECT_IN_USE">
7589 Medium attached to virtual machine.
7590 </result>
7591 <result name="VBOX_E_FILE_ERROR">
7592 Settings file not accessible.
7593 </result>
7594 <result name="VBOX_E_XML_ERROR">
7595 Could not parse the settings file.
7596 </result>
7597
7598 </desc>
7599 </method>
7600
7601 </interface>
7602
7603
7604 <!--
7605 // IHardDisk2
7606 /////////////////////////////////////////////////////////////////////////
7607 -->
7608
7609 <enum
7610 name="HardDiskType"
7611 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
7612 >
7613 <desc>
7614 Virtual hard disk type.
7615 <see>IHardDisk</see>
7616 </desc>
7617
7618 <const name="Normal" value="0">
7619 <desc>
7620 Normal hard disk (attached directly or indirectly, preserved
7621 when taking snapshots).
7622 </desc>
7623 </const>
7624 <const name="Immutable" value="1">
7625 <desc>
7626 Immutable hard disk (attached indirectly, changes are wiped out
7627 after powering off the virtual machine).
7628 </desc>
7629 </const>
7630 <const name="Writethrough" value="2">
7631 <desc>
7632 Write through hard disk (attached directly, ignored when
7633 taking snapshots).
7634 </desc>
7635 </const>
7636 </enum>
7637
7638 <interface
7639 name="IHardDisk2Attachment" extends="$unknown"
7640 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
7641 wsmap="struct"
7642 >
7643 <desc>
7644 The IHardDisk2Attachment interface represents a hard disk attachment of a
7645 virtual machine.
7646
7647 Every hard disk attachment specifies a slot of the virtual hard disk
7648 controller and a virtual hard disk attached to this slot.
7649
7650 The array of hard disk attachments is returned by
7651 <link to="IMachine::hardDisk2Attachments"/>.
7652
7653 <note>
7654 With the COM API, this is an interface like all the others. With the
7655 webservice, this is mapped to a structure, so querying the attribute
7656 will not return an object, but a complete structure.
7657 </note>
7658 </desc>
7659 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
7660 <desc>Hard disk object associated with this attachment.</desc>
7661 </attribute>
7662
7663 <attribute name="bus" type="StorageBus" readonly="yes">
7664 <desc>Interface bus of this attachment.</desc>
7665 </attribute>
7666
7667 <attribute name="channel" type="long" readonly="yes">
7668 <desc>Channel number of this attachment.</desc>
7669 </attribute>
7670
7671 <attribute name="device" type="long" readonly="yes">
7672 <desc>Device slot number of this attachment.</desc>
7673 </attribute>
7674
7675 </interface>
7676
7677 <interface
7678 name="IHardDisk2" extends="IMedium"
7679 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
7680 wsmap="managed"
7681 >
7682 <desc>
7683 The IHardDisk2 interface represents a virtual hard disk drive
7684 used by a virtual machine.
7685
7686 Virtual hard disk objects virtualize the hard disk hardware and look like
7687 regular hard disks for the guest OS running inside the virtual machine.
7688
7689 <h3>Hard Disk Types</h3>
7690
7691 There are three types of hard disks:
7692 <link to="HardDiskType_Normal">Normal</link>,
7693 <link to="HardDiskType_Immutable">Immutable</link> and
7694 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
7695 hard disk defines how the hard disk is attached to a virtual machine and
7696 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
7697 machine with the attached hard disk is taken. The type of the hard disk is
7698 defined by the <link to="#type"/> attribute.
7699
7700 All hard disks can be also divided in two big groups: <i>base</i> hard
7701 disks and <i>differencing</i> hard disks. A base hard disk contains all
7702 sectors of the hard disk data in its storage unit and therefore can be
7703 used independently. On the contrary, a differencing hard disk contains
7704 only some part of the hard disk data (a subset of sectors) and needs
7705 another hard disk to get access to the missing sectors of data. This
7706 another hard disk is called a <i>parent</i> hard disk and defines a hard
7707 disk to which this differencing hard disk is known to be <i>linked to</i>.
7708 The parent hard disk may be itself a differencing hard disk. This
7709 way, differencing hard disks form a linked hard disk chain. This chain
7710 always ends with the base hard disk which is sometimes referred to as the
7711 root hard disk of this chain. Note that several differencing hard disks
7712 may be linked to the same parent hard disk. This way, all known hard disks
7713 form a hard disk tree which is based on their parent-child relationship.
7714
7715 Differencing hard disks can be distinguished from base hard disks by
7716 querying the <link to="#parent"/> attribute: base hard disks do not have
7717 parents they would depend on, so the value of this attribute is always
7718 <tt>null</tt> for them. Using this attribute, it is possible to walk up
7719 the hard disk tree (from the child hard disk to its parent). It is also
7720 possible to walk down the tree using the <link to="#children"/>
7721 attribute.
7722
7723 Note that the type of all differencing hard disks is
7724 <link to="HardDiskType_Normal">Normal</link>; all other values are
7725 meaningless for them. Base hard disks may be of any type.
7726
7727 <h3>Creating Hard Disks</h3>
7728
7729 New base hard disks are created using
7730 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
7731 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
7732 disks are usually implicitly created by VirtualBox when needed but may
7733 also be created explicitly using <link to="#createDiffStorage()"/>.
7734
7735 After the hard disk is successfully created (including the storage unit)
7736 or opened, it becomes a known hard disk (remembered in the internal media
7737 registry). Known hard disks can be attached to a virtual machine, accessed
7738 through <link to="IVirtualBox::getHardDisk2()"/> and
7739 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
7740 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
7741
7742 The following methods, besides <link to="IMedium::close()"/>,
7743 automatically remove the hard disk from the media registry:
7744 <ul>
7745 <li><link to="#deleteStorage()"/></li>
7746 <li><link to="#mergeTo()"/></li>
7747 </ul>
7748
7749 If the storage unit of the hard disk is a regular file in the host's
7750 file system then the rules stated in the description of the
7751 <link to="IMedium::location"/> attribute apply when setting its value. In
7752 addition, a plain file name without any path may be given, in which case
7753 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
7754 folder</link> will be prepended to it.
7755
7756 <h4>Automatic composition of the file name part</h4>
7757
7758 Another extension to the <link to="IMedium::location"/> attribute is that
7759 there is a possibility to cause VirtualBox to compose a unique value for
7760 the file name part of the location using the UUID of the hard disk. This
7761 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
7762 e.g. before the storage unit is created, and works as follows. You set the
7763 value of the <link to="IMedium::location"/> attribute to a location
7764 specification which only contains the path specification but not the file
7765 name part and ends with either a forward slash or a backslash character.
7766 In response, VirtualBox will generate a new UUID for the hard disk and
7767 compose the file name using the following pattern:
7768 <pre>
7769 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
7770 </pre>
7771 where <tt>&lt;path&gt;</tt> is the supplied path specification,
7772 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
7773 is the default extension for the storage format of this hard disk. After
7774 that, you may call any of the methods that create a new hard disk storage
7775 unit and they will use the generated UUID and file name.
7776
7777 <h3>Attaching Hard Disks</h3>
7778
7779 Hard disks are attached to virtual machines using the
7780 <link to="IMachine::attachHardDisk2()"/> method and detached using the
7781 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
7782 <link to="#type"/>, hard disks are attached either
7783 <i>directly</i> or <i>indirectly</i>.
7784
7785 When a hard disk is being attached directly, it is associated with the
7786 virtual machine and used for hard disk operations when the machine is
7787 running. When a hard disk is being attached indirectly, a new differencing
7788 hard disk linked to it is implicitly created and this differencing hard
7789 disk is associated with the machine and used for hard disk operations.
7790 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
7791 a direct attachment then the same hard disk will be returned in response
7792 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
7793 an indirect attachment is performed then
7794 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
7795 differencing hard disk, not the original one passed to <link
7796 to="IMachine::attachHardDisk2()"/>. The following table shows the
7797 dependency of the attachment type on the hard disk type:
7798
7799 <table>
7800 <tr>
7801 <th>Hard Disk Type</th>
7802 <th>Direct or Indirect?</th>
7803 </tr>
7804 <tr>
7805 <td>Normal (Base)</td>
7806 <td>
7807 Normal base hard disks that do not have children (i.e. differencing
7808 hard disks linked to them) and that are not already attached to
7809 virtual machines in snapshots are attached <b>directly</b>.
7810 Otherwise, they are attached <b>indirectly</b> because having
7811 dependent children or being part of the snapshot makes it impossible
7812 to modify hard disk contents without breaking the integrity of the
7813 dependent party. The <link to="#readOnly"/> attribute allows to
7814 quickly determine the kind of the attachment for the given hard
7815 disk. Note that if a normal base hard disk is to be indirectly
7816 attached to a virtual machine with snapshots then a special
7817 procedure called <i>smart attachment</i> is performed (see below).
7818 </td>
7819 </tr>
7820 <tr>
7821 <td>Normal (Differencing)</td>
7822 <td>
7823 Differencing hard disks are like normal base hard disks: attached
7824 <b>directly</b> if they do not have children and are not attached to
7825 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
7826 that the smart attachment procedure is never performed for
7827 differencing hard disks.
7828 </td>
7829 </tr>
7830 <tr>
7831 <td>Immutable</td>
7832 <td>
7833 Immutable hard disks are always attached <b>indirectly</b> because
7834 they are designed to be non-writable. If an immutable hard disk is
7835 attached to a virtual machine with snapshots then a special
7836 procedure called smart attachment is performed (see below).
7837 </td>
7838 </tr>
7839 <tr>
7840 <td>Writethrough</td>
7841 <td>
7842 Writethrough hard disks are always attached <b>directly</b>, also as
7843 designed. This also means that writethrough hard disks cannot have
7844 other hard disks linked to them at all.
7845 </td>
7846 </tr>
7847 </table>
7848
7849 Note that the same hard disk, regardless of its type, may be attached to
7850 more than one virtual machine at a time. In this case, the machine that is
7851 started first gains exclusive access to the hard disk and attempts to
7852 start other machines having this hard disk attached will fail until the
7853 first machine is powered down.
7854
7855 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
7856 that the given hard disk remains associated with the given machine after a
7857 successful <link to="IMachine::detachHardDisk2()"/> call until
7858 <link to="IMachine::saveSettings()"/> is called to save all changes to
7859 machine settings to disk. This deferring is necessary to guarantee that
7860 the hard disk configuration may be restored at any time by a call to
7861 <link to="IMachine::discardSettings()"/> before the settings
7862 are saved (committed).
7863
7864 Note that if <link to="IMachine::discardSettings()"/> is called after
7865 indirectly attaching some hard disks to the machine but before a call to
7866 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
7867 all differencing hard disks implicitly created by
7868 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
7869 Such implicitly created hard disks will also be immediately deleted when
7870 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
7871 call if it is made before <link to="IMachine::saveSettings()"/>. This
7872 implicit deletion is safe because newly created differencing hard
7873 disks do not contain any user data.
7874
7875 However, keep in mind that detaching differencing hard disks that were
7876 implicitly created by <link to="IMachine::attachHardDisk2()"/>
7877 before the last <link to="IMachine::saveSettings()"/> call will
7878 <b>not</b> implicitly delete them as they may already contain some data
7879 (for example, as a result of virtual machine execution). If these hard
7880 disks are no more necessary, the caller can always delete them explicitly
7881 using <link to="#deleteStorage()"/> after they are actually de-associated
7882 from this machine by the <link to="IMachine::saveSettings()"/> call.
7883
7884 <h3>Smart Attachment</h3>
7885
7886 When normal base or immutable hard disks are indirectly attached to a
7887 virtual machine then some additional steps are performed to make sure the
7888 virtual machine will have the most recent "view" of the hard disk being
7889 attached. These steps include walking through the machine's snapshots
7890 starting from the current one and going through ancestors up to the first
7891 snapshot. Hard disks attached to the virtual machine in all
7892 of the encountered snapshots are checked whether they are descendants of
7893 the given normal base or immutable hard disk. The first found child (which
7894 is the differencing hard disk) will be used instead of the normal base or
7895 immutable hard disk as a parent for creating a new differencing hard disk
7896 that will be actually attached to the machine. And only if no descendants
7897 are found or if the virtual machine does not have any snapshots then the
7898 normal base or immutable hard disk will be used itself as a parent for
7899 this differencing hard disk.
7900
7901 It is easier to explain what smart attachment does using the
7902 following example:
7903 <pre>
7904BEFORE attaching B.vdi: AFTER attaching B.vdi:
7905
7906Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
7907 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
7908 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
7909 Snapshot 4 (none) Snapshot 4 (none)
7910 CurState (none) CurState (D3->D2.vdi)
7911
7912 NOT
7913 ...
7914 CurState (D3->B.vdi)
7915 </pre>
7916 The first column is the virtual machine configuration before the base hard
7917 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
7918 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
7919 mean that the hard disk that is actually attached to the machine is a
7920 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
7921 another hard disk, <tt>B.vdi</tt>.
7922
7923 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
7924 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
7925 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
7926 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
7927 it cannot be attached directly and needs an indirect attachment (i.e.
7928 implicit creation of a new differencing hard disk). Due to the smart
7929 attachment procedure, the new differencing hard disk
7930 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
7931 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
7932 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
7933 machine.
7934
7935 Note that if there is more than one descendant hard disk of the given base
7936 hard disk found in a snapshot, and there is an exact device, channel and
7937 bus match, then this exact match will be used. Otherwise, the youngest
7938 descendant will be picked up.
7939
7940 There is one more important aspect of the smart attachment procedure which
7941 is not related to snapshots at all. Before walking through the snapshots
7942 as described above, the backup copy of the current list of hard disk
7943 attachment is searched for descendants. This backup copy is created when
7944 the hard disk configuration is changed for the first time after the last
7945 <link to="IMachine::saveSettings()"/> call and used by
7946 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
7947 changes. When such a descendant is found in this backup copy, it will be
7948 simply re-attached back, without creating a new differencing hard disk for
7949 it. This optimization is necessary to make it possible to re-attach the
7950 base or immutable hard disk to a different bus, channel or device slot
7951 without losing the contents of the differencing hard disk actually
7952 attached to the machine in place of it.
7953 </desc>
7954
7955 <attribute name="format" type="wstring" readonly="yes">
7956 <desc>
7957 Storage format of this hard disk.
7958
7959 The value of this attribute is a string that specifies a backend used to
7960 store hard disk data. The storage format is defined when you create a
7961 new hard disk or automatically detected when you open an existing hard
7962 disk medium, and cannot be changed later.
7963
7964 The list of all storage formats supported by this VirtualBox
7965 installation can be obtained using
7966 <link to="ISystemProperties::hardDiskFormats"/>.
7967 </desc>
7968 </attribute>
7969
7970 <attribute name="type" type="HardDiskType">
7971 <desc>
7972 Type (role) of this hard disk.
7973
7974 The following constraints apply when changing the value of this
7975 attribute:
7976 <ul>
7977 <li>If a hard disk is attached to a virtual machine (either in the
7978 current state or in one of the snapshots), its type cannot be
7979 changed.
7980 </li>
7981 <li>As long as the hard disk has children, its type cannot be set
7982 to <link to="HardDiskType_Writethrough"/>.
7983 </li>
7984 <li>The type of all differencing hard disks is
7985 <link to="HardDiskType_Normal"/> and cannot be changed.
7986 </li>
7987 </ul>
7988
7989 The type of a newly created or opened hard disk is set to
7990 <link to="HardDiskType_Normal"/>.
7991 </desc>
7992 </attribute>
7993
7994 <attribute name="parent" type="IHardDisk2" readonly="yes">
7995 <desc>
7996 Parent of this hard disk (a hard disk this hard disk is directly based
7997 on).
7998
7999 Only differencing hard disks have parents. For base (non-differencing)
8000 hard disks, <tt>null</tt> is returned.
8001 </desc>
8002 </attribute>
8003
8004 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8005 <desc>
8006 Children of this hard disk (all differencing hard disks directly based
8007 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8008 does not have any children.
8009 </desc>
8010 </attribute>
8011
8012 <attribute name="root" type="IHardDisk2" readonly="yes">
8013 <desc>
8014 Root hard disk of this hard disk.
8015
8016 If this is a differencing hard disk, its root hard disk is the base hard
8017 disk the given hard disk branch starts from. For all other types of hard
8018 disks, this property returns the hard disk object itself (i.e. the same
8019 object this property is read on).
8020 </desc>
8021 </attribute>
8022
8023 <attribute name="readOnly" type="boolean" readonly="yes">
8024 <desc>
8025 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8026 otherwise.
8027
8028 A hard disk is considered to be read-only when its contents cannot be
8029 modified without breaking the integrity of other parties that depend on
8030 this hard disk such as its child hard disks or snapshots of virtual
8031 machines where this hard disk is attached to these machines. If there
8032 are no children and no such snapshots then there is no dependency and
8033 the hard disk is not read-only.
8034
8035 The value of this attribute can be used to determine the kind of the
8036 attachment that will take place when attaching this hard disk to a
8037 virtual machine. If the value is <tt>false</tt> then the hard disk will
8038 be attached directly. If the value is <tt>true</tt> then the hard disk
8039 will be attached indirectly by creating a new differencing child hard
8040 disk for that. See the interface description for more information.
8041
8042 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8043 disks are always read-only while all
8044 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8045 always not.
8046
8047 <note>
8048 The read-only condition represented by this attribute is related to
8049 the hard disk type and usage, not to the current
8050 <link to="IMedium::state">media state</link> and not to the read-only
8051 state of the storage unit.
8052 </note>
8053 </desc>
8054 </attribute>
8055
8056 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8057 <desc>
8058 Logical size of this hard disk (in megabytes), as reported to the
8059 guest OS running inside the virtual machine this disk is
8060 attached to. The logical size is defined when the hard disk is created
8061 and cannot be changed later.
8062
8063 <note>
8064 Reading this property on a differencing hard disk will return the size
8065 of its <link to="#root"/> hard disk.
8066 </note>
8067 <note>
8068 For hard disks whose state is <link to="#state"/> is <link
8069 to="MediaState_Inaccessible"/>, the value of this property is the
8070 last known logical size. For <link to="MediaState_NotCreated"/> hard
8071 disks, the returned value is zero.
8072 </note>
8073 </desc>
8074 </attribute>
8075
8076 <!-- storage methods -->
8077
8078 <method name="getProperty">
8079 <desc>
8080 Returns the value of the custom hard disk property with the given name.
8081
8082 The list of all properties supported by the given hard disk format can
8083 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8084
8085 Note that if this method returns a <tt>null</tt> @a value, the requested
8086 property is supported but currently not assigned any value.
8087
8088 <result name="VBOX_E_OBJECT_NOT_FOUND">
8089 Requested property does not exist (not supported by the format).
8090 </result>
8091 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8092 </desc>
8093 <param name="name" type="wstring" dir="in">
8094 <desc>Name of the property to get.</desc>
8095 </param>
8096 <param name="value" type="wstring" dir="return">
8097 <desc>Current property value.</desc>
8098 </param>
8099 </method>
8100
8101 <method name="setProperty">
8102 <desc>
8103 Sets the value of the custom hard disk property with the given name.
8104
8105 The list of all properties supported by the given hard disk format can
8106 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8107
8108 Note that setting the property value to <tt>null</tt> is equivalent to
8109 deleting the existing value. A default value (if it is defined for this
8110 property) will be used by the format backend in this case.
8111
8112 <result name="VBOX_E_OBJECT_NOT_FOUND">
8113 Requested property does not exist (not supported by the format).
8114 </result>
8115 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8116 </desc>
8117 <param name="name" type="wstring" dir="in">
8118 <desc>Name of the property to set.</desc>
8119 </param>
8120 <param name="value" type="wstring" dir="in">
8121 <desc>Property value to set.</desc>
8122 </param>
8123 </method>
8124
8125 <method name="getProperties">
8126 <desc>
8127 Returns values for a group of properties in one call.
8128
8129 The names of the properties to get are specified using the @a names
8130 argument which is a list of comma-separated property names or
8131 <tt>null</tt> if all properties are to be returned. Note that currently
8132 the value of this argument is ignored and the method always returns all
8133 existing properties.
8134
8135 The list of all properties supported by the given hard disk format can
8136 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8137
8138 The method returns two arrays, the array of property names corresponding
8139 to the @a names argument and the current values of these properties.
8140 Both arrays have the same number of elements with each elemend at the
8141 given index in the first array corresponds to an element at the same
8142 index in the second array.
8143
8144 Note that for properties that do not have assigned values,
8145 <tt>null</tt> is returned at the appropriate index in the @a
8146 returnValues array.
8147
8148 </desc>
8149 <param name="names" type="wstring" dir="in">
8150 <desc>
8151 Names of properties to get.
8152 </desc>
8153 </param>
8154 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8155 <desc>Names of returned properties.</desc>
8156 </param>
8157 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8158 <desc>Values of returned properties.</desc>
8159 </param>
8160 </method>
8161
8162 <method name="setProperties">
8163 <desc>
8164 Sets values for a group of properties in one call.
8165
8166 The names of the properties to set are passed in the @a names
8167 array along with the new values for them in the @a values array. Both
8168 arrays have the same number of elements with each elemend at the given
8169 index in the first array corresponding to an element at the same index
8170 in the second array.
8171
8172 If there is at least one property name in @a names that is not valid,
8173 the method will fail before changing the values of any other properties
8174 from the @a names array.
8175
8176 Using this method over <link to="#setProperty()"/> is preferred if you
8177 need to set several properties at once since it will result into less
8178 IPC calls.
8179
8180 The list of all properties supported by the given hard disk format can
8181 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8182
8183 Note that setting the property value to <tt>null</tt> is equivalent to
8184 deleting the existing value. A default value (if it is defined for this
8185 property) will be used by the format backend in this case.
8186 </desc>
8187 <param name="names" type="wstring" safearray="yes" dir="in">
8188 <desc>Names of properties to set.</desc>
8189 </param>
8190 <param name="values" type="wstring" safearray="yes" dir="in">
8191 <desc>Values of properties to set.</desc>
8192 </param>
8193 </method>
8194
8195 <!-- storage methods -->
8196
8197 <method name="createDynamicStorage">
8198 <desc>
8199 Starts creating a dynamically expanding hard disk storage unit in the
8200 background. The previous storage unit created for this object, if
8201 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8202 the operation will fail.
8203
8204 Before the operation starts, the hard disk is placed in
8205 <link to="MediaState_Creating"/> state. If the create operation
8206 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8207 state.
8208
8209 After the returned progress object reports that the operation has
8210 successfully completed, the media state will be set to <link
8211 to="MediaState_Created"/>, the hard disk will be remembered by this
8212 VirtualBox installation and may be attached to virtual machines.
8213
8214 <result name="VBOX_E_NOT_SUPPORTED">
8215 Dynamic storage creation operation is not supported. See <link
8216 to="IHardDiskFormat::capabilities"/>.
8217 </result>
8218 </desc>
8219 <param name="logicalSize" type="unsigned long long" dir="in">
8220 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8221 </param>
8222 <param name="progress" type="IProgress" dir="return">
8223 <desc>Progress object to track the operation completion.</desc>
8224 </param>
8225 </method>
8226
8227 <method name="createFixedStorage">
8228 <desc>
8229 Starts creating a fixed-size hard disk storage unit in the background.
8230 The previous storage unit created for this object, if
8231 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8232 the operation will fail.
8233
8234 Before the operation starts, the hard disk is placed to
8235 <link to="MediaState_Creating"/> state. If the create operation
8236 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8237 state.
8238
8239 After the returned progress object reports that the operation is
8240 successfully complete, the media state will be set to <link
8241 to="MediaState_Created"/>, the hard disk will be remembered by this
8242 VirtualBox installation and may be attached to virtual machines.
8243
8244 <result name="VBOX_E_NOT_SUPPORTED">
8245 Fixed storage creation operation is not supported. See
8246 <link to="IHardDiskFormat::capabilities"/>.
8247 </result>
8248 </desc>
8249 <param name="logicalSize" type="unsigned long long" dir="in">
8250 <desc>Logical size of the hard disk in megabytes.</desc>
8251 </param>
8252 <param name="progress" type="IProgress" dir="return">
8253 <desc>Progress object to track the operation completion.</desc>
8254 </param>
8255 </method>
8256
8257 <method name="deleteStorage">
8258 <desc>
8259 Starts deleting the storage unit of this hard disk.
8260
8261 The hard disk must not be attached to any known virtual machine and must
8262 not have any known child hard disks, otherwise the operation will fail.
8263 It will also fail if there is no storage unit to delete or if deletion
8264 is already in progress, or if the hard disk is being in use (locked for
8265 read or for write) or inaccessible. Therefore, the only valid state for
8266 this operation to succeed is <link to="MediaState_Created"/>.
8267
8268 Before the operation starts, the hard disk is placed to
8269 <link to="MediaState_Deleting"/> state and gets removed from the list
8270 of remembered hard disks (media registry). If the delete operation
8271 fails, the media will be remembered again and placed back to
8272 <link to="MediaState_Created"/> state.
8273
8274 After the returned progress object reports that the operation is
8275 complete, the media state will be set to
8276 <link to="MediaState_NotCreated"/> and you will be able to use one of
8277 the storage creation methods to create it again.
8278
8279 <see>#close()</see>
8280
8281 <result name="VBOX_E_OBJECT_IN_USE">
8282 Hard disk is attached to a virtual machine.
8283 </result>
8284 <result name="VBOX_E_NOT_SUPPORTED">
8285 Storage deletion is not allowed because neither of storage creation
8286 operations are supported. See
8287 <link to="IHardDiskFormat::capabilities"/>.
8288 </result>
8289
8290 <note>
8291 If the deletion operation fails, it is not guaranteed that the storage
8292 unit still exists. You may check the <link to="IMedium::state"/> value
8293 to answer this question.
8294 </note>
8295 </desc>
8296 <param name="progress" type="IProgress" dir="return">
8297 <desc>Progress object to track the operation completion.</desc>
8298 </param>
8299 </method>
8300
8301 <!-- diff methods -->
8302
8303 <method name="createDiffStorage">
8304 <desc>
8305 Starts creating an empty differencing storage unit based on this hard
8306 disk in the format and at the location defined by the @a target
8307 argument.
8308
8309 The target hard disk must be in <link to="MediaState_NotCreated"/>
8310 state (i.e. must not have an existing storage unit). Upon successful
8311 completion, this operation will set the type of the target hard disk to
8312 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8313 represent the differencing hard disk data in the given format (according
8314 to the storage format of the target object).
8315
8316 After the returned progress object reports that the operation is
8317 successfully complete, the target hard disk gets remembered by this
8318 VirtualBox installation and may be attached to virtual machines.
8319
8320 <note>
8321 The hard disk will be set to <link to="MediaState_LockedRead"/>
8322 state for the duration of this operation.
8323 </note>
8324 <result name="VBOX_E_OBJECT_IN_USE">
8325 Hard disk not in NotCreated state.
8326 </result>
8327 </desc>
8328 <param name="target" type="IHardDisk2" dir="in">
8329 <desc>Target hard disk.</desc>
8330 </param>
8331 <param name="progress" type="IProgress" dir="return">
8332 <desc>Progress object to track the operation completion.</desc>
8333 </param>
8334 </method>
8335
8336 <method name="mergeTo">
8337 <desc>
8338 Starts merging the contents of this hard disk and all intermediate
8339 differencing hard disks in the chain to the given target hard disk.
8340
8341 The target hard disk must be either a descendant of this hard disk or
8342 its ancestor (otherwise this method will immediately return a failure).
8343 It follows that there are two logical directions of the merge operation:
8344 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8345 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8346 chain:
8347
8348 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8349
8350 Here, calling this method on the <tt>Base</tt> hard disk object with
8351 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8352 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8353 merge. Note that in both cases the contents of the resulting hard disk
8354 will be the same, the only difference is the hard disk object that takes
8355 the result of the merge operation. In case of the forward merge in the
8356 above example, the result will be written to <tt>Diff_2</tt>; in case of
8357 the backward merge, the result will be written to <tt>Base</tt>. In
8358 other words, the result of the operation is always stored in the target
8359 hard disk.
8360
8361 Upon successful operation completion, the storage units of all hard
8362 disks in the chain between this (source) hard disk and the target hard
8363 disk, including the source hard disk itself, will be automatically
8364 deleted and the relevant hard disk objects (including this hard disk)
8365 will become uninitialized. This means that any attempt to call any of
8366 their methods or attributes will fail with the
8367 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8368 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8369 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8370 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8371 disk itself since it will no longer be based on any other hard disk.
8372
8373 Considering the above, all of the following conditions must be met in
8374 order for the merge operation to succeed:
8375 <ul>
8376 <li>
8377 Neither this (source) hard disk nor any intermediate
8378 differencing hard disk in the chain between it and the target
8379 hard disk is attached to any virtual machine.
8380 </li>
8381 <li>
8382 Neither the source hard disk nor the target hard disk is an
8383 <link to="HardDiskType_Immutable"/> hard disk.
8384 </li>
8385 <li>
8386 The part of the hard disk tree from the source hard disk to the
8387 target hard disk is a linear chain, i.e. all hard disks in this
8388 chain have exactly one child which is the next hard disk in this
8389 chain. The only exception from this rule is the target hard disk in
8390 the forward merge operation; it is allowed to have any number of
8391 child hard disks because the merge operation will hot change its
8392 logical contents (as it is seen by the guest OS or by children).
8393 </li>
8394 <li>
8395 None of the involved hard disks are in
8396 <link to="MediaState_LockedRead"/> or
8397 <link to="MediaState_LockedWrite"/> state.
8398 </li>
8399 </ul>
8400
8401 <note>
8402 This (source) hard disk and all intermediates will be placed to <link
8403 to="MediaState_Deleting"/> state and the target hard disk will be
8404 placed to <link to="MediaState_LockedWrite"/> state and for the
8405 duration of this operation.
8406 </note>
8407 </desc>
8408 <param name="targetId" type="uuid" dir="in">
8409 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8410 </param>
8411 <param name="progress" type="IProgress" dir="return">
8412 <desc>Progress object to track the operation completion.</desc>
8413 </param>
8414 </method>
8415
8416 <!-- clone methods -->
8417
8418 <method name="cloneTo">
8419 <desc>
8420 Starts creating a clone of this hard disk in the format and at the
8421 location defined by the @a target argument.
8422
8423 The target hard disk must be in <link to="MediaState_NotCreated"/>
8424 state (i.e. must not have an existing storage unit). Upon successful
8425 completion, the cloned hard disk will contain exactly the same sector
8426 data as the hard disk being cloned, except that a new UUID for the clone
8427 will be randomly generated.
8428
8429 After the returned progress object reports that the operation is
8430 successfully complete, the target hard disk gets remembered by this
8431 VirtualBox installation and may be attached to virtual machines.
8432
8433 <note>
8434 If the cloned hard disk is a differencing hard disk, it will inherit
8435 parent dependency of the original hard disk.
8436 </note>
8437 <note>
8438 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8439 state for the duration of this operation.
8440 </note>
8441 </desc>
8442 <param name="target" type="IHardDisk2" dir="in">
8443 <desc>Target hard disk.</desc>
8444 </param>
8445 <param name="progress" type="IProgress" dir="return">
8446 <desc>Progress object to track the operation completion.</desc>
8447 </param>
8448 </method>
8449
8450 <method name="flattenTo">
8451 <desc>
8452 Starts creating a deep (independent) clone of this hard disk in the
8453 format and at the location defined by the @a target argument.
8454
8455 This operation is similar to <link to="#cloneTo()"/> except that when
8456 applied to a differencing hard disk, it will also copy missing hard disk
8457 data from all parent hard disks it is linked to. This will make the
8458 created clone an independent base hard disk that contains all hard disk
8459 data and does not need any other hard disks to operate.
8460
8461 After the returned progress object reports that the operation is
8462 successfully complete, the target hard disk gets remembered by this
8463 VirtualBox installation and may be attached to virtual machines.
8464
8465 <note>
8466 For base hard disks, this operation is identical to
8467 <link to="#cloneTo()"/>.
8468 </note>
8469 <note>
8470 This hard disk and all its parent hard disks will be placed to <link
8471 to="MediaState_LockedRead"/> state for the duration of this
8472 operation.
8473 </note>
8474 </desc>
8475 <param name="target" type="IHardDisk2" dir="in">
8476 <desc>Target hard disk.</desc>
8477 </param>
8478 <param name="progress" type="IProgress" dir="return">
8479 <desc>Progress object to track the operation completion.</desc>
8480 </param>
8481 </method>
8482
8483 <method name="compact">
8484 <desc>
8485 Starts compacting of this hard disk. This means that the disk is
8486 transformed into a possibly more compact storage representation.
8487 This potentially creates temporary images, which can require a
8488 substantial amount of additional disk space.
8489
8490 After the returned progress object reports that the operation is
8491 successfully complete, the media state will be set back to the
8492 current state.
8493
8494 <note>
8495 This hard disk and all its parent hard disks will be placed to <link
8496 to="MediaState_LockedRead"/> state for the duration of this
8497 operation.
8498 </note>
8499 </desc>
8500 <param name="progress" type="IProgress" dir="return">
8501 <desc>Progress object to track the operation completion.</desc>
8502 </param>
8503 </method>
8504
8505 </interface>
8506
8507
8508 <!--
8509 // IHardDiskFormat
8510 /////////////////////////////////////////////////////////////////////////
8511 -->
8512
8513 <enum
8514 name="DataType"
8515 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
8516 >
8517 <const name="Int32" value="0"/>
8518 <const name="Int8" value="1"/>
8519 <const name="String" value="2"/>
8520 </enum>
8521
8522 <enum
8523 name="DataFlags"
8524 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
8525 >
8526 <const name="None" value="0x00"/>
8527 <const name="Mandatory" value="0x01"/>
8528 <const name="Expert" value="0x02"/>
8529 <const name="Array" value="0x04"/>
8530 <const name="FlagMask" value="0x07"/>
8531 </enum>
8532
8533 <enum
8534 name="HardDiskFormatCapabilities"
8535 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
8536 >
8537 <desc>
8538 Hard disk format capability flags.
8539 </desc>
8540
8541 <const name="Uuid" value="0x01">
8542 <desc>
8543 Supports UUIDs as expected by VirtualBox code.
8544 </desc>
8545 </const>
8546
8547 <const name="CreateFixed" value="0x02">
8548 <desc>
8549 Supports creating fixed size images, allocating all space instantly.
8550 </desc>
8551 </const>
8552
8553 <const name="CreateDynamic" value="0x04">
8554 <desc>
8555 Supports creating dynamically growing images, allocating space on
8556 demand.
8557 </desc>
8558 </const>
8559
8560 <const name="CreateSplit2G" value="0x08">
8561 <desc>
8562 Supports creating images split in chunks of a bit less than 2 GBytes.
8563 </desc>
8564 </const>
8565
8566 <const name="Differencing" value="0x10">
8567 <desc>
8568 Supports being used as a format for differencing hard disks (see <link
8569 to="IHardDisk2::createDiffStorage"/>).
8570 </desc>
8571 </const>
8572
8573 <const name="Asynchronous" value="0x20">
8574 <desc>
8575 Supports asynchronous I/O operations for at least some configurations.
8576 </desc>
8577 </const>
8578
8579 <const name="File" value="0x40">
8580 <desc>
8581 The format backend operates on files (the <link to="IMedium::location"/>
8582 attribute of the hard disk specifies a file used to store hard disk
8583 data; for a list of supported file extensions see
8584 <link to="IHardDiskFormat::fileExtensions"/>).
8585 </desc>
8586 </const>
8587
8588 <const name="Properties" value="0x80">
8589 <desc>
8590 The format backend uses the property interface to configure the storage
8591 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
8592 method is used to get access to properties supported by the given hard
8593 disk format).
8594 </desc>
8595 </const>
8596
8597 <const name="CapabilityMask" value="0xFF"/>
8598 </enum>
8599
8600 <interface
8601 name="IHardDiskFormat" extends="$unknown"
8602 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
8603 wsmap="managed"
8604 >
8605 <desc>
8606 The IHardDiskFormat interface represents a virtual hard disk format.
8607
8608 Each hard disk format has an associated backend which is used to handle
8609 hard disks stored in this format. This interface provides information
8610 about the properties of the associated backend.
8611
8612 Each hard disk format is identified by a string represented by the
8613 <link to="#id"/> attribute. This string is used in calls like
8614 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
8615 format.
8616
8617 The list of all supported hard disk formats can be obtained using
8618 <link to="ISystemProperties::hardDiskFormats"/>.
8619
8620 <see>IHardDisk2</see>
8621 </desc>
8622
8623 <attribute name="id" type="wstring" readonly="yes">
8624 <desc>
8625 Identifier of this format.
8626
8627 This string is used in methods of other interfaces where it is necessary
8628 to specify a hard disk format, such as
8629 <link to="IVirtualBox::createHardDisk2()"/>.
8630 </desc>
8631 </attribute>
8632
8633 <attribute name="name" type="wstring" readonly="yes">
8634 <desc>
8635 Human readable description of this format.
8636
8637 Mainly for use in file open dialogs.
8638 </desc>
8639 </attribute>
8640
8641 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
8642 <desc>
8643 Array of strings containing the supported file extensions.
8644
8645 The first extension in the array is the extension preferred by the
8646 backend. It is recommended to use this extension when specifying a
8647 location of the storage unit for a new hard disk.
8648
8649 Note that some backends do not work on files, so this array may be
8650 empty.
8651
8652 <see>IHardDiskFormat::capabilities</see>
8653 </desc>
8654 </attribute>
8655
8656 <attribute name="capabilities" type="unsigned long" readonly="yes">
8657 <desc>
8658 Capabilities of the format as a set of bit flags.
8659
8660 For the meaning of individual capability flags see
8661 <link to="HardDiskFormatCapabilities"/>.
8662 </desc>
8663 </attribute>
8664
8665 <method name="describeProperties">
8666 <desc>
8667 Returns several arrays describing the properties supported by this
8668 format.
8669
8670 An element with the given index in each array describes one
8671 property. Thus, the number of elements in each returned array is the
8672 same and corresponds to the number of supported properties.
8673
8674 The returned arrays are filled in only if the
8675 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
8676 All arguments must be non-NULL.
8677
8678 <see>DataType</see>
8679 <see>DataFlags</see>
8680 </desc>
8681
8682 <param name="names" type="wstring" safearray="yes" dir="out">
8683 <desc>Array of property names.</desc>
8684 </param>
8685 <param name="description" type="wstring" safearray="yes" dir="out">
8686 <desc>Array of property descriptions.</desc>
8687 </param>
8688 <param name="types" type="DataType" safearray="yes" dir="out">
8689 <desc>Array of property types.</desc>
8690 </param>
8691 <param name="flags" type="unsigned long" safearray="yes" dir="out">
8692 <desc>Array of property flags.</desc>
8693 </param>
8694 <param name="defaults" type="wstring" safearray="yes" dir="out">
8695 <desc>Array of default property values.</desc>
8696 </param>
8697 </method>
8698
8699 </interface>
8700
8701
8702 <!--
8703 // IFloppyImage2
8704 /////////////////////////////////////////////////////////////////////////
8705 -->
8706
8707 <interface
8708 name="IFloppyImage2" extends="IMedium"
8709 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
8710 wsmap="managed"
8711 >
8712 <desc>
8713 The IFloppyImage2 interface represents a medium containing the image
8714 of a floppy disk.
8715 </desc>
8716
8717 </interface>
8718
8719
8720 <!--
8721 // IDVDImage2
8722 /////////////////////////////////////////////////////////////////////////
8723 -->
8724
8725 <interface
8726 name="IDVDImage2" extends="IMedium"
8727 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
8728 wsmap="managed"
8729 >
8730 <desc>
8731 The IDVDImage2 interface represents a medium containing the image
8732 of a CD or DVD disk in the ISO format.
8733 </desc>
8734
8735 </interface>
8736
8737
8738 <!--
8739 // IDVDDrive
8740 /////////////////////////////////////////////////////////////////////////
8741 -->
8742
8743 <interface
8744 name="IDVDDrive" extends="$unknown"
8745 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
8746 wsmap="managed"
8747 >
8748 <desc>
8749 The IDVDDrive interface represents the virtual CD/DVD drive of the
8750 virtual machine. An object of this type is returned by
8751 <link to="IMachine::DVDDrive"/>.
8752 </desc>
8753
8754 <attribute name="state" type="DriveState" readonly="yes">
8755 <desc>Current drive state.</desc>
8756 </attribute>
8757
8758 <attribute name="passthrough" type="boolean">
8759 <desc>
8760 When a host drive is mounted and passthrough is enabled
8761 the guest OS will be able to directly send SCSI commands to
8762 the host drive. This enables the guest OS to use CD/DVD writers
8763 but is potentially dangerous.
8764 </desc>
8765 </attribute>
8766
8767 <method name="mountImage">
8768 <desc>Mounts a CD/DVD image with the specified UUID.</desc>
8769 <param name="imageId" type="uuid" dir="in"/>
8770 </method>
8771
8772 <method name="captureHostDrive">
8773 <desc>Captures the specified host CD/DVD drive.</desc>
8774 <param name="drive" type="IHostDVDDrive" dir="in"/>
8775 </method>
8776
8777 <method name="unmount">
8778 <desc>Unmounts the currently mounted image or host drive.</desc>
8779 </method>
8780
8781 <method name="getImage">
8782 <desc>Returns the currently mounted CD/DVD image.</desc>
8783 <param name="image" type="IDVDImage2" dir="return"/>
8784 </method>
8785
8786 <method name="getHostDrive">
8787 <desc>Returns the currently mounted host CD/DVD drive.</desc>
8788 <param name="drive" type="IHostDVDDrive" dir="return"/>
8789 </method>
8790
8791 </interface>
8792
8793
8794 <!--
8795 // IFloppyDrive
8796 /////////////////////////////////////////////////////////////////////////
8797 -->
8798
8799 <interface
8800 name="IFloppyDrive" extends="$unknown"
8801 uuid="159412cd-bab8-452e-8097-218a020825a6"
8802 wsmap="managed"
8803 >
8804 <desc>
8805 The IFloppyDrive interface represents the virtual floppy drive of the
8806 virtual machine. An object of this type is returned by
8807 <link to="IMachine::floppyDrive" />.
8808 </desc>
8809
8810 <attribute name="enabled" type="boolean">
8811 <desc>
8812 Flag whether the floppy drive is enabled. If it is disabled,
8813 the floppy drive will not be reported to the guest OS.
8814 </desc>
8815 </attribute>
8816
8817 <attribute name="state" type="DriveState" readonly="yes">
8818 <desc>Current drive state.</desc>
8819 </attribute>
8820
8821 <method name="mountImage">
8822 <desc>Mounts a floppy image with the specified UUID.</desc>
8823 <param name="imageId" type="uuid" dir="in"/>
8824 </method>
8825
8826 <method name="captureHostDrive">
8827 <desc>Captures the specified host floppy drive.</desc>
8828 <param name="drive" type="IHostFloppyDrive" dir="in"/>
8829 </method>
8830
8831 <method name="unmount">
8832 <desc>Unmounts the currently mounted image or host drive.</desc>
8833 </method>
8834
8835 <method name="getImage">
8836 <desc>Returns the currently mounted floppy image.</desc>
8837 <param name="image" type="IFloppyImage2" dir="return"/>
8838 </method>
8839
8840 <method name="getHostDrive">
8841 <desc>Returns the currently mounted host floppy drive.</desc>
8842 <param name="drive" type="IHostFloppyDrive" dir="return"/>
8843 </method>
8844
8845 </interface>
8846
8847
8848 <!--
8849 // IKeyboard
8850 /////////////////////////////////////////////////////////////////////////
8851 -->
8852
8853 <interface
8854 name="IKeyboard" extends="$unknown"
8855 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
8856 wsmap="managed"
8857 >
8858 <desc>
8859 The IKeyboard interface represents the virtual machine's keyboard. Used
8860 in <link to="IConsole::keyboard"/>.
8861
8862 Through this interface, the virtual machine's virtual keyboard can be controlled. One
8863 can send keystrokes to the virtual machine and send the Ctrl-Alt-Del sequence to it.
8864 </desc>
8865 <method name="putScancode">
8866 <desc>Sends a scancode to the keyboard.</desc>
8867 <param name="scancode" type="long" dir="in"/>
8868 </method>
8869
8870 <method name="putScancodes">
8871 <desc>Sends an array of scancode to the keyboard.</desc>
8872 <param name="scancodes" type="long" dir="in" safearray="yes"/>
8873 <param name="codesStored" type="unsigned long" dir="return"/>
8874 </method>
8875
8876 <method name="putCAD">
8877 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard.</desc>
8878 </method>
8879
8880 </interface>
8881
8882
8883 <!--
8884 // IMouse
8885 /////////////////////////////////////////////////////////////////////////
8886 -->
8887
8888 <enum
8889 name="MouseButtonState"
8890 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
8891 >
8892 <desc>
8893 Mouse button state.
8894 </desc>
8895
8896 <const name="LeftButton" value="0x01"/>
8897 <const name="RightButton" value="0x02"/>
8898 <const name="MiddleButton" value="0x04"/>
8899 <const name="WheelUp" value="0x08"/>
8900 <const name="WheelDown" value="0x10"/>
8901 <const name="MouseStateMask" value="0x1F"/>
8902 </enum>
8903
8904 <interface
8905 name="IMouse" extends="$unknown"
8906 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
8907 wsmap="managed"
8908 >
8909 <desc>
8910 The IMouse interface represents the virtual machine's mouse. Used in
8911 <link to="IConsole::mouse"/>.
8912
8913 Through this interface, the virtual machine's virtual mouse can be
8914 controlled.
8915 </desc>
8916
8917 <attribute name="absoluteSupported" type="boolean" readonly="yes">
8918 <desc>
8919 Whether the guest OS supports absolute mouse pointer positioning
8920 or not.
8921 <note>
8922 VirtualBox Guest Tools need to be installed to the guest OS
8923 in order to enable absolute mouse positioning support.
8924 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
8925 callback to be instantly informed about changes of this attribute
8926 during virtual machine execution.
8927 </note>
8928 <see><link to="#putMouseEventAbsolute"/></see>
8929 </desc>
8930 </attribute>
8931
8932 <method name="putMouseEvent">
8933 <desc>
8934 Initiates a mouse event using relative pointer movements
8935 along x and y axis.
8936 </desc>
8937
8938 <param name="dx" type="long" dir="in">
8939 <desc>
8940 Amount of pixels the mouse should move to the right.
8941 Negative values move the mouse to the left.
8942 </desc>
8943 </param>
8944 <param name="dy" type="long" dir="in">
8945 <desc>
8946 Amount of pixels the mouse should move downwards.
8947 Negative values move the mouse upwards.
8948 </desc>
8949 </param>
8950 <param name="dz" type="long" dir="in">
8951 <desc>
8952 Amount of mouse wheel moves.
8953 Positive values describe clockwise wheel rotations,
8954 negative values describe counterclockwise rotations.
8955 </desc>
8956 </param>
8957 <param name="buttonState" type="long" dir="in">
8958 <desc>
8959 The current state of mouse buttons. Every bit represents
8960 a mouse button as follows:
8961 <table>
8962 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
8963 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
8964 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
8965 </table>
8966 A value of <tt>1</tt> means the corresponding button is pressed.
8967 otherwise it is released.
8968 </desc>
8969 </param>
8970 </method>
8971
8972 <method name="putMouseEventAbsolute">
8973 <desc>
8974 Positions the mouse pointer using absolute x and y coordinates.
8975 These coordinates are expressed in pixels and
8976 start from <tt>[1,1]</tt> which corresponds to the top left
8977 corner of the virtual display.
8978
8979 <note>
8980 This method will have effect only if absolute mouse
8981 positioning is supported by the guest OS.
8982 </note>
8983
8984 <see><link to="#absoluteSupported"/></see>
8985 </desc>
8986
8987 <param name="x" type="long" dir="in">
8988 <desc>
8989 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
8990 </desc>
8991 </param>
8992 <param name="y" type="long" dir="in">
8993 <desc>
8994 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
8995 </desc>
8996 </param>
8997 <param name="dz" type="long" dir="in">
8998 <desc>
8999 Amount of mouse wheel moves.
9000 Positive values describe clockwise wheel rotations,
9001 negative values describe counterclockwise rotations.
9002 </desc>
9003 </param>
9004 <param name="buttonState" type="long" dir="in">
9005 <desc>
9006 The current state of mouse buttons. Every bit represents
9007 a mouse button as follows:
9008 <table>
9009 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9010 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9011 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9012 </table>
9013 A value of <tt>1</tt> means the corresponding button is pressed.
9014 otherwise it is released.
9015 </desc>
9016 </param>
9017 </method>
9018
9019 </interface>
9020
9021 <!--
9022 // IDisplay
9023 /////////////////////////////////////////////////////////////////////////
9024 -->
9025
9026 <enum
9027 name="FramebufferAccelerationOperation"
9028 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9029 >
9030 <desc>
9031 Frame buffer acceleration operation.
9032 </desc>
9033
9034 <const name="SolidFillAcceleration" value="1"/>
9035 <const name="ScreenCopyAcceleration" value="2"/>
9036 </enum>
9037
9038 <enum
9039 name="FramebufferPixelFormat"
9040 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
9041 >
9042 <desc>
9043 Format of the video memory buffer. Constants represented by this enum can
9044 be used to test for particular values of <link
9045 to="IFramebuffer::pixelFormat"/>. See also <link
9046 to="IFramebuffer::requestResize()"/>.
9047
9048 See also www.fourcc.org for more information about FOURCC pixel formats.
9049 </desc>
9050
9051 <const name="Opaque" value="0xFFFFFFFF">
9052 <desc>
9053 Unknown buffer format (the user may not assume any particular format of
9054 the buffer).
9055 </desc>
9056 </const>
9057 <const name="FOURCC_RGB" value="0x32424752">
9058 <desc>
9059 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9060 bit layout).
9061 </desc>
9062 </const>
9063 </enum>
9064
9065 <interface
9066 name="IFramebuffer" extends="$unknown"
9067 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9068 wsmap="suppress"
9069 >
9070 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9071 <desc>Address of the start byte of the frame buffer.</desc>
9072 </attribute>
9073
9074 <attribute name="width" type="unsigned long" readonly="yes">
9075 <desc>Frame buffer width, in pixels.</desc>
9076 </attribute>
9077
9078 <attribute name="height" type="unsigned long" readonly="yes">
9079 <desc>Frame buffer height, in pixels.</desc>
9080 </attribute>
9081
9082 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9083 <desc>
9084 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9085 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9086 are: 8, 15, 16, 24 and 32.
9087 </desc>
9088 </attribute>
9089
9090 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9091 <desc>
9092 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9093 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9094 size of the scan line must be aligned to 32 bits.
9095 </desc>
9096 </attribute>
9097
9098 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9099 <desc>
9100 Frame buffer pixel format. It's either one of the values defined by <link
9101 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9102 <note>
9103 This attribute must never return <link
9104 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9105 <link to="#address"/> points to must be always known.
9106 </note>
9107 </desc>
9108 </attribute>
9109
9110 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9111 <desc>
9112 Defines whether this frame buffer uses the virtual video card's memory
9113 buffer (guest VRAM) directly or not. See <link
9114 to="IFramebuffer::requestResize()"/> for more information.
9115 </desc>
9116 </attribute>
9117
9118 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9119 <desc>
9120 Hint from the frame buffer about how much of the standard
9121 screen height it wants to use for itself. This information is
9122 exposed to the guest through the VESA BIOS and VMMDev interface
9123 so that it can use it for determining its video mode table. It
9124 is not guaranteed that the guest respects the value.
9125 </desc>
9126 </attribute>
9127
9128 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9129 <desc>
9130 An alpha-blended overlay which is superposed over the frame buffer.
9131 The initial purpose is to allow the display of icons providing
9132 information about the VM state, including disk activity, in front
9133 ends which do not have other means of doing that. The overlay is
9134 designed to controlled exclusively by IDisplay. It has no locking
9135 of its own, and any changes made to it are not guaranteed to be
9136 visible until the affected portion of IFramebuffer is updated. The
9137 overlay can be created lazily the first time it is requested. This
9138 attribute can also return NULL to signal that the overlay is not
9139 implemented.
9140 </desc>
9141 </attribute>
9142
9143 <attribute name="winId" type="unsigned long long" readonly="yes">
9144 <desc>
9145 Platform-dependent identifier of the window where context of this
9146 frame buffer is drawn, or zero if there's no such window.
9147 </desc>
9148 </attribute>
9149
9150 <method name="lock">
9151 <desc>
9152 Locks the frame buffer.
9153 Gets called by the IDisplay object where this frame buffer is
9154 bound to.
9155 </desc>
9156 </method>
9157
9158 <method name="unlock">
9159 <desc>
9160 Unlocks the frame buffer.
9161 Gets called by the IDisplay object where this frame buffer is
9162 bound to.
9163 </desc>
9164 </method>
9165
9166 <method name="notifyUpdate">
9167 <desc>
9168 Informs about an update.
9169 Gets called by the display object where this buffer is
9170 registered.
9171 </desc>
9172 <param name="x" type="unsigned long" dir="in"/>
9173 <param name="y" type="unsigned long" dir="in"/>
9174 <param name="width" type="unsigned long" dir="in"/>
9175 <param name="height" type="unsigned long" dir="in"/>
9176 <param name="finished" type="boolean" dir="return"/>
9177 </method>
9178
9179 <method name="requestResize">
9180 <desc>
9181 Requests a size and pixel format change.
9182
9183 There are two modes of working with the video buffer of the virtual
9184 machine. The <i>indirect</i> mode implies that the IFramebuffer
9185 implementation allocates a memory buffer for the requested display mode
9186 and provides it to the virtual machine. In <i>direct</i> mode, the
9187 IFramebuffer implementation uses the memory buffer allocated and owned
9188 by the virtual machine. This buffer represents the video memory of the
9189 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9190 usually faster because the implementation gets a raw pointer to the
9191 guest VRAM buffer which it can directly use for visualizing the contents
9192 of the virtual display, as opposed to the indirect mode where the
9193 contents of guest VRAM are copied to the memory buffer provided by
9194 the implementation every time a display update occurs.
9195
9196 It is important to note that the direct mode is really fast only when
9197 the implementation uses the given guest VRAM buffer directly, for
9198 example, by blitting it to the window representing the virtual machine's
9199 display, which saves at least one copy operation comparing to the
9200 indirect mode. However, using the guest VRAM buffer directly is not
9201 always possible: the format and the color depth of this buffer may be
9202 not supported by the target window, or it may be unknown (opaque) as in
9203 case of text or non-linear multi-plane VGA video modes. In this case,
9204 the indirect mode (that is always available) should be used as a
9205 fallback: when the guest VRAM contents are copied to the
9206 implementation-provided memory buffer, color and format conversion is
9207 done automatically by the underlying code.
9208
9209 The @a pixelFormat parameter defines whether the direct mode is
9210 available or not. If @a pixelFormat is <link
9211 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9212 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9213 bytesPerLine parameters must be ignored and the implementation must use
9214 the indirect mode (where it provides its own buffer in one of the
9215 supported formats). In all other cases, @a pixelFormat together with @a
9216 bitsPerPixel and @a bytesPerLine define the format of the video memory
9217 buffer pointed to by the @a VRAM parameter and the implementation is
9218 free to choose which mode to use. To indicate that this frame buffer uses
9219 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9220 attribute must return <tt>true</tt> and <link to="#address"/> must
9221 return exactly the same address that is passed in the @a VRAM parameter
9222 of this method; otherwise it is assumed that the indirect strategy is
9223 chosen.
9224
9225 The @a width and @a height parameters represent the size of the
9226 requested display mode in both modes. In case of indirect mode, the
9227 provided memory buffer should be big enough to store data of the given
9228 display mode. In case of direct mode, it is guaranteed that the given @a
9229 VRAM buffer contains enough space to represent the display mode of the
9230 given size. Note that this frame buffer's <link to="#width"/> and <link
9231 to="#height"/> attributes must return exactly the same values as
9232 passed to this method after the resize is completed (see below).
9233
9234 The @a finished output parameter determines if the implementation has
9235 finished resizing the frame buffer or not. If, for some reason, the
9236 resize cannot be finished immediately during this call, @a finished
9237 must be set to @c false, and the implementation must call
9238 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9239 this method as soon as possible. If @a finished is @c false, the
9240 machine will not call any frame buffer methods until
9241 <link to="IDisplay::resizeCompleted()"/> is called.
9242
9243 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9244 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9245 this frame buffer must return exactly the same values as specified in the
9246 parameters of this method, after the resize is completed. If the
9247 indirect mode is chosen, these attributes must return values describing
9248 the format of the implementation's own memory buffer <link
9249 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9250 value must always correlate with <link to="#pixelFormat"/>. Note that
9251 the <link to="#pixelFormat"/> attribute must never return <link
9252 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9253
9254 <note>
9255 This method is called by the IDisplay object under the
9256 <link to="#lock()"/> provided by this IFramebuffer
9257 implementation. If this method returns @c false in @a finished, then
9258 this lock is not released until
9259 <link to="IDisplay::resizeCompleted()"/> is called.
9260 </note>
9261 </desc>
9262 <param name="screenId" type="unsigned long" dir="in">
9263 <desc>
9264 Logical screen number. Must be used in the corresponding call to
9265 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9266 </desc>
9267 </param>
9268 <param name="pixelFormat" type="unsigned long" dir="in">
9269 <desc>
9270 Pixel format of the memory buffer pointed to by @a VRAM.
9271 See also <link to="FramebufferPixelFormat"/>.
9272 </desc>
9273 </param>
9274 <param name="VRAM" type="octet" mod="ptr" dir="in">
9275 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9276 </param>
9277 <param name="bitsPerPixel" type="unsigned long" dir="in">
9278 <desc>Color depth, bits per pixel.</desc>
9279 </param>
9280 <param name="bytesPerLine" type="unsigned long" dir="in">
9281 <desc>Size of one scan line, in bytes.</desc>
9282 </param>
9283 <param name="width" type="unsigned long" dir="in">
9284 <desc>Width of the guest display, in pixels.</desc>
9285 </param>
9286 <param name="height" type="unsigned long" dir="in">
9287 <desc>Height of the guest display, in pixels.</desc>
9288 </param>
9289 <param name="finished" type="boolean" dir="return">
9290 <desc>
9291 Can the VM start using the new frame buffer immediately
9292 after this method returns or it should wait for
9293 <link to="IDisplay::resizeCompleted()"/>.
9294 </desc>
9295 </param>
9296 </method>
9297
9298 <method name="operationSupported">
9299 <desc>
9300 Returns whether the given acceleration operation is supported
9301 by the IFramebuffer implementation. If not, the display object
9302 will not attempt to call the corresponding IFramebuffer entry
9303 point. Even if an operation is indicated to supported, the
9304 IFramebuffer implementation always has the option to return non
9305 supported from the corresponding acceleration method in which
9306 case the operation will be performed by the display engine. This
9307 allows for reduced IFramebuffer implementation complexity where
9308 only common cases are handled.
9309 </desc>
9310 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9311 <param name="supported" type="boolean" dir="return"/>
9312 </method>
9313
9314 <method name="videoModeSupported">
9315 <desc>
9316 Returns whether the frame buffer implementation is willing to
9317 support a given video mode. In case it is not able to render
9318 the video mode (or for some reason not willing), it should
9319 return false. Usually this method is called when the guest
9320 asks the VMM device whether a given video mode is supported
9321 so the information returned is directly exposed to the guest.
9322 It is important that this method returns very quickly.
9323 </desc>
9324 <param name="width" type="unsigned long" dir="in"/>
9325 <param name="height" type="unsigned long" dir="in"/>
9326 <param name="bpp" type="unsigned long" dir="in"/>
9327 <param name="supported" type="boolean" dir="return"/>
9328 </method>
9329
9330 <method name="solidFill">
9331 <desc>
9332 Fills the specified rectangle on screen with a solid color.
9333 </desc>
9334 <param name="x" type="unsigned long" dir="in"/>
9335 <param name="y" type="unsigned long" dir="in"/>
9336 <param name="width" type="unsigned long" dir="in"/>
9337 <param name="height" type="unsigned long" dir="in"/>
9338 <param name="color" type="unsigned long" dir="in"/>
9339 <param name="handled" type="boolean" dir="return"/>
9340 </method>
9341
9342 <method name="copyScreenBits">
9343 <desc>
9344 Copies specified rectangle on the screen.
9345 </desc>
9346 <param name="xDst" type="unsigned long" dir="in"/>
9347 <param name="yDst" type="unsigned long" dir="in"/>
9348 <param name="xSrc" type="unsigned long" dir="in"/>
9349 <param name="ySrc" type="unsigned long" dir="in"/>
9350 <param name="width" type="unsigned long" dir="in"/>
9351 <param name="height" type="unsigned long" dir="in"/>
9352 <param name="handled" type="boolean" dir="return"/>
9353 </method>
9354
9355 <method name="getVisibleRegion">
9356 <desc>
9357 Returns the visible region of this frame buffer.
9358
9359 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9360 @a count parameter is ignored and the number of elements necessary to
9361 describe the current visible region is returned in @a countCopied.
9362
9363 If @a rectangles is not <tt>NULL</tt> but @a count is less
9364 than the required number of elements to store region data, the method
9365 will report a failure. If @a count is equal or greater than the
9366 required number of elements, then the actual number of elements copied
9367 to the provided array will be returned in @a countCopied.
9368
9369 <note>
9370 The address of the provided array must be in the process space of
9371 this IFramebuffer object.
9372 </note>
9373 </desc>
9374 <param name="rectangles" type="octet" mod="ptr" dir="in">
9375 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9376 </param>
9377 <param name="count" type="unsigned long" dir="in">
9378 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9379 </param>
9380 <param name="countCopied" type="unsigned long" dir="return">
9381 <desc>Number of elements copied to the @a rectangles array.</desc>
9382 </param>
9383 </method>
9384
9385 <method name="setVisibleRegion">
9386 <desc>
9387 Suggests a new visible region to this frame buffer. This region
9388 represents the area of the VM display which is a union of regions of
9389 all top-level windows of the guest operating system running inside the
9390 VM (if the Guest Additions for this system support this
9391 functionality). This information may be used by the frontends to
9392 implement the seamless desktop integration feature.
9393
9394 <note>
9395 The address of the provided array must be in the process space of
9396 this IFramebuffer object.
9397 </note>
9398 <note>
9399 The IFramebuffer implementation must make a copy of the provided
9400 array of rectangles.
9401 </note>
9402 </desc>
9403 <param name="rectangles" type="octet" mod="ptr" dir="in">
9404 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9405 </param>
9406 <param name="count" type="unsigned long" dir="in">
9407 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9408 </param>
9409 </method>
9410
9411 </interface>
9412
9413 <interface
9414 name="IFramebufferOverlay" extends="IFrameBuffer"
9415 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9416 wsmap="suppress"
9417 >
9418 <desc>
9419 The IFramebufferOverlay interface represents an alpha blended overlay
9420 for displaying status icons above an IFramebuffer. It is always created
9421 not visible, so that it must be explicitly shown. It only covers a
9422 portion of the IFramebuffer, determined by its width, height and
9423 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9424 that order) format, and may be written to directly. Do re-read the
9425 width though, after setting it, as it may be adjusted (increased) to
9426 make it more suitable for the front end.
9427 </desc>
9428 <attribute name="x" type="unsigned long" readonly="yes">
9429 <desc>X position of the overlay, relative to the frame buffer.</desc>
9430 </attribute>
9431
9432 <attribute name="y" type="unsigned long" readonly="yes">
9433 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9434 </attribute>
9435
9436 <attribute name="visible" type="boolean" readonly="no">
9437 <desc>
9438 Whether the overlay is currently visible.
9439 </desc>
9440 </attribute>
9441
9442 <attribute name="alpha" type="unsigned long" readonly="no">
9443 <desc>
9444 The global alpha value for the overlay. This may or may not be
9445 supported by a given front end.
9446 </desc>
9447 </attribute>
9448
9449 <method name="move">
9450 <desc>
9451 Changes the overlay's position relative to the IFramebuffer.
9452 </desc>
9453 <param name="x" type="unsigned long" dir="in"/>
9454 <param name="y" type="unsigned long" dir="in"/>
9455 </method>
9456
9457 </interface>
9458
9459 <interface
9460 name="IDisplay" extends="$unknown"
9461 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
9462 wsmap="suppress"
9463 >
9464 <desc>
9465 The IDisplay interface represents the virtual machine's display.
9466
9467 The object implementing this interface is contained in each
9468 <link to="IConsole::display"/> attribute and represents the visual
9469 output of the virtual machine.
9470
9471 The virtual display supports pluggable output targets represented by the
9472 IFramebuffer interface. Examples of the output target are a window on
9473 the host computer or an RDP session's display on a remote computer.
9474 </desc>
9475 <attribute name="width" type="unsigned long" readonly="yes">
9476 <desc>Current display width.</desc>
9477 </attribute>
9478
9479 <attribute name="height" type="unsigned long" readonly="yes">
9480 <desc>Current display height.</desc>
9481 </attribute>
9482
9483 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9484 <desc>
9485 Current guest display color depth. Note that this may differ
9486 from <link to="IFramebuffer::bitsPerPixel"/>.
9487 </desc>
9488 </attribute>
9489
9490 <method name="setupInternalFramebuffer">
9491 <desc>
9492 Prepares an internally managed frame buffer.
9493 </desc>
9494 <param name="depth" type="unsigned long" dir="in"/>
9495 </method>
9496
9497 <method name="lockFramebuffer">
9498 <desc>
9499 Requests access to the internal frame buffer.
9500 </desc>
9501 <param name="address" type="octet" mod="ptr" dir="return"/>
9502 </method>
9503
9504 <method name="unlockFramebuffer">
9505 <desc>
9506 Releases access to the internal frame buffer.
9507 </desc>
9508 </method>
9509
9510 <method name="registerExternalFramebuffer">
9511 <desc>
9512 Registers an external frame buffer.
9513 </desc>
9514 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9515 </method>
9516
9517 <method name="setFramebuffer">
9518 <desc>
9519 Sets the framebuffer for given screen.
9520 </desc>
9521 <param name="screenId" type="unsigned long" dir="in"/>
9522 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9523 </method>
9524
9525 <method name="getFramebuffer">
9526 <desc>
9527 Queries the framebuffer for given screen.
9528 </desc>
9529 <param name="screenId" type="unsigned long" dir="in"/>
9530 <param name="framebuffer" type="IFramebuffer" dir="out"/>
9531 <param name="xOrigin" type="long" dir="out"/>
9532 <param name="yOrigin" type="long" dir="out"/>
9533 </method>
9534
9535 <method name="setVideoModeHint">
9536 <desc>
9537 Asks VirtualBox to request the given video mode from
9538 the guest. This is just a hint and it cannot be guaranteed
9539 that the requested resolution will be used. Guest Additions
9540 are required for the request to be seen by guests. The caller
9541 should issue the request and wait for a resolution change and
9542 after a timeout retry.
9543
9544 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
9545 parameters means that the corresponding values should be taken from the
9546 current video mode (i.e. left unchanged).
9547
9548 If the guest OS supports multi-monitor configuration then the @a display
9549 parameter specifies the number of the guest display to send the hint to:
9550 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
9551 so on. If the multi-monitor configuration is not supported, @a display
9552 must be <tt>0</tt>.
9553
9554 </desc>
9555 <param name="width" type="unsigned long" dir="in"/>
9556 <param name="height" type="unsigned long" dir="in"/>
9557 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
9558 <param name="display" type="unsigned long" dir="in"/>
9559 </method>
9560
9561 <method name="setSeamlessMode">
9562 <desc>
9563 Enables or disables seamless guest display rendering (seamless desktop
9564 integration) mode.
9565 <note>
9566 Calling this method has no effect if <link
9567 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
9568 </note>
9569 </desc>
9570 <param name="enabled" type="boolean" dir="in"/>
9571 </method>
9572
9573 <method name="takeScreenShot">
9574 <desc>
9575 Takes a screen shot of the requested size and copies it to the
9576 32-bpp buffer allocated by the caller.
9577 </desc>
9578 <param name="address" type="octet" mod="ptr" dir="in"/>
9579 <param name="width" type="unsigned long" dir="in"/>
9580 <param name="height" type="unsigned long" dir="in"/>
9581 </method>
9582
9583 <method name="drawToScreen">
9584 <desc>
9585 Draws a 32-bpp image of the specified size from the given buffer
9586 to the given point on the VM display.
9587 </desc>
9588 <param name="address" type="octet" mod="ptr" dir="in"/>
9589 <param name="x" type="unsigned long" dir="in"/>
9590 <param name="y" type="unsigned long" dir="in"/>
9591 <param name="width" type="unsigned long" dir="in"/>
9592 <param name="height" type="unsigned long" dir="in"/>
9593 </method>
9594
9595 <method name="invalidateAndUpdate">
9596 <desc>
9597 Does a full invalidation of the VM display and instructs the VM
9598 to update it.
9599 </desc>
9600 </method>
9601
9602 <method name="resizeCompleted">
9603 <desc>
9604 Signals that a framebuffer has completed the resize operation.
9605 </desc>
9606 <param name="screenId" type="unsigned long" dir="in"/>
9607 </method>
9608
9609 <method name="updateCompleted">
9610 <desc>
9611 Signals that a framebuffer has completed the update operation.
9612 </desc>
9613 </method>
9614
9615 </interface>
9616
9617 <!--
9618 // INetworkAdapter
9619 /////////////////////////////////////////////////////////////////////////
9620 -->
9621
9622 <enum
9623 name="NetworkAttachmentType"
9624 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
9625 >
9626 <desc>
9627 Network attachment type.
9628 </desc>
9629
9630 <const name="Null" value="0">
9631 <desc>Null value, also means "not attached".</desc>
9632 </const>
9633 <const name="NAT" value="1"/>
9634 <const name="HostInterface" value="2"/>
9635 <const name="Internal" value="3"/>
9636 </enum>
9637
9638 <enum
9639 name="NetworkAdapterType"
9640 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
9641 >
9642 <desc>
9643 Network adapter type.
9644 </desc>
9645
9646 <const name="Null" value="0">
9647 <desc>Null value (never used by the API).</desc>
9648 </const>
9649 <const name="Am79C970A" value="1"/>
9650 <const name="Am79C973" value="2"/>
9651 <const name="I82540EM" value="3"/>
9652 <const name="I82543GC" value="4"/>
9653 </enum>
9654
9655 <interface
9656 name="INetworkAdapter" extends="$unknown"
9657 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
9658 wsmap="managed"
9659 >
9660 <attribute name="adapterType" type="NetworkAdapterType">
9661 <desc>
9662 Type of the virtual network adapter. Depending on this value,
9663 VirtualBox will provide a different virtual network hardware
9664 to the guest.
9665 </desc>
9666 </attribute>
9667
9668 <attribute name="slot" type="unsigned long" readonly="yes">
9669 <desc>
9670 Slot number this adapter is plugged into. Corresponds to
9671 the value you pass to <link to="IMachine::getNetworkAdapter"/>
9672 to obtain this instance.
9673 </desc>
9674 </attribute>
9675
9676 <attribute name="enabled" type="boolean">
9677 <desc>
9678 Flag whether the network adapter is present in the
9679 guest system. If disabled, the virtual guest hardware will
9680 not contain this network adapter. Can only be changed when
9681 the VM is not running.
9682 </desc>
9683 </attribute>
9684
9685 <attribute name="MACAddress" type="wstring">
9686 <desc>
9687 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
9688 it to NULL, VirtualBox will generate a unique MAC address.
9689 </desc>
9690 </attribute>
9691
9692 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
9693
9694 <attribute name="hostInterface" type="wstring">
9695 <desc>
9696 Name of the Host Network Interface that is currently in use. NULL will be returned
9697 if no device has been allocated. On Linux, setting this refers to a permanent TAP
9698 device. However, a file descriptor has precedence over the interface name on Linux.
9699 Note that when VirtualBox allocates a TAP device, this property will not be set, i.e. the
9700 interface name would have to be determined using the file descriptor and /proc/self/fd.
9701 </desc>
9702 </attribute>
9703
9704 <attribute name="internalNetwork" type="wstring">
9705 <desc>
9706 Name of the internal network the VM is attached to.
9707 </desc>
9708 </attribute>
9709
9710 <attribute name="NATNetwork" type="wstring">
9711 <desc>
9712 Name of the NAT network the VM is attached to.
9713 </desc>
9714 </attribute>
9715
9716 <attribute name="cableConnected" type="boolean">
9717 <desc>
9718 Flag whether the adapter reports the cable as connected or not.
9719 It can be used to report offline situations to a VM.
9720 </desc>
9721 </attribute>
9722
9723 <attribute name="lineSpeed" type="unsigned long">
9724 <desc>
9725 Line speed reported by custom drivers, in units of 1 kbps.
9726 </desc>
9727 </attribute>
9728
9729 <attribute name="traceEnabled" type="boolean">
9730 <desc>
9731 Flag whether network traffic from/to the network card should be traced.
9732 Can only be toggled when the VM is turned off.
9733 </desc>
9734 </attribute>
9735
9736 <attribute name="traceFile" type="wstring">
9737 <desc>
9738 Filename where a network trace will be stored. If not set, VBox-pid.pcap
9739 will be used.
9740 </desc>
9741 </attribute>
9742
9743 <method name="attachToNAT">
9744 <desc>
9745 Attach the network adapter to the Network Address Translation (NAT) interface.
9746 </desc>
9747 </method>
9748
9749 <method name="attachToHostInterface">
9750 <desc>
9751 Attach the network adapter to a host interface. On Linux, the TAP
9752 setup application will be executed if configured and unless a device
9753 name and/or file descriptor has been set, a new TAP interface will be
9754 created.
9755 </desc>
9756 </method>
9757
9758 <method name="attachToInternalNetwork">
9759 <desc>
9760 Attach the network adapter to an internal network.
9761 </desc>
9762 </method>
9763
9764 <method name="detach">
9765 <desc>
9766 Detach the network adapter
9767 </desc>
9768 </method>
9769 </interface>
9770
9771
9772 <!--
9773 // ISerialPort
9774 /////////////////////////////////////////////////////////////////////////
9775 -->
9776
9777 <enum
9778 name="PortMode"
9779 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
9780 >
9781 <desc>
9782 The PortMode enumeration represents possible communication modes for
9783 the virtual serial port device.
9784 </desc>
9785
9786 <const name="Disconnected" value="0">
9787 <desc>Virtual device is not attached to any real host device.</desc>
9788 </const>
9789 <const name="HostPipe" value="1">
9790 <desc>Virtual device is attached to a host pipe.</desc>
9791 </const>
9792 <const name="HostDevice" value="2">
9793 <desc>Virtual device is attached to a host device.</desc>
9794 </const>
9795 </enum>
9796
9797 <interface
9798 name="ISerialPort" extends="$unknown"
9799 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
9800 wsmap="managed"
9801 >
9802
9803 <desc>
9804 The ISerialPort interface represents the virtual serial port device.
9805
9806 The virtual serial port device acts like an ordinary serial port
9807 inside the virtual machine. This device communicates to the real
9808 serial port hardware in one of two modes: host pipe or host device.
9809
9810 In host pipe mode, the #path attribute specifies the path to the pipe on
9811 the host computer that represents a serial port. The #server attribute
9812 determines if this pipe is created by the virtual machine process at
9813 machine startup or it must already exist before starting machine
9814 execution.
9815
9816 In host device mode, the #path attribute specifies the name of the
9817 serial port device on the host computer.
9818
9819 There is also a third communication mode: the disconnected mode. In this
9820 mode, the guest OS running inside the virtual machine will be able to
9821 detect the serial port, but all port write operations will be discarded
9822 and all port read operations will return no data.
9823
9824 <see>IMachine::getSerialPort</see>
9825 </desc>
9826
9827 <attribute name="slot" type="unsigned long" readonly="yes">
9828 <desc>
9829 Slot number this serial port is plugged into. Corresponds to
9830 the value you pass to <link to="IMachine::getSerialPort"/>
9831 to obtain this instance.
9832 </desc>
9833 </attribute>
9834
9835 <attribute name="enabled" type="boolean">
9836 <desc>
9837 Flag whether the serial port is enabled. If disabled,
9838 the serial port will not be reported to the guest OS.
9839 </desc>
9840 </attribute>
9841
9842 <attribute name="IOBase" type="unsigned long">
9843 <desc>Base I/O address of the serial port.</desc>
9844 </attribute>
9845
9846 <attribute name="IRQ" type="unsigned long">
9847 <desc>IRQ number of the serial port.</desc>
9848 </attribute>
9849
9850 <attribute name="hostMode" type="PortMode">
9851 <desc>
9852 How is this port connected to the host.
9853 <note>
9854 Changing this attribute may fail if the conditions for
9855 <link to="#path"/> are not met.
9856 </note>
9857 </desc>
9858 </attribute>
9859
9860 <attribute name="server" type="boolean">
9861 <desc>
9862 Flag whether this serial port acts as a server (creates a new pipe on
9863 the host) or as a client (uses the existing pipe). This attribute is
9864 used only when <link to="#hostMode"/> is PortMode_HostPipe.
9865 </desc>
9866 </attribute>
9867
9868 <attribute name="path" type="wstring">
9869 <desc>
9870 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
9871 PortMode_HostPipe, or the host serial device name when
9872 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
9873 cases, setting a @c null or an empty string as the attribute's value
9874 will result into an error. Otherwise, the value of this property is
9875 ignored.
9876 </desc>
9877 </attribute>
9878
9879 </interface>
9880
9881 <!--
9882 // IParallelPort
9883 /////////////////////////////////////////////////////////////////////////
9884 -->
9885
9886 <interface
9887 name="IParallelPort" extends="$unknown"
9888 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
9889 wsmap="managed"
9890 >
9891
9892 <desc>
9893 The IParallelPort interface represents the virtual parallel port device.
9894
9895 The virtual parallel port device acts like an ordinary parallel port
9896 inside the virtual machine. This device communicates to the real
9897 parallel port hardware using the name of the parallel device on the host
9898 computer specified in the #path attribute.
9899
9900 Each virtual parallel port device is assigned a base I/O address and an
9901 IRQ number that will be reported to the guest operating system and used
9902 to operate the given parallel port from within the virtual machine.
9903
9904 <see>IMachine::getParallelPort</see>
9905 </desc>
9906
9907 <attribute name="slot" type="unsigned long" readonly="yes">
9908 <desc>
9909 Slot number this parallel port is plugged into. Corresponds to
9910 the value you pass to <link to="IMachine::getParallelPort"/>
9911 to obtain this instance.
9912 </desc>
9913 </attribute>
9914
9915 <attribute name="enabled" type="boolean">
9916 <desc>
9917 Flag whether the parallel port is enabled. If disabled,
9918 the parallel port will not be reported to the guest OS.
9919 </desc>
9920 </attribute>
9921
9922 <attribute name="IOBase" type="unsigned long">
9923 <desc>Base I/O address of the parallel port.</desc>
9924 </attribute>
9925
9926 <attribute name="IRQ" type="unsigned long">
9927 <desc>IRQ number of the parallel port.</desc>
9928 </attribute>
9929
9930 <attribute name="path" type="wstring">
9931 <desc>
9932 Host parallel device name. If this parallel port is enabled, setting a
9933 @c null or an empty string as this attribute's value will result into
9934 an error.
9935 </desc>
9936 </attribute>
9937
9938 </interface>
9939
9940
9941 <!--
9942 // IMachineDebugger
9943 /////////////////////////////////////////////////////////////////////////
9944 -->
9945
9946 <interface
9947 name="IMachineDebugger" extends="$unknown"
9948 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
9949 wsmap="suppress"
9950 >
9951 <method name="resetStats">
9952 <desc>
9953 Reset VM statistics.
9954 </desc>
9955 <param name="pattern" type="wstring" dir="in">
9956 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9957 </param>
9958 </method>
9959
9960 <method name="dumpStats">
9961 <desc>
9962 Dumps VM statistics.
9963 </desc>
9964 <param name="pattern" type="wstring" dir="in">
9965 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9966 </param>
9967 </method>
9968
9969 <method name="getStats">
9970 <desc>
9971 Get the VM statistics in a XMLish format.
9972 </desc>
9973 <param name="pattern" type="wstring" dir="in">
9974 <desc>The selection pattern. A bit similar to filename globbing.</desc>
9975 </param>
9976 <param name="withDescriptions" type="boolean" dir="in">
9977 <desc>Whether to include the descriptions.</desc>
9978 </param>
9979 <param name="stats" type="wstring" dir="out">
9980 <desc>The XML document containing the statistics.</desc>
9981 </param>
9982 </method>
9983
9984 <method name="injectNMI">
9985 <desc>
9986 Inject an NMI into a running VT-x/AMD-V VM.
9987 </desc>
9988 </method>
9989
9990 <attribute name="singlestep" type="boolean">
9991 <desc>Switch for enabling singlestepping.</desc>
9992 </attribute>
9993
9994 <attribute name="recompileUser" type="boolean">
9995 <desc>Switch for forcing code recompilation for user mode code.</desc>
9996 </attribute>
9997
9998 <attribute name="recompileSupervisor" type="boolean">
9999 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10000 </attribute>
10001
10002 <attribute name="PATMEnabled" type="boolean">
10003 <desc>Switch for enabling and disabling the PATM component.</desc>
10004 </attribute>
10005
10006 <attribute name="CSAMEnabled" type="boolean">
10007 <desc>Switch for enabling and disabling the CSAM component.</desc>
10008 </attribute>
10009
10010 <attribute name="logEnabled" type="boolean">
10011 <desc>Switch for enabling and disabling logging.</desc>
10012 </attribute>
10013
10014 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10015 <desc>
10016 Flag indicating whether the VM is currently making use of CPU hardware
10017 virtualization extensions.
10018 </desc>
10019 </attribute>
10020
10021 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10022 <desc>
10023 Flag indicating whether the VM is currently making use of the nested paging
10024 CPU hardware virtualization extension.
10025 </desc>
10026 </attribute>
10027
10028 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10029 <desc>
10030 Flag indicating whether the VM is currently making use of the VPID
10031 VT-x extension.
10032 </desc>
10033 </attribute>
10034
10035 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10036 <desc>
10037 Flag indicating whether the VM is currently making use of the Physical
10038 Address Extension CPU feature.
10039 </desc>
10040 </attribute>
10041
10042 <attribute name="virtualTimeRate" type="unsigned long">
10043 <desc>
10044 The rate at which the virtual time runs expressed as a percentage.
10045 The accepted range is 2% to 20000%.
10046 </desc>
10047 </attribute>
10048
10049 <!-- @todo method for setting log flags, groups and destination! -->
10050
10051 <attribute name="VM" type="unsigned long long" readonly="yes">
10052 <desc>
10053 Gets the VM handle. This is only for internal use while
10054 we carve the details of this interface.
10055 </desc>
10056 </attribute>
10057
10058 </interface>
10059
10060 <!--
10061 // IUSBController
10062 /////////////////////////////////////////////////////////////////////////
10063 -->
10064
10065 <interface
10066 name="IUSBController" extends="$unknown"
10067 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10068 wsmap="managed"
10069 >
10070 <attribute name="enabled" type="boolean">
10071 <desc>
10072 Flag whether the USB controller is present in the
10073 guest system. If disabled, the virtual guest hardware will
10074 not contain any USB controller. Can only be changed when
10075 the VM is powered off.
10076 </desc>
10077 </attribute>
10078
10079 <attribute name="enabledEhci" type="boolean">
10080 <desc>
10081 Flag whether the USB EHCI controller is present in the
10082 guest system. If disabled, the virtual guest hardware will
10083 not contain a USB EHCI controller. Can only be changed when
10084 the VM is powered off.
10085 </desc>
10086 </attribute>
10087
10088 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10089 <desc>
10090 USB standard version which the controller implements.
10091 This is a BCD which means that the major version is in the
10092 high byte and minor version is in the low byte.
10093 </desc>
10094 </attribute>
10095
10096 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10097 <desc>
10098 List of USB device filters associated with the machine.
10099
10100 If the machine is currently running, these filters are activated
10101 every time a new (supported) USB device is attached to the host
10102 computer that was not ignored by global filters
10103 (<link to="IHost::USBDeviceFilters"/>).
10104
10105 These filters are also activated when the machine is powered up.
10106 They are run against a list of all currently available USB
10107 devices (in states
10108 <link to="USBDeviceState_Available"/>,
10109 <link to="USBDeviceState_Busy"/>,
10110 <link to="USBDeviceState_Held"/>) that were not previously
10111 ignored by global filters.
10112
10113 If at least one filter matches the USB device in question, this
10114 device is automatically captured (attached to) the virtual USB
10115 controller of this machine.
10116
10117 <see>IUSBDeviceFilter, ::IUSBController</see>
10118 </desc>
10119 </attribute>
10120
10121 <method name="createDeviceFilter">
10122 <desc>
10123 Creates a new USB device filter. All attributes except
10124 the filter name are set to <tt>null</tt> (any match),
10125 <i>active</i> is <tt>false</tt> (the filter is not active).
10126
10127 The created filter can then be added to the list of filters using
10128 <link to="#insertDeviceFilter()"/>.
10129
10130 <see>#deviceFilters</see>
10131 </desc>
10132 <param name="name" type="wstring" dir="in">
10133 <desc>
10134 Filter name. See <link to="IUSBDeviceFilter::name"/>
10135 for more info.
10136 </desc>
10137 </param>
10138 <param name="filter" type="IUSBDeviceFilter" dir="return">
10139 <desc>Created filter object.</desc>
10140 </param>
10141 </method>
10142
10143 <method name="insertDeviceFilter">
10144 <desc>
10145 Inserts the given USB device to the specified position
10146 in the list of filters.
10147
10148 Positions are numbered starting from <tt>0</tt>. If the specified
10149 position is equal to or greater than the number of elements in
10150 the list, the filter is added to the end of the collection.
10151
10152 <note>
10153 Duplicates are not allowed, so an attempt to insert a
10154 filter that is already in the collection, will return an
10155 error.
10156 </note>
10157
10158 <see>#deviceFilters</see>
10159 </desc>
10160 <param name="position" type="unsigned long" dir="in">
10161 <desc>Position to insert the filter to.</desc>
10162 </param>
10163 <param name="filter" type="IUSBDeviceFilter" dir="in">
10164 <desc>USB device filter to insert.</desc>
10165 </param>
10166 </method>
10167
10168 <method name="removeDeviceFilter">
10169 <desc>
10170 Removes a USB device filter from the specified position in the
10171 list of filters.
10172
10173 Positions are numbered starting from <tt>0</tt>. Specifying a
10174 position equal to or greater than the number of elements in
10175 the list will produce an error.
10176
10177 <see>#deviceFilters</see>
10178 </desc>
10179 <param name="position" type="unsigned long" dir="in">
10180 <desc>Position to remove the filter from.</desc>
10181 </param>
10182 <param name="filter" type="IUSBDeviceFilter" dir="return">
10183 <desc>Removed USB device filter.</desc>
10184 </param>
10185 </method>
10186
10187 </interface>
10188
10189
10190 <!--
10191 // IUSBDevice
10192 /////////////////////////////////////////////////////////////////////////
10193 -->
10194
10195 <enumerator
10196 name="IUSBDeviceEnumerator" type="IUSBDevice"
10197 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10198 />
10199
10200 <collection
10201 name="IUSBDeviceCollection" type="IUSBDevice"
10202 enumerator="IUSBDeviceEnumerator"
10203 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10204 readonly="yes"
10205 >
10206 <method name="findById">
10207 <desc>
10208 Searches this collection for a USB device with the given UUID.
10209 <note>
10210 The method returns an error if the given UUID does not
10211 correspond to any USB device in the collection.
10212 </note>
10213 <see>IUSBDevice::id</see>
10214 </desc>
10215 <param name="id" type="uuid" dir="in">
10216 <desc>UUID of the USB device to search for.</desc>
10217 </param>
10218 <param name="device" type="IUSBDevice" dir="return">
10219 <desc>Found USB device object.</desc>
10220 </param>
10221 </method>
10222
10223 <method name="findByAddress">
10224 <desc>
10225 Searches this collection for a USB device with the given
10226 host address.
10227 <note>
10228 The method returns an error if the given address does not
10229 correspond to any USB device in the collection.
10230 </note>
10231 <see>IUSBDevice::address</see>
10232 </desc>
10233 <param name="name" type="wstring" dir="in">
10234 <desc>
10235 Address of the USB device (as assigned by the host) to
10236 search for.
10237 </desc>
10238 </param>
10239 <param name="device" type="IUSBDevice" dir="return">
10240 <desc>Found USB device object.</desc>
10241 </param>
10242 </method>
10243
10244 </collection>
10245
10246 <interface
10247 name="IUSBDevice" extends="$unknown"
10248 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10249 wsmap="managed"
10250 >
10251 <desc>
10252 The IUSBDevice interface represents a virtual USB device attached to the
10253 virtual machine.
10254
10255 A collection of objects implementing this interface is stored in the
10256 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10257 attached to a running virtual machine's USB controller.
10258 </desc>
10259
10260 <attribute name="id" type="uuid" readonly="yes">
10261 <desc>
10262 Unique USB device ID. This ID is built from #vendorId,
10263 #productId, #revision and #serialNumber.
10264 </desc>
10265 </attribute>
10266
10267 <attribute name="vendorId" type="unsigned short" readonly="yes">
10268 <desc>Vendor ID.</desc>
10269 </attribute>
10270
10271 <attribute name="productId" type="unsigned short" readonly="yes">
10272 <desc>Product ID.</desc>
10273 </attribute>
10274
10275 <attribute name="revision" type="unsigned short" readonly="yes">
10276 <desc>
10277 Product revision number. This is a packed BCD represented as
10278 unsigned short. The high byte is the integer part and the low
10279 byte is the decimal.
10280 </desc>
10281 </attribute>
10282
10283 <attribute name="manufacturer" type="wstring" readonly="yes">
10284 <desc>Manufacturer string.</desc>
10285 </attribute>
10286
10287 <attribute name="product" type="wstring" readonly="yes">
10288 <desc>Product string.</desc>
10289 </attribute>
10290
10291 <attribute name="serialNumber" type="wstring" readonly="yes">
10292 <desc>Serial number string.</desc>
10293 </attribute>
10294
10295 <attribute name="address" type="wstring" readonly="yes">
10296 <desc>Host specific address of the device.</desc>
10297 </attribute>
10298
10299 <attribute name="port" type="unsigned short" readonly="yes">
10300 <desc>
10301 Host USB port number the device is physically
10302 connected to.
10303 </desc>
10304 </attribute>
10305
10306 <attribute name="version" type="unsigned short" readonly="yes">
10307 <desc>
10308 The major USB version of the device - 1 or 2.
10309 </desc>
10310 </attribute>
10311
10312 <attribute name="portVersion" type="unsigned short" readonly="yes">
10313 <desc>
10314 The major USB version of the host USB port the device is
10315 physically connected to - 1 or 2. For devices not connected to
10316 anything this will have the same value as the version attribute.
10317 </desc>
10318 </attribute>
10319
10320 <attribute name="remote" type="boolean" readonly="yes">
10321 <desc>
10322 Whether the device is physically connected to a remote VRDP
10323 client or to a local host machine.
10324 </desc>
10325 </attribute>
10326
10327 </interface>
10328
10329
10330 <!--
10331 // IUSBDeviceFilter
10332 /////////////////////////////////////////////////////////////////////////
10333 -->
10334
10335 <enumerator
10336 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10337 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10338 />
10339
10340 <collection
10341 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10342 enumerator="IUSBDeviceFilterEnumerator"
10343 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10344 readonly="yes"
10345 />
10346
10347 <interface
10348 name="IUSBDeviceFilter" extends="$unknown"
10349 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10350 wsmap="managed"
10351 >
10352 <desc>
10353 The IUSBDeviceFilter interface represents an USB device filter used
10354 to perform actions on a group of USB devices.
10355
10356 This type of filters is used by running virtual machines to
10357 automatically capture selected USB devices once they are physically
10358 attached to the host computer.
10359
10360 A USB device is matched to the given device filter if and only if all
10361 attributes of the device match the corresponding attributes of the
10362 filter (that is, attributes are joined together using the logical AND
10363 operation). On the other hand, all together, filters in the list of
10364 filters carry the semantics of the logical OR operation. So if it is
10365 desirable to create a match like "this vendor id OR this product id",
10366 one needs to create two filters and specify "any match" (see below)
10367 for unused attributes.
10368
10369 All filter attributes used for matching are strings. Each string
10370 is an expression representing a set of values of the corresponding
10371 device attribute, that will match the given filter. Currently, the
10372 following filtering expressions are supported:
10373
10374 <ul>
10375 <li><i>Interval filters</i>. Used to specify valid intervals for
10376 integer device attributes (Vendor ID, Product ID and Revision).
10377 The format of the string is:
10378
10379 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
10380
10381 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
10382 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
10383 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
10384 is omitted before a dash (<tt>-</tt>), the minimum possible integer
10385 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
10386 possible integer is assumed.
10387 </li>
10388 <li><i>Boolean filters</i>. Used to specify acceptable values for
10389 boolean device attributes. The format of the string is:
10390
10391 <tt>true|false|yes|no|0|1</tt>
10392
10393 </li>
10394 <li><i>Exact match</i>. Used to specify a single value for the given
10395 device attribute. Any string that doesn't start with <tt>int:</tt>
10396 represents the exact match. String device attributes are compared to
10397 this string including case of symbols. Integer attributes are first
10398 converted to a string (see individual filter attributes) and then
10399 compared ignoring case.
10400
10401 </li>
10402 <li><i>Any match</i>. Any value of the corresponding device attribute
10403 will match the given filter. An empty or <tt>null</tt> string is
10404 used to construct this type of filtering expressions.
10405
10406 </li>
10407 </ul>
10408
10409 <note>
10410 On the Windows host platform, interval filters are not currently
10411 available. Also all string filter attributes
10412 (<link to="#manufacturer"/>, <link to="#product"/>,
10413 <link to="#serialNumber"/>) are ignored, so they behave as
10414 <i>any match</i> no matter what string expression is specified.
10415 </note>
10416
10417 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
10418 </desc>
10419
10420 <attribute name="name" type="wstring">
10421 <desc>
10422 Visible name for this filter.
10423 This name is used to visually distinguish one filter from another,
10424 so it can neither be <tt>null</tt> nor an empty string.
10425 </desc>
10426 </attribute>
10427
10428 <attribute name="active" type="boolean">
10429 <desc>Whether this filter active or has been temporarily disabled.</desc>
10430 </attribute>
10431
10432 <attribute name="vendorId" type="wstring">
10433 <desc>
10434 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
10435 The string representation for the <i>exact matching</i>
10436 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10437 (including leading zeroes).
10438 </desc>
10439 </attribute>
10440
10441 <attribute name="productId" type="wstring">
10442 <desc>
10443 <link to="IUSBDevice::productId">Product ID</link> filter.
10444 The string representation for the <i>exact matching</i>
10445 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10446 (including leading zeroes).
10447 </desc>
10448 </attribute>
10449
10450 <attribute name="revision" type="wstring">
10451 <desc>
10452 <link to="IUSBDevice::productId">Product revision number</link>
10453 filter. The string representation for the <i>exact matching</i>
10454 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
10455 of the integer part of the revision, and <tt>F</tt> is the
10456 decimal digit of its fractional part (including leading and
10457 trailing zeros).
10458 Note that for interval filters, it's best to use the hexadecimal
10459 form, because the revision is stored as a 16 bit packed BCD value;
10460 so the expression <tt>int:0x0100-0x0199</tt> will match any
10461 revision from <tt>1.0</tt> to <tt>1.99</tt>.
10462 </desc>
10463 </attribute>
10464
10465 <attribute name="manufacturer" type="wstring">
10466 <desc>
10467 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
10468 </desc>
10469 </attribute>
10470
10471 <attribute name="product" type="wstring">
10472 <desc>
10473 <link to="IUSBDevice::product">Product</link> filter.
10474 </desc>
10475 </attribute>
10476
10477 <attribute name="serialNumber" type="wstring">
10478 <desc>
10479 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
10480 </desc>
10481 </attribute>
10482
10483 <attribute name="port" type="wstring">
10484 <desc>
10485 <link to="IUSBDevice::port">Host USB port</link> filter.
10486 </desc>
10487 </attribute>
10488
10489 <attribute name="remote" type="wstring">
10490 <desc>
10491 <link to="IUSBDevice::remote">Remote state</link> filter.
10492 <note>
10493 This filter makes sense only for machine USB filters,
10494 i.e. it is ignored by IHostUSBDeviceFilter objects.
10495 </note>
10496 </desc>
10497 </attribute>
10498
10499 <attribute name="maskedInterfaces" type="unsigned long">
10500 <desc>
10501 This is an advanced option for hiding one or more USB interfaces
10502 from the guest. The value is a bit mask where the bits that are set
10503 means the corresponding USB interface should be hidden, masked off
10504 if you like.
10505 This feature only works on Linux hosts.
10506 </desc>
10507 </attribute>
10508
10509 </interface>
10510
10511
10512 <!--
10513 // IHostUSBDevice
10514 /////////////////////////////////////////////////////////////////////////
10515 -->
10516
10517 <enum
10518 name="USBDeviceState"
10519 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
10520 >
10521 <desc>
10522 USB device state. This enumeration represents all possible states
10523 of the USB device physically attached to the host computer regarding
10524 its state on the host computer and availability to guest computers
10525 (all currently running virtual machines).
10526
10527 Once a supported USB device is attached to the host, global USB
10528 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
10529 either ignore the device, or put it to USBDeviceState_Held state, or do
10530 nothing. Unless the device is ignored by global filters, filters of all
10531 currently running guests (<link to="IUSBController::deviceFilters"/>) are
10532 activated that can put it to USBDeviceState_Captured state.
10533
10534 If the device was ignored by global filters, or didn't match
10535 any filters at all (including guest ones), it is handled by the host
10536 in a normal way. In this case, the device state is determined by
10537 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
10538 or USBDeviceState_Available, depending on the current device usage.
10539
10540 Besides auto-capturing based on filters, the device can be manually
10541 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
10542 state is USBDeviceState_Busy, USBDeviceState_Available or
10543 USBDeviceState_Held.
10544
10545 <note>
10546 Due to differences in USB stack implementations in Linux and Win32,
10547 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
10548 only to the Linux version of the product. This also means that (<link
10549 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
10550 device state is USBDeviceState_Held.
10551 </note>
10552
10553 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
10554 </desc>
10555
10556 <const name="NotSupported" value="0">
10557 <desc>
10558 Not supported by the VirtualBox server, not available to guests.
10559 </desc>
10560 </const>
10561 <const name="Unavailable" value="1">
10562 <desc>
10563 Being used by the host computer exclusively,
10564 not available to guests.
10565 </desc>
10566 </const>
10567 <const name="Busy" value="2">
10568 <desc>
10569 Being used by the host computer, potentially available to guests.
10570 </desc>
10571 </const>
10572 <const name="Available" value="3">
10573 <desc>
10574 Not used by the host computer, available to guests (the host computer
10575 can also start using the device at any time).
10576 </desc>
10577 </const>
10578 <const name="Held" value="4">
10579 <desc>
10580 Held by the VirtualBox server (ignored by the host computer),
10581 available to guests.
10582 </desc>
10583 </const>
10584 <const name="Captured" value="5">
10585 <desc>
10586 Captured by one of the guest computers, not available
10587 to anybody else.
10588 </desc>
10589 </const>
10590 </enum>
10591
10592 <enumerator
10593 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
10594 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
10595 />
10596
10597 <collection
10598 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
10599 enumerator="IHostUSBDeviceEnumerator"
10600 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
10601 readonly="yes"
10602 >
10603 <method name="findById">
10604 <desc>
10605 Searches this collection for a USB device with the given UUID.
10606 <note>
10607 The method returns an error if the given UUID does not
10608 correspond to any USB device in the collection.
10609 </note>
10610 <see>IHostUSBDevice::id</see>
10611 </desc>
10612 <param name="id" type="uuid" dir="in">
10613 <desc>UUID of the USB device to search for.</desc>
10614 </param>
10615 <param name="device" type="IHostUSBDevice" dir="return">
10616 <desc>Found USB device object.</desc>
10617 </param>
10618 </method>
10619
10620 <method name="findByAddress">
10621 <desc>
10622 Searches this collection for a USB device with the given
10623 host address.
10624 <note>
10625 The method returns an error if the given address does not
10626 correspond to any USB device in the collection.
10627 </note>
10628 <see>IHostUSBDevice::address</see>
10629 </desc>
10630 <param name="name" type="wstring" dir="in">
10631 <desc>
10632 Address of the USB device (as assigned by the host) to
10633 search for.
10634 </desc>
10635 </param>
10636 <param name="device" type="IHostUSBDevice" dir="return">
10637 <desc>Found USB device object.</desc>
10638 </param>
10639 </method>
10640
10641 </collection>
10642
10643 <interface
10644 name="IHostUSBDevice" extends="IUSBDevice"
10645 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
10646 wsmap="managed"
10647 >
10648 <desc>
10649 The IHostUSBDevice interface represents a physical USB device attached
10650 to the host computer.
10651
10652 Besides properties inherited from IUSBDevice, this interface adds the
10653 <link to="#state"/> property that holds the current state of the USB
10654 device.
10655
10656 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
10657 </desc>
10658
10659 <attribute name="state" type="USBDeviceState" readonly="yes">
10660 <desc>
10661 Current state of the device.
10662 </desc>
10663 </attribute>
10664
10665 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
10666
10667 </interface>
10668
10669
10670 <!--
10671 // IHostUSBDeviceFilter
10672 /////////////////////////////////////////////////////////////////////////
10673 -->
10674
10675 <enum
10676 name="USBDeviceFilterAction"
10677 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
10678 >
10679 <desc>
10680 Actions for host USB device filters.
10681 <see>IHostUSBDeviceFilter, USBDeviceState</see>
10682 </desc>
10683
10684 <const name="Null" value="0">
10685 <desc>Null value (never used by the API).</desc>
10686 </const>
10687 <const name="Ignore" value="1">
10688 <desc>Ignore the matched USB device.</desc>
10689 </const>
10690 <const name="Hold" value="2">
10691 <desc>Hold the matched USB device.</desc>
10692 </const>
10693 </enum>
10694
10695 <enumerator
10696 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
10697 uuid="ff735211-903e-4642-9c37-189eb44579fe"
10698 />
10699
10700 <collection
10701 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
10702 enumerator="IHostUSBDeviceFilterEnumerator"
10703 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
10704 readonly="yes"
10705 />
10706
10707 <interface
10708 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
10709 uuid="4cc70246-d74a-400f-8222-3900489c0374"
10710 wsmap="managed"
10711 >
10712 <desc>
10713 The IHostUSBDeviceFilter interface represents a global filter for a
10714 physical USB device used by the host computer. Used indirectly in
10715 <link to="IHost::USBDeviceFilters"/>.
10716
10717 Using filters of this type, the host computer determines the initial
10718 state of the USB device after it is physically attached to the
10719 host's USB controller.
10720
10721 <note>
10722 The <link to="#remote"/> attribute is ignored by this type of
10723 filters, because it makes sense only for
10724 <link to="IUSBController::deviceFilters">machine USB filters</link>.
10725 </note>
10726
10727 <see>IHost::USBDeviceFilters</see>
10728 </desc>
10729
10730 <attribute name="action" type="USBDeviceFilterAction">
10731 <desc>
10732 Action performed by the host when an attached USB device
10733 matches this filter.
10734 </desc>
10735 </attribute>
10736
10737 </interface>
10738
10739 <!--
10740 // IAudioAdapter
10741 /////////////////////////////////////////////////////////////////////////
10742 -->
10743
10744 <enum
10745 name="AudioDriverType"
10746 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
10747 >
10748 <desc>
10749 Host audio driver type.
10750 </desc>
10751
10752 <const name="Null" value="0">
10753 <desc>Null value, also means "dummy audio driver".</desc>
10754 </const>
10755 <const name="WinMM" value="1"/>
10756 <const name="OSS" value="2"/>
10757 <const name="ALSA" value="3"/>
10758 <const name="DirectSound" value="4"/>
10759 <const name="CoreAudio" value="5"/>
10760 <const name="MMPM" value="6"/>
10761 <const name="Pulse" value="7"/>
10762 <const name="SolAudio" value="8"/>
10763 </enum>
10764
10765 <enum
10766 name="AudioControllerType"
10767 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
10768 >
10769 <desc>
10770 Virtual audio controller type.
10771 </desc>
10772
10773 <const name="AC97" value="0"/>
10774 <const name="SB16" value="1"/>
10775 </enum>
10776
10777 <interface
10778 name="IAudioAdapter" extends="$unknown"
10779 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
10780 wsmap="managed"
10781 >
10782 <desc>
10783 The IAudioAdapter interface represents the virtual audio adapter of
10784 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
10785 </desc>
10786 <attribute name="enabled" type="boolean">
10787 <desc>
10788 Flag whether the audio adapter is present in the
10789 guest system. If disabled, the virtual guest hardware will
10790 not contain any audio adapter. Can only be changed when
10791 the VM is not running.
10792 </desc>
10793 </attribute>
10794 <attribute name="audioController" type="AudioControllerType">
10795 <desc>
10796 The audio hardware we emulate.
10797 </desc>
10798 </attribute>
10799 <attribute name="audioDriver" type="AudioDriverType">
10800 <desc>
10801 Audio driver the adapter is connected to. This setting
10802 can only be changed when the VM is not running.
10803 </desc>
10804 </attribute>
10805 </interface>
10806
10807 <!--
10808 // IVRDPServer
10809 /////////////////////////////////////////////////////////////////////////
10810 -->
10811
10812 <enum
10813 name="VRDPAuthType"
10814 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
10815 >
10816 <desc>
10817 VRDP authentication type.
10818 </desc>
10819
10820 <const name="Null" value="0">
10821 <desc>Null value, also means "no authentication".</desc>
10822 </const>
10823 <const name="External" value="1"/>
10824 <const name="Guest" value="2"/>
10825 </enum>
10826
10827 <interface
10828 name="IVRDPServer" extends="$unknown"
10829 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
10830 wsmap="managed"
10831 >
10832 <attribute name="enabled" type="boolean">
10833 <desc>VRDP server status.</desc>
10834 </attribute>
10835
10836 <attribute name="port" type="unsigned long">
10837 <desc>
10838 VRDP server port number.
10839 <note>
10840 Setting the value of this property to <tt>0</tt> will reset the port
10841 number to the default value which is
10842 currently <tt>3389</tt>. Reading this property will always return a
10843 real port number, even after it has been set to <tt>0</tt> (in which
10844 case the default port is returned).
10845 </note>
10846 </desc>
10847 </attribute>
10848
10849 <attribute name="netAddress" type="wstring">
10850 <desc>VRDP server address.</desc>
10851 </attribute>
10852
10853 <attribute name="authType" type="VRDPAuthType">
10854 <desc>VRDP authentication method.</desc>
10855 </attribute>
10856
10857 <attribute name="authTimeout" type="unsigned long">
10858 <desc>Timeout for guest authentication. Milliseconds.</desc>
10859 </attribute>
10860
10861 <attribute name="allowMultiConnection" type="boolean">
10862 <desc>
10863 Flag whether multiple simultaneous connections to the VM are permitted.
10864 Note that this will be replaced by a more powerful mechanism in the future.
10865 </desc>
10866 </attribute>
10867
10868 <attribute name="reuseSingleConnection" type="boolean">
10869 <desc>
10870 Flag whether the existing connection must be dropped and a new connection
10871 must be established by the VRDP server, when a new client connects in single
10872 connection mode.
10873 </desc>
10874 </attribute>
10875
10876 </interface>
10877
10878
10879 <!--
10880 // ISharedFolder
10881 /////////////////////////////////////////////////////////////////////////
10882 -->
10883
10884 <enumerator
10885 name="ISharedFolderEnumerator" type="ISharedFolder"
10886 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
10887 />
10888
10889 <collection
10890 name="ISharedFolderCollection" type="ISharedFolder"
10891 enumerator="ISharedFolderEnumerator"
10892 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
10893 readonly="yes">
10894
10895 <method name="findByName">
10896 <desc>
10897 Searches this collection for a shared folder with the given logical
10898 name.
10899 <note>
10900 The method returns an error if the given name does not correspond to
10901 any shared folder in the collection.
10902 </note>
10903 </desc>
10904 <param name="name" type="wstring" dir="in">
10905 <desc>Logical name of the shared folder to search for</desc>
10906 </param>
10907 <param name="sharedFolder" type="ISharedFolder" dir="return">
10908 <desc>Found shared folder object</desc>
10909 </param>
10910 </method>
10911
10912 </collection>
10913
10914 <interface
10915 name="ISharedFolder" extends="$unknown"
10916 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
10917 wsmap="struct"
10918 >
10919 <desc>
10920 The ISharedFolder interface represents a folder in the host computer's
10921 file system accessible from the guest OS running inside a virtual
10922 machine using an associated logical name.
10923
10924 There are three types of shared folders:
10925 <ul>
10926 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
10927 folders available to all virtual machines.</li>
10928 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
10929 VM-specific shared folders available to the given virtual machine at
10930 startup.</li>
10931 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
10932 VM-specific shared folders created in the session context (for
10933 example, when the virtual machine is running) and automatically
10934 discarded when the session is closed (the VM is powered off).</li>
10935 </ul>
10936
10937 Logical names of shared folders must be unique within the given scope
10938 (global, permanent or transient). However, they do not need to be unique
10939 across scopes. In this case, the definition of the shared folder in a
10940 more specific scope takes precedence over definitions in all other
10941 scopes. The order of precedence is (more specific to more general):
10942 <ol>
10943 <li>Transient definitions</li>
10944 <li>Permanent definitions</li>
10945 <li>Global definitions</li>
10946 </ol>
10947
10948 For example, if MyMachine has a shared folder named
10949 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
10950 transient shared folder named <tt>C_DRIVE</tt> (that points
10951 to <tt>C:\\\\WINDOWS</tt>) will change the definition
10952 of <tt>C_DRIVE</tt> in the guest OS so
10953 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
10954 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
10955 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
10956 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
10957 to <tt>C:\\</tt> if it still exists.
10958
10959 Note that permanent and transient shared folders of different machines
10960 are in different name spaces, so they don't overlap and don't need to
10961 have unique logical names.
10962
10963 <note>
10964 Global shared folders are not implemented in the current version of the
10965 product.
10966 </note>
10967 </desc>
10968
10969 <attribute name="name" type="wstring" readonly="yes">
10970 <desc>Logical name of the shared folder.</desc>
10971 </attribute>
10972
10973 <attribute name="hostPath" type="wstring" readonly="yes">
10974 <desc>Full path to the shared folder in the host file system.</desc>
10975 </attribute>
10976
10977 <attribute name="accessible" type="boolean" readonly="yes">
10978 <desc>
10979 Whether the folder defined by the host path is currently
10980 accessible or not.
10981 For example, the folder can be unaccessible if it is placed
10982 on the network share that is not available by the time
10983 this property is read.
10984 </desc>
10985 </attribute>
10986
10987 <attribute name="writable" type="boolean" readonly="yes">
10988 <desc>
10989 Whether the folder defined by the host path is writable or
10990 not.
10991 </desc>
10992 </attribute>
10993
10994 </interface>
10995
10996 <!--
10997 // ISession
10998 /////////////////////////////////////////////////////////////////////////
10999 -->
11000
11001 <interface
11002 name="IInternalSessionControl" extends="$unknown"
11003 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11004 internal="yes"
11005 wsmap="suppress"
11006 >
11007 <method name="getPID">
11008 <desc>PID of the process that has created this Session object.
11009 </desc>
11010 <param name="pid" type="unsigned long" dir="return"/>
11011 </method>
11012
11013 <method name="getRemoteConsole">
11014 <desc>Returns the console object suitable for remote control.</desc>
11015 <param name="console" type="IConsole" dir="return"/>
11016 </method>
11017
11018 <method name="assignMachine">
11019 <desc>
11020 Assigns the machine object associated with this direct-type
11021 session or informs the session that it will be a remote one
11022 (if machine = NULL).
11023 </desc>
11024 <param name="machine" type="IMachine" dir="in"/>
11025 </method>
11026
11027 <method name="assignRemoteMachine">
11028 <desc>
11029 Assigns the machine and the (remote) console object associated with
11030 this remote-type session.
11031 </desc>
11032 <param name="machine" type="IMachine" dir="in"/>
11033 <param name="console" type="IConsole" dir="in"/>
11034 </method>
11035
11036 <method name="updateMachineState">
11037 <desc>
11038 Updates the machine state in the VM process.
11039 Must be called only in certain cases
11040 (see the method implementation).
11041 </desc>
11042 <param name="aMachineState" type="MachineState" dir="in"/>
11043 </method>
11044
11045 <method name="uninitialize">
11046 <desc>
11047 Uninitializes (closes) this session. Used by VirtualBox to close
11048 the corresponding remote session when the direct session dies
11049 or gets closed.
11050 </desc>
11051 </method>
11052
11053 <method name="onDVDDriveChange">
11054 <desc>
11055 Triggered when settings of the DVD drive object of the
11056 associated virtual machine have changed.
11057 </desc>
11058 </method>
11059
11060 <method name="onFloppyDriveChange">
11061 <desc>
11062 Triggered when settings of the floppy drive object of the
11063 associated virtual machine have changed.
11064 </desc>
11065 </method>
11066
11067 <method name="onNetworkAdapterChange">
11068 <desc>
11069 Triggered when settings of a network adapter of the
11070 associated virtual machine have changed.
11071 </desc>
11072 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11073 </method>
11074
11075 <method name="onSerialPortChange">
11076 <desc>
11077 Triggered when settings of a serial port of the
11078 associated virtual machine have changed.
11079 </desc>
11080 <param name="serialPort" type="ISerialPort" dir="in"/>
11081 </method>
11082
11083 <method name="onParallelPortChange">
11084 <desc>
11085 Triggered when settings of a parallel port of the
11086 associated virtual machine have changed.
11087 </desc>
11088 <param name="parallelPort" type="IParallelPort" dir="in"/>
11089 </method>
11090
11091 <method name="onVRDPServerChange">
11092 <desc>
11093 Triggered when settings of the VRDP server object of the
11094 associated virtual machine have changed.
11095 </desc>
11096 </method>
11097
11098 <method name="onUSBControllerChange">
11099 <desc>
11100 Triggered when settings of the USB controller object of the
11101 associated virtual machine have changed.
11102 </desc>
11103 </method>
11104
11105 <method name="onSharedFolderChange">
11106 <desc>
11107 Triggered when a permanent (global or machine) shared folder has been
11108 created or removed.
11109 <note>
11110 We don't pass shared folder parameters in this notification because
11111 the order in which parallel notifications are delivered is not defined,
11112 therefore it could happen that these parameters were outdated by the
11113 time of processing this notification.
11114 </note>
11115 </desc>
11116 <param name="global" type="boolean" dir="in"/>
11117 </method>
11118
11119 <method name="onUSBDeviceAttach">
11120 <desc>
11121 Triggered when a request to capture a USB device (as a result
11122 of matched USB filters or direct call to
11123 <link to="IConsole::attachUSBDevice"/>) has completed.
11124 A @c null @a error object means success, otherwise it
11125 describes a failure.
11126 </desc>
11127 <param name="device" type="IUSBDevice" dir="in"/>
11128 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11129 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11130 </method>
11131
11132 <method name="onUSBDeviceDetach">
11133 <desc>
11134 Triggered when a request to release the USB device (as a result
11135 of machine termination or direct call to
11136 <link to="IConsole::detachUSBDevice"/>) has completed.
11137 A @c null @a error object means success, otherwise it
11138 </desc>
11139 <param name="id" type="uuid" dir="in"/>
11140 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11141 </method>
11142
11143 <method name="onShowWindow">
11144 <desc>
11145 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11146 <link to="IMachine::showConsoleWindow()"/> in order to notify
11147 console callbacks
11148 <link to="IConsoleCallback::onCanShowWindow()"/>
11149 and <link to="IConsoleCallback::onShowWindow()"/>.
11150 </desc>
11151 <param name="check" type="boolean" dir="in"/>
11152 <param name="canShow" type="boolean" dir="out"/>
11153 <param name="winId" type="unsigned long long" dir="out"/>
11154 </method>
11155
11156 <method name="accessGuestProperty">
11157 <desc>
11158 Called by <link to="IMachine::getGuestProperty()"/> and by
11159 <link to="IMachine::setGuestProperty()"/> in order to read and
11160 modify guest properties.
11161 </desc>
11162 <param name="name" type="wstring" dir="in"/>
11163 <param name="value" type="wstring" dir="in"/>
11164 <param name="flags" type="wstring" dir="in"/>
11165 <param name="isSetter" type="boolean" dir="in"/>
11166 <param name="retValue" type="wstring" dir="out"/>
11167 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11168 <param name="retFlags" type="wstring" dir="out"/>
11169 </method>
11170
11171 <method name="enumerateGuestProperties">
11172 <desc>
11173 Return a list of the guest properties matching a set of patterns along
11174 with their values, time stamps and flags.
11175 </desc>
11176 <param name="patterns" type="wstring" dir="in">
11177 <desc>
11178 The patterns to match the properties against as a comma-separated
11179 string. If this is empty, all properties currently set will be
11180 returned.
11181 </desc>
11182 </param>
11183 <param name="key" type="wstring" dir="out" safearray="yes">
11184 <desc>
11185 The key names of the properties returned.
11186 </desc>
11187 </param>
11188 <param name="value" type="wstring" dir="out" safearray="yes">
11189 <desc>
11190 The values of the properties returned. The array entries match the
11191 corresponding entries in the @a key array.
11192 </desc>
11193 </param>
11194 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11195 <desc>
11196 The time stamps of the properties returned. The array entries match
11197 the corresponding entries in the @a key array.
11198 </desc>
11199 </param>
11200 <param name="flags" type="wstring" dir="out" safearray="yes">
11201 <desc>
11202 The flags of the properties returned. The array entries match the
11203 corresponding entries in the @a key array.
11204 </desc>
11205 </param>
11206 </method>
11207
11208 </interface>
11209
11210 <interface
11211 name="ISession" extends="$dispatched"
11212 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11213 wsmap="managed"
11214 >
11215 <desc>
11216 The ISession interface represents a serialization primitive for virtual
11217 machines.
11218
11219 With VirtualBox, every time one wishes to manipulate a virtual machine
11220 (e.g. change its settings or start execution), a session object is
11221 required. Such an object must be passed to one of the session methods
11222 that open the given session, which then initiates the machine manipulation.
11223
11224 A session serves several purposes: it identifies to the inter-process VirtualBox
11225 code which process is currently working with the virtual machine, and it ensures
11226 that there are no incompatible requests from several processes for the
11227 same virtual machine. Session objects can therefore be thought of as mutex
11228 semaphores that lock virtual machines to prevent conflicting accesses from
11229 several processes.
11230
11231 How sessions objects are used depends on whether you use the Main API
11232 via COM or via the webservice:
11233
11234 <ul>
11235 <li>When using the COM API directly, an object of the Session class from the
11236 VirtualBox type library needs to be created. In regular COM C++ client code,
11237 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
11238 This object will then act as a local session object in further calls to open
11239 a session.
11240 </li>
11241
11242 <li>In the webservice, the session manager (IWebsessionManager) instead creates
11243 one session object automatically when <link to="IWebsessionManager::logon" />
11244 is called. A managed object reference to that session object can be retrieved by
11245 calling <link to="IWebsessionManager::getSessionObject" />. This session object
11246 reference can then be used to open sessions.
11247 </li>
11248 </ul>
11249
11250 Sessions are mainly used in two variations:
11251
11252 <ul>
11253 <li>
11254 To start a virtual machine in a separate process, one would call
11255 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
11256 object as its first parameter. This session then identifies the caller
11257 and lets him control the started machine (for example, pause machine
11258 execution or power it down) as well as be notified about machine
11259 execution state changes.
11260 </li>
11261
11262 <li>To alter machine settings, or to start machine execution within the
11263 current process, one needs to open a direct session for the machine first by
11264 calling <link to="IVirtualBox::openSession"/>. While a direct session
11265 is open within one process, no any other process may open another direct
11266 session for the same machine. This prevents the machine from being changed
11267 by other processes while it is running or while the machine is being configured.
11268 </li>
11269 </ul>
11270
11271 One also can attach to an existing direct session already opened by
11272 another process (for example, in order to send a control request to the
11273 virtual machine such as the pause or the reset request). This is done by
11274 calling <link to="IVirtualBox::openExistingSession"/>.
11275
11276 <note>
11277 Unless you are trying to write a new VirtualBox front-end that
11278 performs direct machine execution (like the VirtualBox or VBoxSDL
11279 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
11280 session opened by <link to="IVirtualBox::openSession"/> and use this
11281 session only to change virtual machine settings. If you simply want to
11282 start virtual machine execution using one of the existing front-ends
11283 (for example the VirtualBox GUI or headless server), simply use
11284 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
11285 will power up the machine automatically for you.
11286 </note>
11287 </desc>
11288
11289 <attribute name="state" type="SessionState" readonly="yes">
11290 <desc>Current state of this session.</desc>
11291 </attribute>
11292
11293 <attribute name="type" type="SessionType" readonly="yes">
11294 <desc>
11295 Type of this session. The value of this attribute is valid only
11296 if the session is currently open (i.e. its #state is
11297 SessionType_SessionOpen), otherwise an error will be returned.
11298 </desc>
11299 </attribute>
11300
11301 <attribute name="machine" type="IMachine" readonly="yes">
11302 <desc>Machine object associated with this session.</desc>
11303 </attribute>
11304
11305 <attribute name="console" type="IConsole" readonly="yes">
11306 <desc>Console object associated with this session.</desc>
11307 </attribute>
11308
11309 <method name="close">
11310 <desc>
11311 Closes a session that was previously opened.
11312
11313 It is recommended that every time an "open session" method (such as
11314 <link to="IVirtualBox::openRemoteSession" /> or
11315 <link to="IVirtualBox::openSession" />) has been called to
11316 manipulate a virtual machine, the caller invoke
11317 ISession::close() when it's done doing so. Since sessions are
11318 serialization primitives much like ordinary mutexes, they are
11319 best used the same way: for each "open" call, there should be
11320 a matching "close" call, even when errors occur.
11321
11322 Otherwise, if a direct session for a machine opened with
11323 <link to="IVirtualBox::openSession()"/> is not explicitly closed
11324 when the application terminates, the state of the machine will
11325 be set to <link to="MachineState_Aborted" /> on the server.
11326
11327 Generally, it is recommended to close all open sessions explicitly
11328 before terminating the application (no matter what is the reason of
11329 the termination).
11330
11331 <note>
11332 Do not expect the session state (<link to="ISession::state" />
11333 to return to "Closed" immediately after you invoke
11334 ISession::close(), particularly if you have started a remote
11335 session to execute the VM in a new process. The session state will
11336 automatically return to "Closed" once the VM is no longer executing,
11337 which can of course take a very long time.
11338 </note>
11339 </desc>
11340 </method>
11341
11342 </interface>
11343
11344 <!--
11345 // ISATAController
11346 /////////////////////////////////////////////////////////////////////////
11347 -->
11348
11349 <interface
11350 name="ISATAController" extends="$unknown"
11351 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
11352 wsmap="managed"
11353 >
11354 <attribute name="enabled" type="boolean">
11355 <desc>
11356 Flag whether the SATA controller is present in the
11357 guest system. If disabled, the virtual guest hardware will
11358 not contain any SATA controller. Can only be changed when
11359 the VM is powered off.
11360 </desc>
11361 </attribute>
11362
11363 <attribute name="portCount" type="unsigned long">
11364 <desc>
11365 The number of usable ports on the SATA controller.
11366 It ranges from 1 to 30.
11367 </desc>
11368 </attribute>
11369
11370 <method name="GetIDEEmulationPort">
11371 <desc>Gets the corresponding port number which is emulated as an IDE device.</desc>
11372 <param name="devicePosition" type="long" dir="in"/>
11373 <param name="portNumber" type="long" dir="return"/>
11374 </method>
11375
11376 <method name="SetIDEEmulationPort">
11377 <desc>Sets the port number which is emulated as an IDE device.</desc>
11378 <param name="devicePosition" type="long" dir="in"/>
11379 <param name="portNumber" type="long" dir="in"/>
11380 </method>
11381
11382 </interface>
11383
11384<if target="wsdl">
11385
11386 <!--
11387 // IManagedObjectRef
11388 /////////////////////////////////////////////////////////////////////////
11389 -->
11390
11391 <interface
11392 name="IManagedObjectRef" extends="$unknown"
11393 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
11394 internal="yes"
11395 wsmap="managed"
11396 wscpp="hardcoded"
11397 >
11398 <desc>
11399 Managed object reference.
11400
11401 Only within the webservice, a managed object reference (which is really
11402 an opaque number) allows a webservice client to address an object
11403 that lives in the address space of the webservice server.
11404
11405 Behind each managed object reference, there is a COM object that lives
11406 in the webservice server's address space. The COM object is not freed
11407 until the managed object reference is released, either by an explicit
11408 call to <link to="IManagedObjectRef::release" /> or by logging off from
11409 the webservice (<link to="IWebsessionManager::logoff" />), which releases
11410 all objects created during the webservice session.
11411
11412 Whenever a method call of the VirtualBox API returns a COM object, the
11413 webservice representation of that method will instead return a
11414 managed object reference, which can then be used to invoke methods
11415 on that object.
11416 </desc>
11417
11418 <method name="getInterfaceName">
11419 <desc>
11420 Returns the name of the interface that this managed object represents,
11421 for example, "IMachine", as a string.
11422 </desc>
11423 <param name="return" type="wstring" dir="return"/>
11424 </method>
11425
11426 <method name="release">
11427 <desc>
11428 Releases this managed object reference and frees the resources that
11429 were allocated for it in the webservice server process. After calling
11430 this method, the identifier of the reference can no longer be used.
11431 </desc>
11432 </method>
11433
11434 </interface>
11435
11436 <!--
11437 // IWebsessionManager
11438 /////////////////////////////////////////////////////////////////////////
11439 -->
11440
11441 <interface
11442 name="IWebsessionManager" extends="$unknown"
11443 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
11444 internal="yes"
11445 wsmap="global"
11446 wscpp="hardcoded"
11447 >
11448 <desc>
11449 Websession manager. This provides essential services
11450 to webservice clients.
11451 </desc>
11452 <method name="logon">
11453 <desc>
11454 Logs a new client onto the webservice and returns a managed object reference to
11455 the IVirtualBox instance, which the client can then use as a basis to further
11456 queries, since all calls to the VirtualBox API are based on the IVirtualBox
11457 interface, in one way or the other.
11458 </desc>
11459 <param name="username" type="wstring" dir="in"/>
11460 <param name="password" type="wstring" dir="in"/>
11461 <param name="return" type="IVirtualBox" dir="return"/>
11462 </method>
11463
11464 <method name="getSessionObject">
11465 <desc>
11466 Returns a managed object reference to the internal ISession object that was created
11467 for this web service session when the client logged on.
11468
11469 <see>ISession</see>
11470 </desc>
11471 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11472 <param name="return" type="ISession" dir="return"/>
11473 </method>
11474
11475 <method name="logoff">
11476 <desc>
11477 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
11478 and destroys all resources associated with the session (most importantly, all
11479 managed objects created in the server while the session was active).
11480 </desc>
11481 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11482 </method>
11483
11484 </interface>
11485
11486</if>
11487
11488 <!--
11489 // IPerformanceCollector & friends
11490 /////////////////////////////////////////////////////////////////////////
11491 -->
11492
11493 <interface
11494 name="IPerformanceMetric" extends="$unknown"
11495 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
11496 >
11497 <desc>
11498 The IPerformanceMetric interface represents parameters of the given
11499 performance metric.
11500 </desc>
11501
11502 <attribute name="metricName" type="wstring" readonly="yes">
11503 <desc>
11504 Name of the metric.
11505 </desc>
11506 </attribute>
11507
11508 <attribute name="object" type="$unknown" readonly="yes">
11509 <desc>
11510 Object this metric belongs to.
11511 </desc>
11512 </attribute>
11513
11514 <attribute name="description" type="wstring" readonly="yes">
11515 <desc>
11516 Textual description of the metric.
11517 </desc>
11518 </attribute>
11519
11520 <attribute name="period" type="unsigned long" readonly="yes">
11521 <desc>
11522 Time interval between samples, measured in seconds.
11523 </desc>
11524 </attribute>
11525
11526 <attribute name="count" type="unsigned long" readonly="yes">
11527 <desc>
11528 Number of recent samples retained by the performance collector for this
11529 metric.
11530
11531 When the collected sample count exceeds this number, older samples
11532 are discarded.
11533 </desc>
11534 </attribute>
11535
11536 <attribute name="unit" type="wstring" readonly="yes">
11537 <desc>
11538 Unit of measurement.
11539 </desc>
11540 </attribute>
11541
11542 <attribute name="minimumValue" type="long" readonly="yes">
11543 <desc>
11544 Minimum possible value of this metric.
11545 </desc>
11546 </attribute>
11547
11548 <attribute name="maximumValue" type="long" readonly="yes">
11549 <desc>
11550 Maximum possible value of this metric.
11551 </desc>
11552 </attribute>
11553 </interface>
11554
11555 <interface
11556 name="IPerformanceCollector" extends="$unknown"
11557 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
11558 wsmap="managed"
11559 >
11560 <desc>
11561 The IPerformanceCollector interface represents a service that collects and
11562 stores performance metrics data.
11563
11564 Performance metrics are associated with objects like IHost and
11565 IMachine. Each object has a distinct set of performance metrics.
11566 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
11567
11568 Metric data are collected at the specified intervals and are retained
11569 internally. The interval and the number of samples retained can be set
11570 with <link to="IPerformanceCollector::setupMetrics" />.
11571
11572 Metrics are organized hierarchically, each level separated by slash (/).
11573 General scheme for metric name is
11574 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
11575 metric name stands for: CPU category, Load metric, User submetric, average
11576 aggregate. An aggregate function is computed over all retained data. Valid
11577 aggregate functions are:
11578
11579 <ul>
11580 <li>avg -- average</li>
11581 <li>min -- minimum</li>
11582 <li>max -- maximum</li>
11583 </ul>
11584
11585 "Category/Metric" together form base metric name. A base metric is the
11586 smallest unit for which a sampling interval and the number of retained
11587 samples can be set. Only base metrics can be enabled and disabled. All
11588 sub-metrics are collected when their base metric is collected.
11589 Collected values for any set of sub-metrics can be queried with
11590 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
11591 metric parameters, querying metric data, enabling or disabling metrics
11592 wildcards can be used in metric names to specify a subset of metrics. For
11593 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
11594 averages can be queried using <tt>*:avg</tt> and so on. To query metric
11595 values without aggregates <tt>*:</tt> can be used.
11596
11597 The valid names for base metrics are:
11598
11599 <ul>
11600 <li>CPU/Load</li>
11601 <li>CPU/MHz</li>
11602 <li>RAM/Usage</li>
11603 </ul>
11604
11605 The general sequence for collecting and retrieving the metrics is:
11606 <ul>
11607 <li>
11608 Obtain an instance of IPerformanceCollector with
11609 <link to="IVirtualBox::performanceCollector" />
11610 </li>
11611 <li>
11612 Allocate and populate an array with references to objects the metrics
11613 will be collected for. Use references to IHost and IMachine objects.
11614 </li>
11615 <li>
11616 Allocate and populate an array with base metric names the data will be
11617 collected for.
11618 </li>
11619 <li>
11620 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
11621 metric data will be collected and stored.
11622 </li>
11623 <li>
11624 Wait for the data to get collected.
11625 </li>
11626 <li>
11627 Allocate and populate an array with references to objects the metric
11628 values will be queried for. You can re-use the object array used for
11629 setting base metrics.
11630 </li>
11631 <li>
11632 Allocate and populate an array with metric names the data will be
11633 collected for. Note that metric names differ from base metric names.
11634 </li>
11635 <li>
11636 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
11637 have been collected so far are returned. Note that the values are still
11638 retained internally and data collection continues.
11639 </li>
11640 </ul>
11641
11642 For an example of usage refer to the following files in VirtualBox SDK:
11643 <ul>
11644 <li>
11645 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
11646 </li>
11647 <li>
11648 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
11649 </li>
11650 </ul>
11651 </desc>
11652
11653 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
11654 <desc>
11655 Array of unique names of metrics.
11656
11657 This array represents all metrics supported by the performance
11658 collector. Individual objects do not necessarily support all of them.
11659 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
11660 list of supported metrics for a particular object.
11661 </desc>
11662 </attribute>
11663
11664 <method name="getMetrics">
11665 <desc>
11666 Returns parameters of specified metrics for a set of objects.
11667 <note>
11668 @c Null metrics array means all metrics. @c Null object array means
11669 all existing objects.
11670 </note>
11671 </desc>
11672 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11673 <desc>
11674 Metric name filter. Currently, only a comma-separated list of metrics
11675 is supported.
11676 </desc>
11677 </param>
11678 <param name="objects" type="$unknown" dir="in" safearray="yes">
11679 <desc>
11680 Set of objects to return metric parameters for.
11681 </desc>
11682 </param>
11683 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
11684 <desc>
11685 Array of returned metric parameters.
11686 </desc>
11687 </param>
11688 </method>
11689
11690 <method name="setupMetrics">
11691 <desc>
11692 Sets parameters of specified base metrics for a set of objects. Returns
11693 an array of <link to="IPerformanceMetric" /> describing the metrics have
11694 been affected.
11695 <note>
11696 @c Null or empty metric name array means all metrics. @c Null or empty
11697 object array means all existing objects. If metric name array contains
11698 a single element and object array contains many, the single metric
11699 name array element is applied to each object array element to form
11700 metric/object pairs.
11701 </note>
11702 </desc>
11703 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11704 <desc>
11705 Metric name filter. Comma-separated list of metrics with wildcard
11706 support.
11707 </desc>
11708 </param>
11709 <param name="objects" type="$unknown" dir="in" safearray="yes">
11710 <desc>
11711 Set of objects to setup metric parameters for.
11712 </desc>
11713 </param>
11714 <param name="period" type="unsigned long" dir="in">
11715 <desc>
11716 Time interval in seconds between two consecutive samples of performance
11717 data.
11718 </desc>
11719 </param>
11720 <param name="count" type="unsigned long" dir="in">
11721 <desc>
11722 Number of samples to retain in performance data history. Older samples
11723 get discarded.
11724 </desc>
11725 </param>
11726 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11727 <desc>
11728 Array of metrics that have been modified by the call to this method.
11729 </desc>
11730 </param>
11731 </method>
11732
11733 <method name="enableMetrics">
11734 <desc>
11735 Turns on collecting specified base metrics. Returns an array of
11736 <link to="IPerformanceMetric" /> describing the metrics have been
11737 affected.
11738 <note>
11739 @c Null or empty metric name array means all metrics. @c Null or empty
11740 object array means all existing objects. If metric name array contains
11741 a single element and object array contains many, the single metric
11742 name array element is applied to each object array element to form
11743 metric/object pairs.
11744 </note>
11745 </desc>
11746 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11747 <desc>
11748 Metric name filter. Comma-separated list of metrics with wildcard
11749 support.
11750 </desc>
11751 </param>
11752 <param name="objects" type="$unknown" dir="in" safearray="yes">
11753 <desc>
11754 Set of objects to enable metrics for.
11755 </desc>
11756 </param>
11757 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11758 <desc>
11759 Array of metrics that have been modified by the call to this method.
11760 </desc>
11761 </param>
11762 </method>
11763
11764 <method name="disableMetrics">
11765 <desc>
11766 Turns off collecting specified base metrics. Returns an array of
11767 <link to="IPerformanceMetric" /> describing the metrics have been
11768 affected.
11769 <note>
11770 @c Null or empty metric name array means all metrics. @c Null or empty
11771 object array means all existing objects. If metric name array contains
11772 a single element and object array contains many, the single metric
11773 name array element is applied to each object array element to form
11774 metric/object pairs.
11775 </note>
11776 </desc>
11777 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11778 <desc>
11779 Metric name filter. Comma-separated list of metrics with wildcard
11780 support.
11781 </desc>
11782 </param>
11783 <param name="objects" type="$unknown" dir="in" safearray="yes">
11784 <desc>
11785 Set of objects to disable metrics for.
11786 </desc>
11787 </param>
11788 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
11789 <desc>
11790 Array of metrics that have been modified by the call to this method.
11791 </desc>
11792 </param>
11793 </method>
11794
11795 <method name="queryMetricsData">
11796 <desc>
11797 Queries collected metrics data for a set of objects.
11798
11799 The data itself and related metric information are returned in seven
11800 parallel and one flattened array of arrays. Elements of
11801 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
11802 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
11803 the same index describe one set of values corresponding to a single
11804 metric.
11805
11806 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
11807 start and length of a sub-array is indicated by
11808 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
11809 value for metric <tt>metricNames[i]</tt> is at
11810 <tt>returnData[returnIndices[i]]</tt>.
11811
11812 <note>
11813 @c Null or empty metric name array means all metrics. @c Null or empty
11814 object array means all existing objects. If metric name array contains
11815 a single element and object array contains many, the single metric
11816 name array element is applied to each object array element to form
11817 metric/object pairs.
11818 </note>
11819 <note>
11820 Data collection continues behind the scenes after call to @c
11821 queryMetricsData. The return data can be seen as the snapshot of
11822 the current state at the time of @c queryMetricsData call. The
11823 internally kept metric values are not cleared by the call. This makes
11824 possible querying different subsets of metrics or aggregates with
11825 subsequent calls. If periodic querying is needed it is highly
11826 suggested to query the values with @c interval*count period to avoid
11827 confusion. This way a completely new set of data values will be
11828 provided by each query.
11829 </note>
11830 </desc>
11831 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11832 <desc>
11833 Metric name filter. Comma-separated list of metrics with wildcard
11834 support.
11835 </desc>
11836 </param>
11837 <param name="objects" type="$unknown" dir="in" safearray="yes">
11838 <desc>
11839 Set of objects to query metrics for.
11840 </desc>
11841 </param>
11842 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
11843 <desc>
11844 Names of metrics returned in @c returnData.
11845 </desc>
11846 </param>
11847 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
11848 <desc>
11849 Objects associated with metrics returned in @c returnData.
11850 </desc>
11851 </param>
11852 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
11853 <desc>
11854 Units of measurement for each returned metric.
11855 </desc>
11856 </param>
11857 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
11858 <desc>
11859 Divisor that should be applied to return values in order to get
11860 floating point values. For example:
11861 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
11862 will retrieve the floating point value of i-th sample of the first
11863 metric.
11864 </desc>
11865 </param>
11866 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
11867 <desc>
11868 Sequence numbers of the first elements of value sequences of particular metrics
11869 returned in @c returnData. For aggregate metrics it is the sequence number of
11870 the sample the aggregate started calculation from.
11871 </desc>
11872 </param>
11873 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
11874 <desc>
11875 Indices of the first elements of value sequences of particular metrics
11876 returned in @c returnData.
11877 </desc>
11878 </param>
11879 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
11880 <desc>
11881 Lengths of value sequences of particular metrics.
11882 </desc>
11883 </param>
11884 <param name="returnData" type="long" dir="return" safearray="yes">
11885 <desc>
11886 Flattened array of all metric data containing sequences of values for
11887 each metric.
11888 </desc>
11889 </param>
11890 </method>
11891
11892 </interface>
11893
11894 <module name="VBoxSVC" context="LocalServer">
11895 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
11896 namespace="virtualbox.org">
11897 <interface name="IVirtualBox" default="yes"/>
11898 </class>
11899 </module>
11900
11901 <module name="VBoxC" context="InprocServer" threadingModel="Free">
11902 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
11903 namespace="virtualbox.org">
11904 <interface name="ISession" default="yes"/>
11905 </class>
11906 </module>
11907
11908</library>
11909
11910</idl>
11911
11912<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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