VirtualBox

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

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

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

  • use VBOX_E_OBJECT_NOT_FOUND instead of VBOX_E_FILE_ERROR in findMachine() and update documentation accordingly.
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 442.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * $Id: VirtualBox.xidl 16040 2009-01-19 11:11:12Z vboxsync $ *
5 *
6 * :tabSize=2:indentSize=2:noTabs=true:
7 * :folding=explicit:collapseFolds=1:
8 *
9 * Master declaration for VirtualBox's Main API, represented
10 * by COM/XPCOM and web service interfaces.
11 *
12 * From this document, the build system generates several files
13 * via XSLT that are then used during the build process.
14 *
15 * Below is the list of XSL templates that operate on this file and
16 * output files they generate. These XSL templates must be updated
17 * whenever the schema of this file changes:
18 *
19 * 1. src/VBox/Main/idl/midl.xsl =>
20 * out/<platform>/bin/sdk/idl/VirtualBox.idl
21 * (MS COM interface definition file for Main API)
22 *
23 * 2. src/VBox/Main/idl/xpidl.xsl =>
24 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
25 * (XPCOM interface definition file for Main API)
26 *
27 * 3. src/VBox/Main/idl/doxygen.xsl =>
28 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
29 * (pseudo-IDL for Doxygen to generate the official Main API
30 * documentation)
31 *
32 * 4. src/VBox/Main/webservice/*.xsl =>
33 * a bunch of WSDL and C++ files
34 * (VirtualBox web service sources and SOAP mappers;
35 * see src/VBox/Main/webservice/Makefile.kmk for details)
36 *
37 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
38 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
39 * (smart Qt-based C++ wrapper classes for COM interfaces
40 * of the Main API)
41 *
42 * 6. src/VBox/Frontends/VirtualBox4/include/COMWrappers.xsl =>
43 * out/<platform>/obj/src/VBox/Frontends/VirtualBox4/VirtualBox/include/COMWrappers.h
44 * (smart Qt-based C++ wrapper classes for COM interfaces
45 * of the Main API)
46 *
47 * 7. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
48 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
49 * (Main API TypeLib block for the WiX installer)
50 *
51 * 8. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
52 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
53 * (<result> extraction for the %Rhrc format specifier)
54 *
55 Copyright (C) 2006-2008 Sun Microsystems, Inc.
56
57 This file is part of VirtualBox Open Source Edition (OSE), as
58 available from http://www.virtualbox.org. This file is free software;
59 you can redistribute it and/or modify it under the terms of the GNU
60 General Public License (GPL) as published by the Free Software
61 Foundation, in version 2 as it comes in the "COPYING" file of the
62 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
63 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
64
65 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
66 Clara, CA 95054 USA or visit http://www.sun.com if you need
67 additional information or have any questions.
68-->
69
70<idl>
71
72<desc>
73 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
74 describes the so-called <i>VirtualBox Main API</i> which comprises all public
75 COM interfaces and components provided by the VirtualBox server and by the
76 VirtualBox client library.
77
78 VirtualBox employs a client-server design, meaning that whenever any part of
79 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
80 interface or any virtual machine --, a dedicated server process named
81 VBoxSVC runs in the background. This allows multiple processes working with
82 VirtualBox to cooperate without conflicts. These processes communicate to each
83 other using inter-process communication facilities provided by the COM
84 implementation of the host computer.
85
86 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
87 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
88 implementation, is used.
89
90 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
91 the VBoxManage command-line interface and the VBoxVRDP server) are technically
92 front-ends to the Main API and only use the interfaces that are documented
93 in this Main API documentation. This ensures that, with any given release
94 version of VirtualBox, all capabilities of the product that could be useful
95 to an external client program are always exposed by way of this API.
96
97 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
98 contains two public component classes:
99 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
100 implement IVirtualBox and ISession interfaces respectively. These two classes
101 are of supreme importance and will be needed in order for any front-end
102 program to do anything useful. It is recommended to read the documentation of
103 the mentioned interfaces first.
104
105 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
106 there can be only one object of this class on the local machine at any given
107 time. This object is a parent of many other objects in the VirtualBox COM
108 library and lives in the VBoxSVC process. In fact, when you create an instance
109 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
110 process is already running, starts it if not, and returns you a reference to
111 the<tt>VirtualBox</tt> object created in this process. When the last reference
112 to this object is released, the VBoxSVC process ends (with a 5 second delay to
113 protect from too frequent restarts).
114
115 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
116 as many <tt>Session</tt> objects as you need but all of them will live in a
117 process which issues the object instantiation call. <tt>Session</tt> objects
118 represent virtual machine sessions which are used to configure virtual
119 machines and control their execution.
120</desc>
121
122<if target="midl">
123 <cpp line="enum {"/>
124 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
125 <cpp line=" kTypeLibraryMinorVersion = 0"/>
126 <cpp line="};"/>
127</if>
128
129<if target="xpidl">
130 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
131 <cpp>
132/* currently, nsISupportsImpl.h lacks the below-like macros */
133
134#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
135#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
142 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
150 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
151#endif
152
153#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
154# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
155 NS_INTERFACE_MAP_BEGIN(_class) \
156 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
157 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
158 NS_IMPL_QUERY_CLASSINFO(_class) \
159 NS_INTERFACE_MAP_END
160#endif
161
162#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
163# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
164 _i2, _ic2) \
165 NS_INTERFACE_MAP_BEGIN(_class) \
166 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
167 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
169 NS_IMPL_QUERY_CLASSINFO(_class) \
170 NS_INTERFACE_MAP_END
171#endif
172
173#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
174#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
175
176#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
177# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
178 NS_IMPL_THREADSAFE_ADDREF(_class) \
179 NS_IMPL_THREADSAFE_RELEASE(_class) \
180 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
181 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
182#endif
183
184#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
185# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
186 _i2, _ic2) \
187 NS_IMPL_THREADSAFE_ADDREF(_class) \
188 NS_IMPL_THREADSAFE_RELEASE(_class) \
189 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
190 _i2, _ic2) \
191 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
192#endif
193 </cpp>
194</if>
195
196<library
197 name="VirtualBox"
198 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
199 version="1.3"
200 desc="VirtualBox Type Library"
201 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
202 supportsErrorInfo="yes"
203>
204
205
206 <!--
207 // COM result codes for VirtualBox
208 /////////////////////////////////////////////////////////////////////////
209 -->
210
211 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
212 <desc>
213 This section describes all VirtualBox-specific COM result codes that may
214 be returned by methods of VirtualBox COM interfaces in addition to
215 standard COM result codes.
216
217 Note that along with the result code, every VirtualBox method returns
218 extended error information through the IVirtualBoxErrorInfo interface on
219 failure. This interface is a preferred way to present the error to the end
220 user because it contains a human readable description of the error. Raw
221 result codes, both standard and described in this section, are intended to
222 be used by programs to analyze the reason of a failure and select an
223 appropriate course of action without involving the end user (for example,
224 retry the operation later or make a different call).
225
226 The standard COM result codes that may originate from our methods include:
227
228 <table>
229 <tr><td>E_INVALIDARG</td>
230 <td>
231 Returned when the value of the method's argument is not within the range
232 of valid values. This should not be confused with situations when the
233 value is within the range but simply doesn't suit the current object
234 state and there is a possibility that it will be accepted later (in such
235 cases VirtualBox-specific codes are returned, for example,
236 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
237 </td>
238 </tr>
239 <tr><td>E_POINTER</td>
240 <td>
241 Returned if a memory pointer for the output argument is invalid (for
242 example, <tt>NULL</tt>). Note that when pointers representing input
243 arguments (such as strings) are invalid, E_INVALIDARG is returned.
244 </td>
245 </tr>
246 <tr><td>E_ACCESSDENIED</td>
247 <td>
248 Returned when the called object is not ready. Since the lifetime of a
249 public COM object cannot be fully controlled by the implementation,
250 VirtualBox maintains the readiness state for all objects it creates and
251 returns this code in response to any method call on the object that was
252 deactivated by VirtualBox and is not functioning any more.
253 </td>
254 </tr>
255 <tr><td>E_OUTOFMEMORY</td>
256 <td>
257 Returned when a memory allocation operation fails.
258 </td>
259 </tr>
260 </table>
261 </desc>
262 </descGroup>
263
264 <!--
265 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
266 everything in <result>/<desc> after (and including) the first dot, so express
267 the matter of the error code in the first sentence and keep it short.
268 -->
269
270 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
271 <desc>
272 Object corresponding to the supplied arguments does not exist.
273 </desc>
274 </result>
275
276 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
277 <desc>
278 Current virtual machine state prevents the operation.
279 </desc>
280 </result>
281
282 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
283 <desc>
284 Virtual machine error occurred attempting the operation.
285 </desc>
286 </result>
287
288 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
289 <desc>
290 File not accessible or erroneous file contents.
291 </desc>
292 </result>
293
294 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
295 <desc>
296 Runtime subsystem error.
297 </desc>
298 </result>
299
300 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
301 <desc>
302 Pluggable Device Manager error.
303 </desc>
304 </result>
305
306 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
307 <desc>
308 Current object state prohibits operation.
309 </desc>
310 </result>
311
312 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
313 <desc>
314 Host operating system related error.
315 </desc>
316 </result>
317
318 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
319 <desc>
320 Requested operation is not supported.
321 </desc>
322 </result>
323
324 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
325 <desc>
326 Invalid XML found.
327 </desc>
328 </result>
329
330 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
331 <desc>
332 Current session state prohibits operation.
333 </desc>
334 </result>
335
336 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
337 <desc>
338 Object being in use prohibits operation.
339 </desc>
340 </result>
341
342 <!--
343 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
344 everything in <result>/<desc> after (and including) the first dot, so express
345 the matter of the error code in the first sentence and keep it short.
346 -->
347
348 <descGroup/>
349
350 <!--
351 // all common enums
352 /////////////////////////////////////////////////////////////////////////
353 -->
354
355 <enum
356 name="TSBool"
357 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
358 >
359 <desc>
360 Boolean variable having a third state, default.
361 </desc>
362
363 <const name="False" value="0"/>
364 <const name="True" value="1"/>
365 <const name="Default" value="2"/>
366 </enum>
367
368 <enum
369 name="MachineState"
370 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
371 >
372 <desc>
373 Virtual machine execution state.
374
375 This enumeration represents possible values of the <link
376 to="IMachine::state"/> attribute.
377
378 Below is the basic virtual machine state diagram. It shows how the state
379 changes during virtual machine execution. The text in square braces shows
380 a method of the IConsole interface that performs the given state
381 transition.
382
383 <pre>
384 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
385 V |
386 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
387 | | | | V |
388 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
389 | | ^ | ^ |
390 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
391 | ^ | | | |
392 | | +-----------------------------------------+-|-------------------+ +
393 | | | | |
394 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
395 | | | |
396 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
397 | | |
398 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
399 </pre>
400
401 Note that states to the right from PoweredOff, Aborted and Saved in the
402 above diagram are called <i>online VM states</i>. These states
403 represent the virtual machine which is being executed in a dedicated
404 process (usually with a GUI window attached to it where you can see the
405 activity of the virtual machine and interact with it). There are two
406 special pseudo-states, FirstOnline and LastOnline, that can be used in
407 relational expressions to detect if the given machine state is online or
408 not:
409
410 <pre>
411 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
412 machine.GetState() &lt;= MachineState_LastOnline)
413 {
414 ...the machine is being executed...
415 }
416 </pre>
417
418 When the virtual machine is in one of the online VM states (that is, being
419 executed), only a few machine settings can be modified. Methods working
420 with such settings contain an explicit note about that. An attempt to
421 change any oter setting or perform a modifying operation during this time
422 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
423
424 All online states except Running, Paused and Stuck are transitional: they
425 represent temporary conditions of the virtual machine that will last as
426 long as the operation that initiated such a condition.
427
428 The Stuck state is a special case. It means that execution of the machine
429 has reached the "Guru Meditation" condition. This condition indicates an
430 internal VMM (virtual machine manager) failure which may happen as a
431 result of either an unhandled low-level virtual hardware exception or one
432 of the recompiler exceptions (such as the <i>too-many-traps</i>
433 condition).
434
435 Note also that any online VM state may transit to the Aborted state. This
436 happens if the process that is executing the virtual machine terminates
437 unexpectedly (for example, crashes). Other than that, the Aborted state is
438 equivalent to PoweredOff.
439
440 There are also a few additional state diagrams that do not deal with
441 virtual machine execution and therefore are shown separately. The states
442 shown on these diagrams are called <i>offline VM states</i> (this includes
443 PoweredOff, Aborted and Saved too).
444
445 The first diagram shows what happens when a lengthy setup operation is
446 being executed (such as <link to="IMachine::attachHardDisk2()"/>).
447
448 <pre>
449 +-----------------------------------(same sate as before the call)------+
450 | |
451 +-&gt; PoweredOff --+ |
452 | | |
453 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
454 | |
455 +-&gt; Saved -------+
456 </pre>
457
458 The next two diagrams demonstrate the process of taking a snapshot of a
459 powered off virtual machine and performing one of the "discard..."
460 operations, respectively.
461
462 <pre>
463 +-----------------------------------(same sate as before the call)------+
464 | |
465 +-&gt; PoweredOff --+ |
466 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
467 +-&gt; Aborted -----+
468
469 +-&gt; PoweredOff --+
470 | |
471 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
472 | | [discardCurrentState()] |
473 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
474 | |
475 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
476 </pre>
477
478 Note that the Saving state is present in both the offline state group and
479 online state group. Currently, the only way to determine what group is
480 assumed in a particular case is to remember the previous machine state: if
481 it was Running or Paused, then Saving is an online state, otherwise it is
482 an offline state. This inconsistency may be removed in one of the future
483 versions of VirtualBox by adding a new state.
484
485 <note internal="yes">
486 For whoever decides to touch this enum: In order to keep the
487 comparisons involving FirstOnline and LastOnline pseudo-states valid,
488 the numeric values of these states must be correspondingly updated if
489 needed: for any online VM state, the condition
490 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
491 <tt>true</tt>. The same relates to transient states for which
492 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
493 <tt>true</tt>.
494 </note>
495 </desc>
496
497 <const name="Null" value="0">
498 <desc>Null value (nver used by the API).</desc>
499 </const>
500 <const name="PoweredOff" value="1">
501 <desc>
502 The machine is not running.
503 </desc>
504 </const>
505 <const name="Saved" value="2">
506 <desc>
507 The machine is not currently running, but the execution state of the machine
508 has been saved to an external file when it was running.
509 </desc>
510 </const>
511 <const name="Aborted" value="3">
512 <desc>
513 The process running the machine has terminated abnormally.
514 </desc>
515 </const>
516 <const name="Running" value="4">
517 <desc>
518 The machine is currently being executed.
519 <note internal="yes">
520 For whoever decides to touch this enum: In order to keep the
521 comparisons in the old source code valid, this state must immediately
522 precede the Paused state.
523 </note>
524 </desc>
525 </const>
526 <const name="Paused" value="5">
527 <desc>
528 Execution of the machine has been paused.
529 <note internal="yes">
530 For whoever decides to touch this enum: In order to keep the
531 comparisons in the old source code valid, this state must immediately
532 follow the Running state.
533 </note>
534 </desc>
535 </const>
536 <const name="Stuck" value="6">
537 <desc>
538 Execution of the machine has reached the "Guru Meditation"
539 condition.
540 </desc>
541 </const>
542 <const name="Starting" value="7">
543 <desc>
544 Machine is being started after powering it on from a
545 zero execution state.
546 </desc>
547 </const>
548 <const name="Stopping" value="8">
549 <desc>
550 Machine is being normally stopped powering it off, or after the guest OS
551 has initiated a shutdown sequence.
552 </desc>
553 </const>
554 <const name="Saving" value="9">
555 <desc>
556 Machine is saving its execution state to a file or an online
557 snapshot of the machine is being taken.
558 </desc>
559 </const>
560 <const name="Restoring" value="10">
561 <desc>
562 Execution state of the machine is being restored from a file
563 after powering it on from the saved execution state.
564 </desc>
565 </const>
566 <const name="Discarding" value="11">
567 <desc>
568 Snapshot of the machine is being discarded.
569 </desc>
570 </const>
571 <const name="SettingUp" value="12">
572 <desc>
573 Lengthy setup operation is in progress.
574 </desc>
575 </const>
576
577 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
578 <desc>
579 Pseudo-state: first online state (for use in relational expressions).
580 </desc>
581 </const>
582 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
583 <desc>
584 Pseudo-state: last online state (for use in relational expressions).
585 </desc>
586 </const>
587
588 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
589 <desc>
590 Pseudo-state: first transient state (for use in relational expressions).
591 </desc>
592 </const>
593 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
594 <desc>
595 Pseudo-state: last transient state (for use in relational expressions).
596 </desc>
597 </const>
598
599 </enum>
600
601 <enum
602 name="SessionState"
603 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
604 >
605 <desc>
606 Session state. This enumeration represents possible values of
607 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
608 attributes. See individual enumerator descriptions for the meaning for
609 every value.
610 </desc>
611
612 <const name="Null" value="0">
613 <desc>Null value (never used by the API).</desc>
614 </const>
615 <const name="Closed" value="1">
616 <desc>
617 The machine has no open sessions (<link to="IMachine::sessionState"/>);
618 the session is closed (<link to="ISession::state"/>)
619 </desc>
620 </const>
621 <const name="Open" value="2">
622 <desc>
623 The machine has an open direct session (<link to="IMachine::sessionState"/>);
624 the session is open (<link to="ISession::state"/>)
625 </desc>
626 </const>
627 <const name="Spawning" value="3">
628 <desc>
629 A new (direct) session is being opened for the machine
630 as a result of <link to="IVirtualBox::openRemoteSession()"/>
631 call (<link to="IMachine::sessionState"/>);
632 the session is currently being opened
633 as a result of <link to="IVirtualBox::openRemoteSession()"/>
634 call (<link to="ISession::state"/>)
635 </desc>
636 </const>
637 <const name="Closing" value="4">
638 <desc>
639 The direct session is being closed (<link to="IMachine::sessionState"/>);
640 the session is being closed (<link to="ISession::state"/>)
641 </desc>
642 </const>
643 </enum>
644
645 <enum
646 name="SessionType"
647 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
648 >
649 <desc>
650 Session type. This enumeration represents possible values of the
651 <link to="ISession::type"/> attribute.
652 </desc>
653
654 <const name="Null" value="0">
655 <desc>Null value (never used by the API).</desc>
656 </const>
657 <const name="Direct" value="1">
658 <desc>
659 Direct session
660 (opened by <link to="IVirtualBox::openSession()"/>)
661 </desc>
662 </const>
663 <const name="Remote" value="2">
664 <desc>
665 Remote session
666 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
667 </desc>
668 </const>
669 <const name="Existing" value="3">
670 <desc>
671 Existing session
672 (opened by <link to="IVirtualBox::openExistingSession()"/>)
673 </desc>
674 </const>
675 </enum>
676
677 <enum
678 name="DeviceType"
679 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
680 >
681 <desc>
682 Device type.
683 </desc>
684 <const name="Null" value="0">
685 <desc>
686 Null value, may also mean "no device" (not allowed for
687 <link to="IConsole::getDeviceActivity"/>).
688 </desc>
689 </const>
690 <const name="Floppy" value="1">
691 <desc>Floppy device.</desc>
692 </const>
693 <const name="DVD" value="2">
694 <desc>CD/DVD-ROM device.</desc>
695 </const>
696 <const name="HardDisk" value="3">
697 <desc>Hard disk device.</desc>
698 </const>
699 <const name="Network" value="4">
700 <desc>Network device.</desc>
701 </const>
702 <const name="USB" value="5">
703 <desc>USB device.</desc>
704 </const>
705 <const name="SharedFolder" value="6">
706 <desc>Shared folder device.</desc>
707 </const>
708 </enum>
709
710 <enum
711 name="DeviceActivity"
712 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
713 >
714 <desc>
715 Device activity for <link to="IConsole::getDeviceActivity"/>.
716 </desc>
717
718 <const name="Null" value="0"/>
719 <const name="Idle" value="1"/>
720 <const name="Reading" value="2"/>
721 <const name="Writing" value="3"/>
722 </enum>
723
724 <enum
725 name="StorageBus"
726 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
727 >
728 <desc>Interface bus type for storage devices.</desc>
729
730 <const name="Null" value="0">
731 <desc>Null value (never used by the API).</desc>
732 </const>
733
734 <const name="IDE" value="1"/>
735 <const name="SATA" value="2"/>
736 </enum>
737
738 <enum
739 name="ClipboardMode"
740 uuid="33364716-4008-4701-8f14-be0fa3d62950"
741 >
742 <desc>
743 Host-Guest clipboard interchange mode.
744 </desc>
745
746 <const name="Disabled" value="0"/>
747 <const name="HostToGuest" value="1"/>
748 <const name="GuestToHost" value="2"/>
749 <const name="Bidirectional" value="3"/>
750 </enum>
751
752 <enum
753 name="Scope"
754 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
755 >
756 <desc>
757 Scope of the operation.
758
759 A generic enumeration used in various methods to define the action or
760 argument scope.
761 </desc>
762
763 <const name="Global" value="0"/>
764 <const name="Machine" value="1"/>
765 <const name="Session" value="2"/>
766 </enum>
767
768 <enum
769 name="GuestStatisticType"
770 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
771 >
772 <desc>
773 Statistics type for <link to="IGuest::getStatistic"/>.
774 </desc>
775
776 <const name="CPULoad_Idle" value="0">
777 <desc>
778 Idle CPU load (0-100%) for last interval.
779 </desc>
780 </const>
781 <const name="CPULoad_Kernel" value="1">
782 <desc>
783 Kernel CPU load (0-100%) for last interval.
784 </desc>
785 </const>
786 <const name="CPULoad_User" value="2">
787 <desc>
788 User CPU load (0-100%) for last interval.
789 </desc>
790 </const>
791 <const name="Threads" value="3">
792 <desc>
793 Total number of threads in the system.
794 </desc>
795 </const>
796 <const name="Processes" value="4">
797 <desc>
798 Total number of processes in the system.
799 </desc>
800 </const>
801 <const name="Handles" value="5">
802 <desc>
803 Total number of handles in the system.
804 </desc>
805 </const>
806 <const name="MemoryLoad" value="6">
807 <desc>
808 Memory load (0-100%).
809 </desc>
810 </const>
811 <const name="PhysMemTotal" value="7">
812 <desc>
813 Total physical memory in megabytes.
814 </desc>
815 </const>
816 <const name="PhysMemAvailable" value="8">
817 <desc>
818 Free physical memory in megabytes.
819 </desc>
820 </const>
821 <const name="PhysMemBalloon" value="9">
822 <desc>
823 Ballooned physical memory in megabytes.
824 </desc>
825 </const>
826 <const name="MemCommitTotal" value="10">
827 <desc>
828 Total amount of memory in the committed state in megabytes.
829 </desc>
830 </const>
831 <const name="MemKernelTotal" value="11">
832 <desc>
833 Total amount of memory used by the guest OS's kernel in megabytes.
834 </desc>
835 </const>
836 <const name="MemKernelPaged" value="12">
837 <desc>
838 Total amount of paged memory used by the guest OS's kernel in megabytes.
839 </desc>
840 </const>
841 <const name="MemKernelNonpaged" value="13">
842 <desc>
843 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
844 </desc>
845 </const>
846 <const name="MemSystemCache" value="14">
847 <desc>
848 Total amount of memory used by the guest OS's system cache in megabytes.
849 </desc>
850 </const>
851 <const name="PageFileSize" value="15">
852 <desc>
853 Pagefile size in megabytes.
854 </desc>
855 </const>
856 <const name="SampleNumber" value="16">
857 <desc>
858 Statistics sample number
859 </desc>
860 </const>
861 <const name="MaxVal" value="17"/>
862 </enum>
863
864 <enum
865 name="BIOSBootMenuMode"
866 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
867 >
868 <desc>
869 BIOS boot menu mode.
870 </desc>
871
872 <const name="Disabled" value="0"/>
873 <const name="MenuOnly" value="1"/>
874 <const name="MessageAndMenu" value="2"/>
875 </enum>
876
877 <enum
878 name="IDEControllerType"
879 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
880 >
881 <desc>
882 IDE controller type.
883 </desc>
884
885 <const name="Null" value="0">
886 <desc>Null value (never used by the API).</desc>
887 </const>
888 <const name="PIIX3" value="1"/>
889 <const name="PIIX4" value="2"/>
890 </enum>
891
892 <enum
893 name="DriveState"
894 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
895 >
896 <const name="Null" value="0">
897 <desc>Null value (never used by the API).</desc>
898 </const>
899 <const name="NotMounted" value="1"/>
900 <const name="ImageMounted" value="2"/>
901 <const name="HostDriveCaptured" value="3"/>
902 </enum>
903
904 <enum
905 name="ProcessorFeature"
906 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
907 >
908 <desc>
909 CPU features.
910 </desc>
911
912 <const name="HWVirtEx" value="0"/>
913 <const name="PAE" value="1"/>
914 <const name="LongMode" value="2"/>
915 </enum>
916
917
918 <!--
919 // IVirtualBoxErrorInfo
920 /////////////////////////////////////////////////////////////////////////
921 -->
922
923 <interface
924 name="IVirtualBoxErrorInfo" extends="$errorinfo"
925 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
926 supportsErrorInfo="no"
927 wsmap="suppress"
928 >
929 <desc>
930 The IVirtualBoxErrorInfo interface represents extended error information.
931
932 Extended error information can be set by VirtualBox components after
933 unsuccessful or partially successful method invocation. This information
934 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
935 and then shown to the client in addition to the plain 32-bit result code.
936
937 In MS COM, this interface extends the IErrorInfo interface,
938 in XPCOM, it extends the nsIException interface. In both cases,
939 it provides a set of common attributes to retrieve error
940 information.
941
942 Sometimes invocation of some component's method may involve methods of
943 other components that may also fail (independently of this method's
944 failure), or a series of non-fatal errors may precede a fatal error that
945 causes method failure. In cases like that, it may be desirable to preserve
946 information about all errors happened during method invocation and deliver
947 it to the caller. The <link to="#next"/> attribute is intended
948 specifically for this purpose and allows to represent a chain of errors
949 through a single IVirtualBoxErrorInfo object set after method invocation.
950
951 Note that errors are stored to a chain in the reverse order, i.e. the
952 initial error object you query right after method invocation is the last
953 error set by the callee, the object it points to in the @a next attribute
954 is the previous error and so on, up to the first error (which is the last
955 in the chain).
956 </desc>
957
958 <attribute name="resultCode" type="result" readonly="yes">
959 <desc>
960 Result code of the error.
961 Usually, it will be the same as the result code returned
962 by the method that provided this error information, but not
963 always. For example, on Win32, CoCreateInstance() will most
964 likely return E_NOINTERFACE upon unsuccessful component
965 instantiation attempt, but not the value the component factory
966 returned.
967 <note>
968 In MS COM, there is no equivalent.
969 In XPCOM, it is the same as nsIException::result.
970 </note>
971 </desc>
972 </attribute>
973
974 <attribute name="interfaceID" type="uuid" readonly="yes">
975 <desc>
976 UUID of the interface that defined the error.
977 <note>
978 In MS COM, it is the same as IErrorInfo::GetGUID.
979 In XPCOM, there is no equivalent.
980 </note>
981 </desc>
982 </attribute>
983
984 <attribute name="component" type="wstring" readonly="yes">
985 <desc>
986 Name of the component that generated the error.
987 <note>
988 In MS COM, it is the same as IErrorInfo::GetSource.
989 In XPCOM, there is no equivalent.
990 </note>
991 </desc>
992 </attribute>
993
994 <attribute name="text" type="wstring" readonly="yes">
995 <desc>
996 Text description of the error.
997 <note>
998 In MS COM, it is the same as IErrorInfo::GetDescription.
999 In XPCOM, it is the same as nsIException::message.
1000 </note>
1001 </desc>
1002 </attribute>
1003
1004 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1005 <desc>
1006 Next error object if there is any, or @c null otherwise.
1007 <note>
1008 In MS COM, there is no equivalent.
1009 In XPCOM, it is the same as nsIException::inner.
1010 </note>
1011 </desc>
1012 </attribute>
1013
1014 </interface>
1015
1016
1017 <!--
1018 // IVirtualBox
1019 /////////////////////////////////////////////////////////////////////////
1020 -->
1021
1022 <interface
1023 name="IVirtualBoxCallback" extends="$unknown"
1024 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1025 wsmap="suppress"
1026 >
1027 <method name="onMachineStateChange">
1028 <desc>
1029 The execution state of the given machine has changed.
1030 <see>IMachine::state</see>
1031 </desc>
1032 <param name="machineId" type="uuid" dir="in">
1033 <desc>ID of the machine this event relates to.</desc>
1034 </param>
1035 <param name="state" type="MachineState" dir="in">
1036 <desc>New execution state.</desc>
1037 </param>
1038 </method>
1039
1040 <method name="onMachineDataChange">
1041 <desc>
1042 Any of the settings of the given machine has changed.
1043 </desc>
1044 <param name="machineId" type="uuid" dir="in">
1045 <desc>ID of the machine this event relates to.</desc>
1046 </param>
1047 </method>
1048
1049 <method name="onExtraDataCanChange">
1050 <desc>
1051 Notification when someone tries to change extra data for
1052 either the given machine or (if null) global extra data.
1053 This gives the chance to veto against changes.
1054 </desc>
1055 <param name="machineId" type="uuid" dir="in">
1056 <desc>
1057 ID of the machine this event relates to
1058 (null ID for global extra data change requests).
1059 </desc>
1060 </param>
1061 <param name="key" type="wstring" dir="in">
1062 <desc>
1063 Extra data key for the attempted write.
1064 </desc>
1065 </param>
1066 <param name="value" type="wstring" dir="in">
1067 <desc>
1068 Extra data value for the given key.
1069 </desc>
1070 </param>
1071 <param name="error" type="wstring" dir="out">
1072 <desc>
1073 Optional error message describing the reason of the
1074 veto (ignored if this notification returns @c true).
1075 </desc>
1076 </param>
1077 <param name="allowChange" type="boolean" dir="return">
1078 <desc>
1079 Flag to indicate whether the callee agrees (@c true)
1080 or vetoes against the change (@c false).
1081 </desc>
1082 </param>
1083 </method>
1084
1085 <method name="onExtraDataChange">
1086 <desc>
1087 Notification when machine specific or global extra data
1088 has changed.
1089 </desc>
1090 <param name="machineId" type="uuid" dir="in">
1091 <desc>
1092 ID of the machine this event relates to.
1093 Null for global extra data changes.
1094 </desc>
1095 </param>
1096 <param name="key" type="wstring" dir="in">
1097 <desc>
1098 Extra data key that has changed.
1099 </desc>
1100 </param>
1101 <param name="value" type="wstring" dir="in">
1102 <desc>
1103 Extra data value for the given key.
1104 </desc>
1105 </param>
1106 </method>
1107
1108 <method name="onMediaRegistered">
1109 <desc>
1110 The given media was registered or unregistered
1111 within this VirtualBox installation.
1112
1113 The @a mediaType parameter describes what type of
1114 media the specified @a mediaId refers to. Possible
1115 values are:
1116
1117 <ul>
1118 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1119 that, if registered, can be obtained using the
1120 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1121 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1122 that, if registered, can be obtained using the
1123 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1124 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1125 that, if registered, can be obtained using the
1126 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1127 </ul>
1128
1129 Note that if this is a deregistration notification,
1130 there is no way to access the object representing the
1131 unregistered media. It is supposed that the
1132 application will do required cleanup based on the @a
1133 mediaId value.
1134 </desc>
1135 <param name="mediaId" type="uuid" dir="in">
1136 <desc>ID of the media this event relates to.</desc>
1137 </param>
1138 <param name="mediaType" type="DeviceType" dir="in">
1139 <desc>Type of the media this event relates to.</desc>
1140 </param>
1141 <param name="registered" type="boolean" dir="in">
1142 <desc>
1143 If true, the media was registered, otherwise it was
1144 unregistered.
1145 </desc>
1146 </param>
1147 </method>
1148
1149 <method name="onMachineRegistered">
1150 <desc>
1151 The given machine was registered or unregistered
1152 within this VirtualBox installation.
1153 </desc>
1154 <param name="machineId" type="uuid" dir="in">
1155 <desc>ID of the machine this event relates to.</desc>
1156 </param>
1157 <param name="registered" type="boolean" dir="in">
1158 <desc>
1159 If true, the machine was registered, otherwise it was
1160 unregistered.
1161 </desc>
1162 </param>
1163 </method>
1164
1165 <method name="onSessionStateChange">
1166 <desc>
1167 The state of the session for the given machine was changed.
1168 <see>IMachine::sessionState</see>
1169 </desc>
1170 <param name="machineId" type="uuid" dir="in">
1171 <desc>ID of the machine this event relates to.</desc>
1172 </param>
1173 <param name="state" type="SessionState" dir="in">
1174 <desc>New session state.</desc>
1175 </param>
1176 </method>
1177
1178 <method name="onSnapshotTaken">
1179 <desc>
1180 A new snapshot of the machine has been taken.
1181 <see>ISnapshot</see>
1182 </desc>
1183 <param name="machineId" type="uuid" dir="in">
1184 <desc>ID of the machine this event relates to.</desc>
1185 </param>
1186 <param name="snapshotId" type="uuid" dir="in">
1187 <desc>ID of the new snapshot.</desc>
1188 </param>
1189 </method>
1190
1191 <method name="onSnapshotDiscarded">
1192 <desc>
1193 Snapshot of the given machine has been discarded.
1194
1195 <note>
1196 This notification is delivered <b>after</b> the snapshot
1197 object has been uninitialized on the server (so that any
1198 attempt to call its methods will return an error).
1199 </note>
1200
1201 <see>ISnapshot</see>
1202 </desc>
1203 <param name="machineId" type="uuid" dir="in">
1204 <desc>ID of the machine this event relates to.</desc>
1205 </param>
1206 <param name="snapshotId" type="uuid" dir="in">
1207 <desc>
1208 ID of the discarded snapshot. <tt>null</tt> means the
1209 current machine state has been discarded (restored from
1210 the current snapshot).
1211 </desc>
1212 </param>
1213 </method>
1214
1215 <method name="onSnapshotChange">
1216 <desc>
1217 Snapshot properties (name and/or description) have been changed.
1218 <see>ISnapshot</see>
1219 </desc>
1220 <param name="machineId" type="uuid" dir="in">
1221 <desc>ID of the machine this event relates to.</desc>
1222 </param>
1223 <param name="snapshotId" type="uuid" dir="in">
1224 <desc>ID of the changed snapshot.</desc>
1225 </param>
1226 </method>
1227
1228 <method name="onGuestPropertyChange">
1229 <desc>
1230 Notification when a guest property has changed.
1231 </desc>
1232 <param name="machineId" type="uuid" dir="in">
1233 <desc>
1234 ID of the machine this event relates to.
1235 </desc>
1236 </param>
1237 <param name="name" type="wstring" dir="in">
1238 <desc>
1239 The name of the property that has changed.
1240 </desc>
1241 </param>
1242 <param name="value" type="wstring" dir="in">
1243 <desc>
1244 The new property value.
1245 </desc>
1246 </param>
1247 <param name="flags" type="wstring" dir="in">
1248 <desc>
1249 The new property flags.
1250 </desc>
1251 </param>
1252 </method>
1253
1254 </interface>
1255
1256 <interface
1257 name="IVirtualBox" extends="$dispatched"
1258 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1259 wsmap="managed"
1260 >
1261 <desc>
1262 The IVirtualBox interface represents the main interface exposed by the
1263 product that provides virtual machine management.
1264
1265 An instance of IVirtualBox is required for the product to do anything
1266 useful. Even though the interface does not expose this, internally,
1267 IVirtualBox is implemented as a singleton and actually lives in the
1268 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1269 IVirtualBox can track the state of all virtual machines on a particular
1270 host, regardless of which frontend started them.
1271
1272 To enumerate all the virtual machines on the host, use the
1273 <link to="IVirtualBox::machines2"/> attribute.
1274 </desc>
1275
1276 <attribute name="version" type="wstring" readonly="yes">
1277 <desc>
1278 A string representing the version number of the product. The
1279 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1280 last number represents the build number and will frequently change.
1281 </desc>
1282 </attribute>
1283
1284 <attribute name="revision" type="unsigned long" readonly="yes">
1285 <desc>
1286 The internal build revision number of the product.
1287 </desc>
1288 </attribute>
1289
1290 <attribute name="packageType" type="wstring" readonly="yes">
1291 <desc>
1292 A string representing the package type of this product. The
1293 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1294 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1295 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1296 this.
1297 </desc>
1298 </attribute>
1299
1300 <attribute name="homeFolder" type="wstring" readonly="yes">
1301 <desc>
1302 Full path to the directory where the global settings file,
1303 <tt>VirtualBox.xml</tt>, is stored.
1304
1305 In this version of VirtualBox, the value of this property is
1306 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1307 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1308 as determined by the host OS), and cannot be changed.
1309
1310 This path is also used as the base to resolve relative paths in
1311 places where relative paths are allowed (unless otherwise
1312 expressly indicated).
1313 </desc>
1314 </attribute>
1315
1316 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1317 <desc>
1318 Full name of the global settings file.
1319 The value of this property corresponds to the value of
1320 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1321 </desc>
1322 </attribute>
1323
1324 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1325 <desc>
1326 Current version of the format of the global VirtualBox settings file
1327 (<tt>VirtualBox.xml</tt>).
1328
1329 The version string has the following format:
1330 <pre>
1331 x.y-platform
1332 </pre>
1333 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1334 versions, and <tt>platform</tt> is the platform identifier.
1335
1336 The current version usually matches the value of the
1337 <link to="#settingsFormatVersion"/> attribute unless the
1338 settings file was created by an older version of VirtualBox and there
1339 was a change of the settings file format since then.
1340
1341 Note that VirtualBox automatically converts settings files from older
1342 versions to the most recent version when reading them (usually at
1343 VirtualBox startup) but it doesn't save the changes back until
1344 you call a method that implicitly saves settings (such as
1345 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1346 explicitly. Therefore, if the value of this attribute differs from the
1347 value of <link to="#settingsFormatVersion"/>, then it
1348 means that the settings file was converted but the result of the
1349 conversion is not yet saved to disk.
1350
1351 The above feature may be used by interactive front-ends to inform users
1352 about the settings file format change and offer them to explicitly save
1353 all converted settings files (the global and VM-specific ones),
1354 optionally create backup copies of the old settings files before saving,
1355 etc.
1356
1357 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1358 </desc>
1359 </attribute>
1360
1361 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1362 <desc>
1363 Most recent version of the settings file format.
1364
1365 The version string has the following format:
1366 <pre>
1367 x.y-platform
1368 </pre>
1369 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1370 versions, and <tt>platform</tt> is the platform identifier.
1371
1372 VirtualBox uses this version of the format when saving settings files
1373 (either as a result of method calls that require to save settings or as
1374 a result of an explicit call to <link to="#saveSettings()"/>).
1375
1376 <see>settingsFileVersion</see>
1377 </desc>
1378 </attribute>
1379
1380 <attribute name="host" type="IHost" readonly="yes">
1381 <desc>Associated host object.</desc>
1382 </attribute>
1383
1384 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1385 <desc>Associated system information object.</desc>
1386 </attribute>
1387
1388 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1389 <desc>
1390 Array of machine objects registered within this VirtualBox instance.
1391 </desc>
1392 </attribute>
1393
1394 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1395 <desc>
1396 Array of hard disk objects known to this VirtualBox installation.
1397
1398 This array contains only base (root) hard disks. All differencing
1399 hard disks of the given base hard disk can be enumerated using
1400 <link to="IHardDisk2::children"/>.
1401 </desc>
1402 </attribute>
1403
1404 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1405 <desc>
1406 Array of CD/DVD image objects registered with this VirtualBox instance.
1407 </desc>
1408 </attribute>
1409
1410 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1411 <desc>
1412 Array of floppy image objects registered with this VirtualBox instance.
1413 </desc>
1414 </attribute>
1415
1416 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1417
1418 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1419
1420 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1421 <desc>
1422 Collection of global shared folders. Global shared folders are
1423 available to all virtual machines.
1424
1425 New shared folders are added to the collection using
1426 <link to="#createSharedFolder"/>. Existing shared folders can be
1427 removed using <link to="#removeSharedFolder"/>.
1428
1429 <note>
1430 In the current version of the product, global shared folders are not
1431 implemented and therefore this collection is always empty.
1432 </note>
1433 </desc>
1434 </attribute>
1435
1436 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1437 <desc>
1438 Associated performance collector object.
1439 </desc>
1440 </attribute>
1441
1442 <method name="createMachine">
1443 <desc>
1444 Creates a new virtual machine.
1445
1446 The new machine is created unregistered, with the initial configuration
1447 set according to the specified guest OS type. A typical sequence of
1448 actions to create a new virtual machine is as follows:
1449
1450 <ol>
1451 <li>
1452 Call this method to have a new machine created. The returned machine
1453 object will be "mutable" allowing to change any machine property.
1454 </li>
1455
1456 <li>
1457 Configure the machine using the appropriate attributes and methods.
1458 </li>
1459
1460 <li>
1461 Call <link to="IMachine::saveSettings()" /> to write the settings
1462 to the machine's XML settings file. The configuration of the newly
1463 created machine will not be saved to disk until this method is
1464 called.
1465 </li>
1466
1467 <li>
1468 Call <link to="#registerMachine()" /> to add the machine to the list
1469 of machines known to VirtualBox.
1470 </li>
1471 </ol>
1472
1473 You should specify valid name for the newly created machine when calling
1474 this method. See the <link to="IMachine::name"/> attribute description
1475 for more details about the machine name.
1476
1477 The specified guest OS type identifier must match an ID of one of known
1478 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1479 array.
1480
1481 Every machine has a <i>settings file</i> that is used to store
1482 the machine configuration. This file is stored in a directory called the
1483 <i>machine settings subfolder</i>. Both the settings subfolder and file
1484 will have a name that corresponds to the name of the virtual machine.
1485 You can specify where to create the machine setting subfolder using the
1486 @a baseFolder argument. The base folder can be absolute (full path) or
1487 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1488 directory</link>.
1489
1490 If @a baseFolder is a null or empty string (which is recommended), the
1491 <link to="ISystemProperties::defaultMachineFolder">default machine
1492 settings folder</link> will be used as a base folder for the created
1493 machine. Otherwise the given base folder will be used. In either case,
1494 the full path to the resulting settings file has the following
1495 structure:
1496 <pre>
1497 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1498 </pre>
1499
1500 Note that if the resulting settings file already exists, this method
1501 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1502
1503 Optionally, you may specify an UUID of to assign to the created machine.
1504 However, this is not recommended and you should normally pass an empty
1505 (null) UUID to this method so that a new UUID will be automatically
1506 generated for every created machine.
1507
1508 <note>
1509 There is no way to change the name of the settings file or
1510 subfolder of the created machine directly.
1511 </note>
1512
1513 <result name="VBOX_E_OBJECT_NOT_FOUND">
1514 @a osTypeId is invalid.
1515 </result>
1516 <result name="VBOX_E_FILE_ERROR">
1517 Resulting settings file name is invalid or the settings file already
1518 exists or could not be created due to an I/O error.
1519 </result>
1520 <result name="E_INVALIDARG">
1521 @a name is empty or null.
1522 </result>
1523 </desc>
1524
1525 <param name="name" type="wstring" dir="in">
1526 <desc>Machine name.</desc>
1527 </param>
1528 <param name="osTypeId" type="wstring" dir="in">
1529 <desc>Guest OS Type ID.</desc>
1530 </param>
1531 <param name="baseFolder" type="wstring" dir="in">
1532 <desc>Base machine folder (optional).</desc>
1533 </param>
1534 <param name="id" type="uuid" dir="in">
1535 <desc>Machine UUID (optional).</desc>
1536 </param>
1537 <param name="machine" type="IMachine" dir="return">
1538 <desc>Created machine object.</desc>
1539 </param>
1540 </method>
1541
1542 <method name="createLegacyMachine">
1543 <desc>
1544 Creates a new virtual machine in "legacy" mode, using the specified
1545 settings file to store machine settings.
1546
1547 As opposed to machines created by <link to="#createMachine()"/>,
1548 the settings file of the machine created in "legacy" mode is not
1549 automatically renamed when the machine name is changed -- it will always
1550 remain the same as specified in this method call.
1551
1552 The specified settings file name can be absolute (full path) or relative
1553 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1554 directory</link>. If the file name doesn't contain an extension, the
1555 default extension (.xml) will be appended.
1556
1557 Note that the configuration of the newly created machine is not
1558 saved to disk (and therefore no settings file is created)
1559 until <link to="IMachine::saveSettings()"/> is called. If the
1560 specified settings file already exists, this method
1561 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1562
1563 See <link to="#createMachine()"/> for more information.
1564
1565 @deprecated This method may be removed later. Use <link
1566 to="IVirtualBox::createMachine()"/> instead.
1567
1568 <note>
1569 There is no way to change the name of the settings file
1570 of the machine created in "legacy" mode.
1571 </note>
1572
1573 <result name="VBOX_E_OBJECT_NOT_FOUND">
1574 @a osTypeId is invalid.
1575 </result>
1576 <result name="VBOX_E_FILE_ERROR">
1577 @a settingsFile is invalid or the settings file already exists or
1578 could not be created due to an I/O error.
1579 </result>
1580 <result name="E_INVALIDARG">
1581 @a name or @a settingsFile is empty or null.
1582 </result>
1583 </desc>
1584
1585 <param name="name" type="wstring" dir="in">
1586 <desc>Machine name.</desc>
1587 </param>
1588 <param name="osTypeId" type="wstring" dir="in">
1589 <desc>Machine OS Type ID.</desc>
1590 </param>
1591 <param name="settingsFile" type="wstring" dir="in">
1592 <desc>Name of the machine settings file.</desc>
1593 </param>
1594 <param name="id" type="uuid" dir="in">
1595 <desc>Machine UUID (optional).</desc>
1596 </param>
1597 <param name="machine" type="IMachine" dir="return">
1598 <desc>Created machine object.</desc>
1599 </param>
1600 </method>
1601
1602 <method name="openMachine">
1603 <desc>
1604 Opens a virtual machine from the existing settings file.
1605 The opened machine remains unregistered until you call
1606 <link to="#registerMachine()"/>.
1607
1608 The specified settings file name can be absolute
1609 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1610 VirtualBox home directory</link>. This file must exist
1611 and must be a valid machine settings file whose contents
1612 will be used to construct the machine object.
1613
1614 @deprecated Will be removed soon.
1615 <result name="VBOX_E_FILE_ERROR">
1616 Settings file name invalid, not found or sharing violation.
1617 </result>
1618 </desc>
1619 <param name="settingsFile" type="wstring" dir="in">
1620 <desc>
1621 Name of the machine settings file.
1622 </desc>
1623 </param>
1624 <param name="machine" type="IMachine" dir="return">
1625 <desc>Opened machine object.</desc>
1626 </param>
1627 <note>
1628 <link to="IMachine::settingsModified"/> will return
1629 false for the created machine, until any of machine settings
1630 are changed.
1631 </note>
1632 </method>
1633
1634 <method name="registerMachine">
1635 <desc>
1636
1637 Registers the machine previously created using
1638 <link to="#createMachine()"/> or opened using
1639 <link to="#openMachine()"/> within this VirtualBox installation. After
1640 successful method invocation, the
1641 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1642 to all registered callbacks.
1643
1644 <note>
1645 This method implicitly calls <link to="IMachine::saveSettings"/>
1646 to save all current machine settings before registering it.
1647 </note>
1648
1649 <result name="VBOX_E_OBJECT_NOT_FOUND">
1650 No matching virtual machine found.
1651 </result>
1652 <result name="VBOX_E_INVALID_OBJECT_STATE">
1653 Virtual machine was not created within this VirtualBox instance.
1654 </result>
1655
1656 </desc>
1657 <param name="machine" type="IMachine" dir="in"/>
1658 </method>
1659
1660 <method name="getMachine">
1661 <desc>
1662 Attempts to find a virtual machine given its UUID.
1663 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1664 instead.
1665
1666 <result name="VBOX_E_OBJECT_NOT_FOUND">
1667 Could not find registered machine matching @a id.
1668 </result>
1669
1670 </desc>
1671 <param name="id" type="uuid" dir="in"/>
1672 <param name="machine" type="IMachine" dir="return"/>
1673 </method>
1674
1675 <method name="findMachine">
1676 <desc>
1677 Attempts to find a virtual machine given its name.
1678 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1679 instead.
1680
1681 <result name="VBOX_E_OBJECT_NOT_FOUND">
1682 Could not find registered machine matching @a name.
1683 </result>
1684
1685 </desc>
1686 <param name="name" type="wstring" dir="in"/>
1687 <param name="machine" type="IMachine" dir="return"/>
1688 </method>
1689
1690 <method name="unregisterMachine">
1691 <desc>
1692
1693 Unregisters the machine previously registered using
1694 <link to="#registerMachine"/>. After successful method invocation, the
1695 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1696 to all registered callbacks.
1697
1698 <note>
1699 The specified machine must not be in the Saved state, have an open
1700 (or a spawning) direct session associated with it, have snapshots or
1701 have hard disks attached.
1702 </note>
1703
1704 <note>
1705 This method implicitly calls <link to="IMachine::saveSettings"/> to
1706 save all current machine settings before unregistering it.
1707 </note>
1708
1709 <note>
1710 If the given machine is inaccessible (see
1711 <link to="IMachine::accessible"/>), it will be unregistered and
1712 fully uninitialized right afterwards. As a result, the returned
1713 machine object will be unusable and an attempt to call
1714 <b>any</b> method will return the "Object not ready" error.
1715 </note>
1716
1717 <result name="VBOX_E_OBJECT_NOT_FOUND">
1718 Could not find registered machine matching @a id.
1719 </result>
1720 <result name="VBOX_E_INVALID_VM_STATE">
1721 Machine is in Saved state.
1722 </result>
1723 <result name="VBOX_E_INVALID_OBJECT_STATE">
1724 Machine has snapshot or open session or hard disk attached.
1725 </result>
1726
1727 </desc>
1728 <param name="id" type="uuid" dir="in">
1729 <desc>UUID of the machine to unregister.</desc>
1730 </param>
1731 <param name="machine" type="IMachine" dir="return">
1732 <desc>Unregistered machine object.</desc>
1733 </param>
1734 </method>
1735
1736 <method name="createHardDisk2">
1737 <desc>
1738 Creates a new base hard disk object that will use the given storage
1739 format and location for hard disk data.
1740
1741 Note that the actual storage unit is not created by this method. In
1742 order to do it, and before you are able to attach the created hard disk
1743 to virtual machines, you must call one of the following methods to
1744 allocate a format-specific storage unit at the specified location:
1745 <ul>
1746 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1747 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1748 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1749 </ul>
1750
1751 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1752 remain uninitialized until the hard disk storage unit is successfully
1753 created by one of the above methods.
1754
1755 After the storage unit is successfully created, the hard disk gets
1756 remembered by this VirtualBox installation and will be accessible
1757 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1758 methods. Remembered root (base) hard disks are also returned as part of
1759 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1760
1761 The list of all storage formats supported by this VirtualBox
1762 installation can be obtained using
1763 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1764 attribute is empty or <tt>null</tt> then the default storage format
1765 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1766 be used for creating a storage unit of the hard disk.
1767
1768 Note that the format of the location string is storage format specific.
1769 See <link to="IMedium::location"/>, IHardDisk2 and
1770 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1771
1772 <result name="VBOX_E_OBJECT_NOT_FOUND">
1773 @a format identifier is invalid. See
1774 <link to="ISystemProperties::hardDiskFormats"/>.
1775 </result>
1776 <result name="VBOX_E_FILE_ERROR">
1777 @a location is a not valid file name (for file-based formats only).
1778 </result>
1779 <result name="E_INVALIDARG">
1780 @a format is a null or empty string.
1781 </result>
1782 </desc>
1783 <param name="format" type="wstring" dir="in">
1784 <desc>
1785 Identifier of the storage format to use for the new hard disk.
1786 </desc>
1787 </param>
1788 <param name="location" type="wstring" dir="in">
1789 <desc>
1790 Location of the storage unit for the new hard disk.
1791 </desc>
1792 </param>
1793 <param name="hardDisk" type="IHardDisk2" dir="return">
1794 <desc>Created hard disk object.</desc>
1795 </param>
1796 </method>
1797
1798 <method name="openHardDisk2">
1799 <desc>
1800 Opens a hard disk from an existing location.
1801
1802 After the hard disk is successfully opened by this method, it gets
1803 remembered by (known to) this VirtualBox installation and will be
1804 accessible through <link to="#getHardDisk2()"/> and
1805 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1806 are also returned as part of the <link to="#hardDisks2"/> array and can
1807 be attached to virtual machines. See IHardDisk2 for more details.
1808
1809 If a differencing hard disk is to be opened by this method, the
1810 operation will succeed only if its parent hard disk and all ancestors,
1811 if any, are already known to this VirtualBox installation (for example,
1812 were opened by this method before).
1813
1814 This method tries to guess the storage format of the specified hard disk
1815 by reading hard disk data at the specified location.
1816
1817 Note that the format of the location string is storage format specific.
1818 See <link to="IMedium::location"/>, IHardDisk2 and
1819 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1820
1821
1822 <result name="VBOX_E_FILE_ERROR">
1823 Invalid hard disk storage file location.
1824 </result>
1825 <result name="VBOX_E_IPRT_ERROR">
1826 Could not get hard disk storage format.
1827 </result>
1828 <result name="E_INVALIDARG">
1829 Invalid hard disk storage format.
1830 </result>
1831
1832 </desc>
1833 <param name="location" type="wstring" dir="in">
1834 <desc>
1835 Location of the storage unit that contains hard disk data in one of
1836 the supported storage formats.
1837 </desc>
1838 </param>
1839 <param name="hardDisk" type="IHardDisk2" dir="return">
1840 <desc>Opened hard disk object.</desc>
1841 </param>
1842 </method>
1843
1844 <method name="getHardDisk2" const="yes">
1845 <desc>
1846 Returns a hard disk with the given UUID.
1847
1848 The hard disk with the given UUID must be known to this VirtualBox
1849 installation, i.e. it must be previously created by
1850 <link to="#createHardDisk2()"/> or opened by <link
1851 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1852
1853 <result name="VBOX_E_OBJECT_NOT_FOUND">
1854 No hard disk object matching @a id found.
1855 </result>
1856
1857 </desc>
1858 <param name="id" type="uuid" dir="in">
1859 <desc>UUID of the hard disk to look for.</desc>
1860 </param>
1861 <param name="hardDisk" type="IHardDisk2" dir="return">
1862 <desc>Found hard disk object.</desc>
1863 </param>
1864 </method>
1865
1866 <method name="findHardDisk2">
1867 <desc>
1868 Returns a hard disk that uses the given location to store hard
1869 disk data.
1870
1871 The given hard disk must be known to this VirtualBox installation, i.e.
1872 it must be previously created by
1873 <link to="#createHardDisk2()"/> or opened by <link
1874 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1875
1876 The search is done by comparing the value of the @a location argument to
1877 the <link to="IHardDisk2::location"/> attribute of each known hard
1878 disk.
1879
1880 For locations represented by file names in the host's file system, the
1881 requested location can be a path relative to the
1882 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1883 only a file name without any path is given, the
1884 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1885 folder</link> will be prepended to the file name before searching. Note
1886 that on case sensitive file systems, a case sensitive comparison is
1887 performed, otherwise the case of symbols in the file path is ignored.
1888
1889 <result name="VBOX_E_OBJECT_NOT_FOUND">
1890 No hard disk object matching @a location found.
1891 </result>
1892
1893 </desc>
1894 <param name="location" type="wstring" dir="in">
1895 <desc>Location string to search for.</desc>
1896 </param>
1897 <param name="hardDisk" type="IHardDisk2" dir="return">
1898 <desc>Found hard disk object.</desc>
1899 </param>
1900 </method>
1901
1902 <method name="openDVDImage">
1903 <desc>
1904 Opens a CD/DVD image contained in the specified file of the supported
1905 format and assigns it the given UUID.
1906
1907 After the image is successfully opened by this method, it gets
1908 remembered by (known to) this VirtualBox installation and will be
1909 accessible through <link to="#getDVDImage()"/> and
1910 <link to="#findDVDImage()"/> methods. Remembered images are also
1911 returned as part of the <link to="#DVDImages"/> array and can be mounted
1912 to virtual machines. See IMedium for more details.
1913
1914 See <link to="IMedium::location"/> to get more details about the format
1915 of the location string.
1916
1917 <note>
1918 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1919 </note>
1920
1921 <result name="VBOX_E_INVALID_OBJECT_STATE">
1922 CD/DVD image already exists in the media registry.
1923 </result>
1924
1925 </desc>
1926 <param name="location" type="wstring" dir="in">
1927 <desc>
1928 Full path to the file that contains a valid CD/DVD image.
1929 </desc>
1930 </param>
1931 <param name="id" type="uuid" dir="in">
1932 <desc>
1933 UUID to assign to the given image within this VirtualBox installation.
1934 If an empty (null) UUID is specified, the system will randomly
1935 generate a new UUID.
1936 </desc>
1937 </param>
1938 <param name="image" type="IDVDImage2" dir="return">
1939 <desc>Opened CD/DVD image object.</desc>
1940 </param>
1941 </method>
1942
1943 <method name="getDVDImage">
1944 <desc>
1945 Returns a CD/DVD image with the given UUID.
1946
1947 The image with the given UUID must be known to this VirtualBox
1948 installation, i.e. it must be previously opened by <link
1949 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1950
1951 <result name="VBOX_E_OBJECT_NOT_FOUND">
1952 No matching DVD image found in the media registry.
1953 </result>
1954
1955 </desc>
1956 <param name="id" type="uuid" dir="in">
1957 <desc>UUID of the image to look for.</desc>
1958 </param>
1959 <param name="image" type="IDVDImage2" dir="return">
1960 <desc>Found CD/DVD image object.</desc>
1961 </param>
1962 </method>
1963
1964 <method name="findDVDImage">
1965 <desc>
1966 Returns a CD/DVD image with the given image location.
1967
1968 The image with the given UUID must be known to this VirtualBox
1969 installation, i.e. it must be previously opened by <link
1970 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1971
1972 The search is done by comparing the value of the @a location argument to
1973 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1974
1975 The requested location can be a path relative to the
1976 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1977 only a file name without any path is given, the
1978 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1979 folder</link> will be prepended to the file name before searching. Note
1980 that on case sensitive file systems, a case sensitive comparison is
1981 performed, otherwise the case in the file path is ignored.
1982
1983 <result name="VBOX_E_FILE_ERROR">
1984 Invalid image file location.
1985 </result>
1986 <result name="VBOX_E_OBJECT_NOT_FOUND">
1987 No matching DVD image found in the media registry.
1988 </result>
1989
1990 </desc>
1991 <param name="location" type="wstring" dir="in">
1992 <desc>CD/DVD image file path to look for.</desc>
1993 </param>
1994 <param name="image" type="IDVDImage2" dir="return">
1995 <desc>Found CD/DVD image object.</desc>
1996 </param>
1997 </method>
1998
1999 <method name="openFloppyImage">
2000 <desc>
2001 Opens a floppy image contained in the specified file of the supported
2002 format and assigns it the given UUID.
2003
2004 After the image is successfully opened by this method, it gets
2005 remembered by (known to) this VirtualBox installation and will be
2006 accessible through <link to="#getFloppyImage()"/> and
2007 <link to="#findFloppyImage()"/> methods. Remembered images are also
2008 returned as part of the <link to="#floppyImages"/> array and can be
2009 mounted to virtual machines. See IMedium for more details.
2010
2011 See <link to="IMedium::location"/> to get more details about the format
2012 of the location string.
2013
2014 <result name="VBOX_E_FILE_ERROR">
2015 Floppy image specified by @a location not accessible.
2016 </result>
2017 <result name="VBOX_E_INVALID_OBJECT_STATE">
2018 Floppy image already exists in the media registry.
2019 </result>
2020
2021 <note>
2022 Currently, only raw floppy images are supported by VirtualBox.
2023 </note>
2024 </desc>
2025 <param name="location" type="wstring" dir="in">
2026 <desc>
2027 Full path to the file that contains a valid floppy image.
2028 </desc>
2029 </param>
2030 <param name="id" type="uuid" dir="in">
2031 <desc>
2032 UUID to assign to the given image file within this VirtualBox
2033 installation. If an empty (null) UUID is specified, the system will
2034 randomly generate a new UUID.
2035 </desc>
2036 </param>
2037 <param name="image" type="IFloppyImage2" dir="return">
2038 <desc>Opened floppy image object.</desc>
2039 </param>
2040 </method>
2041
2042 <method name="getFloppyImage">
2043 <desc>
2044 Returns a floppy image with the given UUID.
2045
2046 The image with the given UUID must be known to this VirtualBox
2047 installation, i.e. it must be previously opened by <link
2048 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2049
2050 <result name="VBOX_E_OBJECT_NOT_FOUND">
2051 No matching floppy image found in the media registry.
2052 </result>
2053
2054 </desc>
2055 <param name="id" type="uuid" dir="in">
2056 <desc>UUID of the image to look for.</desc>
2057 </param>
2058 <param name="image" type="IFloppyImage2" dir="return">
2059 <desc>Found floppy image object.</desc>
2060 </param>
2061 </method>
2062
2063 <method name="findFloppyImage">
2064 <desc>
2065 Returns a floppy image with the given image location.
2066
2067 The image with the given UUID must be known to this VirtualBox
2068 installation, i.e. it must be previously opened by <link
2069 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2070
2071 The search is done by comparing the value of the @a location argument to
2072 the <link to="IMedium::location"/> attribute of each known floppy image.
2073
2074 The requested location can be a path relative to the
2075 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2076 only a file name without any path is given, the
2077 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2078 folder</link> will be prepended to the file name before searching. Note
2079 that on case sensitive file systems, a case sensitive comparison is
2080 performed, otherwise the case of symbols in the file path is ignored.
2081
2082 <result name="VBOX_E_FILE_ERROR">
2083 Invalid image file location.
2084 </result>
2085 <result name="VBOX_E_OBJECT_NOT_FOUND">
2086 No matching floppy image found in the media registry.
2087 </result>
2088
2089 </desc>
2090 <param name="location" type="wstring" dir="in">
2091 <desc>Floppy image file path to look for.</desc>
2092 </param>
2093 <param name="image" type="IFloppyImage2" dir="return">
2094 <desc>Found floppy image object.</desc>
2095 </param>
2096 </method>
2097
2098 <method name="getGuestOSType">
2099 <desc>
2100 Returns an object describing the specified guest OS type.
2101
2102 The requested guest OS type is specified using a string which is a
2103 mnemonic identifier of the guest operating system, such as
2104 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2105 particular virtual machine can be read or set using the
2106 <link to="IMachine::OSTypeId"/> attribute.
2107
2108 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2109 available guest OS type objects. Each object has an
2110 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2111 the guest OS this object describes.
2112
2113 <result name="E_INVALIDARG">
2114 @a id is not a valid Guest OS type.
2115 </result>
2116
2117 </desc>
2118 <param name="id" type="wstring" dir="in">
2119 <desc>Guest OS type ID string.</desc>
2120 </param>
2121 <param name="type" type="IGuestOSType" dir="return">
2122 <desc>Guest OS type object.</desc>
2123 </param>
2124 </method>
2125
2126 <method name="createSharedFolder">
2127 <desc>
2128 Creates a new global shared folder by associating the given logical
2129 name with the given host path, adds it to the collection of shared
2130 folders and starts sharing it. Refer to the description of
2131 <link to="ISharedFolder"/> to read more about logical names.
2132 <note>
2133 In the current implementation, this operation is not
2134 implemented.
2135 </note>
2136 </desc>
2137 <param name="name" type="wstring" dir="in">
2138 <desc>Unique logical name of the shared folder.</desc>
2139 </param>
2140 <param name="hostPath" type="wstring" dir="in">
2141 <desc>Full path to the shared folder in the host file system.</desc>
2142 </param>
2143 <param name="writable" type="boolean" dir="in">
2144 <desc>Whether the share is writable or readonly</desc>
2145 </param>
2146 </method>
2147
2148 <method name="removeSharedFolder">
2149 <desc>
2150 Removes the global shared folder with the given name previously
2151 created by <link to="#createSharedFolder"/> from the collection of
2152 shared folders and stops sharing it.
2153 <note>
2154 In the current implementation, this operation is not
2155 implemented.
2156 </note>
2157 </desc>
2158 <param name="name" type="wstring" dir="in">
2159 <desc>Logical name of the shared folder to remove.</desc>
2160 </param>
2161 </method>
2162
2163 <method name="getNextExtraDataKey">
2164 <desc>
2165 Returns the global extra data key name following the supplied key.
2166
2167 An error is returned if the supplied @a key does not exist. @c NULL is
2168 returned in @a nextKey if the supplied key is the last key. When
2169 supplying @c NULL for the @a key, the first key item is returned in @a
2170 nextKey (if there is any). @a nextValue is an optional parameter and
2171 if supplied, the next key's value is returned in it.
2172
2173 <result name="VBOX_E_OBJECT_NOT_FOUND">
2174 Extra data @a key not found.
2175 </result>
2176
2177 </desc>
2178 <param name="key" type="wstring" dir="in">
2179 <desc>Name of the data key to follow.</desc>
2180 </param>
2181 <param name="nextKey" type="wstring" dir="out">
2182 <desc>Name of the next data key.</desc>
2183 </param>
2184 <param name="nextValue" type="wstring" dir="out">
2185 <desc>Value of the next data key.</desc>
2186 </param>
2187 </method>
2188
2189 <method name="getExtraData">
2190 <desc>
2191 Returns associated global extra data.
2192
2193 If the requested data @a key does not exist, this function will
2194 succeed and return @c NULL in the @a value argument.
2195
2196 <result name="VBOX_E_FILE_ERROR">
2197 Settings file not accessible.
2198 </result>
2199 <result name="VBOX_E_XML_ERROR">
2200 Could not parse the settings file.
2201 </result>
2202
2203 </desc>
2204 <param name="key" type="wstring" dir="in">
2205 <desc>Name of the data key to get.</desc>
2206 </param>
2207 <param name="value" type="wstring" dir="return">
2208 <desc>Value of the requested data key.</desc>
2209 </param>
2210 </method>
2211
2212 <method name="setExtraData">
2213 <desc>
2214 Sets associated global extra data.
2215
2216 If you pass @c NULL as a key @a value, the given @a key will be
2217 deleted.
2218
2219 <note>
2220 Before performing the actual data change, this method will ask all
2221 registered callbacks using the
2222 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2223 notification for a permission. If one of the callbacks refuses the
2224 new value, the change will not be performed.
2225 </note>
2226 <note>
2227 On success, the
2228 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2229 is called to inform all registered callbacks about a successful data
2230 change.
2231 </note>
2232
2233 <result name="VBOX_E_FILE_ERROR">
2234 Settings file not accessible.
2235 </result>
2236 <result name="VBOX_E_XML_ERROR">
2237 Could not parse the settings file.
2238 </result>
2239 <result name="E_ACCESSDENIED">
2240 Modification request refused.
2241 </result>
2242
2243 </desc>
2244 <param name="key" type="wstring" dir="in">
2245 <desc>Name of the data key to set.</desc>
2246 </param>
2247 <param name="value" type="wstring" dir="in">
2248 <desc>Value to assign to the key.</desc>
2249 </param>
2250 </method>
2251
2252 <method name="openSession">
2253 <desc>
2254 Opens a new direct session with the given virtual machine.
2255
2256 A direct session acts as a local lock on the given VM.
2257 There can be only one direct session open at a time for every
2258 virtual machine, protecting the VM from being manipulated by
2259 conflicting actions from different processes. Only after a
2260 direct session has been opened, one can change all VM settings
2261 and execute the VM in the process space of the session object.
2262
2263 Sessions therefore can be compared to mutex semaphores that
2264 lock a given VM for modification and execution.
2265 See <link to="ISession">ISession</link> for details.
2266
2267 <note>Unless you are writing a new VM frontend, you will not
2268 want to execute a VM in the current process. To spawn a new
2269 process that executes a VM, use
2270 <link to="IVirtualBox::openRemoteSession" />
2271 instead.</note>
2272
2273 Upon successful return, the session object can be used to
2274 get access to the machine and to the VM console.
2275
2276 In VirtualBox terminology, the machine becomes "mutable" after
2277 a session has been opened. Note that the "mutable" machine
2278 object, on which you may invoke IMachine methods to change its
2279 settings, will be a different object from the immutable IMachine
2280 objects returned by various IVirtualBox methods. To obtain a
2281 mutable IMachine object (upon which you can invoke settings methods),
2282 use the <link to="ISession::machine" /> attribute.
2283
2284 One must always call <link to="ISession::close" /> to release the
2285 lock on the machine, or the machine's state will eventually be
2286 set to "Aborted".
2287
2288 In other words, to change settings on a machine, the following
2289 sequence is typically performed:
2290
2291 <ol>
2292 <li>Call this method (openSession) to have a machine locked for
2293 the current session.</li>
2294
2295 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2296
2297 <li>Change the settings of the machine.</li>
2298
2299 <li>Call <link to="IMachine::saveSettings" />.</li>
2300
2301 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2302 </ol>
2303
2304 <result name="E_UNEXPECTED">
2305 Virtual machine not registered.
2306 </result>
2307 <result name="E_ACCESSDENIED">
2308 Process not started by OpenRemoteSession.
2309 </result>
2310 <result name="VBOX_E_OBJECT_NOT_FOUND">
2311 No matching virtual machine found.
2312 </result>
2313 <result name="VBOX_E_INVALID_OBJECT_STATE">
2314 Session already open or being opened.
2315 </result>
2316 <result name="VBOX_E_VM_ERROR">
2317 Failed to assign machine to session.
2318 </result>
2319
2320 </desc>
2321 <param name="session" type="ISession" dir="in">
2322 <desc>
2323 Session object that will represent the opened session after
2324 successful method invocation. This object must not represent
2325 the already open session.
2326 <note>
2327 This session will be automatically closed if the
2328 VirtualBox server is terminated for some reason.
2329 </note>
2330 </desc>
2331 </param>
2332 <param name="machineId" type="uuid" dir="in">
2333 <desc>ID of the virtual machine to open a session with.</desc>
2334 </param>
2335 </method>
2336
2337 <method name="openRemoteSession">
2338 <desc>
2339 Spawns a new process that executes a virtual machine (called a
2340 "remote session").
2341
2342 Opening a remote session causes the VirtualBox server to start a new
2343 process that opens a direct session with the given VM. As a result, the
2344 VM is locked by that direct session in the new process, preventing
2345 conflicting changes from other processes. Since sessions act as locks
2346 that such prevent conflicting changes, one cannot open a remote session
2347 for a VM that already has another open session (direct or remote), or
2348 is currently in the process of opening one (see <link
2349 to="IMachine::sessionState"/>).
2350
2351 While the remote session still provides some level of control over the
2352 VM execution to the caller (using the <link to="IConsole" /> interface),
2353 not all VM settings are available for modification within the remote
2354 session context.
2355
2356 This operation can take some time (a new VM is started in a new process,
2357 for which memory and other resources need to be set up). Because of this,
2358 an <link to="IProgress" /> is returned to allow the caller to wait for this
2359 asynchronous operation to be completed. Until then, the remote session
2360 object remains in the closed state, and accessing the machine or its
2361 console through it is invalid. It is recommended to use
2362 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2363 completion.
2364
2365 As with all <link to="ISession" /> objects, it is recommended to call
2366 <link to="ISession::close" /> on the local session object once openRemoteSession()
2367 has been called. However, the session's state (see <link to="ISession::state" />)
2368 will not return to "Closed" until the remote session has also closed (i.e.
2369 until the VM is no longer running). In that case, however, the state of
2370 the session will automatically change back to "Closed".
2371
2372 Currently supported session types (values of the @a type
2373 argument) are:
2374 <ul>
2375 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2376 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2377 </ul>
2378
2379 The @a environment argument is a string containing definitions of
2380 environment variables in the following format:
2381 @code
2382 NAME[=VALUE]\n
2383 NAME[=VALUE]\n
2384 ...
2385 @endcode
2386 where <tt>\\n</tt> is the new line character. These environment
2387 variables will be appended to the environment of the VirtualBox server
2388 process. If an environment variable exists both in the server process
2389 and in this list, the value from this list takes precedence over the
2390 server's variable. If the value of the environment variable is
2391 omitted, this variable will be removed from the resulting environment.
2392 If the environment string is @c null, the server environment is
2393 inherited by the started process as is.
2394
2395 <see>openExistingSession</see>
2396
2397 <result name="E_UNEXPECTED">
2398 Virtual machine not registered.
2399 </result>
2400 <result name="E_INVALIDARG">
2401 Invalid session type @a type.
2402 </result>
2403 <result name="VBOX_E_OBJECT_NOT_FOUND">
2404 No machine matching @a machineId found.
2405 </result>
2406 <result name="VBOX_E_INVALID_OBJECT_STATE">
2407 Session already open or being opened.
2408 </result>
2409 <result name="VBOX_E_IPRT_ERROR">
2410 Launching process for machine failed.
2411 </result>
2412 <result name="VBOX_E_VM_ERROR">
2413 Failed to assign machine to session.
2414 </result>
2415
2416 </desc>
2417 <param name="session" type="ISession" dir="in">
2418 <desc>
2419 Session object that will represent the opened remote session
2420 after successful method invocation (this object must not
2421 represent an already open session).
2422 </desc>
2423 </param>
2424 <param name="machineId" type="uuid" dir="in">
2425 <desc>ID of the virtual machine to open a session with.</desc>
2426 </param>
2427 <param name="type" type="wstring" dir="in">
2428 <desc>
2429 Type of the remote session (case sensitive).
2430 </desc>
2431 </param>
2432 <param name="environment" type="wstring" dir="in">
2433 <desc>
2434 Environment to pass to the opened session (may be @c null).
2435 </desc>
2436 </param>
2437 <param name="progress" type="IProgress" dir="return">
2438 <desc>Progress object to track the operation completion.</desc>
2439 </param>
2440 </method>
2441
2442 <method name="openExistingSession">
2443 <desc>
2444 Opens a new remote session with the virtual machine for
2445 which a direct session is already open.
2446
2447 The remote session provides some level of control over the VM
2448 execution (using the IConsole interface) to the caller; however,
2449 within the remote session context, not all VM settings are available
2450 for modification.
2451
2452 As opposed to <link to="#openRemoteSession()"/>, the number of
2453 remote sessions opened this way is not limited by the API
2454
2455 <note>
2456 It is an error to open a remote session with the machine that
2457 doesn't have an open direct session.
2458 </note>
2459
2460 <result name="E_UNEXPECTED">
2461 Virtual machine not registered.
2462 </result>
2463 <result name="VBOX_E_OBJECT_NOT_FOUND">
2464 No machine matching @a machineId found.
2465 </result>
2466 <result name="VBOX_E_INVALID_OBJECT_STATE">
2467 Session already open or being opened.
2468 </result>
2469 <result name="VBOX_E_INVALID_SESSION_STATE">
2470 Direct session state not Open.
2471 </result>
2472 <result name="VBOX_E_VM_ERROR">
2473 Failed to get console object from direct session or assign
2474 machine to session.
2475 </result>
2476
2477 <see>openRemoteSession</see>
2478 </desc>
2479 <param name="session" type="ISession" dir="in">
2480 <desc>
2481 Session object that will represent the open remote session
2482 after successful method invocation. This object must not
2483 represent an already open session.
2484 <note>
2485 This session will be automatically closed when the peer
2486 (direct) session dies or gets closed.
2487 </note>
2488 </desc>
2489 </param>
2490 <param name="machineId" type="uuid" dir="in">
2491 <desc>ID of the virtual machine to open a session with.</desc>
2492 </param>
2493 </method>
2494
2495 <method name="registerCallback">
2496 <desc>
2497 Registers a new global VirtualBox callback. The methods of the given
2498 callback object will be called by VirtualBox when an appropriate
2499 event occurs.
2500
2501 <result name="E_INVALIDARG">
2502 Registering a @c NULL @a callback is pretty pointless, ain't it?
2503 <!-- See if someone is actually reading this and objects :-) -->
2504 </result>
2505
2506 </desc>
2507 <param name="callback" type="IVirtualBoxCallback" dir="in">
2508 <desc>Callback object to register.</desc>
2509 </param>
2510 </method>
2511
2512 <method name="unregisterCallback">
2513 <desc>
2514 Unregisters the previously registered global VirtualBox callback.
2515
2516 <result name="E_INVALIDARG">
2517 Specified @a callback not registered.
2518 </result>
2519
2520 </desc>
2521 <param name="callback" type="IVirtualBoxCallback" dir="in">
2522 <desc>Callback object to unregister.</desc>
2523 </param>
2524 </method>
2525
2526 <method name="waitForPropertyChange">
2527 <desc>
2528 Blocks the caller until any of the properties represented by the @a
2529 what argument changes the value or until the given timeout interval
2530 expires.
2531
2532 The @a what argument is a comma separated list of property masks that
2533 describe properties the caller is interested in. The property mask is
2534 a string in the following format:
2535
2536 <pre>
2537 [[group.]subgroup.]name
2538 </pre>
2539
2540 where @c name is the property name and @c group, @c subgroup are zero
2541 or more property group specifiers. Each element (group or name) in
2542 the property mask may be either a Latin string or an asterisk symbol
2543 (@c "*") which is used to match any string for the given element. A
2544 property mask that doesn't contain asterisk symbols represents a
2545 single fully qualified property name.
2546
2547 Groups in the fully qualified property name go from more generic (the
2548 left-most part) to more specific (the right-most part). The first
2549 element is usually a name of the object the property belongs to. The
2550 second element may be either a property name, or a child object name,
2551 or an index if the preceding element names an object which is one of
2552 many objects of the same type. This way, property names form a
2553 hierarchy of properties. Here are some examples of property names:
2554
2555 <table>
2556 <tr>
2557 <td><tt>VirtualBox.version</tt></td>
2558 <td><link to="IVirtualBox::version"/> property</td>
2559 </tr>
2560 <tr>
2561 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2562 <td><link to="IMachine::name"/> property of the machine with the
2563 given UUID</td>
2564 </tr>
2565 </table>
2566
2567 Most property names directly correspond to the properties of objects
2568 (components) provided by the VirtualBox library and may be used to
2569 track changes to these properties. However, there may be
2570 pseudo-property names that don't correspond to any existing object's
2571 property directly, as well as there may be object properties that
2572 don't have a corresponding property name that is understood by this
2573 method, and therefore changes to such properties cannot be
2574 tracked. See individual object's property descriptions to get a
2575 fully qualified property name that can be used with this method (if
2576 any).
2577
2578 There is a special property mask @c "*" (i.e. a string consisting of a
2579 single asterisk symbol) that can be used to match all properties.
2580 Below are more examples of property masks:
2581
2582 <table>
2583 <tr>
2584 <td><tt>VirtualBox.*</tt></td>
2585 <td>Track all properties of the VirtualBox object</td>
2586 </tr>
2587 <tr>
2588 <td><tt>Machine.*.name</tt></td>
2589 <td>Track changes to the <link to="IMachine::name"/> property of
2590 all registered virtual machines</td>
2591 </tr>
2592 </table>
2593
2594 <note>
2595 This function is not implemented in the current version of the
2596 product.
2597 </note>
2598 </desc>
2599 <param name="what" type="wstring" dir="in">
2600 <desc>Comma separated list of property masks.</desc>
2601 </param>
2602 <param name="timeout" type="unsigned long" dir="in">
2603 <desc>
2604 Wait timeout in milliseconds.
2605 Specify -1 for an indefinite wait.
2606 </desc>
2607 </param>
2608 <param name="changed" type="wstring" dir="out">
2609 <desc>
2610 Comma separated list of properties that have been changed and caused
2611 this method to return to the caller.
2612 </desc>
2613 </param>
2614 <param name="values" type="wstring" dir="out">
2615 <desc>Reserved, not currently used.</desc>
2616 </param>
2617 </method>
2618
2619 <method name="saveSettings">
2620 <desc>
2621 Saves the global settings to the global settings file
2622 (<link to="#settingsFilePath"/>).
2623
2624 This method is only useful for explicitly saving the global settings
2625 file after it has been auto-converted from the old format to the most
2626 recent format (see <link to="#settingsFileVersion"/> for details).
2627 Normally, the global settings file is implicitly saved when a global
2628 setting is changed.
2629
2630 <result name="VBOX_E_FILE_ERROR">
2631 Settings file not accessible.
2632 </result>
2633 <result name="VBOX_E_XML_ERROR">
2634 Could not parse the settings file.
2635 </result>
2636
2637 </desc>
2638 </method>
2639
2640 <method name="saveSettingsWithBackup">
2641 <desc>
2642 Creates a backup copy of the global settings file
2643 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2644 calls <link to="#saveSettings()"/>.
2645
2646 Note that the backup copy is created <b>only</b> if the settings file
2647 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2648 details). Otherwise, this call is fully equivalent to
2649 <link to="#saveSettings()"/> and no backup copying is done.
2650
2651 The backup copy is created in the same directory where the original
2652 settings file is located. It is given the following file name:
2653 <pre>
2654 original.xml.x.y-platform.bak
2655 </pre>
2656 where <tt>original.xml</tt> is the original settings file name
2657 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2658 format of the settings file (before auto-conversion).
2659
2660 If the given backup file already exists, this method will try to add the
2661 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2662 0 to 9) and copy it again until it succeeds. If all suffixes are
2663 occupied, or if any other copy error occurs, this method will return a
2664 failure.
2665
2666 If the copy operation succeeds, the @a bakFileName return argument will
2667 receive a full path to the created backup file (for informational
2668 purposes). Note that this will happen even if the subsequent
2669 <link to="#saveSettings()"/> call performed by this method after the
2670 copy operation, fails.
2671
2672 <note>
2673 The VirtualBox API never calls this method. It is intended purely for
2674 the purposes of creating backup copies of the settings files by
2675 front-ends before saving the results of the automatically performed
2676 settings conversion to disk.
2677 </note>
2678
2679 <see>settingsFileVersion</see>
2680
2681 <result name="VBOX_E_FILE_ERROR">
2682 Settings file not accessible.
2683 </result>
2684 <result name="VBOX_E_XML_ERROR">
2685 Could not parse the settings file.
2686 </result>
2687 <result name="VBOX_E_IPRT_ERROR">
2688 Could not copy the settings file.
2689 </result>
2690
2691 </desc>
2692 <param name="bakFileName" type="wstring" dir="return">
2693 <desc>Full path to the created backup copy.</desc>
2694 </param>
2695 </method>
2696
2697 </interface>
2698
2699 <!--
2700 // IMachine
2701 /////////////////////////////////////////////////////////////////////////
2702 -->
2703
2704 <enumerator
2705 name="IMachineEnumerator" type="IMachine"
2706 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
2707 />
2708
2709 <collection
2710 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
2711 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
2712 readonly="yes"
2713 />
2714
2715 <interface
2716 name="IInternalMachineControl" extends="$unknown"
2717 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
2718 internal="yes"
2719 wsmap="suppress"
2720 >
2721 <method name="updateState">
2722 <desc>
2723 Updates the VM state.
2724 <note>
2725 This operation will also update the settings file with
2726 the correct information about the saved state file
2727 and delete this file from disk when appropriate.
2728 </note>
2729 </desc>
2730 <param name="state" type="MachineState" dir="in"/>
2731 </method>
2732
2733 <method name="getIPCId">
2734 <param name="id" type="wstring" dir="return"/>
2735 </method>
2736
2737 <method name="runUSBDeviceFilters">
2738 <desc>
2739 Asks the server to run USB devices filters of the associated
2740 machine against the given USB device and tell if there is
2741 a match.
2742 <note>
2743 Intended to be used only for remote USB devices. Local
2744 ones don't require to call this method (this is done
2745 implicitly by the Host and USBProxyService).
2746 </note>
2747 </desc>
2748 <param name="device" type="IUSBDevice" dir="in"/>
2749 <param name="matched" type="boolean" dir="out"/>
2750 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
2751 </method>
2752
2753 <method name="captureUSBDevice">
2754 <desc>
2755 Requests a capture of the given host USB device.
2756 When the request is completed, the VM process will
2757 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2758 notification.
2759 </desc>
2760 <param name="id" type="uuid" dir="in"/>
2761 </method>
2762
2763 <method name="detachUSBDevice">
2764 <desc>
2765 Notification that a VM is going to detach (done = false) or has
2766 already detached (done = true) the given USB device.
2767 When the done = true request is completed, the VM process will
2768 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
2769 notification.
2770 <note>
2771 In the done = true case, the server must run its own filters
2772 and filters of all VMs but this one on the detached device
2773 as if it were just attached to the host computer.
2774 </note>
2775 </desc>
2776 <param name="id" type="uuid" dir="in"/>
2777 <param name="done" type="boolean" dir="in"/>
2778 </method>
2779
2780 <method name="autoCaptureUSBDevices">
2781 <desc>
2782 Requests a capture all matching USB devices attached to the host.
2783 When the request is completed, the VM process will
2784 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
2785 notification per every captured device.
2786 </desc>
2787 </method>
2788
2789 <method name="detachAllUSBDevices">
2790 <desc>
2791 Notification that a VM that is being powered down. The done
2792 parameter indicates whether which stage of the power down
2793 we're at. When done = false the VM is announcing its
2794 intentions, while when done = true the VM is reporting
2795 what it has done.
2796 <note>
2797 In the done = true case, the server must run its own filters
2798 and filters of all VMs but this one on all detach devices as
2799 if they were just attached to the host computer.
2800 </note>
2801 </desc>
2802 <param name="done" type="boolean" dir="in"/>
2803 </method>
2804
2805 <method name="onSessionEnd">
2806 <desc>
2807 Triggered by the given session object when the session is about
2808 to close normally.
2809 </desc>
2810 <param name="session" type="ISession" dir="in">
2811 <desc>Session that is being closed</desc>
2812 </param>
2813 <param name="progress" type="IProgress" dir="return">
2814 <desc>
2815 Used to wait until the corresponding machine is actually
2816 dissociated from the given session on the server.
2817 Returned only when this session is a direct one.
2818 </desc>
2819 </param>
2820 </method>
2821
2822 <method name="beginSavingState">
2823 <desc>
2824 Called by the VM process to inform the server it wants to
2825 save the current state and stop the VM execution.
2826 </desc>
2827 <param name="progress" type="IProgress" dir="in">
2828 <desc>
2829 Progress object created by the VM process to wait until
2830 the state is saved.
2831 </desc>
2832 </param>
2833 <param name="stateFilePath" type="wstring" dir="out">
2834 <desc>
2835 File path the VM process must save the execution state to.
2836 </desc>
2837 </param>
2838 </method>
2839
2840 <method name="endSavingState">
2841 <desc>
2842 Called by the VM process to inform the server that saving
2843 the state previously requested by #beginSavingState is either
2844 successfully finished or there was a failure.
2845
2846 <result name="VBOX_E_FILE_ERROR">
2847 Settings file not accessible.
2848 </result>
2849 <result name="VBOX_E_XML_ERROR">
2850 Could not parse the settings file.
2851 </result>
2852
2853 </desc>
2854
2855 <param name="success" type="boolean" dir="in">
2856 <desc><tt>true</tt> to indicate success and <tt>false</tt>
2857 otherwise.
2858 </desc>
2859 </param>
2860 </method>
2861
2862 <method name="adoptSavedState">
2863 <desc>
2864 Gets called by IConsole::adoptSavedState.
2865 <result name="VBOX_E_FILE_ERROR">
2866 Invalid saved state file path.
2867 </result>
2868 </desc>
2869 <param name="savedStateFile" type="wstring" dir="in">
2870 <desc>Path to the saved state file to adopt.</desc>
2871 </param>
2872 </method>
2873
2874 <method name="beginTakingSnapshot">
2875 <desc>
2876 Called by the VM process to inform the server it wants to
2877 take a snapshot.
2878
2879 <result name="VBOX_E_FILE_ERROR">
2880 Settings file not accessible.
2881 </result>
2882 <result name="VBOX_E_XML_ERROR">
2883 Could not parse the settings file.
2884 </result>
2885 </desc>
2886 <param name="initiator" type="IConsole" dir="in">
2887 <desc>The console object that initiated this call.</desc>
2888 </param>
2889 <param name="name" type="wstring" dir="in">
2890 <desc>Snapshot name.</desc>
2891 </param>
2892 <param name="description" type="wstring" dir="in">
2893 <desc>Snapshot description.</desc>
2894 </param>
2895 <param name="progress" type="IProgress" dir="in">
2896 <desc>
2897 Progress object created by the VM process to wait until
2898 the state is saved (only for online snapshots).
2899 </desc>
2900 </param>
2901 <param name="stateFilePath" type="wstring" dir="out">
2902 <desc>
2903 File path the VM process must save the execution state to.
2904 </desc>
2905 </param>
2906 <param name="serverProgress" type="IProgress" dir="out">
2907 <desc>
2908 Progress object created by the server process to wait until
2909 the snapshot is taken (VDI diff creation, etc.).
2910 </desc>
2911 </param>
2912 </method>
2913
2914 <method name="endTakingSnapshot">
2915 <desc>
2916 Called by the VM process to inform the server that the snapshot
2917 previously requested by #beginTakingSnapshot is either
2918 successfully taken or there was a failure.
2919 </desc>
2920
2921 <param name="success" type="boolean" dir="in">
2922 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
2923 </param>
2924 </method>
2925
2926 <method name="discardSnapshot">
2927 <desc>
2928 Gets called by IConsole::discardSnapshot.
2929 <result name="VBOX_E_INVALID_OBJECT_STATE">
2930 Snapshot has more than one child snapshot.
2931 </result>
2932 </desc>
2933 <param name="initiator" type="IConsole" dir="in">
2934 <desc>The console object that initiated this call.</desc>
2935 </param>
2936 <param name="id" type="uuid" dir="in">
2937 <desc>UUID of the snapshot to discard.</desc>
2938 </param>
2939 <param name="machineState" type="MachineState" dir="out">
2940 <desc>New machine state after this operation is started.</desc>
2941 </param>
2942 <param name="progress" type="IProgress" dir="return">
2943 <desc>Progress object to track the operation completion.</desc>
2944 </param>
2945 </method>
2946
2947 <method name="discardCurrentState">
2948 <desc>
2949 Gets called by IConsole::discardCurrentState.
2950 <result name="VBOX_E_INVALID_OBJECT_STATE">
2951 Virtual machine does not have any snapshot.
2952 </result>
2953 </desc>
2954 <param name="initiator" type="IConsole" dir="in">
2955 <desc>The console object that initiated this call.</desc>
2956 </param>
2957 <param name="machineState" type="MachineState" dir="out">
2958 <desc>New machine state after this operation is started.</desc>
2959 </param>
2960 <param name="progress" type="IProgress" dir="return">
2961 <desc>Progress object to track the operation completion.</desc>
2962 </param>
2963 </method>
2964
2965 <method name="discardCurrentSnapshotAndState">
2966 <desc>
2967 Gets called by IConsole::discardCurrentSnapshotAndState.
2968 <result name="VBOX_E_INVALID_OBJECT_STATE">
2969 Virtual machine does not have any snapshot.
2970 </result>
2971 </desc>
2972 <param name="initiator" type="IConsole" dir="in">
2973 <desc>The console object that initiated this call.</desc>
2974 </param>
2975 <param name="machineState" type="MachineState" dir="out">
2976 <desc>New machine state after this operation is started.</desc>
2977 </param>
2978 <param name="progress" type="IProgress" dir="return">
2979 <desc>Progress object to track the operation completion.</desc>
2980 </param>
2981 </method>
2982
2983 <method name="pullGuestProperties">
2984 <desc>
2985 Get the list of the guest properties matching a set of patterns along
2986 with their values, time stamps and flags and give responsibility for
2987 managing properties to the console.
2988 </desc>
2989 <param name="name" type="wstring" dir="out" safearray="yes">
2990 <desc>
2991 The names of the properties returned.
2992 </desc>
2993 </param>
2994 <param name="value" type="wstring" dir="out" safearray="yes">
2995 <desc>
2996 The values of the properties returned. The array entries match the
2997 corresponding entries in the @a name array.
2998 </desc>
2999 </param>
3000 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3001 <desc>
3002 The time stamps of the properties returned. The array entries match
3003 the corresponding entries in the @a name array.
3004 </desc>
3005 </param>
3006 <param name="flags" type="wstring" dir="out" safearray="yes">
3007 <desc>
3008 The flags of the properties returned. The array entries match the
3009 corresponding entries in the @a name array.
3010 </desc>
3011 </param>
3012 </method>
3013
3014 <method name="pushGuestProperties">
3015 <desc>
3016 Set the list of the guest properties matching a set of patterns along
3017 with their values, time stamps and flags and return responsibility for
3018 managing properties to IMachine.
3019 </desc>
3020 <param name="name" type="wstring" dir="in" safearray="yes">
3021 <desc>
3022 The names of the properties.
3023 </desc>
3024 </param>
3025 <param name="value" type="wstring" dir="in" safearray="yes">
3026 <desc>
3027 The values of the properties. The array entries match the
3028 corresponding entries in the @a name array.
3029 </desc>
3030 </param>
3031 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3032 <desc>
3033 The time stamps of the properties. The array entries match
3034 the corresponding entries in the @a name array.
3035 </desc>
3036 </param>
3037 <param name="flags" type="wstring" dir="in" safearray="yes">
3038 <desc>
3039 The flags of the properties. The array entries match the
3040 corresponding entries in the @a name array.
3041 </desc>
3042 </param>
3043 </method>
3044 <method name="pushGuestProperty">
3045 <desc>
3046 Update a single guest property in IMachine.
3047 </desc>
3048 <param name="name" type="wstring" dir="in">
3049 <desc>
3050 The name of the property to be updated.
3051 </desc>
3052 </param>
3053 <param name="value" type="wstring" dir="in">
3054 <desc>
3055 The value of the property.
3056 </desc>
3057 </param>
3058 <param name="timestamp" type="unsigned long long" dir="in">
3059 <desc>
3060 The timestamp of the property.
3061 </desc>
3062 </param>
3063 <param name="flags" type="wstring" dir="in">
3064 <desc>
3065 The flags of the property.
3066 </desc>
3067 </param>
3068 </method>
3069 </interface>
3070
3071 <interface
3072 name="IBIOSSettings" extends="$unknown"
3073 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3074 wsmap="managed"
3075 >
3076 <desc>
3077 The IBIOSSettings interface represents BIOS settings of the virtual
3078 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3079 </desc>
3080 <attribute name="logoFadeIn" type="boolean">
3081 <desc>Fade in flag for BIOS logo animation.</desc>
3082 </attribute>
3083
3084 <attribute name="logoFadeOut" type="boolean">
3085 <desc>Fade out flag for BIOS logo animation.</desc>
3086 </attribute>
3087
3088 <attribute name="logoDisplayTime" type="unsigned long">
3089 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3090 </attribute>
3091
3092 <attribute name="logoImagePath" type="wstring">
3093 <desc>Local file system path for external BIOS image.</desc>
3094 </attribute>
3095
3096 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3097 <desc>Mode of the BIOS boot device menu.</desc>
3098 </attribute>
3099
3100 <attribute name="ACPIEnabled" type="boolean">
3101 <desc>ACPI support flag.</desc>
3102 </attribute>
3103
3104 <attribute name="IOAPICEnabled" type="boolean">
3105 <desc>
3106 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3107 and support IRQs above 15.
3108 </desc>
3109 </attribute>
3110
3111 <attribute name="timeOffset" type="long long">
3112 <desc>
3113 Offset in milliseconds from the host system time. This allows for
3114 guests running with a different system date/time than the host.
3115 It is equivalent to setting the system date/time in the BIOS except
3116 it is not an absolute value but a relative one. Guest Additions
3117 time synchronization honors this offset.
3118 </desc>
3119 </attribute>
3120
3121 <attribute name="PXEDebugEnabled" type="boolean">
3122 <desc>
3123 PXE debug logging flag. If set, VirtualBox will write extensive
3124 PXE trace information to the release log.
3125 </desc>
3126 </attribute>
3127
3128 <attribute name="IDEControllerType" type="IDEControllerType">
3129 <desc>
3130 Type of the virtual IDE controller. Depending on this value,
3131 VirtualBox will provide different virtual IDE hardware
3132 devices to the guest.
3133 </desc>
3134 </attribute>
3135
3136 </interface>
3137
3138 <interface
3139 name="IMachine" extends="$unknown"
3140 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3141 wsmap="managed"
3142 >
3143 <desc>
3144 The IMachine interface represents a virtual machine, or guest, created
3145 in VirtualBox.
3146
3147 This interface is used in two contexts. First of all, a collection of
3148 objects implementing this interface is stored in the
3149 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3150 machines that are currently registered with this VirtualBox
3151 installation. Also, once a session has been opened for the given virtual
3152 machine (e.g. the virtual machine is running), the machine object
3153 associated with the open session can be queried from the session object;
3154 see <link to="ISession"/> for details.
3155
3156 The main role of this interface is to expose the settings of the virtual
3157 machine and provide methods to change various aspects of the virtual
3158 machine's configuration. For machine objects stored in the
3159 <link to="IVirtualBox::machines2"/> collection, all attributes are
3160 read-only unless explicitly stated otherwise in individual attribute
3161 and method descriptions. In order to change a machine setting, a session
3162 for this machine must be opened using one of
3163 <link to="IVirtualBox::openSession"/>,
3164 <link to="IVirtualBox::openRemoteSession"/> or
3165 <link to="IVirtualBox::openExistingSession"/> methods. After the
3166 session has been successfully opened, a mutable machine object needs to
3167 be queried from the session object and then the desired settings changes
3168 can be applied to the returned object using IMachine attributes and
3169 methods. See the ISession interface description for more information
3170 about sessions.
3171
3172 Note that the IMachine interface does not provide methods to control
3173 virtual machine execution (such as start the machine, or power it
3174 down) -- these methods are grouped in a separate IConsole
3175 interface. Refer to the IConsole interface description to get more
3176 information about this topic.
3177
3178 <see>ISession, IConsole</see>
3179 </desc>
3180
3181 <attribute name="parent" type="IVirtualBox" readonly="yes">
3182 <desc>Associated parent object.</desc>
3183 </attribute>
3184
3185 <attribute name="accessible" type="boolean" readonly="yes">
3186 <desc>
3187 Whether this virtual machine is currently accessible or not.
3188
3189 The machine is considered to be inaccessible when:
3190 <ul>
3191 <li>It is a registered virtual machine, and
3192 </li>
3193 <li>Its settings file is inaccessible (for example, it is
3194 located on a network share that is not accessible during
3195 VirtualBox startup, or becomes inaccessible later, or if
3196 the settings file can be read but is invalid).
3197 </li>
3198 </ul>
3199
3200 Otherwise, the value of this property is always <tt>true</tt>.
3201
3202 Every time this property is read, the accessibility state of
3203 this machine is re-evaluated. If the returned value is |false|,
3204 the <link to="#accessError"/> property may be used to get the
3205 detailed error information describing the reason of
3206 inaccessibility.
3207
3208 When the machine is inaccessible, only the following properties
3209 can be used on it:
3210 <ul>
3211 <li><link to="#parent"/></li>
3212 <li><link to="#id"/></li>
3213 <li><link to="#settingsFilePath"/></li>
3214 <li><link to="#accessible"/></li>
3215 <li><link to="#accessError"/></li>
3216 </ul>
3217
3218 An attempt to access any other property or method will return
3219 an error.
3220
3221 The only possible action you can perform on an inaccessible
3222 machine is to unregister it using the
3223 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3224 for the accessibility state once more by querying this
3225 property).
3226
3227 <note>
3228 In the current implementation, once this property returns
3229 <tt>true</tt>, the machine will never become inaccessible
3230 later, even if its settings file cannot be successfully
3231 read/written any more (at least, until the VirtualBox
3232 server is restarted). This limitation may be removed in
3233 future releases.
3234 </note>
3235 </desc>
3236 </attribute>
3237
3238 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3239 <desc>
3240 Error information describing the reason of machine
3241 inaccessibility.
3242
3243 Reading this property is only valid after the last call to
3244 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3245 machine is currently unaccessible). Otherwise, a null
3246 IVirtualBoxErrorInfo object will be returned.
3247 </desc>
3248 </attribute>
3249
3250 <attribute name="name" type="wstring">
3251 <desc>
3252 Name of the virtual machine.
3253
3254 Besides being used for human-readable identification purposes
3255 everywhere in VirtualBox, the virtual machine name is also used
3256 as a name of the machine's settings file and as a name of the
3257 subdirectory this settings file resides in. Thus, every time you
3258 change the value of this property, the settings file will be
3259 renamed once you call <link to="#saveSettings()"/> to confirm the
3260 change. The containing subdirectory will be also renamed, but
3261 only if it has exactly the same name as the settings file
3262 itself prior to changing this property (for backward compatibility
3263 with previous API releases). The above implies the following
3264 limitations:
3265 <ul>
3266 <li>The machine name cannot be empty.</li>
3267 <li>The machine name can contain only characters that are valid
3268 file name characters according to the rules of the file
3269 system used to store VirtualBox configuration.</li>
3270 <li>You cannot have two or more machines with the same name
3271 if they use the same subdirectory for storing the machine
3272 settings files.</li>
3273 <li>You cannot change the name of the machine if it is running,
3274 or if any file in the directory containing the settings file
3275 is being used by another running machine or by any other
3276 process in the host operating system at a time when
3277 <link to="#saveSettings()"/> is called.
3278 </li>
3279 </ul>
3280 If any of the above limitations are hit, <link to="#saveSettings()"/>
3281 will return an appropriate error message explaining the exact
3282 reason and the changes you made to this machine will not be
3283 saved.
3284 <note>
3285 For "legacy" machines created using the
3286 <link to="IVirtualBox::createLegacyMachine()"/> call,
3287 the above naming limitations do not apply because the
3288 machine name does not affect the settings file name.
3289 The settings file name remains the same as it was specified
3290 during machine creation and never changes.
3291 </note>
3292 </desc>
3293 </attribute>
3294
3295 <attribute name="description" type="wstring">
3296 <desc>
3297 Description of the virtual machine.
3298
3299 The description attribute can contain any text and is
3300 typically used to describe the hardware and software
3301 configuration of the virtual machine in detail (i.e. network
3302 settings, versions of the installed software and so on).
3303 </desc>
3304 </attribute>
3305
3306 <attribute name="id" type="uuid" readonly="yes">
3307 <desc>UUID of the virtual machine.</desc>
3308 </attribute>
3309
3310 <attribute name="OSTypeId" type="wstring">
3311 <desc>
3312 User-defined identifier of the Guest OS type.
3313 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3314 an IGuestOSType object representing details about the given
3315 Guest OS type.
3316 <note>
3317 This value may differ from the value returned by
3318 <link to="IGuest::OSTypeId"/> if Guest Additions are
3319 installed to the guest OS.
3320 </note>
3321 </desc>
3322 </attribute>
3323
3324 <attribute name="HardwareVersion" type="wstring">
3325 <desc>Hardware version identifier. Internal use only for now.</desc>
3326 </attribute>
3327
3328 <attribute name="CPUCount" type="unsigned long">
3329 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3330 </attribute>
3331
3332 <attribute name="memorySize" type="unsigned long">
3333 <desc>System memory size in megabytes.</desc>
3334 </attribute>
3335
3336 <attribute name="memoryBalloonSize" type="unsigned long">
3337 <desc>Initial memory balloon size in megabytes.</desc>
3338 </attribute>
3339
3340 <attribute name="statisticsUpdateInterval" type="unsigned long">
3341 <desc>Initial interval to update guest statistics in seconds.</desc>
3342 </attribute>
3343
3344 <attribute name="VRAMSize" type="unsigned long">
3345 <desc>Video memory size in megabytes.</desc>
3346 </attribute>
3347
3348 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3349 <desc>
3350 This setting determines whether VirtualBox allows guests to make use
3351 of the 3D graphics support available on the host. Currently limited
3352 to OpenGL only. </desc>
3353 </attribute>
3354
3355 <attribute name="monitorCount" type="unsigned long">
3356 <desc>
3357 Number of virtual monitors.
3358 <note>
3359 Only effective on Windows XP and later guests with
3360 Guest Additions installed.
3361 </note>
3362 </desc>
3363 </attribute>
3364
3365 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3366 <desc>Object containing all BIOS settings.</desc>
3367 </attribute>
3368
3369 <attribute name="HWVirtExEnabled" type="TSBool">
3370 <desc>
3371 This setting determines whether VirtualBox will try to make use of
3372 the host CPU's hardware virtualization extensions such as Intel VT-x
3373 and AMD-V. Note that in case such extensions are not available,
3374 they will not be used.
3375 </desc>
3376 </attribute>
3377
3378 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3379 <desc>
3380 This setting determines whether VirtualBox will try to make use of
3381 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3382 such extensions are not available, they will not be used.
3383 </desc>
3384 </attribute>
3385
3386 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3387 <desc>
3388 This setting determines whether VirtualBox will try to make use of
3389 the VPID extension of Intel VT-x. Note that in case such extensions are
3390 not available, they will not be used.
3391 </desc>
3392 </attribute>
3393
3394 <attribute name="PAEEnabled" type="boolean" default="false">
3395 <desc>
3396 This setting determines whether VirtualBox will expose the Physical Address
3397 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3398 is not available, it will not be reported.
3399 </desc>
3400 </attribute>
3401
3402 <attribute name="snapshotFolder" type="wstring">
3403 <desc>
3404 Full path to the directory used to store snapshot data
3405 (differencing hard disks and saved state files) of this machine.
3406
3407 The initial value of this property is
3408 <tt>&lt;</tt><link to="#settingsFilePath">
3409 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3410 <link to="#id">machine_uuid</link>
3411 <tt>&gt;</tt>.
3412
3413 Currently, it is an error to try to change this property on
3414 a machine that has snapshots (because this would require to
3415 move possibly large files to a different location).
3416 A separate method will be available for this purpose later.
3417
3418 <note>
3419 Setting this property to <tt>null</tt> will restore the
3420 initial value.
3421 </note>
3422 <note>
3423 When setting this property, the specified path can be
3424 absolute (full path) or relative to the directory where the
3425 <link to="#settingsFilePath">machine settings file</link>
3426 is located. When reading this property, a full path is
3427 always returned.
3428 </note>
3429 <note>
3430 The specified path may not exist, it will be created
3431 when necessary.
3432 </note>
3433 </desc>
3434 </attribute>
3435
3436 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3437 <desc>VRDP server object.</desc>
3438 </attribute>
3439
3440 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3441 <desc>Array of hard disks attached to this machine.</desc>
3442 </attribute>
3443
3444 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3445 <desc>Associated DVD drive object.</desc>
3446 </attribute>
3447
3448 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3449 <desc>Associated floppy drive object.</desc>
3450 </attribute>
3451
3452 <attribute name="USBController" type="IUSBController" readonly="yes">
3453 <desc>
3454 Associated USB controller object.
3455
3456 <note>
3457 This method may set a @ref com_warnings "warning result code".
3458 </note>
3459 <note>
3460 If USB functionality is not available in the given edition of
3461 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3462 </note>
3463 </desc>
3464 </attribute>
3465
3466 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3467 <desc>Associated audio adapter, always present.</desc>
3468 </attribute>
3469
3470 <attribute name="SATAController" type="ISATAController" readonly="yes">
3471 <desc>
3472 Associated SATA controller object.
3473 </desc>
3474 </attribute>
3475
3476 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3477 <desc>
3478 Full name of the file containing machine settings data.
3479 </desc>
3480 </attribute>
3481
3482 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3483 <desc>
3484 Current version of the format of the settings file of this machine
3485 (<link to="#settingsFilePath"/>).
3486
3487 The version string has the following format:
3488 <pre>
3489 x.y-platform
3490 </pre>
3491 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3492 versions, and <tt>platform</tt> is the platform identifier.
3493
3494 The current version usually matches the value of the
3495 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3496 settings file was created by an older version of VirtualBox and there
3497 was a change of the settings file format since then.
3498
3499 Note that VirtualBox automatically converts settings files from older
3500 versions to the most recent version when reading them (usually at
3501 VirtualBox startup) but it doesn't save the changes back until
3502 you call a method that implicitly saves settings (such as
3503 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3504 explicitly. Therefore, if the value of this attribute differs from the
3505 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3506 means that the settings file was converted but the result of the
3507 conversion is not yet saved to disk.
3508
3509 The above feature may be used by interactive front-ends to inform users
3510 about the settings file format change and offer them to explicitly save
3511 all converted settings files (the global and VM-specific ones),
3512 optionally create backup copies of the old settings files before saving,
3513 etc.
3514
3515 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3516 </desc>
3517 </attribute>
3518
3519 <attribute name="settingsModified" type="boolean" readonly="yes">
3520 <desc>
3521 Whether the settings of this machine have been modified
3522 (but neither yet saved nor discarded).
3523 <note>
3524 Reading this property is only valid on instances returned
3525 by <link to="ISession::machine"/> and on new machines
3526 created by <link to="IVirtualBox::createMachine"/> or opened
3527 by <link to="IVirtualBox::openMachine"/> but not
3528 yet registered, or on unregistered machines after calling
3529 <link to="IVirtualBox::unregisterMachine"/>. For all other
3530 cases, the settings can never be modified.
3531 </note>
3532 <note>
3533 For newly created unregistered machines, the value of this
3534 property is always TRUE until <link to="#saveSettings()"/>
3535 is called (no matter if any machine settings have been
3536 changed after the creation or not). For opened machines
3537 the value is set to FALSE (and then follows to normal rules).
3538 </note>
3539 </desc>
3540 </attribute>
3541
3542 <attribute name="sessionState" type="SessionState" readonly="yes">
3543 <desc>Current session state for this machine.</desc>
3544 </attribute>
3545
3546 <attribute name="sessionType" type="wstring" readonly="yes">
3547 <desc>
3548 Type of the session. If <link to="#sessionState"/> is
3549 SessionSpawning or SessionOpen, this attribute contains the
3550 same value as passed to the
3551 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3552 type parameter. If the session was opened directly using
3553 <link to="IVirtualBox::openSession()"/>, or if
3554 <link to="#sessionState"/> is SessionClosed, the value of this
3555 attribute is @c null.
3556 </desc>
3557 </attribute>
3558
3559 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3560 <desc>
3561 Identifier of the session process. This attribute contains the
3562 platform-dependent identifier of the process that has opened a
3563 direct session for this machine using the
3564 <link to="IVirtualBox::openSession()"/> call. The returned value
3565 is only valid if <link to="#sessionState"/> is SessionOpen or
3566 SessionClosing (i.e. a session is currently open or being
3567 closed) by the time this property is read.
3568 </desc>
3569 </attribute>
3570
3571 <attribute name="state" type="MachineState" readonly="yes">
3572 <desc>Current execution state of this machine.</desc>
3573 </attribute>
3574
3575 <attribute name="lastStateChange" type="long long" readonly="yes">
3576 <desc>
3577 Time stamp of the last execution state change,
3578 in milliseconds since 1970-01-01 UTC.
3579 </desc>
3580 </attribute>
3581
3582 <attribute name="stateFilePath" type="wstring" readonly="yes">
3583 <desc>
3584 Full path to the file that stores the execution state of
3585 the machine when it is in the <link to="MachineState_Saved"/> state.
3586 <note>
3587 When the machine is not in the Saved state, this attribute
3588 <tt>null</tt>.
3589 </note>
3590 </desc>
3591 </attribute>
3592
3593 <attribute name="logFolder" type="wstring" readonly="yes">
3594 <desc>
3595 Full path to the folder that stores a set of rotated log files
3596 recorded during machine execution. The most recent log file is
3597 named <tt>VBox.log</tt>, the previous log file is
3598 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3599 in the current version).
3600 </desc>
3601 </attribute>
3602
3603 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3604 <desc>
3605 Current snapshot of this machine.
3606 <note>
3607 A <tt>null</tt> object is returned if the machine doesn't
3608 have snapshots.
3609 </note>
3610 <see><link to="ISnapshot"/></see>
3611 </desc>
3612 </attribute>
3613
3614 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3615 <desc>
3616 Number of snapshots taken on this machine. Zero means the
3617 machine doesn't have any snapshots.
3618 </desc>
3619 </attribute>
3620
3621 <attribute name="currentStateModified" type="boolean" readonly="yes">
3622 <desc>
3623 Returns <tt>true</tt> if the current state of the machine is not
3624 identical to the state stored in the current snapshot.
3625
3626 The current state is identical to the current snapshot right
3627 after one of the following calls are made:
3628 <ul>
3629 <li><link to="IConsole::discardCurrentState"/> or
3630 <link to="IConsole::discardCurrentSnapshotAndState"/>
3631 </li>
3632 <li><link to="IConsole::takeSnapshot"/> (issued on a
3633 powered off or saved machine, for which
3634 <link to="#settingsModified"/> returns <tt>false</tt>)
3635 </li>
3636 <li><link to="IMachine::setCurrentSnapshot"/>
3637 </li>
3638 </ul>
3639
3640 The current state remains identical until one of the following
3641 happens:
3642 <ul>
3643 <li>settings of the machine are changed</li>
3644 <li>the saved state is discarded</li>
3645 <li>the current snapshot is discarded</li>
3646 <li>an attempt to execute the machine is made</li>
3647 </ul>
3648
3649 <note>
3650 For machines that don't have snapshots, this property is
3651 always <tt>false</tt>.
3652 </note>
3653 </desc>
3654 </attribute>
3655
3656 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
3657 <desc>
3658 Collection of shared folders for this machine (permanent shared
3659 folders). These folders are shared automatically at machine startup
3660 and available only to the guest OS installed within this machine.
3661
3662 New shared folders are added to the collection using
3663 <link to="#createSharedFolder"/>. Existing shared folders can be
3664 removed using <link to="#removeSharedFolder"/>.
3665 </desc>
3666 </attribute>
3667
3668 <attribute name="clipboardMode" type="ClipboardMode">
3669 <desc>
3670 Synchronization mode between the host OS clipboard
3671 and the guest OS clipboard.
3672 </desc>
3673 </attribute>
3674
3675 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3676 <desc>
3677 A comma-separated list of simple glob patterns. Changes to guest
3678 properties whose name matches one of the patterns will generate an
3679 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
3680 </desc>
3681 </attribute>
3682
3683 <method name="setBootOrder">
3684 <desc>
3685 Puts the given device to the specified position in
3686 the boot order.
3687
3688 To indicate that no device is associated with the given position,
3689 <link to="DeviceType_Null"/> should be used.
3690
3691 @todo setHardDiskBootOrder(), setNetworkBootOrder()
3692
3693 <result name="E_INVALIDARG">
3694 Boot @a position out of range.
3695 </result>
3696 <result name="E_NOTIMPL">
3697 Booting from USB @a device currently not supported.
3698 </result>
3699
3700 </desc>
3701 <param name="position" type="unsigned long" dir="in">
3702 <desc>
3703 Position in the boot order (<tt>1</tt> to the total number of
3704 devices the machine can boot from, as returned by
3705 <link to="ISystemProperties::maxBootPosition"/>).
3706 </desc>
3707 </param>
3708 <param name="device" type="DeviceType" dir="in">
3709 <desc>
3710 The type of the device used to boot at the given position.
3711 </desc>
3712 </param>
3713 </method>
3714
3715 <method name="getBootOrder" const="yes">
3716 <desc>
3717 Returns the device type that occupies the specified
3718 position in the boot order.
3719
3720 @todo [remove?]
3721 If the machine can have more than one device of the returned type
3722 (such as hard disks), then a separate method should be used to
3723 retrieve the individual device that occupies the given position.
3724
3725 If here are no devices at the given position, then
3726 <link to="DeviceType_Null"/> is returned.
3727
3728 @todo getHardDiskBootOrder(), getNetworkBootOrder()
3729
3730 <result name="E_INVALIDARG">
3731 Boot @a position out of range.
3732 </result>
3733
3734 </desc>
3735 <param name="position" type="unsigned long" dir="in">
3736 <desc>
3737 Position in the boot order (<tt>1</tt> to the total number of
3738 devices the machine can boot from, as returned by
3739 <link to="ISystemProperties::maxBootPosition"/>).
3740 </desc>
3741 </param>
3742 <param name="device" type="DeviceType" dir="return">
3743 <desc>
3744 Device at the given position.
3745 </desc>
3746 </param>
3747 </method>
3748
3749 <method name="attachHardDisk2">
3750 <desc>
3751 Attaches a virtual hard disk identified by the given UUID @a id
3752 to a device slot of the specified bus.
3753
3754 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
3755 specify the primary or secondary IDE controller, respectively. The
3756 SATA bus supports 30 channels, so this parameter can be a number
3757 ranging from @c 0 to @c 29.
3758
3759 For the primary controller of the IDE bus, the @a device number can be
3760 either @c 0 or @c 1, to specify the master or the slave device,
3761 respectively. For the secondary IDE controller, the device number is
3762 always @c 1 because the master device is reserved for the CD-ROM drive.
3763
3764 For the SATA bus, the @a device parameter is currently unused and
3765 must be @c 0.
3766
3767 The specified device slot must not have another disk attached to it, or
3768 this method will fail.
3769
3770 See <link to="IHardDisk2"/> for more detailed information about
3771 attaching hard disks.
3772
3773 <note>
3774 You cannot attach a hard disk to a running machine. Also, you cannot
3775 attach a hard disk to a newly created machine until this machine's
3776 settings are saved to disk using <link to="#saveSettings()"/>.
3777 </note>
3778 <note>
3779 If the hard disk is being attached indirectly, a new differencing hard
3780 disk will implicitly be created for it and attached instead. If the
3781 changes made to the machine settings (including this indirect
3782 attachment) are later cancelled using <link to="#discardSettings()"/>,
3783 this implicitly created differencing hard disk will implicitly
3784 be deleted.
3785 </note>
3786
3787 <result name="E_INVALIDARG">
3788 SATA device, SATA channel, IDE channel or IDE slot out of range.
3789 </result>
3790 <result name="VBOX_E_INVALID_OBJECT_STATE">
3791 Attempt to attach hard disk to an unregistered virtual machine.
3792 </result>
3793 <result name="VBOX_E_INVALID_VM_STATE">
3794 Invalid machine state.
3795 </result>
3796 <result name="VBOX_E_OBJECT_IN_USE">
3797 Hard disk already attached to this or another virtual machine.
3798 </result>
3799
3800 </desc>
3801 <param name="id" type="uuid" dir="in">
3802 <desc>UUID of the hard disk to attach.</desc>
3803 </param>
3804 <param name="bus" type="StorageBus" dir="in">
3805 <desc>Type of the storage bus to use (IDE or SATA).</desc>
3806 </param>
3807 <param name="channel" type="long" dir="in">
3808 <desc>Channel to attach the hard disk to.</desc>
3809 </param>
3810 <param name="device" type="long" dir="in">
3811 <desc>
3812 Device slot in the given channel to attach the hard disk to.
3813 </desc>
3814 </param>
3815 </method>
3816
3817 <method name="getHardDisk2" const="yes">
3818 <desc>
3819 Returns the virtual hard disk attached to a device slot of the specified
3820 bus.
3821
3822 Note that if the hard disk was indirectly attached by
3823 <link to="#attachHardDisk2()"/> to the given device slot then this
3824 method will return not the same object as passed to the
3825 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
3826 more detailed information about attaching hard disks.
3827
3828 <result name="VBOX_E_OBJECT_NOT_FOUND">
3829 No hard disk attached to given slot/bus.
3830 </result>
3831
3832 </desc>
3833 <param name="bus" type="StorageBus" dir="in">
3834 <desc>Type of the storage bus to query (IDE or SATA).</desc>
3835 </param>
3836 <param name="channel" type="long" dir="in">
3837 <desc>Channel to query.</desc>
3838 </param>
3839 <param name="device" type="long" dir="in">
3840 <desc>Device slot in the given channel to query.</desc>
3841 </param>
3842 <param name="hardDisk" type="IHardDisk2" dir="return">
3843 <desc>Attached hard disk object.</desc>
3844 </param>
3845 </method>
3846
3847 <method name="detachHardDisk2">
3848 <desc>
3849 Detaches the virtual hard disk attached to a device slot of the
3850 specified bus.
3851
3852 Detaching the hard disk from the virtual machine is deferred. This means
3853 that the hard disk remains associated with the machine when this method
3854 returns and gets actually de-associated only after a successful
3855 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
3856 for more detailed information about attaching hard disks.
3857
3858 <note>
3859 You cannot detach the hard disk from a running machine.
3860 </note>
3861 <note>
3862 Detaching differencing hard disks implicitly created by <link
3863 to="#attachHardDisk2()"/> for the indirect attachment using this
3864 method will <b>not</b> implicitly delete them. The
3865 <link to="IHardDisk2::deleteStorage()"/> operation should be
3866 explicitly performed by the caller after the hard disk is successfully
3867 detached and the settings are saved with
3868 <link to="#saveSettings()"/>, if it is the desired action.
3869 </note>
3870
3871 <result name="VBOX_E_INVALID_VM_STATE">
3872 Attempt to detach hard disk from a running virtual machine.
3873 </result>
3874 <result name="VBOX_E_OBJECT_NOT_FOUND">
3875 No hard disk attached to given slot/bus.
3876 </result>
3877 <result name="VBOX_E_NOT_SUPPORTED">
3878 Hard disk format does not support storage deletion.
3879 </result>
3880
3881 </desc>
3882 <param name="bus" type="StorageBus" dir="in">
3883 <desc>Bus to detach the hard disk from.</desc>
3884 </param>
3885 <param name="channel" type="long" dir="in">
3886 <desc>Channel number to detach the hard disk from.</desc>
3887 </param>
3888 <param name="device" type="long" dir="in">
3889 <desc>Device slot number to detach the hard disk from.</desc>
3890 </param>
3891 </method>
3892
3893 <method name="getNetworkAdapter" const="yes">
3894 <desc>
3895 Returns the network adapter associated with the given slot.
3896 Slots are numbered sequentially, starting with zero. The total
3897 number of adapters per machine is defined by the
3898 <link to="ISystemProperties::networkAdapterCount"/> property,
3899 so the maximum slot number is one less than that property's value.
3900
3901 <result name="E_INVALIDARG">
3902 Invalid @a slot number.
3903 </result>
3904
3905 </desc>
3906 <param name="slot" type="unsigned long" dir="in"/>
3907 <param name="adapter" type="INetworkAdapter" dir="return"/>
3908 </method>
3909
3910 <method name="getSerialPort" const="yes">
3911 <desc>
3912 Returns the serial port associated with the given slot.
3913 Slots are numbered sequentially, starting with zero. The total
3914 number of serial ports per machine is defined by the
3915 <link to="ISystemProperties::serialPortCount"/> property,
3916 so the maximum slot number is one less than that property's value.
3917
3918 <result name="E_INVALIDARG">
3919 Invalid @a slot number.
3920 </result>
3921
3922 </desc>
3923 <param name="slot" type="unsigned long" dir="in"/>
3924 <param name="port" type="ISerialPort" dir="return"/>
3925 </method>
3926
3927 <method name="getParallelPort" const="yes">
3928 <desc>
3929 Returns the parallel port associated with the given slot.
3930 Slots are numbered sequentially, starting with zero. The total
3931 number of parallel ports per machine is defined by the
3932 <link to="ISystemProperties::parallelPortCount"/> property,
3933 so the maximum slot number is one less than that property's value.
3934
3935 <result name="E_INVALIDARG">
3936 Invalid @a slot number.
3937 </result>
3938
3939 </desc>
3940 <param name="slot" type="unsigned long" dir="in"/>
3941 <param name="port" type="IParallelPort" dir="return"/>
3942 </method>
3943
3944 <method name="getNextExtraDataKey">
3945 <desc>
3946 Returns the machine-specific extra data key name following the
3947 supplied key.
3948
3949 An error is returned if the supplied @a key does not exist. @c NULL is
3950 returned in @a nextKey if the supplied key is the last key. When
3951 supplying @c NULL for the @a key, the first key item is returned in @a
3952 nextKey (if there is any). @a nextValue is an optional parameter and
3953 if supplied, the next key's value is returned in it.
3954
3955 <result name="VBOX_E_OBJECT_NOT_FOUND">
3956 Extra data @a key not found.
3957 </result>
3958
3959 </desc>
3960 <param name="key" type="wstring" dir="in">
3961 <desc>Name of the data key to follow.</desc>
3962 </param>
3963 <param name="nextKey" type="wstring" dir="out">
3964 <desc>Name of the next data key.</desc>
3965 </param>
3966 <param name="nextValue" type="wstring" dir="out">
3967 <desc>Value of the next data key.</desc>
3968 </param>
3969 </method>
3970
3971 <method name="getExtraData">
3972 <desc>
3973 Returns associated machine-specific extra data.
3974
3975 If the requested data @a key does not exist, this function will
3976 succeed and return @c NULL in the @a value argument.
3977
3978 <result name="VBOX_E_FILE_ERROR">
3979 Settings file not accessible.
3980 </result>
3981 <result name="VBOX_E_XML_ERROR">
3982 Could not parse the settings file.
3983 </result>
3984
3985 </desc>
3986 <param name="key" type="wstring" dir="in">
3987 <desc>Name of the data key to get.</desc>
3988 </param>
3989 <param name="value" type="wstring" dir="return">
3990 <desc>Value of the requested data key.</desc>
3991 </param>
3992 </method>
3993
3994 <method name="setExtraData">
3995 <desc>
3996 Sets associated machine-specific extra data.
3997
3998 If you pass @c NULL as a key @a value, the given @a key will be
3999 deleted.
4000
4001 <note>
4002 Before performing the actual data change, this method will ask all
4003 registered callbacks using the
4004 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
4005 notification for a permission. If one of the callbacks refuses the
4006 new value, the change will not be performed.
4007 </note>
4008 <note>
4009 On success, the
4010 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4011 is called to inform all registered callbacks about a successful data
4012 change.
4013 </note>
4014 <note>
4015 This method can be called outside the machine session and therefore
4016 it's a caller's responsibility to handle possible race conditions
4017 when several clients change the same key at the same time.
4018 </note>
4019
4020 <result name="VBOX_E_FILE_ERROR">
4021 Settings file not accessible.
4022 </result>
4023 <result name="VBOX_E_XML_ERROR">
4024 Could not parse the settings file.
4025 </result>
4026
4027 </desc>
4028 <param name="key" type="wstring" dir="in">
4029 <desc>Name of the data key to set.</desc>
4030 </param>
4031 <param name="value" type="wstring" dir="in">
4032 <desc>Value to assign to the key.</desc>
4033 </param>
4034 </method>
4035
4036 <method name="saveSettings">
4037 <desc>
4038 Saves any changes to machine settings made since the session
4039 has been opened or a new machine has been created, or since the
4040 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4041 For registered machines, new settings become visible to all
4042 other VirtualBox clients after successful invocation of this
4043 method.
4044 <note>
4045 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4046 notification event after the configuration has been successfully
4047 saved (only for registered machines).
4048 </note>
4049 <note>
4050 Calling this method is only valid on instances returned
4051 by <link to="ISession::machine"/> and on new machines
4052 created by <link to="IVirtualBox::createMachine"/> but not
4053 yet registered, or on unregistered machines after calling
4054 <link to="IVirtualBox::unregisterMachine"/>.
4055 </note>
4056
4057 <result name="VBOX_E_FILE_ERROR">
4058 Settings file not accessible.
4059 </result>
4060 <result name="VBOX_E_XML_ERROR">
4061 Could not parse the settings file.
4062 </result>
4063 <result name="E_ACCESSDENIED">
4064 Modification request refused.
4065 </result>
4066
4067 </desc>
4068 </method>
4069
4070 <method name="saveSettingsWithBackup">
4071 <desc>
4072 Creates a backup copy of the machine settings file (<link
4073 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4074 <link to="#saveSettings()"/>.
4075
4076 Note that the backup copy is created <b>only</b> if the settings file
4077 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4078 details). Otherwise, this call is fully equivalent to
4079 <link to="#saveSettings()"/> and no backup copying is done.
4080
4081 The backup copy is created in the same directory where the original
4082 settings file is located. It is given the following file name:
4083 <pre>
4084 original.xml.x.y-platform.bak
4085 </pre>
4086 where <tt>original.xml</tt> is the original settings file name
4087 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4088 format of the settings file (before auto-conversion).
4089
4090 If the given backup file already exists, this method will try to add the
4091 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4092 0 to 9) and copy it again until it succeeds. If all suffixes are
4093 occupied, or if any other copy error occurs, this method will return a
4094 failure.
4095
4096 If the copy operation succeeds, the @a bakFileName return argument will
4097 receive a full path to the created backup file (for informational
4098 purposes). Note that this will happen even if the subsequent
4099 <link to="#saveSettings()"/> call performed by this method after the
4100 copy operation, fails.
4101
4102 <note>
4103 The VirtualBox API never calls this method. It is intended purely for
4104 the purposes of creating backup copies of the settings files by
4105 front-ends before saving the results of the automatically performed
4106 settings conversion to disk.
4107 </note>
4108
4109 <see>settingsFileVersion</see>
4110
4111 <result name="VBOX_E_FILE_ERROR">
4112 Settings file not accessible.
4113 </result>
4114 <result name="VBOX_E_XML_ERROR">
4115 Could not parse the settings file.
4116 </result>
4117 <result name="VBOX_E_INVALID_VM_STATE">
4118 Virtual machine is not mutable.
4119 </result>
4120 <result name="E_ACCESSDENIED">
4121 Modification request refused.
4122 </result>
4123
4124 </desc>
4125 <param name="bakFileName" type="wstring" dir="return">
4126 <desc>Full path to the created backup copy.</desc>
4127 </param>
4128 </method>
4129
4130 <method name="discardSettings">
4131 <desc>
4132 Discards any changes to the machine settings made since the session
4133 has been opened or since the last call to <link to="#saveSettings()"/>
4134 or <link to="#discardSettings"/>.
4135 <note>
4136 Calling this method is only valid on instances returned
4137 by <link to="ISession::machine"/> and on new machines
4138 created by <link to="IVirtualBox::createMachine"/> or
4139 opened by <link to="IVirtualBox::openMachine"/> but not
4140 yet registered, or on unregistered machines after calling
4141 <link to="IVirtualBox::unregisterMachine"/>.
4142 </note>
4143
4144 <result name="VBOX_E_INVALID_VM_STATE">
4145 Virtual machine is not mutable.
4146 </result>
4147
4148 </desc>
4149 </method>
4150
4151 <method name="deleteSettings">
4152 <desc>
4153 Deletes the settings file of this machine from disk.
4154 The machine must not be registered in order for this operation
4155 to succeed.
4156 <note>
4157 <link to="#settingsModified"/> will return TRUE after this
4158 method successfully returns.
4159 </note>
4160 <note>
4161 Calling this method is only valid on instances returned
4162 by <link to="ISession::machine"/> and on new machines
4163 created by <link to="IVirtualBox::createMachine"/> or
4164 opened by <link to="IVirtualBox::openMachine"/> but not
4165 yet registered, or on unregistered machines after calling
4166 <link to="IVirtualBox::unregisterMachine"/>.
4167 </note>
4168 <note>
4169 The deleted machine settings file can be restored (saved again)
4170 by calling <link to="#saveSettings()"/>.
4171 </note>
4172
4173 <result name="VBOX_E_INVALID_VM_STATE">
4174 Cannot delete settings of a registered machine or
4175 machine not mutable.
4176 </result>
4177 <result name="VBOX_E_IPRT_ERROR">
4178 Could not delete the settings file.
4179 </result>
4180
4181 </desc>
4182 </method>
4183
4184 <method name="getSnapshot">
4185 <desc>
4186 Returns a snapshot of this machine with the given UUID.
4187 A <tt>null</tt> UUID can be used to obtain the first snapshot
4188 taken on this machine. This is useful if you want to traverse
4189 the whole tree of snapshots starting from the root.
4190
4191 <result name="VBOX_E_OBJECT_NOT_FOUND">
4192 Virtual machine has no snapshots or snapshot not found.
4193 </result>
4194
4195 </desc>
4196 <param name="id" type="uuid" dir="in">
4197 <desc>UUID of the snapshot to get</desc>
4198 </param>
4199 <param name="snapshot" type="ISnapshot" dir="return">
4200 <desc>Snapshot object with the given UUID.</desc>
4201 </param>
4202 </method>
4203
4204 <method name="findSnapshot">
4205 <desc>
4206 Returns a snapshot of this machine with the given name.
4207
4208 <result name="VBOX_E_OBJECT_NOT_FOUND">
4209 Virtual machine has no snapshots or snapshot not found.
4210 </result>
4211
4212 </desc>
4213 <param name="name" type="wstring" dir="in">
4214 <desc>Name of the snapshot to find</desc>
4215 </param>
4216 <param name="snapshot" type="ISnapshot" dir="return">
4217 <desc>Snapshot object with the given name.</desc>
4218 </param>
4219 </method>
4220
4221 <method name="setCurrentSnapshot">
4222 <desc>
4223 Sets the current snapshot of this machine.
4224 <note>
4225 In the current implementation, this operation is not
4226 implemented.
4227 </note>
4228 </desc>
4229 <param name="id" type="uuid" dir="in">
4230 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4231 </param>
4232 </method>
4233
4234 <method name="createSharedFolder">
4235 <desc>
4236 Creates a new permanent shared folder by associating the given logical
4237 name with the given host path, adds it to the collection of shared
4238 folders and starts sharing it. Refer to the description of
4239 <link to="ISharedFolder"/> to read more about logical names.
4240
4241 <result name="VBOX_E_OBJECT_IN_USE">
4242 Shared folder already exists.
4243 </result>
4244 <result name="VBOX_E_FILE_ERROR">
4245 Shared folder @a hostPath not accessible.
4246 </result>
4247
4248 </desc>
4249 <param name="name" type="wstring" dir="in">
4250 <desc>Unique logical name of the shared folder.</desc>
4251 </param>
4252 <param name="hostPath" type="wstring" dir="in">
4253 <desc>Full path to the shared folder in the host file system.</desc>
4254 </param>
4255 <param name="writable" type="boolean" dir="in">
4256 <desc>Whether the share is writable or readonly</desc>
4257 </param>
4258 </method>
4259
4260 <method name="removeSharedFolder">
4261 <desc>
4262 Removes the permanent shared folder with the given name previously
4263 created by <link to="#createSharedFolder"/> from the collection of
4264 shared folders and stops sharing it.
4265
4266 <result name="VBOX_E_INVALID_VM_STATE">
4267 Virtual machine is not mutable.
4268 </result>
4269 <result name="VBOX_E_OBJECT_NOT_FOUND">
4270 Shared folder @a name does not exist.
4271 </result>
4272
4273 </desc>
4274 <param name="name" type="wstring" dir="in">
4275 <desc>Logical name of the shared folder to remove.</desc>
4276 </param>
4277 </method>
4278
4279 <method name="canShowConsoleWindow">
4280 <desc>
4281 Returns @c true if the VM console process can activate the
4282 console window and bring it to foreground on the desktop of
4283 the host PC.
4284 <note>
4285 This method will fail if a session for this machine is not
4286 currently open.
4287 </note>
4288
4289 <result name="VBOX_E_INVALID_VM_STATE">
4290 Machine session is not open.
4291 </result>
4292
4293 </desc>
4294 <param name="canShow" type="boolean" dir="return">
4295 <desc>
4296 @c true if the console window can be shown and @c
4297 false otherwise.
4298 </desc>
4299 </param>
4300 </method>
4301
4302 <method name="showConsoleWindow">
4303 <desc>
4304 Activates the console window and brings it to foreground on
4305 the desktop of the host PC. Many modern window managers on
4306 many platforms implement some sort of focus stealing
4307 prevention logic, so that it may be impossible to activate
4308 a window without the help of the currently active
4309 application. In this case, this method will return a non-zero
4310 identifier that represents the top-level window of the VM
4311 console process. The caller, if it represents a currently
4312 active process, is responsible to use this identifier (in a
4313 platform-dependent manner) to perform actual window
4314 activation.
4315 <note>
4316 This method will fail if a session for this machine is not
4317 currently open.
4318 </note>
4319
4320 <result name="VBOX_E_INVALID_VM_STATE">
4321 Machine session is not open.
4322 </result>
4323
4324 </desc>
4325 <param name="winId" type="unsigned long long" dir="return">
4326 <desc>
4327 Platform-dependent identifier of the top-level VM console
4328 window, or zero if this method has performed all actions
4329 necessary to implement the <i>show window</i> semantics for
4330 the given platform and/or VirtualBox front-end.
4331 </desc>
4332 </param>
4333 </method>
4334
4335 <method name="getGuestProperty">
4336 <desc>
4337 Reads an entry from the machine's guest property store.
4338
4339 <result name="VBOX_E_INVALID_VM_STATE">
4340 Machine session is not open.
4341 </result>
4342
4343 </desc>
4344 <param name="name" type="wstring" dir="in">
4345 <desc>
4346 The name of the property to read.
4347 </desc>
4348 </param>
4349 <param name="value" type="wstring" dir="out">
4350 <desc>
4351 The value of the property. If the property does not exist then this
4352 will be empty.
4353 </desc>
4354 </param>
4355 <param name="timestamp" type="unsigned long long" dir="out">
4356 <desc>
4357 The time at which the property was last modified, as seen by the
4358 server process.
4359 </desc>
4360 </param>
4361 <param name="flags" type="wstring" dir="out">
4362 <desc>
4363 Additional property parameters, passed as a comma-separated list of
4364 "name=value" type entries.
4365 </desc>
4366 </param>
4367 </method>
4368
4369 <method name="getGuestPropertyValue">
4370 <desc>
4371 Reads a value from the machine's guest property store.
4372
4373 <result name="VBOX_E_INVALID_VM_STATE">
4374 Machine session is not open.
4375 </result>
4376
4377 </desc>
4378 <param name="property" type="wstring" dir="in">
4379 <desc>
4380 The name of the property to read.
4381 </desc>
4382 </param>
4383 <param name="value" type="wstring" dir="return">
4384 <desc>
4385 The value of the property. If the property does not exist then this
4386 will be empty.
4387 </desc>
4388 </param>
4389 </method>
4390
4391 <method name="getGuestPropertyTimestamp">
4392 <desc>
4393 Reads a property timestamp from the machine's guest property store.
4394
4395 <result name="VBOX_E_INVALID_VM_STATE">
4396 Machine session is not open.
4397 </result>
4398
4399 </desc>
4400 <param name="property" type="wstring" dir="in">
4401 <desc>
4402 The name of the property to read.
4403 </desc>
4404 </param>
4405 <param name="value" type="unsigned long long" dir="return">
4406 <desc>
4407 The timestamp. If the property does not exist then this will be
4408 empty.
4409 </desc>
4410 </param>
4411 </method>
4412
4413 <method name="setGuestProperty">
4414 <desc>
4415 Sets, changes or deletes an entry in the machine's guest property
4416 store.
4417
4418 <result name="E_ACCESSDENIED">
4419 Property cannot be changed.
4420 </result>
4421 <result name="E_INVALIDARG">
4422 Invalid @a flags.
4423 </result>
4424 <result name="VBOX_E_INVALID_VM_STATE">
4425 Virtual machine is not mutable or session not open.
4426 </result>
4427 <result name="VBOX_E_INVALID_OBJECT_STATE">
4428 Cannot set transient property when machine not running.
4429 </result>
4430
4431 </desc>
4432 <param name="property" type="wstring" dir="in">
4433 <desc>
4434 The name of the property to set, change or delete.
4435 </desc>
4436 </param>
4437 <param name="value" type="wstring" dir="in">
4438 <desc>
4439 The new value of the property to set, change or delete. If the
4440 property does not yet exist and value is non-empty, it will be
4441 created. If the value is empty, the key will be deleted if it
4442 exists.
4443 </desc>
4444 </param>
4445 <param name="flags" type="wstring" dir="in">
4446 <desc>
4447 Additional property parameters, passed as a comma-separated list of
4448 "name=value" type entries.
4449 </desc>
4450 </param>
4451 </method>
4452
4453 <method name="setGuestPropertyValue">
4454 <desc>
4455 Sets, changes or deletes a value in the machine's guest property
4456 store. The flags field will be left unchanged or created empty for a
4457 new property.
4458
4459 <result name="E_ACCESSDENIED">
4460 Property cannot be changed.
4461 </result>
4462 <result name="VBOX_E_INVALID_VM_STATE">
4463 Virtual machine is not mutable or session not open.
4464 </result>
4465 <result name="VBOX_E_INVALID_OBJECT_STATE">
4466 Cannot set transient property when machine not running.
4467 </result>
4468 </desc>
4469
4470 <param name="property" type="wstring" dir="in">
4471 <desc>
4472 The name of the property to set, change or delete.
4473 </desc>
4474 </param>
4475 <param name="value" type="wstring" dir="in">
4476 <desc>
4477 The new value of the property to set, change or delete. If the
4478 property does not yet exist and value is non-empty, it will be
4479 created. If value is empty, the property will be deleted if it
4480 exists.
4481 </desc>
4482 </param>
4483 </method>
4484
4485 <method name="enumerateGuestProperties">
4486 <desc>
4487 Return a list of the guest properties matching a set of patterns along
4488 with their values, time stamps and flags.
4489 </desc>
4490 <param name="patterns" type="wstring" dir="in">
4491 <desc>
4492 The patterns to match the properties against, separated by '|'
4493 characters. If this is empty or NULL, all properties will match.
4494 </desc>
4495 </param>
4496 <param name="name" type="wstring" dir="out" safearray="yes">
4497 <desc>
4498 The names of the properties returned.
4499 </desc>
4500 </param>
4501 <param name="value" type="wstring" dir="out" safearray="yes">
4502 <desc>
4503 The values of the properties returned. The array entries match the
4504 corresponding entries in the @a name array.
4505 </desc>
4506 </param>
4507 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4508 <desc>
4509 The time stamps of the properties returned. The array entries match
4510 the corresponding entries in the @a name array.
4511 </desc>
4512 </param>
4513 <param name="flags" type="wstring" dir="out" safearray="yes">
4514 <desc>
4515 The flags of the properties returned. The array entries match the
4516 corresponding entries in the @a name array.
4517 </desc>
4518 </param>
4519 </method>
4520</interface>
4521
4522 <!--
4523 // IConsole
4524 /////////////////////////////////////////////////////////////////////////
4525 -->
4526
4527 <interface
4528 name="IConsoleCallback" extends="$unknown"
4529 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4530 wsmap="suppress"
4531 >
4532
4533 <method name="onMousePointerShapeChange">
4534 <desc>
4535 Notification when the guest mouse pointer shape has
4536 changed. The new shape data is given.
4537 </desc>
4538 <param name="visible" type="boolean" dir="in">
4539 <desc>
4540 Flag whether the pointer is visible.
4541 </desc>
4542 </param>
4543 <param name="alpha" type="boolean" dir="in">
4544 <desc>
4545 Flag whether the pointer has an alpha channel.
4546 </desc>
4547 </param>
4548 <param name="xHot" type="unsigned long" dir="in">
4549 <desc>
4550 The pointer hot spot x coordinate.
4551 </desc>
4552 </param>
4553 <param name="yHot" type="unsigned long" dir="in">
4554 <desc>
4555 The pointer hot spot y coordinate.
4556 </desc>
4557 </param>
4558 <param name="width" type="unsigned long" dir="in">
4559 <desc>
4560 Width of the pointer shape in pixels.
4561 </desc>
4562 </param>
4563 <param name="height" type="unsigned long" dir="in">
4564 <desc>
4565 Height of the pointer shape in pixels.
4566 </desc>
4567 </param>
4568 <param name="shape" type="octet" mod="ptr" dir="in">
4569 <desc>
4570 Address of the shape buffer.
4571
4572 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
4573 followed by a 32-bpp XOR (color) mask.
4574
4575 For pointers without alpha channel the XOR mask pixels are 32
4576 bit values: (lsb)BGR0(msb). For pointers with alpha channel
4577 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
4578
4579 An AND mask is used for pointers with alpha channel, so if the
4580 callback does not support alpha, the pointer could be
4581 displayed as a normal color pointer.
4582
4583 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
4584 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
4585 height</tt>. The padding bits at the end of each scanline are
4586 undefined.
4587
4588 The XOR mask follows the AND mask on the next 4-byte aligned
4589 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
4590 Bytes in the gap between the AND and the XOR mask are undefined.
4591 The XOR mask scanlines have no gap between them and the size of
4592 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
4593
4594 <note>
4595 If @a shape is 0, only the pointer visibility is changed.
4596 </note>
4597 </desc>
4598 </param>
4599 </method>
4600
4601 <method name="onMouseCapabilityChange">
4602 <desc>
4603 Notification when the mouse capabilities reported by the
4604 guest have changed. The new capabilities are passed.
4605 </desc>
4606 <param name="supportsAbsolute" type="boolean" dir="in"/>
4607 <param name="needsHostCursor" type="boolean" dir="in"/>
4608 </method>
4609
4610 <method name="onKeyboardLedsChange">
4611 <desc>
4612 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
4613 to alter the state of the keyboard LEDs.
4614 </desc>
4615 <param name="numLock" type="boolean" dir="in"/>
4616 <param name="capsLock" type="boolean" dir="in"/>
4617 <param name="scrollLock" type="boolean" dir="in"/>
4618 </method>
4619
4620 <method name="onStateChange">
4621 <desc>
4622 Notification when the execution state of the machine has changed.
4623 The new state will be given.
4624 </desc>
4625 <param name="state" type="MachineState" dir="in"/>
4626 </method>
4627
4628 <method name="onAdditionsStateChange">
4629 <desc>
4630 Notification when a Guest Additions property changes.
4631 Interested callees should query IGuest attributes to
4632 find out what has changed.
4633 </desc>
4634 </method>
4635
4636 <method name="onDVDDriveChange">
4637 <desc>
4638 Notification when a property of the
4639 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
4640 Interested callees should use IDVDDrive methods to find out what has
4641 changed.
4642 </desc>
4643 </method>
4644
4645 <method name="onFloppyDriveChange">
4646 <desc>
4647 Notification when a property of the
4648 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
4649 Interested callees should use IFloppyDrive methods to find out what
4650 has changed.
4651 </desc>
4652 </method>
4653
4654 <method name="onNetworkAdapterChange">
4655 <desc>
4656 Notification when a property of one of the
4657 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
4658 changes. Interested callees should use INetworkAdapter methods and
4659 attributes to find out what has changed.
4660 </desc>
4661 <param name="networkAdapter" type="INetworkAdapter" dir="in">
4662 <desc>Network adapter that is subject to change.</desc>
4663 </param>
4664 </method>
4665
4666 <method name="onSerialPortChange">
4667 <desc>
4668 Notification when a property of one of the
4669 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
4670 Interested callees should use ISerialPort methods and attributes
4671 to find out what has changed.
4672 </desc>
4673 <param name="serialPort" type="ISerialPort" dir="in">
4674 <desc>Serial port that is subject to change.</desc>
4675 </param>
4676 </method>
4677
4678 <method name="onParallelPortChange">
4679 <desc>
4680 Notification when a property of one of the
4681 virtual <link to="IMachine::getParallelPort">parallel ports</link>
4682 changes. Interested callees should use ISerialPort methods and
4683 attributes to find out what has changed.
4684 </desc>
4685 <param name="parallelPort" type="IParallelPort" dir="in">
4686 <desc>Parallel port that is subject to change.</desc>
4687 </param>
4688 </method>
4689
4690 <method name="onVRDPServerChange">
4691 <desc>
4692 Notification when a property of the
4693 <link to="IMachine::VRDPServer">VRDP server</link> changes.
4694 Interested callees should use IVRDPServer methods and attributes to
4695 find out what has changed.
4696 </desc>
4697 </method>
4698
4699 <method name="onUSBControllerChange">
4700 <desc>
4701 Notification when a property of the virtual
4702 <link to="IMachine::USBController">USB controller</link> changes.
4703 Interested callees should use IUSBController methods and attributes to
4704 find out what has changed.
4705 </desc>
4706 </method>
4707
4708 <method name="onUSBDeviceStateChange">
4709 <desc>
4710 Notification when a USB device is attached to or detached from
4711 the virtual USB controller.
4712
4713 This notification is sent as a result of the indirect
4714 request to attach the device because it matches one of the
4715 machine USB filters, or as a result of the direct request
4716 issued by <link to="IConsole::attachUSBDevice"/> or
4717 <link to="IConsole::detachUSBDevice"/>.
4718
4719 This notification is sent in case of both a succeeded and a
4720 failed request completion. When the request succeeds, the @a
4721 error parameter is @c null, and the given device has been
4722 already added to (when @a attached is @c true) or removed from
4723 (when @a attached is @c false) the collection represented by
4724 <link to="IConsole::USBDevices"/>. On failure, the collection
4725 doesn't change and the @a error parameter represents the error
4726 message describing the failure.
4727
4728 </desc>
4729 <param name="device" type="IUSBDevice" dir="in">
4730 <desc>Device that is subject to state change.</desc>
4731 </param>
4732 <param name="attached" type="boolean" dir="in">
4733 <desc>
4734 <tt>true</tt> if the device was attached
4735 and <tt>false</tt> otherwise.
4736 </desc>
4737 </param>
4738 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
4739 <desc>
4740 <tt>null</tt> on success or an error message object on
4741 failure.
4742 </desc>
4743 </param>
4744 </method>
4745
4746 <method name="onSharedFolderChange">
4747 <desc>
4748 Notification when a shared folder is added or removed.
4749 The @a scope argument defines one of three scopes:
4750 <link to="IVirtualBox::sharedFolders">global shared folders</link>
4751 (<link to="Scope_Global">Global</link>),
4752 <link to="IMachine::sharedFolders">permanent shared folders</link> of
4753 the machine (<link to="Scope_Machine">Machine</link>) or <link
4754 to="IConsole::sharedFolders">transient shared folders</link> of the
4755 machine (<link to="Scope_Session">Session</link>). Interested callees
4756 should use query the corresponding collections to find out what has
4757 changed.
4758 </desc>
4759 <param name="scope" type="Scope" dir="in">
4760 <desc>Scope of the notification.</desc>
4761 </param>
4762 </method>
4763
4764 <method name="onRuntimeError">
4765 <desc>
4766 Notification when an error happens during the virtual
4767 machine execution.
4768
4769 There are three kinds of runtime errors:
4770 <ul>
4771 <li><i>fatal</i></li>
4772 <li><i>non-fatal with retry</i></li>
4773 <li><i>non-fatal warnings</i></li>
4774 </ul>
4775
4776 <b>Fatal</b> errors are indicated by the @a fatal parameter set
4777 to <tt>true</tt>. In case of fatal errors, the virtual machine
4778 execution is always paused before calling this notification, and
4779 the notification handler is supposed either to immediately save
4780 the virtual machine state using <link to="IConsole::saveState()"/>
4781 or power it off using <link to="IConsole::powerDown()"/>.
4782 Resuming the execution can lead to unpredictable results.
4783
4784 <b>Non-fatal</b> errors and warnings are indicated by the
4785 @a fatal parameter set to <tt>false</tt>. If the virtual machine
4786 is in the Paused state by the time the error notification is
4787 received, it means that the user can <i>try to resume</i> the machine
4788 execution after attempting to solve the problem that caused the
4789 error. In this case, the notification handler is supposed
4790 to show an appropriate message to the user (depending on the
4791 value of the @a id parameter) that offers several actions such
4792 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
4793 wants to retry, the notification handler should continue
4794 the machine execution using the <link to="IConsole::resume()"/>
4795 call. If the machine execution is not Paused during this
4796 notification, then it means this notification is a <i>warning</i>
4797 (for example, about a fatal condition that can happen very soon);
4798 no immediate action is required from the user, the machine
4799 continues its normal execution.
4800
4801 Note that in either case the notification handler
4802 <b>must not</b> perform any action directly on a thread
4803 where this notification is called. Everything it is allowed to
4804 do is to post a message to another thread that will then talk
4805 to the user and take the corresponding action.
4806
4807 Currently, the following error identifiers are known:
4808 <ul>
4809 <li><tt>"HostMemoryLow"</tt></li>
4810 <li><tt>"HostAudioNotResponding"</tt></li>
4811 <li><tt>"VDIStorageFull"</tt></li>
4812 </ul>
4813
4814 <note>
4815 This notification is not designed to be implemented by
4816 more than one callback at a time. If you have multiple
4817 IConsoleCallback instances registered on the given
4818 IConsole object, make sure you simply do nothing but
4819 return @c S_OK from all but one of them that does actual
4820 user notification and performs necessary actions.
4821 </note>
4822
4823 </desc>
4824 <param name="fatal" type="boolean" dir="in">
4825 <desc>Whether the error is fatal or not</desc>
4826 </param>
4827 <param name="id" type="wstring" dir="in">
4828 <desc>Error identifier</desc>
4829 </param>
4830 <param name="message" type="wstring" dir="in">
4831 <desc>Optional error message</desc>
4832 </param>
4833 </method>
4834
4835 <method name="onCanShowWindow">
4836 <desc>
4837 Notification when a call to
4838 <link to="IMachine::canShowConsoleWindow()"/> is made by a
4839 front-end to check if a subsequent call to
4840 <link to="IMachine::showConsoleWindow()"/> can succeed.
4841
4842 The callee should give an answer appropriate to the current
4843 machine state in the @a canShow argument. This answer must
4844 remain valid at least until the next
4845 <link to="IConsole::state">machine state</link> change.
4846
4847 <note>
4848 This notification is not designed to be implemented by
4849 more than one callback at a time. If you have multiple
4850 IConsoleCallback instances registered on the given
4851 IConsole object, make sure you simply do nothing but
4852 return @c true and @c S_OK from all but one of them that
4853 actually manages console window activation.
4854 </note>
4855 </desc>
4856 <param name="canShow" type="boolean" dir="return">
4857 <desc>
4858 @c true if the console window can be shown and @c
4859 false otherwise.
4860 </desc>
4861 </param>
4862 </method>
4863
4864 <method name="onShowWindow">
4865 <desc>
4866 Notification when a call to
4867 <link to="IMachine::showConsoleWindow()"/>
4868 requests the console window to be activated and brought to
4869 foreground on the desktop of the host PC.
4870
4871 This notification should cause the VM console process to
4872 perform the requested action as described above. If it is
4873 impossible to do it at a time of this notification, this
4874 method should return a failure.
4875
4876 Note that many modern window managers on many platforms
4877 implement some sort of focus stealing prevention logic, so
4878 that it may be impossible to activate a window without the
4879 help of the currently active application (which is supposedly
4880 an initiator of this notification). In this case, this method
4881 must return a non-zero identifier that represents the
4882 top-level window of the VM console process. The caller, if it
4883 represents a currently active process, is responsible to use
4884 this identifier (in a platform-dependent manner) to perform
4885 actual window activation.
4886
4887 This method must set @a winId to zero if it has performed all
4888 actions necessary to complete the request and the console
4889 window is now active and in foreground, to indicate that no
4890 further action is required on the caller's side.
4891
4892 <note>
4893 This notification is not designed to be implemented by
4894 more than one callback at a time. If you have multiple
4895 IConsoleCallback instances registered on the given
4896 IConsole object, make sure you simply do nothing but
4897 return @c S_OK from all but one of them that actually
4898 manages console window activation.
4899 </note>
4900 </desc>
4901 <param name="winId" type="unsigned long long" dir="return">
4902 <desc>
4903 Platform-dependent identifier of the top-level VM console
4904 window, or zero if this method has performed all actions
4905 necessary to implement the <i>show window</i> semantics for
4906 the given platform and/or this VirtualBox front-end.
4907 </desc>
4908 </param>
4909 </method>
4910
4911 </interface>
4912
4913 <interface
4914 name="IRemoteDisplayInfo" extends="$unknown"
4915 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
4916 wsmap="struct"
4917 >
4918 <desc>
4919 Contains information about the remote display (VRDP) capabilities and status.
4920 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
4921 </desc>
4922
4923 <attribute name="active" type="boolean" readonly="yes">
4924 <desc>
4925 Whether the remote display connection is active.
4926 </desc>
4927 </attribute>
4928
4929 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
4930 <desc>
4931 How many times a client connected.
4932 </desc>
4933 </attribute>
4934
4935 <attribute name="beginTime" type="long long" readonly="yes">
4936 <desc>
4937 When the last connection was established, in milliseconds since 1970-01-01 UTC.
4938 </desc>
4939 </attribute>
4940
4941 <attribute name="endTime" type="long long" readonly="yes">
4942 <desc>
4943 When the last connection was terminated or the current time, if
4944 connection is still active, in milliseconds since 1970-01-01 UTC.
4945 </desc>
4946 </attribute>
4947
4948 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
4949 <desc>
4950 How many bytes were sent in last or current, if still active, connection.
4951 </desc>
4952 </attribute>
4953
4954 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
4955 <desc>
4956 How many bytes were sent in all connections.
4957 </desc>
4958 </attribute>
4959
4960 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
4961 <desc>
4962 How many bytes were received in last or current, if still active, connection.
4963 </desc>
4964 </attribute>
4965
4966 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
4967 <desc>
4968 How many bytes were received in all connections.
4969 </desc>
4970 </attribute>
4971
4972 <attribute name="user" type="wstring" readonly="yes">
4973 <desc>
4974 Login user name supplied by the client.
4975 </desc>
4976 </attribute>
4977
4978 <attribute name="domain" type="wstring" readonly="yes">
4979 <desc>
4980 Login domain name supplied by the client.
4981 </desc>
4982 </attribute>
4983
4984 <attribute name="clientName" type="wstring" readonly="yes">
4985 <desc>
4986 The client name supplied by the client.
4987 </desc>
4988 </attribute>
4989
4990 <attribute name="clientIP" type="wstring" readonly="yes">
4991 <desc>
4992 The IP address of the client.
4993 </desc>
4994 </attribute>
4995
4996 <attribute name="clientVersion" type="unsigned long" readonly="yes">
4997 <desc>
4998 The client software version number.
4999 </desc>
5000 </attribute>
5001
5002 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5003 <desc>
5004 Public key exchange method used when connection was established.
5005 Values: 0 - RDP4 public key exchange scheme.
5006 1 - X509 certificates were sent to client.
5007 </desc>
5008 </attribute>
5009
5010 </interface>
5011
5012 <interface
5013 name="IConsole" extends="$unknown"
5014 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5015 wsmap="managed"
5016 >
5017 <desc>
5018 The IConsole interface represents an interface to control virtual
5019 machine execution.
5020
5021 The console object that implements the IConsole interface is obtained
5022 from a session object after the session for the given machine has been
5023 opened using one of <link to="IVirtualBox::openSession"/>,
5024 <link to="IVirtualBox::openRemoteSession"/> or
5025 <link to="IVirtualBox::openExistingSession"/> methods.
5026
5027 Methods of the IConsole interface allow the caller to query the current
5028 virtual machine execution state, pause the machine or power it down, save
5029 the machine state or take a snapshot, attach and detach removable media
5030 and so on.
5031
5032 <see>ISession</see>
5033 </desc>
5034
5035 <attribute name="machine" type="IMachine" readonly="yes">
5036 <desc>
5037 Machine object this console is sessioned with.
5038 <note>
5039 This is a convenience property, it has the same value as
5040 <link to="ISession::machine"/> of the corresponding session
5041 object.
5042 </note>
5043 </desc>
5044 </attribute>
5045
5046 <attribute name="state" type="MachineState" readonly="yes">
5047 <desc>
5048 Current execution state of the machine.
5049 <note>
5050 This property always returns the same value as the corresponding
5051 property of the IMachine object this console is sessioned with.
5052 For the process that owns (executes) the VM, this is the
5053 preferable way of querying the VM state, because no IPC
5054 calls are made.
5055 </note>
5056 </desc>
5057 </attribute>
5058
5059 <attribute name="guest" type="IGuest" readonly="yes">
5060 <desc>Guest object.</desc>
5061 </attribute>
5062
5063 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5064 <desc>
5065 Virtual keyboard object.
5066 <note>
5067 If the machine is not running, any attempt to use
5068 the returned object will result in an error.
5069 </note>
5070 </desc>
5071 </attribute>
5072
5073 <attribute name="mouse" type="IMouse" readonly="yes">
5074 <desc>
5075 Virtual mouse object.
5076 <note>
5077 If the machine is not running, any attempt to use
5078 the returned object will result in an error.
5079 </note>
5080 </desc>
5081 </attribute>
5082
5083 <attribute name="display" type="IDisplay" readonly="yes">
5084 <desc>Virtual display object.
5085 <note>
5086 If the machine is not running, any attempt to use
5087 the returned object will result in an error.
5088 </note>
5089 </desc>
5090 </attribute>
5091
5092 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5093 <desc>Debugging interface.</desc>
5094 </attribute>
5095
5096 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5097 <desc>
5098 Collection of USB devices currently attached to the virtual
5099 USB controller.
5100 <note>
5101 The collection is empty if the machine is not running.
5102 </note>
5103 </desc>
5104 </attribute>
5105
5106 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5107 <desc>
5108 List of USB devices currently attached to the remote VRDP client.
5109 Once a new device is physically attached to the remote host computer,
5110 it appears in this list and remains there until detached.
5111 </desc>
5112 </attribute>
5113
5114 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5115 <desc>
5116 Collection of shared folders for the current session. These folders
5117 are called transient shared folders because they are available to the
5118 guest OS running inside the associated virtual machine only for the
5119 duration of the session (as opposed to
5120 <link to="IMachine::sharedFolders"/> which represent permanent shared
5121 folders). When the session is closed (e.g. the machine is powered down),
5122 these folders are automatically discarded.
5123
5124 New shared folders are added to the collection using
5125 <link to="#createSharedFolder"/>. Existing shared folders can be
5126 removed using <link to="#removeSharedFolder"/>.
5127 </desc>
5128 </attribute>
5129
5130 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5131 <desc>
5132 Interface that provides information on Remote Display (VRDP) connection.
5133 </desc>
5134 </attribute>
5135
5136 <method name="powerUp">
5137 <desc>
5138 Starts the virtual machine execution using the current machine
5139 state (that is, its current execution state, current settings and
5140 current hard disks).
5141
5142 If the machine is powered off or aborted, the execution will
5143 start from the beginning (as if the real hardware were just
5144 powered on).
5145
5146 If the machine is in the <link to="MachineState_Saved"/> state,
5147 it will continue its execution the point where the state has
5148 been saved.
5149
5150 <note>
5151 Unless you are trying to write a new VirtualBox front-end that
5152 performs direct machine execution (like the VirtualBox or VBoxSDL
5153 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5154 session opened by <link to="IVirtualBox::openSession"/> and use this
5155 session only to change virtual machine settings. If you simply want to
5156 start virtual machine execution using one of the existing front-ends
5157 (for example the VirtualBox GUI or headless server), simply use
5158 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5159 power up the machine automatically for you.
5160 </note>
5161
5162 <see>#saveState</see>
5163 <result name="VBOX_E_INVALID_VM_STATE">
5164 Virtual machine already running.
5165 </result>
5166 <result name="VBOX_E_HOST_ERROR">
5167 Host interface does not exist or name not set.
5168 </result>
5169 <result name="VBOX_E_FILE_ERROR">
5170 Invalid saved state file.
5171 </result>
5172 </desc>
5173 <param name="progress" type="IProgress" dir="return">
5174 <desc>Progress object to track the operation completion.</desc>
5175 </param>
5176 </method>
5177
5178 <method name="powerUpPaused">
5179 <desc>
5180 Identical to powerUp except that the VM will enter the
5181 <link to="MachineState_Paused"/> state, instead of
5182 <link to="MachineState_Running"/>.
5183
5184 <see>#powerUp</see>
5185 <result name="VBOX_E_INVALID_VM_STATE">
5186 Virtual machine already running.
5187 </result>
5188 <result name="VBOX_E_HOST_ERROR">
5189 Host interface does not exist or name not set.
5190 </result>
5191 <result name="VBOX_E_FILE_ERROR">
5192 Invalid saved state file.
5193 </result>
5194 </desc>
5195 <param name="progress" type="IProgress" dir="return">
5196 <desc>Progress object to track the operation completion.</desc>
5197 </param>
5198 </method>
5199
5200 <method name="powerDown">
5201 <desc>
5202 Stops the virtual machine execution.
5203 After this operation completes, the machine will go to the
5204 PoweredOff state.
5205
5206 @deprecated This method will be removed in VirtualBox 2.1 where the
5207 powerDownAsync() method will take its name. Do not use this method in
5208 the code.
5209 <result name="VBOX_E_INVALID_VM_STATE">
5210 Virtual machine must be Running, Paused or Stuck to be powered down.
5211 </result>
5212 <result name="VBOX_E_VM_ERROR">
5213 Unable to power off or destroy virtual machine.
5214 </result>
5215 </desc>
5216 </method>
5217
5218 <method name="powerDownAsync">
5219 <desc>
5220 Initiates the power down procedure to stop the virtual machine
5221 execution.
5222
5223 The completion of the power down procedure is tracked using the returned
5224 IProgress object. After the operation is complete, the machine will go
5225 to the PoweredOff state.
5226
5227 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5228 where the original powerDown() method will be removed. You will need to
5229 rename "powerDownAsync" to "powerDown" in your sources to make them
5230 build with version 2.1.
5231 <result name="VBOX_E_INVALID_VM_STATE">
5232 Virtual machine must be Running, Paused or Stuck to be powered down.
5233 </result>
5234 </desc>
5235 <param name="progress" type="IProgress" dir="return">
5236 <desc>Progress object to track the operation completion.</desc>
5237 </param>
5238 </method>
5239
5240 <method name="reset">
5241 <desc>Resets the virtual machine.
5242 <result name="VBOX_E_INVALID_VM_STATE">
5243 Virtual machine not in Running state.
5244 </result>
5245 <result name="VBOX_E_VM_ERROR">
5246 Virtual machine error in reset operation.
5247 </result>
5248 </desc>
5249 </method>
5250
5251 <method name="pause">
5252 <desc>Pauses the virtual machine execution.
5253 <result name="VBOX_E_INVALID_VM_STATE">
5254 Virtual machine not in Running state.
5255 </result>
5256 <result name="VBOX_E_VM_ERROR">
5257 Virtual machine error in suspend operation.
5258 </result>
5259 </desc>
5260 </method>
5261
5262 <method name="resume">
5263 <desc>Resumes the virtual machine execution.
5264 <result name="VBOX_E_INVALID_VM_STATE">
5265 Virtual machine not in Paused state.
5266 </result>
5267 <result name="VBOX_E_VM_ERROR">
5268 Virtual machine error in resume operation.
5269 </result>
5270 </desc>
5271 </method>
5272
5273 <method name="powerButton">
5274 <desc>Sends the ACPI power button event to the guest.
5275 <result name="VBOX_E_INVALID_VM_STATE">
5276 Virtual machine not in Running state.
5277 </result>
5278 <result name="VBOX_E_PDM_ERROR">
5279 Controlled power off failed.
5280 </result>
5281 </desc>
5282 </method>
5283
5284 <method name="sleepButton">
5285 <desc>Sends the ACPI sleep button event to the guest.
5286 <result name="VBOX_E_INVALID_VM_STATE">
5287 Virtual machine not in Running state.
5288 </result>
5289 <result name="VBOX_E_PDM_ERROR">
5290 Sending sleep button event failed.
5291 </result>
5292 </desc>
5293 </method>
5294
5295 <method name="getPowerButtonHandled">
5296 <desc>Checks if the last power button event was handled by guest.
5297 <result name="VBOX_E_PDM_ERROR">
5298 Checking if the event was handled by the guest OS failed.
5299 </result>
5300 </desc>
5301 <param name="handled" type="boolean" dir="return"/>
5302 </method>
5303
5304 <method name="getGuestEnteredACPIMode">
5305 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5306 G1 (sleeping). If this method returns false, the guest will
5307 most likely not respond to external ACPI events.
5308 <result name="VBOX_E_INVALID_VM_STATE">
5309 Virtual machine not in Running state.
5310 </result>
5311 </desc>
5312 <param name="entered" type="boolean" dir="return"/>
5313 </method>
5314
5315 <method name="saveState">
5316 <desc>
5317 Saves the current execution state of a running virtual machine
5318 and stops its execution.
5319
5320 After this operation completes, the machine will go to the
5321 Saved state. Next time it is powered up, this state will
5322 be restored and the machine will continue its execution from
5323 the place where it was saved.
5324
5325 This operation differs from taking a snapshot to the effect
5326 that it doesn't create new differencing hard disks. Also, once
5327 the machine is powered up from the state saved using this method,
5328 the saved state is deleted, so it will be impossible to return
5329 to this state later.
5330
5331 <note>
5332 On success, this method implicitly calls
5333 <link to="IMachine::saveSettings()"/> to save all current machine
5334 settings (including runtime changes to the DVD drive, etc.).
5335 Together with the impossibility to change any VM settings when it is
5336 in the Saved state, this guarantees adequate hardware
5337 configuration of the machine when it is restored from the saved
5338 state file.
5339 </note>
5340
5341 <note>
5342 The machine must be in the Running or Paused state, otherwise
5343 the operation will fail.
5344 </note>
5345 <result name="VBOX_E_INVALID_VM_STATE">
5346 Virtual machine state neither Running nor Paused.
5347 </result>
5348 <result name="VBOX_E_FILE_ERROR">
5349 Failed to create directory for saved state file.
5350 </result>
5351
5352 <see><link to="#takeSnapshot"/></see>
5353 </desc>
5354 <param name="progress" type="IProgress" dir="return">
5355 <desc>Progress object to track the operation completion.</desc>
5356 </param>
5357 </method>
5358
5359 <method name="adoptSavedState">
5360 <desc>
5361 Associates the given saved state file to the virtual machine.
5362
5363 On success, the machine will go to the Saved state. Next time it is
5364 powered up, it will be restored from the adopted saved state and
5365 continue execution from the place where the saved state file was
5366 created.
5367
5368 The specified saved state file path may be absolute or relative to the
5369 folder the VM normally saves the state to (usually,
5370 <link to="IMachine::snapshotFolder"/>).
5371
5372 <note>
5373 It's a caller's responsibility to make sure the given saved state
5374 file is compatible with the settings of this virtual machine that
5375 represent its virtual hardware (memory size, hard disk configuration
5376 etc.). If there is a mismatch, the behavior of the virtual machine
5377 is undefined.
5378 </note>
5379 <result name="VBOX_E_INVALID_VM_STATE">
5380 Virtual machine state neither PoweredOff nor Aborted.
5381 </result>
5382 </desc>
5383 <param name="savedStateFile" type="wstring" dir="in">
5384 <desc>Path to the saved state file to adopt.</desc>
5385 </param>
5386 </method>
5387
5388 <method name="discardSavedState">
5389 <desc>
5390 Discards (deletes) the saved state of the virtual machine
5391 previously created by <link to="#saveState"/>. Next time the
5392 machine is powered up, a clean boot will occur.
5393 <note>
5394 This operation is equivalent to resetting or powering off
5395 the machine without doing a proper shutdown in the guest OS.
5396 </note>
5397 <result name="VBOX_E_INVALID_VM_STATE">
5398 Virtual machine not in state Saved.
5399 </result>
5400 </desc>
5401 </method>
5402
5403 <method name="getDeviceActivity">
5404 <desc>
5405 Gets the current activity type of a given device or device group.
5406 <result name="E_INVALIDARG">
5407 Invalid device type.
5408 </result>
5409 </desc>
5410 <param name="type" type="DeviceType" dir="in"/>
5411 <param name="activity" type="DeviceActivity" dir="return"/>
5412 </method>
5413
5414 <method name="attachUSBDevice">
5415 <desc>
5416 Attaches a host USB device with the given UUID to the
5417 USB controller of the virtual machine.
5418
5419 The device needs to be in one of the following states:
5420 <link to="USBDeviceState_Busy"/>,
5421 <link to="USBDeviceState_Available"/> or
5422 <link to="USBDeviceState_Held"/>,
5423 otherwise an error is immediately returned.
5424
5425 When the device state is
5426 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5427 be returned if the host computer refuses to release it for some reason.
5428
5429 <see>IUSBController::deviceFilters, USBDeviceState</see>
5430 <result name="VBOX_E_INVALID_VM_STATE">
5431 Virtual machine state neither Running nor Paused.
5432 </result>
5433 <result name="VBOX_E_PDM_ERROR">
5434 Virtual machine does not have a USB controller.
5435 </result>
5436 </desc>
5437 <param name="id" type="uuid" dir="in">
5438 <desc>UUID of the host USB device to attach.</desc>
5439 </param>
5440 </method>
5441
5442 <method name="detachUSBDevice">
5443 <desc>
5444 Detaches an USB device with the given UUID from the USB controller
5445 of the virtual machine.
5446
5447 After this method succeeds, the VirtualBox server re-initiates
5448 all USB filters as if the device were just physically attached
5449 to the host, but filters of this machine are ignored to avoid
5450 a possible automatic re-attachment.
5451
5452 <see>IUSBController::deviceFilters, USBDeviceState</see>
5453
5454 <result name="VBOX_E_PDM_ERROR">
5455 Virtual machine does not have a USB controller.
5456 </result>
5457 <result name="E_INVALIDARG">
5458 USB device not attached to this virtual machine.
5459 </result>
5460 </desc>
5461 <param name="id" type="uuid" dir="in">
5462 <desc>UUID of the USB device to detach.</desc>
5463 </param>
5464 <param name="device" type="IUSBDevice" dir="return">
5465 <desc>Detached USB device.</desc>
5466 </param>
5467 </method>
5468
5469 <method name="createSharedFolder">
5470 <desc>
5471 Creates a transient new shared folder by associating the given logical
5472 name with the given host path, adds it to the collection of shared
5473 folders and starts sharing it. Refer to the description of
5474 <link to="ISharedFolder"/> to read more about logical names.
5475
5476 <result name="VBOX_E_INVALID_VM_STATE">
5477 Virtual machine in Saved state or currently changing state.
5478 </result>
5479 <result name="VBOX_E_FILE_ERROR">
5480 Shared folder already exists or not accessible.
5481 </result>
5482 </desc>
5483 <param name="name" type="wstring" dir="in">
5484 <desc>Unique logical name of the shared folder.</desc>
5485 </param>
5486 <param name="hostPath" type="wstring" dir="in">
5487 <desc>Full path to the shared folder in the host file system.</desc>
5488 </param>
5489 <param name="writable" type="boolean" dir="in">
5490 <desc>Whether the share is writable or readonly</desc>
5491 </param>
5492 </method>
5493
5494 <method name="removeSharedFolder">
5495 <desc>
5496 Removes a transient shared folder with the given name previously
5497 created by <link to="#createSharedFolder"/> from the collection of
5498 shared folders and stops sharing it.
5499 <result name="VBOX_E_INVALID_VM_STATE">
5500 Virtual machine in Saved state or currently changing state.
5501 </result>
5502 <result name="VBOX_E_FILE_ERROR">
5503 Shared folder does not exists.
5504 </result>
5505 </desc>
5506 <param name="name" type="wstring" dir="in">
5507 <desc>Logical name of the shared folder to remove.</desc>
5508 </param>
5509 </method>
5510
5511 <method name="takeSnapshot">
5512 <desc>
5513 Saves the current execution state and all settings of the
5514 machine and creates differencing images for all
5515 normal (non-independent) hard disks.
5516
5517 This method can be called for a PoweredOff, Saved, Running or
5518 Paused virtual machine. When the machine is PoweredOff, an
5519 offline <link to="ISnapshot">snapshot</link> is created,
5520 in all other cases -- an online snapshot.
5521
5522 The taken snapshot is always based on the
5523 <link to="IMachine::currentSnapshot">current
5524 snapshot</link> of the associated virtual machine and becomes
5525 a new current snapshot.
5526
5527 <note>
5528 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5529 save all current machine settings before taking an offline snapshot.
5530 </note>
5531
5532 <see>ISnapshot, <link to="#saveState"/></see>
5533 <result name="VBOX_E_INVALID_VM_STATE">
5534 Virtual machine currently changing state.
5535 </result>
5536 </desc>
5537 <param name="name" type="wstring" dir="in">
5538 <desc>Short name for the snapshot.</desc>
5539 </param>
5540 <param name="description" type="wstring" dir="in">
5541 <desc>Optional description of the snapshot.</desc>
5542 </param>
5543 <param name="progress" type="IProgress" dir="return">
5544 <desc>Progress object to track the operation completion.</desc>
5545 </param>
5546 </method>
5547
5548 <method name="discardSnapshot">
5549 <desc>
5550
5551 Starts discarding the specified snapshot. The execution state
5552 and settings of the associated machine stored in the snapshot
5553 will be deleted. The contents of all differencing hard disks of
5554 this snapshot will be merged with the contents of their
5555 dependent child hard disks to keep the, disks valid (in other
5556 words, all changes represented by hard disks being discarded
5557 will be propagated to their child hard disks). After that, this
5558 snapshot's differencing hard disks will be deleted. The parent
5559 of this snapshot will become a new parent for all its child
5560 snapshots.
5561
5562 If the discarded snapshot is the current one, its parent
5563 snapshot will become a new current snapshot. The current machine
5564 state is not directly affected in this case, except that
5565 currently attached differencing hard disks based on hard disks
5566 of the discarded snapshot will be also merged as described
5567 above.
5568
5569 If the discarded snapshot is the first one (the root snapshot)
5570 and it has exactly one child snapshot, this child snapshot will
5571 become the first snapshot after discarding. If there are no
5572 children at all (i.e. the first snapshot is the only snapshot of
5573 the machine), both the current and the first snapshot of the
5574 machine will be set to null. In all other cases, the first
5575 snapshot cannot be discarded.
5576
5577 You cannot discard the snapshot if it
5578 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
5579 hard disks that have differencing hard disks based on them. Snapshots of
5580 such kind can be discarded only when every normal hard disk has either
5581 no children at all or exactly one child. In the former case, the normal
5582 hard disk simply becomes unused (i.e. not attached to any VM). In the
5583 latter case, it receives all the changes stored in the child hard disk,
5584 and then it replaces the child hard disk in the configuration of the
5585 corresponding snapshot or machine.
5586
5587 Also, you cannot discard the snapshot if it stores hard disks
5588 (of any type) having differencing child hard disks that belong
5589 to other machines. Such snapshots can be only discarded after
5590 you discard all snapshots of other machines containing "foreign"
5591 child disks, or detach these "foreign" child disks from machines
5592 they are attached to.
5593
5594 One particular example of the snapshot storing normal hard disks
5595 is the first snapshot of a virtual machine that had normal hard
5596 disks attached when taking the snapshot. Be careful when
5597 discarding such snapshots because this implicitly commits
5598 changes (made since the snapshot being discarded has been taken)
5599 to normal hard disks (as described above), which may be not what
5600 you want.
5601
5602 The virtual machine is put to
5603 the <link to="MachineState_Discarding">Discarding</link> state until
5604 the discard operation is completed.
5605
5606 <note>
5607 The machine must not be running, otherwise the operation
5608 will fail.
5609 </note>
5610
5611 <note>
5612 Child hard disks of all normal hard disks of the discarded snapshot
5613 must be accessible (see <link to="IMedium::state"/>) for this
5614 operation to succeed. In particular, this means that all virtual
5615 machines, whose hard disks are directly or indirectly based on the
5616 hard disks of discarded snapshot, must be powered off.
5617 </note>
5618 <note>
5619 Merging hard disk contents can be very time and disk space
5620 consuming, if these disks are big in size and have many
5621 children. However, if the snapshot being discarded is the last
5622 (head) snapshot on the branch, the operation will be rather
5623 quick.
5624 </note>
5625 <note>
5626 Note that discarding the current snapshot
5627 will implicitly call <link to="IMachine::saveSettings()"/> to
5628 make all current machine settings permanent.
5629 </note>
5630 <result name="VBOX_E_INVALID_VM_STATE">
5631 Virtual machine is running.
5632 </result>
5633 </desc>
5634 <param name="id" type="uuid" dir="in">
5635 <desc>UUID of the snapshot to discard.</desc>
5636 </param>
5637 <param name="progress" type="IProgress" dir="return">
5638 <desc>Progress object to track the operation completion.</desc>
5639 </param>
5640 </method>
5641
5642 <method name="discardCurrentState">
5643 <desc>
5644 This operation is similar to <link to="#discardSnapshot()"/> but
5645 affects the current machine state. This means that the state stored in
5646 the current snapshot will become a new current state, and all current
5647 settings of the machine and changes stored in differencing hard disks
5648 will be lost.
5649
5650 After this operation is successfully completed, new empty differencing
5651 hard disks are created for all normal hard disks of the machine.
5652
5653 If the current snapshot of the machine is an online snapshot, the
5654 machine will go to the <link to="MachineState_Saved"> saved
5655 state</link>, so that the next time it is powered on, the execution
5656 state will be restored from the current snapshot.
5657
5658 <note>
5659 The machine must not be running, otherwise the operation will fail.
5660 </note>
5661
5662 <note>
5663 If the machine state is <link to="MachineState_Saved">Saved</link>
5664 prior to this operation, the saved state file will be implicitly
5665 discarded (as if <link to="IConsole::discardSavedState()"/> were
5666 called).
5667 </note>
5668
5669 <result name="VBOX_E_INVALID_VM_STATE">
5670 Virtual machine is running.
5671 </result>
5672 </desc>
5673 <param name="progress" type="IProgress" dir="return">
5674 <desc>Progress object to track the operation completion.</desc>
5675 </param>
5676 </method>
5677
5678 <method name="discardCurrentSnapshotAndState">
5679 <desc>
5680
5681 This method is equivalent to
5682 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
5683 (currentSnapshot.id(), progress) followed by
5684 <link to="#discardCurrentState()"/>.
5685
5686 As a result, the machine will be fully restored from the
5687 snapshot preceding the current snapshot, while both the current
5688 snapshot and the current machine state will be discarded.
5689
5690 If the current snapshot is the first snapshot of the machine (i.e. it
5691 has the only snapshot), the current machine state will be
5692 discarded <b>before</b> discarding the snapshot. In other words, the
5693 machine will be restored from its last snapshot, before discarding
5694 it. This differs from performing a single
5695 <link to="#discardSnapshot()"/> call (note that no
5696 <link to="#discardCurrentState()"/> will be possible after it)
5697 to the effect that the latter will preserve the current state instead of
5698 discarding it.
5699
5700 Unless explicitly mentioned otherwise, all remarks and
5701 limitations of the above two methods also apply to this method.
5702
5703 <note>
5704 The machine must not be running, otherwise the operation
5705 will fail.
5706 </note>
5707
5708 <note>
5709 If the machine state is <link to="MachineState_Saved">Saved</link>
5710 prior to this operation, the saved state file will be implicitly
5711 discarded (as if <link to="#discardSavedState()"/> were
5712 called).
5713 </note>
5714
5715 <note>
5716 This method is more efficient than calling both of the above
5717 methods separately: it requires less IPC calls and provides
5718 a single progress object.
5719 </note>
5720
5721 <result name="VBOX_E_INVALID_VM_STATE">
5722 Virtual machine is running.
5723 </result>
5724 </desc>
5725 <param name="progress" type="IProgress" dir="return">
5726 <desc>Progress object to track the operation completion.</desc>
5727 </param>
5728 </method>
5729
5730 <method name="registerCallback">
5731 <desc>
5732 Registers a new console callback on this instance. The methods of the
5733 callback interface will be called by this instance when the appropriate
5734 event occurs.
5735 </desc>
5736 <param name="callback" type="IConsoleCallback" dir="in"/>
5737 </method>
5738
5739 <method name="unregisterCallback">
5740 <desc>
5741 Unregisters the console callback previously registered using
5742 <link to="#registerCallback"/>.
5743 <result name="E_INVALIDARG">
5744 Given @a callback handler is not registered.
5745 </result>
5746 </desc>
5747 <param name="callback" type="IConsoleCallback" dir="in"/>
5748 </method>
5749 </interface>
5750
5751 <!--
5752 // IHost
5753 /////////////////////////////////////////////////////////////////////////
5754 -->
5755
5756 <interface
5757 name="IHostDVDDrive" extends="$unknown"
5758 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
5759 wsmap="managed"
5760 >
5761 <desc>
5762 The IHostDVDDrive interface represents the physical CD/DVD drive
5763 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
5764 </desc>
5765
5766 <attribute name="name" type="wstring" readonly="yes">
5767 <desc>
5768 Returns the platform-specific device identifier.
5769 On DOS-like platforms, it is a drive name (e.g. R:).
5770 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
5771 </desc>
5772 </attribute>
5773 <attribute name="description" type="wstring" readonly="yes">
5774 <desc>
5775 Returns a human readable description for the drive. This
5776 description usually contains the product and vendor name. A
5777 @c null string is returned if the description is not available.
5778 </desc>
5779 </attribute>
5780 <attribute name="udi" type="wstring" readonly="yes">
5781 <desc>
5782 Returns the unique device identifier for the drive. This
5783 attribute is reserved for future use instead of
5784 <link to="#name"/>. Currently it is not used and may return
5785 @c null on some platforms.
5786 </desc>
5787 </attribute>
5788
5789 </interface>
5790
5791 <enumerator
5792 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
5793 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
5794 />
5795
5796 <collection
5797 name="IHostDVDDriveCollection" type="IHostDVDDrive"
5798 enumerator="IHostDVDDriveEnumerator"
5799 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
5800 readonly="yes"
5801 >
5802 <method name="findByName">
5803 <desc>
5804 Searches this collection for a host drive with the given name.
5805 <note>
5806 The method returns an error if the given name does not
5807 correspond to any host drive in the collection.
5808 </note>
5809 </desc>
5810 <param name="name" type="wstring" dir="in">
5811 <desc>Name of the host drive to search for</desc>
5812 </param>
5813 <param name="drive" type="IHostDVDDrive" dir="return">
5814 <desc>Found host drive object</desc>
5815 </param>
5816 </method>
5817 </collection>
5818
5819 <interface
5820 name="IHostFloppyDrive" extends="$unknown"
5821 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
5822 wsmap="managed"
5823 >
5824 <desc>
5825 The IHostFloppyDrive interface represents the physical floppy drive
5826 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
5827 </desc>
5828 <attribute name="name" type="wstring" readonly="yes">
5829 <desc>
5830 Returns the platform-specific device identifier.
5831 On DOS-like platforms, it is a drive name (e.g. A:).
5832 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
5833 </desc>
5834 </attribute>
5835 <attribute name="description" type="wstring" readonly="yes">
5836 <desc>
5837 Returns a human readable description for the drive. This
5838 description usually contains the product and vendor name. A
5839 @c null string is returned if the description is not available.
5840 </desc>
5841 </attribute>
5842 <attribute name="udi" type="wstring" readonly="yes">
5843 <desc>
5844 Returns the unique device identifier for the drive. This
5845 attribute is reserved for future use instead of
5846 <link to="#name"/>. Currently it is not used and may return
5847 @c null on some platforms.
5848 </desc>
5849 </attribute>
5850 </interface>
5851
5852 <enumerator
5853 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
5854 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
5855 />
5856
5857 <collection
5858 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
5859 enumerator="IHostFloppyDriveEnumerator"
5860 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
5861 readonly="yes"
5862 >
5863 <method name="findByName">
5864 <desc>
5865 Searches this collection for a host drive with the given name.
5866 <note>
5867 The method returns an error if the given name does not
5868 correspond to any host drive in the collection.
5869 </note>
5870 </desc>
5871 <param name="name" type="wstring" dir="in">
5872 <desc>Name of the host drive to search for</desc>
5873 </param>
5874 <param name="drive" type="IHostFloppyDrive" dir="return">
5875 <desc>Found host drive object</desc>
5876 </param>
5877 </method>
5878 </collection>
5879
5880 <enum
5881 name="HostNetworkInterfaceType"
5882 uuid="763754FA-3246-4539-9590-9E603EDBF706"
5883 >
5884 <desc>
5885 Type of encapsulation. Ethernet encapsulation includes both wired and
5886 wireless Ethernet connections.
5887 <see>IHostNetworkInterface</see>
5888 </desc>
5889
5890 <const name="Unknown" value="0">
5891 <desc>
5892 The type of interface cannot be determined.
5893 </desc>
5894 </const>
5895 <const name="Ethernet" value="1">
5896 <desc>
5897 Ethernet frame encapsulation.
5898 </desc>
5899 </const>
5900 <const name="PPP" value="2">
5901 <desc>
5902 Point-to-point protocol encapsulation.
5903 </desc>
5904 </const>
5905 <const name="SLIP" value="3">
5906 <desc>
5907 Serial line IP encapsulation.
5908 </desc>
5909 </const>
5910 </enum>
5911
5912 <enum
5913 name="HostNetworkInterfaceStatus"
5914 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
5915 >
5916 <desc>
5917 Current status of the interface.
5918 <see>IHostNetworkInterface</see>
5919 </desc>
5920
5921 <const name="Unknown" value="0">
5922 <desc>
5923 The state of interface cannot be determined.
5924 </desc>
5925 </const>
5926 <const name="Up" value="1">
5927 <desc>
5928 The interface is fully operational.
5929 </desc>
5930 </const>
5931 <const name="Down" value="2">
5932 <desc>
5933 The interface is not functioning.
5934 </desc>
5935 </const>
5936 </enum>
5937
5938 <interface
5939 name="IHostNetworkInterface" extends="$unknown"
5940 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
5941 wsmap="managed"
5942 >
5943 <desc>
5944 Reprents one of host's network interfaces. IP V6 address and network
5945 mask are strings of 32 hexdecimal digits grouped by four. Groups are
5946 separated by colons.
5947 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
5948 </desc>
5949 <attribute name="name" type="wstring" readonly="yes">
5950 <desc>Returns the host network interface name.</desc>
5951 </attribute>
5952
5953 <attribute name="id" type="uuid" readonly="yes">
5954 <desc>Returns the interface UUID.</desc>
5955 </attribute>
5956
5957 <attribute name="IPAddress" type="unsigned long" readonly="yes">
5958 <desc>Returns the IP V4 address of the interface.</desc>
5959 </attribute>
5960
5961 <attribute name="networkMask" type="unsigned long" readonly="yes">
5962 <desc>Returns the network mask of the interface.</desc>
5963 </attribute>
5964
5965 <attribute name="IPV6Address" type="wstring" readonly="yes">
5966 <desc>Returns the IP V6 address of the interface.</desc>
5967 </attribute>
5968
5969 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
5970 <desc>Returns the IP V6 network mask of the interface.</desc>
5971 </attribute>
5972
5973 <attribute name="hardwareAddress" type="wstring" readonly="yes">
5974 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
5975 </attribute>
5976
5977 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
5978 <desc>Type of protocol encapsulation used.</desc>
5979 </attribute>
5980
5981 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
5982 <desc>Status of the interface.</desc>
5983 </attribute>
5984 </interface>
5985
5986 <interface
5987 name="IHost" extends="$unknown"
5988 uuid="f39438d7-abfd-409b-bc80-5f5291d92897"
5989 wsmap="managed"
5990 >
5991 <desc>
5992 The IHost interface represents the physical machine that this VirtualBox
5993 installation runs on.
5994
5995 An object implementing this interface is returned by the
5996 <link to="IVirtualBox::host" /> attribute. This interface contains
5997 read-only information about the host's physical hardware (such as what
5998 processors and disks are available, what the host operating system is,
5999 and so on) and also allows for manipulating some of the host's hardware,
6000 such as global USB device filters and host interface networking.
6001
6002 </desc>
6003 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6004 <desc>List of DVD drives available on the host.</desc>
6005 </attribute>
6006
6007 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6008 <desc>List of floppy drives available on the host.</desc>
6009 </attribute>
6010
6011 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6012 <desc>
6013 List of USB devices currently attached to the host.
6014 Once a new device is physically attached to the host computer,
6015 it appears in this list and remains there until detached.
6016
6017 <note>
6018 This method may set a @ref com_warnings "warning result code".
6019 </note>
6020 <note>
6021 If USB functionality is not available in the given edition of
6022 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6023 </note>
6024 </desc>
6025 </attribute>
6026
6027 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6028 <desc>
6029 List of USB device filters in action.
6030 When a new device is physically attached to the host computer,
6031 filters from this list are applied to it (in order they are stored
6032 in the list). The first matched filter will determine the
6033 <link to="IHostUSBDeviceFilter::action">action</link>
6034 performed on the device.
6035
6036 Unless the device is ignored by these filters, filters of all
6037 currently running virtual machines
6038 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6039
6040 <note>
6041 This method may set a @ref com_warnings "warning result code".
6042 </note>
6043 <note>
6044 If USB functionality is not available in the given edition of
6045 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6046 </note>
6047
6048 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6049 </desc>
6050 </attribute>
6051
6052 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6053 <desc>List of host network interfaces currently defined on the host.</desc>
6054 </attribute>
6055
6056 <attribute name="processorCount" type="unsigned long" readonly="yes">
6057 <desc>Number of (logical) CPUs installed in the host system.</desc>
6058 </attribute>
6059
6060 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6061 <desc>Number of (logical) CPUs online in the host system.</desc>
6062 </attribute>
6063
6064 <method name="getProcessorSpeed">
6065 <desc>Query the (approximate) maximum speed of a specified host CPU in
6066 Megahertz.
6067 </desc>
6068 <param name="cpuId" type="unsigned long" dir="in">
6069 <desc>
6070 Identifier of the CPU.
6071 </desc>
6072 </param>
6073 <param name="speed" type="unsigned long" dir="return">
6074 <desc>
6075 Speed value. 0 is returned if value is not known or @a cpuId is
6076 invalid.
6077 </desc>
6078 </param>
6079 </method>
6080
6081 <method name="getProcessorFeature">
6082 <desc>Query whether a CPU feature is supported or not.</desc>
6083 <param name="feature" type="ProcessorFeature" dir="in">
6084 <desc>
6085 CPU Feature identifier.
6086 </desc>
6087 </param>
6088 <param name="supported" type="boolean" dir="return">
6089 <desc>
6090 Feature is supported or not.
6091 </desc>
6092 </param>
6093 </method>
6094
6095 <method name="getProcessorDescription">
6096 <desc>Query the model string of a specified host CPU.
6097 <note>
6098 This function is not implemented in the current version of the
6099 product.
6100 </note>
6101 </desc>
6102 <param name="cpuId" type="unsigned long" dir="in">
6103 <desc>
6104 Identifier of the CPU.
6105 </desc>
6106 </param>
6107 <param name="description" type="wstring" dir="return">
6108 <desc>
6109 Model string. A NULL string is returned if value is not known or
6110 @a cpuId is invalid.
6111 </desc>
6112 </param>
6113 </method>
6114
6115 <attribute name="memorySize" type="unsigned long" readonly="yes">
6116 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6117 </attribute>
6118
6119 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6120 <desc>Available system memory in the host system.</desc>
6121 </attribute>
6122
6123 <attribute name="operatingSystem" type="wstring" readonly="yes">
6124 <desc>Name of the host system's operating system.</desc>
6125 </attribute>
6126
6127 <attribute name="OSVersion" type="wstring" readonly="yes">
6128 <desc>Host operating system's version string.</desc>
6129 </attribute>
6130
6131 <attribute name="UTCTime" type="long long" readonly="yes">
6132 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6133 </attribute>
6134
6135<if target="midl">
6136 <method name="createHostNetworkInterface">
6137 <desc>
6138 Creates a new adapter for Host Interface Networking.
6139 <result name="E_INVALIDARG">
6140 Host network interface @a name already exists.
6141 </result>
6142 </desc>
6143 <param name="name" type="wstring" dir="in">
6144 <desc>
6145 Adapter name.
6146 </desc>
6147 </param>
6148 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6149 <desc>
6150 Created host interface object.
6151 </desc>
6152 </param>
6153 <param name="progress" type="IProgress" dir="return">
6154 <desc>
6155 Progress object to track the operation completion.
6156 </desc>
6157 </param>
6158 </method>
6159 <method name="removeHostNetworkInterface">
6160 <desc>
6161 Removes the given host network interface.
6162 <result name="VBOX_E_OBJECT_NOT_FOUND">
6163 No host network interface matching @a id found.
6164 </result>
6165 </desc>
6166 <param name="id" type="uuid" dir="in">
6167 <desc>
6168 Adapter GUID.
6169 </desc>
6170 </param>
6171 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6172 <desc>
6173 Removed host interface object.
6174 </desc>
6175 </param>
6176 <param name="progress" type="IProgress" dir="return">
6177 <desc>
6178 Progress object to track the operation completion.
6179 </desc>
6180 </param>
6181 </method>
6182</if>
6183
6184 <method name="createUSBDeviceFilter">
6185 <desc>
6186 Creates a new USB device filter. All attributes except
6187 the filter name are set to <tt>null</tt> (any match),
6188 <i>active</i> is <tt>false</tt> (the filter is not active).
6189
6190 The created filter can be added to the list of filters using
6191 <link to="#insertUSBDeviceFilter()"/>.
6192
6193 <see>#USBDeviceFilters</see>
6194 </desc>
6195 <param name="name" type="wstring" dir="in">
6196 <desc>
6197 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6198 for more info.
6199 </desc>
6200 </param>
6201 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6202 <desc>Created filter object.</desc>
6203 </param>
6204 </method>
6205
6206 <method name="insertUSBDeviceFilter">
6207 <desc>
6208 Inserts the given USB device to the specified position
6209 in the list of filters.
6210
6211 Positions are numbered starting from <tt>0</tt>. If the specified
6212 position is equal to or greater than the number of elements in
6213 the list, the filter is added at the end of the collection.
6214
6215 <note>
6216 Duplicates are not allowed, so an attempt to insert a
6217 filter that is already in the list, will return an
6218 error.
6219 </note>
6220 <note>
6221 This method may set a @ref com_warnings "warning result code".
6222 </note>
6223 <note>
6224 If USB functionality is not available in the given edition of
6225 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6226 </note>
6227
6228 <see>#USBDeviceFilters</see>
6229
6230 <result name="VBOX_E_INVALID_OBJECT_STATE">
6231 USB device filter is not created within this VirtualBox instance.
6232 </result>
6233 <result name="E_INVALIDARG">
6234 USB device filter already in list.
6235 </result>
6236
6237 </desc>
6238 <param name="position" type="unsigned long" dir="in">
6239 <desc>Position to insert the filter to.</desc>
6240 </param>
6241 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6242 <desc>USB device filter to insert.</desc>
6243 </param>
6244 </method>
6245
6246 <method name="removeUSBDeviceFilter">
6247 <desc>
6248 Removes a USB device filter from the specified position in the
6249 list of filters.
6250
6251 Positions are numbered starting from <tt>0</tt>. Specifying a
6252 position equal to or greater than the number of elements in
6253 the list will produce an error.
6254
6255 <note>
6256 This method may set a @ref com_warnings "warning result code".
6257 </note>
6258 <note>
6259 If USB functionality is not available in the given edition of
6260 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6261 </note>
6262
6263 <see>#USBDeviceFilters</see>
6264
6265 <result name="E_INVALIDARG">
6266 USB device filter list empty or invalid @a position.
6267 </result>
6268
6269 </desc>
6270 <param name="position" type="unsigned long" dir="in">
6271 <desc>Position to remove the filter from.</desc>
6272 </param>
6273 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6274 <desc>Removed USB device filter.</desc>
6275 </param>
6276 </method>
6277
6278 </interface>
6279
6280 <!--
6281 // ISystemProperties
6282 /////////////////////////////////////////////////////////////////////////
6283 -->
6284
6285 <interface
6286 name="ISystemProperties"
6287 extends="$unknown"
6288 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6289 wsmap="managed"
6290 >
6291 <desc>
6292 The ISystemProperties interface represents global properties of the given
6293 VirtualBox installation.
6294
6295 These properties define limits and default values for various attributes
6296 and parameters. Most of the properties are read-only, but some can be
6297 changed by a user.
6298 </desc>
6299
6300 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6301 <desc>Minimum guest system memory in Megabytes.</desc>
6302 </attribute>
6303
6304 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6305 <desc>Maximum guest system memory in Megabytes.</desc>
6306 </attribute>
6307
6308 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6309 <desc>Minimum guest video memory in Megabytes.</desc>
6310 </attribute>
6311
6312 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6313 <desc>Maximum guest video memory in Megabytes.</desc>
6314 </attribute>
6315
6316 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6317 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6318 </attribute>
6319
6320 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6321 <desc>
6322 Number of network adapters associated with every
6323 <link to="IMachine"/> instance.
6324 </desc>
6325 </attribute>
6326
6327 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6328 <desc>
6329 Number of serial ports associated with every
6330 <link to="IMachine"/> instance.
6331 </desc>
6332 </attribute>
6333
6334 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6335 <desc>
6336 Number of parallel ports associated with every
6337 <link to="IMachine"/> instance.
6338 </desc>
6339 </attribute>
6340
6341 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6342 <desc>
6343 Maximum device position in the boot order. This value corresponds
6344 to the total number of devices a machine can boot from, to make it
6345 possible to include all possible devices to the boot list.
6346 <see><link to="IMachine::setBootOrder()"/></see>
6347 </desc>
6348 </attribute>
6349
6350 <attribute name="defaultMachineFolder" type="wstring">
6351 <desc>
6352 Full path to the default directory used to create new or open
6353 existing machines when a settings file name contains no
6354 path.
6355
6356 The initial value of this property is
6357 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6358 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6359
6360 <note>
6361 Setting this property to <tt>null</tt> will restore the
6362 initial value.
6363 </note>
6364 <note>
6365 When settings this property, the specified path can be
6366 absolute (full path) or relative
6367 to the <link to="IVirtualBox::homeFolder">
6368 VirtualBox home directory</link>.
6369 When reading this property, a full path is
6370 always returned.
6371 </note>
6372 <note>
6373 The specified path may not exist, it will be created
6374 when necessary.
6375 </note>
6376
6377 <see>
6378 <link to="IVirtualBox::createMachine()"/>,
6379 <link to="IVirtualBox::openMachine()"/>
6380 </see>
6381 </desc>
6382 </attribute>
6383
6384 <attribute name="defaultHardDiskFolder" type="wstring">
6385 <desc>
6386 Full path to the default directory used to create new or open existing
6387 virtual disks.
6388
6389 This path is used when the storage unit of a hard disk is a regular file
6390 in the host's file system and only a file name that contains no path is
6391 given.
6392
6393 The initial value of this property is
6394 <tt>&lt;</tt>
6395 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6396 <tt>&gt;/HardDisks</tt>.
6397
6398 <note>
6399 Setting this property to <tt>null</tt> will restore the
6400 initial value.
6401 </note>
6402 <note>
6403 When settings this property, the specified path can be relative
6404 to the
6405 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6406 absolute. When reading this property, a full path is
6407 always returned.
6408 </note>
6409 <note>
6410 The specified path may not exist, it will be created
6411 when necessary.
6412 </note>
6413
6414 <see>
6415 IHardDisk2,
6416 <link to="IVirtualBox::createHardDisk2()"/>,
6417 <link to="IVirtualBox::openHardDisk2()"/>,
6418 <link to="IMedium::location"/>
6419 </see>
6420 </desc>
6421 </attribute>
6422
6423 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6424 <desc>
6425 List of all hard disk storage formats supported by this VirtualBox
6426 installation.
6427
6428 Note that the virtual hard disk framework is backend-based, therefore
6429 the list of supported formats depends on what backends are currently
6430 installed.
6431
6432 <see>
6433 <link to="IHardDiskFormat"/>,
6434 </see>
6435 </desc>
6436 </attribute>
6437
6438 <attribute name="defaultHardDiskFormat" type="wstring">
6439 <desc>
6440 Identifier of the default hard disk format used by VirtualBox.
6441
6442 The hard disk format set by this attribute is used by VirtualBox
6443 when the hard disk format was not specified explicitly. One example is
6444 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6445 format argument. A more complex example is implicit creation of
6446 differencing hard disks when taking a snapshot of a virtual machine:
6447 this operation will try to use a format of the parent hard disk first
6448 and if this format does not support differencing hard disks the default
6449 format specified by this argument will be used.
6450
6451 The list of supported hard disk formats may be obtained by the
6452 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6453 format must have a capability to create differencing hard disks;
6454 otherwise opeartions that create hard disks implicitly may fail
6455 unexpectedly.
6456
6457 The initial value of this property is <tt>VDI</tt> in the current
6458 version of the VirtualBox product, but may change in the future.
6459
6460 <note>
6461 Setting this property to <tt>null</tt> will restore the
6462 initial value.
6463 </note>
6464
6465 <see>
6466 <link to="#hardDiskFormats"/>,
6467 <link to="IHardDiskFormat::id"/>,
6468 <link to="IVirtualBox::createHardDisk2()"/>
6469 </see>
6470 </desc>
6471 </attribute>
6472
6473 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6474 <desc>
6475 Library that provides authentication for VRDP clients. The library
6476 is used if a virtual machine's authentication type is set to "external"
6477 in the VM RemoteDisplay configuration.
6478
6479 The system library extension (".DLL" or ".so") must be omitted.
6480 A full path can be specified; if not, then the library must reside on the
6481 system's default library path.
6482
6483 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6484 of that name in one of the default VirtualBox library directories.
6485
6486 For details about VirtualBox authentication libraries and how to implement
6487 them, please refer to the VirtualBox manual.
6488
6489 <note>
6490 Setting this property to <tt>null</tt> will restore the
6491 initial value.
6492 </note>
6493 </desc>
6494 </attribute>
6495
6496 <attribute name="webServiceAuthLibrary" type="wstring">
6497 <desc>
6498 Library that provides authentication for webservice clients. The library
6499 is used if a virtual machine's authentication type is set to "external"
6500 in the VM RemoteDisplay configuration and will be called from
6501 within the <link to="IWebsessionManager::logon" /> implementation.
6502
6503 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6504 there is no per-VM setting for this, as the webservice is a global
6505 resource (if it is running). Only for this setting (for the webservice),
6506 setting this value to a literal "null" string disables authentication,
6507 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
6508 no matter what user name and password are supplied.
6509
6510 The initial value of this property is <tt>VRDPAuth</tt>,
6511 meaning that the webservice will use the same authentication
6512 library that is used by default for VBoxVRDP (again, see
6513 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
6514 The format and calling convention of authentication libraries
6515 is the same for the webservice as it is for VBoxVRDP.
6516
6517 </desc>
6518 </attribute>
6519
6520 <attribute name="HWVirtExEnabled" type="boolean">
6521 <desc>
6522 This specifies the default value for hardware virtualization
6523 extensions. If enabled, virtual machines will make use of
6524 hardware virtualization extensions such as Intel VT-x and
6525 AMD-V by default. This value can be overridden by each VM
6526 using their <link to="IMachine::HWVirtExEnabled" /> property.
6527 </desc>
6528 </attribute>
6529
6530 <attribute name="LogHistoryCount" type="unsigned long">
6531 <desc>
6532 This value specifies how many old release log files are kept.
6533 </desc>
6534 </attribute>
6535 </interface>
6536
6537 <!--
6538 // IGuest
6539 /////////////////////////////////////////////////////////////////////////
6540 -->
6541
6542 <interface
6543 name="IGuestOSType" extends="$unknown"
6544 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
6545 wsmap="struct"
6546 >
6547 <desc>
6548 </desc>
6549
6550 <attribute name="familyId" type="wstring" readonly="yes">
6551 <desc>Guest OS family identifier string.</desc>
6552 </attribute>
6553
6554 <attribute name="familyDescription" type="wstring" readonly="yes">
6555 <desc>Human readable description of the guest OS family.</desc>
6556 </attribute>
6557
6558 <attribute name="id" type="wstring" readonly="yes">
6559 <desc>Guest OS identifier string.</desc>
6560 </attribute>
6561
6562 <attribute name="description" type="wstring" readonly="yes">
6563 <desc>Human readable description of the guest OS.</desc>
6564 </attribute>
6565
6566 <attribute name="is64Bit" type="boolean" readonly="yes">
6567 <desc>Returns @c true if the given OS is 64-bit</desc>
6568 </attribute>
6569
6570 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
6571 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
6572 </attribute>
6573
6574 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
6575 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
6576 </attribute>
6577
6578 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
6579 <desc>Recommended RAM size in Megabytes.</desc>
6580 </attribute>
6581
6582 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
6583 <desc>Recommended video RAM size in Megabytes.</desc>
6584 </attribute>
6585
6586 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
6587 <desc>Recommended hard disk size in Megabytes.</desc>
6588 </attribute>
6589
6590 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
6591 <desc>Returns recommended network adapter for this OS type.</desc>
6592 </attribute>
6593 </interface>
6594
6595
6596 <enumerator
6597 name="IGuestOSTypeEnumerator" type="IGuestOSType"
6598 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
6599 />
6600
6601 <collection
6602 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
6603 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
6604 readonly="yes"
6605 />
6606
6607 <interface
6608 name="IGuest" extends="$unknown"
6609 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
6610
6611 wsmap="suppress"
6612 >
6613 <desc>
6614 The IGuest interface represents information about the operating system
6615 running inside the virtual machine. Used in
6616 <link to="IConsole::guest"/>.
6617
6618 IGuest provides information about the guest operating system, whether
6619 Guest Additions are installed and other OS-specific virtual machine
6620 properties.
6621 </desc>
6622
6623 <attribute name="OSTypeId" type="wstring" readonly="yes">
6624 <desc>
6625 Identifier of the Guest OS type as reported by the Guest
6626 Additions.
6627 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
6628 an IGuestOSType object representing details about the given
6629 Guest OS type.
6630 <note>
6631 If Guest Additions are not installed, this value will be
6632 the same as <link to="IMachine::OSTypeId"/>.
6633 </note>
6634 </desc>
6635 </attribute>
6636
6637 <attribute name="additionsActive" type="boolean" readonly="yes">
6638 <desc>
6639 Flag whether the Guest Additions are installed and active
6640 in which case their version will be returned by the
6641 <link to="#additionsVersion"/> property.
6642 </desc>
6643 </attribute>
6644
6645 <attribute name="additionsVersion" type="wstring" readonly="yes">
6646 <desc>
6647 Version of the Guest Additions (3 decimal numbers separated
6648 by dots) or empty when the Additions are not installed. The
6649 Additions may also report a version but yet not be active as
6650 the version might be refused by VirtualBox (incompatible) or
6651 other failures occurred.
6652 </desc>
6653 </attribute>
6654
6655 <attribute name="supportsSeamless" type="boolean" readonly="yes">
6656 <desc>
6657 Flag whether seamless guest display rendering (seamless desktop
6658 integration) is supported.
6659 </desc>
6660 </attribute>
6661
6662 <attribute name="supportsGraphics" type="boolean" readonly="yes">
6663 <desc>
6664 Flag whether the guest is in graphics mode. If it is not, then
6665 seamless rendering will not work, resize hints are not immediately
6666 acted on and guest display resizes are probably not initiated by
6667 the guest additions.
6668 </desc>
6669 </attribute>
6670
6671 <attribute name="memoryBalloonSize" type="unsigned long">
6672 <desc>Guest system memory balloon size in megabytes.</desc>
6673 </attribute>
6674
6675 <attribute name="statisticsUpdateInterval" type="unsigned long">
6676 <desc>Interval to update guest statistics in seconds.</desc>
6677 </attribute>
6678
6679 <method name="setCredentials">
6680 <desc>
6681 Store login credentials that can be queried by guest operating
6682 systems with Additions installed. The credentials are transient
6683 to the session and the guest may also choose to erase them. Note
6684 that the caller cannot determine whether the guest operating system
6685 has queried or made use of the credentials.
6686
6687 <result name="VBOX_E_VM_ERROR">
6688 VMM device is not available.
6689 </result>
6690
6691 </desc>
6692 <param name="userName" type="wstring" dir="in">
6693 <desc>User name string, can be empty</desc>
6694 </param>
6695 <param name="password" type="wstring" dir="in">
6696 <desc>Password string, can be empty</desc>
6697 </param>
6698 <param name="domain" type="wstring" dir="in">
6699 <desc>Domain name (guest logon scheme specific), can be empty</desc>
6700 </param>
6701 <param name="allowInteractiveLogon" type="boolean" dir="in">
6702 <desc>
6703 Flag whether the guest should alternatively allow the user to
6704 interactively specify different credentials. This flag might
6705 not be supported by all versions of the Additions.
6706 </desc>
6707 </param>
6708 </method>
6709
6710 <method name="getStatistic">
6711 <desc>
6712 Query specified guest statistics as reported by the VirtualBox Additions.
6713 </desc>
6714 <param name="cpuId" type="unsigned long" dir="in">
6715 <desc>Virtual CPU id; not relevant for all statistic types</desc>
6716 </param>
6717 <param name="statistic" type="GuestStatisticType" dir="in">
6718 <desc>Statistic type.</desc>
6719 </param>
6720 <param name="statVal" type="unsigned long" dir="out">
6721 <desc>Statistics value</desc>
6722 </param>
6723 </method>
6724
6725 </interface>
6726
6727
6728 <!--
6729 // IProgress
6730 /////////////////////////////////////////////////////////////////////////
6731 -->
6732
6733 <enumerator
6734 name="IProgressEnumerator" type="IProgress"
6735 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
6736 />
6737
6738 <collection
6739 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
6740 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
6741 readonly="yes"
6742 />
6743
6744 <interface
6745 name="IProgress" extends="$unknown"
6746 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
6747 wsmap="managed"
6748 >
6749 <desc>
6750 The IProgress interface represents a task progress object that allows
6751 to wait for the completion of some asynchronous task.
6752
6753 The task consists of one or more operations that run sequentially,
6754 one after one. There is an individual percent of completion of the
6755 current operation and the percent of completion of the task as a
6756 whole. Similarly, you can wait for the completion of a particular
6757 operation or for the completion of the whole task.
6758
6759 Every operation is identified by a number (starting from 0)
6760 and has a separate description.
6761 </desc>
6762
6763 <attribute name="id" type="uuid" readonly="yes">
6764 <desc>ID of the task.</desc>
6765 </attribute>
6766
6767 <attribute name="description" type="wstring" readonly="yes">
6768 <desc>Description of the task.</desc>
6769 </attribute>
6770
6771 <attribute name="initiator" type="$unknown" readonly="yes">
6772 <desc>Initiator of the task.</desc>
6773 </attribute>
6774
6775 <attribute name="cancelable" type="boolean" readonly="yes">
6776 <desc>Whether the task can be interrupted.</desc>
6777 </attribute>
6778
6779 <attribute name="percent" type="long" readonly="yes">
6780 <desc>
6781 Current task progress value in percent.
6782 This value depends on how many operations are already complete.
6783 </desc>
6784 </attribute>
6785
6786 <attribute name="completed" type="boolean" readonly="yes">
6787 <desc>Whether the task has been completed.</desc>
6788 </attribute>
6789
6790 <attribute name="canceled" type="boolean" readonly="yes">
6791 <desc>Whether the task has been canceled.</desc>
6792 </attribute>
6793
6794 <attribute name="resultCode" type="result" readonly="yes">
6795 <desc>
6796 Result code of the progress task.
6797 Valid only if <link to="#completed"/> is true.
6798 </desc>
6799 </attribute>
6800
6801 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
6802 <desc>
6803 Extended information about the unsuccessful result of the
6804 progress operation. May be NULL when no extended information
6805 is available.
6806 Valid only if <link to="#completed"/> is true and
6807 <link to="#resultCode"/> indicates a failure.
6808 </desc>
6809 </attribute>
6810
6811 <attribute name="operationCount" type="unsigned long" readonly="yes">
6812 <desc>
6813 Number of operations this task is divided into.
6814 Every task consists of at least one operation.
6815 </desc>
6816 </attribute>
6817
6818 <attribute name="operation" type="unsigned long" readonly="yes">
6819 <desc>Number of the operation being currently executed.</desc>
6820 </attribute>
6821
6822 <attribute name="operationDescription" type="wstring" readonly="yes">
6823 <desc>
6824 Description of the operation being currently executed.
6825 </desc>
6826 </attribute>
6827
6828 <attribute name="operationPercent" type="long" readonly="yes">
6829 <desc>Current operation progress value in percent.</desc>
6830 </attribute>
6831
6832 <method name="waitForCompletion">
6833 <desc>
6834 Waits until the task is done (including all operations) with a
6835 given timeout.
6836
6837 <result name="VBOX_E_IPRT_ERROR">
6838 Failed to wait for task completion.
6839 </result>
6840
6841 </desc>
6842 <param name="timeout" type="long" dir="in">
6843 <desc>
6844 Timeout value in milliseconds.
6845 Specify -1 for an indefinite wait.
6846 </desc>
6847 </param>
6848 </method>
6849
6850 <method name="waitForOperationCompletion">
6851 <desc>
6852 Waits until the given operation is done with a given timeout.
6853
6854 <result name="VBOX_E_IPRT_ERROR">
6855 Failed to wait for operation completion.
6856 </result>
6857
6858 </desc>
6859 <param name="operation" type="unsigned long" dir="in">
6860 <desc>
6861 Number of the operation to wait for.
6862 Must be less than <link to="#operationCount"/>.
6863 </desc>
6864 </param>
6865 <param name="timeout" type="long" dir="in">
6866 <desc>
6867 Timeout value in milliseconds.
6868 Specify -1 for an indefinite wait.
6869 </desc>
6870 </param>
6871 </method>
6872
6873 <method name="cancel">
6874 <desc>
6875 Cancels the task.
6876 <note>
6877 If <link to="#cancelable"/> is <tt>false</tt>, then
6878 this method will fail.
6879 </note>
6880
6881 <result name="VBOX_E_INVALID_OBJECT_STATE">
6882 Operation cannot be canceled.
6883 </result>
6884
6885 </desc>
6886 </method>
6887
6888 </interface>
6889
6890
6891 <!--
6892 // ISnapshot
6893 /////////////////////////////////////////////////////////////////////////
6894 -->
6895
6896 <enumerator
6897 name="ISnapshotEnumerator" type="ISnapshot"
6898 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
6899 />
6900
6901 <collection
6902 name="ISnapshotCollection" type="ISnapshot"
6903 enumerator="ISnapshotEnumerator"
6904 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
6905 readonly="yes"
6906 />
6907
6908 <interface
6909 name="ISnapshot" extends="$unknown"
6910 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
6911 wsmap="managed"
6912 >
6913 <desc>
6914 The ISnapshot interface represents a snapshot of the virtual
6915 machine.
6916
6917 The <i>snapshot</i> stores all the information about a virtual
6918 machine necessary to bring it to exactly the same state as it was at
6919 the time of taking the snapshot. The snapshot includes:
6920
6921 <ul>
6922 <li>all settings of the virtual machine (i.e. its hardware
6923 configuration: RAM size, attached hard disks, etc.)
6924 </li>
6925 <li>the execution state of the virtual machine (memory contents,
6926 CPU state, etc.).
6927 </li>
6928 </ul>
6929
6930 Snapshots can be <i>offline</i> (taken when the VM is powered off)
6931 or <i>online</i> (taken when the VM is running). The execution
6932 state of the offline snapshot is called a <i>zero execution state</i>
6933 (it doesn't actually contain any information about memory contents
6934 or the CPU state, assuming that all hardware is just powered off).
6935
6936 <h3>Snapshot branches</h3>
6937
6938 Snapshots can be chained. Chained snapshots form a branch where
6939 every next snapshot is based on the previous one. This chaining is
6940 mostly related to hard disk branching (see <link to="IHardDisk2"/>
6941 description). This means that every time a new snapshot is created,
6942 a new differencing hard disk is implicitly created for all normal
6943 hard disks attached to the given virtual machine. This allows to
6944 fully restore hard disk contents when the machine is later reverted
6945 to a particular snapshot.
6946
6947 In the current implementation, multiple snapshot branches within one
6948 virtual machine are not allowed. Every machine has a single branch,
6949 and <link to="IConsole::takeSnapshot()"/> operation adds a new
6950 snapshot to the top of that branch.
6951
6952 Existing snapshots can be discarded using
6953 <link to="IConsole::discardSnapshot()"/>.
6954
6955 <h3>Current snapshot</h3>
6956
6957 Every virtual machine has a current snapshot, identified by
6958 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
6959 a base for the <i>current machine state</i> (see below), to the effect
6960 that all normal hard disks of the machine and its execution
6961 state are based on this snapshot.
6962
6963 In the current implementation, the current snapshot is always the
6964 last taken snapshot (i.e. the head snapshot on the branch) and it
6965 cannot be changed.
6966
6967 The current snapshot is <tt>null</tt> if the machine doesn't have
6968 snapshots at all; in this case the current machine state is just
6969 current settings of this machine plus its current execution state.
6970
6971 <h3>Current machine state</h3>
6972
6973 The current machine state is what represented by IMachine instances got
6974 directly from IVirtualBox
6975 using <link
6976 to="IVirtualBox::getMachine()">getMachine()</link>, <link
6977 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
6978 to instances returned by <link to="ISnapshot::machine"/>). This state
6979 is always used when the machine is <link to="IConsole::powerUp"> powered
6980 on</link>.
6981
6982 The current machine state also includes the current execution state.
6983 If the machine is being currently executed
6984 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
6985 and above), its execution state is just what's happening now.
6986 If it is powered off (<link to="MachineState_PoweredOff"/> or
6987 <link to="MachineState_Aborted"/>), it has a zero execution state.
6988 If the machine is saved (<link to="MachineState_Saved"/>), its
6989 execution state is what saved in the execution state file
6990 (<link to="IMachine::stateFilePath"/>).
6991
6992 If the machine is in the saved state, then, next time it is powered
6993 on, its execution state will be fully restored from the saved state
6994 file and the execution will continue from the point where the state
6995 was saved.
6996
6997 Similarly to snapshots, the current machine state can be discarded
6998 using <link to="IConsole::discardCurrentState()"/>.
6999
7000 <h3>Taking and discarding snapshots</h3>
7001
7002 The table below briefly explains the meaning of every snapshot
7003 operation:
7004
7005 <table>
7006 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7007
7008 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7009
7010 <td>Save the current state of the virtual machine, including all
7011 settings, contents of normal hard disks and the current modifications
7012 to immutable hard disks (for online snapshots)</td>
7013
7014 <td>The current state is not changed (the machine will continue
7015 execution if it is being executed when the snapshot is
7016 taken)</td></tr>
7017
7018 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7019
7020 <td>Forget the state of the virtual machine stored in the snapshot:
7021 dismiss all saved settings and delete the saved execution state (for
7022 online snapshots)</td>
7023
7024 <td>Other snapshots (including child snapshots, if any) and the
7025 current state are not directly affected</td></tr>
7026
7027 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7028
7029 <td>Restore the current state of the virtual machine from the state
7030 stored in the current snapshot, including all settings and hard disk
7031 contents</td>
7032
7033 <td>The current state of the machine existed prior to this operation
7034 is lost</td></tr>
7035
7036 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7037
7038 <td>Completely revert the virtual machine to the state it was in
7039 before the current snapshot has been taken</td>
7040
7041 <td>The current state, as well as the current snapshot, are
7042 lost</td></tr>
7043
7044 </table>
7045
7046 </desc>
7047
7048 <attribute name="id" type="uuid" readonly="yes">
7049 <desc>UUID of the snapshot.</desc>
7050 </attribute>
7051
7052 <attribute name="name" type="wstring">
7053 <desc>Short name of the snapshot.</desc>
7054 </attribute>
7055
7056 <attribute name="description" type="wstring">
7057 <desc>Optional description of the snapshot.</desc>
7058 </attribute>
7059
7060 <attribute name="timeStamp" type="long long" readonly="yes">
7061 <desc>
7062 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7063 </desc>
7064 </attribute>
7065
7066 <attribute name="online" type="boolean" readonly="yes">
7067 <desc>
7068 <tt>true</tt> if this snapshot is an online snapshot and
7069 <tt>false</tt> otherwise.
7070
7071 <note>
7072 When this attribute is <tt>true</tt>, the
7073 <link to="IMachine::stateFilePath"/> attribute of the
7074 <link to="#machine"/> object associated with this snapshot
7075 will point to the saved state file. Otherwise, it will be
7076 <tt>null</tt>.
7077 </note>
7078 </desc>
7079 </attribute>
7080
7081 <attribute name="machine" type="IMachine" readonly="yes">
7082 <desc>
7083 Virtual machine this snapshot is taken on. This object
7084 stores all settings the machine had when taking this snapshot.
7085 <note>
7086 The returned machine object is immutable, i.e. no
7087 any settings can be changed.
7088 </note>
7089 </desc>
7090 </attribute>
7091
7092 <attribute name="parent" type="ISnapshot" readonly="yes">
7093 <desc>
7094 Parent snapshot (a snapshot this one is based on).
7095 <note>
7096 It's not an error to read this attribute on a snapshot
7097 that doesn't have a parent -- a null object will be
7098 returned to indicate this.
7099 </note>
7100 </desc>
7101 </attribute>
7102
7103 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7104 <desc>
7105 Child snapshots (all snapshots having this one as a parent).
7106 <note>
7107 In the current implementation, there can be only one
7108 child snapshot, or no children at all, meaning this is the
7109 last (head) snapshot.
7110 </note>
7111 </desc>
7112 </attribute>
7113
7114 </interface>
7115
7116
7117 <!--
7118 // IMedia
7119 /////////////////////////////////////////////////////////////////////////
7120 -->
7121
7122 <enum
7123 name="MediaState"
7124 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7125 >
7126 <desc>
7127 Virtual media state.
7128 <see>IMedia</see>
7129 </desc>
7130
7131 <const name="NotCreated" value="0">
7132 <desc>
7133 Associated media storage does not exist (either was not created yet or
7134 was deleted).
7135 </desc>
7136 </const>
7137 <const name="Created" value="1">
7138 <desc>
7139 Associated storage exists and accessible.
7140 </desc>
7141 </const>
7142 <const name="LockedRead" value="2">
7143 <desc>
7144 Media is locked for reading, no data modification is possible.
7145 </desc>
7146 </const>
7147 <const name="LockedWrite" value="3">
7148 <desc>
7149 Media is locked for writing, no concurrent data reading or modification
7150 is possible.
7151 </desc>
7152 </const>
7153 <const name="Inaccessible" value="4">
7154 <desc>
7155 Associated media storage is not accessible.
7156 </desc>
7157 </const>
7158 <const name="Creating" value="5">
7159 <desc>
7160 Associated media storage is being created.
7161 </desc>
7162 </const>
7163 <const name="Deleting" value="6">
7164 <desc>
7165 Associated media storage is being deleted.
7166 </desc>
7167 </const>
7168 </enum>
7169
7170 <interface
7171 name="IMedium" extends="$unknown"
7172 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7173 wsmap="managed"
7174 >
7175 <desc>
7176 The IMedium interface is a common interface for all objects representing
7177 virtual media such as hard disks, DVD images.
7178
7179 Each medium is associated with a storage unit (such as a file on the host
7180 computer or a network resource) that holds actual data. The location of
7181 the storage unit is represented by the #location attribute. The value of
7182 this attribute is media type dependent.
7183
7184 The exact media type may be determined by querying the appropriate
7185 interface such as:
7186 <ul>
7187 <li>IHardDisk2 (virtual hard disks)</li>
7188 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7189 <li>IFloppyImage2 (raw floppy image files)</li>
7190 </ul>
7191
7192 Existing media are opened using the following methods, depending on the
7193 media type:
7194 <ul>
7195 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7196 <li><link to="IVirtualBox::openDVDImage()"/></li>
7197 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7198 </ul>
7199
7200 New hard disk media are created using the
7201 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7202 images are created outside VirtualBox, usually by storing a copy
7203 of the real medium of the corresponding type in a regular file.
7204
7205 <h3>Known Media</h3>
7206
7207 When an existing medium gets opened for the first time, it gets
7208 automatically remembered by the given VirtualBox installation or, in other
7209 words, becomes a <i>known medium</i>. Known media are stored in the media
7210 registry transparently maintained by VirtualBox and stored in settings
7211 files so that this registry is preserved when VirtualBox is not running.
7212
7213 Newly created virtual hard disks get remembered only when the associated
7214 storage unit is actually created (see IHardDisk2 for more details).
7215
7216 All known media can be enumerated using
7217 <link to="IVirtualBox::hardDisks2"/>,
7218 <link to="IVirtualBox::DVDImages"/> and
7219 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7220 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7221 and similar methods or by location using
7222 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7223
7224 Only known media can be attached to virtual machines.
7225
7226 Removing known media from the media registry is performed when the given
7227 medium is closed using the <link to="#close()"/> method or when its
7228 associated storage unit is deleted (only for hard disks).
7229
7230 <h3>Accessibility Checks</h3>
7231
7232 The given medium (with the created storage unit) is considered to be
7233 <i>accessible</i> when its storage unit can be successfully read from.
7234 Accessible media are indicated by the <link to="MediaState_Created"/>
7235 value of the <link to="#state"/> attribute. When the storage unit cannot
7236 be read (for example, because it is located on a disconnected network
7237 resource, or was accidentally deleted outside VirtualBox), the medium is
7238 considered to be <i>inaccessible</i> which is indicated by the
7239 <link to="MediaState_Inaccessible"/> state. The details about the reason
7240 of being inaccessible can be obtained using the
7241 <link to="#lastAccessError"/> attribute.
7242
7243 A new accessibility check is performed each time the <link to="#state"/>
7244 attribute is read. Please note that this check may take long time (several
7245 seconds or even minutes, depending on the storage unit location and
7246 format), and will block the calling thread until finished. For this
7247 reason, it is recommended to never read this attribute on the main UI
7248 thread to avoid making the UI unresponsive.
7249
7250 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7251 created for the first time), all known media are in the
7252 <link to="MediaState_Inaccessible"/> state but the value of the <link
7253 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7254 accessibility check is made on startup. This is done to make the
7255 VirtualBox object ready for serving requests as
7256 fast as possible and let the end-user application decide if it needs to
7257 check media accessibility right away or not.
7258 </desc>
7259
7260 <attribute name="id" type="uuid" readonly="yes">
7261 <desc>
7262 UUID of the medium. For a newly created medium, this value is a randomly
7263 generated UUID.
7264
7265 <note>
7266 For media in one of MediaState_NotCreated, MediaState_Creating or
7267 MediaState_Deleting states, the value of this property is undefined
7268 and will most likely be an empty UUID.
7269 </note>
7270 </desc>
7271 </attribute>
7272
7273 <attribute name="description" type="wstring">
7274 <desc>
7275 Optional description of the medium. For newly created media, the value
7276 of this attribute value is <tt>null</tt>.
7277
7278 Media types that don't support this attribute will return E_NOTIMPL in
7279 attempt to get or set this attribute's value.
7280
7281 <note>
7282 For some storage types, reading this attribute may return an outdated
7283 (last known) value when <link to="#state"/> is <link
7284 to="MediaState_Inaccessible"/> or <link
7285 to="MediaState_LockedWrite"/> because the value of this attribute is
7286 stored within the storage unit itself. Also note that changing the
7287 attribute value is not possible in such case, as well as when the
7288 medium is the <link to="MediaState_LockedRead"/> state.
7289 </note>
7290 </desc>
7291 </attribute>
7292
7293 <attribute name="state" type="MediaState" readonly="yes">
7294 <desc>
7295 Current media state. Inspect <link to="MediaState"/> values for details.
7296
7297 Reading this attribute may take long time because a new accessibility
7298 check of the storage unit is performed every time the attribute is read.
7299 This check may cause a significant delay if the storage unit of the
7300 given medium is, for example, a file located on a network share which is
7301 not currently accessible due to connectivity problems -- the call will
7302 not return until a timeout interval defined by the host OS for this
7303 operation expires.
7304
7305 If the last known state of the medium is <link to="MediaState_Created"/>
7306 and the accessibility check fails then the state would be set to
7307 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7308 may be used to get more details about the failure. If the state of the
7309 medium is <link to="MediaState_LockedRead"/> or
7310 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7311 non-null value of <link to="#lastAccessError"/> will indicate a failed
7312 accessibility check in this case.
7313
7314 Note that not all media states are applicable to certain media types.
7315 For example, states <link to="MediaState_NotCreated"/>,
7316 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7317 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7318 IFloppyImage2 media.
7319 </desc>
7320 </attribute>
7321
7322 <attribute name="location" type="wstring">
7323 <desc>
7324 Location of the storage unit holding media data.
7325
7326 The format of the location string is media type specific. For media
7327 types that use regular files in a host's file system, the location
7328 string is just a full file name.
7329
7330 Some media types may support changing the storage unit location by
7331 simply changing the value of this property. If this operation is not
7332 supported, the implementation will return E_NOTIMPL in attempt to set
7333 this attribute's value.
7334
7335 When setting a value of the location attribute which is a regular file
7336 in the host's file system, the given file name may be either relative to
7337 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7338 absolute. Note that if the given location specification does not contain
7339 the file extension part then a proper default extension will be
7340 automatically appended by the implementation depending on the media type.
7341 </desc>
7342 </attribute>
7343
7344 <attribute name="name" type="wstring" readonly="yes">
7345 <desc>
7346 Name of the storage unit holding media data.
7347
7348 The returned string is a short version of the <link to="#location"/>
7349 attribute that is suitable for representing the medium in situations
7350 where the full location specification is too long (such as lists
7351 and comboboxes in GUI frontends). This string is also used by frontends
7352 to sort the media list alphabetically when needed.
7353
7354 For example, for locations that are regular files in the host's file
7355 system, the value of this attribute is just a file name (+ extension),
7356 without the path specification.
7357
7358 Note that as opposed to the <link to="#location"/> attribute, the name
7359 attribute will not necessary be unique for a list of media of the
7360 given type and format.
7361 </desc>
7362 </attribute>
7363
7364 <attribute name="size" type="unsigned long long" readonly="yes">
7365 <desc>
7366 Physical size of the storage unit used to hold media data (in bytes).
7367
7368 <note>
7369 For media whose <link to="#state"/> is <link
7370 to="MediaState_Inaccessible"/>, the value of this property is the
7371 last known size. For <link to="MediaState_NotCreated"/> media,
7372 the returned value is zero.
7373 </note>
7374 </desc>
7375 </attribute>
7376
7377 <attribute name="lastAccessError" type="wstring" readonly="yes">
7378 <desc>
7379 Text message that represents the result of the last accessibility
7380 check.
7381
7382 Accessibility checks are performed each time the <link to="#state"/>
7383 attribute is read. A @c null string is returned if the last
7384 accessibility check was successful. A non-null string indicates a
7385 failure and should normally describe a reason of the failure (for
7386 example, a file read error).
7387 </desc>
7388 </attribute>
7389
7390 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7391 <desc>
7392 Array of UUIDs of all machines this medium is attached to.
7393
7394 A <tt>null</tt> array is returned if this medium is not attached to any
7395 machine or to any machine's snapshot.
7396
7397 <note>
7398 The returned array will include a machine even if this medium is not
7399 attached to that machine in the current state but attached to it in
7400 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7401 details.
7402 </note>
7403 </desc>
7404 </attribute>
7405
7406 <method name="getSnapshotIds">
7407 <desc>
7408 Returns an array of UUIDs of all snapshots of the given machine where
7409 this medium is attached to it.
7410
7411 If the medium is attached to the machine in the current state, then the
7412 first element in the array will always be the ID of the queried machine
7413 (i.e. the value equal to the @c machineId argument), followed by
7414 snapshot IDs (if any).
7415
7416 If the medium is not attached to the machine in the current state, then
7417 the array will contain only snapshot IDs.
7418
7419 The returned array may be <tt>null</tt> if this medium is not attached
7420 to the given machine at all, neither in the current state nor in one of
7421 snapshots.
7422 </desc>
7423 <param name="machineId" type="uuid" dir="in">
7424 <desc>
7425 UUID of the machine to query.
7426 </desc>
7427 </param>
7428 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7429 <desc>
7430 Array of snapshot UUIDs of the given machine using this medium.
7431 </desc>
7432 </param>
7433 </method>
7434
7435 <method name="lockRead">
7436 <desc>
7437 Locks this medium for reading.
7438
7439 The read lock is shared: many clients can simultaneously lock the
7440 same media for reading unless it is already locked for writing (see
7441 <link to="#lockWrite()"/>) in which case an error is returned.
7442
7443 When the medium is locked for reading, it cannot be modified
7444 from within VirtualBox. This means that any method that changes
7445 the properties of this medium or contents of the storage unit
7446 will return an error (unless explicitly stated otherwise) and
7447 that an attempt to start a virtual machine that wants to modify
7448 the medium will also fail.
7449
7450 When the virtual machine is started up, it locks for reading all
7451 media it uses in read-only mode. If some media cannot be locked
7452 for reading, the startup procedure will fail.
7453
7454 The medium locked for reading must be unlocked using the <link
7455 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7456 can be nested and must be followed by the same number of paired
7457 <link to="#unlockRead()"/> calls.
7458
7459 This method sets the media state to <link
7460 to="MediaState_LockedRead"/> on success. The state prior to
7461 this call must be <link to="MediaState_Created"/>, <link
7462 to="MediaState_Inaccessible"/> or <link
7463 to="MediaState_LockedRead"/>. As you can see, inaccessible
7464 media can be locked too. This is not an error; this method
7465 performs a logical lock that prevents modifications of this
7466 media through the VirtualBox API, not a physical lock of the
7467 underlying storage unit.
7468
7469 This method returns the current state of the medium
7470 <b>before</b> the operation.
7471
7472 <result name="VBOX_E_INVALID_OBJECT_STATE">
7473 Invalid media state (e.g. not created, locked, inaccessible,
7474 creating, deleting).
7475 </result>
7476
7477 </desc>
7478 <param name="state" type="MediaState" dir="return">
7479 <desc>
7480 State of the medium after the operation.
7481 </desc>
7482 </param>
7483 </method>
7484
7485 <method name="unlockRead">
7486 <desc>
7487 Cancels the read lock previously set by <link to="#lockRead()"/>.
7488
7489 Either on success or on failure, this method returns the current state
7490 of the medium <b>after</b> the operation.
7491
7492 See <link to="#lockRead()"/> for more details.
7493
7494 <result name="VBOX_E_INVALID_OBJECT_STATE">
7495 Medium not locked for reading.
7496 </result>
7497
7498 </desc>
7499 <param name="state" type="MediaState" dir="return">
7500 <desc>
7501 State of the medium after the operation.
7502 </desc>
7503 </param>
7504 </method>
7505
7506 <method name="lockWrite">
7507 <desc>
7508 Locks this medium for writing.
7509
7510 The write lock, as opposed to <link to="#lockRead()"/>, is
7511 exclusive: there may be only one client that holds a write lock
7512 and there may be no read locks while the write lock is held.
7513
7514 When the medium is locked for writing, it cannot be modified
7515 from within VirtualBox and it is not guaranteed that the values
7516 of its properties are up-to-date. Any method that changes the
7517 properties of this medium or contents of the storage unit will
7518 return an error ((unless explicitly stated otherwise) and an
7519 attempt to start a virtual machine that wants to modify or to
7520 read the medium will also fail.
7521
7522 When the virtual machine is started up, it locks for writing all
7523 media it uses to write data to. If some media cannot be locked
7524 for writing, the startup procedure will fail.
7525
7526 The medium locked for writing must be unlocked using the <link
7527 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
7528 can <b>not</b> be nested and must be followed by a paired <link
7529 to="#unlockWrite()"/> call.
7530
7531 This method sets the media state to <link
7532 to="MediaState_LockedWrite"/> on success. The state prior to
7533 this call must be <link to="MediaState_Created"/> or <link
7534 to="MediaState_Inaccessible"/>. As you can see, inaccessible
7535 media can be locked too. This is not an error; this method
7536 performs a logical lock that prevents modifications of this
7537 media through the VirtualBox API, not a physical lock of the
7538 underlying storage unit.
7539
7540 Either on success or on failure, this method returns the current
7541 state of the medium <b>before</b> the operation.
7542
7543 <result name="VBOX_E_INVALID_OBJECT_STATE">
7544 Invalid media state (e.g. not created, locked, inaccessible,
7545 creating, deleting).
7546 </result>
7547
7548 </desc>
7549 <param name="state" type="MediaState" dir="return">
7550 <desc>
7551 State of the medium after the operation.
7552 </desc>
7553 </param>
7554 </method>
7555
7556 <method name="unlockWrite">
7557 <desc>
7558 Cancels the write lock previously set by <link to="#lockWrite()"/>.
7559
7560 Either on success or on failure, this method returns the current
7561 state of the medium <b>after</b> the operation.
7562
7563 See <link to="#lockWrite()"/> for more details.
7564
7565 <result name="VBOX_E_INVALID_OBJECT_STATE">
7566 Medium not locked for writing.
7567 </result>
7568
7569 </desc>
7570 <param name="state" type="MediaState" dir="return">
7571 <desc>
7572 State of the medium after the operation.
7573 </desc>
7574 </param>
7575 </method>
7576
7577 <method name="close">
7578 <desc>
7579 Closes this medium.
7580
7581 The hard disk must not be attached to any known virtual machine
7582 and must not have any known child hard disks, otherwise the
7583 operation will fail.
7584
7585 When the hard disk is successfully closed, it gets removed from
7586 the list of remembered hard disks, but its storage unit is not
7587 deleted. In particular, this means that this hard disk can be
7588 later opened again using the <link
7589 to="IVirtualBox::openHardDisk2"/> call.
7590
7591 Note that after this method successfully returns, the given hard
7592 disk object becomes uninitialized. This means that any attempt
7593 to call any of its methods or attributes will fail with the
7594 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
7595
7596 <result name="VBOX_E_INVALID_OBJECT_STATE">
7597 Invalid media state (other than not created, created or
7598 inaccessible).
7599 </result>
7600 <result name="VBOX_E_OBJECT_IN_USE">
7601 Medium attached to virtual machine.
7602 </result>
7603 <result name="VBOX_E_FILE_ERROR">
7604 Settings file not accessible.
7605 </result>
7606 <result name="VBOX_E_XML_ERROR">
7607 Could not parse the settings file.
7608 </result>
7609
7610 </desc>
7611 </method>
7612
7613 </interface>
7614
7615
7616 <!--
7617 // IHardDisk2
7618 /////////////////////////////////////////////////////////////////////////
7619 -->
7620
7621 <enum
7622 name="HardDiskType"
7623 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
7624 >
7625 <desc>
7626 Virtual hard disk type.
7627 <see>IHardDisk</see>
7628 </desc>
7629
7630 <const name="Normal" value="0">
7631 <desc>
7632 Normal hard disk (attached directly or indirectly, preserved
7633 when taking snapshots).
7634 </desc>
7635 </const>
7636 <const name="Immutable" value="1">
7637 <desc>
7638 Immutable hard disk (attached indirectly, changes are wiped out
7639 after powering off the virtual machine).
7640 </desc>
7641 </const>
7642 <const name="Writethrough" value="2">
7643 <desc>
7644 Write through hard disk (attached directly, ignored when
7645 taking snapshots).
7646 </desc>
7647 </const>
7648 </enum>
7649
7650 <interface
7651 name="IHardDisk2Attachment" extends="$unknown"
7652 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
7653 wsmap="struct"
7654 >
7655 <desc>
7656 The IHardDisk2Attachment interface represents a hard disk attachment of a
7657 virtual machine.
7658
7659 Every hard disk attachment specifies a slot of the virtual hard disk
7660 controller and a virtual hard disk attached to this slot.
7661
7662 The array of hard disk attachments is returned by
7663 <link to="IMachine::hardDisk2Attachments"/>.
7664
7665 <note>
7666 With the COM API, this is an interface like all the others. With the
7667 webservice, this is mapped to a structure, so querying the attribute
7668 will not return an object, but a complete structure.
7669 </note>
7670 </desc>
7671 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
7672 <desc>Hard disk object associated with this attachment.</desc>
7673 </attribute>
7674
7675 <attribute name="bus" type="StorageBus" readonly="yes">
7676 <desc>Interface bus of this attachment.</desc>
7677 </attribute>
7678
7679 <attribute name="channel" type="long" readonly="yes">
7680 <desc>Channel number of this attachment.</desc>
7681 </attribute>
7682
7683 <attribute name="device" type="long" readonly="yes">
7684 <desc>Device slot number of this attachment.</desc>
7685 </attribute>
7686
7687 </interface>
7688
7689 <interface
7690 name="IHardDisk2" extends="IMedium"
7691 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
7692 wsmap="managed"
7693 >
7694 <desc>
7695 The IHardDisk2 interface represents a virtual hard disk drive
7696 used by a virtual machine.
7697
7698 Virtual hard disk objects virtualize the hard disk hardware and look like
7699 regular hard disks for the guest OS running inside the virtual machine.
7700
7701 <h3>Hard Disk Types</h3>
7702
7703 There are three types of hard disks:
7704 <link to="HardDiskType_Normal">Normal</link>,
7705 <link to="HardDiskType_Immutable">Immutable</link> and
7706 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
7707 hard disk defines how the hard disk is attached to a virtual machine and
7708 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
7709 machine with the attached hard disk is taken. The type of the hard disk is
7710 defined by the <link to="#type"/> attribute.
7711
7712 All hard disks can be also divided in two big groups: <i>base</i> hard
7713 disks and <i>differencing</i> hard disks. A base hard disk contains all
7714 sectors of the hard disk data in its storage unit and therefore can be
7715 used independently. On the contrary, a differencing hard disk contains
7716 only some part of the hard disk data (a subset of sectors) and needs
7717 another hard disk to get access to the missing sectors of data. This
7718 another hard disk is called a <i>parent</i> hard disk and defines a hard
7719 disk to which this differencing hard disk is known to be <i>linked to</i>.
7720 The parent hard disk may be itself a differencing hard disk. This
7721 way, differencing hard disks form a linked hard disk chain. This chain
7722 always ends with the base hard disk which is sometimes referred to as the
7723 root hard disk of this chain. Note that several differencing hard disks
7724 may be linked to the same parent hard disk. This way, all known hard disks
7725 form a hard disk tree which is based on their parent-child relationship.
7726
7727 Differencing hard disks can be distinguished from base hard disks by
7728 querying the <link to="#parent"/> attribute: base hard disks do not have
7729 parents they would depend on, so the value of this attribute is always
7730 <tt>null</tt> for them. Using this attribute, it is possible to walk up
7731 the hard disk tree (from the child hard disk to its parent). It is also
7732 possible to walk down the tree using the <link to="#children"/>
7733 attribute.
7734
7735 Note that the type of all differencing hard disks is
7736 <link to="HardDiskType_Normal">Normal</link>; all other values are
7737 meaningless for them. Base hard disks may be of any type.
7738
7739 <h3>Creating Hard Disks</h3>
7740
7741 New base hard disks are created using
7742 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
7743 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
7744 disks are usually implicitly created by VirtualBox when needed but may
7745 also be created explicitly using <link to="#createDiffStorage()"/>.
7746
7747 After the hard disk is successfully created (including the storage unit)
7748 or opened, it becomes a known hard disk (remembered in the internal media
7749 registry). Known hard disks can be attached to a virtual machine, accessed
7750 through <link to="IVirtualBox::getHardDisk2()"/> and
7751 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
7752 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
7753
7754 The following methods, besides <link to="IMedium::close()"/>,
7755 automatically remove the hard disk from the media registry:
7756 <ul>
7757 <li><link to="#deleteStorage()"/></li>
7758 <li><link to="#mergeTo()"/></li>
7759 </ul>
7760
7761 If the storage unit of the hard disk is a regular file in the host's
7762 file system then the rules stated in the description of the
7763 <link to="IMedium::location"/> attribute apply when setting its value. In
7764 addition, a plain file name without any path may be given, in which case
7765 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
7766 folder</link> will be prepended to it.
7767
7768 <h4>Automatic composition of the file name part</h4>
7769
7770 Another extension to the <link to="IMedium::location"/> attribute is that
7771 there is a possibility to cause VirtualBox to compose a unique value for
7772 the file name part of the location using the UUID of the hard disk. This
7773 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
7774 e.g. before the storage unit is created, and works as follows. You set the
7775 value of the <link to="IMedium::location"/> attribute to a location
7776 specification which only contains the path specification but not the file
7777 name part and ends with either a forward slash or a backslash character.
7778 In response, VirtualBox will generate a new UUID for the hard disk and
7779 compose the file name using the following pattern:
7780 <pre>
7781 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
7782 </pre>
7783 where <tt>&lt;path&gt;</tt> is the supplied path specification,
7784 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
7785 is the default extension for the storage format of this hard disk. After
7786 that, you may call any of the methods that create a new hard disk storage
7787 unit and they will use the generated UUID and file name.
7788
7789 <h3>Attaching Hard Disks</h3>
7790
7791 Hard disks are attached to virtual machines using the
7792 <link to="IMachine::attachHardDisk2()"/> method and detached using the
7793 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
7794 <link to="#type"/>, hard disks are attached either
7795 <i>directly</i> or <i>indirectly</i>.
7796
7797 When a hard disk is being attached directly, it is associated with the
7798 virtual machine and used for hard disk operations when the machine is
7799 running. When a hard disk is being attached indirectly, a new differencing
7800 hard disk linked to it is implicitly created and this differencing hard
7801 disk is associated with the machine and used for hard disk operations.
7802 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
7803 a direct attachment then the same hard disk will be returned in response
7804 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
7805 an indirect attachment is performed then
7806 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
7807 differencing hard disk, not the original one passed to <link
7808 to="IMachine::attachHardDisk2()"/>. The following table shows the
7809 dependency of the attachment type on the hard disk type:
7810
7811 <table>
7812 <tr>
7813 <th>Hard Disk Type</th>
7814 <th>Direct or Indirect?</th>
7815 </tr>
7816 <tr>
7817 <td>Normal (Base)</td>
7818 <td>
7819 Normal base hard disks that do not have children (i.e. differencing
7820 hard disks linked to them) and that are not already attached to
7821 virtual machines in snapshots are attached <b>directly</b>.
7822 Otherwise, they are attached <b>indirectly</b> because having
7823 dependent children or being part of the snapshot makes it impossible
7824 to modify hard disk contents without breaking the integrity of the
7825 dependent party. The <link to="#readOnly"/> attribute allows to
7826 quickly determine the kind of the attachment for the given hard
7827 disk. Note that if a normal base hard disk is to be indirectly
7828 attached to a virtual machine with snapshots then a special
7829 procedure called <i>smart attachment</i> is performed (see below).
7830 </td>
7831 </tr>
7832 <tr>
7833 <td>Normal (Differencing)</td>
7834 <td>
7835 Differencing hard disks are like normal base hard disks: attached
7836 <b>directly</b> if they do not have children and are not attached to
7837 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
7838 that the smart attachment procedure is never performed for
7839 differencing hard disks.
7840 </td>
7841 </tr>
7842 <tr>
7843 <td>Immutable</td>
7844 <td>
7845 Immutable hard disks are always attached <b>indirectly</b> because
7846 they are designed to be non-writable. If an immutable hard disk is
7847 attached to a virtual machine with snapshots then a special
7848 procedure called smart attachment is performed (see below).
7849 </td>
7850 </tr>
7851 <tr>
7852 <td>Writethrough</td>
7853 <td>
7854 Writethrough hard disks are always attached <b>directly</b>, also as
7855 designed. This also means that writethrough hard disks cannot have
7856 other hard disks linked to them at all.
7857 </td>
7858 </tr>
7859 </table>
7860
7861 Note that the same hard disk, regardless of its type, may be attached to
7862 more than one virtual machine at a time. In this case, the machine that is
7863 started first gains exclusive access to the hard disk and attempts to
7864 start other machines having this hard disk attached will fail until the
7865 first machine is powered down.
7866
7867 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
7868 that the given hard disk remains associated with the given machine after a
7869 successful <link to="IMachine::detachHardDisk2()"/> call until
7870 <link to="IMachine::saveSettings()"/> is called to save all changes to
7871 machine settings to disk. This deferring is necessary to guarantee that
7872 the hard disk configuration may be restored at any time by a call to
7873 <link to="IMachine::discardSettings()"/> before the settings
7874 are saved (committed).
7875
7876 Note that if <link to="IMachine::discardSettings()"/> is called after
7877 indirectly attaching some hard disks to the machine but before a call to
7878 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
7879 all differencing hard disks implicitly created by
7880 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
7881 Such implicitly created hard disks will also be immediately deleted when
7882 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
7883 call if it is made before <link to="IMachine::saveSettings()"/>. This
7884 implicit deletion is safe because newly created differencing hard
7885 disks do not contain any user data.
7886
7887 However, keep in mind that detaching differencing hard disks that were
7888 implicitly created by <link to="IMachine::attachHardDisk2()"/>
7889 before the last <link to="IMachine::saveSettings()"/> call will
7890 <b>not</b> implicitly delete them as they may already contain some data
7891 (for example, as a result of virtual machine execution). If these hard
7892 disks are no more necessary, the caller can always delete them explicitly
7893 using <link to="#deleteStorage()"/> after they are actually de-associated
7894 from this machine by the <link to="IMachine::saveSettings()"/> call.
7895
7896 <h3>Smart Attachment</h3>
7897
7898 When normal base or immutable hard disks are indirectly attached to a
7899 virtual machine then some additional steps are performed to make sure the
7900 virtual machine will have the most recent "view" of the hard disk being
7901 attached. These steps include walking through the machine's snapshots
7902 starting from the current one and going through ancestors up to the first
7903 snapshot. Hard disks attached to the virtual machine in all
7904 of the encountered snapshots are checked whether they are descendants of
7905 the given normal base or immutable hard disk. The first found child (which
7906 is the differencing hard disk) will be used instead of the normal base or
7907 immutable hard disk as a parent for creating a new differencing hard disk
7908 that will be actually attached to the machine. And only if no descendants
7909 are found or if the virtual machine does not have any snapshots then the
7910 normal base or immutable hard disk will be used itself as a parent for
7911 this differencing hard disk.
7912
7913 It is easier to explain what smart attachment does using the
7914 following example:
7915 <pre>
7916BEFORE attaching B.vdi: AFTER attaching B.vdi:
7917
7918Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
7919 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
7920 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
7921 Snapshot 4 (none) Snapshot 4 (none)
7922 CurState (none) CurState (D3->D2.vdi)
7923
7924 NOT
7925 ...
7926 CurState (D3->B.vdi)
7927 </pre>
7928 The first column is the virtual machine configuration before the base hard
7929 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
7930 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
7931 mean that the hard disk that is actually attached to the machine is a
7932 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
7933 another hard disk, <tt>B.vdi</tt>.
7934
7935 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
7936 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
7937 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
7938 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
7939 it cannot be attached directly and needs an indirect attachment (i.e.
7940 implicit creation of a new differencing hard disk). Due to the smart
7941 attachment procedure, the new differencing hard disk
7942 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
7943 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
7944 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
7945 machine.
7946
7947 Note that if there is more than one descendant hard disk of the given base
7948 hard disk found in a snapshot, and there is an exact device, channel and
7949 bus match, then this exact match will be used. Otherwise, the youngest
7950 descendant will be picked up.
7951
7952 There is one more important aspect of the smart attachment procedure which
7953 is not related to snapshots at all. Before walking through the snapshots
7954 as described above, the backup copy of the current list of hard disk
7955 attachment is searched for descendants. This backup copy is created when
7956 the hard disk configuration is changed for the first time after the last
7957 <link to="IMachine::saveSettings()"/> call and used by
7958 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
7959 changes. When such a descendant is found in this backup copy, it will be
7960 simply re-attached back, without creating a new differencing hard disk for
7961 it. This optimization is necessary to make it possible to re-attach the
7962 base or immutable hard disk to a different bus, channel or device slot
7963 without losing the contents of the differencing hard disk actually
7964 attached to the machine in place of it.
7965 </desc>
7966
7967 <attribute name="format" type="wstring" readonly="yes">
7968 <desc>
7969 Storage format of this hard disk.
7970
7971 The value of this attribute is a string that specifies a backend used to
7972 store hard disk data. The storage format is defined when you create a
7973 new hard disk or automatically detected when you open an existing hard
7974 disk medium, and cannot be changed later.
7975
7976 The list of all storage formats supported by this VirtualBox
7977 installation can be obtained using
7978 <link to="ISystemProperties::hardDiskFormats"/>.
7979 </desc>
7980 </attribute>
7981
7982 <attribute name="type" type="HardDiskType">
7983 <desc>
7984 Type (role) of this hard disk.
7985
7986 The following constraints apply when changing the value of this
7987 attribute:
7988 <ul>
7989 <li>If a hard disk is attached to a virtual machine (either in the
7990 current state or in one of the snapshots), its type cannot be
7991 changed.
7992 </li>
7993 <li>As long as the hard disk has children, its type cannot be set
7994 to <link to="HardDiskType_Writethrough"/>.
7995 </li>
7996 <li>The type of all differencing hard disks is
7997 <link to="HardDiskType_Normal"/> and cannot be changed.
7998 </li>
7999 </ul>
8000
8001 The type of a newly created or opened hard disk is set to
8002 <link to="HardDiskType_Normal"/>.
8003 </desc>
8004 </attribute>
8005
8006 <attribute name="parent" type="IHardDisk2" readonly="yes">
8007 <desc>
8008 Parent of this hard disk (a hard disk this hard disk is directly based
8009 on).
8010
8011 Only differencing hard disks have parents. For base (non-differencing)
8012 hard disks, <tt>null</tt> is returned.
8013 </desc>
8014 </attribute>
8015
8016 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8017 <desc>
8018 Children of this hard disk (all differencing hard disks directly based
8019 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8020 does not have any children.
8021 </desc>
8022 </attribute>
8023
8024 <attribute name="root" type="IHardDisk2" readonly="yes">
8025 <desc>
8026 Root hard disk of this hard disk.
8027
8028 If this is a differencing hard disk, its root hard disk is the base hard
8029 disk the given hard disk branch starts from. For all other types of hard
8030 disks, this property returns the hard disk object itself (i.e. the same
8031 object this property is read on).
8032 </desc>
8033 </attribute>
8034
8035 <attribute name="readOnly" type="boolean" readonly="yes">
8036 <desc>
8037 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8038 otherwise.
8039
8040 A hard disk is considered to be read-only when its contents cannot be
8041 modified without breaking the integrity of other parties that depend on
8042 this hard disk such as its child hard disks or snapshots of virtual
8043 machines where this hard disk is attached to these machines. If there
8044 are no children and no such snapshots then there is no dependency and
8045 the hard disk is not read-only.
8046
8047 The value of this attribute can be used to determine the kind of the
8048 attachment that will take place when attaching this hard disk to a
8049 virtual machine. If the value is <tt>false</tt> then the hard disk will
8050 be attached directly. If the value is <tt>true</tt> then the hard disk
8051 will be attached indirectly by creating a new differencing child hard
8052 disk for that. See the interface description for more information.
8053
8054 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8055 disks are always read-only while all
8056 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8057 always not.
8058
8059 <note>
8060 The read-only condition represented by this attribute is related to
8061 the hard disk type and usage, not to the current
8062 <link to="IMedium::state">media state</link> and not to the read-only
8063 state of the storage unit.
8064 </note>
8065 </desc>
8066 </attribute>
8067
8068 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8069 <desc>
8070 Logical size of this hard disk (in megabytes), as reported to the
8071 guest OS running inside the virtual machine this disk is
8072 attached to. The logical size is defined when the hard disk is created
8073 and cannot be changed later.
8074
8075 <note>
8076 Reading this property on a differencing hard disk will return the size
8077 of its <link to="#root"/> hard disk.
8078 </note>
8079 <note>
8080 For hard disks whose state is <link to="#state"/> is <link
8081 to="MediaState_Inaccessible"/>, the value of this property is the
8082 last known logical size. For <link to="MediaState_NotCreated"/> hard
8083 disks, the returned value is zero.
8084 </note>
8085 </desc>
8086 </attribute>
8087
8088 <!-- storage methods -->
8089
8090 <method name="getProperty">
8091 <desc>
8092 Returns the value of the custom hard disk property with the given name.
8093
8094 The list of all properties supported by the given hard disk format can
8095 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8096
8097 Note that if this method returns a <tt>null</tt> @a value, the requested
8098 property is supported but currently not assigned any value.
8099
8100 <result name="VBOX_E_OBJECT_NOT_FOUND">
8101 Requested property does not exist (not supported by the format).
8102 </result>
8103 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8104 </desc>
8105 <param name="name" type="wstring" dir="in">
8106 <desc>Name of the property to get.</desc>
8107 </param>
8108 <param name="value" type="wstring" dir="return">
8109 <desc>Current property value.</desc>
8110 </param>
8111 </method>
8112
8113 <method name="setProperty">
8114 <desc>
8115 Sets the value of the custom hard disk property with the given name.
8116
8117 The list of all properties supported by the given hard disk format can
8118 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8119
8120 Note that setting the property value to <tt>null</tt> is equivalent to
8121 deleting the existing value. A default value (if it is defined for this
8122 property) will be used by the format backend in this case.
8123
8124 <result name="VBOX_E_OBJECT_NOT_FOUND">
8125 Requested property does not exist (not supported by the format).
8126 </result>
8127 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8128 </desc>
8129 <param name="name" type="wstring" dir="in">
8130 <desc>Name of the property to set.</desc>
8131 </param>
8132 <param name="value" type="wstring" dir="in">
8133 <desc>Property value to set.</desc>
8134 </param>
8135 </method>
8136
8137 <method name="getProperties">
8138 <desc>
8139 Returns values for a group of properties in one call.
8140
8141 The names of the properties to get are specified using the @a names
8142 argument which is a list of comma-separated property names or
8143 <tt>null</tt> if all properties are to be returned. Note that currently
8144 the value of this argument is ignored and the method always returns all
8145 existing properties.
8146
8147 The list of all properties supported by the given hard disk format can
8148 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8149
8150 The method returns two arrays, the array of property names corresponding
8151 to the @a names argument and the current values of these properties.
8152 Both arrays have the same number of elements with each elemend at the
8153 given index in the first array corresponds to an element at the same
8154 index in the second array.
8155
8156 Note that for properties that do not have assigned values,
8157 <tt>null</tt> is returned at the appropriate index in the @a
8158 returnValues array.
8159
8160 </desc>
8161 <param name="names" type="wstring" dir="in">
8162 <desc>
8163 Names of properties to get.
8164 </desc>
8165 </param>
8166 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8167 <desc>Names of returned properties.</desc>
8168 </param>
8169 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8170 <desc>Values of returned properties.</desc>
8171 </param>
8172 </method>
8173
8174 <method name="setProperties">
8175 <desc>
8176 Sets values for a group of properties in one call.
8177
8178 The names of the properties to set are passed in the @a names
8179 array along with the new values for them in the @a values array. Both
8180 arrays have the same number of elements with each elemend at the given
8181 index in the first array corresponding to an element at the same index
8182 in the second array.
8183
8184 If there is at least one property name in @a names that is not valid,
8185 the method will fail before changing the values of any other properties
8186 from the @a names array.
8187
8188 Using this method over <link to="#setProperty()"/> is preferred if you
8189 need to set several properties at once since it will result into less
8190 IPC calls.
8191
8192 The list of all properties supported by the given hard disk format can
8193 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8194
8195 Note that setting the property value to <tt>null</tt> is equivalent to
8196 deleting the existing value. A default value (if it is defined for this
8197 property) will be used by the format backend in this case.
8198 </desc>
8199 <param name="names" type="wstring" safearray="yes" dir="in">
8200 <desc>Names of properties to set.</desc>
8201 </param>
8202 <param name="values" type="wstring" safearray="yes" dir="in">
8203 <desc>Values of properties to set.</desc>
8204 </param>
8205 </method>
8206
8207 <!-- storage methods -->
8208
8209 <method name="createDynamicStorage">
8210 <desc>
8211 Starts creating a dynamically expanding hard disk storage unit in the
8212 background. The previous storage unit created for this object, if
8213 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8214 the operation will fail.
8215
8216 Before the operation starts, the hard disk is placed in
8217 <link to="MediaState_Creating"/> state. If the create operation
8218 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8219 state.
8220
8221 After the returned progress object reports that the operation has
8222 successfully completed, the media state will be set to <link
8223 to="MediaState_Created"/>, the hard disk will be remembered by this
8224 VirtualBox installation and may be attached to virtual machines.
8225
8226 <result name="VBOX_E_NOT_SUPPORTED">
8227 Dynamic storage creation operation is not supported. See <link
8228 to="IHardDiskFormat::capabilities"/>.
8229 </result>
8230 </desc>
8231 <param name="logicalSize" type="unsigned long long" dir="in">
8232 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8233 </param>
8234 <param name="progress" type="IProgress" dir="return">
8235 <desc>Progress object to track the operation completion.</desc>
8236 </param>
8237 </method>
8238
8239 <method name="createFixedStorage">
8240 <desc>
8241 Starts creating a fixed-size hard disk storage unit in the background.
8242 The previous storage unit created for this object, if
8243 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8244 the operation will fail.
8245
8246 Before the operation starts, the hard disk is placed to
8247 <link to="MediaState_Creating"/> state. If the create operation
8248 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8249 state.
8250
8251 After the returned progress object reports that the operation is
8252 successfully complete, the media state will be set to <link
8253 to="MediaState_Created"/>, the hard disk will be remembered by this
8254 VirtualBox installation and may be attached to virtual machines.
8255
8256 <result name="VBOX_E_NOT_SUPPORTED">
8257 Fixed storage creation operation is not supported. See
8258 <link to="IHardDiskFormat::capabilities"/>.
8259 </result>
8260 </desc>
8261 <param name="logicalSize" type="unsigned long long" dir="in">
8262 <desc>Logical size of the hard disk in megabytes.</desc>
8263 </param>
8264 <param name="progress" type="IProgress" dir="return">
8265 <desc>Progress object to track the operation completion.</desc>
8266 </param>
8267 </method>
8268
8269 <method name="deleteStorage">
8270 <desc>
8271 Starts deleting the storage unit of this hard disk.
8272
8273 The hard disk must not be attached to any known virtual machine and must
8274 not have any known child hard disks, otherwise the operation will fail.
8275 It will also fail if there is no storage unit to delete or if deletion
8276 is already in progress, or if the hard disk is being in use (locked for
8277 read or for write) or inaccessible. Therefore, the only valid state for
8278 this operation to succeed is <link to="MediaState_Created"/>.
8279
8280 Before the operation starts, the hard disk is placed to
8281 <link to="MediaState_Deleting"/> state and gets removed from the list
8282 of remembered hard disks (media registry). If the delete operation
8283 fails, the media will be remembered again and placed back to
8284 <link to="MediaState_Created"/> state.
8285
8286 After the returned progress object reports that the operation is
8287 complete, the media state will be set to
8288 <link to="MediaState_NotCreated"/> and you will be able to use one of
8289 the storage creation methods to create it again.
8290
8291 <see>#close()</see>
8292
8293 <result name="VBOX_E_OBJECT_IN_USE">
8294 Hard disk is attached to a virtual machine.
8295 </result>
8296 <result name="VBOX_E_NOT_SUPPORTED">
8297 Storage deletion is not allowed because neither of storage creation
8298 operations are supported. See
8299 <link to="IHardDiskFormat::capabilities"/>.
8300 </result>
8301
8302 <note>
8303 If the deletion operation fails, it is not guaranteed that the storage
8304 unit still exists. You may check the <link to="IMedium::state"/> value
8305 to answer this question.
8306 </note>
8307 </desc>
8308 <param name="progress" type="IProgress" dir="return">
8309 <desc>Progress object to track the operation completion.</desc>
8310 </param>
8311 </method>
8312
8313 <!-- diff methods -->
8314
8315 <method name="createDiffStorage">
8316 <desc>
8317 Starts creating an empty differencing storage unit based on this hard
8318 disk in the format and at the location defined by the @a target
8319 argument.
8320
8321 The target hard disk must be in <link to="MediaState_NotCreated"/>
8322 state (i.e. must not have an existing storage unit). Upon successful
8323 completion, this operation will set the type of the target hard disk to
8324 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8325 represent the differencing hard disk data in the given format (according
8326 to the storage format of the target object).
8327
8328 After the returned progress object reports that the operation is
8329 successfully complete, the target hard disk gets remembered by this
8330 VirtualBox installation and may be attached to virtual machines.
8331
8332 <note>
8333 The hard disk will be set to <link to="MediaState_LockedRead"/>
8334 state for the duration of this operation.
8335 </note>
8336 <result name="VBOX_E_OBJECT_IN_USE">
8337 Hard disk not in NotCreated state.
8338 </result>
8339 </desc>
8340 <param name="target" type="IHardDisk2" dir="in">
8341 <desc>Target hard disk.</desc>
8342 </param>
8343 <param name="progress" type="IProgress" dir="return">
8344 <desc>Progress object to track the operation completion.</desc>
8345 </param>
8346 </method>
8347
8348 <method name="mergeTo">
8349 <desc>
8350 Starts merging the contents of this hard disk and all intermediate
8351 differencing hard disks in the chain to the given target hard disk.
8352
8353 The target hard disk must be either a descendant of this hard disk or
8354 its ancestor (otherwise this method will immediately return a failure).
8355 It follows that there are two logical directions of the merge operation:
8356 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8357 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8358 chain:
8359
8360 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8361
8362 Here, calling this method on the <tt>Base</tt> hard disk object with
8363 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8364 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8365 merge. Note that in both cases the contents of the resulting hard disk
8366 will be the same, the only difference is the hard disk object that takes
8367 the result of the merge operation. In case of the forward merge in the
8368 above example, the result will be written to <tt>Diff_2</tt>; in case of
8369 the backward merge, the result will be written to <tt>Base</tt>. In
8370 other words, the result of the operation is always stored in the target
8371 hard disk.
8372
8373 Upon successful operation completion, the storage units of all hard
8374 disks in the chain between this (source) hard disk and the target hard
8375 disk, including the source hard disk itself, will be automatically
8376 deleted and the relevant hard disk objects (including this hard disk)
8377 will become uninitialized. This means that any attempt to call any of
8378 their methods or attributes will fail with the
8379 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8380 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8381 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8382 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8383 disk itself since it will no longer be based on any other hard disk.
8384
8385 Considering the above, all of the following conditions must be met in
8386 order for the merge operation to succeed:
8387 <ul>
8388 <li>
8389 Neither this (source) hard disk nor any intermediate
8390 differencing hard disk in the chain between it and the target
8391 hard disk is attached to any virtual machine.
8392 </li>
8393 <li>
8394 Neither the source hard disk nor the target hard disk is an
8395 <link to="HardDiskType_Immutable"/> hard disk.
8396 </li>
8397 <li>
8398 The part of the hard disk tree from the source hard disk to the
8399 target hard disk is a linear chain, i.e. all hard disks in this
8400 chain have exactly one child which is the next hard disk in this
8401 chain. The only exception from this rule is the target hard disk in
8402 the forward merge operation; it is allowed to have any number of
8403 child hard disks because the merge operation will hot change its
8404 logical contents (as it is seen by the guest OS or by children).
8405 </li>
8406 <li>
8407 None of the involved hard disks are in
8408 <link to="MediaState_LockedRead"/> or
8409 <link to="MediaState_LockedWrite"/> state.
8410 </li>
8411 </ul>
8412
8413 <note>
8414 This (source) hard disk and all intermediates will be placed to <link
8415 to="MediaState_Deleting"/> state and the target hard disk will be
8416 placed to <link to="MediaState_LockedWrite"/> state and for the
8417 duration of this operation.
8418 </note>
8419 </desc>
8420 <param name="targetId" type="uuid" dir="in">
8421 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8422 </param>
8423 <param name="progress" type="IProgress" dir="return">
8424 <desc>Progress object to track the operation completion.</desc>
8425 </param>
8426 </method>
8427
8428 <!-- clone methods -->
8429
8430 <method name="cloneTo">
8431 <desc>
8432 Starts creating a clone of this hard disk in the format and at the
8433 location defined by the @a target argument.
8434
8435 The target hard disk must be in <link to="MediaState_NotCreated"/>
8436 state (i.e. must not have an existing storage unit). Upon successful
8437 completion, the cloned hard disk will contain exactly the same sector
8438 data as the hard disk being cloned, except that a new UUID for the clone
8439 will be randomly generated.
8440
8441 After the returned progress object reports that the operation is
8442 successfully complete, the target hard disk gets remembered by this
8443 VirtualBox installation and may be attached to virtual machines.
8444
8445 <note>
8446 If the cloned hard disk is a differencing hard disk, it will inherit
8447 parent dependency of the original hard disk.
8448 </note>
8449 <note>
8450 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8451 state for the duration of this operation.
8452 </note>
8453 </desc>
8454 <param name="target" type="IHardDisk2" dir="in">
8455 <desc>Target hard disk.</desc>
8456 </param>
8457 <param name="progress" type="IProgress" dir="return">
8458 <desc>Progress object to track the operation completion.</desc>
8459 </param>
8460 </method>
8461
8462 <method name="flattenTo">
8463 <desc>
8464 Starts creating a deep (independent) clone of this hard disk in the
8465 format and at the location defined by the @a target argument.
8466
8467 This operation is similar to <link to="#cloneTo()"/> except that when
8468 applied to a differencing hard disk, it will also copy missing hard disk
8469 data from all parent hard disks it is linked to. This will make the
8470 created clone an independent base hard disk that contains all hard disk
8471 data and does not need any other hard disks to operate.
8472
8473 After the returned progress object reports that the operation is
8474 successfully complete, the target hard disk gets remembered by this
8475 VirtualBox installation and may be attached to virtual machines.
8476
8477 <note>
8478 For base hard disks, this operation is identical to
8479 <link to="#cloneTo()"/>.
8480 </note>
8481 <note>
8482 This hard disk and all its parent hard disks will be placed to <link
8483 to="MediaState_LockedRead"/> state for the duration of this
8484 operation.
8485 </note>
8486 </desc>
8487 <param name="target" type="IHardDisk2" dir="in">
8488 <desc>Target hard disk.</desc>
8489 </param>
8490 <param name="progress" type="IProgress" dir="return">
8491 <desc>Progress object to track the operation completion.</desc>
8492 </param>
8493 </method>
8494
8495 <method name="compact">
8496 <desc>
8497 Starts compacting of this hard disk. This means that the disk is
8498 transformed into a possibly more compact storage representation.
8499 This potentially creates temporary images, which can require a
8500 substantial amount of additional disk space.
8501
8502 After the returned progress object reports that the operation is
8503 successfully complete, the media state will be set back to the
8504 current state.
8505
8506 <note>
8507 This hard disk and all its parent hard disks will be placed to <link
8508 to="MediaState_LockedRead"/> state for the duration of this
8509 operation.
8510 </note>
8511 </desc>
8512 <param name="progress" type="IProgress" dir="return">
8513 <desc>Progress object to track the operation completion.</desc>
8514 </param>
8515 </method>
8516
8517 </interface>
8518
8519
8520 <!--
8521 // IHardDiskFormat
8522 /////////////////////////////////////////////////////////////////////////
8523 -->
8524
8525 <enum
8526 name="DataType"
8527 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
8528 >
8529 <const name="Int32" value="0"/>
8530 <const name="Int8" value="1"/>
8531 <const name="String" value="2"/>
8532 </enum>
8533
8534 <enum
8535 name="DataFlags"
8536 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
8537 >
8538 <const name="None" value="0x00"/>
8539 <const name="Mandatory" value="0x01"/>
8540 <const name="Expert" value="0x02"/>
8541 <const name="Array" value="0x04"/>
8542 <const name="FlagMask" value="0x07"/>
8543 </enum>
8544
8545 <enum
8546 name="HardDiskFormatCapabilities"
8547 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
8548 >
8549 <desc>
8550 Hard disk format capability flags.
8551 </desc>
8552
8553 <const name="Uuid" value="0x01">
8554 <desc>
8555 Supports UUIDs as expected by VirtualBox code.
8556 </desc>
8557 </const>
8558
8559 <const name="CreateFixed" value="0x02">
8560 <desc>
8561 Supports creating fixed size images, allocating all space instantly.
8562 </desc>
8563 </const>
8564
8565 <const name="CreateDynamic" value="0x04">
8566 <desc>
8567 Supports creating dynamically growing images, allocating space on
8568 demand.
8569 </desc>
8570 </const>
8571
8572 <const name="CreateSplit2G" value="0x08">
8573 <desc>
8574 Supports creating images split in chunks of a bit less than 2 GBytes.
8575 </desc>
8576 </const>
8577
8578 <const name="Differencing" value="0x10">
8579 <desc>
8580 Supports being used as a format for differencing hard disks (see <link
8581 to="IHardDisk2::createDiffStorage"/>).
8582 </desc>
8583 </const>
8584
8585 <const name="Asynchronous" value="0x20">
8586 <desc>
8587 Supports asynchronous I/O operations for at least some configurations.
8588 </desc>
8589 </const>
8590
8591 <const name="File" value="0x40">
8592 <desc>
8593 The format backend operates on files (the <link to="IMedium::location"/>
8594 attribute of the hard disk specifies a file used to store hard disk
8595 data; for a list of supported file extensions see
8596 <link to="IHardDiskFormat::fileExtensions"/>).
8597 </desc>
8598 </const>
8599
8600 <const name="Properties" value="0x80">
8601 <desc>
8602 The format backend uses the property interface to configure the storage
8603 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
8604 method is used to get access to properties supported by the given hard
8605 disk format).
8606 </desc>
8607 </const>
8608
8609 <const name="CapabilityMask" value="0xFF"/>
8610 </enum>
8611
8612 <interface
8613 name="IHardDiskFormat" extends="$unknown"
8614 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
8615 wsmap="managed"
8616 >
8617 <desc>
8618 The IHardDiskFormat interface represents a virtual hard disk format.
8619
8620 Each hard disk format has an associated backend which is used to handle
8621 hard disks stored in this format. This interface provides information
8622 about the properties of the associated backend.
8623
8624 Each hard disk format is identified by a string represented by the
8625 <link to="#id"/> attribute. This string is used in calls like
8626 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
8627 format.
8628
8629 The list of all supported hard disk formats can be obtained using
8630 <link to="ISystemProperties::hardDiskFormats"/>.
8631
8632 <see>IHardDisk2</see>
8633 </desc>
8634
8635 <attribute name="id" type="wstring" readonly="yes">
8636 <desc>
8637 Identifier of this format.
8638
8639 This string is used in methods of other interfaces where it is necessary
8640 to specify a hard disk format, such as
8641 <link to="IVirtualBox::createHardDisk2()"/>.
8642 </desc>
8643 </attribute>
8644
8645 <attribute name="name" type="wstring" readonly="yes">
8646 <desc>
8647 Human readable description of this format.
8648
8649 Mainly for use in file open dialogs.
8650 </desc>
8651 </attribute>
8652
8653 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
8654 <desc>
8655 Array of strings containing the supported file extensions.
8656
8657 The first extension in the array is the extension preferred by the
8658 backend. It is recommended to use this extension when specifying a
8659 location of the storage unit for a new hard disk.
8660
8661 Note that some backends do not work on files, so this array may be
8662 empty.
8663
8664 <see>IHardDiskFormat::capabilities</see>
8665 </desc>
8666 </attribute>
8667
8668 <attribute name="capabilities" type="unsigned long" readonly="yes">
8669 <desc>
8670 Capabilities of the format as a set of bit flags.
8671
8672 For the meaning of individual capability flags see
8673 <link to="HardDiskFormatCapabilities"/>.
8674 </desc>
8675 </attribute>
8676
8677 <method name="describeProperties">
8678 <desc>
8679 Returns several arrays describing the properties supported by this
8680 format.
8681
8682 An element with the given index in each array describes one
8683 property. Thus, the number of elements in each returned array is the
8684 same and corresponds to the number of supported properties.
8685
8686 The returned arrays are filled in only if the
8687 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
8688 All arguments must be non-NULL.
8689
8690 <see>DataType</see>
8691 <see>DataFlags</see>
8692 </desc>
8693
8694 <param name="names" type="wstring" safearray="yes" dir="out">
8695 <desc>Array of property names.</desc>
8696 </param>
8697 <param name="description" type="wstring" safearray="yes" dir="out">
8698 <desc>Array of property descriptions.</desc>
8699 </param>
8700 <param name="types" type="DataType" safearray="yes" dir="out">
8701 <desc>Array of property types.</desc>
8702 </param>
8703 <param name="flags" type="unsigned long" safearray="yes" dir="out">
8704 <desc>Array of property flags.</desc>
8705 </param>
8706 <param name="defaults" type="wstring" safearray="yes" dir="out">
8707 <desc>Array of default property values.</desc>
8708 </param>
8709 </method>
8710
8711 </interface>
8712
8713
8714 <!--
8715 // IFloppyImage2
8716 /////////////////////////////////////////////////////////////////////////
8717 -->
8718
8719 <interface
8720 name="IFloppyImage2" extends="IMedium"
8721 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
8722 wsmap="managed"
8723 >
8724 <desc>
8725 The IFloppyImage2 interface represents a medium containing the image
8726 of a floppy disk.
8727 </desc>
8728
8729 </interface>
8730
8731
8732 <!--
8733 // IDVDImage2
8734 /////////////////////////////////////////////////////////////////////////
8735 -->
8736
8737 <interface
8738 name="IDVDImage2" extends="IMedium"
8739 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
8740 wsmap="managed"
8741 >
8742 <desc>
8743 The IDVDImage2 interface represents a medium containing the image
8744 of a CD or DVD disk in the ISO format.
8745 </desc>
8746
8747 </interface>
8748
8749
8750 <!--
8751 // IDVDDrive
8752 /////////////////////////////////////////////////////////////////////////
8753 -->
8754
8755 <interface
8756 name="IDVDDrive" extends="$unknown"
8757 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
8758 wsmap="managed"
8759 >
8760 <desc>
8761 The IDVDDrive interface represents the virtual CD/DVD drive of the
8762 virtual machine. An object of this type is returned by
8763 <link to="IMachine::DVDDrive"/>.
8764 </desc>
8765
8766 <attribute name="state" type="DriveState" readonly="yes">
8767 <desc>Current drive state.</desc>
8768 </attribute>
8769
8770 <attribute name="passthrough" type="boolean">
8771 <desc>
8772 When a host drive is mounted and passthrough is enabled
8773 the guest OS will be able to directly send SCSI commands to
8774 the host drive. This enables the guest OS to use CD/DVD writers
8775 but is potentially dangerous.
8776 </desc>
8777 </attribute>
8778
8779 <method name="mountImage">
8780 <desc>Mounts a CD/DVD image with the specified UUID.
8781
8782 <result name="VBOX_E_FILE_ERROR">
8783 Invalid image file location.
8784 </result>
8785 <result name="VBOX_E_OBJECT_NOT_FOUND">
8786 Could not find a CD/DVD image matching @a imageID.
8787 </result>
8788 <result name="VBOX_E_INVALID_OBJECT_STATE">
8789 Invalid media state.
8790 </result>
8791
8792 </desc>
8793 <param name="imageId" type="uuid" dir="in"/>
8794 </method>
8795
8796 <method name="captureHostDrive">
8797 <desc>Captures the specified host CD/DVD drive.</desc>
8798 <param name="drive" type="IHostDVDDrive" dir="in"/>
8799 </method>
8800
8801 <method name="unmount">
8802 <desc>Unmounts the currently mounted image or host drive.</desc>
8803 </method>
8804
8805 <method name="getImage">
8806 <desc>Returns the currently mounted CD/DVD image.</desc>
8807 <param name="image" type="IDVDImage2" dir="return"/>
8808 </method>
8809
8810 <method name="getHostDrive">
8811 <desc>Returns the currently mounted host CD/DVD drive.</desc>
8812 <param name="drive" type="IHostDVDDrive" dir="return"/>
8813 </method>
8814
8815 </interface>
8816
8817
8818 <!--
8819 // IFloppyDrive
8820 /////////////////////////////////////////////////////////////////////////
8821 -->
8822
8823 <interface
8824 name="IFloppyDrive" extends="$unknown"
8825 uuid="159412cd-bab8-452e-8097-218a020825a6"
8826 wsmap="managed"
8827 >
8828 <desc>
8829 The IFloppyDrive interface represents the virtual floppy drive of the
8830 virtual machine. An object of this type is returned by
8831 <link to="IMachine::floppyDrive" />.
8832 </desc>
8833
8834 <attribute name="enabled" type="boolean">
8835 <desc>
8836 Flag whether the floppy drive is enabled. If it is disabled,
8837 the floppy drive will not be reported to the guest OS.
8838 </desc>
8839 </attribute>
8840
8841 <attribute name="state" type="DriveState" readonly="yes">
8842 <desc>Current drive state.</desc>
8843 </attribute>
8844
8845 <method name="mountImage">
8846 <desc>Mounts a floppy image with the specified UUID.
8847
8848 <result name="VBOX_E_FILE_ERROR">
8849 Invalid image file location.
8850 </result>
8851 <result name="VBOX_E_OBJECT_NOT_FOUND">
8852 Could not find a floppy image matching @a imageID.
8853 </result>
8854 <result name="VBOX_E_INVALID_OBJECT_STATE">
8855 Invalid media state.
8856 </result>
8857
8858 </desc>
8859 <param name="imageId" type="uuid" dir="in"/>
8860 </method>
8861
8862 <method name="captureHostDrive">
8863 <desc>Captures the specified host floppy drive.</desc>
8864 <param name="drive" type="IHostFloppyDrive" dir="in"/>
8865 </method>
8866
8867 <method name="unmount">
8868 <desc>Unmounts the currently mounted image or host drive.</desc>
8869 </method>
8870
8871 <method name="getImage">
8872 <desc>Returns the currently mounted floppy image.</desc>
8873 <param name="image" type="IFloppyImage2" dir="return"/>
8874 </method>
8875
8876 <method name="getHostDrive">
8877 <desc>Returns the currently mounted host floppy drive.</desc>
8878 <param name="drive" type="IHostFloppyDrive" dir="return"/>
8879 </method>
8880
8881 </interface>
8882
8883
8884 <!--
8885 // IKeyboard
8886 /////////////////////////////////////////////////////////////////////////
8887 -->
8888
8889 <interface
8890 name="IKeyboard" extends="$unknown"
8891 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
8892 wsmap="managed"
8893 >
8894 <desc>
8895 The IKeyboard interface represents the virtual machine's keyboard. Used
8896 in <link to="IConsole::keyboard"/>.
8897
8898 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
8899 to the virtual machine.
8900
8901 </desc>
8902 <method name="putScancode">
8903 <desc>Sends a scancode to the keyboard.
8904
8905 <result name="VBOX_E_IPRT_ERROR">
8906 Could not send scan code to virtual keyboard.
8907 </result>
8908
8909 </desc>
8910 <param name="scancode" type="long" dir="in"/>
8911 </method>
8912
8913 <method name="putScancodes">
8914 <desc>Sends an array of scancodes to the keyboard.
8915
8916 <result name="VBOX_E_IPRT_ERROR">
8917 Could not send all scan codes to virtual keyboard.
8918 </result>
8919
8920 </desc>
8921 <param name="scancodes" type="long" dir="in" safearray="yes"/>
8922 <param name="codesStored" type="unsigned long" dir="return"/>
8923 </method>
8924
8925 <method name="putCAD">
8926 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
8927 function is nothing special, it is just a convenience function
8928 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
8929
8930 <result name="VBOX_E_IPRT_ERROR">
8931 Could not send all scan codes to virtual keyboard.
8932 </result>
8933
8934 </desc>
8935 </method>
8936
8937 </interface>
8938
8939
8940 <!--
8941 // IMouse
8942 /////////////////////////////////////////////////////////////////////////
8943 -->
8944
8945 <enum
8946 name="MouseButtonState"
8947 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
8948 >
8949 <desc>
8950 Mouse button state.
8951 </desc>
8952
8953 <const name="LeftButton" value="0x01"/>
8954 <const name="RightButton" value="0x02"/>
8955 <const name="MiddleButton" value="0x04"/>
8956 <const name="WheelUp" value="0x08"/>
8957 <const name="WheelDown" value="0x10"/>
8958 <const name="MouseStateMask" value="0x1F"/>
8959 </enum>
8960
8961 <interface
8962 name="IMouse" extends="$unknown"
8963 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
8964 wsmap="managed"
8965 >
8966 <desc>
8967 The IMouse interface represents the virtual machine's mouse. Used in
8968 <link to="IConsole::mouse"/>.
8969
8970 Through this interface, the virtual machine's virtual mouse can be
8971 controlled.
8972 </desc>
8973
8974 <attribute name="absoluteSupported" type="boolean" readonly="yes">
8975 <desc>
8976 Whether the guest OS supports absolute mouse pointer positioning
8977 or not.
8978 <note>
8979 VirtualBox Guest Tools need to be installed to the guest OS
8980 in order to enable absolute mouse positioning support.
8981 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
8982 callback to be instantly informed about changes of this attribute
8983 during virtual machine execution.
8984 </note>
8985 <see><link to="#putMouseEventAbsolute"/></see>
8986 </desc>
8987 </attribute>
8988
8989 <method name="putMouseEvent">
8990 <desc>
8991 Initiates a mouse event using relative pointer movements
8992 along x and y axis.
8993
8994 <result name="E_ACCESSDENIED">
8995 Console not powered up.
8996 </result>
8997 <result name="VBOX_E_IPRT_ERROR">
8998 Could not send mouse event to virtual mouse.
8999 </result>
9000
9001 </desc>
9002
9003 <param name="dx" type="long" dir="in">
9004 <desc>
9005 Amount of pixels the mouse should move to the right.
9006 Negative values move the mouse to the left.
9007 </desc>
9008 </param>
9009 <param name="dy" type="long" dir="in">
9010 <desc>
9011 Amount of pixels the mouse should move downwards.
9012 Negative values move the mouse upwards.
9013 </desc>
9014 </param>
9015 <param name="dz" type="long" dir="in">
9016 <desc>
9017 Amount of mouse wheel moves.
9018 Positive values describe clockwise wheel rotations,
9019 negative values describe counterclockwise rotations.
9020 </desc>
9021 </param>
9022 <param name="buttonState" type="long" dir="in">
9023 <desc>
9024 The current state of mouse buttons. Every bit represents
9025 a mouse button as follows:
9026 <table>
9027 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9028 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9029 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9030 </table>
9031 A value of <tt>1</tt> means the corresponding button is pressed.
9032 otherwise it is released.
9033 </desc>
9034 </param>
9035 </method>
9036
9037 <method name="putMouseEventAbsolute">
9038 <desc>
9039 Positions the mouse pointer using absolute x and y coordinates.
9040 These coordinates are expressed in pixels and
9041 start from <tt>[1,1]</tt> which corresponds to the top left
9042 corner of the virtual display.
9043
9044 <result name="E_ACCESSDENIED">
9045 Console not powered up.
9046 </result>
9047 <result name="VBOX_E_IPRT_ERROR">
9048 Could not send mouse event to virtual mouse.
9049 </result>
9050
9051 <note>
9052 This method will have effect only if absolute mouse
9053 positioning is supported by the guest OS.
9054 </note>
9055
9056 <see><link to="#absoluteSupported"/></see>
9057 </desc>
9058
9059 <param name="x" type="long" dir="in">
9060 <desc>
9061 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9062 </desc>
9063 </param>
9064 <param name="y" type="long" dir="in">
9065 <desc>
9066 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9067 </desc>
9068 </param>
9069 <param name="dz" type="long" dir="in">
9070 <desc>
9071 Amount of mouse wheel moves.
9072 Positive values describe clockwise wheel rotations,
9073 negative values describe counterclockwise rotations.
9074 </desc>
9075 </param>
9076 <param name="buttonState" type="long" dir="in">
9077 <desc>
9078 The current state of mouse buttons. Every bit represents
9079 a mouse button as follows:
9080 <table>
9081 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9082 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9083 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9084 </table>
9085 A value of <tt>1</tt> means the corresponding button is pressed.
9086 otherwise it is released.
9087 </desc>
9088 </param>
9089 </method>
9090
9091 </interface>
9092
9093 <!--
9094 // IDisplay
9095 /////////////////////////////////////////////////////////////////////////
9096 -->
9097
9098 <enum
9099 name="FramebufferAccelerationOperation"
9100 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9101 >
9102 <desc>
9103 Frame buffer acceleration operation.
9104 </desc>
9105
9106 <const name="SolidFillAcceleration" value="1"/>
9107 <const name="ScreenCopyAcceleration" value="2"/>
9108 </enum>
9109
9110 <enum
9111 name="FramebufferPixelFormat"
9112 uuid="6b27d1fc-4f2c-4e9c-a166-01d06540305d"
9113 >
9114 <desc>
9115 Format of the video memory buffer. Constants represented by this enum can
9116 be used to test for particular values of <link
9117 to="IFramebuffer::pixelFormat"/>. See also <link
9118 to="IFramebuffer::requestResize()"/>.
9119
9120 See also www.fourcc.org for more information about FOURCC pixel formats.
9121 </desc>
9122
9123 <const name="Opaque" value="0xFFFFFFFF">
9124 <desc>
9125 Unknown buffer format (the user may not assume any particular format of
9126 the buffer).
9127 </desc>
9128 </const>
9129 <const name="FOURCC_RGB" value="0x32424752">
9130 <desc>
9131 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9132 bit layout).
9133 </desc>
9134 </const>
9135 </enum>
9136
9137 <interface
9138 name="IFramebuffer" extends="$unknown"
9139 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9140 wsmap="suppress"
9141 >
9142 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9143 <desc>Address of the start byte of the frame buffer.</desc>
9144 </attribute>
9145
9146 <attribute name="width" type="unsigned long" readonly="yes">
9147 <desc>Frame buffer width, in pixels.</desc>
9148 </attribute>
9149
9150 <attribute name="height" type="unsigned long" readonly="yes">
9151 <desc>Frame buffer height, in pixels.</desc>
9152 </attribute>
9153
9154 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9155 <desc>
9156 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9157 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9158 are: 8, 15, 16, 24 and 32.
9159 </desc>
9160 </attribute>
9161
9162 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9163 <desc>
9164 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9165 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9166 size of the scan line must be aligned to 32 bits.
9167 </desc>
9168 </attribute>
9169
9170 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9171 <desc>
9172 Frame buffer pixel format. It's either one of the values defined by <link
9173 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9174 <note>
9175 This attribute must never return <link
9176 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9177 <link to="#address"/> points to must be always known.
9178 </note>
9179 </desc>
9180 </attribute>
9181
9182 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9183 <desc>
9184 Defines whether this frame buffer uses the virtual video card's memory
9185 buffer (guest VRAM) directly or not. See <link
9186 to="IFramebuffer::requestResize()"/> for more information.
9187 </desc>
9188 </attribute>
9189
9190 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9191 <desc>
9192 Hint from the frame buffer about how much of the standard
9193 screen height it wants to use for itself. This information is
9194 exposed to the guest through the VESA BIOS and VMMDev interface
9195 so that it can use it for determining its video mode table. It
9196 is not guaranteed that the guest respects the value.
9197 </desc>
9198 </attribute>
9199
9200 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9201 <desc>
9202 An alpha-blended overlay which is superposed over the frame buffer.
9203 The initial purpose is to allow the display of icons providing
9204 information about the VM state, including disk activity, in front
9205 ends which do not have other means of doing that. The overlay is
9206 designed to controlled exclusively by IDisplay. It has no locking
9207 of its own, and any changes made to it are not guaranteed to be
9208 visible until the affected portion of IFramebuffer is updated. The
9209 overlay can be created lazily the first time it is requested. This
9210 attribute can also return NULL to signal that the overlay is not
9211 implemented.
9212 </desc>
9213 </attribute>
9214
9215 <attribute name="winId" type="unsigned long long" readonly="yes">
9216 <desc>
9217 Platform-dependent identifier of the window where context of this
9218 frame buffer is drawn, or zero if there's no such window.
9219 </desc>
9220 </attribute>
9221
9222 <method name="lock">
9223 <desc>
9224 Locks the frame buffer.
9225 Gets called by the IDisplay object where this frame buffer is
9226 bound to.
9227 </desc>
9228 </method>
9229
9230 <method name="unlock">
9231 <desc>
9232 Unlocks the frame buffer.
9233 Gets called by the IDisplay object where this frame buffer is
9234 bound to.
9235 </desc>
9236 </method>
9237
9238 <method name="notifyUpdate">
9239 <desc>
9240 Informs about an update.
9241 Gets called by the display object where this buffer is
9242 registered.
9243 </desc>
9244 <param name="x" type="unsigned long" dir="in"/>
9245 <param name="y" type="unsigned long" dir="in"/>
9246 <param name="width" type="unsigned long" dir="in"/>
9247 <param name="height" type="unsigned long" dir="in"/>
9248 <param name="finished" type="boolean" dir="return"/>
9249 </method>
9250
9251 <method name="requestResize">
9252 <desc>
9253 Requests a size and pixel format change.
9254
9255 There are two modes of working with the video buffer of the virtual
9256 machine. The <i>indirect</i> mode implies that the IFramebuffer
9257 implementation allocates a memory buffer for the requested display mode
9258 and provides it to the virtual machine. In <i>direct</i> mode, the
9259 IFramebuffer implementation uses the memory buffer allocated and owned
9260 by the virtual machine. This buffer represents the video memory of the
9261 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9262 usually faster because the implementation gets a raw pointer to the
9263 guest VRAM buffer which it can directly use for visualizing the contents
9264 of the virtual display, as opposed to the indirect mode where the
9265 contents of guest VRAM are copied to the memory buffer provided by
9266 the implementation every time a display update occurs.
9267
9268 It is important to note that the direct mode is really fast only when
9269 the implementation uses the given guest VRAM buffer directly, for
9270 example, by blitting it to the window representing the virtual machine's
9271 display, which saves at least one copy operation comparing to the
9272 indirect mode. However, using the guest VRAM buffer directly is not
9273 always possible: the format and the color depth of this buffer may be
9274 not supported by the target window, or it may be unknown (opaque) as in
9275 case of text or non-linear multi-plane VGA video modes. In this case,
9276 the indirect mode (that is always available) should be used as a
9277 fallback: when the guest VRAM contents are copied to the
9278 implementation-provided memory buffer, color and format conversion is
9279 done automatically by the underlying code.
9280
9281 The @a pixelFormat parameter defines whether the direct mode is
9282 available or not. If @a pixelFormat is <link
9283 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9284 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9285 bytesPerLine parameters must be ignored and the implementation must use
9286 the indirect mode (where it provides its own buffer in one of the
9287 supported formats). In all other cases, @a pixelFormat together with @a
9288 bitsPerPixel and @a bytesPerLine define the format of the video memory
9289 buffer pointed to by the @a VRAM parameter and the implementation is
9290 free to choose which mode to use. To indicate that this frame buffer uses
9291 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9292 attribute must return <tt>true</tt> and <link to="#address"/> must
9293 return exactly the same address that is passed in the @a VRAM parameter
9294 of this method; otherwise it is assumed that the indirect strategy is
9295 chosen.
9296
9297 The @a width and @a height parameters represent the size of the
9298 requested display mode in both modes. In case of indirect mode, the
9299 provided memory buffer should be big enough to store data of the given
9300 display mode. In case of direct mode, it is guaranteed that the given @a
9301 VRAM buffer contains enough space to represent the display mode of the
9302 given size. Note that this frame buffer's <link to="#width"/> and <link
9303 to="#height"/> attributes must return exactly the same values as
9304 passed to this method after the resize is completed (see below).
9305
9306 The @a finished output parameter determines if the implementation has
9307 finished resizing the frame buffer or not. If, for some reason, the
9308 resize cannot be finished immediately during this call, @a finished
9309 must be set to @c false, and the implementation must call
9310 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9311 this method as soon as possible. If @a finished is @c false, the
9312 machine will not call any frame buffer methods until
9313 <link to="IDisplay::resizeCompleted()"/> is called.
9314
9315 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9316 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9317 this frame buffer must return exactly the same values as specified in the
9318 parameters of this method, after the resize is completed. If the
9319 indirect mode is chosen, these attributes must return values describing
9320 the format of the implementation's own memory buffer <link
9321 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9322 value must always correlate with <link to="#pixelFormat"/>. Note that
9323 the <link to="#pixelFormat"/> attribute must never return <link
9324 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9325
9326 <note>
9327 This method is called by the IDisplay object under the
9328 <link to="#lock()"/> provided by this IFramebuffer
9329 implementation. If this method returns @c false in @a finished, then
9330 this lock is not released until
9331 <link to="IDisplay::resizeCompleted()"/> is called.
9332 </note>
9333 </desc>
9334 <param name="screenId" type="unsigned long" dir="in">
9335 <desc>
9336 Logical screen number. Must be used in the corresponding call to
9337 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9338 </desc>
9339 </param>
9340 <param name="pixelFormat" type="unsigned long" dir="in">
9341 <desc>
9342 Pixel format of the memory buffer pointed to by @a VRAM.
9343 See also <link to="FramebufferPixelFormat"/>.
9344 </desc>
9345 </param>
9346 <param name="VRAM" type="octet" mod="ptr" dir="in">
9347 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9348 </param>
9349 <param name="bitsPerPixel" type="unsigned long" dir="in">
9350 <desc>Color depth, bits per pixel.</desc>
9351 </param>
9352 <param name="bytesPerLine" type="unsigned long" dir="in">
9353 <desc>Size of one scan line, in bytes.</desc>
9354 </param>
9355 <param name="width" type="unsigned long" dir="in">
9356 <desc>Width of the guest display, in pixels.</desc>
9357 </param>
9358 <param name="height" type="unsigned long" dir="in">
9359 <desc>Height of the guest display, in pixels.</desc>
9360 </param>
9361 <param name="finished" type="boolean" dir="return">
9362 <desc>
9363 Can the VM start using the new frame buffer immediately
9364 after this method returns or it should wait for
9365 <link to="IDisplay::resizeCompleted()"/>.
9366 </desc>
9367 </param>
9368 </method>
9369
9370 <method name="operationSupported">
9371 <desc>
9372 Returns whether the given acceleration operation is supported
9373 by the IFramebuffer implementation. If not, the display object
9374 will not attempt to call the corresponding IFramebuffer entry
9375 point. Even if an operation is indicated as supported, the
9376 IFramebuffer implementation always has the option to return non
9377 supported from the corresponding acceleration method in which
9378 case the operation will be performed by the display engine. This
9379 allows for reduced IFramebuffer implementation complexity where
9380 only common cases are handled.
9381 </desc>
9382 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9383 <param name="supported" type="boolean" dir="return"/>
9384 </method>
9385
9386 <method name="videoModeSupported">
9387 <desc>
9388 Returns whether the frame buffer implementation is willing to
9389 support a given video mode. In case it is not able to render
9390 the video mode (or for some reason not willing), it should
9391 return false. Usually this method is called when the guest
9392 asks the VMM device whether a given video mode is supported
9393 so the information returned is directly exposed to the guest.
9394 It is important that this method returns very quickly.
9395 </desc>
9396 <param name="width" type="unsigned long" dir="in"/>
9397 <param name="height" type="unsigned long" dir="in"/>
9398 <param name="bpp" type="unsigned long" dir="in"/>
9399 <param name="supported" type="boolean" dir="return"/>
9400 </method>
9401
9402 <method name="solidFill">
9403 <desc>
9404 Fills the specified rectangle on screen with a solid color.
9405 </desc>
9406 <param name="x" type="unsigned long" dir="in"/>
9407 <param name="y" type="unsigned long" dir="in"/>
9408 <param name="width" type="unsigned long" dir="in"/>
9409 <param name="height" type="unsigned long" dir="in"/>
9410 <param name="color" type="unsigned long" dir="in"/>
9411 <param name="handled" type="boolean" dir="return"/>
9412 </method>
9413
9414 <method name="copyScreenBits">
9415 <desc>
9416 Copies specified rectangle on the screen.
9417 </desc>
9418 <param name="xDst" type="unsigned long" dir="in"/>
9419 <param name="yDst" type="unsigned long" dir="in"/>
9420 <param name="xSrc" type="unsigned long" dir="in"/>
9421 <param name="ySrc" type="unsigned long" dir="in"/>
9422 <param name="width" type="unsigned long" dir="in"/>
9423 <param name="height" type="unsigned long" dir="in"/>
9424 <param name="handled" type="boolean" dir="return"/>
9425 </method>
9426
9427 <method name="getVisibleRegion">
9428 <desc>
9429 Returns the visible region of this frame buffer.
9430
9431 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9432 @a count parameter is ignored and the number of elements necessary to
9433 describe the current visible region is returned in @a countCopied.
9434
9435 If @a rectangles is not <tt>NULL</tt> but @a count is less
9436 than the required number of elements to store region data, the method
9437 will report a failure. If @a count is equal or greater than the
9438 required number of elements, then the actual number of elements copied
9439 to the provided array will be returned in @a countCopied.
9440
9441 <note>
9442 The address of the provided array must be in the process space of
9443 this IFramebuffer object.
9444 </note>
9445 <note>
9446 Method not yet implemented.
9447 </note>
9448 </desc>
9449 <param name="rectangles" type="octet" mod="ptr" dir="in">
9450 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9451 </param>
9452 <param name="count" type="unsigned long" dir="in">
9453 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9454 </param>
9455 <param name="countCopied" type="unsigned long" dir="return">
9456 <desc>Number of elements copied to the @a rectangles array.</desc>
9457 </param>
9458 </method>
9459
9460 <method name="setVisibleRegion">
9461 <desc>
9462 Suggests a new visible region to this frame buffer. This region
9463 represents the area of the VM display which is a union of regions of
9464 all top-level windows of the guest operating system running inside the
9465 VM (if the Guest Additions for this system support this
9466 functionality). This information may be used by the frontends to
9467 implement the seamless desktop integration feature.
9468
9469 <note>
9470 The address of the provided array must be in the process space of
9471 this IFramebuffer object.
9472 </note>
9473 <note>
9474 The IFramebuffer implementation must make a copy of the provided
9475 array of rectangles.
9476 </note>
9477 <note>
9478 Method not yet implemented.
9479 </note>
9480 </desc>
9481 <param name="rectangles" type="octet" mod="ptr" dir="in">
9482 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9483 </param>
9484 <param name="count" type="unsigned long" dir="in">
9485 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9486 </param>
9487 </method>
9488
9489 </interface>
9490
9491 <interface
9492 name="IFramebufferOverlay" extends="IFrameBuffer"
9493 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9494 wsmap="suppress"
9495 >
9496 <desc>
9497 The IFramebufferOverlay interface represents an alpha blended overlay
9498 for displaying status icons above an IFramebuffer. It is always created
9499 not visible, so that it must be explicitly shown. It only covers a
9500 portion of the IFramebuffer, determined by its width, height and
9501 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9502 that order) format, and may be written to directly. Do re-read the
9503 width though, after setting it, as it may be adjusted (increased) to
9504 make it more suitable for the front end.
9505 </desc>
9506 <attribute name="x" type="unsigned long" readonly="yes">
9507 <desc>X position of the overlay, relative to the frame buffer.</desc>
9508 </attribute>
9509
9510 <attribute name="y" type="unsigned long" readonly="yes">
9511 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9512 </attribute>
9513
9514 <attribute name="visible" type="boolean" readonly="no">
9515 <desc>
9516 Whether the overlay is currently visible.
9517 </desc>
9518 </attribute>
9519
9520 <attribute name="alpha" type="unsigned long" readonly="no">
9521 <desc>
9522 The global alpha value for the overlay. This may or may not be
9523 supported by a given front end.
9524 </desc>
9525 </attribute>
9526
9527 <method name="move">
9528 <desc>
9529 Changes the overlay's position relative to the IFramebuffer.
9530 </desc>
9531 <param name="x" type="unsigned long" dir="in"/>
9532 <param name="y" type="unsigned long" dir="in"/>
9533 </method>
9534
9535 </interface>
9536
9537 <interface
9538 name="IDisplay" extends="$unknown"
9539 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
9540 wsmap="suppress"
9541 >
9542 <desc>
9543 The IDisplay interface represents the virtual machine's display.
9544
9545 The object implementing this interface is contained in each
9546 <link to="IConsole::display"/> attribute and represents the visual
9547 output of the virtual machine.
9548
9549 The virtual display supports pluggable output targets represented by the
9550 IFramebuffer interface. Examples of the output target are a window on
9551 the host computer or an RDP session's display on a remote computer.
9552 </desc>
9553 <attribute name="width" type="unsigned long" readonly="yes">
9554 <desc>Current display width.</desc>
9555 </attribute>
9556
9557 <attribute name="height" type="unsigned long" readonly="yes">
9558 <desc>Current display height.</desc>
9559 </attribute>
9560
9561 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9562 <desc>
9563 Current guest display color depth. Note that this may differ
9564 from <link to="IFramebuffer::bitsPerPixel"/>.
9565 </desc>
9566 </attribute>
9567
9568 <method name="setupInternalFramebuffer">
9569 <desc>
9570 Prepares an internally managed frame buffer.
9571 </desc>
9572 <param name="depth" type="unsigned long" dir="in"/>
9573 </method>
9574
9575 <method name="lockFramebuffer">
9576 <desc>
9577 Requests access to the internal frame buffer.
9578
9579 <result name="VBOX_E_NOT_SUPPORTED">
9580 Attempt to lock a non-internal frame buffer.
9581 </result>
9582
9583 </desc>
9584 <param name="address" type="octet" mod="ptr" dir="return"/>
9585 </method>
9586
9587 <method name="unlockFramebuffer">
9588 <desc>
9589 Releases access to the internal frame buffer.
9590
9591 <result name="VBOX_E_NOT_SUPPORTED">
9592 Attempt to unlock a non-internal frame buffer.
9593 </result>
9594
9595 </desc>
9596 </method>
9597
9598 <method name="registerExternalFramebuffer">
9599 <desc>
9600 Registers an external frame buffer.
9601 </desc>
9602 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9603 </method>
9604
9605 <method name="setFramebuffer">
9606 <desc>
9607 Sets the framebuffer for given screen.
9608 </desc>
9609 <param name="screenId" type="unsigned long" dir="in"/>
9610 <param name="framebuffer" type="IFramebuffer" dir="in"/>
9611 </method>
9612
9613 <method name="getFramebuffer">
9614 <desc>
9615 Queries the framebuffer for given screen.
9616 </desc>
9617 <param name="screenId" type="unsigned long" dir="in"/>
9618 <param name="framebuffer" type="IFramebuffer" dir="out"/>
9619 <param name="xOrigin" type="long" dir="out"/>
9620 <param name="yOrigin" type="long" dir="out"/>
9621 </method>
9622
9623 <method name="setVideoModeHint">
9624 <desc>
9625 Asks VirtualBox to request the given video mode from
9626 the guest. This is just a hint and it cannot be guaranteed
9627 that the requested resolution will be used. Guest Additions
9628 are required for the request to be seen by guests. The caller
9629 should issue the request and wait for a resolution change and
9630 after a timeout retry.
9631
9632 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
9633 parameters means that the corresponding values should be taken from the
9634 current video mode (i.e. left unchanged).
9635
9636 If the guest OS supports multi-monitor configuration then the @a display
9637 parameter specifies the number of the guest display to send the hint to:
9638 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
9639 so on. If the multi-monitor configuration is not supported, @a display
9640 must be <tt>0</tt>.
9641
9642 <result name="E_INVALIDARG">
9643 The @a display is not associated with any monitor.
9644 </result>
9645
9646 </desc>
9647 <param name="width" type="unsigned long" dir="in"/>
9648 <param name="height" type="unsigned long" dir="in"/>
9649 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
9650 <param name="display" type="unsigned long" dir="in"/>
9651 </method>
9652
9653 <method name="setSeamlessMode">
9654 <desc>
9655 Enables or disables seamless guest display rendering (seamless desktop
9656 integration) mode.
9657 <note>
9658 Calling this method has no effect if <link
9659 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
9660 </note>
9661 </desc>
9662 <param name="enabled" type="boolean" dir="in"/>
9663 </method>
9664
9665 <method name="takeScreenShot">
9666 <desc>
9667 Takes a screen shot of the requested size and copies it to the
9668 32-bpp buffer allocated by the caller.
9669
9670 <result name="E_NOTIMPL">
9671 Feature not implemented.
9672 </result>
9673 <result name="VBOX_E_IPRT_ERROR">
9674 Could not take a screenshot.
9675 </result>
9676
9677 </desc>
9678 <param name="address" type="octet" mod="ptr" dir="in"/>
9679 <param name="width" type="unsigned long" dir="in"/>
9680 <param name="height" type="unsigned long" dir="in"/>
9681 </method>
9682
9683 <method name="drawToScreen">
9684 <desc>
9685 Draws a 32-bpp image of the specified size from the given buffer
9686 to the given point on the VM display.
9687
9688 <result name="E_NOTIMPL">
9689 Feature not implemented.
9690 </result>
9691 <result name="VBOX_E_IPRT_ERROR">
9692 Could not draw to screen.
9693 </result>
9694
9695 </desc>
9696 <param name="address" type="octet" mod="ptr" dir="in"/>
9697 <param name="x" type="unsigned long" dir="in"/>
9698 <param name="y" type="unsigned long" dir="in"/>
9699 <param name="width" type="unsigned long" dir="in"/>
9700 <param name="height" type="unsigned long" dir="in"/>
9701 </method>
9702
9703 <method name="invalidateAndUpdate">
9704 <desc>
9705 Does a full invalidation of the VM display and instructs the VM
9706 to update it.
9707
9708 <result name="VBOX_E_IPRT_ERROR">
9709 Could not invalidate and update screen.
9710 </result>
9711
9712 </desc>
9713 </method>
9714
9715 <method name="resizeCompleted">
9716 <desc>
9717 Signals that a framebuffer has completed the resize operation.
9718
9719 <result name="VBOX_E_NOT_SUPPORTED">
9720 Operation only valid for external frame buffers.
9721 </result>
9722
9723 </desc>
9724 <param name="screenId" type="unsigned long" dir="in"/>
9725 </method>
9726
9727 <method name="updateCompleted">
9728 <desc>
9729 Signals that a framebuffer has completed the update operation.
9730
9731 <result name="VBOX_E_NOT_SUPPORTED">
9732 Operation only valid for external frame buffers.
9733 </result>
9734
9735 </desc>
9736 </method>
9737
9738 </interface>
9739
9740 <!--
9741 // INetworkAdapter
9742 /////////////////////////////////////////////////////////////////////////
9743 -->
9744
9745 <enum
9746 name="NetworkAttachmentType"
9747 uuid="8730d899-d036-4925-bc63-e58f3486f4bf"
9748 >
9749 <desc>
9750 Network attachment type.
9751 </desc>
9752
9753 <const name="Null" value="0">
9754 <desc>Null value, also means "not attached".</desc>
9755 </const>
9756 <const name="NAT" value="1"/>
9757 <const name="HostInterface" value="2"/>
9758 <const name="Internal" value="3"/>
9759 </enum>
9760
9761 <enum
9762 name="NetworkAdapterType"
9763 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
9764 >
9765 <desc>
9766 Network adapter type.
9767 </desc>
9768
9769 <const name="Null" value="0">
9770 <desc>Null value (never used by the API).</desc>
9771 </const>
9772 <const name="Am79C970A" value="1"/>
9773 <const name="Am79C973" value="2"/>
9774 <const name="I82540EM" value="3"/>
9775 <const name="I82543GC" value="4"/>
9776 </enum>
9777
9778 <interface
9779 name="INetworkAdapter" extends="$unknown"
9780 uuid="a876d9b1-68d9-43b1-9c68-ddea0a473663"
9781 wsmap="managed"
9782 >
9783 <attribute name="adapterType" type="NetworkAdapterType">
9784 <desc>
9785 Type of the virtual network adapter. Depending on this value,
9786 VirtualBox will provide a different virtual network hardware
9787 to the guest.
9788 </desc>
9789 </attribute>
9790
9791 <attribute name="slot" type="unsigned long" readonly="yes">
9792 <desc>
9793 Slot number this adapter is plugged into. Corresponds to
9794 the value you pass to <link to="IMachine::getNetworkAdapter"/>
9795 to obtain this instance.
9796 </desc>
9797 </attribute>
9798
9799 <attribute name="enabled" type="boolean">
9800 <desc>
9801 Flag whether the network adapter is present in the
9802 guest system. If disabled, the virtual guest hardware will
9803 not contain this network adapter. Can only be changed when
9804 the VM is not running.
9805 </desc>
9806 </attribute>
9807
9808 <attribute name="MACAddress" type="wstring">
9809 <desc>
9810 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
9811 it to NULL, VirtualBox will generate a unique MAC address.
9812 </desc>
9813 </attribute>
9814
9815 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
9816
9817 <attribute name="hostInterface" type="wstring">
9818 <desc>
9819 Name of the host network interface the VM is attached to.
9820 </desc>
9821 </attribute>
9822
9823 <attribute name="internalNetwork" type="wstring">
9824 <desc>
9825 Name of the internal network the VM is attached to.
9826 </desc>
9827 </attribute>
9828
9829 <attribute name="NATNetwork" type="wstring">
9830 <desc>
9831 Name of the NAT network the VM is attached to.
9832 </desc>
9833 </attribute>
9834
9835 <attribute name="cableConnected" type="boolean">
9836 <desc>
9837 Flag whether the adapter reports the cable as connected or not.
9838 It can be used to report offline situations to a VM.
9839 </desc>
9840 </attribute>
9841
9842 <attribute name="lineSpeed" type="unsigned long">
9843 <desc>
9844 Line speed reported by custom drivers, in units of 1 kbps.
9845 </desc>
9846 </attribute>
9847
9848 <attribute name="traceEnabled" type="boolean">
9849 <desc>
9850 Flag whether network traffic from/to the network card should be traced.
9851 Can only be toggled when the VM is turned off.
9852 </desc>
9853 </attribute>
9854
9855 <attribute name="traceFile" type="wstring">
9856 <desc>
9857 Filename where a network trace will be stored. If not set, VBox-pid.pcap
9858 will be used.
9859 </desc>
9860 </attribute>
9861
9862 <method name="attachToNAT">
9863 <desc>
9864 Attach the network adapter to the Network Address Translation (NAT) interface.
9865 </desc>
9866 </method>
9867
9868 <method name="attachToHostInterface">
9869 <desc>
9870 Attach the network adapter to a host interface.
9871 </desc>
9872 </method>
9873
9874 <method name="attachToInternalNetwork">
9875 <desc>
9876 Attach the network adapter to an internal network.
9877 </desc>
9878 </method>
9879
9880 <method name="detach">
9881 <desc>
9882 Detach the network adapter
9883 </desc>
9884 </method>
9885 </interface>
9886
9887
9888 <!--
9889 // ISerialPort
9890 /////////////////////////////////////////////////////////////////////////
9891 -->
9892
9893 <enum
9894 name="PortMode"
9895 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
9896 >
9897 <desc>
9898 The PortMode enumeration represents possible communication modes for
9899 the virtual serial port device.
9900 </desc>
9901
9902 <const name="Disconnected" value="0">
9903 <desc>Virtual device is not attached to any real host device.</desc>
9904 </const>
9905 <const name="HostPipe" value="1">
9906 <desc>Virtual device is attached to a host pipe.</desc>
9907 </const>
9908 <const name="HostDevice" value="2">
9909 <desc>Virtual device is attached to a host device.</desc>
9910 </const>
9911 </enum>
9912
9913 <interface
9914 name="ISerialPort" extends="$unknown"
9915 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
9916 wsmap="managed"
9917 >
9918
9919 <desc>
9920 The ISerialPort interface represents the virtual serial port device.
9921
9922 The virtual serial port device acts like an ordinary serial port
9923 inside the virtual machine. This device communicates to the real
9924 serial port hardware in one of two modes: host pipe or host device.
9925
9926 In host pipe mode, the #path attribute specifies the path to the pipe on
9927 the host computer that represents a serial port. The #server attribute
9928 determines if this pipe is created by the virtual machine process at
9929 machine startup or it must already exist before starting machine
9930 execution.
9931
9932 In host device mode, the #path attribute specifies the name of the
9933 serial port device on the host computer.
9934
9935 There is also a third communication mode: the disconnected mode. In this
9936 mode, the guest OS running inside the virtual machine will be able to
9937 detect the serial port, but all port write operations will be discarded
9938 and all port read operations will return no data.
9939
9940 <see>IMachine::getSerialPort</see>
9941 </desc>
9942
9943 <attribute name="slot" type="unsigned long" readonly="yes">
9944 <desc>
9945 Slot number this serial port is plugged into. Corresponds to
9946 the value you pass to <link to="IMachine::getSerialPort"/>
9947 to obtain this instance.
9948 </desc>
9949 </attribute>
9950
9951 <attribute name="enabled" type="boolean">
9952 <desc>
9953 Flag whether the serial port is enabled. If disabled,
9954 the serial port will not be reported to the guest OS.
9955 </desc>
9956 </attribute>
9957
9958 <attribute name="IOBase" type="unsigned long">
9959 <desc>Base I/O address of the serial port.</desc>
9960 </attribute>
9961
9962 <attribute name="IRQ" type="unsigned long">
9963 <desc>IRQ number of the serial port.</desc>
9964 </attribute>
9965
9966 <attribute name="hostMode" type="PortMode">
9967 <desc>
9968 How is this port connected to the host.
9969 <note>
9970 Changing this attribute may fail if the conditions for
9971 <link to="#path"/> are not met.
9972 </note>
9973 </desc>
9974 </attribute>
9975
9976 <attribute name="server" type="boolean">
9977 <desc>
9978 Flag whether this serial port acts as a server (creates a new pipe on
9979 the host) or as a client (uses the existing pipe). This attribute is
9980 used only when <link to="#hostMode"/> is PortMode_HostPipe.
9981 </desc>
9982 </attribute>
9983
9984 <attribute name="path" type="wstring">
9985 <desc>
9986 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
9987 PortMode_HostPipe, or the host serial device name when
9988 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
9989 cases, setting a @c null or an empty string as the attribute's value
9990 will result into an error. Otherwise, the value of this property is
9991 ignored.
9992 </desc>
9993 </attribute>
9994
9995 </interface>
9996
9997 <!--
9998 // IParallelPort
9999 /////////////////////////////////////////////////////////////////////////
10000 -->
10001
10002 <interface
10003 name="IParallelPort" extends="$unknown"
10004 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10005 wsmap="managed"
10006 >
10007
10008 <desc>
10009 The IParallelPort interface represents the virtual parallel port device.
10010
10011 The virtual parallel port device acts like an ordinary parallel port
10012 inside the virtual machine. This device communicates to the real
10013 parallel port hardware using the name of the parallel device on the host
10014 computer specified in the #path attribute.
10015
10016 Each virtual parallel port device is assigned a base I/O address and an
10017 IRQ number that will be reported to the guest operating system and used
10018 to operate the given parallel port from within the virtual machine.
10019
10020 <see>IMachine::getParallelPort</see>
10021 </desc>
10022
10023 <attribute name="slot" type="unsigned long" readonly="yes">
10024 <desc>
10025 Slot number this parallel port is plugged into. Corresponds to
10026 the value you pass to <link to="IMachine::getParallelPort"/>
10027 to obtain this instance.
10028 </desc>
10029 </attribute>
10030
10031 <attribute name="enabled" type="boolean">
10032 <desc>
10033 Flag whether the parallel port is enabled. If disabled,
10034 the parallel port will not be reported to the guest OS.
10035 </desc>
10036 </attribute>
10037
10038 <attribute name="IOBase" type="unsigned long">
10039 <desc>Base I/O address of the parallel port.</desc>
10040 </attribute>
10041
10042 <attribute name="IRQ" type="unsigned long">
10043 <desc>IRQ number of the parallel port.</desc>
10044 </attribute>
10045
10046 <attribute name="path" type="wstring">
10047 <desc>
10048 Host parallel device name. If this parallel port is enabled, setting a
10049 @c null or an empty string as this attribute's value will result into
10050 an error.
10051 </desc>
10052 </attribute>
10053
10054 </interface>
10055
10056
10057 <!--
10058 // IMachineDebugger
10059 /////////////////////////////////////////////////////////////////////////
10060 -->
10061
10062 <interface
10063 name="IMachineDebugger" extends="$unknown"
10064 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10065 wsmap="suppress"
10066 >
10067 <method name="resetStats">
10068 <desc>
10069 Reset VM statistics.
10070 </desc>
10071 <param name="pattern" type="wstring" dir="in">
10072 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10073 </param>
10074 </method>
10075
10076 <method name="dumpStats">
10077 <desc>
10078 Dumps VM statistics.
10079 </desc>
10080 <param name="pattern" type="wstring" dir="in">
10081 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10082 </param>
10083 </method>
10084
10085 <method name="getStats">
10086 <desc>
10087 Get the VM statistics in a XMLish format.
10088 </desc>
10089 <param name="pattern" type="wstring" dir="in">
10090 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10091 </param>
10092 <param name="withDescriptions" type="boolean" dir="in">
10093 <desc>Whether to include the descriptions.</desc>
10094 </param>
10095 <param name="stats" type="wstring" dir="out">
10096 <desc>The XML document containing the statistics.</desc>
10097 </param>
10098 </method>
10099
10100 <method name="injectNMI">
10101 <desc>
10102 Inject an NMI into a running VT-x/AMD-V VM.
10103 </desc>
10104 </method>
10105
10106 <attribute name="singlestep" type="boolean">
10107 <desc>Switch for enabling singlestepping.</desc>
10108 </attribute>
10109
10110 <attribute name="recompileUser" type="boolean">
10111 <desc>Switch for forcing code recompilation for user mode code.</desc>
10112 </attribute>
10113
10114 <attribute name="recompileSupervisor" type="boolean">
10115 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10116 </attribute>
10117
10118 <attribute name="PATMEnabled" type="boolean">
10119 <desc>Switch for enabling and disabling the PATM component.</desc>
10120 </attribute>
10121
10122 <attribute name="CSAMEnabled" type="boolean">
10123 <desc>Switch for enabling and disabling the CSAM component.</desc>
10124 </attribute>
10125
10126 <attribute name="logEnabled" type="boolean">
10127 <desc>Switch for enabling and disabling logging.</desc>
10128 </attribute>
10129
10130 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10131 <desc>
10132 Flag indicating whether the VM is currently making use of CPU hardware
10133 virtualization extensions.
10134 </desc>
10135 </attribute>
10136
10137 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10138 <desc>
10139 Flag indicating whether the VM is currently making use of the nested paging
10140 CPU hardware virtualization extension.
10141 </desc>
10142 </attribute>
10143
10144 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10145 <desc>
10146 Flag indicating whether the VM is currently making use of the VPID
10147 VT-x extension.
10148 </desc>
10149 </attribute>
10150
10151 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10152 <desc>
10153 Flag indicating whether the VM is currently making use of the Physical
10154 Address Extension CPU feature.
10155 </desc>
10156 </attribute>
10157
10158 <attribute name="virtualTimeRate" type="unsigned long">
10159 <desc>
10160 The rate at which the virtual time runs expressed as a percentage.
10161 The accepted range is 2% to 20000%.
10162 </desc>
10163 </attribute>
10164
10165 <!-- @todo method for setting log flags, groups and destination! -->
10166
10167 <attribute name="VM" type="unsigned long long" readonly="yes">
10168 <desc>
10169 Gets the VM handle. This is only for internal use while
10170 we carve the details of this interface.
10171 </desc>
10172 </attribute>
10173
10174 </interface>
10175
10176 <!--
10177 // IUSBController
10178 /////////////////////////////////////////////////////////////////////////
10179 -->
10180
10181 <interface
10182 name="IUSBController" extends="$unknown"
10183 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10184 wsmap="managed"
10185 >
10186 <attribute name="enabled" type="boolean">
10187 <desc>
10188 Flag whether the USB controller is present in the
10189 guest system. If disabled, the virtual guest hardware will
10190 not contain any USB controller. Can only be changed when
10191 the VM is powered off.
10192 </desc>
10193 </attribute>
10194
10195 <attribute name="enabledEhci" type="boolean">
10196 <desc>
10197 Flag whether the USB EHCI controller is present in the
10198 guest system. If disabled, the virtual guest hardware will
10199 not contain a USB EHCI controller. Can only be changed when
10200 the VM is powered off.
10201 </desc>
10202 </attribute>
10203
10204 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10205 <desc>
10206 USB standard version which the controller implements.
10207 This is a BCD which means that the major version is in the
10208 high byte and minor version is in the low byte.
10209 </desc>
10210 </attribute>
10211
10212 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10213 <desc>
10214 List of USB device filters associated with the machine.
10215
10216 If the machine is currently running, these filters are activated
10217 every time a new (supported) USB device is attached to the host
10218 computer that was not ignored by global filters
10219 (<link to="IHost::USBDeviceFilters"/>).
10220
10221 These filters are also activated when the machine is powered up.
10222 They are run against a list of all currently available USB
10223 devices (in states
10224 <link to="USBDeviceState_Available"/>,
10225 <link to="USBDeviceState_Busy"/>,
10226 <link to="USBDeviceState_Held"/>) that were not previously
10227 ignored by global filters.
10228
10229 If at least one filter matches the USB device in question, this
10230 device is automatically captured (attached to) the virtual USB
10231 controller of this machine.
10232
10233 <see>IUSBDeviceFilter, ::IUSBController</see>
10234 </desc>
10235 </attribute>
10236
10237 <method name="createDeviceFilter">
10238 <desc>
10239 Creates a new USB device filter. All attributes except
10240 the filter name are set to <tt>null</tt> (any match),
10241 <i>active</i> is <tt>false</tt> (the filter is not active).
10242
10243 The created filter can then be added to the list of filters using
10244 <link to="#insertDeviceFilter()"/>.
10245
10246 <result name="VBOX_E_INVALID_VM_STATE">
10247 The virtual machine is not mutable.
10248 </result>
10249
10250 <see>#deviceFilters</see>
10251 </desc>
10252 <param name="name" type="wstring" dir="in">
10253 <desc>
10254 Filter name. See <link to="IUSBDeviceFilter::name"/>
10255 for more info.
10256 </desc>
10257 </param>
10258 <param name="filter" type="IUSBDeviceFilter" dir="return">
10259 <desc>Created filter object.</desc>
10260 </param>
10261 </method>
10262
10263 <method name="insertDeviceFilter">
10264 <desc>
10265 Inserts the given USB device to the specified position
10266 in the list of filters.
10267
10268 Positions are numbered starting from <tt>0</tt>. If the specified
10269 position is equal to or greater than the number of elements in
10270 the list, the filter is added to the end of the collection.
10271
10272 <note>
10273 Duplicates are not allowed, so an attempt to insert a
10274 filter that is already in the collection, will return an
10275 error.
10276 </note>
10277
10278 <result name="VBOX_E_INVALID_VM_STATE">
10279 Virtual machine is not mutable.
10280 </result>
10281 <result name="E_INVALIDARG">
10282 USB device filter not created within this VirtualBox instance.
10283 </result>
10284 <result name="VBOX_E_INVALID_OBJECT_STATE">
10285 USB device filter already in list.
10286 </result>
10287
10288 <see>#deviceFilters</see>
10289 </desc>
10290 <param name="position" type="unsigned long" dir="in">
10291 <desc>Position to insert the filter to.</desc>
10292 </param>
10293 <param name="filter" type="IUSBDeviceFilter" dir="in">
10294 <desc>USB device filter to insert.</desc>
10295 </param>
10296 </method>
10297
10298 <method name="removeDeviceFilter">
10299 <desc>
10300 Removes a USB device filter from the specified position in the
10301 list of filters.
10302
10303 Positions are numbered starting from <tt>0</tt>. Specifying a
10304 position equal to or greater than the number of elements in
10305 the list will produce an error.
10306
10307 <see>#deviceFilters</see>
10308
10309 <result name="VBOX_E_INVALID_VM_STATE">
10310 Virtual machine is not mutable.
10311 </result>
10312 <result name="E_INVALIDARG">
10313 USB device filter list empty or invalid @a position.
10314 </result>
10315
10316 </desc>
10317 <param name="position" type="unsigned long" dir="in">
10318 <desc>Position to remove the filter from.</desc>
10319 </param>
10320 <param name="filter" type="IUSBDeviceFilter" dir="return">
10321 <desc>Removed USB device filter.</desc>
10322 </param>
10323 </method>
10324
10325 </interface>
10326
10327
10328 <!--
10329 // IUSBDevice
10330 /////////////////////////////////////////////////////////////////////////
10331 -->
10332
10333 <enumerator
10334 name="IUSBDeviceEnumerator" type="IUSBDevice"
10335 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10336 />
10337
10338 <collection
10339 name="IUSBDeviceCollection" type="IUSBDevice"
10340 enumerator="IUSBDeviceEnumerator"
10341 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10342 readonly="yes"
10343 >
10344 <method name="findById">
10345 <desc>
10346 Searches this collection for a USB device with the given UUID.
10347 <note>
10348 The method returns an error if the given UUID does not
10349 correspond to any USB device in the collection.
10350 </note>
10351 <see>IUSBDevice::id</see>
10352 </desc>
10353 <param name="id" type="uuid" dir="in">
10354 <desc>UUID of the USB device to search for.</desc>
10355 </param>
10356 <param name="device" type="IUSBDevice" dir="return">
10357 <desc>Found USB device object.</desc>
10358 </param>
10359 </method>
10360
10361 <method name="findByAddress">
10362 <desc>
10363 Searches this collection for a USB device with the given
10364 host address.
10365 <note>
10366 The method returns an error if the given address does not
10367 correspond to any USB device in the collection.
10368 </note>
10369 <see>IUSBDevice::address</see>
10370 </desc>
10371 <param name="name" type="wstring" dir="in">
10372 <desc>
10373 Address of the USB device (as assigned by the host) to
10374 search for.
10375 </desc>
10376 </param>
10377 <param name="device" type="IUSBDevice" dir="return">
10378 <desc>Found USB device object.</desc>
10379 </param>
10380 </method>
10381
10382 </collection>
10383
10384 <interface
10385 name="IUSBDevice" extends="$unknown"
10386 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10387 wsmap="managed"
10388 >
10389 <desc>
10390 The IUSBDevice interface represents a virtual USB device attached to the
10391 virtual machine.
10392
10393 A collection of objects implementing this interface is stored in the
10394 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10395 attached to a running virtual machine's USB controller.
10396 </desc>
10397
10398 <attribute name="id" type="uuid" readonly="yes">
10399 <desc>
10400 Unique USB device ID. This ID is built from #vendorId,
10401 #productId, #revision and #serialNumber.
10402 </desc>
10403 </attribute>
10404
10405 <attribute name="vendorId" type="unsigned short" readonly="yes">
10406 <desc>Vendor ID.</desc>
10407 </attribute>
10408
10409 <attribute name="productId" type="unsigned short" readonly="yes">
10410 <desc>Product ID.</desc>
10411 </attribute>
10412
10413 <attribute name="revision" type="unsigned short" readonly="yes">
10414 <desc>
10415 Product revision number. This is a packed BCD represented as
10416 unsigned short. The high byte is the integer part and the low
10417 byte is the decimal.
10418 </desc>
10419 </attribute>
10420
10421 <attribute name="manufacturer" type="wstring" readonly="yes">
10422 <desc>Manufacturer string.</desc>
10423 </attribute>
10424
10425 <attribute name="product" type="wstring" readonly="yes">
10426 <desc>Product string.</desc>
10427 </attribute>
10428
10429 <attribute name="serialNumber" type="wstring" readonly="yes">
10430 <desc>Serial number string.</desc>
10431 </attribute>
10432
10433 <attribute name="address" type="wstring" readonly="yes">
10434 <desc>Host specific address of the device.</desc>
10435 </attribute>
10436
10437 <attribute name="port" type="unsigned short" readonly="yes">
10438 <desc>
10439 Host USB port number the device is physically
10440 connected to.
10441 </desc>
10442 </attribute>
10443
10444 <attribute name="version" type="unsigned short" readonly="yes">
10445 <desc>
10446 The major USB version of the device - 1 or 2.
10447 </desc>
10448 </attribute>
10449
10450 <attribute name="portVersion" type="unsigned short" readonly="yes">
10451 <desc>
10452 The major USB version of the host USB port the device is
10453 physically connected to - 1 or 2. For devices not connected to
10454 anything this will have the same value as the version attribute.
10455 </desc>
10456 </attribute>
10457
10458 <attribute name="remote" type="boolean" readonly="yes">
10459 <desc>
10460 Whether the device is physically connected to a remote VRDP
10461 client or to a local host machine.
10462 </desc>
10463 </attribute>
10464
10465 </interface>
10466
10467
10468 <!--
10469 // IUSBDeviceFilter
10470 /////////////////////////////////////////////////////////////////////////
10471 -->
10472
10473 <enumerator
10474 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10475 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10476 />
10477
10478 <collection
10479 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10480 enumerator="IUSBDeviceFilterEnumerator"
10481 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10482 readonly="yes"
10483 />
10484
10485 <interface
10486 name="IUSBDeviceFilter" extends="$unknown"
10487 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10488 wsmap="managed"
10489 >
10490 <desc>
10491 The IUSBDeviceFilter interface represents an USB device filter used
10492 to perform actions on a group of USB devices.
10493
10494 This type of filters is used by running virtual machines to
10495 automatically capture selected USB devices once they are physically
10496 attached to the host computer.
10497
10498 A USB device is matched to the given device filter if and only if all
10499 attributes of the device match the corresponding attributes of the
10500 filter (that is, attributes are joined together using the logical AND
10501 operation). On the other hand, all together, filters in the list of
10502 filters carry the semantics of the logical OR operation. So if it is
10503 desirable to create a match like "this vendor id OR this product id",
10504 one needs to create two filters and specify "any match" (see below)
10505 for unused attributes.
10506
10507 All filter attributes used for matching are strings. Each string
10508 is an expression representing a set of values of the corresponding
10509 device attribute, that will match the given filter. Currently, the
10510 following filtering expressions are supported:
10511
10512 <ul>
10513 <li><i>Interval filters</i>. Used to specify valid intervals for
10514 integer device attributes (Vendor ID, Product ID and Revision).
10515 The format of the string is:
10516
10517 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
10518
10519 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
10520 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
10521 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
10522 is omitted before a dash (<tt>-</tt>), the minimum possible integer
10523 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
10524 possible integer is assumed.
10525 </li>
10526 <li><i>Boolean filters</i>. Used to specify acceptable values for
10527 boolean device attributes. The format of the string is:
10528
10529 <tt>true|false|yes|no|0|1</tt>
10530
10531 </li>
10532 <li><i>Exact match</i>. Used to specify a single value for the given
10533 device attribute. Any string that doesn't start with <tt>int:</tt>
10534 represents the exact match. String device attributes are compared to
10535 this string including case of symbols. Integer attributes are first
10536 converted to a string (see individual filter attributes) and then
10537 compared ignoring case.
10538
10539 </li>
10540 <li><i>Any match</i>. Any value of the corresponding device attribute
10541 will match the given filter. An empty or <tt>null</tt> string is
10542 used to construct this type of filtering expressions.
10543
10544 </li>
10545 </ul>
10546
10547 <note>
10548 On the Windows host platform, interval filters are not currently
10549 available. Also all string filter attributes
10550 (<link to="#manufacturer"/>, <link to="#product"/>,
10551 <link to="#serialNumber"/>) are ignored, so they behave as
10552 <i>any match</i> no matter what string expression is specified.
10553 </note>
10554
10555 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
10556 </desc>
10557
10558 <attribute name="name" type="wstring">
10559 <desc>
10560 Visible name for this filter.
10561 This name is used to visually distinguish one filter from another,
10562 so it can neither be <tt>null</tt> nor an empty string.
10563 </desc>
10564 </attribute>
10565
10566 <attribute name="active" type="boolean">
10567 <desc>Whether this filter active or has been temporarily disabled.</desc>
10568 </attribute>
10569
10570 <attribute name="vendorId" type="wstring">
10571 <desc>
10572 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
10573 The string representation for the <i>exact matching</i>
10574 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10575 (including leading zeroes).
10576 </desc>
10577 </attribute>
10578
10579 <attribute name="productId" type="wstring">
10580 <desc>
10581 <link to="IUSBDevice::productId">Product ID</link> filter.
10582 The string representation for the <i>exact matching</i>
10583 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
10584 (including leading zeroes).
10585 </desc>
10586 </attribute>
10587
10588 <attribute name="revision" type="wstring">
10589 <desc>
10590 <link to="IUSBDevice::productId">Product revision number</link>
10591 filter. The string representation for the <i>exact matching</i>
10592 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
10593 of the integer part of the revision, and <tt>F</tt> is the
10594 decimal digit of its fractional part (including leading and
10595 trailing zeros).
10596 Note that for interval filters, it's best to use the hexadecimal
10597 form, because the revision is stored as a 16 bit packed BCD value;
10598 so the expression <tt>int:0x0100-0x0199</tt> will match any
10599 revision from <tt>1.0</tt> to <tt>1.99</tt>.
10600 </desc>
10601 </attribute>
10602
10603 <attribute name="manufacturer" type="wstring">
10604 <desc>
10605 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
10606 </desc>
10607 </attribute>
10608
10609 <attribute name="product" type="wstring">
10610 <desc>
10611 <link to="IUSBDevice::product">Product</link> filter.
10612 </desc>
10613 </attribute>
10614
10615 <attribute name="serialNumber" type="wstring">
10616 <desc>
10617 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
10618 </desc>
10619 </attribute>
10620
10621 <attribute name="port" type="wstring">
10622 <desc>
10623 <link to="IUSBDevice::port">Host USB port</link> filter.
10624 </desc>
10625 </attribute>
10626
10627 <attribute name="remote" type="wstring">
10628 <desc>
10629 <link to="IUSBDevice::remote">Remote state</link> filter.
10630 <note>
10631 This filter makes sense only for machine USB filters,
10632 i.e. it is ignored by IHostUSBDeviceFilter objects.
10633 </note>
10634 </desc>
10635 </attribute>
10636
10637 <attribute name="maskedInterfaces" type="unsigned long">
10638 <desc>
10639 This is an advanced option for hiding one or more USB interfaces
10640 from the guest. The value is a bit mask where the bits that are set
10641 means the corresponding USB interface should be hidden, masked off
10642 if you like.
10643 This feature only works on Linux hosts.
10644 </desc>
10645 </attribute>
10646
10647 </interface>
10648
10649
10650 <!--
10651 // IHostUSBDevice
10652 /////////////////////////////////////////////////////////////////////////
10653 -->
10654
10655 <enum
10656 name="USBDeviceState"
10657 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
10658 >
10659 <desc>
10660 USB device state. This enumeration represents all possible states
10661 of the USB device physically attached to the host computer regarding
10662 its state on the host computer and availability to guest computers
10663 (all currently running virtual machines).
10664
10665 Once a supported USB device is attached to the host, global USB
10666 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
10667 either ignore the device, or put it to USBDeviceState_Held state, or do
10668 nothing. Unless the device is ignored by global filters, filters of all
10669 currently running guests (<link to="IUSBController::deviceFilters"/>) are
10670 activated that can put it to USBDeviceState_Captured state.
10671
10672 If the device was ignored by global filters, or didn't match
10673 any filters at all (including guest ones), it is handled by the host
10674 in a normal way. In this case, the device state is determined by
10675 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
10676 or USBDeviceState_Available, depending on the current device usage.
10677
10678 Besides auto-capturing based on filters, the device can be manually
10679 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
10680 state is USBDeviceState_Busy, USBDeviceState_Available or
10681 USBDeviceState_Held.
10682
10683 <note>
10684 Due to differences in USB stack implementations in Linux and Win32,
10685 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
10686 only to the Linux version of the product. This also means that (<link
10687 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
10688 device state is USBDeviceState_Held.
10689 </note>
10690
10691 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
10692 </desc>
10693
10694 <const name="NotSupported" value="0">
10695 <desc>
10696 Not supported by the VirtualBox server, not available to guests.
10697 </desc>
10698 </const>
10699 <const name="Unavailable" value="1">
10700 <desc>
10701 Being used by the host computer exclusively,
10702 not available to guests.
10703 </desc>
10704 </const>
10705 <const name="Busy" value="2">
10706 <desc>
10707 Being used by the host computer, potentially available to guests.
10708 </desc>
10709 </const>
10710 <const name="Available" value="3">
10711 <desc>
10712 Not used by the host computer, available to guests (the host computer
10713 can also start using the device at any time).
10714 </desc>
10715 </const>
10716 <const name="Held" value="4">
10717 <desc>
10718 Held by the VirtualBox server (ignored by the host computer),
10719 available to guests.
10720 </desc>
10721 </const>
10722 <const name="Captured" value="5">
10723 <desc>
10724 Captured by one of the guest computers, not available
10725 to anybody else.
10726 </desc>
10727 </const>
10728 </enum>
10729
10730 <enumerator
10731 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
10732 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
10733 />
10734
10735 <collection
10736 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
10737 enumerator="IHostUSBDeviceEnumerator"
10738 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
10739 readonly="yes"
10740 >
10741 <method name="findById">
10742 <desc>
10743 Searches this collection for a USB device with the given UUID.
10744 <note>
10745 The method returns an error if the given UUID does not
10746 correspond to any USB device in the collection.
10747 </note>
10748 <see>IHostUSBDevice::id</see>
10749 </desc>
10750 <param name="id" type="uuid" dir="in">
10751 <desc>UUID of the USB device to search for.</desc>
10752 </param>
10753 <param name="device" type="IHostUSBDevice" dir="return">
10754 <desc>Found USB device object.</desc>
10755 </param>
10756 </method>
10757
10758 <method name="findByAddress">
10759 <desc>
10760 Searches this collection for a USB device with the given
10761 host address.
10762 <note>
10763 The method returns an error if the given address does not
10764 correspond to any USB device in the collection.
10765 </note>
10766 <see>IHostUSBDevice::address</see>
10767 </desc>
10768 <param name="name" type="wstring" dir="in">
10769 <desc>
10770 Address of the USB device (as assigned by the host) to
10771 search for.
10772 </desc>
10773 </param>
10774 <param name="device" type="IHostUSBDevice" dir="return">
10775 <desc>Found USB device object.</desc>
10776 </param>
10777 </method>
10778
10779 </collection>
10780
10781 <interface
10782 name="IHostUSBDevice" extends="IUSBDevice"
10783 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
10784 wsmap="managed"
10785 >
10786 <desc>
10787 The IHostUSBDevice interface represents a physical USB device attached
10788 to the host computer.
10789
10790 Besides properties inherited from IUSBDevice, this interface adds the
10791 <link to="#state"/> property that holds the current state of the USB
10792 device.
10793
10794 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
10795 </desc>
10796
10797 <attribute name="state" type="USBDeviceState" readonly="yes">
10798 <desc>
10799 Current state of the device.
10800 </desc>
10801 </attribute>
10802
10803 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
10804
10805 </interface>
10806
10807
10808 <!--
10809 // IHostUSBDeviceFilter
10810 /////////////////////////////////////////////////////////////////////////
10811 -->
10812
10813 <enum
10814 name="USBDeviceFilterAction"
10815 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
10816 >
10817 <desc>
10818 Actions for host USB device filters.
10819 <see>IHostUSBDeviceFilter, USBDeviceState</see>
10820 </desc>
10821
10822 <const name="Null" value="0">
10823 <desc>Null value (never used by the API).</desc>
10824 </const>
10825 <const name="Ignore" value="1">
10826 <desc>Ignore the matched USB device.</desc>
10827 </const>
10828 <const name="Hold" value="2">
10829 <desc>Hold the matched USB device.</desc>
10830 </const>
10831 </enum>
10832
10833 <enumerator
10834 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
10835 uuid="ff735211-903e-4642-9c37-189eb44579fe"
10836 />
10837
10838 <collection
10839 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
10840 enumerator="IHostUSBDeviceFilterEnumerator"
10841 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
10842 readonly="yes"
10843 />
10844
10845 <interface
10846 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
10847 uuid="4cc70246-d74a-400f-8222-3900489c0374"
10848 wsmap="managed"
10849 >
10850 <desc>
10851 The IHostUSBDeviceFilter interface represents a global filter for a
10852 physical USB device used by the host computer. Used indirectly in
10853 <link to="IHost::USBDeviceFilters"/>.
10854
10855 Using filters of this type, the host computer determines the initial
10856 state of the USB device after it is physically attached to the
10857 host's USB controller.
10858
10859 <note>
10860 The <link to="#remote"/> attribute is ignored by this type of
10861 filters, because it makes sense only for
10862 <link to="IUSBController::deviceFilters">machine USB filters</link>.
10863 </note>
10864
10865 <see>IHost::USBDeviceFilters</see>
10866 </desc>
10867
10868 <attribute name="action" type="USBDeviceFilterAction">
10869 <desc>
10870 Action performed by the host when an attached USB device
10871 matches this filter.
10872 </desc>
10873 </attribute>
10874
10875 </interface>
10876
10877 <!--
10878 // IAudioAdapter
10879 /////////////////////////////////////////////////////////////////////////
10880 -->
10881
10882 <enum
10883 name="AudioDriverType"
10884 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
10885 >
10886 <desc>
10887 Host audio driver type.
10888 </desc>
10889
10890 <const name="Null" value="0">
10891 <desc>Null value, also means "dummy audio driver".</desc>
10892 </const>
10893 <const name="WinMM" value="1"/>
10894 <const name="OSS" value="2"/>
10895 <const name="ALSA" value="3"/>
10896 <const name="DirectSound" value="4"/>
10897 <const name="CoreAudio" value="5"/>
10898 <const name="MMPM" value="6"/>
10899 <const name="Pulse" value="7"/>
10900 <const name="SolAudio" value="8"/>
10901 </enum>
10902
10903 <enum
10904 name="AudioControllerType"
10905 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
10906 >
10907 <desc>
10908 Virtual audio controller type.
10909 </desc>
10910
10911 <const name="AC97" value="0"/>
10912 <const name="SB16" value="1"/>
10913 </enum>
10914
10915 <interface
10916 name="IAudioAdapter" extends="$unknown"
10917 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
10918 wsmap="managed"
10919 >
10920 <desc>
10921 The IAudioAdapter interface represents the virtual audio adapter of
10922 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
10923 </desc>
10924 <attribute name="enabled" type="boolean">
10925 <desc>
10926 Flag whether the audio adapter is present in the
10927 guest system. If disabled, the virtual guest hardware will
10928 not contain any audio adapter. Can only be changed when
10929 the VM is not running.
10930 </desc>
10931 </attribute>
10932 <attribute name="audioController" type="AudioControllerType">
10933 <desc>
10934 The audio hardware we emulate.
10935 </desc>
10936 </attribute>
10937 <attribute name="audioDriver" type="AudioDriverType">
10938 <desc>
10939 Audio driver the adapter is connected to. This setting
10940 can only be changed when the VM is not running.
10941 </desc>
10942 </attribute>
10943 </interface>
10944
10945 <!--
10946 // IVRDPServer
10947 /////////////////////////////////////////////////////////////////////////
10948 -->
10949
10950 <enum
10951 name="VRDPAuthType"
10952 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
10953 >
10954 <desc>
10955 VRDP authentication type.
10956 </desc>
10957
10958 <const name="Null" value="0">
10959 <desc>Null value, also means "no authentication".</desc>
10960 </const>
10961 <const name="External" value="1"/>
10962 <const name="Guest" value="2"/>
10963 </enum>
10964
10965 <interface
10966 name="IVRDPServer" extends="$unknown"
10967 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
10968 wsmap="managed"
10969 >
10970 <attribute name="enabled" type="boolean">
10971 <desc>VRDP server status.</desc>
10972 </attribute>
10973
10974 <attribute name="port" type="unsigned long">
10975 <desc>
10976 VRDP server port number.
10977 <note>
10978 Setting the value of this property to <tt>0</tt> will reset the port
10979 number to the default value which is
10980 currently <tt>3389</tt>. Reading this property will always return a
10981 real port number, even after it has been set to <tt>0</tt> (in which
10982 case the default port is returned).
10983 </note>
10984 </desc>
10985 </attribute>
10986
10987 <attribute name="netAddress" type="wstring">
10988 <desc>VRDP server address.</desc>
10989 </attribute>
10990
10991 <attribute name="authType" type="VRDPAuthType">
10992 <desc>VRDP authentication method.</desc>
10993 </attribute>
10994
10995 <attribute name="authTimeout" type="unsigned long">
10996 <desc>Timeout for guest authentication. Milliseconds.</desc>
10997 </attribute>
10998
10999 <attribute name="allowMultiConnection" type="boolean">
11000 <desc>
11001 Flag whether multiple simultaneous connections to the VM are permitted.
11002 Note that this will be replaced by a more powerful mechanism in the future.
11003 </desc>
11004 </attribute>
11005
11006 <attribute name="reuseSingleConnection" type="boolean">
11007 <desc>
11008 Flag whether the existing connection must be dropped and a new connection
11009 must be established by the VRDP server, when a new client connects in single
11010 connection mode.
11011 </desc>
11012 </attribute>
11013
11014 </interface>
11015
11016
11017 <!--
11018 // ISharedFolder
11019 /////////////////////////////////////////////////////////////////////////
11020 -->
11021
11022 <enumerator
11023 name="ISharedFolderEnumerator" type="ISharedFolder"
11024 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
11025 />
11026
11027 <collection
11028 name="ISharedFolderCollection" type="ISharedFolder"
11029 enumerator="ISharedFolderEnumerator"
11030 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11031 readonly="yes">
11032
11033 <method name="findByName">
11034 <desc>
11035 Searches this collection for a shared folder with the given logical
11036 name.
11037 <note>
11038 The method returns an error if the given name does not correspond to
11039 any shared folder in the collection.
11040 </note>
11041 </desc>
11042 <param name="name" type="wstring" dir="in">
11043 <desc>Logical name of the shared folder to search for</desc>
11044 </param>
11045 <param name="sharedFolder" type="ISharedFolder" dir="return">
11046 <desc>Found shared folder object</desc>
11047 </param>
11048 </method>
11049
11050 </collection>
11051
11052 <interface
11053 name="ISharedFolder" extends="$unknown"
11054 uuid="8b0c5f70-9139-4f97-a421-64d5e9c335d5"
11055 wsmap="struct"
11056 >
11057 <desc>
11058 The ISharedFolder interface represents a folder in the host computer's
11059 file system accessible from the guest OS running inside a virtual
11060 machine using an associated logical name.
11061
11062 There are three types of shared folders:
11063 <ul>
11064 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11065 folders available to all virtual machines.</li>
11066 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11067 VM-specific shared folders available to the given virtual machine at
11068 startup.</li>
11069 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11070 VM-specific shared folders created in the session context (for
11071 example, when the virtual machine is running) and automatically
11072 discarded when the session is closed (the VM is powered off).</li>
11073 </ul>
11074
11075 Logical names of shared folders must be unique within the given scope
11076 (global, permanent or transient). However, they do not need to be unique
11077 across scopes. In this case, the definition of the shared folder in a
11078 more specific scope takes precedence over definitions in all other
11079 scopes. The order of precedence is (more specific to more general):
11080 <ol>
11081 <li>Transient definitions</li>
11082 <li>Permanent definitions</li>
11083 <li>Global definitions</li>
11084 </ol>
11085
11086 For example, if MyMachine has a shared folder named
11087 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11088 transient shared folder named <tt>C_DRIVE</tt> (that points
11089 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11090 of <tt>C_DRIVE</tt> in the guest OS so
11091 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11092 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11093 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11094 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11095 to <tt>C:\\</tt> if it still exists.
11096
11097 Note that permanent and transient shared folders of different machines
11098 are in different name spaces, so they don't overlap and don't need to
11099 have unique logical names.
11100
11101 <note>
11102 Global shared folders are not implemented in the current version of the
11103 product.
11104 </note>
11105 </desc>
11106
11107 <attribute name="name" type="wstring" readonly="yes">
11108 <desc>Logical name of the shared folder.</desc>
11109 </attribute>
11110
11111 <attribute name="hostPath" type="wstring" readonly="yes">
11112 <desc>Full path to the shared folder in the host file system.</desc>
11113 </attribute>
11114
11115 <attribute name="accessible" type="boolean" readonly="yes">
11116 <desc>
11117 Whether the folder defined by the host path is currently
11118 accessible or not.
11119 For example, the folder can be unaccessible if it is placed
11120 on the network share that is not available by the time
11121 this property is read.
11122 </desc>
11123 </attribute>
11124
11125 <attribute name="writable" type="boolean" readonly="yes">
11126 <desc>
11127 Whether the folder defined by the host path is writable or
11128 not.
11129 </desc>
11130 </attribute>
11131
11132 </interface>
11133
11134 <!--
11135 // ISession
11136 /////////////////////////////////////////////////////////////////////////
11137 -->
11138
11139 <interface
11140 name="IInternalSessionControl" extends="$unknown"
11141 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11142 internal="yes"
11143 wsmap="suppress"
11144 >
11145 <method name="getPID">
11146 <desc>PID of the process that has created this Session object.
11147 </desc>
11148 <param name="pid" type="unsigned long" dir="return"/>
11149 </method>
11150
11151 <method name="getRemoteConsole">
11152 <desc>
11153 Returns the console object suitable for remote control.
11154
11155 <result name="VBOX_E_INVALID_VM_STATE">
11156 Session state prevents operation.
11157 </result>
11158 <result name="VBOX_E_INVALID_OBJECT_STATE">
11159 Session type prevents operation.
11160 </result>
11161
11162 </desc>
11163 <param name="console" type="IConsole" dir="return"/>
11164 </method>
11165
11166 <method name="assignMachine">
11167 <desc>
11168 Assigns the machine object associated with this direct-type
11169 session or informs the session that it will be a remote one
11170 (if @a machine == NULL).
11171
11172 <result name="VBOX_E_INVALID_VM_STATE">
11173 Session state prevents operation.
11174 </result>
11175 <result name="VBOX_E_INVALID_OBJECT_STATE">
11176 Session type prevents operation.
11177 </result>
11178
11179 </desc>
11180 <param name="machine" type="IMachine" dir="in"/>
11181 </method>
11182
11183 <method name="assignRemoteMachine">
11184 <desc>
11185 Assigns the machine and the (remote) console object associated with
11186 this remote-type session.
11187
11188 <result name="VBOX_E_INVALID_VM_STATE">
11189 Session state prevents operation.
11190 </result>
11191
11192 </desc>
11193 <param name="machine" type="IMachine" dir="in"/>
11194 <param name="console" type="IConsole" dir="in"/>
11195 </method>
11196
11197 <method name="updateMachineState">
11198 <desc>
11199 Updates the machine state in the VM process.
11200 Must be called only in certain cases
11201 (see the method implementation).
11202
11203 <result name="VBOX_E_INVALID_VM_STATE">
11204 Session state prevents operation.
11205 </result>
11206 <result name="VBOX_E_INVALID_OBJECT_STATE">
11207 Session type prevents operation.
11208 </result>
11209
11210 </desc>
11211 <param name="aMachineState" type="MachineState" dir="in"/>
11212 </method>
11213
11214 <method name="uninitialize">
11215 <desc>
11216 Uninitializes (closes) this session. Used by VirtualBox to close
11217 the corresponding remote session when the direct session dies
11218 or gets closed.
11219
11220 <result name="VBOX_E_INVALID_VM_STATE">
11221 Session state prevents operation.
11222 </result>
11223
11224 </desc>
11225 </method>
11226
11227 <method name="onDVDDriveChange">
11228 <desc>
11229 Triggered when settings of the DVD drive object of the
11230 associated virtual machine have changed.
11231
11232 <result name="VBOX_E_INVALID_VM_STATE">
11233 Session state prevents operation.
11234 </result>
11235 <result name="VBOX_E_INVALID_OBJECT_STATE">
11236 Session type prevents operation.
11237 </result>
11238
11239 </desc>
11240 </method>
11241
11242 <method name="onFloppyDriveChange">
11243 <desc>
11244 Triggered when settings of the floppy drive object of the
11245 associated virtual machine have changed.
11246
11247 <result name="VBOX_E_INVALID_VM_STATE">
11248 Session state prevents operation.
11249 </result>
11250 <result name="VBOX_E_INVALID_OBJECT_STATE">
11251 Session type prevents operation.
11252 </result>
11253
11254 </desc>
11255 </method>
11256
11257 <method name="onNetworkAdapterChange">
11258 <desc>
11259 Triggered when settings of a network adapter of the
11260 associated virtual machine have changed.
11261
11262 <result name="VBOX_E_INVALID_VM_STATE">
11263 Session state prevents operation.
11264 </result>
11265 <result name="VBOX_E_INVALID_OBJECT_STATE">
11266 Session type prevents operation.
11267 </result>
11268
11269 </desc>
11270 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11271 </method>
11272
11273 <method name="onSerialPortChange">
11274 <desc>
11275 Triggered when settings of a serial port of the
11276 associated virtual machine have changed.
11277
11278 <result name="VBOX_E_INVALID_VM_STATE">
11279 Session state prevents operation.
11280 </result>
11281 <result name="VBOX_E_INVALID_OBJECT_STATE">
11282 Session type prevents operation.
11283 </result>
11284
11285 </desc>
11286 <param name="serialPort" type="ISerialPort" dir="in"/>
11287 </method>
11288
11289 <method name="onParallelPortChange">
11290 <desc>
11291 Triggered when settings of a parallel port of the
11292 associated virtual machine have changed.
11293
11294 <result name="VBOX_E_INVALID_VM_STATE">
11295 Session state prevents operation.
11296 </result>
11297 <result name="VBOX_E_INVALID_OBJECT_STATE">
11298 Session type prevents operation.
11299 </result>
11300
11301 </desc>
11302 <param name="parallelPort" type="IParallelPort" dir="in"/>
11303 </method>
11304
11305 <method name="onVRDPServerChange">
11306 <desc>
11307 Triggered when settings of the VRDP server object of the
11308 associated virtual machine have changed.
11309
11310 <result name="VBOX_E_INVALID_VM_STATE">
11311 Session state prevents operation.
11312 </result>
11313 <result name="VBOX_E_INVALID_OBJECT_STATE">
11314 Session type prevents operation.
11315 </result>
11316
11317 </desc>
11318 </method>
11319
11320 <method name="onUSBControllerChange">
11321 <desc>
11322 Triggered when settings of the USB controller object of the
11323 associated virtual machine have changed.
11324
11325 <result name="VBOX_E_INVALID_VM_STATE">
11326 Session state prevents operation.
11327 </result>
11328 <result name="VBOX_E_INVALID_OBJECT_STATE">
11329 Session type prevents operation.
11330 </result>
11331
11332 </desc>
11333 </method>
11334
11335 <method name="onSharedFolderChange">
11336 <desc>
11337 Triggered when a permanent (global or machine) shared folder has been
11338 created or removed.
11339 <note>
11340 We don't pass shared folder parameters in this notification because
11341 the order in which parallel notifications are delivered is not defined,
11342 therefore it could happen that these parameters were outdated by the
11343 time of processing this notification.
11344 </note>
11345
11346 <result name="VBOX_E_INVALID_VM_STATE">
11347 Session state prevents operation.
11348 </result>
11349 <result name="VBOX_E_INVALID_OBJECT_STATE">
11350 Session type prevents operation.
11351 </result>
11352
11353 </desc>
11354 <param name="global" type="boolean" dir="in"/>
11355 </method>
11356
11357 <method name="onUSBDeviceAttach">
11358 <desc>
11359 Triggered when a request to capture a USB device (as a result
11360 of matched USB filters or direct call to
11361 <link to="IConsole::attachUSBDevice"/>) has completed.
11362 A @c null @a error object means success, otherwise it
11363 describes a failure.
11364
11365 <result name="VBOX_E_INVALID_VM_STATE">
11366 Session state prevents operation.
11367 </result>
11368 <result name="VBOX_E_INVALID_OBJECT_STATE">
11369 Session type prevents operation.
11370 </result>
11371
11372 </desc>
11373 <param name="device" type="IUSBDevice" dir="in"/>
11374 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11375 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11376 </method>
11377
11378 <method name="onUSBDeviceDetach">
11379 <desc>
11380 Triggered when a request to release the USB device (as a result
11381 of machine termination or direct call to
11382 <link to="IConsole::detachUSBDevice"/>) has completed.
11383 A @c null @a error object means success, otherwise it
11384
11385 <result name="VBOX_E_INVALID_VM_STATE">
11386 Session state prevents operation.
11387 </result>
11388 <result name="VBOX_E_INVALID_OBJECT_STATE">
11389 Session type prevents operation.
11390 </result>
11391
11392 </desc>
11393 <param name="id" type="uuid" dir="in"/>
11394 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11395 </method>
11396
11397 <method name="onShowWindow">
11398 <desc>
11399 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11400 <link to="IMachine::showConsoleWindow()"/> in order to notify
11401 console callbacks
11402 <link to="IConsoleCallback::onCanShowWindow()"/>
11403 and <link to="IConsoleCallback::onShowWindow()"/>.
11404
11405 <result name="VBOX_E_INVALID_OBJECT_STATE">
11406 Session type prevents operation.
11407 </result>
11408
11409 </desc>
11410 <param name="check" type="boolean" dir="in"/>
11411 <param name="canShow" type="boolean" dir="out"/>
11412 <param name="winId" type="unsigned long long" dir="out"/>
11413 </method>
11414
11415 <method name="accessGuestProperty">
11416 <desc>
11417 Called by <link to="IMachine::getGuestProperty()"/> and by
11418 <link to="IMachine::setGuestProperty()"/> in order to read and
11419 modify guest properties.
11420
11421 <result name="VBOX_E_INVALID_VM_STATE">
11422 Machine session is not open.
11423 </result>
11424 <result name="VBOX_E_INVALID_OBJECT_STATE">
11425 Session type is not direct.
11426 </result>
11427
11428 </desc>
11429 <param name="name" type="wstring" dir="in"/>
11430 <param name="value" type="wstring" dir="in"/>
11431 <param name="flags" type="wstring" dir="in"/>
11432 <param name="isSetter" type="boolean" dir="in"/>
11433 <param name="retValue" type="wstring" dir="out"/>
11434 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11435 <param name="retFlags" type="wstring" dir="out"/>
11436 </method>
11437
11438 <method name="enumerateGuestProperties">
11439 <desc>
11440 Return a list of the guest properties matching a set of patterns along
11441 with their values, time stamps and flags.
11442
11443 <result name="VBOX_E_INVALID_VM_STATE">
11444 Machine session is not open.
11445 </result>
11446 <result name="VBOX_E_INVALID_OBJECT_STATE">
11447 Session type is not direct.
11448 </result>
11449
11450 </desc>
11451 <param name="patterns" type="wstring" dir="in">
11452 <desc>
11453 The patterns to match the properties against as a comma-separated
11454 string. If this is empty, all properties currently set will be
11455 returned.
11456 </desc>
11457 </param>
11458 <param name="key" type="wstring" dir="out" safearray="yes">
11459 <desc>
11460 The key names of the properties returned.
11461 </desc>
11462 </param>
11463 <param name="value" type="wstring" dir="out" safearray="yes">
11464 <desc>
11465 The values of the properties returned. The array entries match the
11466 corresponding entries in the @a key array.
11467 </desc>
11468 </param>
11469 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11470 <desc>
11471 The time stamps of the properties returned. The array entries match
11472 the corresponding entries in the @a key array.
11473 </desc>
11474 </param>
11475 <param name="flags" type="wstring" dir="out" safearray="yes">
11476 <desc>
11477 The flags of the properties returned. The array entries match the
11478 corresponding entries in the @a key array.
11479 </desc>
11480 </param>
11481 </method>
11482
11483 </interface>
11484
11485 <interface
11486 name="ISession" extends="$dispatched"
11487 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11488 wsmap="managed"
11489 >
11490 <desc>
11491 The ISession interface represents a serialization primitive for virtual
11492 machines.
11493
11494 With VirtualBox, every time one wishes to manipulate a virtual machine
11495 (e.g. change its settings or start execution), a session object is
11496 required. Such an object must be passed to one of the session methods
11497 that open the given session, which then initiates the machine manipulation.
11498
11499 A session serves several purposes: it identifies to the inter-process VirtualBox
11500 code which process is currently working with the virtual machine, and it ensures
11501 that there are no incompatible requests from several processes for the
11502 same virtual machine. Session objects can therefore be thought of as mutex
11503 semaphores that lock virtual machines to prevent conflicting accesses from
11504 several processes.
11505
11506 How sessions objects are used depends on whether you use the Main API
11507 via COM or via the webservice:
11508
11509 <ul>
11510 <li>When using the COM API directly, an object of the Session class from the
11511 VirtualBox type library needs to be created. In regular COM C++ client code,
11512 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
11513 This object will then act as a local session object in further calls to open
11514 a session.
11515 </li>
11516
11517 <li>In the webservice, the session manager (IWebsessionManager) instead creates
11518 one session object automatically when <link to="IWebsessionManager::logon" />
11519 is called. A managed object reference to that session object can be retrieved by
11520 calling <link to="IWebsessionManager::getSessionObject" />. This session object
11521 reference can then be used to open sessions.
11522 </li>
11523 </ul>
11524
11525 Sessions are mainly used in two variations:
11526
11527 <ul>
11528 <li>
11529 To start a virtual machine in a separate process, one would call
11530 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
11531 object as its first parameter. This session then identifies the caller
11532 and lets him control the started machine (for example, pause machine
11533 execution or power it down) as well as be notified about machine
11534 execution state changes.
11535 </li>
11536
11537 <li>To alter machine settings, or to start machine execution within the
11538 current process, one needs to open a direct session for the machine first by
11539 calling <link to="IVirtualBox::openSession"/>. While a direct session
11540 is open within one process, no any other process may open another direct
11541 session for the same machine. This prevents the machine from being changed
11542 by other processes while it is running or while the machine is being configured.
11543 </li>
11544 </ul>
11545
11546 One also can attach to an existing direct session already opened by
11547 another process (for example, in order to send a control request to the
11548 virtual machine such as the pause or the reset request). This is done by
11549 calling <link to="IVirtualBox::openExistingSession"/>.
11550
11551 <note>
11552 Unless you are trying to write a new VirtualBox front-end that
11553 performs direct machine execution (like the VirtualBox or VBoxSDL
11554 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
11555 session opened by <link to="IVirtualBox::openSession"/> and use this
11556 session only to change virtual machine settings. If you simply want to
11557 start virtual machine execution using one of the existing front-ends
11558 (for example the VirtualBox GUI or headless server), simply use
11559 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
11560 will power up the machine automatically for you.
11561 </note>
11562 </desc>
11563
11564 <attribute name="state" type="SessionState" readonly="yes">
11565 <desc>Current state of this session.</desc>
11566 </attribute>
11567
11568 <attribute name="type" type="SessionType" readonly="yes">
11569 <desc>
11570 Type of this session. The value of this attribute is valid only
11571 if the session is currently open (i.e. its #state is
11572 SessionType_SessionOpen), otherwise an error will be returned.
11573 </desc>
11574 </attribute>
11575
11576 <attribute name="machine" type="IMachine" readonly="yes">
11577 <desc>Machine object associated with this session.</desc>
11578 </attribute>
11579
11580 <attribute name="console" type="IConsole" readonly="yes">
11581 <desc>Console object associated with this session.</desc>
11582 </attribute>
11583
11584 <method name="close">
11585 <desc>
11586 Closes a session that was previously opened.
11587
11588 It is recommended that every time an "open session" method (such as
11589 <link to="IVirtualBox::openRemoteSession" /> or
11590 <link to="IVirtualBox::openSession" />) has been called to
11591 manipulate a virtual machine, the caller invoke
11592 ISession::close() when it's done doing so. Since sessions are
11593 serialization primitives much like ordinary mutexes, they are
11594 best used the same way: for each "open" call, there should be
11595 a matching "close" call, even when errors occur.
11596
11597 Otherwise, if a direct session for a machine opened with
11598 <link to="IVirtualBox::openSession()"/> is not explicitly closed
11599 when the application terminates, the state of the machine will
11600 be set to <link to="MachineState_Aborted" /> on the server.
11601
11602 Generally, it is recommended to close all open sessions explicitly
11603 before terminating the application (regardless of the reason for
11604 the termination).
11605
11606 <note>
11607 Do not expect the session state (<link to="ISession::state" />
11608 to return to "Closed" immediately after you invoke
11609 ISession::close(), particularly if you have started a remote
11610 session to execute the VM in a new process. The session state will
11611 automatically return to "Closed" once the VM is no longer executing,
11612 which can of course take a very long time.
11613 </note>
11614
11615 <result name="E_UNEXPECTED">
11616 Session is not open.
11617 </result>
11618
11619 </desc>
11620 </method>
11621
11622 </interface>
11623
11624 <!--
11625 // ISATAController
11626 /////////////////////////////////////////////////////////////////////////
11627 -->
11628
11629 <interface
11630 name="ISATAController" extends="$unknown"
11631 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
11632 wsmap="managed"
11633 >
11634 <attribute name="enabled" type="boolean">
11635 <desc>
11636 Flag whether the SATA controller is present in the
11637 guest system. If disabled, the virtual guest hardware will
11638 not contain any SATA controller. Can only be changed when
11639 the VM is powered off.
11640 </desc>
11641 </attribute>
11642
11643 <attribute name="portCount" type="unsigned long">
11644 <desc>
11645 The number of usable ports on the SATA controller.
11646 It ranges from 1 to 30.
11647 </desc>
11648 </attribute>
11649
11650 <method name="GetIDEEmulationPort">
11651 <desc>
11652 Gets the corresponding port number which is emulated as an IDE device.
11653
11654 <result name="E_INVALIDARG">
11655 The @a devicePosition is not in the range 0 to 3.
11656 </result>
11657
11658 </desc>
11659 <param name="devicePosition" type="long" dir="in"/>
11660 <param name="portNumber" type="long" dir="return"/>
11661 </method>
11662
11663 <method name="SetIDEEmulationPort">
11664 <desc>
11665 Sets the port number which is emulated as an IDE device.
11666
11667 <result name="E_INVALIDARG">
11668 The @a devicePosition is not in the range 0 to 3 or the
11669 @a portNumber is not in the range 0 to 29.
11670 </result>
11671
11672 </desc>
11673 <param name="devicePosition" type="long" dir="in"/>
11674 <param name="portNumber" type="long" dir="in"/>
11675 </method>
11676
11677 </interface>
11678
11679<if target="wsdl">
11680
11681 <!--
11682 // IManagedObjectRef
11683 /////////////////////////////////////////////////////////////////////////
11684 -->
11685
11686 <interface
11687 name="IManagedObjectRef" extends="$unknown"
11688 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
11689 internal="yes"
11690 wsmap="managed"
11691 wscpp="hardcoded"
11692 >
11693 <desc>
11694 Managed object reference.
11695
11696 Only within the webservice, a managed object reference (which is really
11697 an opaque number) allows a webservice client to address an object
11698 that lives in the address space of the webservice server.
11699
11700 Behind each managed object reference, there is a COM object that lives
11701 in the webservice server's address space. The COM object is not freed
11702 until the managed object reference is released, either by an explicit
11703 call to <link to="IManagedObjectRef::release" /> or by logging off from
11704 the webservice (<link to="IWebsessionManager::logoff" />), which releases
11705 all objects created during the webservice session.
11706
11707 Whenever a method call of the VirtualBox API returns a COM object, the
11708 webservice representation of that method will instead return a
11709 managed object reference, which can then be used to invoke methods
11710 on that object.
11711 </desc>
11712
11713 <method name="getInterfaceName">
11714 <desc>
11715 Returns the name of the interface that this managed object represents,
11716 for example, "IMachine", as a string.
11717 </desc>
11718 <param name="return" type="wstring" dir="return"/>
11719 </method>
11720
11721 <method name="release">
11722 <desc>
11723 Releases this managed object reference and frees the resources that
11724 were allocated for it in the webservice server process. After calling
11725 this method, the identifier of the reference can no longer be used.
11726 </desc>
11727 </method>
11728
11729 </interface>
11730
11731 <!--
11732 // IWebsessionManager
11733 /////////////////////////////////////////////////////////////////////////
11734 -->
11735
11736 <interface
11737 name="IWebsessionManager" extends="$unknown"
11738 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
11739 internal="yes"
11740 wsmap="global"
11741 wscpp="hardcoded"
11742 >
11743 <desc>
11744 Websession manager. This provides essential services
11745 to webservice clients.
11746 </desc>
11747 <method name="logon">
11748 <desc>
11749 Logs a new client onto the webservice and returns a managed object reference to
11750 the IVirtualBox instance, which the client can then use as a basis to further
11751 queries, since all calls to the VirtualBox API are based on the IVirtualBox
11752 interface, in one way or the other.
11753 </desc>
11754 <param name="username" type="wstring" dir="in"/>
11755 <param name="password" type="wstring" dir="in"/>
11756 <param name="return" type="IVirtualBox" dir="return"/>
11757 </method>
11758
11759 <method name="getSessionObject">
11760 <desc>
11761 Returns a managed object reference to the internal ISession object that was created
11762 for this web service session when the client logged on.
11763
11764 <see>ISession</see>
11765 </desc>
11766 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11767 <param name="return" type="ISession" dir="return"/>
11768 </method>
11769
11770 <method name="logoff">
11771 <desc>
11772 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
11773 and destroys all resources associated with the session (most importantly, all
11774 managed objects created in the server while the session was active).
11775 </desc>
11776 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
11777 </method>
11778
11779 </interface>
11780
11781</if>
11782
11783 <!--
11784 // IPerformanceCollector & friends
11785 /////////////////////////////////////////////////////////////////////////
11786 -->
11787
11788 <interface
11789 name="IPerformanceMetric" extends="$unknown"
11790 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
11791 >
11792 <desc>
11793 The IPerformanceMetric interface represents parameters of the given
11794 performance metric.
11795 </desc>
11796
11797 <attribute name="metricName" type="wstring" readonly="yes">
11798 <desc>
11799 Name of the metric.
11800 </desc>
11801 </attribute>
11802
11803 <attribute name="object" type="$unknown" readonly="yes">
11804 <desc>
11805 Object this metric belongs to.
11806 </desc>
11807 </attribute>
11808
11809 <attribute name="description" type="wstring" readonly="yes">
11810 <desc>
11811 Textual description of the metric.
11812 </desc>
11813 </attribute>
11814
11815 <attribute name="period" type="unsigned long" readonly="yes">
11816 <desc>
11817 Time interval between samples, measured in seconds.
11818 </desc>
11819 </attribute>
11820
11821 <attribute name="count" type="unsigned long" readonly="yes">
11822 <desc>
11823 Number of recent samples retained by the performance collector for this
11824 metric.
11825
11826 When the collected sample count exceeds this number, older samples
11827 are discarded.
11828 </desc>
11829 </attribute>
11830
11831 <attribute name="unit" type="wstring" readonly="yes">
11832 <desc>
11833 Unit of measurement.
11834 </desc>
11835 </attribute>
11836
11837 <attribute name="minimumValue" type="long" readonly="yes">
11838 <desc>
11839 Minimum possible value of this metric.
11840 </desc>
11841 </attribute>
11842
11843 <attribute name="maximumValue" type="long" readonly="yes">
11844 <desc>
11845 Maximum possible value of this metric.
11846 </desc>
11847 </attribute>
11848 </interface>
11849
11850 <interface
11851 name="IPerformanceCollector" extends="$unknown"
11852 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
11853 wsmap="managed"
11854 >
11855 <desc>
11856 The IPerformanceCollector interface represents a service that collects and
11857 stores performance metrics data.
11858
11859 Performance metrics are associated with objects like IHost and
11860 IMachine. Each object has a distinct set of performance metrics.
11861 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
11862
11863 Metric data are collected at the specified intervals and are retained
11864 internally. The interval and the number of samples retained can be set
11865 with <link to="IPerformanceCollector::setupMetrics" />.
11866
11867 Metrics are organized hierarchically, each level separated by slash (/).
11868 General scheme for metric name is
11869 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
11870 metric name stands for: CPU category, Load metric, User submetric, average
11871 aggregate. An aggregate function is computed over all retained data. Valid
11872 aggregate functions are:
11873
11874 <ul>
11875 <li>avg -- average</li>
11876 <li>min -- minimum</li>
11877 <li>max -- maximum</li>
11878 </ul>
11879
11880 "Category/Metric" together form base metric name. A base metric is the
11881 smallest unit for which a sampling interval and the number of retained
11882 samples can be set. Only base metrics can be enabled and disabled. All
11883 sub-metrics are collected when their base metric is collected.
11884 Collected values for any set of sub-metrics can be queried with
11885 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
11886 metric parameters, querying metric data, enabling or disabling metrics
11887 wildcards can be used in metric names to specify a subset of metrics. For
11888 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
11889 averages can be queried using <tt>*:avg</tt> and so on. To query metric
11890 values without aggregates <tt>*:</tt> can be used.
11891
11892 The valid names for base metrics are:
11893
11894 <ul>
11895 <li>CPU/Load</li>
11896 <li>CPU/MHz</li>
11897 <li>RAM/Usage</li>
11898 </ul>
11899
11900 The general sequence for collecting and retrieving the metrics is:
11901 <ul>
11902 <li>
11903 Obtain an instance of IPerformanceCollector with
11904 <link to="IVirtualBox::performanceCollector" />
11905 </li>
11906 <li>
11907 Allocate and populate an array with references to objects the metrics
11908 will be collected for. Use references to IHost and IMachine objects.
11909 </li>
11910 <li>
11911 Allocate and populate an array with base metric names the data will be
11912 collected for.
11913 </li>
11914 <li>
11915 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
11916 metric data will be collected and stored.
11917 </li>
11918 <li>
11919 Wait for the data to get collected.
11920 </li>
11921 <li>
11922 Allocate and populate an array with references to objects the metric
11923 values will be queried for. You can re-use the object array used for
11924 setting base metrics.
11925 </li>
11926 <li>
11927 Allocate and populate an array with metric names the data will be
11928 collected for. Note that metric names differ from base metric names.
11929 </li>
11930 <li>
11931 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
11932 have been collected so far are returned. Note that the values are still
11933 retained internally and data collection continues.
11934 </li>
11935 </ul>
11936
11937 For an example of usage refer to the following files in VirtualBox SDK:
11938 <ul>
11939 <li>
11940 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
11941 </li>
11942 <li>
11943 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
11944 </li>
11945 </ul>
11946 </desc>
11947
11948 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
11949 <desc>
11950 Array of unique names of metrics.
11951
11952 This array represents all metrics supported by the performance
11953 collector. Individual objects do not necessarily support all of them.
11954 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
11955 list of supported metrics for a particular object.
11956 </desc>
11957 </attribute>
11958
11959 <method name="getMetrics">
11960 <desc>
11961 Returns parameters of specified metrics for a set of objects.
11962 <note>
11963 @c Null metrics array means all metrics. @c Null object array means
11964 all existing objects.
11965 </note>
11966 </desc>
11967 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11968 <desc>
11969 Metric name filter. Currently, only a comma-separated list of metrics
11970 is supported.
11971 </desc>
11972 </param>
11973 <param name="objects" type="$unknown" dir="in" safearray="yes">
11974 <desc>
11975 Set of objects to return metric parameters for.
11976 </desc>
11977 </param>
11978 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
11979 <desc>
11980 Array of returned metric parameters.
11981 </desc>
11982 </param>
11983 </method>
11984
11985 <method name="setupMetrics">
11986 <desc>
11987 Sets parameters of specified base metrics for a set of objects. Returns
11988 an array of <link to="IPerformanceMetric" /> describing the metrics have
11989 been affected.
11990 <note>
11991 @c Null or empty metric name array means all metrics. @c Null or empty
11992 object array means all existing objects. If metric name array contains
11993 a single element and object array contains many, the single metric
11994 name array element is applied to each object array element to form
11995 metric/object pairs.
11996 </note>
11997 </desc>
11998 <param name="metricNames" type="wstring" dir="in" safearray="yes">
11999 <desc>
12000 Metric name filter. Comma-separated list of metrics with wildcard
12001 support.
12002 </desc>
12003 </param>
12004 <param name="objects" type="$unknown" dir="in" safearray="yes">
12005 <desc>
12006 Set of objects to setup metric parameters for.
12007 </desc>
12008 </param>
12009 <param name="period" type="unsigned long" dir="in">
12010 <desc>
12011 Time interval in seconds between two consecutive samples of performance
12012 data.
12013 </desc>
12014 </param>
12015 <param name="count" type="unsigned long" dir="in">
12016 <desc>
12017 Number of samples to retain in performance data history. Older samples
12018 get discarded.
12019 </desc>
12020 </param>
12021 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12022 <desc>
12023 Array of metrics that have been modified by the call to this method.
12024 </desc>
12025 </param>
12026 </method>
12027
12028 <method name="enableMetrics">
12029 <desc>
12030 Turns on collecting specified base metrics. Returns an array of
12031 <link to="IPerformanceMetric" /> describing the metrics have been
12032 affected.
12033 <note>
12034 @c Null or empty metric name array means all metrics. @c Null or empty
12035 object array means all existing objects. If metric name array contains
12036 a single element and object array contains many, the single metric
12037 name array element is applied to each object array element to form
12038 metric/object pairs.
12039 </note>
12040 </desc>
12041 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12042 <desc>
12043 Metric name filter. Comma-separated list of metrics with wildcard
12044 support.
12045 </desc>
12046 </param>
12047 <param name="objects" type="$unknown" dir="in" safearray="yes">
12048 <desc>
12049 Set of objects to enable metrics for.
12050 </desc>
12051 </param>
12052 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12053 <desc>
12054 Array of metrics that have been modified by the call to this method.
12055 </desc>
12056 </param>
12057 </method>
12058
12059 <method name="disableMetrics">
12060 <desc>
12061 Turns off collecting specified base metrics. Returns an array of
12062 <link to="IPerformanceMetric" /> describing the metrics have been
12063 affected.
12064 <note>
12065 @c Null or empty metric name array means all metrics. @c Null or empty
12066 object array means all existing objects. If metric name array contains
12067 a single element and object array contains many, the single metric
12068 name array element is applied to each object array element to form
12069 metric/object pairs.
12070 </note>
12071 </desc>
12072 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12073 <desc>
12074 Metric name filter. Comma-separated list of metrics with wildcard
12075 support.
12076 </desc>
12077 </param>
12078 <param name="objects" type="$unknown" dir="in" safearray="yes">
12079 <desc>
12080 Set of objects to disable metrics for.
12081 </desc>
12082 </param>
12083 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12084 <desc>
12085 Array of metrics that have been modified by the call to this method.
12086 </desc>
12087 </param>
12088 </method>
12089
12090 <method name="queryMetricsData">
12091 <desc>
12092 Queries collected metrics data for a set of objects.
12093
12094 The data itself and related metric information are returned in seven
12095 parallel and one flattened array of arrays. Elements of
12096 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12097 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12098 the same index describe one set of values corresponding to a single
12099 metric.
12100
12101 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12102 start and length of a sub-array is indicated by
12103 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12104 value for metric <tt>metricNames[i]</tt> is at
12105 <tt>returnData[returnIndices[i]]</tt>.
12106
12107 <note>
12108 @c Null or empty metric name array means all metrics. @c Null or empty
12109 object array means all existing objects. If metric name array contains
12110 a single element and object array contains many, the single metric
12111 name array element is applied to each object array element to form
12112 metric/object pairs.
12113 </note>
12114 <note>
12115 Data collection continues behind the scenes after call to @c
12116 queryMetricsData. The return data can be seen as the snapshot of
12117 the current state at the time of @c queryMetricsData call. The
12118 internally kept metric values are not cleared by the call. This makes
12119 possible querying different subsets of metrics or aggregates with
12120 subsequent calls. If periodic querying is needed it is highly
12121 suggested to query the values with @c interval*count period to avoid
12122 confusion. This way a completely new set of data values will be
12123 provided by each query.
12124 </note>
12125 </desc>
12126 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12127 <desc>
12128 Metric name filter. Comma-separated list of metrics with wildcard
12129 support.
12130 </desc>
12131 </param>
12132 <param name="objects" type="$unknown" dir="in" safearray="yes">
12133 <desc>
12134 Set of objects to query metrics for.
12135 </desc>
12136 </param>
12137 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12138 <desc>
12139 Names of metrics returned in @c returnData.
12140 </desc>
12141 </param>
12142 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12143 <desc>
12144 Objects associated with metrics returned in @c returnData.
12145 </desc>
12146 </param>
12147 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12148 <desc>
12149 Units of measurement for each returned metric.
12150 </desc>
12151 </param>
12152 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12153 <desc>
12154 Divisor that should be applied to return values in order to get
12155 floating point values. For example:
12156 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12157 will retrieve the floating point value of i-th sample of the first
12158 metric.
12159 </desc>
12160 </param>
12161 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12162 <desc>
12163 Sequence numbers of the first elements of value sequences of particular metrics
12164 returned in @c returnData. For aggregate metrics it is the sequence number of
12165 the sample the aggregate started calculation from.
12166 </desc>
12167 </param>
12168 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12169 <desc>
12170 Indices of the first elements of value sequences of particular metrics
12171 returned in @c returnData.
12172 </desc>
12173 </param>
12174 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12175 <desc>
12176 Lengths of value sequences of particular metrics.
12177 </desc>
12178 </param>
12179 <param name="returnData" type="long" dir="return" safearray="yes">
12180 <desc>
12181 Flattened array of all metric data containing sequences of values for
12182 each metric.
12183 </desc>
12184 </param>
12185 </method>
12186
12187 </interface>
12188
12189 <module name="VBoxSVC" context="LocalServer">
12190 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12191 namespace="virtualbox.org">
12192 <interface name="IVirtualBox" default="yes"/>
12193 </class>
12194 </module>
12195
12196 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12197 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12198 namespace="virtualbox.org">
12199 <interface name="ISession" default="yes"/>
12200 </class>
12201 </module>
12202
12203</library>
12204
12205</idl>
12206
12207<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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