VirtualBox

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

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

OVF: bring back string references; look up controllers by array item index, not internal refid; fix image config

  • Property svn:eol-style set to native
File size: 467.5 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2008 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the<tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="MachineState"
363 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
364 >
365 <desc>
366 Virtual machine execution state.
367
368 This enumeration represents possible values of the <link
369 to="IMachine::state"/> attribute.
370
371 Below is the basic virtual machine state diagram. It shows how the state
372 changes during virtual machine execution. The text in square braces shows
373 a method of the IConsole interface that performs the given state
374 transition.
375
376 <pre>
377 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
378 V |
379 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
380 | | | | V |
381 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
382 | | ^ | ^ |
383 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
384 | ^ | | | |
385 | | +-----------------------------------------+-|-------------------+ +
386 | | | | |
387 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
388 | | | |
389 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
390 | | |
391 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
392 </pre>
393
394 Note that states to the right from PoweredOff, Aborted and Saved in the
395 above diagram are called <i>online VM states</i>. These states
396 represent the virtual machine which is being executed in a dedicated
397 process (usually with a GUI window attached to it where you can see the
398 activity of the virtual machine and interact with it). There are two
399 special pseudo-states, FirstOnline and LastOnline, that can be used in
400 relational expressions to detect if the given machine state is online or
401 not:
402
403 <pre>
404 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
405 machine.GetState() &lt;= MachineState_LastOnline)
406 {
407 ...the machine is being executed...
408 }
409 </pre>
410
411 When the virtual machine is in one of the online VM states (that is, being
412 executed), only a few machine settings can be modified. Methods working
413 with such settings contain an explicit note about that. An attempt to
414 change any oter setting or perform a modifying operation during this time
415 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
416
417 All online states except Running, Paused and Stuck are transitional: they
418 represent temporary conditions of the virtual machine that will last as
419 long as the operation that initiated such a condition.
420
421 The Stuck state is a special case. It means that execution of the machine
422 has reached the "Guru Meditation" condition. This condition indicates an
423 internal VMM (virtual machine manager) failure which may happen as a
424 result of either an unhandled low-level virtual hardware exception or one
425 of the recompiler exceptions (such as the <i>too-many-traps</i>
426 condition).
427
428 Note also that any online VM state may transit to the Aborted state. This
429 happens if the process that is executing the virtual machine terminates
430 unexpectedly (for example, crashes). Other than that, the Aborted state is
431 equivalent to PoweredOff.
432
433 There are also a few additional state diagrams that do not deal with
434 virtual machine execution and therefore are shown separately. The states
435 shown on these diagrams are called <i>offline VM states</i> (this includes
436 PoweredOff, Aborted and Saved too).
437
438 The first diagram shows what happens when a lengthy setup operation is
439 being executed (such as <link to="IMachine::attachHardDisk2()"/>).
440
441 <pre>
442 +-----------------------------------(same sate as before the call)------+
443 | |
444 +-&gt; PoweredOff --+ |
445 | | |
446 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
447 | |
448 +-&gt; Saved -------+
449 </pre>
450
451 The next two diagrams demonstrate the process of taking a snapshot of a
452 powered off virtual machine and performing one of the "discard..."
453 operations, respectively.
454
455 <pre>
456 +-----------------------------------(same sate as before the call)------+
457 | |
458 +-&gt; PoweredOff --+ |
459 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
460 +-&gt; Aborted -----+
461
462 +-&gt; PoweredOff --+
463 | |
464 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
465 | | [discardCurrentState()] |
466 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
467 | |
468 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
469 </pre>
470
471 Note that the Saving state is present in both the offline state group and
472 online state group. Currently, the only way to determine what group is
473 assumed in a particular case is to remember the previous machine state: if
474 it was Running or Paused, then Saving is an online state, otherwise it is
475 an offline state. This inconsistency may be removed in one of the future
476 versions of VirtualBox by adding a new state.
477
478 <note internal="yes">
479 For whoever decides to touch this enum: In order to keep the
480 comparisons involving FirstOnline and LastOnline pseudo-states valid,
481 the numeric values of these states must be correspondingly updated if
482 needed: for any online VM state, the condition
483 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
484 <tt>true</tt>. The same relates to transient states for which
485 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
486 <tt>true</tt>.
487 </note>
488 </desc>
489
490 <const name="Null" value="0">
491 <desc>Null value (nver used by the API).</desc>
492 </const>
493 <const name="PoweredOff" value="1">
494 <desc>
495 The machine is not running.
496 </desc>
497 </const>
498 <const name="Saved" value="2">
499 <desc>
500 The machine is not currently running, but the execution state of the machine
501 has been saved to an external file when it was running.
502 </desc>
503 </const>
504 <const name="Aborted" value="3">
505 <desc>
506 The process running the machine has terminated abnormally.
507 </desc>
508 </const>
509 <const name="Running" value="4">
510 <desc>
511 The machine is currently being executed.
512 <note internal="yes">
513 For whoever decides to touch this enum: In order to keep the
514 comparisons in the old source code valid, this state must immediately
515 precede the Paused state.
516 </note>
517 </desc>
518 </const>
519 <const name="Paused" value="5">
520 <desc>
521 Execution of the machine has been paused.
522 <note internal="yes">
523 For whoever decides to touch this enum: In order to keep the
524 comparisons in the old source code valid, this state must immediately
525 follow the Running state.
526 </note>
527 </desc>
528 </const>
529 <const name="Stuck" value="6">
530 <desc>
531 Execution of the machine has reached the "Guru Meditation"
532 condition.
533 </desc>
534 </const>
535 <const name="Starting" value="7">
536 <desc>
537 Machine is being started after powering it on from a
538 zero execution state.
539 </desc>
540 </const>
541 <const name="Stopping" value="8">
542 <desc>
543 Machine is being normally stopped powering it off, or after the guest OS
544 has initiated a shutdown sequence.
545 </desc>
546 </const>
547 <const name="Saving" value="9">
548 <desc>
549 Machine is saving its execution state to a file or an online
550 snapshot of the machine is being taken.
551 </desc>
552 </const>
553 <const name="Restoring" value="10">
554 <desc>
555 Execution state of the machine is being restored from a file
556 after powering it on from the saved execution state.
557 </desc>
558 </const>
559 <const name="Discarding" value="11">
560 <desc>
561 Snapshot of the machine is being discarded.
562 </desc>
563 </const>
564 <const name="SettingUp" value="12">
565 <desc>
566 Lengthy setup operation is in progress.
567 </desc>
568 </const>
569
570 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
571 <desc>
572 Pseudo-state: first online state (for use in relational expressions).
573 </desc>
574 </const>
575 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
576 <desc>
577 Pseudo-state: last online state (for use in relational expressions).
578 </desc>
579 </const>
580
581 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
582 <desc>
583 Pseudo-state: first transient state (for use in relational expressions).
584 </desc>
585 </const>
586 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
587 <desc>
588 Pseudo-state: last transient state (for use in relational expressions).
589 </desc>
590 </const>
591
592 </enum>
593
594 <enum
595 name="SessionState"
596 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
597 >
598 <desc>
599 Session state. This enumeration represents possible values of
600 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
601 attributes. See individual enumerator descriptions for the meaning for
602 every value.
603 </desc>
604
605 <const name="Null" value="0">
606 <desc>Null value (never used by the API).</desc>
607 </const>
608 <const name="Closed" value="1">
609 <desc>
610 The machine has no open sessions (<link to="IMachine::sessionState"/>);
611 the session is closed (<link to="ISession::state"/>)
612 </desc>
613 </const>
614 <const name="Open" value="2">
615 <desc>
616 The machine has an open direct session (<link to="IMachine::sessionState"/>);
617 the session is open (<link to="ISession::state"/>)
618 </desc>
619 </const>
620 <const name="Spawning" value="3">
621 <desc>
622 A new (direct) session is being opened for the machine
623 as a result of <link to="IVirtualBox::openRemoteSession()"/>
624 call (<link to="IMachine::sessionState"/>);
625 the session is currently being opened
626 as a result of <link to="IVirtualBox::openRemoteSession()"/>
627 call (<link to="ISession::state"/>)
628 </desc>
629 </const>
630 <const name="Closing" value="4">
631 <desc>
632 The direct session is being closed (<link to="IMachine::sessionState"/>);
633 the session is being closed (<link to="ISession::state"/>)
634 </desc>
635 </const>
636 </enum>
637
638 <enum
639 name="SessionType"
640 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
641 >
642 <desc>
643 Session type. This enumeration represents possible values of the
644 <link to="ISession::type"/> attribute.
645 </desc>
646
647 <const name="Null" value="0">
648 <desc>Null value (never used by the API).</desc>
649 </const>
650 <const name="Direct" value="1">
651 <desc>
652 Direct session
653 (opened by <link to="IVirtualBox::openSession()"/>)
654 </desc>
655 </const>
656 <const name="Remote" value="2">
657 <desc>
658 Remote session
659 (opened by <link to="IVirtualBox::openRemoteSession()"/>)
660 </desc>
661 </const>
662 <const name="Existing" value="3">
663 <desc>
664 Existing session
665 (opened by <link to="IVirtualBox::openExistingSession()"/>)
666 </desc>
667 </const>
668 </enum>
669
670 <enum
671 name="DeviceType"
672 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
673 >
674 <desc>
675 Device type.
676 </desc>
677 <const name="Null" value="0">
678 <desc>
679 Null value, may also mean "no device" (not allowed for
680 <link to="IConsole::getDeviceActivity"/>).
681 </desc>
682 </const>
683 <const name="Floppy" value="1">
684 <desc>Floppy device.</desc>
685 </const>
686 <const name="DVD" value="2">
687 <desc>CD/DVD-ROM device.</desc>
688 </const>
689 <const name="HardDisk" value="3">
690 <desc>Hard disk device.</desc>
691 </const>
692 <const name="Network" value="4">
693 <desc>Network device.</desc>
694 </const>
695 <const name="USB" value="5">
696 <desc>USB device.</desc>
697 </const>
698 <const name="SharedFolder" value="6">
699 <desc>Shared folder device.</desc>
700 </const>
701 </enum>
702
703 <enum
704 name="DeviceActivity"
705 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
706 >
707 <desc>
708 Device activity for <link to="IConsole::getDeviceActivity"/>.
709 </desc>
710
711 <const name="Null" value="0"/>
712 <const name="Idle" value="1"/>
713 <const name="Reading" value="2"/>
714 <const name="Writing" value="3"/>
715 </enum>
716
717 <enum
718 name="StorageBus"
719 uuid="715984a5-093c-43bb-aa42-a16ed16828dd"
720 >
721 <desc>Interface bus type for storage devices.</desc>
722
723 <const name="Null" value="0">
724 <desc>Null value (never used by the API).</desc>
725 </const>
726
727 <const name="IDE" value="1"/>
728 <const name="SATA" value="2"/>
729 </enum>
730
731 <enum
732 name="ClipboardMode"
733 uuid="33364716-4008-4701-8f14-be0fa3d62950"
734 >
735 <desc>
736 Host-Guest clipboard interchange mode.
737 </desc>
738
739 <const name="Disabled" value="0"/>
740 <const name="HostToGuest" value="1"/>
741 <const name="GuestToHost" value="2"/>
742 <const name="Bidirectional" value="3"/>
743 </enum>
744
745 <enum
746 name="Scope"
747 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
748 >
749 <desc>
750 Scope of the operation.
751
752 A generic enumeration used in various methods to define the action or
753 argument scope.
754 </desc>
755
756 <const name="Global" value="0"/>
757 <const name="Machine" value="1"/>
758 <const name="Session" value="2"/>
759 </enum>
760
761 <enum
762 name="GuestStatisticType"
763 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
764 >
765 <desc>
766 Statistics type for <link to="IGuest::getStatistic"/>.
767 </desc>
768
769 <const name="CPULoad_Idle" value="0">
770 <desc>
771 Idle CPU load (0-100%) for last interval.
772 </desc>
773 </const>
774 <const name="CPULoad_Kernel" value="1">
775 <desc>
776 Kernel CPU load (0-100%) for last interval.
777 </desc>
778 </const>
779 <const name="CPULoad_User" value="2">
780 <desc>
781 User CPU load (0-100%) for last interval.
782 </desc>
783 </const>
784 <const name="Threads" value="3">
785 <desc>
786 Total number of threads in the system.
787 </desc>
788 </const>
789 <const name="Processes" value="4">
790 <desc>
791 Total number of processes in the system.
792 </desc>
793 </const>
794 <const name="Handles" value="5">
795 <desc>
796 Total number of handles in the system.
797 </desc>
798 </const>
799 <const name="MemoryLoad" value="6">
800 <desc>
801 Memory load (0-100%).
802 </desc>
803 </const>
804 <const name="PhysMemTotal" value="7">
805 <desc>
806 Total physical memory in megabytes.
807 </desc>
808 </const>
809 <const name="PhysMemAvailable" value="8">
810 <desc>
811 Free physical memory in megabytes.
812 </desc>
813 </const>
814 <const name="PhysMemBalloon" value="9">
815 <desc>
816 Ballooned physical memory in megabytes.
817 </desc>
818 </const>
819 <const name="MemCommitTotal" value="10">
820 <desc>
821 Total amount of memory in the committed state in megabytes.
822 </desc>
823 </const>
824 <const name="MemKernelTotal" value="11">
825 <desc>
826 Total amount of memory used by the guest OS's kernel in megabytes.
827 </desc>
828 </const>
829 <const name="MemKernelPaged" value="12">
830 <desc>
831 Total amount of paged memory used by the guest OS's kernel in megabytes.
832 </desc>
833 </const>
834 <const name="MemKernelNonpaged" value="13">
835 <desc>
836 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
837 </desc>
838 </const>
839 <const name="MemSystemCache" value="14">
840 <desc>
841 Total amount of memory used by the guest OS's system cache in megabytes.
842 </desc>
843 </const>
844 <const name="PageFileSize" value="15">
845 <desc>
846 Pagefile size in megabytes.
847 </desc>
848 </const>
849 <const name="SampleNumber" value="16">
850 <desc>
851 Statistics sample number
852 </desc>
853 </const>
854 <const name="MaxVal" value="17"/>
855 </enum>
856
857 <enum
858 name="BIOSBootMenuMode"
859 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
860 >
861 <desc>
862 BIOS boot menu mode.
863 </desc>
864
865 <const name="Disabled" value="0"/>
866 <const name="MenuOnly" value="1"/>
867 <const name="MessageAndMenu" value="2"/>
868 </enum>
869
870 <enum
871 name="IDEControllerType"
872 uuid="445330e3-202a-4dab-854f-ce22e6cb9715"
873 >
874 <desc>
875 IDE controller type.
876 </desc>
877
878 <const name="Null" value="0">
879 <desc>Null value (never used by the API).</desc>
880 </const>
881 <const name="PIIX3" value="1"/>
882 <const name="PIIX4" value="2"/>
883 </enum>
884
885 <enum
886 name="DriveState"
887 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
888 >
889 <const name="Null" value="0">
890 <desc>Null value (never used by the API).</desc>
891 </const>
892 <const name="NotMounted" value="1"/>
893 <const name="ImageMounted" value="2"/>
894 <const name="HostDriveCaptured" value="3"/>
895 </enum>
896
897 <enum
898 name="ProcessorFeature"
899 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
900 >
901 <desc>
902 CPU features.
903 </desc>
904
905 <const name="HWVirtEx" value="0"/>
906 <const name="PAE" value="1"/>
907 <const name="LongMode" value="2"/>
908 </enum>
909
910
911 <!--
912 // IVirtualBoxErrorInfo
913 /////////////////////////////////////////////////////////////////////////
914 -->
915
916 <interface
917 name="IVirtualBoxErrorInfo" extends="$errorinfo"
918 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
919 supportsErrorInfo="no"
920 wsmap="suppress"
921 >
922 <desc>
923 The IVirtualBoxErrorInfo interface represents extended error information.
924
925 Extended error information can be set by VirtualBox components after
926 unsuccessful or partially successful method invocation. This information
927 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
928 and then shown to the client in addition to the plain 32-bit result code.
929
930 In MS COM, this interface extends the IErrorInfo interface,
931 in XPCOM, it extends the nsIException interface. In both cases,
932 it provides a set of common attributes to retrieve error
933 information.
934
935 Sometimes invocation of some component's method may involve methods of
936 other components that may also fail (independently of this method's
937 failure), or a series of non-fatal errors may precede a fatal error that
938 causes method failure. In cases like that, it may be desirable to preserve
939 information about all errors happened during method invocation and deliver
940 it to the caller. The <link to="#next"/> attribute is intended
941 specifically for this purpose and allows to represent a chain of errors
942 through a single IVirtualBoxErrorInfo object set after method invocation.
943
944 Note that errors are stored to a chain in the reverse order, i.e. the
945 initial error object you query right after method invocation is the last
946 error set by the callee, the object it points to in the @a next attribute
947 is the previous error and so on, up to the first error (which is the last
948 in the chain).
949 </desc>
950
951 <attribute name="resultCode" type="result" readonly="yes">
952 <desc>
953 Result code of the error.
954 Usually, it will be the same as the result code returned
955 by the method that provided this error information, but not
956 always. For example, on Win32, CoCreateInstance() will most
957 likely return E_NOINTERFACE upon unsuccessful component
958 instantiation attempt, but not the value the component factory
959 returned.
960 <note>
961 In MS COM, there is no equivalent.
962 In XPCOM, it is the same as nsIException::result.
963 </note>
964 </desc>
965 </attribute>
966
967 <attribute name="interfaceID" type="uuid" readonly="yes">
968 <desc>
969 UUID of the interface that defined the error.
970 <note>
971 In MS COM, it is the same as IErrorInfo::GetGUID.
972 In XPCOM, there is no equivalent.
973 </note>
974 </desc>
975 </attribute>
976
977 <attribute name="component" type="wstring" readonly="yes">
978 <desc>
979 Name of the component that generated the error.
980 <note>
981 In MS COM, it is the same as IErrorInfo::GetSource.
982 In XPCOM, there is no equivalent.
983 </note>
984 </desc>
985 </attribute>
986
987 <attribute name="text" type="wstring" readonly="yes">
988 <desc>
989 Text description of the error.
990 <note>
991 In MS COM, it is the same as IErrorInfo::GetDescription.
992 In XPCOM, it is the same as nsIException::message.
993 </note>
994 </desc>
995 </attribute>
996
997 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
998 <desc>
999 Next error object if there is any, or @c null otherwise.
1000 <note>
1001 In MS COM, there is no equivalent.
1002 In XPCOM, it is the same as nsIException::inner.
1003 </note>
1004 </desc>
1005 </attribute>
1006
1007 </interface>
1008
1009
1010 <!--
1011 // IVirtualBox
1012 /////////////////////////////////////////////////////////////////////////
1013 -->
1014
1015 <interface
1016 name="IVirtualBoxCallback" extends="$unknown"
1017 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1018 wsmap="suppress"
1019 >
1020 <method name="onMachineStateChange">
1021 <desc>
1022 The execution state of the given machine has changed.
1023 <see>IMachine::state</see>
1024 </desc>
1025 <param name="machineId" type="uuid" dir="in">
1026 <desc>ID of the machine this event relates to.</desc>
1027 </param>
1028 <param name="state" type="MachineState" dir="in">
1029 <desc>New execution state.</desc>
1030 </param>
1031 </method>
1032
1033 <method name="onMachineDataChange">
1034 <desc>
1035 Any of the settings of the given machine has changed.
1036 </desc>
1037 <param name="machineId" type="uuid" dir="in">
1038 <desc>ID of the machine this event relates to.</desc>
1039 </param>
1040 </method>
1041
1042 <method name="onExtraDataCanChange">
1043 <desc>
1044 Notification when someone tries to change extra data for
1045 either the given machine or (if null) global extra data.
1046 This gives the chance to veto against changes.
1047 </desc>
1048 <param name="machineId" type="uuid" dir="in">
1049 <desc>
1050 ID of the machine this event relates to
1051 (null ID for global extra data change requests).
1052 </desc>
1053 </param>
1054 <param name="key" type="wstring" dir="in">
1055 <desc>
1056 Extra data key for the attempted write.
1057 </desc>
1058 </param>
1059 <param name="value" type="wstring" dir="in">
1060 <desc>
1061 Extra data value for the given key.
1062 </desc>
1063 </param>
1064 <param name="error" type="wstring" dir="out">
1065 <desc>
1066 Optional error message describing the reason of the
1067 veto (ignored if this notification returns @c true).
1068 </desc>
1069 </param>
1070 <param name="allowChange" type="boolean" dir="return">
1071 <desc>
1072 Flag to indicate whether the callee agrees (@c true)
1073 or vetoes against the change (@c false).
1074 </desc>
1075 </param>
1076 </method>
1077
1078 <method name="onExtraDataChange">
1079 <desc>
1080 Notification when machine specific or global extra data
1081 has changed.
1082 </desc>
1083 <param name="machineId" type="uuid" dir="in">
1084 <desc>
1085 ID of the machine this event relates to.
1086 Null for global extra data changes.
1087 </desc>
1088 </param>
1089 <param name="key" type="wstring" dir="in">
1090 <desc>
1091 Extra data key that has changed.
1092 </desc>
1093 </param>
1094 <param name="value" type="wstring" dir="in">
1095 <desc>
1096 Extra data value for the given key.
1097 </desc>
1098 </param>
1099 </method>
1100
1101 <method name="onMediaRegistered">
1102 <desc>
1103 The given media was registered or unregistered
1104 within this VirtualBox installation.
1105
1106 The @a mediaType parameter describes what type of
1107 media the specified @a mediaId refers to. Possible
1108 values are:
1109
1110 <ul>
1111 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1112 that, if registered, can be obtained using the
1113 <link to="IVirtualBox::getHardDisk2()"/> call.</li>
1114 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1115 that, if registered, can be obtained using the
1116 <link to="IVirtualBox::getDVDImage()"/> call.</li>
1117 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1118 that, if registered, can be obtained using the
1119 <link to="IVirtualBox::getFloppyImage()"/> call.</li>
1120 </ul>
1121
1122 Note that if this is a deregistration notification,
1123 there is no way to access the object representing the
1124 unregistered media. It is supposed that the
1125 application will do required cleanup based on the @a
1126 mediaId value.
1127 </desc>
1128 <param name="mediaId" type="uuid" dir="in">
1129 <desc>ID of the media this event relates to.</desc>
1130 </param>
1131 <param name="mediaType" type="DeviceType" dir="in">
1132 <desc>Type of the media this event relates to.</desc>
1133 </param>
1134 <param name="registered" type="boolean" dir="in">
1135 <desc>
1136 If true, the media was registered, otherwise it was
1137 unregistered.
1138 </desc>
1139 </param>
1140 </method>
1141
1142 <method name="onMachineRegistered">
1143 <desc>
1144 The given machine was registered or unregistered
1145 within this VirtualBox installation.
1146 </desc>
1147 <param name="machineId" type="uuid" dir="in">
1148 <desc>ID of the machine this event relates to.</desc>
1149 </param>
1150 <param name="registered" type="boolean" dir="in">
1151 <desc>
1152 If true, the machine was registered, otherwise it was
1153 unregistered.
1154 </desc>
1155 </param>
1156 </method>
1157
1158 <method name="onSessionStateChange">
1159 <desc>
1160 The state of the session for the given machine was changed.
1161 <see>IMachine::sessionState</see>
1162 </desc>
1163 <param name="machineId" type="uuid" dir="in">
1164 <desc>ID of the machine this event relates to.</desc>
1165 </param>
1166 <param name="state" type="SessionState" dir="in">
1167 <desc>New session state.</desc>
1168 </param>
1169 </method>
1170
1171 <method name="onSnapshotTaken">
1172 <desc>
1173 A new snapshot of the machine has been taken.
1174 <see>ISnapshot</see>
1175 </desc>
1176 <param name="machineId" type="uuid" dir="in">
1177 <desc>ID of the machine this event relates to.</desc>
1178 </param>
1179 <param name="snapshotId" type="uuid" dir="in">
1180 <desc>ID of the new snapshot.</desc>
1181 </param>
1182 </method>
1183
1184 <method name="onSnapshotDiscarded">
1185 <desc>
1186 Snapshot of the given machine has been discarded.
1187
1188 <note>
1189 This notification is delivered <b>after</b> the snapshot
1190 object has been uninitialized on the server (so that any
1191 attempt to call its methods will return an error).
1192 </note>
1193
1194 <see>ISnapshot</see>
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>ID of the machine this event relates to.</desc>
1198 </param>
1199 <param name="snapshotId" type="uuid" dir="in">
1200 <desc>
1201 ID of the discarded snapshot. <tt>null</tt> means the
1202 current machine state has been discarded (restored from
1203 the current snapshot).
1204 </desc>
1205 </param>
1206 </method>
1207
1208 <method name="onSnapshotChange">
1209 <desc>
1210 Snapshot properties (name and/or description) have been changed.
1211 <see>ISnapshot</see>
1212 </desc>
1213 <param name="machineId" type="uuid" dir="in">
1214 <desc>ID of the machine this event relates to.</desc>
1215 </param>
1216 <param name="snapshotId" type="uuid" dir="in">
1217 <desc>ID of the changed snapshot.</desc>
1218 </param>
1219 </method>
1220
1221 <method name="onGuestPropertyChange">
1222 <desc>
1223 Notification when a guest property has changed.
1224 </desc>
1225 <param name="machineId" type="uuid" dir="in">
1226 <desc>
1227 ID of the machine this event relates to.
1228 </desc>
1229 </param>
1230 <param name="name" type="wstring" dir="in">
1231 <desc>
1232 The name of the property that has changed.
1233 </desc>
1234 </param>
1235 <param name="value" type="wstring" dir="in">
1236 <desc>
1237 The new property value.
1238 </desc>
1239 </param>
1240 <param name="flags" type="wstring" dir="in">
1241 <desc>
1242 The new property flags.
1243 </desc>
1244 </param>
1245 </method>
1246
1247 </interface>
1248
1249 <interface
1250 name="IVirtualBox" extends="$dispatched"
1251 uuid="339abca2-f47a-4302-87f5-7bc324e6bbde"
1252 wsmap="managed"
1253 >
1254 <desc>
1255 The IVirtualBox interface represents the main interface exposed by the
1256 product that provides virtual machine management.
1257
1258 An instance of IVirtualBox is required for the product to do anything
1259 useful. Even though the interface does not expose this, internally,
1260 IVirtualBox is implemented as a singleton and actually lives in the
1261 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1262 IVirtualBox can track the state of all virtual machines on a particular
1263 host, regardless of which frontend started them.
1264
1265 To enumerate all the virtual machines on the host, use the
1266 <link to="IVirtualBox::machines2"/> attribute.
1267 </desc>
1268
1269 <attribute name="version" type="wstring" readonly="yes">
1270 <desc>
1271 A string representing the version number of the product. The
1272 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1273 last number represents the build number and will frequently change.
1274 </desc>
1275 </attribute>
1276
1277 <attribute name="revision" type="unsigned long" readonly="yes">
1278 <desc>
1279 The internal build revision number of the product.
1280 </desc>
1281 </attribute>
1282
1283 <attribute name="packageType" type="wstring" readonly="yes">
1284 <desc>
1285 A string representing the package type of this product. The
1286 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1287 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1288 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1289 this.
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="homeFolder" type="wstring" readonly="yes">
1294 <desc>
1295 Full path to the directory where the global settings file,
1296 <tt>VirtualBox.xml</tt>, is stored.
1297
1298 In this version of VirtualBox, the value of this property is
1299 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1300 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1301 as determined by the host OS), and cannot be changed.
1302
1303 This path is also used as the base to resolve relative paths in
1304 places where relative paths are allowed (unless otherwise
1305 expressly indicated).
1306 </desc>
1307 </attribute>
1308
1309 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1310 <desc>
1311 Full name of the global settings file.
1312 The value of this property corresponds to the value of
1313 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1314 </desc>
1315 </attribute>
1316
1317 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1318 <desc>
1319 Current version of the format of the global VirtualBox settings file
1320 (<tt>VirtualBox.xml</tt>).
1321
1322 The version string has the following format:
1323 <pre>
1324 x.y-platform
1325 </pre>
1326 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1327 versions, and <tt>platform</tt> is the platform identifier.
1328
1329 The current version usually matches the value of the
1330 <link to="#settingsFormatVersion"/> attribute unless the
1331 settings file was created by an older version of VirtualBox and there
1332 was a change of the settings file format since then.
1333
1334 Note that VirtualBox automatically converts settings files from older
1335 versions to the most recent version when reading them (usually at
1336 VirtualBox startup) but it doesn't save the changes back until
1337 you call a method that implicitly saves settings (such as
1338 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
1339 explicitly. Therefore, if the value of this attribute differs from the
1340 value of <link to="#settingsFormatVersion"/>, then it
1341 means that the settings file was converted but the result of the
1342 conversion is not yet saved to disk.
1343
1344 The above feature may be used by interactive front-ends to inform users
1345 about the settings file format change and offer them to explicitly save
1346 all converted settings files (the global and VM-specific ones),
1347 optionally create backup copies of the old settings files before saving,
1348 etc.
1349
1350 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1351 </desc>
1352 </attribute>
1353
1354 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1355 <desc>
1356 Most recent version of the settings file format.
1357
1358 The version string has the following format:
1359 <pre>
1360 x.y-platform
1361 </pre>
1362 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1363 versions, and <tt>platform</tt> is the platform identifier.
1364
1365 VirtualBox uses this version of the format when saving settings files
1366 (either as a result of method calls that require to save settings or as
1367 a result of an explicit call to <link to="#saveSettings()"/>).
1368
1369 <see>settingsFileVersion</see>
1370 </desc>
1371 </attribute>
1372
1373 <attribute name="host" type="IHost" readonly="yes">
1374 <desc>Associated host object.</desc>
1375 </attribute>
1376
1377 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1378 <desc>Associated system information object.</desc>
1379 </attribute>
1380
1381 <attribute name="machines2" type="IMachine" readonly="yes" safearray="yes">
1382 <desc>
1383 Array of machine objects registered within this VirtualBox instance.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="hardDisks2" type="IHardDisk2" readonly="yes" safearray="yes">
1388 <desc>
1389 Array of hard disk objects known to this VirtualBox installation.
1390
1391 This array contains only base (root) hard disks. All differencing
1392 hard disks of the given base hard disk can be enumerated using
1393 <link to="IHardDisk2::children"/>.
1394 </desc>
1395 </attribute>
1396
1397 <attribute name="DVDImages" type="IDVDImage2" readonly="yes" safearray="yes">
1398 <desc>
1399 Array of CD/DVD image objects registered with this VirtualBox instance.
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="floppyImages" type="IFloppyImage2" readonly="yes" safearray="yes">
1404 <desc>
1405 Array of floppy image objects registered with this VirtualBox instance.
1406 </desc>
1407 </attribute>
1408
1409 <attribute name="progressOperations" type="IProgressCollection" readonly="yes"/>
1410
1411 <attribute name="guestOSTypes" type="IGuestOSTypeCollection" readonly="yes"/>
1412
1413 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
1414 <desc>
1415 Collection of global shared folders. Global shared folders are
1416 available to all virtual machines.
1417
1418 New shared folders are added to the collection using
1419 <link to="#createSharedFolder"/>. Existing shared folders can be
1420 removed using <link to="#removeSharedFolder"/>.
1421
1422 <note>
1423 In the current version of the product, global shared folders are not
1424 implemented and therefore this collection is always empty.
1425 </note>
1426 </desc>
1427 </attribute>
1428
1429 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1430 <desc>
1431 Associated performance collector object.
1432 </desc>
1433 </attribute>
1434
1435 <method name="createMachine">
1436 <desc>
1437 Creates a new virtual machine.
1438
1439 The new machine is created unregistered, with the initial configuration
1440 set according to the specified guest OS type. A typical sequence of
1441 actions to create a new virtual machine is as follows:
1442
1443 <ol>
1444 <li>
1445 Call this method to have a new machine created. The returned machine
1446 object will be "mutable" allowing to change any machine property.
1447 </li>
1448
1449 <li>
1450 Configure the machine using the appropriate attributes and methods.
1451 </li>
1452
1453 <li>
1454 Call <link to="IMachine::saveSettings()" /> to write the settings
1455 to the machine's XML settings file. The configuration of the newly
1456 created machine will not be saved to disk until this method is
1457 called.
1458 </li>
1459
1460 <li>
1461 Call <link to="#registerMachine()" /> to add the machine to the list
1462 of machines known to VirtualBox.
1463 </li>
1464 </ol>
1465
1466 You should specify valid name for the newly created machine when calling
1467 this method. See the <link to="IMachine::name"/> attribute description
1468 for more details about the machine name.
1469
1470 The specified guest OS type identifier must match an ID of one of known
1471 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1472 array.
1473
1474 Every machine has a <i>settings file</i> that is used to store
1475 the machine configuration. This file is stored in a directory called the
1476 <i>machine settings subfolder</i>. Both the settings subfolder and file
1477 will have a name that corresponds to the name of the virtual machine.
1478 You can specify where to create the machine setting subfolder using the
1479 @a baseFolder argument. The base folder can be absolute (full path) or
1480 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1481 directory</link>.
1482
1483 If @a baseFolder is a null or empty string (which is recommended), the
1484 <link to="ISystemProperties::defaultMachineFolder">default machine
1485 settings folder</link> will be used as a base folder for the created
1486 machine. Otherwise the given base folder will be used. In either case,
1487 the full path to the resulting settings file has the following
1488 structure:
1489 <pre>
1490 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1491 </pre>
1492
1493 Note that if the resulting settings file already exists, this method
1494 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1495
1496 Optionally, you may specify an UUID of to assign to the created machine.
1497 However, this is not recommended and you should normally pass an empty
1498 (null) UUID to this method so that a new UUID will be automatically
1499 generated for every created machine.
1500
1501 <note>
1502 There is no way to change the name of the settings file or
1503 subfolder of the created machine directly.
1504 </note>
1505
1506 <result name="VBOX_E_OBJECT_NOT_FOUND">
1507 @a osTypeId is invalid.
1508 </result>
1509 <result name="VBOX_E_FILE_ERROR">
1510 Resulting settings file name is invalid or the settings file already
1511 exists or could not be created due to an I/O error.
1512 </result>
1513 <result name="E_INVALIDARG">
1514 @a name is empty or null.
1515 </result>
1516 </desc>
1517
1518 <param name="name" type="wstring" dir="in">
1519 <desc>Machine name.</desc>
1520 </param>
1521 <param name="osTypeId" type="wstring" dir="in">
1522 <desc>Guest OS Type ID.</desc>
1523 </param>
1524 <param name="baseFolder" type="wstring" dir="in">
1525 <desc>Base machine folder (optional).</desc>
1526 </param>
1527 <param name="id" type="uuid" dir="in">
1528 <desc>Machine UUID (optional).</desc>
1529 </param>
1530 <param name="machine" type="IMachine" dir="return">
1531 <desc>Created machine object.</desc>
1532 </param>
1533 </method>
1534
1535 <method name="createLegacyMachine">
1536 <desc>
1537 Creates a new virtual machine in "legacy" mode, using the specified
1538 settings file to store machine settings.
1539
1540 As opposed to machines created by <link to="#createMachine()"/>,
1541 the settings file of the machine created in "legacy" mode is not
1542 automatically renamed when the machine name is changed -- it will always
1543 remain the same as specified in this method call.
1544
1545 The specified settings file name can be absolute (full path) or relative
1546 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1547 directory</link>. If the file name doesn't contain an extension, the
1548 default extension (.xml) will be appended.
1549
1550 Note that the configuration of the newly created machine is not
1551 saved to disk (and therefore no settings file is created)
1552 until <link to="IMachine::saveSettings()"/> is called. If the
1553 specified settings file already exists, this method
1554 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1555
1556 See <link to="#createMachine()"/> for more information.
1557
1558 @deprecated This method may be removed later. Use <link
1559 to="IVirtualBox::createMachine()"/> instead.
1560
1561 <note>
1562 There is no way to change the name of the settings file
1563 of the machine created in "legacy" mode.
1564 </note>
1565
1566 <result name="VBOX_E_OBJECT_NOT_FOUND">
1567 @a osTypeId is invalid.
1568 </result>
1569 <result name="VBOX_E_FILE_ERROR">
1570 @a settingsFile is invalid or the settings file already exists or
1571 could not be created due to an I/O error.
1572 </result>
1573 <result name="E_INVALIDARG">
1574 @a name or @a settingsFile is empty or null.
1575 </result>
1576 </desc>
1577
1578 <param name="name" type="wstring" dir="in">
1579 <desc>Machine name.</desc>
1580 </param>
1581 <param name="osTypeId" type="wstring" dir="in">
1582 <desc>Machine OS Type ID.</desc>
1583 </param>
1584 <param name="settingsFile" type="wstring" dir="in">
1585 <desc>Name of the machine settings file.</desc>
1586 </param>
1587 <param name="id" type="uuid" dir="in">
1588 <desc>Machine UUID (optional).</desc>
1589 </param>
1590 <param name="machine" type="IMachine" dir="return">
1591 <desc>Created machine object.</desc>
1592 </param>
1593 </method>
1594
1595 <method name="openMachine">
1596 <desc>
1597 Opens a virtual machine from the existing settings file.
1598 The opened machine remains unregistered until you call
1599 <link to="#registerMachine()"/>.
1600
1601 The specified settings file name can be absolute
1602 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1603 VirtualBox home directory</link>. This file must exist
1604 and must be a valid machine settings file whose contents
1605 will be used to construct the machine object.
1606
1607 @deprecated Will be removed soon.
1608 <result name="VBOX_E_FILE_ERROR">
1609 Settings file name invalid, not found or sharing violation.
1610 </result>
1611 </desc>
1612 <param name="settingsFile" type="wstring" dir="in">
1613 <desc>
1614 Name of the machine settings file.
1615 </desc>
1616 </param>
1617 <param name="machine" type="IMachine" dir="return">
1618 <desc>Opened machine object.</desc>
1619 </param>
1620 <note>
1621 <link to="IMachine::settingsModified"/> will return
1622 false for the created machine, until any of machine settings
1623 are changed.
1624 </note>
1625 </method>
1626
1627 <method name="registerMachine">
1628 <desc>
1629
1630 Registers the machine previously created using
1631 <link to="#createMachine()"/> or opened using
1632 <link to="#openMachine()"/> within this VirtualBox installation. After
1633 successful method invocation, the
1634 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1635 to all registered callbacks.
1636
1637 <note>
1638 This method implicitly calls <link to="IMachine::saveSettings"/>
1639 to save all current machine settings before registering it.
1640 </note>
1641
1642 <result name="VBOX_E_OBJECT_NOT_FOUND">
1643 No matching virtual machine found.
1644 </result>
1645 <result name="VBOX_E_INVALID_OBJECT_STATE">
1646 Virtual machine was not created within this VirtualBox instance.
1647 </result>
1648
1649 </desc>
1650 <param name="machine" type="IMachine" dir="in"/>
1651 </method>
1652
1653 <method name="getMachine">
1654 <desc>
1655 Attempts to find a virtual machine given its UUID.
1656 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1657 instead.
1658
1659 <result name="VBOX_E_OBJECT_NOT_FOUND">
1660 Could not find registered machine matching @a id.
1661 </result>
1662
1663 </desc>
1664 <param name="id" type="uuid" dir="in"/>
1665 <param name="machine" type="IMachine" dir="return"/>
1666 </method>
1667
1668 <method name="findMachine">
1669 <desc>
1670 Attempts to find a virtual machine given its name.
1671 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1672 instead.
1673
1674 <result name="VBOX_E_OBJECT_NOT_FOUND">
1675 Could not find registered machine matching @a name.
1676 </result>
1677
1678 </desc>
1679 <param name="name" type="wstring" dir="in"/>
1680 <param name="machine" type="IMachine" dir="return"/>
1681 </method>
1682
1683 <method name="unregisterMachine">
1684 <desc>
1685
1686 Unregisters the machine previously registered using
1687 <link to="#registerMachine"/>. After successful method invocation, the
1688 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1689 to all registered callbacks.
1690
1691 <note>
1692 The specified machine must not be in the Saved state, have an open
1693 (or a spawning) direct session associated with it, have snapshots or
1694 have hard disks attached.
1695 </note>
1696
1697 <note>
1698 This method implicitly calls <link to="IMachine::saveSettings"/> to
1699 save all current machine settings before unregistering it.
1700 </note>
1701
1702 <note>
1703 If the given machine is inaccessible (see
1704 <link to="IMachine::accessible"/>), it will be unregistered and
1705 fully uninitialized right afterwards. As a result, the returned
1706 machine object will be unusable and an attempt to call
1707 <b>any</b> method will return the "Object not ready" error.
1708 </note>
1709
1710 <result name="VBOX_E_OBJECT_NOT_FOUND">
1711 Could not find registered machine matching @a id.
1712 </result>
1713 <result name="VBOX_E_INVALID_VM_STATE">
1714 Machine is in Saved state.
1715 </result>
1716 <result name="VBOX_E_INVALID_OBJECT_STATE">
1717 Machine has snapshot or open session or hard disk attached.
1718 </result>
1719
1720 </desc>
1721 <param name="id" type="uuid" dir="in">
1722 <desc>UUID of the machine to unregister.</desc>
1723 </param>
1724 <param name="machine" type="IMachine" dir="return">
1725 <desc>Unregistered machine object.</desc>
1726 </param>
1727 </method>
1728
1729 <method name="openAppliance">
1730 <desc>
1731 Attempts to open the given appliance, which must be in Open Virtual Machine Format (OVF).
1732
1733 As prescribed by the OVF standard, VirtualBox supports OVF in two formats:
1734
1735 <ol>
1736 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
1737 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
1738 this descriptor file references other files, as OVF appliances distributed as a set of
1739 files most likely do, those files must be in the same directory as the descriptor file.</li>
1740
1741 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
1742 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
1743 files and optionally other files.</li>
1744 </ol>
1745
1746 In both cases, VirtualBox will open the OVF descriptor file, parse its contents and create a
1747 new instance of IAppliance representing the OVF file.
1748
1749 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
1750 returned IAppliance object can then be used to retrieve information about the appliance and
1751 import it into VirtualBox. The mere fact that this method returns successfully does not mean
1752 that VirtualBox supports all features requested by the appliance; see the documentation for
1753 <link to="IAppliance" /> for details.
1754
1755 </desc>
1756 <param name="file" type="wstring" dir="in">
1757 <desc>
1758 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
1759 on whether the appliance is distributed as a set of files or as a single file, respectively).
1760 </desc>
1761 </param>
1762 <param name="machine" type="IAppliance" dir="return">
1763 <desc>New appliance.</desc>
1764 </param>
1765 </method>
1766
1767 <method name="createHardDisk2">
1768 <desc>
1769 Creates a new base hard disk object that will use the given storage
1770 format and location for hard disk data.
1771
1772 Note that the actual storage unit is not created by this method. In
1773 order to do it, and before you are able to attach the created hard disk
1774 to virtual machines, you must call one of the following methods to
1775 allocate a format-specific storage unit at the specified location:
1776 <ul>
1777 <li><link to="IHardDisk2::createDynamicStorage()"/></li>
1778 <li><link to="IHardDisk2::createFixedStorage()"/></li>
1779 <li><link to="IHardDisk2::createDiffStorage()"/></li>
1780 </ul>
1781
1782 Some hard disk attributes, such as <link to="IHardDisk2::id"/>, may
1783 remain uninitialized until the hard disk storage unit is successfully
1784 created by one of the above methods.
1785
1786 After the storage unit is successfully created, the hard disk gets
1787 remembered by this VirtualBox installation and will be accessible
1788 through <link to="#getHardDisk2()"/> and <link to="#findHardDisk2()"/>
1789 methods. Remembered root (base) hard disks are also returned as part of
1790 the <link to="#hardDisks2"/> array. See IHardDisk2 for more details.
1791
1792 The list of all storage formats supported by this VirtualBox
1793 installation can be obtained using
1794 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1795 attribute is empty or <tt>null</tt> then the default storage format
1796 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1797 be used for creating a storage unit of the hard disk.
1798
1799 Note that the format of the location string is storage format specific.
1800 See <link to="IMedium::location"/>, IHardDisk2 and
1801 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1802
1803 <result name="VBOX_E_OBJECT_NOT_FOUND">
1804 @a format identifier is invalid. See
1805 <link to="ISystemProperties::hardDiskFormats"/>.
1806 </result>
1807 <result name="VBOX_E_FILE_ERROR">
1808 @a location is a not valid file name (for file-based formats only).
1809 </result>
1810 <result name="E_INVALIDARG">
1811 @a format is a null or empty string.
1812 </result>
1813 </desc>
1814 <param name="format" type="wstring" dir="in">
1815 <desc>
1816 Identifier of the storage format to use for the new hard disk.
1817 </desc>
1818 </param>
1819 <param name="location" type="wstring" dir="in">
1820 <desc>
1821 Location of the storage unit for the new hard disk.
1822 </desc>
1823 </param>
1824 <param name="hardDisk" type="IHardDisk2" dir="return">
1825 <desc>Created hard disk object.</desc>
1826 </param>
1827 </method>
1828
1829 <method name="openHardDisk2">
1830 <desc>
1831 Opens a hard disk from an existing location.
1832
1833 After the hard disk is successfully opened by this method, it gets
1834 remembered by (known to) this VirtualBox installation and will be
1835 accessible through <link to="#getHardDisk2()"/> and
1836 <link to="#findHardDisk2()"/> methods. Remembered root (base) hard disks
1837 are also returned as part of the <link to="#hardDisks2"/> array and can
1838 be attached to virtual machines. See IHardDisk2 for more details.
1839
1840 If a differencing hard disk is to be opened by this method, the
1841 operation will succeed only if its parent hard disk and all ancestors,
1842 if any, are already known to this VirtualBox installation (for example,
1843 were opened by this method before).
1844
1845 This method tries to guess the storage format of the specified hard disk
1846 by reading hard disk data at the specified location.
1847
1848 Note that the format of the location string is storage format specific.
1849 See <link to="IMedium::location"/>, IHardDisk2 and
1850 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1851
1852
1853 <result name="VBOX_E_FILE_ERROR">
1854 Invalid hard disk storage file location.
1855 </result>
1856 <result name="VBOX_E_IPRT_ERROR">
1857 Could not get hard disk storage format.
1858 </result>
1859 <result name="E_INVALIDARG">
1860 Invalid hard disk storage format.
1861 </result>
1862
1863 </desc>
1864 <param name="location" type="wstring" dir="in">
1865 <desc>
1866 Location of the storage unit that contains hard disk data in one of
1867 the supported storage formats.
1868 </desc>
1869 </param>
1870 <param name="hardDisk" type="IHardDisk2" dir="return">
1871 <desc>Opened hard disk object.</desc>
1872 </param>
1873 </method>
1874
1875 <method name="getHardDisk2" const="yes">
1876 <desc>
1877 Returns a hard disk with the given UUID.
1878
1879 The hard disk with the given UUID must be known to this VirtualBox
1880 installation, i.e. it must be previously created by
1881 <link to="#createHardDisk2()"/> or opened by <link
1882 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1883
1884 <result name="VBOX_E_OBJECT_NOT_FOUND">
1885 No hard disk object matching @a id found.
1886 </result>
1887
1888 </desc>
1889 <param name="id" type="uuid" dir="in">
1890 <desc>UUID of the hard disk to look for.</desc>
1891 </param>
1892 <param name="hardDisk" type="IHardDisk2" dir="return">
1893 <desc>Found hard disk object.</desc>
1894 </param>
1895 </method>
1896
1897 <method name="findHardDisk2">
1898 <desc>
1899 Returns a hard disk that uses the given location to store hard
1900 disk data.
1901
1902 The given hard disk must be known to this VirtualBox installation, i.e.
1903 it must be previously created by
1904 <link to="#createHardDisk2()"/> or opened by <link
1905 to="#openHardDisk2()"/>, or attached to some known virtual machine.
1906
1907 The search is done by comparing the value of the @a location argument to
1908 the <link to="IHardDisk2::location"/> attribute of each known hard
1909 disk.
1910
1911 For locations represented by file names in the host's file system, the
1912 requested location can be a path relative to the
1913 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1914 only a file name without any path is given, the
1915 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1916 folder</link> will be prepended to the file name before searching. Note
1917 that on case sensitive file systems, a case sensitive comparison is
1918 performed, otherwise the case of symbols in the file path is ignored.
1919
1920 <result name="VBOX_E_OBJECT_NOT_FOUND">
1921 No hard disk object matching @a location found.
1922 </result>
1923
1924 </desc>
1925 <param name="location" type="wstring" dir="in">
1926 <desc>Location string to search for.</desc>
1927 </param>
1928 <param name="hardDisk" type="IHardDisk2" dir="return">
1929 <desc>Found hard disk object.</desc>
1930 </param>
1931 </method>
1932
1933 <method name="openDVDImage">
1934 <desc>
1935 Opens a CD/DVD image contained in the specified file of the supported
1936 format and assigns it the given UUID.
1937
1938 After the image is successfully opened by this method, it gets
1939 remembered by (known to) this VirtualBox installation and will be
1940 accessible through <link to="#getDVDImage()"/> and
1941 <link to="#findDVDImage()"/> methods. Remembered images are also
1942 returned as part of the <link to="#DVDImages"/> array and can be mounted
1943 to virtual machines. See IMedium for more details.
1944
1945 See <link to="IMedium::location"/> to get more details about the format
1946 of the location string.
1947
1948 <note>
1949 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1950 </note>
1951
1952 <result name="VBOX_E_INVALID_OBJECT_STATE">
1953 CD/DVD image already exists in the media registry.
1954 </result>
1955
1956 </desc>
1957 <param name="location" type="wstring" dir="in">
1958 <desc>
1959 Full path to the file that contains a valid CD/DVD image.
1960 </desc>
1961 </param>
1962 <param name="id" type="uuid" dir="in">
1963 <desc>
1964 UUID to assign to the given image within this VirtualBox installation.
1965 If an empty (null) UUID is specified, the system will randomly
1966 generate a new UUID.
1967 </desc>
1968 </param>
1969 <param name="image" type="IDVDImage2" dir="return">
1970 <desc>Opened CD/DVD image object.</desc>
1971 </param>
1972 </method>
1973
1974 <method name="getDVDImage">
1975 <desc>
1976 Returns a CD/DVD image with the given UUID.
1977
1978 The image with the given UUID must be known to this VirtualBox
1979 installation, i.e. it must be previously opened by <link
1980 to="#openDVDImage()"/>, or mounted to some known virtual machine.
1981
1982 <result name="VBOX_E_OBJECT_NOT_FOUND">
1983 No matching DVD image found in the media registry.
1984 </result>
1985
1986 </desc>
1987 <param name="id" type="uuid" dir="in">
1988 <desc>UUID of the image to look for.</desc>
1989 </param>
1990 <param name="image" type="IDVDImage2" dir="return">
1991 <desc>Found CD/DVD image object.</desc>
1992 </param>
1993 </method>
1994
1995 <method name="findDVDImage">
1996 <desc>
1997 Returns a CD/DVD image with the given image location.
1998
1999 The image with the given UUID must be known to this VirtualBox
2000 installation, i.e. it must be previously opened by <link
2001 to="#openDVDImage()"/>, or mounted to some known virtual machine.
2002
2003 The search is done by comparing the value of the @a location argument to
2004 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2005
2006 The requested location can be a path relative to the
2007 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2008 only a file name without any path is given, the
2009 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2010 folder</link> will be prepended to the file name before searching. Note
2011 that on case sensitive file systems, a case sensitive comparison is
2012 performed, otherwise the case in the file path is ignored.
2013
2014 <result name="VBOX_E_FILE_ERROR">
2015 Invalid image file location.
2016 </result>
2017 <result name="VBOX_E_OBJECT_NOT_FOUND">
2018 No matching DVD image found in the media registry.
2019 </result>
2020
2021 </desc>
2022 <param name="location" type="wstring" dir="in">
2023 <desc>CD/DVD image file path to look for.</desc>
2024 </param>
2025 <param name="image" type="IDVDImage2" dir="return">
2026 <desc>Found CD/DVD image object.</desc>
2027 </param>
2028 </method>
2029
2030 <method name="openFloppyImage">
2031 <desc>
2032 Opens a floppy image contained in the specified file of the supported
2033 format and assigns it the given UUID.
2034
2035 After the image is successfully opened by this method, it gets
2036 remembered by (known to) this VirtualBox installation and will be
2037 accessible through <link to="#getFloppyImage()"/> and
2038 <link to="#findFloppyImage()"/> methods. Remembered images are also
2039 returned as part of the <link to="#floppyImages"/> array and can be
2040 mounted to virtual machines. See IMedium for more details.
2041
2042 See <link to="IMedium::location"/> to get more details about the format
2043 of the location string.
2044
2045 <result name="VBOX_E_FILE_ERROR">
2046 Floppy image specified by @a location not accessible.
2047 </result>
2048 <result name="VBOX_E_INVALID_OBJECT_STATE">
2049 Floppy image already exists in the media registry.
2050 </result>
2051
2052 <note>
2053 Currently, only raw floppy images are supported by VirtualBox.
2054 </note>
2055 </desc>
2056 <param name="location" type="wstring" dir="in">
2057 <desc>
2058 Full path to the file that contains a valid floppy image.
2059 </desc>
2060 </param>
2061 <param name="id" type="uuid" dir="in">
2062 <desc>
2063 UUID to assign to the given image file within this VirtualBox
2064 installation. If an empty (null) UUID is specified, the system will
2065 randomly generate a new UUID.
2066 </desc>
2067 </param>
2068 <param name="image" type="IFloppyImage2" dir="return">
2069 <desc>Opened floppy image object.</desc>
2070 </param>
2071 </method>
2072
2073 <method name="getFloppyImage">
2074 <desc>
2075 Returns a floppy image with the given UUID.
2076
2077 The image with the given UUID must be known to this VirtualBox
2078 installation, i.e. it must be previously opened by <link
2079 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2080
2081 <result name="VBOX_E_OBJECT_NOT_FOUND">
2082 No matching floppy image found in the media registry.
2083 </result>
2084
2085 </desc>
2086 <param name="id" type="uuid" dir="in">
2087 <desc>UUID of the image to look for.</desc>
2088 </param>
2089 <param name="image" type="IFloppyImage2" dir="return">
2090 <desc>Found floppy image object.</desc>
2091 </param>
2092 </method>
2093
2094 <method name="findFloppyImage">
2095 <desc>
2096 Returns a floppy image with the given image location.
2097
2098 The image with the given UUID must be known to this VirtualBox
2099 installation, i.e. it must be previously opened by <link
2100 to="#openFloppyImage()"/>, or mounted to some known virtual machine.
2101
2102 The search is done by comparing the value of the @a location argument to
2103 the <link to="IMedium::location"/> attribute of each known floppy image.
2104
2105 The requested location can be a path relative to the
2106 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2107 only a file name without any path is given, the
2108 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2109 folder</link> will be prepended to the file name before searching. Note
2110 that on case sensitive file systems, a case sensitive comparison is
2111 performed, otherwise the case of symbols in the file path is ignored.
2112
2113 <result name="VBOX_E_FILE_ERROR">
2114 Invalid image file location.
2115 </result>
2116 <result name="VBOX_E_OBJECT_NOT_FOUND">
2117 No matching floppy image found in the media registry.
2118 </result>
2119
2120 </desc>
2121 <param name="location" type="wstring" dir="in">
2122 <desc>Floppy image file path to look for.</desc>
2123 </param>
2124 <param name="image" type="IFloppyImage2" dir="return">
2125 <desc>Found floppy image object.</desc>
2126 </param>
2127 </method>
2128
2129 <method name="getGuestOSType">
2130 <desc>
2131 Returns an object describing the specified guest OS type.
2132
2133 The requested guest OS type is specified using a string which is a
2134 mnemonic identifier of the guest operating system, such as
2135 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2136 particular virtual machine can be read or set using the
2137 <link to="IMachine::OSTypeId"/> attribute.
2138
2139 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2140 available guest OS type objects. Each object has an
2141 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2142 the guest OS this object describes.
2143
2144 <result name="E_INVALIDARG">
2145 @a id is not a valid Guest OS type.
2146 </result>
2147
2148 </desc>
2149 <param name="id" type="wstring" dir="in">
2150 <desc>Guest OS type ID string.</desc>
2151 </param>
2152 <param name="type" type="IGuestOSType" dir="return">
2153 <desc>Guest OS type object.</desc>
2154 </param>
2155 </method>
2156
2157 <method name="createSharedFolder">
2158 <desc>
2159 Creates a new global shared folder by associating the given logical
2160 name with the given host path, adds it to the collection of shared
2161 folders and starts sharing it. Refer to the description of
2162 <link to="ISharedFolder"/> to read more about logical names.
2163 <note>
2164 In the current implementation, this operation is not
2165 implemented.
2166 </note>
2167 </desc>
2168 <param name="name" type="wstring" dir="in">
2169 <desc>Unique logical name of the shared folder.</desc>
2170 </param>
2171 <param name="hostPath" type="wstring" dir="in">
2172 <desc>Full path to the shared folder in the host file system.</desc>
2173 </param>
2174 <param name="writable" type="boolean" dir="in">
2175 <desc>Whether the share is writable or readonly</desc>
2176 </param>
2177 </method>
2178
2179 <method name="removeSharedFolder">
2180 <desc>
2181 Removes the global shared folder with the given name previously
2182 created by <link to="#createSharedFolder"/> from the collection of
2183 shared folders and stops sharing it.
2184 <note>
2185 In the current implementation, this operation is not
2186 implemented.
2187 </note>
2188 </desc>
2189 <param name="name" type="wstring" dir="in">
2190 <desc>Logical name of the shared folder to remove.</desc>
2191 </param>
2192 </method>
2193
2194 <method name="getNextExtraDataKey">
2195 <desc>
2196 Returns the global extra data key name following the supplied key.
2197
2198 An error is returned if the supplied @a key does not exist. @c NULL is
2199 returned in @a nextKey if the supplied key is the last key. When
2200 supplying @c NULL for the @a key, the first key item is returned in @a
2201 nextKey (if there is any). @a nextValue is an optional parameter and
2202 if supplied, the next key's value is returned in it.
2203
2204 <result name="VBOX_E_OBJECT_NOT_FOUND">
2205 Extra data @a key not found.
2206 </result>
2207
2208 </desc>
2209 <param name="key" type="wstring" dir="in">
2210 <desc>Name of the data key to follow.</desc>
2211 </param>
2212 <param name="nextKey" type="wstring" dir="out">
2213 <desc>Name of the next data key.</desc>
2214 </param>
2215 <param name="nextValue" type="wstring" dir="out">
2216 <desc>Value of the next data key.</desc>
2217 </param>
2218 </method>
2219
2220 <method name="getExtraData">
2221 <desc>
2222 Returns associated global extra data.
2223
2224 If the requested data @a key does not exist, this function will
2225 succeed and return @c NULL in the @a value argument.
2226
2227 <result name="VBOX_E_FILE_ERROR">
2228 Settings file not accessible.
2229 </result>
2230 <result name="VBOX_E_XML_ERROR">
2231 Could not parse the settings file.
2232 </result>
2233
2234 </desc>
2235 <param name="key" type="wstring" dir="in">
2236 <desc>Name of the data key to get.</desc>
2237 </param>
2238 <param name="value" type="wstring" dir="return">
2239 <desc>Value of the requested data key.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="setExtraData">
2244 <desc>
2245 Sets associated global extra data.
2246
2247 If you pass @c NULL as a key @a value, the given @a key will be
2248 deleted.
2249
2250 <note>
2251 Before performing the actual data change, this method will ask all
2252 registered callbacks using the
2253 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
2254 notification for a permission. If one of the callbacks refuses the
2255 new value, the change will not be performed.
2256 </note>
2257 <note>
2258 On success, the
2259 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
2260 is called to inform all registered callbacks about a successful data
2261 change.
2262 </note>
2263
2264 <result name="VBOX_E_FILE_ERROR">
2265 Settings file not accessible.
2266 </result>
2267 <result name="VBOX_E_XML_ERROR">
2268 Could not parse the settings file.
2269 </result>
2270 <result name="E_ACCESSDENIED">
2271 Modification request refused.
2272 </result>
2273
2274 </desc>
2275 <param name="key" type="wstring" dir="in">
2276 <desc>Name of the data key to set.</desc>
2277 </param>
2278 <param name="value" type="wstring" dir="in">
2279 <desc>Value to assign to the key.</desc>
2280 </param>
2281 </method>
2282
2283 <method name="openSession">
2284 <desc>
2285 Opens a new direct session with the given virtual machine.
2286
2287 A direct session acts as a local lock on the given VM.
2288 There can be only one direct session open at a time for every
2289 virtual machine, protecting the VM from being manipulated by
2290 conflicting actions from different processes. Only after a
2291 direct session has been opened, one can change all VM settings
2292 and execute the VM in the process space of the session object.
2293
2294 Sessions therefore can be compared to mutex semaphores that
2295 lock a given VM for modification and execution.
2296 See <link to="ISession">ISession</link> for details.
2297
2298 <note>Unless you are writing a new VM frontend, you will not
2299 want to execute a VM in the current process. To spawn a new
2300 process that executes a VM, use
2301 <link to="IVirtualBox::openRemoteSession" />
2302 instead.</note>
2303
2304 Upon successful return, the session object can be used to
2305 get access to the machine and to the VM console.
2306
2307 In VirtualBox terminology, the machine becomes "mutable" after
2308 a session has been opened. Note that the "mutable" machine
2309 object, on which you may invoke IMachine methods to change its
2310 settings, will be a different object from the immutable IMachine
2311 objects returned by various IVirtualBox methods. To obtain a
2312 mutable IMachine object (upon which you can invoke settings methods),
2313 use the <link to="ISession::machine" /> attribute.
2314
2315 One must always call <link to="ISession::close" /> to release the
2316 lock on the machine, or the machine's state will eventually be
2317 set to "Aborted".
2318
2319 In other words, to change settings on a machine, the following
2320 sequence is typically performed:
2321
2322 <ol>
2323 <li>Call this method (openSession) to have a machine locked for
2324 the current session.</li>
2325
2326 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2327
2328 <li>Change the settings of the machine.</li>
2329
2330 <li>Call <link to="IMachine::saveSettings" />.</li>
2331
2332 <li>Close the session by calling <link to="ISession::close()"/>.</li>
2333 </ol>
2334
2335 <result name="E_UNEXPECTED">
2336 Virtual machine not registered.
2337 </result>
2338 <result name="E_ACCESSDENIED">
2339 Process not started by OpenRemoteSession.
2340 </result>
2341 <result name="VBOX_E_OBJECT_NOT_FOUND">
2342 No matching virtual machine found.
2343 </result>
2344 <result name="VBOX_E_INVALID_OBJECT_STATE">
2345 Session already open or being opened.
2346 </result>
2347 <result name="VBOX_E_VM_ERROR">
2348 Failed to assign machine to session.
2349 </result>
2350
2351 </desc>
2352 <param name="session" type="ISession" dir="in">
2353 <desc>
2354 Session object that will represent the opened session after
2355 successful method invocation. This object must not represent
2356 the already open session.
2357 <note>
2358 This session will be automatically closed if the
2359 VirtualBox server is terminated for some reason.
2360 </note>
2361 </desc>
2362 </param>
2363 <param name="machineId" type="uuid" dir="in">
2364 <desc>ID of the virtual machine to open a session with.</desc>
2365 </param>
2366 </method>
2367
2368 <method name="openRemoteSession">
2369 <desc>
2370 Spawns a new process that executes a virtual machine (called a
2371 "remote session").
2372
2373 Opening a remote session causes the VirtualBox server to start a new
2374 process that opens a direct session with the given VM. As a result, the
2375 VM is locked by that direct session in the new process, preventing
2376 conflicting changes from other processes. Since sessions act as locks
2377 that prevent conflicting changes, one cannot open a remote session
2378 for a VM that already has another open session (direct or remote), or
2379 is currently in the process of opening one (see <link
2380 to="IMachine::sessionState"/>).
2381
2382 While the remote session still provides some level of control over the
2383 VM execution to the caller (using the <link to="IConsole" /> interface),
2384 not all VM settings are available for modification within the remote
2385 session context.
2386
2387 This operation can take some time (a new VM is started in a new process,
2388 for which memory and other resources need to be set up). Because of this,
2389 an <link to="IProgress" /> is returned to allow the caller to wait for this
2390 asynchronous operation to be completed. Until then, the remote session
2391 object remains in the closed state, and accessing the machine or its
2392 console through it is invalid. It is recommended to use
2393 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2394 completion.
2395
2396 As with all <link to="ISession" /> objects, it is recommended to call
2397 <link to="ISession::close" /> on the local session object once openRemoteSession()
2398 has been called. However, the session's state (see <link to="ISession::state" />)
2399 will not return to "Closed" until the remote session has also closed (i.e.
2400 until the VM is no longer running). In that case, however, the state of
2401 the session will automatically change back to "Closed".
2402
2403 Currently supported session types (values of the @a type
2404 argument) are:
2405 <ul>
2406 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2407 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2408 </ul>
2409
2410 The @a environment argument is a string containing definitions of
2411 environment variables in the following format:
2412 @code
2413 NAME[=VALUE]\n
2414 NAME[=VALUE]\n
2415 ...
2416 @endcode
2417 where <tt>\\n</tt> is the new line character. These environment
2418 variables will be appended to the environment of the VirtualBox server
2419 process. If an environment variable exists both in the server process
2420 and in this list, the value from this list takes precedence over the
2421 server's variable. If the value of the environment variable is
2422 omitted, this variable will be removed from the resulting environment.
2423 If the environment string is @c null, the server environment is
2424 inherited by the started process as is.
2425
2426 <see>openExistingSession</see>
2427
2428 <result name="E_UNEXPECTED">
2429 Virtual machine not registered.
2430 </result>
2431 <result name="E_INVALIDARG">
2432 Invalid session type @a type.
2433 </result>
2434 <result name="VBOX_E_OBJECT_NOT_FOUND">
2435 No machine matching @a machineId found.
2436 </result>
2437 <result name="VBOX_E_INVALID_OBJECT_STATE">
2438 Session already open or being opened.
2439 </result>
2440 <result name="VBOX_E_IPRT_ERROR">
2441 Launching process for machine failed.
2442 </result>
2443 <result name="VBOX_E_VM_ERROR">
2444 Failed to assign machine to session.
2445 </result>
2446
2447 </desc>
2448 <param name="session" type="ISession" dir="in">
2449 <desc>
2450 Session object that will represent the opened remote session
2451 after successful method invocation (this object must not
2452 represent an already open session).
2453 </desc>
2454 </param>
2455 <param name="machineId" type="uuid" dir="in">
2456 <desc>ID of the virtual machine to open a session with.</desc>
2457 </param>
2458 <param name="type" type="wstring" dir="in">
2459 <desc>
2460 Type of the remote session (case sensitive).
2461 </desc>
2462 </param>
2463 <param name="environment" type="wstring" dir="in">
2464 <desc>
2465 Environment to pass to the opened session (may be @c null).
2466 </desc>
2467 </param>
2468 <param name="progress" type="IProgress" dir="return">
2469 <desc>Progress object to track the operation completion.</desc>
2470 </param>
2471 </method>
2472
2473 <method name="openExistingSession">
2474 <desc>
2475 Opens a new remote session with the virtual machine for
2476 which a direct session is already open.
2477
2478 The remote session provides some level of control over the VM
2479 execution (using the IConsole interface) to the caller; however,
2480 within the remote session context, not all VM settings are available
2481 for modification.
2482
2483 As opposed to <link to="#openRemoteSession()"/>, the number of
2484 remote sessions opened this way is not limited by the API
2485
2486 <note>
2487 It is an error to open a remote session with the machine that
2488 doesn't have an open direct session.
2489 </note>
2490
2491 <result name="E_UNEXPECTED">
2492 Virtual machine not registered.
2493 </result>
2494 <result name="VBOX_E_OBJECT_NOT_FOUND">
2495 No machine matching @a machineId found.
2496 </result>
2497 <result name="VBOX_E_INVALID_OBJECT_STATE">
2498 Session already open or being opened.
2499 </result>
2500 <result name="VBOX_E_INVALID_SESSION_STATE">
2501 Direct session state not Open.
2502 </result>
2503 <result name="VBOX_E_VM_ERROR">
2504 Failed to get console object from direct session or assign
2505 machine to session.
2506 </result>
2507
2508 <see>openRemoteSession</see>
2509 </desc>
2510 <param name="session" type="ISession" dir="in">
2511 <desc>
2512 Session object that will represent the open remote session
2513 after successful method invocation. This object must not
2514 represent an already open session.
2515 <note>
2516 This session will be automatically closed when the peer
2517 (direct) session dies or gets closed.
2518 </note>
2519 </desc>
2520 </param>
2521 <param name="machineId" type="uuid" dir="in">
2522 <desc>ID of the virtual machine to open a session with.</desc>
2523 </param>
2524 </method>
2525
2526 <method name="registerCallback">
2527 <desc>
2528 Registers a new global VirtualBox callback. The methods of the given
2529 callback object will be called by VirtualBox when an appropriate
2530 event occurs.
2531
2532 <result name="E_INVALIDARG">
2533 Registering a @c NULL @a callback is pretty pointless, ain't it?
2534 <!-- See if someone is actually reading this and objects :-) -->
2535 </result>
2536
2537 </desc>
2538 <param name="callback" type="IVirtualBoxCallback" dir="in">
2539 <desc>Callback object to register.</desc>
2540 </param>
2541 </method>
2542
2543 <method name="unregisterCallback">
2544 <desc>
2545 Unregisters the previously registered global VirtualBox callback.
2546
2547 <result name="E_INVALIDARG">
2548 Specified @a callback not registered.
2549 </result>
2550
2551 </desc>
2552 <param name="callback" type="IVirtualBoxCallback" dir="in">
2553 <desc>Callback object to unregister.</desc>
2554 </param>
2555 </method>
2556
2557 <method name="waitForPropertyChange">
2558 <desc>
2559 Blocks the caller until any of the properties represented by the @a
2560 what argument changes the value or until the given timeout interval
2561 expires.
2562
2563 The @a what argument is a comma separated list of property masks that
2564 describe properties the caller is interested in. The property mask is
2565 a string in the following format:
2566
2567 <pre>
2568 [[group.]subgroup.]name
2569 </pre>
2570
2571 where @c name is the property name and @c group, @c subgroup are zero
2572 or more property group specifiers. Each element (group or name) in
2573 the property mask may be either a Latin string or an asterisk symbol
2574 (@c "*") which is used to match any string for the given element. A
2575 property mask that doesn't contain asterisk symbols represents a
2576 single fully qualified property name.
2577
2578 Groups in the fully qualified property name go from more generic (the
2579 left-most part) to more specific (the right-most part). The first
2580 element is usually a name of the object the property belongs to. The
2581 second element may be either a property name, or a child object name,
2582 or an index if the preceding element names an object which is one of
2583 many objects of the same type. This way, property names form a
2584 hierarchy of properties. Here are some examples of property names:
2585
2586 <table>
2587 <tr>
2588 <td><tt>VirtualBox.version</tt></td>
2589 <td><link to="IVirtualBox::version"/> property</td>
2590 </tr>
2591 <tr>
2592 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2593 <td><link to="IMachine::name"/> property of the machine with the
2594 given UUID</td>
2595 </tr>
2596 </table>
2597
2598 Most property names directly correspond to the properties of objects
2599 (components) provided by the VirtualBox library and may be used to
2600 track changes to these properties. However, there may be
2601 pseudo-property names that don't correspond to any existing object's
2602 property directly, as well as there may be object properties that
2603 don't have a corresponding property name that is understood by this
2604 method, and therefore changes to such properties cannot be
2605 tracked. See individual object's property descriptions to get a
2606 fully qualified property name that can be used with this method (if
2607 any).
2608
2609 There is a special property mask @c "*" (i.e. a string consisting of a
2610 single asterisk symbol) that can be used to match all properties.
2611 Below are more examples of property masks:
2612
2613 <table>
2614 <tr>
2615 <td><tt>VirtualBox.*</tt></td>
2616 <td>Track all properties of the VirtualBox object</td>
2617 </tr>
2618 <tr>
2619 <td><tt>Machine.*.name</tt></td>
2620 <td>Track changes to the <link to="IMachine::name"/> property of
2621 all registered virtual machines</td>
2622 </tr>
2623 </table>
2624
2625 <note>
2626 This function is not implemented in the current version of the
2627 product.
2628 </note>
2629 </desc>
2630 <param name="what" type="wstring" dir="in">
2631 <desc>Comma separated list of property masks.</desc>
2632 </param>
2633 <param name="timeout" type="unsigned long" dir="in">
2634 <desc>
2635 Wait timeout in milliseconds.
2636 Specify -1 for an indefinite wait.
2637 </desc>
2638 </param>
2639 <param name="changed" type="wstring" dir="out">
2640 <desc>
2641 Comma separated list of properties that have been changed and caused
2642 this method to return to the caller.
2643 </desc>
2644 </param>
2645 <param name="values" type="wstring" dir="out">
2646 <desc>Reserved, not currently used.</desc>
2647 </param>
2648 </method>
2649
2650 <method name="saveSettings">
2651 <desc>
2652 Saves the global settings to the global settings file
2653 (<link to="#settingsFilePath"/>).
2654
2655 This method is only useful for explicitly saving the global settings
2656 file after it has been auto-converted from the old format to the most
2657 recent format (see <link to="#settingsFileVersion"/> for details).
2658 Normally, the global settings file is implicitly saved when a global
2659 setting is changed.
2660
2661 <result name="VBOX_E_FILE_ERROR">
2662 Settings file not accessible.
2663 </result>
2664 <result name="VBOX_E_XML_ERROR">
2665 Could not parse the settings file.
2666 </result>
2667
2668 </desc>
2669 </method>
2670
2671 <method name="saveSettingsWithBackup">
2672 <desc>
2673 Creates a backup copy of the global settings file
2674 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2675 calls <link to="#saveSettings()"/>.
2676
2677 Note that the backup copy is created <b>only</b> if the settings file
2678 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2679 details). Otherwise, this call is fully equivalent to
2680 <link to="#saveSettings()"/> and no backup copying is done.
2681
2682 The backup copy is created in the same directory where the original
2683 settings file is located. It is given the following file name:
2684 <pre>
2685 original.xml.x.y-platform.bak
2686 </pre>
2687 where <tt>original.xml</tt> is the original settings file name
2688 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2689 format of the settings file (before auto-conversion).
2690
2691 If the given backup file already exists, this method will try to add the
2692 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2693 0 to 9) and copy it again until it succeeds. If all suffixes are
2694 occupied, or if any other copy error occurs, this method will return a
2695 failure.
2696
2697 If the copy operation succeeds, the @a bakFileName return argument will
2698 receive a full path to the created backup file (for informational
2699 purposes). Note that this will happen even if the subsequent
2700 <link to="#saveSettings()"/> call performed by this method after the
2701 copy operation, fails.
2702
2703 <note>
2704 The VirtualBox API never calls this method. It is intended purely for
2705 the purposes of creating backup copies of the settings files by
2706 front-ends before saving the results of the automatically performed
2707 settings conversion to disk.
2708 </note>
2709
2710 <see>settingsFileVersion</see>
2711
2712 <result name="VBOX_E_FILE_ERROR">
2713 Settings file not accessible.
2714 </result>
2715 <result name="VBOX_E_XML_ERROR">
2716 Could not parse the settings file.
2717 </result>
2718 <result name="VBOX_E_IPRT_ERROR">
2719 Could not copy the settings file.
2720 </result>
2721
2722 </desc>
2723 <param name="bakFileName" type="wstring" dir="return">
2724 <desc>Full path to the created backup copy.</desc>
2725 </param>
2726 </method>
2727
2728 </interface>
2729
2730 <!--
2731 // IAppliance
2732 /////////////////////////////////////////////////////////////////////////
2733 -->
2734
2735 <enum
2736 name="CIMOSType"
2737 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2738 >
2739 <desc>
2740 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2741 </desc>
2742
2743 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2744 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2745 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2746 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2747 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2748 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2749 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2750 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2751 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2752 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2753 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2754 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2755 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2756 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2757 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2758 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2759 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2760 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2761 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2762 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2763 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2764 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2765 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2766 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2767 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2768 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2769 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2770 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2771 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2772 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2773 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2774 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2775 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2776 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2777 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2778 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2779 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2780 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2781 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2782 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2783 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2784 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2785 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2786 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2787 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2788 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2789 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2790 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2791 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2792 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2793 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2794 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2795 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2796 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2797 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2798 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2799 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2800 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2801 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2802 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2803 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2804 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2805 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2806 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2807 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2808 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2809 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2810 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2811 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2812 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2813 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2814 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2815 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2816 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2817 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2818 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2819 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2820 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2821 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2822 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2823 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2824 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2825 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2826 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2827 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2828 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2829 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2830 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2831 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2832 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2833 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2834 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2835 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2836 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2837 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2838 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2839 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2840 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2841 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2842 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2843 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2844 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2845 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2846 </enum>
2847
2848 <enum
2849 name="OVFResourceType"
2850 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2851 >
2852 <desc>
2853 OVF resource type.
2854 </desc>
2855
2856 <const name="Other" value="1" />
2857 <const name="ComputerSystem" value="2" />
2858 <const name="Processor" value="3" />
2859 <const name="Memory" value="4" />
2860 <const name="IdeController" value="5" />
2861 <const name="ParallelScsiHba" value="6" />
2862 <const name="FcHba" value="7" />
2863 <const name="iScsiHba" value="8" />
2864 <const name="IbHca" value="9" />
2865 <const name="EthernetAdapter" value="10" />
2866 <const name="OtherNetworkAdapter" value="11" />
2867 <const name="IoSlot" value="12" />
2868 <const name="IoDevice" value="13" />
2869 <const name="FloppyDrive" value="14" />
2870 <const name="CdDrive" value="15" />
2871 <const name="DvdDrive" value="16" />
2872 <const name="HardDisk" value="17" />
2873 <const name="UsbController" value="23" />
2874 <const name="SoundCard" value="35" />
2875 </enum>
2876
2877 <interface
2878 name="IAppliance" extends="$unknown"
2879 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
2880 wsmap="managed"
2881 >
2882 <desc>
2883 Represents an appliance in OVF format. An instance of this is returned by
2884 <link to="IVirtualBox::openAppliance" />.
2885
2886 Importing an OVF appliance into VirtualBox is a three-step process:
2887
2888 <ol>
2889 <li>
2890 Call <link to="IVirtualBox::openAppliance" /> with the full path of the OVF
2891 file. So long as the appliance file is syntactically valid, this will succeed
2892 and return an instance of IAppliance that contains the parsed data from the
2893 OVF file.
2894 </li>
2895
2896 <li>The caller should then invoke <link to="#interpret" />, which
2897 analyzes the OVF data and sets up the contents of the IAppliance attributes
2898 accordingly. These can be inspected by a VirtualBox front-end such as the GUI,
2899 and the suggestions can be displayed to the user. For example, the virtual system
2900 will contain the virtual hardware prescribed by the OVF (network and hardware
2901 adapters, virtual disk images, memory size and so on), and the GUI can then give
2902 the user the option to confirm and/or change these suggestions.
2903 </li>
2904
2905 <li>Finally, the caller should invoke <link to="#importAppliance" />, which will
2906 create virtual machines in VirtualBox as instances of <link to="IMachine" /> that
2907 match the information in the virtual system descriptions.
2908 </li>
2909 </ol>
2910
2911 </desc>
2912
2913 <attribute name="path" type="wstring" readonly="yes">
2914 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2915 the <tt>.ova</tt> file passed to <link to="IVirtualBox::openAppliance" />.</desc>
2916 </attribute>
2917
2918 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2919 <desc>
2920 Array of virtual disk definitions. One such description exists for each
2921 disk definition in the OVF; each string array item represents one such piece of
2922 disk information, with the information fields separated by tab (\t) characters.
2923
2924 The caller should be prepared for additional fields being appended to
2925 this string in future versions of VirtualBox and therefore check for
2926 the number of tabs in the strings returned.
2927
2928 In the current version, the following eight fields are returned per string
2929 in the array:
2930
2931 <ol>
2932 <li>Disk ID (unique string identifier given to disk)</li>
2933 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2934 <li>Populated size (optional unsigned integer indicating the current size of the
2935 disk; can be approximate; -1 if unspecified)</li>
2936 <li>Format (string identifying the disk format, typically
2937 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2938 <li>Reference (where to find the disk image, typically a file name; if empty,
2939 then the disk should be created on import)</li>
2940 <li>Image size (optional unsigned integer indicating the size of the image,
2941 which need not necessarily be the same as the values specified above, since
2942 the image may be compressed or sparse; -1 if not specified)</li>
2943 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2944 presently unsupported and always -1)</li>
2945 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2946 </ol>
2947 </desc>
2948 </attribute>
2949
2950 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2951 <desc>
2952 Array of virtual system descriptions. One such description is created
2953 for each virtual system found in the OVF. The array is empty until after <link to="#interpret" />
2954 has been called.
2955 </desc>
2956 </attribute>
2957
2958 <method name="interpret">
2959 <desc>
2960 Interprets the OVF data that was read when the appliance was constructed. After
2961 calling this method, one can inspect the
2962 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2963 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2964 the appliance.
2965
2966 Calling this method is the second step of importing an appliance into VirtualBox;
2967 see <link to="IAppliance" /> for an overview.
2968 </desc>
2969 </method>
2970
2971 <method name="importAppliance">
2972 <desc>
2973 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2974 and other interfaces that match the information contained in the appliance as
2975 closely as possible, as represented by the import instructions in the
2976 <link to="#virtualSystemDescriptions" /> array.
2977
2978 Calling this method is the final step of importing an appliance into VirtualBox;
2979 see <link to="IAppliance" /> for an overview.
2980
2981 Since importing the appliance may imply copying disk images, which can take a long
2982 time, this method operates asynchronously and returns an IProgress object to allow
2983 the caller to monitor the progress.
2984 </desc>
2985
2986 <param name="aProgress" type="IProgress" dir="return">
2987 <desc></desc>
2988 </param>
2989 </method>
2990
2991 </interface>
2992
2993 <enum
2994 name="VirtualSystemDescriptionType"
2995 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
2996 >
2997 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2998 a configuration value.</desc>
2999
3000 <const name="Ignore" value="1" />
3001 <const name="Name" value="2" />
3002 <const name="OS" value="3" />
3003 <const name="CPU" value="4" />
3004 <const name="Memory" value="5" />
3005 <const name="HardDiskControllerIDE" value="6" />
3006 <const name="HardDiskControllerSATA" value="7" />
3007 <const name="HardDiskControllerSCSI" value="8" />
3008 <const name="HardDiskImage" value="9" />
3009 <const name="CDROM" value="10" />
3010 <const name="Floppy" value="11" />
3011 <const name="NetworkAdapter" value="12" />
3012 <const name="USBController" value="13" />
3013 <const name="SoundCard" value="14" />
3014
3015 </enum>
3016
3017 <interface
3018 name="IVirtualSystemDescription" extends="$unknown"
3019 uuid="c76de96b-b316-4a42-9afb-18ce08cce0c9"
3020 wsmap="managed"
3021 >
3022
3023 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3024 After <link to="IAppliance::interpret" /> has been called, that array contains
3025 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3026 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3027 into VirtualBox.
3028 </desc>
3029
3030 <method name="getDescription">
3031 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3032 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3033
3034 The list below identifies the value sets that are possible depending on the
3035 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3036 the array item with the same index in aOrigValue[] will contain the original value as contained
3037 in the OVF file (just for informational purposes), and the corresponding item in aConfigValues[]
3038 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3039 the aExtraConfigValues[] array item may also be used.
3040
3041 <ul>
3042 <li>
3043 "OS": the guest operating system type. There must be exactly one such array item on import. The
3044 corresponding item in aConfigValues[] contains the suggested guest operating system for VirtualBox.
3045 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3046 item in aOrigValues[] will contain a numerical value that described the operating system in the OVF
3047 (see <link to="CIMOSType" />).
3048 </li>
3049 <li>
3050 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3051 if none is present on import, then an automatic name will be created from the operating system
3052 type. The correponding item im aOrigValues[] will contain the suggested virtual machine name
3053 from the OVF file, and aConfigValues[] will contain a suggestion for a unique VirtualBox
3054 <link to="IMachine" /> name that does not exist yet.
3055 </li>
3056 <li>
3057 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3058 </li>
3059 <li>
3060 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3061 is present on import, then VirtualBox will set a meaningful default based on the operating system
3062 type.
3063 </li>
3064 <li>
3065 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3066 The items in aOrigValues[] and aConfigValues[] will either be "LsiLogic" or "BusLogic". The
3067 matching item in the aRefs[] array will contain an integer that other items of the "Harddisk"
3068 type can use to specify which hard disk controller a virtual disk should be connected to.
3069 </li>
3070 <li>
3071 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3072 has no value in aOrigValues[] or aAutoValues[]. The matching item in the aRefs[] array will be
3073 used as with SCSI controllers (see above).
3074 </li>
3075 <li>
3076 "Harddisk": a virtual hard disk, most probably as a reference to an image file. There can be an
3077 arbitrary number of these items, one for each virtual disk image that accompanies the OVF. The
3078 array item in aOrigValues[] will contain the file specification from the OVF file, whereas the item
3079 in aConfigValues[] will contain a qualified path specification where the hard disk image should
3080 be copied to; this target image will then be registered with VirtualBox.
3081 The matching item in the aRefs[] array must contain a integer specifying the hard disk controller
3082 to connect the image to. This number must be the same as the integer used by one of the hard disk
3083 controller items (SCSI, SATA or IDE; see above).
3084 </li>
3085 <li>
3086 "NetworkAdapter": a network adapter. (todo document)
3087 </li>
3088 <li>
3089 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3090 present, sound support will be enabled for the new virtual machine. Note that the virtual
3091 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3092 may be different from the virtual soundcard expected by the appliance.
3093 </li>
3094 </ul>
3095
3096 </desc>
3097
3098 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3099 <desc></desc>
3100 </param>
3101
3102 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3103 <desc></desc>
3104 </param>
3105
3106 <param name="aOrigValues" type="wstring" dir="out" safearray="yes">
3107 <desc></desc>
3108 </param>
3109
3110 <param name="aConfigValues" type="wstring" dir="out" safearray="yes">
3111 <desc></desc>
3112 </param>
3113
3114 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3115 <desc></desc>
3116 </param>
3117
3118 </method>
3119
3120 <method name="SetFinalValues">
3121 <desc></desc>
3122
3123 <param name="aFinaleValues" type="wstring" dir="in" safearray="yes">
3124 <desc></desc>
3125 </param>
3126
3127 </method>
3128
3129 </interface>
3130
3131
3132 <!--
3133 // IMachine
3134 /////////////////////////////////////////////////////////////////////////
3135 -->
3136
3137 <enumerator
3138 name="IMachineEnumerator" type="IMachine"
3139 uuid="1b554149-be0a-4465-9252-9ff8f420af55"
3140 />
3141
3142 <collection
3143 name="IMachineCollection" type="IMachine" enumerator="IMachineEnumerator"
3144 uuid="FD443EC1-3007-4F5B-9282-D72760A66916"
3145 readonly="yes"
3146 />
3147
3148 <interface
3149 name="IInternalMachineControl" extends="$unknown"
3150 uuid="4042ddf2-93d3-4749-8517-dde3f17ea630"
3151 internal="yes"
3152 wsmap="suppress"
3153 >
3154 <method name="updateState">
3155 <desc>
3156 Updates the VM state.
3157 <note>
3158 This operation will also update the settings file with
3159 the correct information about the saved state file
3160 and delete this file from disk when appropriate.
3161 </note>
3162 </desc>
3163 <param name="state" type="MachineState" dir="in"/>
3164 </method>
3165
3166 <method name="getIPCId">
3167 <param name="id" type="wstring" dir="return"/>
3168 </method>
3169
3170 <method name="runUSBDeviceFilters">
3171 <desc>
3172 Asks the server to run USB devices filters of the associated
3173 machine against the given USB device and tell if there is
3174 a match.
3175 <note>
3176 Intended to be used only for remote USB devices. Local
3177 ones don't require to call this method (this is done
3178 implicitly by the Host and USBProxyService).
3179 </note>
3180 </desc>
3181 <param name="device" type="IUSBDevice" dir="in"/>
3182 <param name="matched" type="boolean" dir="out"/>
3183 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3184 </method>
3185
3186 <method name="captureUSBDevice">
3187 <desc>
3188 Requests a capture of the given host USB device.
3189 When the request is completed, the VM process will
3190 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3191 notification.
3192 </desc>
3193 <param name="id" type="uuid" dir="in"/>
3194 </method>
3195
3196 <method name="detachUSBDevice">
3197 <desc>
3198 Notification that a VM is going to detach (done = false) or has
3199 already detached (done = true) the given USB device.
3200 When the done = true request is completed, the VM process will
3201 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3202 notification.
3203 <note>
3204 In the done = true case, the server must run its own filters
3205 and filters of all VMs but this one on the detached device
3206 as if it were just attached to the host computer.
3207 </note>
3208 </desc>
3209 <param name="id" type="uuid" dir="in"/>
3210 <param name="done" type="boolean" dir="in"/>
3211 </method>
3212
3213 <method name="autoCaptureUSBDevices">
3214 <desc>
3215 Requests a capture all matching USB devices attached to the host.
3216 When the request is completed, the VM process will
3217 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3218 notification per every captured device.
3219 </desc>
3220 </method>
3221
3222 <method name="detachAllUSBDevices">
3223 <desc>
3224 Notification that a VM that is being powered down. The done
3225 parameter indicates whether which stage of the power down
3226 we're at. When done = false the VM is announcing its
3227 intentions, while when done = true the VM is reporting
3228 what it has done.
3229 <note>
3230 In the done = true case, the server must run its own filters
3231 and filters of all VMs but this one on all detach devices as
3232 if they were just attached to the host computer.
3233 </note>
3234 </desc>
3235 <param name="done" type="boolean" dir="in"/>
3236 </method>
3237
3238 <method name="onSessionEnd">
3239 <desc>
3240 Triggered by the given session object when the session is about
3241 to close normally.
3242 </desc>
3243 <param name="session" type="ISession" dir="in">
3244 <desc>Session that is being closed</desc>
3245 </param>
3246 <param name="progress" type="IProgress" dir="return">
3247 <desc>
3248 Used to wait until the corresponding machine is actually
3249 dissociated from the given session on the server.
3250 Returned only when this session is a direct one.
3251 </desc>
3252 </param>
3253 </method>
3254
3255 <method name="beginSavingState">
3256 <desc>
3257 Called by the VM process to inform the server it wants to
3258 save the current state and stop the VM execution.
3259 </desc>
3260 <param name="progress" type="IProgress" dir="in">
3261 <desc>
3262 Progress object created by the VM process to wait until
3263 the state is saved.
3264 </desc>
3265 </param>
3266 <param name="stateFilePath" type="wstring" dir="out">
3267 <desc>
3268 File path the VM process must save the execution state to.
3269 </desc>
3270 </param>
3271 </method>
3272
3273 <method name="endSavingState">
3274 <desc>
3275 Called by the VM process to inform the server that saving
3276 the state previously requested by #beginSavingState is either
3277 successfully finished or there was a failure.
3278
3279 <result name="VBOX_E_FILE_ERROR">
3280 Settings file not accessible.
3281 </result>
3282 <result name="VBOX_E_XML_ERROR">
3283 Could not parse the settings file.
3284 </result>
3285
3286 </desc>
3287
3288 <param name="success" type="boolean" dir="in">
3289 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3290 otherwise.
3291 </desc>
3292 </param>
3293 </method>
3294
3295 <method name="adoptSavedState">
3296 <desc>
3297 Gets called by IConsole::adoptSavedState.
3298 <result name="VBOX_E_FILE_ERROR">
3299 Invalid saved state file path.
3300 </result>
3301 </desc>
3302 <param name="savedStateFile" type="wstring" dir="in">
3303 <desc>Path to the saved state file to adopt.</desc>
3304 </param>
3305 </method>
3306
3307 <method name="beginTakingSnapshot">
3308 <desc>
3309 Called by the VM process to inform the server it wants to
3310 take a snapshot.
3311
3312 <result name="VBOX_E_FILE_ERROR">
3313 Settings file not accessible.
3314 </result>
3315 <result name="VBOX_E_XML_ERROR">
3316 Could not parse the settings file.
3317 </result>
3318 </desc>
3319 <param name="initiator" type="IConsole" dir="in">
3320 <desc>The console object that initiated this call.</desc>
3321 </param>
3322 <param name="name" type="wstring" dir="in">
3323 <desc>Snapshot name.</desc>
3324 </param>
3325 <param name="description" type="wstring" dir="in">
3326 <desc>Snapshot description.</desc>
3327 </param>
3328 <param name="progress" type="IProgress" dir="in">
3329 <desc>
3330 Progress object created by the VM process to wait until
3331 the state is saved (only for online snapshots).
3332 </desc>
3333 </param>
3334 <param name="stateFilePath" type="wstring" dir="out">
3335 <desc>
3336 File path the VM process must save the execution state to.
3337 </desc>
3338 </param>
3339 <param name="serverProgress" type="IProgress" dir="out">
3340 <desc>
3341 Progress object created by the server process to wait until
3342 the snapshot is taken (VDI diff creation, etc.).
3343 </desc>
3344 </param>
3345 </method>
3346
3347 <method name="endTakingSnapshot">
3348 <desc>
3349 Called by the VM process to inform the server that the snapshot
3350 previously requested by #beginTakingSnapshot is either
3351 successfully taken or there was a failure.
3352 </desc>
3353
3354 <param name="success" type="boolean" dir="in">
3355 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3356 </param>
3357 </method>
3358
3359 <method name="discardSnapshot">
3360 <desc>
3361 Gets called by IConsole::discardSnapshot.
3362 <result name="VBOX_E_INVALID_OBJECT_STATE">
3363 Snapshot has more than one child snapshot.
3364 </result>
3365 </desc>
3366 <param name="initiator" type="IConsole" dir="in">
3367 <desc>The console object that initiated this call.</desc>
3368 </param>
3369 <param name="id" type="uuid" dir="in">
3370 <desc>UUID of the snapshot to discard.</desc>
3371 </param>
3372 <param name="machineState" type="MachineState" dir="out">
3373 <desc>New machine state after this operation is started.</desc>
3374 </param>
3375 <param name="progress" type="IProgress" dir="return">
3376 <desc>Progress object to track the operation completion.</desc>
3377 </param>
3378 </method>
3379
3380 <method name="discardCurrentState">
3381 <desc>
3382 Gets called by IConsole::discardCurrentState.
3383 <result name="VBOX_E_INVALID_OBJECT_STATE">
3384 Virtual machine does not have any snapshot.
3385 </result>
3386 </desc>
3387 <param name="initiator" type="IConsole" dir="in">
3388 <desc>The console object that initiated this call.</desc>
3389 </param>
3390 <param name="machineState" type="MachineState" dir="out">
3391 <desc>New machine state after this operation is started.</desc>
3392 </param>
3393 <param name="progress" type="IProgress" dir="return">
3394 <desc>Progress object to track the operation completion.</desc>
3395 </param>
3396 </method>
3397
3398 <method name="discardCurrentSnapshotAndState">
3399 <desc>
3400 Gets called by IConsole::discardCurrentSnapshotAndState.
3401 <result name="VBOX_E_INVALID_OBJECT_STATE">
3402 Virtual machine does not have any snapshot.
3403 </result>
3404 </desc>
3405 <param name="initiator" type="IConsole" dir="in">
3406 <desc>The console object that initiated this call.</desc>
3407 </param>
3408 <param name="machineState" type="MachineState" dir="out">
3409 <desc>New machine state after this operation is started.</desc>
3410 </param>
3411 <param name="progress" type="IProgress" dir="return">
3412 <desc>Progress object to track the operation completion.</desc>
3413 </param>
3414 </method>
3415
3416 <method name="pullGuestProperties">
3417 <desc>
3418 Get the list of the guest properties matching a set of patterns along
3419 with their values, time stamps and flags and give responsibility for
3420 managing properties to the console.
3421 </desc>
3422 <param name="name" type="wstring" dir="out" safearray="yes">
3423 <desc>
3424 The names of the properties returned.
3425 </desc>
3426 </param>
3427 <param name="value" type="wstring" dir="out" safearray="yes">
3428 <desc>
3429 The values of the properties returned. The array entries match the
3430 corresponding entries in the @a name array.
3431 </desc>
3432 </param>
3433 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3434 <desc>
3435 The time stamps of the properties returned. The array entries match
3436 the corresponding entries in the @a name array.
3437 </desc>
3438 </param>
3439 <param name="flags" type="wstring" dir="out" safearray="yes">
3440 <desc>
3441 The flags of the properties returned. The array entries match the
3442 corresponding entries in the @a name array.
3443 </desc>
3444 </param>
3445 </method>
3446
3447 <method name="pushGuestProperties">
3448 <desc>
3449 Set the list of the guest properties matching a set of patterns along
3450 with their values, time stamps and flags and return responsibility for
3451 managing properties to IMachine.
3452 </desc>
3453 <param name="name" type="wstring" dir="in" safearray="yes">
3454 <desc>
3455 The names of the properties.
3456 </desc>
3457 </param>
3458 <param name="value" type="wstring" dir="in" safearray="yes">
3459 <desc>
3460 The values of the properties. The array entries match the
3461 corresponding entries in the @a name array.
3462 </desc>
3463 </param>
3464 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3465 <desc>
3466 The time stamps of the properties. The array entries match
3467 the corresponding entries in the @a name array.
3468 </desc>
3469 </param>
3470 <param name="flags" type="wstring" dir="in" safearray="yes">
3471 <desc>
3472 The flags of the properties. The array entries match the
3473 corresponding entries in the @a name array.
3474 </desc>
3475 </param>
3476 </method>
3477 <method name="pushGuestProperty">
3478 <desc>
3479 Update a single guest property in IMachine.
3480 </desc>
3481 <param name="name" type="wstring" dir="in">
3482 <desc>
3483 The name of the property to be updated.
3484 </desc>
3485 </param>
3486 <param name="value" type="wstring" dir="in">
3487 <desc>
3488 The value of the property.
3489 </desc>
3490 </param>
3491 <param name="timestamp" type="unsigned long long" dir="in">
3492 <desc>
3493 The timestamp of the property.
3494 </desc>
3495 </param>
3496 <param name="flags" type="wstring" dir="in">
3497 <desc>
3498 The flags of the property.
3499 </desc>
3500 </param>
3501 </method>
3502 </interface>
3503
3504 <interface
3505 name="IBIOSSettings" extends="$unknown"
3506 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3507 wsmap="managed"
3508 >
3509 <desc>
3510 The IBIOSSettings interface represents BIOS settings of the virtual
3511 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3512 </desc>
3513 <attribute name="logoFadeIn" type="boolean">
3514 <desc>Fade in flag for BIOS logo animation.</desc>
3515 </attribute>
3516
3517 <attribute name="logoFadeOut" type="boolean">
3518 <desc>Fade out flag for BIOS logo animation.</desc>
3519 </attribute>
3520
3521 <attribute name="logoDisplayTime" type="unsigned long">
3522 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3523 </attribute>
3524
3525 <attribute name="logoImagePath" type="wstring">
3526 <desc>Local file system path for external BIOS image.</desc>
3527 </attribute>
3528
3529 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3530 <desc>Mode of the BIOS boot device menu.</desc>
3531 </attribute>
3532
3533 <attribute name="ACPIEnabled" type="boolean">
3534 <desc>ACPI support flag.</desc>
3535 </attribute>
3536
3537 <attribute name="IOAPICEnabled" type="boolean">
3538 <desc>
3539 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3540 and support IRQs above 15.
3541 </desc>
3542 </attribute>
3543
3544 <attribute name="timeOffset" type="long long">
3545 <desc>
3546 Offset in milliseconds from the host system time. This allows for
3547 guests running with a different system date/time than the host.
3548 It is equivalent to setting the system date/time in the BIOS except
3549 it is not an absolute value but a relative one. Guest Additions
3550 time synchronization honors this offset.
3551 </desc>
3552 </attribute>
3553
3554 <attribute name="PXEDebugEnabled" type="boolean">
3555 <desc>
3556 PXE debug logging flag. If set, VirtualBox will write extensive
3557 PXE trace information to the release log.
3558 </desc>
3559 </attribute>
3560
3561 <attribute name="IDEControllerType" type="IDEControllerType">
3562 <desc>
3563 Type of the virtual IDE controller. Depending on this value,
3564 VirtualBox will provide different virtual IDE hardware
3565 devices to the guest.
3566 </desc>
3567 </attribute>
3568
3569 </interface>
3570
3571 <interface
3572 name="IMachine" extends="$unknown"
3573 uuid="ea6fb7ea-1993-4642-b113-f29eb39e0df0"
3574 wsmap="managed"
3575 >
3576 <desc>
3577 The IMachine interface represents a virtual machine, or guest, created
3578 in VirtualBox.
3579
3580 This interface is used in two contexts. First of all, a collection of
3581 objects implementing this interface is stored in the
3582 <link to="IVirtualBox::machines2"/> attribute which lists all the virtual
3583 machines that are currently registered with this VirtualBox
3584 installation. Also, once a session has been opened for the given virtual
3585 machine (e.g. the virtual machine is running), the machine object
3586 associated with the open session can be queried from the session object;
3587 see <link to="ISession"/> for details.
3588
3589 The main role of this interface is to expose the settings of the virtual
3590 machine and provide methods to change various aspects of the virtual
3591 machine's configuration. For machine objects stored in the
3592 <link to="IVirtualBox::machines2"/> collection, all attributes are
3593 read-only unless explicitly stated otherwise in individual attribute
3594 and method descriptions. In order to change a machine setting, a session
3595 for this machine must be opened using one of
3596 <link to="IVirtualBox::openSession"/>,
3597 <link to="IVirtualBox::openRemoteSession"/> or
3598 <link to="IVirtualBox::openExistingSession"/> methods. After the
3599 session has been successfully opened, a mutable machine object needs to
3600 be queried from the session object and then the desired settings changes
3601 can be applied to the returned object using IMachine attributes and
3602 methods. See the ISession interface description for more information
3603 about sessions.
3604
3605 Note that the IMachine interface does not provide methods to control
3606 virtual machine execution (such as start the machine, or power it
3607 down) -- these methods are grouped in a separate IConsole
3608 interface. Refer to the IConsole interface description to get more
3609 information about this topic.
3610
3611 <see>ISession, IConsole</see>
3612 </desc>
3613
3614 <attribute name="parent" type="IVirtualBox" readonly="yes">
3615 <desc>Associated parent object.</desc>
3616 </attribute>
3617
3618 <attribute name="accessible" type="boolean" readonly="yes">
3619 <desc>
3620 Whether this virtual machine is currently accessible or not.
3621
3622 The machine is considered to be inaccessible when:
3623 <ul>
3624 <li>It is a registered virtual machine, and
3625 </li>
3626 <li>Its settings file is inaccessible (for example, it is
3627 located on a network share that is not accessible during
3628 VirtualBox startup, or becomes inaccessible later, or if
3629 the settings file can be read but is invalid).
3630 </li>
3631 </ul>
3632
3633 Otherwise, the value of this property is always <tt>true</tt>.
3634
3635 Every time this property is read, the accessibility state of
3636 this machine is re-evaluated. If the returned value is |false|,
3637 the <link to="#accessError"/> property may be used to get the
3638 detailed error information describing the reason of
3639 inaccessibility.
3640
3641 When the machine is inaccessible, only the following properties
3642 can be used on it:
3643 <ul>
3644 <li><link to="#parent"/></li>
3645 <li><link to="#id"/></li>
3646 <li><link to="#settingsFilePath"/></li>
3647 <li><link to="#accessible"/></li>
3648 <li><link to="#accessError"/></li>
3649 </ul>
3650
3651 An attempt to access any other property or method will return
3652 an error.
3653
3654 The only possible action you can perform on an inaccessible
3655 machine is to unregister it using the
3656 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3657 for the accessibility state once more by querying this
3658 property).
3659
3660 <note>
3661 In the current implementation, once this property returns
3662 <tt>true</tt>, the machine will never become inaccessible
3663 later, even if its settings file cannot be successfully
3664 read/written any more (at least, until the VirtualBox
3665 server is restarted). This limitation may be removed in
3666 future releases.
3667 </note>
3668 </desc>
3669 </attribute>
3670
3671 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3672 <desc>
3673 Error information describing the reason of machine
3674 inaccessibility.
3675
3676 Reading this property is only valid after the last call to
3677 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3678 machine is currently unaccessible). Otherwise, a null
3679 IVirtualBoxErrorInfo object will be returned.
3680 </desc>
3681 </attribute>
3682
3683 <attribute name="name" type="wstring">
3684 <desc>
3685 Name of the virtual machine.
3686
3687 Besides being used for human-readable identification purposes
3688 everywhere in VirtualBox, the virtual machine name is also used
3689 as a name of the machine's settings file and as a name of the
3690 subdirectory this settings file resides in. Thus, every time you
3691 change the value of this property, the settings file will be
3692 renamed once you call <link to="#saveSettings()"/> to confirm the
3693 change. The containing subdirectory will be also renamed, but
3694 only if it has exactly the same name as the settings file
3695 itself prior to changing this property (for backward compatibility
3696 with previous API releases). The above implies the following
3697 limitations:
3698 <ul>
3699 <li>The machine name cannot be empty.</li>
3700 <li>The machine name can contain only characters that are valid
3701 file name characters according to the rules of the file
3702 system used to store VirtualBox configuration.</li>
3703 <li>You cannot have two or more machines with the same name
3704 if they use the same subdirectory for storing the machine
3705 settings files.</li>
3706 <li>You cannot change the name of the machine if it is running,
3707 or if any file in the directory containing the settings file
3708 is being used by another running machine or by any other
3709 process in the host operating system at a time when
3710 <link to="#saveSettings()"/> is called.
3711 </li>
3712 </ul>
3713 If any of the above limitations are hit, <link to="#saveSettings()"/>
3714 will return an appropriate error message explaining the exact
3715 reason and the changes you made to this machine will not be
3716 saved.
3717 <note>
3718 For "legacy" machines created using the
3719 <link to="IVirtualBox::createLegacyMachine()"/> call,
3720 the above naming limitations do not apply because the
3721 machine name does not affect the settings file name.
3722 The settings file name remains the same as it was specified
3723 during machine creation and never changes.
3724 </note>
3725 </desc>
3726 </attribute>
3727
3728 <attribute name="description" type="wstring">
3729 <desc>
3730 Description of the virtual machine.
3731
3732 The description attribute can contain any text and is
3733 typically used to describe the hardware and software
3734 configuration of the virtual machine in detail (i.e. network
3735 settings, versions of the installed software and so on).
3736 </desc>
3737 </attribute>
3738
3739 <attribute name="id" type="uuid" readonly="yes">
3740 <desc>UUID of the virtual machine.</desc>
3741 </attribute>
3742
3743 <attribute name="OSTypeId" type="wstring">
3744 <desc>
3745 User-defined identifier of the Guest OS type.
3746 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3747 an IGuestOSType object representing details about the given
3748 Guest OS type.
3749 <note>
3750 This value may differ from the value returned by
3751 <link to="IGuest::OSTypeId"/> if Guest Additions are
3752 installed to the guest OS.
3753 </note>
3754 </desc>
3755 </attribute>
3756
3757 <attribute name="HardwareVersion" type="wstring">
3758 <desc>Hardware version identifier. Internal use only for now.</desc>
3759 </attribute>
3760
3761 <attribute name="CPUCount" type="unsigned long">
3762 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3763 </attribute>
3764
3765 <attribute name="memorySize" type="unsigned long">
3766 <desc>System memory size in megabytes.</desc>
3767 </attribute>
3768
3769 <attribute name="memoryBalloonSize" type="unsigned long">
3770 <desc>Initial memory balloon size in megabytes.</desc>
3771 </attribute>
3772
3773 <attribute name="statisticsUpdateInterval" type="unsigned long">
3774 <desc>Initial interval to update guest statistics in seconds.</desc>
3775 </attribute>
3776
3777 <attribute name="VRAMSize" type="unsigned long">
3778 <desc>Video memory size in megabytes.</desc>
3779 </attribute>
3780
3781 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3782 <desc>
3783 This setting determines whether VirtualBox allows guests to make use
3784 of the 3D graphics support available on the host. Currently limited
3785 to OpenGL only. </desc>
3786 </attribute>
3787
3788 <attribute name="monitorCount" type="unsigned long">
3789 <desc>
3790 Number of virtual monitors.
3791 <note>
3792 Only effective on Windows XP and later guests with
3793 Guest Additions installed.
3794 </note>
3795 </desc>
3796 </attribute>
3797
3798 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3799 <desc>Object containing all BIOS settings.</desc>
3800 </attribute>
3801
3802 <attribute name="HWVirtExEnabled" type="TSBool">
3803 <desc>
3804 This setting determines whether VirtualBox will try to make use of
3805 the host CPU's hardware virtualization extensions such as Intel VT-x
3806 and AMD-V. Note that in case such extensions are not available,
3807 they will not be used.
3808 </desc>
3809 </attribute>
3810
3811 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3812 <desc>
3813 This setting determines whether VirtualBox will try to make use of
3814 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3815 such extensions are not available, they will not be used.
3816 </desc>
3817 </attribute>
3818
3819 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3820 <desc>
3821 This setting determines whether VirtualBox will try to make use of
3822 the VPID extension of Intel VT-x. Note that in case such extensions are
3823 not available, they will not be used.
3824 </desc>
3825 </attribute>
3826
3827 <attribute name="PAEEnabled" type="boolean" default="false">
3828 <desc>
3829 This setting determines whether VirtualBox will expose the Physical Address
3830 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3831 is not available, it will not be reported.
3832 </desc>
3833 </attribute>
3834
3835 <attribute name="snapshotFolder" type="wstring">
3836 <desc>
3837 Full path to the directory used to store snapshot data
3838 (differencing hard disks and saved state files) of this machine.
3839
3840 The initial value of this property is
3841 <tt>&lt;</tt><link to="#settingsFilePath">
3842 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3843 <link to="#id">machine_uuid</link>
3844 <tt>&gt;</tt>.
3845
3846 Currently, it is an error to try to change this property on
3847 a machine that has snapshots (because this would require to
3848 move possibly large files to a different location).
3849 A separate method will be available for this purpose later.
3850
3851 <note>
3852 Setting this property to <tt>null</tt> will restore the
3853 initial value.
3854 </note>
3855 <note>
3856 When setting this property, the specified path can be
3857 absolute (full path) or relative to the directory where the
3858 <link to="#settingsFilePath">machine settings file</link>
3859 is located. When reading this property, a full path is
3860 always returned.
3861 </note>
3862 <note>
3863 The specified path may not exist, it will be created
3864 when necessary.
3865 </note>
3866 </desc>
3867 </attribute>
3868
3869 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3870 <desc>VRDP server object.</desc>
3871 </attribute>
3872
3873 <attribute name="hardDisk2Attachments" type="IHardDisk2Attachment" readonly="yes" safearray="yes">
3874 <desc>Array of hard disks attached to this machine.</desc>
3875 </attribute>
3876
3877 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3878 <desc>Associated DVD drive object.</desc>
3879 </attribute>
3880
3881 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3882 <desc>Associated floppy drive object.</desc>
3883 </attribute>
3884
3885 <attribute name="USBController" type="IUSBController" readonly="yes">
3886 <desc>
3887 Associated USB controller object.
3888
3889 <note>
3890 This method may set a @ref com_warnings "warning result code".
3891 </note>
3892 <note>
3893 If USB functionality is not available in the given edition of
3894 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3895 </note>
3896 </desc>
3897 </attribute>
3898
3899 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3900 <desc>Associated audio adapter, always present.</desc>
3901 </attribute>
3902
3903 <attribute name="SATAController" type="ISATAController" readonly="yes">
3904 <desc>
3905 Associated SATA controller object.
3906 </desc>
3907 </attribute>
3908
3909 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3910 <desc>
3911 Full name of the file containing machine settings data.
3912 </desc>
3913 </attribute>
3914
3915 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
3916 <desc>
3917 Current version of the format of the settings file of this machine
3918 (<link to="#settingsFilePath"/>).
3919
3920 The version string has the following format:
3921 <pre>
3922 x.y-platform
3923 </pre>
3924 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
3925 versions, and <tt>platform</tt> is the platform identifier.
3926
3927 The current version usually matches the value of the
3928 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
3929 settings file was created by an older version of VirtualBox and there
3930 was a change of the settings file format since then.
3931
3932 Note that VirtualBox automatically converts settings files from older
3933 versions to the most recent version when reading them (usually at
3934 VirtualBox startup) but it doesn't save the changes back until
3935 you call a method that implicitly saves settings (such as
3936 <link to="#setExtraData()"/>) or call <link to="#saveSettings()"/>
3937 explicitly. Therefore, if the value of this attribute differs from the
3938 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
3939 means that the settings file was converted but the result of the
3940 conversion is not yet saved to disk.
3941
3942 The above feature may be used by interactive front-ends to inform users
3943 about the settings file format change and offer them to explicitly save
3944 all converted settings files (the global and VM-specific ones),
3945 optionally create backup copies of the old settings files before saving,
3946 etc.
3947
3948 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
3949 </desc>
3950 </attribute>
3951
3952 <attribute name="settingsModified" type="boolean" readonly="yes">
3953 <desc>
3954 Whether the settings of this machine have been modified
3955 (but neither yet saved nor discarded).
3956 <note>
3957 Reading this property is only valid on instances returned
3958 by <link to="ISession::machine"/> and on new machines
3959 created by <link to="IVirtualBox::createMachine"/> or opened
3960 by <link to="IVirtualBox::openMachine"/> but not
3961 yet registered, or on unregistered machines after calling
3962 <link to="IVirtualBox::unregisterMachine"/>. For all other
3963 cases, the settings can never be modified.
3964 </note>
3965 <note>
3966 For newly created unregistered machines, the value of this
3967 property is always TRUE until <link to="#saveSettings()"/>
3968 is called (no matter if any machine settings have been
3969 changed after the creation or not). For opened machines
3970 the value is set to FALSE (and then follows to normal rules).
3971 </note>
3972 </desc>
3973 </attribute>
3974
3975 <attribute name="sessionState" type="SessionState" readonly="yes">
3976 <desc>Current session state for this machine.</desc>
3977 </attribute>
3978
3979 <attribute name="sessionType" type="wstring" readonly="yes">
3980 <desc>
3981 Type of the session. If <link to="#sessionState"/> is
3982 SessionSpawning or SessionOpen, this attribute contains the
3983 same value as passed to the
3984 <link to="IVirtualBox::openRemoteSession()"/> method in the @a
3985 type parameter. If the session was opened directly using
3986 <link to="IVirtualBox::openSession()"/>, or if
3987 <link to="#sessionState"/> is SessionClosed, the value of this
3988 attribute is @c null.
3989 </desc>
3990 </attribute>
3991
3992 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3993 <desc>
3994 Identifier of the session process. This attribute contains the
3995 platform-dependent identifier of the process that has opened a
3996 direct session for this machine using the
3997 <link to="IVirtualBox::openSession()"/> call. The returned value
3998 is only valid if <link to="#sessionState"/> is SessionOpen or
3999 SessionClosing (i.e. a session is currently open or being
4000 closed) by the time this property is read.
4001 </desc>
4002 </attribute>
4003
4004 <attribute name="state" type="MachineState" readonly="yes">
4005 <desc>Current execution state of this machine.</desc>
4006 </attribute>
4007
4008 <attribute name="lastStateChange" type="long long" readonly="yes">
4009 <desc>
4010 Time stamp of the last execution state change,
4011 in milliseconds since 1970-01-01 UTC.
4012 </desc>
4013 </attribute>
4014
4015 <attribute name="stateFilePath" type="wstring" readonly="yes">
4016 <desc>
4017 Full path to the file that stores the execution state of
4018 the machine when it is in the <link to="MachineState_Saved"/> state.
4019 <note>
4020 When the machine is not in the Saved state, this attribute
4021 <tt>null</tt>.
4022 </note>
4023 </desc>
4024 </attribute>
4025
4026 <attribute name="logFolder" type="wstring" readonly="yes">
4027 <desc>
4028 Full path to the folder that stores a set of rotated log files
4029 recorded during machine execution. The most recent log file is
4030 named <tt>VBox.log</tt>, the previous log file is
4031 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4032 in the current version).
4033 </desc>
4034 </attribute>
4035
4036 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4037 <desc>
4038 Current snapshot of this machine.
4039 <note>
4040 A <tt>null</tt> object is returned if the machine doesn't
4041 have snapshots.
4042 </note>
4043 <see><link to="ISnapshot"/></see>
4044 </desc>
4045 </attribute>
4046
4047 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4048 <desc>
4049 Number of snapshots taken on this machine. Zero means the
4050 machine doesn't have any snapshots.
4051 </desc>
4052 </attribute>
4053
4054 <attribute name="currentStateModified" type="boolean" readonly="yes">
4055 <desc>
4056 Returns <tt>true</tt> if the current state of the machine is not
4057 identical to the state stored in the current snapshot.
4058
4059 The current state is identical to the current snapshot right
4060 after one of the following calls are made:
4061 <ul>
4062 <li><link to="IConsole::discardCurrentState"/> or
4063 <link to="IConsole::discardCurrentSnapshotAndState"/>
4064 </li>
4065 <li><link to="IConsole::takeSnapshot"/> (issued on a
4066 powered off or saved machine, for which
4067 <link to="#settingsModified"/> returns <tt>false</tt>)
4068 </li>
4069 <li><link to="IMachine::setCurrentSnapshot"/>
4070 </li>
4071 </ul>
4072
4073 The current state remains identical until one of the following
4074 happens:
4075 <ul>
4076 <li>settings of the machine are changed</li>
4077 <li>the saved state is discarded</li>
4078 <li>the current snapshot is discarded</li>
4079 <li>an attempt to execute the machine is made</li>
4080 </ul>
4081
4082 <note>
4083 For machines that don't have snapshots, this property is
4084 always <tt>false</tt>.
4085 </note>
4086 </desc>
4087 </attribute>
4088
4089 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
4090 <desc>
4091 Collection of shared folders for this machine (permanent shared
4092 folders). These folders are shared automatically at machine startup
4093 and available only to the guest OS installed within this machine.
4094
4095 New shared folders are added to the collection using
4096 <link to="#createSharedFolder"/>. Existing shared folders can be
4097 removed using <link to="#removeSharedFolder"/>.
4098 </desc>
4099 </attribute>
4100
4101 <attribute name="clipboardMode" type="ClipboardMode">
4102 <desc>
4103 Synchronization mode between the host OS clipboard
4104 and the guest OS clipboard.
4105 </desc>
4106 </attribute>
4107
4108 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4109 <desc>
4110 A comma-separated list of simple glob patterns. Changes to guest
4111 properties whose name matches one of the patterns will generate an
4112 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4113 </desc>
4114 </attribute>
4115
4116 <method name="setBootOrder">
4117 <desc>
4118 Puts the given device to the specified position in
4119 the boot order.
4120
4121 To indicate that no device is associated with the given position,
4122 <link to="DeviceType_Null"/> should be used.
4123
4124 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4125
4126 <result name="E_INVALIDARG">
4127 Boot @a position out of range.
4128 </result>
4129 <result name="E_NOTIMPL">
4130 Booting from USB @a device currently not supported.
4131 </result>
4132
4133 </desc>
4134 <param name="position" type="unsigned long" dir="in">
4135 <desc>
4136 Position in the boot order (<tt>1</tt> to the total number of
4137 devices the machine can boot from, as returned by
4138 <link to="ISystemProperties::maxBootPosition"/>).
4139 </desc>
4140 </param>
4141 <param name="device" type="DeviceType" dir="in">
4142 <desc>
4143 The type of the device used to boot at the given position.
4144 </desc>
4145 </param>
4146 </method>
4147
4148 <method name="getBootOrder" const="yes">
4149 <desc>
4150 Returns the device type that occupies the specified
4151 position in the boot order.
4152
4153 @todo [remove?]
4154 If the machine can have more than one device of the returned type
4155 (such as hard disks), then a separate method should be used to
4156 retrieve the individual device that occupies the given position.
4157
4158 If here are no devices at the given position, then
4159 <link to="DeviceType_Null"/> is returned.
4160
4161 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4162
4163 <result name="E_INVALIDARG">
4164 Boot @a position out of range.
4165 </result>
4166
4167 </desc>
4168 <param name="position" type="unsigned long" dir="in">
4169 <desc>
4170 Position in the boot order (<tt>1</tt> to the total number of
4171 devices the machine can boot from, as returned by
4172 <link to="ISystemProperties::maxBootPosition"/>).
4173 </desc>
4174 </param>
4175 <param name="device" type="DeviceType" dir="return">
4176 <desc>
4177 Device at the given position.
4178 </desc>
4179 </param>
4180 </method>
4181
4182 <method name="attachHardDisk2">
4183 <desc>
4184 Attaches a virtual hard disk identified by the given UUID @a id
4185 to a device slot of the specified bus.
4186
4187 For the IDE bus, the @a channel parameter can be either @c 0 or @c 1, to
4188 specify the primary or secondary IDE controller, respectively. The
4189 SATA bus supports 30 channels, so this parameter can be a number
4190 ranging from @c 0 to @c 29.
4191
4192 For the primary controller of the IDE bus, the @a device number can be
4193 either @c 0 or @c 1, to specify the master or the slave device,
4194 respectively. For the secondary IDE controller, the device number is
4195 always @c 1 because the master device is reserved for the CD-ROM drive.
4196
4197 For the SATA bus, the @a device parameter is currently unused and
4198 must be @c 0.
4199
4200 The specified device slot must not have another disk attached to it, or
4201 this method will fail.
4202
4203 See <link to="IHardDisk2"/> for more detailed information about
4204 attaching hard disks.
4205
4206 <note>
4207 You cannot attach a hard disk to a running machine. Also, you cannot
4208 attach a hard disk to a newly created machine until this machine's
4209 settings are saved to disk using <link to="#saveSettings()"/>.
4210 </note>
4211 <note>
4212 If the hard disk is being attached indirectly, a new differencing hard
4213 disk will implicitly be created for it and attached instead. If the
4214 changes made to the machine settings (including this indirect
4215 attachment) are later cancelled using <link to="#discardSettings()"/>,
4216 this implicitly created differencing hard disk will implicitly
4217 be deleted.
4218 </note>
4219
4220 <result name="E_INVALIDARG">
4221 SATA device, SATA channel, IDE channel or IDE slot out of range.
4222 </result>
4223 <result name="VBOX_E_INVALID_OBJECT_STATE">
4224 Attempt to attach hard disk to an unregistered virtual machine.
4225 </result>
4226 <result name="VBOX_E_INVALID_VM_STATE">
4227 Invalid machine state.
4228 </result>
4229 <result name="VBOX_E_OBJECT_IN_USE">
4230 Hard disk already attached to this or another virtual machine.
4231 </result>
4232
4233 </desc>
4234 <param name="id" type="uuid" dir="in">
4235 <desc>UUID of the hard disk to attach.</desc>
4236 </param>
4237 <param name="bus" type="StorageBus" dir="in">
4238 <desc>Type of the storage bus to use (IDE or SATA).</desc>
4239 </param>
4240 <param name="channel" type="long" dir="in">
4241 <desc>Channel to attach the hard disk to.</desc>
4242 </param>
4243 <param name="device" type="long" dir="in">
4244 <desc>
4245 Device slot in the given channel to attach the hard disk to.
4246 </desc>
4247 </param>
4248 </method>
4249
4250 <method name="getHardDisk2" const="yes">
4251 <desc>
4252 Returns the virtual hard disk attached to a device slot of the specified
4253 bus.
4254
4255 Note that if the hard disk was indirectly attached by
4256 <link to="#attachHardDisk2()"/> to the given device slot then this
4257 method will return not the same object as passed to the
4258 <link to="#attachHardDisk2()"/> call. See <link to="IHardDisk2"/> for
4259 more detailed information about attaching hard disks.
4260
4261 <result name="VBOX_E_OBJECT_NOT_FOUND">
4262 No hard disk attached to given slot/bus.
4263 </result>
4264
4265 </desc>
4266 <param name="bus" type="StorageBus" dir="in">
4267 <desc>Type of the storage bus to query (IDE or SATA).</desc>
4268 </param>
4269 <param name="channel" type="long" dir="in">
4270 <desc>Channel to query.</desc>
4271 </param>
4272 <param name="device" type="long" dir="in">
4273 <desc>Device slot in the given channel to query.</desc>
4274 </param>
4275 <param name="hardDisk" type="IHardDisk2" dir="return">
4276 <desc>Attached hard disk object.</desc>
4277 </param>
4278 </method>
4279
4280 <method name="detachHardDisk2">
4281 <desc>
4282 Detaches the virtual hard disk attached to a device slot of the
4283 specified bus.
4284
4285 Detaching the hard disk from the virtual machine is deferred. This means
4286 that the hard disk remains associated with the machine when this method
4287 returns and gets actually de-associated only after a successful
4288 <link to="#saveSettings()"/> call. See <link to="IHardDisk2"/>
4289 for more detailed information about attaching hard disks.
4290
4291 <note>
4292 You cannot detach the hard disk from a running machine.
4293 </note>
4294 <note>
4295 Detaching differencing hard disks implicitly created by <link
4296 to="#attachHardDisk2()"/> for the indirect attachment using this
4297 method will <b>not</b> implicitly delete them. The
4298 <link to="IHardDisk2::deleteStorage()"/> operation should be
4299 explicitly performed by the caller after the hard disk is successfully
4300 detached and the settings are saved with
4301 <link to="#saveSettings()"/>, if it is the desired action.
4302 </note>
4303
4304 <result name="VBOX_E_INVALID_VM_STATE">
4305 Attempt to detach hard disk from a running virtual machine.
4306 </result>
4307 <result name="VBOX_E_OBJECT_NOT_FOUND">
4308 No hard disk attached to given slot/bus.
4309 </result>
4310 <result name="VBOX_E_NOT_SUPPORTED">
4311 Hard disk format does not support storage deletion.
4312 </result>
4313
4314 </desc>
4315 <param name="bus" type="StorageBus" dir="in">
4316 <desc>Bus to detach the hard disk from.</desc>
4317 </param>
4318 <param name="channel" type="long" dir="in">
4319 <desc>Channel number to detach the hard disk from.</desc>
4320 </param>
4321 <param name="device" type="long" dir="in">
4322 <desc>Device slot number to detach the hard disk from.</desc>
4323 </param>
4324 </method>
4325
4326 <method name="getNetworkAdapter" const="yes">
4327 <desc>
4328 Returns the network adapter associated with the given slot.
4329 Slots are numbered sequentially, starting with zero. The total
4330 number of adapters per machine is defined by the
4331 <link to="ISystemProperties::networkAdapterCount"/> property,
4332 so the maximum slot number is one less than that property's value.
4333
4334 <result name="E_INVALIDARG">
4335 Invalid @a slot number.
4336 </result>
4337
4338 </desc>
4339 <param name="slot" type="unsigned long" dir="in"/>
4340 <param name="adapter" type="INetworkAdapter" dir="return"/>
4341 </method>
4342
4343 <method name="getSerialPort" const="yes">
4344 <desc>
4345 Returns the serial port associated with the given slot.
4346 Slots are numbered sequentially, starting with zero. The total
4347 number of serial ports per machine is defined by the
4348 <link to="ISystemProperties::serialPortCount"/> property,
4349 so the maximum slot number is one less than that property's value.
4350
4351 <result name="E_INVALIDARG">
4352 Invalid @a slot number.
4353 </result>
4354
4355 </desc>
4356 <param name="slot" type="unsigned long" dir="in"/>
4357 <param name="port" type="ISerialPort" dir="return"/>
4358 </method>
4359
4360 <method name="getParallelPort" const="yes">
4361 <desc>
4362 Returns the parallel port associated with the given slot.
4363 Slots are numbered sequentially, starting with zero. The total
4364 number of parallel ports per machine is defined by the
4365 <link to="ISystemProperties::parallelPortCount"/> property,
4366 so the maximum slot number is one less than that property's value.
4367
4368 <result name="E_INVALIDARG">
4369 Invalid @a slot number.
4370 </result>
4371
4372 </desc>
4373 <param name="slot" type="unsigned long" dir="in"/>
4374 <param name="port" type="IParallelPort" dir="return"/>
4375 </method>
4376
4377 <method name="getNextExtraDataKey">
4378 <desc>
4379 Returns the machine-specific extra data key name following the
4380 supplied key.
4381
4382 An error is returned if the supplied @a key does not exist. @c NULL is
4383 returned in @a nextKey if the supplied key is the last key. When
4384 supplying @c NULL for the @a key, the first key item is returned in @a
4385 nextKey (if there is any). @a nextValue is an optional parameter and
4386 if supplied, the next key's value is returned in it.
4387
4388 <result name="VBOX_E_OBJECT_NOT_FOUND">
4389 Extra data @a key not found.
4390 </result>
4391
4392 </desc>
4393 <param name="key" type="wstring" dir="in">
4394 <desc>Name of the data key to follow.</desc>
4395 </param>
4396 <param name="nextKey" type="wstring" dir="out">
4397 <desc>Name of the next data key.</desc>
4398 </param>
4399 <param name="nextValue" type="wstring" dir="out">
4400 <desc>Value of the next data key.</desc>
4401 </param>
4402 </method>
4403
4404 <method name="getExtraData">
4405 <desc>
4406 Returns associated machine-specific extra data.
4407
4408 If the requested data @a key does not exist, this function will
4409 succeed and return @c NULL in the @a value argument.
4410
4411 <result name="VBOX_E_FILE_ERROR">
4412 Settings file not accessible.
4413 </result>
4414 <result name="VBOX_E_XML_ERROR">
4415 Could not parse the settings file.
4416 </result>
4417
4418 </desc>
4419 <param name="key" type="wstring" dir="in">
4420 <desc>Name of the data key to get.</desc>
4421 </param>
4422 <param name="value" type="wstring" dir="return">
4423 <desc>Value of the requested data key.</desc>
4424 </param>
4425 </method>
4426
4427 <method name="setExtraData">
4428 <desc>
4429 Sets associated machine-specific extra data.
4430
4431 If you pass @c NULL as a key @a value, the given @a key will be
4432 deleted.
4433
4434 <note>
4435 Before performing the actual data change, this method will ask all
4436 registered callbacks using the
4437 <link to="IVirtualBoxCallback::onExtraDataCanChange()"/>
4438 notification for a permission. If one of the callbacks refuses the
4439 new value, the change will not be performed.
4440 </note>
4441 <note>
4442 On success, the
4443 <link to="IVirtualBoxCallback::onExtraDataChange()"/> notification
4444 is called to inform all registered callbacks about a successful data
4445 change.
4446 </note>
4447 <note>
4448 This method can be called outside the machine session and therefore
4449 it's a caller's responsibility to handle possible race conditions
4450 when several clients change the same key at the same time.
4451 </note>
4452
4453 <result name="VBOX_E_FILE_ERROR">
4454 Settings file not accessible.
4455 </result>
4456 <result name="VBOX_E_XML_ERROR">
4457 Could not parse the settings file.
4458 </result>
4459
4460 </desc>
4461 <param name="key" type="wstring" dir="in">
4462 <desc>Name of the data key to set.</desc>
4463 </param>
4464 <param name="value" type="wstring" dir="in">
4465 <desc>Value to assign to the key.</desc>
4466 </param>
4467 </method>
4468
4469 <method name="saveSettings">
4470 <desc>
4471 Saves any changes to machine settings made since the session
4472 has been opened or a new machine has been created, or since the
4473 last call to <link to="#saveSettings()"/> or <link to="#discardSettings()"/>.
4474 For registered machines, new settings become visible to all
4475 other VirtualBox clients after successful invocation of this
4476 method.
4477 <note>
4478 The method sends <link to="IVirtualBoxCallback::onMachineDataChange()"/>
4479 notification event after the configuration has been successfully
4480 saved (only for registered machines).
4481 </note>
4482 <note>
4483 Calling this method is only valid on instances returned
4484 by <link to="ISession::machine"/> and on new machines
4485 created by <link to="IVirtualBox::createMachine"/> but not
4486 yet registered, or on unregistered machines after calling
4487 <link to="IVirtualBox::unregisterMachine"/>.
4488 </note>
4489
4490 <result name="VBOX_E_FILE_ERROR">
4491 Settings file not accessible.
4492 </result>
4493 <result name="VBOX_E_XML_ERROR">
4494 Could not parse the settings file.
4495 </result>
4496 <result name="E_ACCESSDENIED">
4497 Modification request refused.
4498 </result>
4499
4500 </desc>
4501 </method>
4502
4503 <method name="saveSettingsWithBackup">
4504 <desc>
4505 Creates a backup copy of the machine settings file (<link
4506 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4507 <link to="#saveSettings()"/>.
4508
4509 Note that the backup copy is created <b>only</b> if the settings file
4510 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4511 details). Otherwise, this call is fully equivalent to
4512 <link to="#saveSettings()"/> and no backup copying is done.
4513
4514 The backup copy is created in the same directory where the original
4515 settings file is located. It is given the following file name:
4516 <pre>
4517 original.xml.x.y-platform.bak
4518 </pre>
4519 where <tt>original.xml</tt> is the original settings file name
4520 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4521 format of the settings file (before auto-conversion).
4522
4523 If the given backup file already exists, this method will try to add the
4524 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4525 0 to 9) and copy it again until it succeeds. If all suffixes are
4526 occupied, or if any other copy error occurs, this method will return a
4527 failure.
4528
4529 If the copy operation succeeds, the @a bakFileName return argument will
4530 receive a full path to the created backup file (for informational
4531 purposes). Note that this will happen even if the subsequent
4532 <link to="#saveSettings()"/> call performed by this method after the
4533 copy operation, fails.
4534
4535 <note>
4536 The VirtualBox API never calls this method. It is intended purely for
4537 the purposes of creating backup copies of the settings files by
4538 front-ends before saving the results of the automatically performed
4539 settings conversion to disk.
4540 </note>
4541
4542 <see>settingsFileVersion</see>
4543
4544 <result name="VBOX_E_FILE_ERROR">
4545 Settings file not accessible.
4546 </result>
4547 <result name="VBOX_E_XML_ERROR">
4548 Could not parse the settings file.
4549 </result>
4550 <result name="VBOX_E_INVALID_VM_STATE">
4551 Virtual machine is not mutable.
4552 </result>
4553 <result name="E_ACCESSDENIED">
4554 Modification request refused.
4555 </result>
4556
4557 </desc>
4558 <param name="bakFileName" type="wstring" dir="return">
4559 <desc>Full path to the created backup copy.</desc>
4560 </param>
4561 </method>
4562
4563 <method name="discardSettings">
4564 <desc>
4565 Discards any changes to the machine settings made since the session
4566 has been opened or since the last call to <link to="#saveSettings()"/>
4567 or <link to="#discardSettings"/>.
4568 <note>
4569 Calling this method is only valid on instances returned
4570 by <link to="ISession::machine"/> and on new machines
4571 created by <link to="IVirtualBox::createMachine"/> or
4572 opened by <link to="IVirtualBox::openMachine"/> but not
4573 yet registered, or on unregistered machines after calling
4574 <link to="IVirtualBox::unregisterMachine"/>.
4575 </note>
4576
4577 <result name="VBOX_E_INVALID_VM_STATE">
4578 Virtual machine is not mutable.
4579 </result>
4580
4581 </desc>
4582 </method>
4583
4584 <method name="deleteSettings">
4585 <desc>
4586 Deletes the settings file of this machine from disk.
4587 The machine must not be registered in order for this operation
4588 to succeed.
4589 <note>
4590 <link to="#settingsModified"/> will return TRUE after this
4591 method successfully returns.
4592 </note>
4593 <note>
4594 Calling this method is only valid on instances returned
4595 by <link to="ISession::machine"/> and on new machines
4596 created by <link to="IVirtualBox::createMachine"/> or
4597 opened by <link to="IVirtualBox::openMachine"/> but not
4598 yet registered, or on unregistered machines after calling
4599 <link to="IVirtualBox::unregisterMachine"/>.
4600 </note>
4601 <note>
4602 The deleted machine settings file can be restored (saved again)
4603 by calling <link to="#saveSettings()"/>.
4604 </note>
4605
4606 <result name="VBOX_E_INVALID_VM_STATE">
4607 Cannot delete settings of a registered machine or
4608 machine not mutable.
4609 </result>
4610 <result name="VBOX_E_IPRT_ERROR">
4611 Could not delete the settings file.
4612 </result>
4613
4614 </desc>
4615 </method>
4616
4617 <method name="getSnapshot">
4618 <desc>
4619 Returns a snapshot of this machine with the given UUID.
4620 A <tt>null</tt> UUID can be used to obtain the first snapshot
4621 taken on this machine. This is useful if you want to traverse
4622 the whole tree of snapshots starting from the root.
4623
4624 <result name="VBOX_E_OBJECT_NOT_FOUND">
4625 Virtual machine has no snapshots or snapshot not found.
4626 </result>
4627
4628 </desc>
4629 <param name="id" type="uuid" dir="in">
4630 <desc>UUID of the snapshot to get</desc>
4631 </param>
4632 <param name="snapshot" type="ISnapshot" dir="return">
4633 <desc>Snapshot object with the given UUID.</desc>
4634 </param>
4635 </method>
4636
4637 <method name="findSnapshot">
4638 <desc>
4639 Returns a snapshot of this machine with the given name.
4640
4641 <result name="VBOX_E_OBJECT_NOT_FOUND">
4642 Virtual machine has no snapshots or snapshot not found.
4643 </result>
4644
4645 </desc>
4646 <param name="name" type="wstring" dir="in">
4647 <desc>Name of the snapshot to find</desc>
4648 </param>
4649 <param name="snapshot" type="ISnapshot" dir="return">
4650 <desc>Snapshot object with the given name.</desc>
4651 </param>
4652 </method>
4653
4654 <method name="setCurrentSnapshot">
4655 <desc>
4656 Sets the current snapshot of this machine.
4657 <note>
4658 In the current implementation, this operation is not
4659 implemented.
4660 </note>
4661 </desc>
4662 <param name="id" type="uuid" dir="in">
4663 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4664 </param>
4665 </method>
4666
4667 <method name="createSharedFolder">
4668 <desc>
4669 Creates a new permanent shared folder by associating the given logical
4670 name with the given host path, adds it to the collection of shared
4671 folders and starts sharing it. Refer to the description of
4672 <link to="ISharedFolder"/> to read more about logical names.
4673
4674 <result name="VBOX_E_OBJECT_IN_USE">
4675 Shared folder already exists.
4676 </result>
4677 <result name="VBOX_E_FILE_ERROR">
4678 Shared folder @a hostPath not accessible.
4679 </result>
4680
4681 </desc>
4682 <param name="name" type="wstring" dir="in">
4683 <desc>Unique logical name of the shared folder.</desc>
4684 </param>
4685 <param name="hostPath" type="wstring" dir="in">
4686 <desc>Full path to the shared folder in the host file system.</desc>
4687 </param>
4688 <param name="writable" type="boolean" dir="in">
4689 <desc>Whether the share is writable or readonly</desc>
4690 </param>
4691 </method>
4692
4693 <method name="removeSharedFolder">
4694 <desc>
4695 Removes the permanent shared folder with the given name previously
4696 created by <link to="#createSharedFolder"/> from the collection of
4697 shared folders and stops sharing it.
4698
4699 <result name="VBOX_E_INVALID_VM_STATE">
4700 Virtual machine is not mutable.
4701 </result>
4702 <result name="VBOX_E_OBJECT_NOT_FOUND">
4703 Shared folder @a name does not exist.
4704 </result>
4705
4706 </desc>
4707 <param name="name" type="wstring" dir="in">
4708 <desc>Logical name of the shared folder to remove.</desc>
4709 </param>
4710 </method>
4711
4712 <method name="canShowConsoleWindow">
4713 <desc>
4714 Returns @c true if the VM console process can activate the
4715 console window and bring it to foreground on the desktop of
4716 the host PC.
4717 <note>
4718 This method will fail if a session for this machine is not
4719 currently open.
4720 </note>
4721
4722 <result name="VBOX_E_INVALID_VM_STATE">
4723 Machine session is not open.
4724 </result>
4725
4726 </desc>
4727 <param name="canShow" type="boolean" dir="return">
4728 <desc>
4729 @c true if the console window can be shown and @c
4730 false otherwise.
4731 </desc>
4732 </param>
4733 </method>
4734
4735 <method name="showConsoleWindow">
4736 <desc>
4737 Activates the console window and brings it to foreground on
4738 the desktop of the host PC. Many modern window managers on
4739 many platforms implement some sort of focus stealing
4740 prevention logic, so that it may be impossible to activate
4741 a window without the help of the currently active
4742 application. In this case, this method will return a non-zero
4743 identifier that represents the top-level window of the VM
4744 console process. The caller, if it represents a currently
4745 active process, is responsible to use this identifier (in a
4746 platform-dependent manner) to perform actual window
4747 activation.
4748 <note>
4749 This method will fail if a session for this machine is not
4750 currently open.
4751 </note>
4752
4753 <result name="VBOX_E_INVALID_VM_STATE">
4754 Machine session is not open.
4755 </result>
4756
4757 </desc>
4758 <param name="winId" type="unsigned long long" dir="return">
4759 <desc>
4760 Platform-dependent identifier of the top-level VM console
4761 window, or zero if this method has performed all actions
4762 necessary to implement the <i>show window</i> semantics for
4763 the given platform and/or VirtualBox front-end.
4764 </desc>
4765 </param>
4766 </method>
4767
4768 <method name="getGuestProperty">
4769 <desc>
4770 Reads an entry from the machine's guest property store.
4771
4772 <result name="VBOX_E_INVALID_VM_STATE">
4773 Machine session is not open.
4774 </result>
4775
4776 </desc>
4777 <param name="name" type="wstring" dir="in">
4778 <desc>
4779 The name of the property to read.
4780 </desc>
4781 </param>
4782 <param name="value" type="wstring" dir="out">
4783 <desc>
4784 The value of the property. If the property does not exist then this
4785 will be empty.
4786 </desc>
4787 </param>
4788 <param name="timestamp" type="unsigned long long" dir="out">
4789 <desc>
4790 The time at which the property was last modified, as seen by the
4791 server process.
4792 </desc>
4793 </param>
4794 <param name="flags" type="wstring" dir="out">
4795 <desc>
4796 Additional property parameters, passed as a comma-separated list of
4797 "name=value" type entries.
4798 </desc>
4799 </param>
4800 </method>
4801
4802 <method name="getGuestPropertyValue">
4803 <desc>
4804 Reads a value from the machine's guest property store.
4805
4806 <result name="VBOX_E_INVALID_VM_STATE">
4807 Machine session is not open.
4808 </result>
4809
4810 </desc>
4811 <param name="property" type="wstring" dir="in">
4812 <desc>
4813 The name of the property to read.
4814 </desc>
4815 </param>
4816 <param name="value" type="wstring" dir="return">
4817 <desc>
4818 The value of the property. If the property does not exist then this
4819 will be empty.
4820 </desc>
4821 </param>
4822 </method>
4823
4824 <method name="getGuestPropertyTimestamp">
4825 <desc>
4826 Reads a property timestamp from the machine's guest property store.
4827
4828 <result name="VBOX_E_INVALID_VM_STATE">
4829 Machine session is not open.
4830 </result>
4831
4832 </desc>
4833 <param name="property" type="wstring" dir="in">
4834 <desc>
4835 The name of the property to read.
4836 </desc>
4837 </param>
4838 <param name="value" type="unsigned long long" dir="return">
4839 <desc>
4840 The timestamp. If the property does not exist then this will be
4841 empty.
4842 </desc>
4843 </param>
4844 </method>
4845
4846 <method name="setGuestProperty">
4847 <desc>
4848 Sets, changes or deletes an entry in the machine's guest property
4849 store.
4850
4851 <result name="E_ACCESSDENIED">
4852 Property cannot be changed.
4853 </result>
4854 <result name="E_INVALIDARG">
4855 Invalid @a flags.
4856 </result>
4857 <result name="VBOX_E_INVALID_VM_STATE">
4858 Virtual machine is not mutable or session not open.
4859 </result>
4860 <result name="VBOX_E_INVALID_OBJECT_STATE">
4861 Cannot set transient property when machine not running.
4862 </result>
4863
4864 </desc>
4865 <param name="property" type="wstring" dir="in">
4866 <desc>
4867 The name of the property to set, change or delete.
4868 </desc>
4869 </param>
4870 <param name="value" type="wstring" dir="in">
4871 <desc>
4872 The new value of the property to set, change or delete. If the
4873 property does not yet exist and value is non-empty, it will be
4874 created. If the value is empty, the key will be deleted if it
4875 exists.
4876 </desc>
4877 </param>
4878 <param name="flags" type="wstring" dir="in">
4879 <desc>
4880 Additional property parameters, passed as a comma-separated list of
4881 "name=value" type entries.
4882 </desc>
4883 </param>
4884 </method>
4885
4886 <method name="setGuestPropertyValue">
4887 <desc>
4888 Sets, changes or deletes a value in the machine's guest property
4889 store. The flags field will be left unchanged or created empty for a
4890 new property.
4891
4892 <result name="E_ACCESSDENIED">
4893 Property cannot be changed.
4894 </result>
4895 <result name="VBOX_E_INVALID_VM_STATE">
4896 Virtual machine is not mutable or session not open.
4897 </result>
4898 <result name="VBOX_E_INVALID_OBJECT_STATE">
4899 Cannot set transient property when machine not running.
4900 </result>
4901 </desc>
4902
4903 <param name="property" type="wstring" dir="in">
4904 <desc>
4905 The name of the property to set, change or delete.
4906 </desc>
4907 </param>
4908 <param name="value" type="wstring" dir="in">
4909 <desc>
4910 The new value of the property to set, change or delete. If the
4911 property does not yet exist and value is non-empty, it will be
4912 created. If value is empty, the property will be deleted if it
4913 exists.
4914 </desc>
4915 </param>
4916 </method>
4917
4918 <method name="enumerateGuestProperties">
4919 <desc>
4920 Return a list of the guest properties matching a set of patterns along
4921 with their values, time stamps and flags.
4922 </desc>
4923 <param name="patterns" type="wstring" dir="in">
4924 <desc>
4925 The patterns to match the properties against, separated by '|'
4926 characters. If this is empty or NULL, all properties will match.
4927 </desc>
4928 </param>
4929 <param name="name" type="wstring" dir="out" safearray="yes">
4930 <desc>
4931 The names of the properties returned.
4932 </desc>
4933 </param>
4934 <param name="value" type="wstring" dir="out" safearray="yes">
4935 <desc>
4936 The values of the properties returned. The array entries match the
4937 corresponding entries in the @a name array.
4938 </desc>
4939 </param>
4940 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4941 <desc>
4942 The time stamps of the properties returned. The array entries match
4943 the corresponding entries in the @a name array.
4944 </desc>
4945 </param>
4946 <param name="flags" type="wstring" dir="out" safearray="yes">
4947 <desc>
4948 The flags of the properties returned. The array entries match the
4949 corresponding entries in the @a name array.
4950 </desc>
4951 </param>
4952 </method>
4953</interface>
4954
4955 <!--
4956 // IConsole
4957 /////////////////////////////////////////////////////////////////////////
4958 -->
4959
4960 <interface
4961 name="IConsoleCallback" extends="$unknown"
4962 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
4963 wsmap="suppress"
4964 >
4965
4966 <method name="onMousePointerShapeChange">
4967 <desc>
4968 Notification when the guest mouse pointer shape has
4969 changed. The new shape data is given.
4970 </desc>
4971 <param name="visible" type="boolean" dir="in">
4972 <desc>
4973 Flag whether the pointer is visible.
4974 </desc>
4975 </param>
4976 <param name="alpha" type="boolean" dir="in">
4977 <desc>
4978 Flag whether the pointer has an alpha channel.
4979 </desc>
4980 </param>
4981 <param name="xHot" type="unsigned long" dir="in">
4982 <desc>
4983 The pointer hot spot x coordinate.
4984 </desc>
4985 </param>
4986 <param name="yHot" type="unsigned long" dir="in">
4987 <desc>
4988 The pointer hot spot y coordinate.
4989 </desc>
4990 </param>
4991 <param name="width" type="unsigned long" dir="in">
4992 <desc>
4993 Width of the pointer shape in pixels.
4994 </desc>
4995 </param>
4996 <param name="height" type="unsigned long" dir="in">
4997 <desc>
4998 Height of the pointer shape in pixels.
4999 </desc>
5000 </param>
5001 <param name="shape" type="octet" mod="ptr" dir="in">
5002 <desc>
5003 Address of the shape buffer.
5004
5005 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5006 followed by a 32-bpp XOR (color) mask.
5007
5008 For pointers without alpha channel the XOR mask pixels are 32
5009 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5010 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5011
5012 An AND mask is used for pointers with alpha channel, so if the
5013 callback does not support alpha, the pointer could be
5014 displayed as a normal color pointer.
5015
5016 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5017 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5018 height</tt>. The padding bits at the end of each scanline are
5019 undefined.
5020
5021 The XOR mask follows the AND mask on the next 4-byte aligned
5022 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5023 Bytes in the gap between the AND and the XOR mask are undefined.
5024 The XOR mask scanlines have no gap between them and the size of
5025 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5026
5027 <note>
5028 If @a shape is 0, only the pointer visibility is changed.
5029 </note>
5030 </desc>
5031 </param>
5032 </method>
5033
5034 <method name="onMouseCapabilityChange">
5035 <desc>
5036 Notification when the mouse capabilities reported by the
5037 guest have changed. The new capabilities are passed.
5038 </desc>
5039 <param name="supportsAbsolute" type="boolean" dir="in"/>
5040 <param name="needsHostCursor" type="boolean" dir="in"/>
5041 </method>
5042
5043 <method name="onKeyboardLedsChange">
5044 <desc>
5045 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5046 to alter the state of the keyboard LEDs.
5047 </desc>
5048 <param name="numLock" type="boolean" dir="in"/>
5049 <param name="capsLock" type="boolean" dir="in"/>
5050 <param name="scrollLock" type="boolean" dir="in"/>
5051 </method>
5052
5053 <method name="onStateChange">
5054 <desc>
5055 Notification when the execution state of the machine has changed.
5056 The new state will be given.
5057 </desc>
5058 <param name="state" type="MachineState" dir="in"/>
5059 </method>
5060
5061 <method name="onAdditionsStateChange">
5062 <desc>
5063 Notification when a Guest Additions property changes.
5064 Interested callees should query IGuest attributes to
5065 find out what has changed.
5066 </desc>
5067 </method>
5068
5069 <method name="onDVDDriveChange">
5070 <desc>
5071 Notification when a property of the
5072 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5073 Interested callees should use IDVDDrive methods to find out what has
5074 changed.
5075 </desc>
5076 </method>
5077
5078 <method name="onFloppyDriveChange">
5079 <desc>
5080 Notification when a property of the
5081 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5082 Interested callees should use IFloppyDrive methods to find out what
5083 has changed.
5084 </desc>
5085 </method>
5086
5087 <method name="onNetworkAdapterChange">
5088 <desc>
5089 Notification when a property of one of the
5090 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5091 changes. Interested callees should use INetworkAdapter methods and
5092 attributes to find out what has changed.
5093 </desc>
5094 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5095 <desc>Network adapter that is subject to change.</desc>
5096 </param>
5097 </method>
5098
5099 <method name="onSerialPortChange">
5100 <desc>
5101 Notification when a property of one of the
5102 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5103 Interested callees should use ISerialPort methods and attributes
5104 to find out what has changed.
5105 </desc>
5106 <param name="serialPort" type="ISerialPort" dir="in">
5107 <desc>Serial port that is subject to change.</desc>
5108 </param>
5109 </method>
5110
5111 <method name="onParallelPortChange">
5112 <desc>
5113 Notification when a property of one of the
5114 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5115 changes. Interested callees should use ISerialPort methods and
5116 attributes to find out what has changed.
5117 </desc>
5118 <param name="parallelPort" type="IParallelPort" dir="in">
5119 <desc>Parallel port that is subject to change.</desc>
5120 </param>
5121 </method>
5122
5123 <method name="onVRDPServerChange">
5124 <desc>
5125 Notification when a property of the
5126 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5127 Interested callees should use IVRDPServer methods and attributes to
5128 find out what has changed.
5129 </desc>
5130 </method>
5131
5132 <method name="onUSBControllerChange">
5133 <desc>
5134 Notification when a property of the virtual
5135 <link to="IMachine::USBController">USB controller</link> changes.
5136 Interested callees should use IUSBController methods and attributes to
5137 find out what has changed.
5138 </desc>
5139 </method>
5140
5141 <method name="onUSBDeviceStateChange">
5142 <desc>
5143 Notification when a USB device is attached to or detached from
5144 the virtual USB controller.
5145
5146 This notification is sent as a result of the indirect
5147 request to attach the device because it matches one of the
5148 machine USB filters, or as a result of the direct request
5149 issued by <link to="IConsole::attachUSBDevice"/> or
5150 <link to="IConsole::detachUSBDevice"/>.
5151
5152 This notification is sent in case of both a succeeded and a
5153 failed request completion. When the request succeeds, the @a
5154 error parameter is @c null, and the given device has been
5155 already added to (when @a attached is @c true) or removed from
5156 (when @a attached is @c false) the collection represented by
5157 <link to="IConsole::USBDevices"/>. On failure, the collection
5158 doesn't change and the @a error parameter represents the error
5159 message describing the failure.
5160
5161 </desc>
5162 <param name="device" type="IUSBDevice" dir="in">
5163 <desc>Device that is subject to state change.</desc>
5164 </param>
5165 <param name="attached" type="boolean" dir="in">
5166 <desc>
5167 <tt>true</tt> if the device was attached
5168 and <tt>false</tt> otherwise.
5169 </desc>
5170 </param>
5171 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5172 <desc>
5173 <tt>null</tt> on success or an error message object on
5174 failure.
5175 </desc>
5176 </param>
5177 </method>
5178
5179 <method name="onSharedFolderChange">
5180 <desc>
5181 Notification when a shared folder is added or removed.
5182 The @a scope argument defines one of three scopes:
5183 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5184 (<link to="Scope_Global">Global</link>),
5185 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5186 the machine (<link to="Scope_Machine">Machine</link>) or <link
5187 to="IConsole::sharedFolders">transient shared folders</link> of the
5188 machine (<link to="Scope_Session">Session</link>). Interested callees
5189 should use query the corresponding collections to find out what has
5190 changed.
5191 </desc>
5192 <param name="scope" type="Scope" dir="in">
5193 <desc>Scope of the notification.</desc>
5194 </param>
5195 </method>
5196
5197 <method name="onRuntimeError">
5198 <desc>
5199 Notification when an error happens during the virtual
5200 machine execution.
5201
5202 There are three kinds of runtime errors:
5203 <ul>
5204 <li><i>fatal</i></li>
5205 <li><i>non-fatal with retry</i></li>
5206 <li><i>non-fatal warnings</i></li>
5207 </ul>
5208
5209 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5210 to <tt>true</tt>. In case of fatal errors, the virtual machine
5211 execution is always paused before calling this notification, and
5212 the notification handler is supposed either to immediately save
5213 the virtual machine state using <link to="IConsole::saveState()"/>
5214 or power it off using <link to="IConsole::powerDown()"/>.
5215 Resuming the execution can lead to unpredictable results.
5216
5217 <b>Non-fatal</b> errors and warnings are indicated by the
5218 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5219 is in the Paused state by the time the error notification is
5220 received, it means that the user can <i>try to resume</i> the machine
5221 execution after attempting to solve the problem that caused the
5222 error. In this case, the notification handler is supposed
5223 to show an appropriate message to the user (depending on the
5224 value of the @a id parameter) that offers several actions such
5225 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5226 wants to retry, the notification handler should continue
5227 the machine execution using the <link to="IConsole::resume()"/>
5228 call. If the machine execution is not Paused during this
5229 notification, then it means this notification is a <i>warning</i>
5230 (for example, about a fatal condition that can happen very soon);
5231 no immediate action is required from the user, the machine
5232 continues its normal execution.
5233
5234 Note that in either case the notification handler
5235 <b>must not</b> perform any action directly on a thread
5236 where this notification is called. Everything it is allowed to
5237 do is to post a message to another thread that will then talk
5238 to the user and take the corresponding action.
5239
5240 Currently, the following error identifiers are known:
5241 <ul>
5242 <li><tt>"HostMemoryLow"</tt></li>
5243 <li><tt>"HostAudioNotResponding"</tt></li>
5244 <li><tt>"VDIStorageFull"</tt></li>
5245 </ul>
5246
5247 <note>
5248 This notification is not designed to be implemented by
5249 more than one callback at a time. If you have multiple
5250 IConsoleCallback instances registered on the given
5251 IConsole object, make sure you simply do nothing but
5252 return @c S_OK from all but one of them that does actual
5253 user notification and performs necessary actions.
5254 </note>
5255
5256 </desc>
5257 <param name="fatal" type="boolean" dir="in">
5258 <desc>Whether the error is fatal or not</desc>
5259 </param>
5260 <param name="id" type="wstring" dir="in">
5261 <desc>Error identifier</desc>
5262 </param>
5263 <param name="message" type="wstring" dir="in">
5264 <desc>Optional error message</desc>
5265 </param>
5266 </method>
5267
5268 <method name="onCanShowWindow">
5269 <desc>
5270 Notification when a call to
5271 <link to="IMachine::canShowConsoleWindow()"/> is made by a
5272 front-end to check if a subsequent call to
5273 <link to="IMachine::showConsoleWindow()"/> can succeed.
5274
5275 The callee should give an answer appropriate to the current
5276 machine state in the @a canShow argument. This answer must
5277 remain valid at least until the next
5278 <link to="IConsole::state">machine state</link> change.
5279
5280 <note>
5281 This notification is not designed to be implemented by
5282 more than one callback at a time. If you have multiple
5283 IConsoleCallback instances registered on the given
5284 IConsole object, make sure you simply do nothing but
5285 return @c true and @c S_OK from all but one of them that
5286 actually manages console window activation.
5287 </note>
5288 </desc>
5289 <param name="canShow" type="boolean" dir="return">
5290 <desc>
5291 @c true if the console window can be shown and @c
5292 false otherwise.
5293 </desc>
5294 </param>
5295 </method>
5296
5297 <method name="onShowWindow">
5298 <desc>
5299 Notification when a call to
5300 <link to="IMachine::showConsoleWindow()"/>
5301 requests the console window to be activated and brought to
5302 foreground on the desktop of the host PC.
5303
5304 This notification should cause the VM console process to
5305 perform the requested action as described above. If it is
5306 impossible to do it at a time of this notification, this
5307 method should return a failure.
5308
5309 Note that many modern window managers on many platforms
5310 implement some sort of focus stealing prevention logic, so
5311 that it may be impossible to activate a window without the
5312 help of the currently active application (which is supposedly
5313 an initiator of this notification). In this case, this method
5314 must return a non-zero identifier that represents the
5315 top-level window of the VM console process. The caller, if it
5316 represents a currently active process, is responsible to use
5317 this identifier (in a platform-dependent manner) to perform
5318 actual window activation.
5319
5320 This method must set @a winId to zero if it has performed all
5321 actions necessary to complete the request and the console
5322 window is now active and in foreground, to indicate that no
5323 further action is required on the caller's side.
5324
5325 <note>
5326 This notification is not designed to be implemented by
5327 more than one callback at a time. If you have multiple
5328 IConsoleCallback instances registered on the given
5329 IConsole object, make sure you simply do nothing but
5330 return @c S_OK from all but one of them that actually
5331 manages console window activation.
5332 </note>
5333 </desc>
5334 <param name="winId" type="unsigned long long" dir="return">
5335 <desc>
5336 Platform-dependent identifier of the top-level VM console
5337 window, or zero if this method has performed all actions
5338 necessary to implement the <i>show window</i> semantics for
5339 the given platform and/or this VirtualBox front-end.
5340 </desc>
5341 </param>
5342 </method>
5343
5344 </interface>
5345
5346 <interface
5347 name="IRemoteDisplayInfo" extends="$unknown"
5348 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5349 wsmap="struct"
5350 >
5351 <desc>
5352 Contains information about the remote display (VRDP) capabilities and status.
5353 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5354 </desc>
5355
5356 <attribute name="active" type="boolean" readonly="yes">
5357 <desc>
5358 Whether the remote display connection is active.
5359 </desc>
5360 </attribute>
5361
5362 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5363 <desc>
5364 How many times a client connected.
5365 </desc>
5366 </attribute>
5367
5368 <attribute name="beginTime" type="long long" readonly="yes">
5369 <desc>
5370 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5371 </desc>
5372 </attribute>
5373
5374 <attribute name="endTime" type="long long" readonly="yes">
5375 <desc>
5376 When the last connection was terminated or the current time, if
5377 connection is still active, in milliseconds since 1970-01-01 UTC.
5378 </desc>
5379 </attribute>
5380
5381 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5382 <desc>
5383 How many bytes were sent in last or current, if still active, connection.
5384 </desc>
5385 </attribute>
5386
5387 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5388 <desc>
5389 How many bytes were sent in all connections.
5390 </desc>
5391 </attribute>
5392
5393 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5394 <desc>
5395 How many bytes were received in last or current, if still active, connection.
5396 </desc>
5397 </attribute>
5398
5399 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5400 <desc>
5401 How many bytes were received in all connections.
5402 </desc>
5403 </attribute>
5404
5405 <attribute name="user" type="wstring" readonly="yes">
5406 <desc>
5407 Login user name supplied by the client.
5408 </desc>
5409 </attribute>
5410
5411 <attribute name="domain" type="wstring" readonly="yes">
5412 <desc>
5413 Login domain name supplied by the client.
5414 </desc>
5415 </attribute>
5416
5417 <attribute name="clientName" type="wstring" readonly="yes">
5418 <desc>
5419 The client name supplied by the client.
5420 </desc>
5421 </attribute>
5422
5423 <attribute name="clientIP" type="wstring" readonly="yes">
5424 <desc>
5425 The IP address of the client.
5426 </desc>
5427 </attribute>
5428
5429 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5430 <desc>
5431 The client software version number.
5432 </desc>
5433 </attribute>
5434
5435 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5436 <desc>
5437 Public key exchange method used when connection was established.
5438 Values: 0 - RDP4 public key exchange scheme.
5439 1 - X509 certificates were sent to client.
5440 </desc>
5441 </attribute>
5442
5443 </interface>
5444
5445 <interface
5446 name="IConsole" extends="$unknown"
5447 uuid="e3c6d4a1-a935-47ca-b16d-f9e9c496e53e"
5448 wsmap="managed"
5449 >
5450 <desc>
5451 The IConsole interface represents an interface to control virtual
5452 machine execution.
5453
5454 The console object that implements the IConsole interface is obtained
5455 from a session object after the session for the given machine has been
5456 opened using one of <link to="IVirtualBox::openSession"/>,
5457 <link to="IVirtualBox::openRemoteSession"/> or
5458 <link to="IVirtualBox::openExistingSession"/> methods.
5459
5460 Methods of the IConsole interface allow the caller to query the current
5461 virtual machine execution state, pause the machine or power it down, save
5462 the machine state or take a snapshot, attach and detach removable media
5463 and so on.
5464
5465 <see>ISession</see>
5466 </desc>
5467
5468 <attribute name="machine" type="IMachine" readonly="yes">
5469 <desc>
5470 Machine object this console is sessioned with.
5471 <note>
5472 This is a convenience property, it has the same value as
5473 <link to="ISession::machine"/> of the corresponding session
5474 object.
5475 </note>
5476 </desc>
5477 </attribute>
5478
5479 <attribute name="state" type="MachineState" readonly="yes">
5480 <desc>
5481 Current execution state of the machine.
5482 <note>
5483 This property always returns the same value as the corresponding
5484 property of the IMachine object this console is sessioned with.
5485 For the process that owns (executes) the VM, this is the
5486 preferable way of querying the VM state, because no IPC
5487 calls are made.
5488 </note>
5489 </desc>
5490 </attribute>
5491
5492 <attribute name="guest" type="IGuest" readonly="yes">
5493 <desc>Guest object.</desc>
5494 </attribute>
5495
5496 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5497 <desc>
5498 Virtual keyboard object.
5499 <note>
5500 If the machine is not running, any attempt to use
5501 the returned object will result in an error.
5502 </note>
5503 </desc>
5504 </attribute>
5505
5506 <attribute name="mouse" type="IMouse" readonly="yes">
5507 <desc>
5508 Virtual mouse object.
5509 <note>
5510 If the machine is not running, any attempt to use
5511 the returned object will result in an error.
5512 </note>
5513 </desc>
5514 </attribute>
5515
5516 <attribute name="display" type="IDisplay" readonly="yes">
5517 <desc>Virtual display object.
5518 <note>
5519 If the machine is not running, any attempt to use
5520 the returned object will result in an error.
5521 </note>
5522 </desc>
5523 </attribute>
5524
5525 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5526 <desc>Debugging interface.</desc>
5527 </attribute>
5528
5529 <attribute name="USBDevices" type="IUSBDeviceCollection" readonly="yes">
5530 <desc>
5531 Collection of USB devices currently attached to the virtual
5532 USB controller.
5533 <note>
5534 The collection is empty if the machine is not running.
5535 </note>
5536 </desc>
5537 </attribute>
5538
5539 <attribute name="remoteUSBDevices" type="IHostUSBDeviceCollection" readonly="yes">
5540 <desc>
5541 List of USB devices currently attached to the remote VRDP client.
5542 Once a new device is physically attached to the remote host computer,
5543 it appears in this list and remains there until detached.
5544 </desc>
5545 </attribute>
5546
5547 <attribute name="sharedFolders" type="ISharedFolderCollection" readonly="yes">
5548 <desc>
5549 Collection of shared folders for the current session. These folders
5550 are called transient shared folders because they are available to the
5551 guest OS running inside the associated virtual machine only for the
5552 duration of the session (as opposed to
5553 <link to="IMachine::sharedFolders"/> which represent permanent shared
5554 folders). When the session is closed (e.g. the machine is powered down),
5555 these folders are automatically discarded.
5556
5557 New shared folders are added to the collection using
5558 <link to="#createSharedFolder"/>. Existing shared folders can be
5559 removed using <link to="#removeSharedFolder"/>.
5560 </desc>
5561 </attribute>
5562
5563 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5564 <desc>
5565 Interface that provides information on Remote Display (VRDP) connection.
5566 </desc>
5567 </attribute>
5568
5569 <method name="powerUp">
5570 <desc>
5571 Starts the virtual machine execution using the current machine
5572 state (that is, its current execution state, current settings and
5573 current hard disks).
5574
5575 If the machine is powered off or aborted, the execution will
5576 start from the beginning (as if the real hardware were just
5577 powered on).
5578
5579 If the machine is in the <link to="MachineState_Saved"/> state,
5580 it will continue its execution the point where the state has
5581 been saved.
5582
5583 <note>
5584 Unless you are trying to write a new VirtualBox front-end that
5585 performs direct machine execution (like the VirtualBox or VBoxSDL
5586 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5587 session opened by <link to="IVirtualBox::openSession"/> and use this
5588 session only to change virtual machine settings. If you simply want to
5589 start virtual machine execution using one of the existing front-ends
5590 (for example the VirtualBox GUI or headless server), simply use
5591 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5592 power up the machine automatically for you.
5593 </note>
5594
5595 <see>#saveState</see>
5596 <result name="VBOX_E_INVALID_VM_STATE">
5597 Virtual machine already running.
5598 </result>
5599 <result name="VBOX_E_HOST_ERROR">
5600 Host interface does not exist or name not set.
5601 </result>
5602 <result name="VBOX_E_FILE_ERROR">
5603 Invalid saved state file.
5604 </result>
5605 </desc>
5606 <param name="progress" type="IProgress" dir="return">
5607 <desc>Progress object to track the operation completion.</desc>
5608 </param>
5609 </method>
5610
5611 <method name="powerUpPaused">
5612 <desc>
5613 Identical to powerUp except that the VM will enter the
5614 <link to="MachineState_Paused"/> state, instead of
5615 <link to="MachineState_Running"/>.
5616
5617 <see>#powerUp</see>
5618 <result name="VBOX_E_INVALID_VM_STATE">
5619 Virtual machine already running.
5620 </result>
5621 <result name="VBOX_E_HOST_ERROR">
5622 Host interface does not exist or name not set.
5623 </result>
5624 <result name="VBOX_E_FILE_ERROR">
5625 Invalid saved state file.
5626 </result>
5627 </desc>
5628 <param name="progress" type="IProgress" dir="return">
5629 <desc>Progress object to track the operation completion.</desc>
5630 </param>
5631 </method>
5632
5633 <method name="powerDown">
5634 <desc>
5635 Stops the virtual machine execution.
5636 After this operation completes, the machine will go to the
5637 PoweredOff state.
5638
5639 @deprecated This method will be removed in VirtualBox 2.1 where the
5640 powerDownAsync() method will take its name. Do not use this method in
5641 the code.
5642 <result name="VBOX_E_INVALID_VM_STATE">
5643 Virtual machine must be Running, Paused or Stuck to be powered down.
5644 </result>
5645 <result name="VBOX_E_VM_ERROR">
5646 Unable to power off or destroy virtual machine.
5647 </result>
5648 </desc>
5649 </method>
5650
5651 <method name="powerDownAsync">
5652 <desc>
5653 Initiates the power down procedure to stop the virtual machine
5654 execution.
5655
5656 The completion of the power down procedure is tracked using the returned
5657 IProgress object. After the operation is complete, the machine will go
5658 to the PoweredOff state.
5659
5660 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5661 where the original powerDown() method will be removed. You will need to
5662 rename "powerDownAsync" to "powerDown" in your sources to make them
5663 build with version 2.1.
5664 <result name="VBOX_E_INVALID_VM_STATE">
5665 Virtual machine must be Running, Paused or Stuck to be powered down.
5666 </result>
5667 </desc>
5668 <param name="progress" type="IProgress" dir="return">
5669 <desc>Progress object to track the operation completion.</desc>
5670 </param>
5671 </method>
5672
5673 <method name="reset">
5674 <desc>Resets the virtual machine.
5675 <result name="VBOX_E_INVALID_VM_STATE">
5676 Virtual machine not in Running state.
5677 </result>
5678 <result name="VBOX_E_VM_ERROR">
5679 Virtual machine error in reset operation.
5680 </result>
5681 </desc>
5682 </method>
5683
5684 <method name="pause">
5685 <desc>Pauses the virtual machine execution.
5686 <result name="VBOX_E_INVALID_VM_STATE">
5687 Virtual machine not in Running state.
5688 </result>
5689 <result name="VBOX_E_VM_ERROR">
5690 Virtual machine error in suspend operation.
5691 </result>
5692 </desc>
5693 </method>
5694
5695 <method name="resume">
5696 <desc>Resumes the virtual machine execution.
5697 <result name="VBOX_E_INVALID_VM_STATE">
5698 Virtual machine not in Paused state.
5699 </result>
5700 <result name="VBOX_E_VM_ERROR">
5701 Virtual machine error in resume operation.
5702 </result>
5703 </desc>
5704 </method>
5705
5706 <method name="powerButton">
5707 <desc>Sends the ACPI power button event to the guest.
5708 <result name="VBOX_E_INVALID_VM_STATE">
5709 Virtual machine not in Running state.
5710 </result>
5711 <result name="VBOX_E_PDM_ERROR">
5712 Controlled power off failed.
5713 </result>
5714 </desc>
5715 </method>
5716
5717 <method name="sleepButton">
5718 <desc>Sends the ACPI sleep button event to the guest.
5719 <result name="VBOX_E_INVALID_VM_STATE">
5720 Virtual machine not in Running state.
5721 </result>
5722 <result name="VBOX_E_PDM_ERROR">
5723 Sending sleep button event failed.
5724 </result>
5725 </desc>
5726 </method>
5727
5728 <method name="getPowerButtonHandled">
5729 <desc>Checks if the last power button event was handled by guest.
5730 <result name="VBOX_E_PDM_ERROR">
5731 Checking if the event was handled by the guest OS failed.
5732 </result>
5733 </desc>
5734 <param name="handled" type="boolean" dir="return"/>
5735 </method>
5736
5737 <method name="getGuestEnteredACPIMode">
5738 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5739 G1 (sleeping). If this method returns false, the guest will
5740 most likely not respond to external ACPI events.
5741 <result name="VBOX_E_INVALID_VM_STATE">
5742 Virtual machine not in Running state.
5743 </result>
5744 </desc>
5745 <param name="entered" type="boolean" dir="return"/>
5746 </method>
5747
5748 <method name="saveState">
5749 <desc>
5750 Saves the current execution state of a running virtual machine
5751 and stops its execution.
5752
5753 After this operation completes, the machine will go to the
5754 Saved state. Next time it is powered up, this state will
5755 be restored and the machine will continue its execution from
5756 the place where it was saved.
5757
5758 This operation differs from taking a snapshot to the effect
5759 that it doesn't create new differencing hard disks. Also, once
5760 the machine is powered up from the state saved using this method,
5761 the saved state is deleted, so it will be impossible to return
5762 to this state later.
5763
5764 <note>
5765 On success, this method implicitly calls
5766 <link to="IMachine::saveSettings()"/> to save all current machine
5767 settings (including runtime changes to the DVD drive, etc.).
5768 Together with the impossibility to change any VM settings when it is
5769 in the Saved state, this guarantees adequate hardware
5770 configuration of the machine when it is restored from the saved
5771 state file.
5772 </note>
5773
5774 <note>
5775 The machine must be in the Running or Paused state, otherwise
5776 the operation will fail.
5777 </note>
5778 <result name="VBOX_E_INVALID_VM_STATE">
5779 Virtual machine state neither Running nor Paused.
5780 </result>
5781 <result name="VBOX_E_FILE_ERROR">
5782 Failed to create directory for saved state file.
5783 </result>
5784
5785 <see><link to="#takeSnapshot"/></see>
5786 </desc>
5787 <param name="progress" type="IProgress" dir="return">
5788 <desc>Progress object to track the operation completion.</desc>
5789 </param>
5790 </method>
5791
5792 <method name="adoptSavedState">
5793 <desc>
5794 Associates the given saved state file to the virtual machine.
5795
5796 On success, the machine will go to the Saved state. Next time it is
5797 powered up, it will be restored from the adopted saved state and
5798 continue execution from the place where the saved state file was
5799 created.
5800
5801 The specified saved state file path may be absolute or relative to the
5802 folder the VM normally saves the state to (usually,
5803 <link to="IMachine::snapshotFolder"/>).
5804
5805 <note>
5806 It's a caller's responsibility to make sure the given saved state
5807 file is compatible with the settings of this virtual machine that
5808 represent its virtual hardware (memory size, hard disk configuration
5809 etc.). If there is a mismatch, the behavior of the virtual machine
5810 is undefined.
5811 </note>
5812 <result name="VBOX_E_INVALID_VM_STATE">
5813 Virtual machine state neither PoweredOff nor Aborted.
5814 </result>
5815 </desc>
5816 <param name="savedStateFile" type="wstring" dir="in">
5817 <desc>Path to the saved state file to adopt.</desc>
5818 </param>
5819 </method>
5820
5821 <method name="discardSavedState">
5822 <desc>
5823 Discards (deletes) the saved state of the virtual machine
5824 previously created by <link to="#saveState"/>. Next time the
5825 machine is powered up, a clean boot will occur.
5826 <note>
5827 This operation is equivalent to resetting or powering off
5828 the machine without doing a proper shutdown in the guest OS.
5829 </note>
5830 <result name="VBOX_E_INVALID_VM_STATE">
5831 Virtual machine not in state Saved.
5832 </result>
5833 </desc>
5834 </method>
5835
5836 <method name="getDeviceActivity">
5837 <desc>
5838 Gets the current activity type of a given device or device group.
5839 <result name="E_INVALIDARG">
5840 Invalid device type.
5841 </result>
5842 </desc>
5843 <param name="type" type="DeviceType" dir="in"/>
5844 <param name="activity" type="DeviceActivity" dir="return"/>
5845 </method>
5846
5847 <method name="attachUSBDevice">
5848 <desc>
5849 Attaches a host USB device with the given UUID to the
5850 USB controller of the virtual machine.
5851
5852 The device needs to be in one of the following states:
5853 <link to="USBDeviceState_Busy"/>,
5854 <link to="USBDeviceState_Available"/> or
5855 <link to="USBDeviceState_Held"/>,
5856 otherwise an error is immediately returned.
5857
5858 When the device state is
5859 <link to="USBDeviceState_Busy">Busy</link>, an error may also
5860 be returned if the host computer refuses to release it for some reason.
5861
5862 <see>IUSBController::deviceFilters, USBDeviceState</see>
5863 <result name="VBOX_E_INVALID_VM_STATE">
5864 Virtual machine state neither Running nor Paused.
5865 </result>
5866 <result name="VBOX_E_PDM_ERROR">
5867 Virtual machine does not have a USB controller.
5868 </result>
5869 </desc>
5870 <param name="id" type="uuid" dir="in">
5871 <desc>UUID of the host USB device to attach.</desc>
5872 </param>
5873 </method>
5874
5875 <method name="detachUSBDevice">
5876 <desc>
5877 Detaches an USB device with the given UUID from the USB controller
5878 of the virtual machine.
5879
5880 After this method succeeds, the VirtualBox server re-initiates
5881 all USB filters as if the device were just physically attached
5882 to the host, but filters of this machine are ignored to avoid
5883 a possible automatic re-attachment.
5884
5885 <see>IUSBController::deviceFilters, USBDeviceState</see>
5886
5887 <result name="VBOX_E_PDM_ERROR">
5888 Virtual machine does not have a USB controller.
5889 </result>
5890 <result name="E_INVALIDARG">
5891 USB device not attached to this virtual machine.
5892 </result>
5893 </desc>
5894 <param name="id" type="uuid" dir="in">
5895 <desc>UUID of the USB device to detach.</desc>
5896 </param>
5897 <param name="device" type="IUSBDevice" dir="return">
5898 <desc>Detached USB device.</desc>
5899 </param>
5900 </method>
5901
5902 <method name="createSharedFolder">
5903 <desc>
5904 Creates a transient new shared folder by associating the given logical
5905 name with the given host path, adds it to the collection of shared
5906 folders and starts sharing it. Refer to the description of
5907 <link to="ISharedFolder"/> to read more about logical names.
5908
5909 <result name="VBOX_E_INVALID_VM_STATE">
5910 Virtual machine in Saved state or currently changing state.
5911 </result>
5912 <result name="VBOX_E_FILE_ERROR">
5913 Shared folder already exists or not accessible.
5914 </result>
5915 </desc>
5916 <param name="name" type="wstring" dir="in">
5917 <desc>Unique logical name of the shared folder.</desc>
5918 </param>
5919 <param name="hostPath" type="wstring" dir="in">
5920 <desc>Full path to the shared folder in the host file system.</desc>
5921 </param>
5922 <param name="writable" type="boolean" dir="in">
5923 <desc>Whether the share is writable or readonly</desc>
5924 </param>
5925 </method>
5926
5927 <method name="removeSharedFolder">
5928 <desc>
5929 Removes a transient shared folder with the given name previously
5930 created by <link to="#createSharedFolder"/> from the collection of
5931 shared folders and stops sharing it.
5932 <result name="VBOX_E_INVALID_VM_STATE">
5933 Virtual machine in Saved state or currently changing state.
5934 </result>
5935 <result name="VBOX_E_FILE_ERROR">
5936 Shared folder does not exists.
5937 </result>
5938 </desc>
5939 <param name="name" type="wstring" dir="in">
5940 <desc>Logical name of the shared folder to remove.</desc>
5941 </param>
5942 </method>
5943
5944 <method name="takeSnapshot">
5945 <desc>
5946 Saves the current execution state and all settings of the
5947 machine and creates differencing images for all
5948 normal (non-independent) hard disks.
5949
5950 This method can be called for a PoweredOff, Saved, Running or
5951 Paused virtual machine. When the machine is PoweredOff, an
5952 offline <link to="ISnapshot">snapshot</link> is created,
5953 in all other cases -- an online snapshot.
5954
5955 The taken snapshot is always based on the
5956 <link to="IMachine::currentSnapshot">current
5957 snapshot</link> of the associated virtual machine and becomes
5958 a new current snapshot.
5959
5960 <note>
5961 This method implicitly calls <link to="IMachine::saveSettings()"/> to
5962 save all current machine settings before taking an offline snapshot.
5963 </note>
5964
5965 <see>ISnapshot, <link to="#saveState"/></see>
5966 <result name="VBOX_E_INVALID_VM_STATE">
5967 Virtual machine currently changing state.
5968 </result>
5969 </desc>
5970 <param name="name" type="wstring" dir="in">
5971 <desc>Short name for the snapshot.</desc>
5972 </param>
5973 <param name="description" type="wstring" dir="in">
5974 <desc>Optional description of the snapshot.</desc>
5975 </param>
5976 <param name="progress" type="IProgress" dir="return">
5977 <desc>Progress object to track the operation completion.</desc>
5978 </param>
5979 </method>
5980
5981 <method name="discardSnapshot">
5982 <desc>
5983
5984 Starts discarding the specified snapshot. The execution state
5985 and settings of the associated machine stored in the snapshot
5986 will be deleted. The contents of all differencing hard disks of
5987 this snapshot will be merged with the contents of their
5988 dependent child hard disks to keep the, disks valid (in other
5989 words, all changes represented by hard disks being discarded
5990 will be propagated to their child hard disks). After that, this
5991 snapshot's differencing hard disks will be deleted. The parent
5992 of this snapshot will become a new parent for all its child
5993 snapshots.
5994
5995 If the discarded snapshot is the current one, its parent
5996 snapshot will become a new current snapshot. The current machine
5997 state is not directly affected in this case, except that
5998 currently attached differencing hard disks based on hard disks
5999 of the discarded snapshot will be also merged as described
6000 above.
6001
6002 If the discarded snapshot is the first one (the root snapshot)
6003 and it has exactly one child snapshot, this child snapshot will
6004 become the first snapshot after discarding. If there are no
6005 children at all (i.e. the first snapshot is the only snapshot of
6006 the machine), both the current and the first snapshot of the
6007 machine will be set to null. In all other cases, the first
6008 snapshot cannot be discarded.
6009
6010 You cannot discard the snapshot if it
6011 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6012 hard disks that have differencing hard disks based on them. Snapshots of
6013 such kind can be discarded only when every normal hard disk has either
6014 no children at all or exactly one child. In the former case, the normal
6015 hard disk simply becomes unused (i.e. not attached to any VM). In the
6016 latter case, it receives all the changes stored in the child hard disk,
6017 and then it replaces the child hard disk in the configuration of the
6018 corresponding snapshot or machine.
6019
6020 Also, you cannot discard the snapshot if it stores hard disks
6021 (of any type) having differencing child hard disks that belong
6022 to other machines. Such snapshots can be only discarded after
6023 you discard all snapshots of other machines containing "foreign"
6024 child disks, or detach these "foreign" child disks from machines
6025 they are attached to.
6026
6027 One particular example of the snapshot storing normal hard disks
6028 is the first snapshot of a virtual machine that had normal hard
6029 disks attached when taking the snapshot. Be careful when
6030 discarding such snapshots because this implicitly commits
6031 changes (made since the snapshot being discarded has been taken)
6032 to normal hard disks (as described above), which may be not what
6033 you want.
6034
6035 The virtual machine is put to
6036 the <link to="MachineState_Discarding">Discarding</link> state until
6037 the discard operation is completed.
6038
6039 <note>
6040 The machine must not be running, otherwise the operation
6041 will fail.
6042 </note>
6043
6044 <note>
6045 Child hard disks of all normal hard disks of the discarded snapshot
6046 must be accessible (see <link to="IMedium::state"/>) for this
6047 operation to succeed. In particular, this means that all virtual
6048 machines, whose hard disks are directly or indirectly based on the
6049 hard disks of discarded snapshot, must be powered off.
6050 </note>
6051 <note>
6052 Merging hard disk contents can be very time and disk space
6053 consuming, if these disks are big in size and have many
6054 children. However, if the snapshot being discarded is the last
6055 (head) snapshot on the branch, the operation will be rather
6056 quick.
6057 </note>
6058 <note>
6059 Note that discarding the current snapshot
6060 will implicitly call <link to="IMachine::saveSettings()"/> to
6061 make all current machine settings permanent.
6062 </note>
6063 <result name="VBOX_E_INVALID_VM_STATE">
6064 Virtual machine is running.
6065 </result>
6066 </desc>
6067 <param name="id" type="uuid" dir="in">
6068 <desc>UUID of the snapshot to discard.</desc>
6069 </param>
6070 <param name="progress" type="IProgress" dir="return">
6071 <desc>Progress object to track the operation completion.</desc>
6072 </param>
6073 </method>
6074
6075 <method name="discardCurrentState">
6076 <desc>
6077 This operation is similar to <link to="#discardSnapshot()"/> but
6078 affects the current machine state. This means that the state stored in
6079 the current snapshot will become a new current state, and all current
6080 settings of the machine and changes stored in differencing hard disks
6081 will be lost.
6082
6083 After this operation is successfully completed, new empty differencing
6084 hard disks are created for all normal hard disks of the machine.
6085
6086 If the current snapshot of the machine is an online snapshot, the
6087 machine will go to the <link to="MachineState_Saved"> saved
6088 state</link>, so that the next time it is powered on, the execution
6089 state will be restored from the current snapshot.
6090
6091 <note>
6092 The machine must not be running, otherwise the operation will fail.
6093 </note>
6094
6095 <note>
6096 If the machine state is <link to="MachineState_Saved">Saved</link>
6097 prior to this operation, the saved state file will be implicitly
6098 discarded (as if <link to="IConsole::discardSavedState()"/> were
6099 called).
6100 </note>
6101
6102 <result name="VBOX_E_INVALID_VM_STATE">
6103 Virtual machine is running.
6104 </result>
6105 </desc>
6106 <param name="progress" type="IProgress" dir="return">
6107 <desc>Progress object to track the operation completion.</desc>
6108 </param>
6109 </method>
6110
6111 <method name="discardCurrentSnapshotAndState">
6112 <desc>
6113
6114 This method is equivalent to
6115 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6116 (currentSnapshot.id(), progress) followed by
6117 <link to="#discardCurrentState()"/>.
6118
6119 As a result, the machine will be fully restored from the
6120 snapshot preceding the current snapshot, while both the current
6121 snapshot and the current machine state will be discarded.
6122
6123 If the current snapshot is the first snapshot of the machine (i.e. it
6124 has the only snapshot), the current machine state will be
6125 discarded <b>before</b> discarding the snapshot. In other words, the
6126 machine will be restored from its last snapshot, before discarding
6127 it. This differs from performing a single
6128 <link to="#discardSnapshot()"/> call (note that no
6129 <link to="#discardCurrentState()"/> will be possible after it)
6130 to the effect that the latter will preserve the current state instead of
6131 discarding it.
6132
6133 Unless explicitly mentioned otherwise, all remarks and
6134 limitations of the above two methods also apply to this method.
6135
6136 <note>
6137 The machine must not be running, otherwise the operation
6138 will fail.
6139 </note>
6140
6141 <note>
6142 If the machine state is <link to="MachineState_Saved">Saved</link>
6143 prior to this operation, the saved state file will be implicitly
6144 discarded (as if <link to="#discardSavedState()"/> were
6145 called).
6146 </note>
6147
6148 <note>
6149 This method is more efficient than calling both of the above
6150 methods separately: it requires less IPC calls and provides
6151 a single progress object.
6152 </note>
6153
6154 <result name="VBOX_E_INVALID_VM_STATE">
6155 Virtual machine is running.
6156 </result>
6157 </desc>
6158 <param name="progress" type="IProgress" dir="return">
6159 <desc>Progress object to track the operation completion.</desc>
6160 </param>
6161 </method>
6162
6163 <method name="registerCallback">
6164 <desc>
6165 Registers a new console callback on this instance. The methods of the
6166 callback interface will be called by this instance when the appropriate
6167 event occurs.
6168 </desc>
6169 <param name="callback" type="IConsoleCallback" dir="in"/>
6170 </method>
6171
6172 <method name="unregisterCallback">
6173 <desc>
6174 Unregisters the console callback previously registered using
6175 <link to="#registerCallback"/>.
6176 <result name="E_INVALIDARG">
6177 Given @a callback handler is not registered.
6178 </result>
6179 </desc>
6180 <param name="callback" type="IConsoleCallback" dir="in"/>
6181 </method>
6182 </interface>
6183
6184 <!--
6185 // IHost
6186 /////////////////////////////////////////////////////////////////////////
6187 -->
6188
6189 <interface
6190 name="IHostDVDDrive" extends="$unknown"
6191 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6192 wsmap="managed"
6193 >
6194 <desc>
6195 The IHostDVDDrive interface represents the physical CD/DVD drive
6196 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6197 </desc>
6198
6199 <attribute name="name" type="wstring" readonly="yes">
6200 <desc>
6201 Returns the platform-specific device identifier.
6202 On DOS-like platforms, it is a drive name (e.g. R:).
6203 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6204 </desc>
6205 </attribute>
6206 <attribute name="description" type="wstring" readonly="yes">
6207 <desc>
6208 Returns a human readable description for the drive. This
6209 description usually contains the product and vendor name. A
6210 @c null string is returned if the description is not available.
6211 </desc>
6212 </attribute>
6213 <attribute name="udi" type="wstring" readonly="yes">
6214 <desc>
6215 Returns the unique device identifier for the drive. This
6216 attribute is reserved for future use instead of
6217 <link to="#name"/>. Currently it is not used and may return
6218 @c null on some platforms.
6219 </desc>
6220 </attribute>
6221
6222 </interface>
6223
6224 <enumerator
6225 name="IHostDVDDriveEnumerator" type="IHostDVDDrive"
6226 uuid="1ed7cfaf-c363-40df-aa4e-89c1afb7d96b"
6227 />
6228
6229 <collection
6230 name="IHostDVDDriveCollection" type="IHostDVDDrive"
6231 enumerator="IHostDVDDriveEnumerator"
6232 uuid="1909c533-1a1e-445f-a4e1-a267cffc30ed"
6233 readonly="yes"
6234 >
6235 <method name="findByName">
6236 <desc>
6237 Searches this collection for a host drive with the given name.
6238 <note>
6239 The method returns an error if the given name does not
6240 correspond to any host drive in the collection.
6241 </note>
6242 </desc>
6243 <param name="name" type="wstring" dir="in">
6244 <desc>Name of the host drive to search for</desc>
6245 </param>
6246 <param name="drive" type="IHostDVDDrive" dir="return">
6247 <desc>Found host drive object</desc>
6248 </param>
6249 </method>
6250 </collection>
6251
6252 <interface
6253 name="IHostFloppyDrive" extends="$unknown"
6254 uuid="b6a4d1a9-4221-43c3-bd52-021a5daa9ed2"
6255 wsmap="managed"
6256 >
6257 <desc>
6258 The IHostFloppyDrive interface represents the physical floppy drive
6259 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6260 </desc>
6261 <attribute name="name" type="wstring" readonly="yes">
6262 <desc>
6263 Returns the platform-specific device identifier.
6264 On DOS-like platforms, it is a drive name (e.g. A:).
6265 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6266 </desc>
6267 </attribute>
6268 <attribute name="description" type="wstring" readonly="yes">
6269 <desc>
6270 Returns a human readable description for the drive. This
6271 description usually contains the product and vendor name. A
6272 @c null string is returned if the description is not available.
6273 </desc>
6274 </attribute>
6275 <attribute name="udi" type="wstring" readonly="yes">
6276 <desc>
6277 Returns the unique device identifier for the drive. This
6278 attribute is reserved for future use instead of
6279 <link to="#name"/>. Currently it is not used and may return
6280 @c null on some platforms.
6281 </desc>
6282 </attribute>
6283 </interface>
6284
6285 <enumerator
6286 name="IHostFloppyDriveEnumerator" type="IHostFloppyDrive"
6287 uuid="ce04c924-4f54-432a-9dec-11fddc3ea875"
6288 />
6289
6290 <collection
6291 name="IHostFloppyDriveCollection" type="IHostFloppyDrive"
6292 enumerator="IHostFloppyDriveEnumerator"
6293 uuid="fd84bb86-c59a-4037-a557-755ff263a460"
6294 readonly="yes"
6295 >
6296 <method name="findByName">
6297 <desc>
6298 Searches this collection for a host drive with the given name.
6299 <note>
6300 The method returns an error if the given name does not
6301 correspond to any host drive in the collection.
6302 </note>
6303 </desc>
6304 <param name="name" type="wstring" dir="in">
6305 <desc>Name of the host drive to search for</desc>
6306 </param>
6307 <param name="drive" type="IHostFloppyDrive" dir="return">
6308 <desc>Found host drive object</desc>
6309 </param>
6310 </method>
6311 </collection>
6312
6313 <enum
6314 name="HostNetworkInterfaceType"
6315 uuid="763754FA-3246-4539-9590-9E603EDBF706"
6316 >
6317 <desc>
6318 Type of encapsulation. Ethernet encapsulation includes both wired and
6319 wireless Ethernet connections.
6320 <see>IHostNetworkInterface</see>
6321 </desc>
6322
6323 <const name="Unknown" value="0">
6324 <desc>
6325 The type of interface cannot be determined.
6326 </desc>
6327 </const>
6328 <const name="Ethernet" value="1">
6329 <desc>
6330 Ethernet frame encapsulation.
6331 </desc>
6332 </const>
6333 <const name="PPP" value="2">
6334 <desc>
6335 Point-to-point protocol encapsulation.
6336 </desc>
6337 </const>
6338 <const name="SLIP" value="3">
6339 <desc>
6340 Serial line IP encapsulation.
6341 </desc>
6342 </const>
6343 </enum>
6344
6345 <enum
6346 name="HostNetworkInterfaceStatus"
6347 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6348 >
6349 <desc>
6350 Current status of the interface.
6351 <see>IHostNetworkInterface</see>
6352 </desc>
6353
6354 <const name="Unknown" value="0">
6355 <desc>
6356 The state of interface cannot be determined.
6357 </desc>
6358 </const>
6359 <const name="Up" value="1">
6360 <desc>
6361 The interface is fully operational.
6362 </desc>
6363 </const>
6364 <const name="Down" value="2">
6365 <desc>
6366 The interface is not functioning.
6367 </desc>
6368 </const>
6369 </enum>
6370
6371 <interface
6372 name="IHostNetworkInterface" extends="$unknown"
6373 uuid="832720ac-2df6-41d4-a867-a0b40df14c7f"
6374 wsmap="managed"
6375 >
6376 <desc>
6377 Reprents one of host's network interfaces. IP V6 address and network
6378 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6379 separated by colons.
6380 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6381 </desc>
6382 <attribute name="name" type="wstring" readonly="yes">
6383 <desc>Returns the host network interface name.</desc>
6384 </attribute>
6385
6386 <attribute name="id" type="uuid" readonly="yes">
6387 <desc>Returns the interface UUID.</desc>
6388 </attribute>
6389
6390 <attribute name="IPAddress" type="unsigned long" readonly="yes">
6391 <desc>Returns the IP V4 address of the interface.</desc>
6392 </attribute>
6393
6394 <attribute name="networkMask" type="unsigned long" readonly="yes">
6395 <desc>Returns the network mask of the interface.</desc>
6396 </attribute>
6397
6398 <attribute name="IPV6Address" type="wstring" readonly="yes">
6399 <desc>Returns the IP V6 address of the interface.</desc>
6400 </attribute>
6401
6402 <attribute name="IPV6NetworkMask" type="wstring" readonly="yes">
6403 <desc>Returns the IP V6 network mask of the interface.</desc>
6404 </attribute>
6405
6406 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6407 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6408 </attribute>
6409
6410 <attribute name="type" type="HostNetworkInterfaceType" readonly="yes">
6411 <desc>Type of protocol encapsulation used.</desc>
6412 </attribute>
6413
6414 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6415 <desc>Status of the interface.</desc>
6416 </attribute>
6417 </interface>
6418
6419 <interface
6420 name="IHost" extends="$unknown"
6421 uuid="7c172c42-b209-4bdc-9ddf-a84f222bd59a"
6422 wsmap="managed"
6423 >
6424 <desc>
6425 The IHost interface represents the physical machine that this VirtualBox
6426 installation runs on.
6427
6428 An object implementing this interface is returned by the
6429 <link to="IVirtualBox::host" /> attribute. This interface contains
6430 read-only information about the host's physical hardware (such as what
6431 processors and disks are available, what the host operating system is,
6432 and so on) and also allows for manipulating some of the host's hardware,
6433 such as global USB device filters and host interface networking.
6434
6435 </desc>
6436 <attribute name="DVDDrives" type="IHostDVDDriveCollection" readonly="yes">
6437 <desc>List of DVD drives available on the host.</desc>
6438 </attribute>
6439
6440 <attribute name="floppyDrives" type="IHostFloppyDriveCollection" readonly="yes">
6441 <desc>List of floppy drives available on the host.</desc>
6442 </attribute>
6443
6444 <attribute name="USBDevices" type="IHostUSBDeviceCollection" readonly="yes">
6445 <desc>
6446 List of USB devices currently attached to the host.
6447 Once a new device is physically attached to the host computer,
6448 it appears in this list and remains there until detached.
6449
6450 <note>
6451 This method may set a @ref com_warnings "warning result code".
6452 </note>
6453 <note>
6454 If USB functionality is not available in the given edition of
6455 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6456 </note>
6457 </desc>
6458 </attribute>
6459
6460 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilterCollection" readonly="yes">
6461 <desc>
6462 List of USB device filters in action.
6463 When a new device is physically attached to the host computer,
6464 filters from this list are applied to it (in order they are stored
6465 in the list). The first matched filter will determine the
6466 <link to="IHostUSBDeviceFilter::action">action</link>
6467 performed on the device.
6468
6469 Unless the device is ignored by these filters, filters of all
6470 currently running virtual machines
6471 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6472
6473 <note>
6474 This method may set a @ref com_warnings "warning result code".
6475 </note>
6476 <note>
6477 If USB functionality is not available in the given edition of
6478 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6479 </note>
6480
6481 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6482 </desc>
6483 </attribute>
6484
6485 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6486 <desc>List of host network interfaces currently defined on the host.</desc>
6487 </attribute>
6488
6489 <attribute name="processorCount" type="unsigned long" readonly="yes">
6490 <desc>Number of (logical) CPUs installed in the host system.</desc>
6491 </attribute>
6492
6493 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6494 <desc>Number of (logical) CPUs online in the host system.</desc>
6495 </attribute>
6496
6497 <method name="getProcessorSpeed">
6498 <desc>Query the (approximate) maximum speed of a specified host CPU in
6499 Megahertz.
6500 </desc>
6501 <param name="cpuId" type="unsigned long" dir="in">
6502 <desc>
6503 Identifier of the CPU.
6504 </desc>
6505 </param>
6506 <param name="speed" type="unsigned long" dir="return">
6507 <desc>
6508 Speed value. 0 is returned if value is not known or @a cpuId is
6509 invalid.
6510 </desc>
6511 </param>
6512 </method>
6513
6514 <method name="getProcessorFeature">
6515 <desc>Query whether a CPU feature is supported or not.</desc>
6516 <param name="feature" type="ProcessorFeature" dir="in">
6517 <desc>
6518 CPU Feature identifier.
6519 </desc>
6520 </param>
6521 <param name="supported" type="boolean" dir="return">
6522 <desc>
6523 Feature is supported or not.
6524 </desc>
6525 </param>
6526 </method>
6527
6528 <method name="getProcessorDescription">
6529 <desc>Query the model string of a specified host CPU.
6530 <note>
6531 This function is not implemented in the current version of the
6532 product.
6533 </note>
6534 </desc>
6535 <param name="cpuId" type="unsigned long" dir="in">
6536 <desc>
6537 Identifier of the CPU.
6538 </desc>
6539 </param>
6540 <param name="description" type="wstring" dir="return">
6541 <desc>
6542 Model string. A NULL string is returned if value is not known or
6543 @a cpuId is invalid.
6544 </desc>
6545 </param>
6546 </method>
6547
6548 <attribute name="memorySize" type="unsigned long" readonly="yes">
6549 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6550 </attribute>
6551
6552 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6553 <desc>Available system memory in the host system.</desc>
6554 </attribute>
6555
6556 <attribute name="operatingSystem" type="wstring" readonly="yes">
6557 <desc>Name of the host system's operating system.</desc>
6558 </attribute>
6559
6560 <attribute name="OSVersion" type="wstring" readonly="yes">
6561 <desc>Host operating system's version string.</desc>
6562 </attribute>
6563
6564 <attribute name="UTCTime" type="long long" readonly="yes">
6565 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6566 </attribute>
6567
6568<if target="midl">
6569 <method name="createHostNetworkInterface">
6570 <desc>
6571 Creates a new adapter for Host Interface Networking.
6572 <result name="E_INVALIDARG">
6573 Host network interface @a name already exists.
6574 </result>
6575 </desc>
6576 <param name="name" type="wstring" dir="in">
6577 <desc>
6578 Adapter name.
6579 </desc>
6580 </param>
6581 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6582 <desc>
6583 Created host interface object.
6584 </desc>
6585 </param>
6586 <param name="progress" type="IProgress" dir="return">
6587 <desc>
6588 Progress object to track the operation completion.
6589 </desc>
6590 </param>
6591 </method>
6592 <method name="removeHostNetworkInterface">
6593 <desc>
6594 Removes the given host network interface.
6595 <result name="VBOX_E_OBJECT_NOT_FOUND">
6596 No host network interface matching @a id found.
6597 </result>
6598 </desc>
6599 <param name="id" type="uuid" dir="in">
6600 <desc>
6601 Adapter GUID.
6602 </desc>
6603 </param>
6604 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6605 <desc>
6606 Removed host interface object.
6607 </desc>
6608 </param>
6609 <param name="progress" type="IProgress" dir="return">
6610 <desc>
6611 Progress object to track the operation completion.
6612 </desc>
6613 </param>
6614 </method>
6615</if>
6616
6617 <method name="createUSBDeviceFilter">
6618 <desc>
6619 Creates a new USB device filter. All attributes except
6620 the filter name are set to <tt>null</tt> (any match),
6621 <i>active</i> is <tt>false</tt> (the filter is not active).
6622
6623 The created filter can be added to the list of filters using
6624 <link to="#insertUSBDeviceFilter()"/>.
6625
6626 <see>#USBDeviceFilters</see>
6627 </desc>
6628 <param name="name" type="wstring" dir="in">
6629 <desc>
6630 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6631 for more info.
6632 </desc>
6633 </param>
6634 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6635 <desc>Created filter object.</desc>
6636 </param>
6637 </method>
6638
6639 <method name="insertUSBDeviceFilter">
6640 <desc>
6641 Inserts the given USB device to the specified position
6642 in the list of filters.
6643
6644 Positions are numbered starting from <tt>0</tt>. If the specified
6645 position is equal to or greater than the number of elements in
6646 the list, the filter is added at the end of the collection.
6647
6648 <note>
6649 Duplicates are not allowed, so an attempt to insert a
6650 filter that is already in the list, will return an
6651 error.
6652 </note>
6653 <note>
6654 This method may set a @ref com_warnings "warning result code".
6655 </note>
6656 <note>
6657 If USB functionality is not available in the given edition of
6658 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6659 </note>
6660
6661 <see>#USBDeviceFilters</see>
6662
6663 <result name="VBOX_E_INVALID_OBJECT_STATE">
6664 USB device filter is not created within this VirtualBox instance.
6665 </result>
6666 <result name="E_INVALIDARG">
6667 USB device filter already in list.
6668 </result>
6669
6670 </desc>
6671 <param name="position" type="unsigned long" dir="in">
6672 <desc>Position to insert the filter to.</desc>
6673 </param>
6674 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6675 <desc>USB device filter to insert.</desc>
6676 </param>
6677 </method>
6678
6679 <method name="removeUSBDeviceFilter">
6680 <desc>
6681 Removes a USB device filter from the specified position in the
6682 list of filters.
6683
6684 Positions are numbered starting from <tt>0</tt>. Specifying a
6685 position equal to or greater than the number of elements in
6686 the list will produce an error.
6687
6688 <note>
6689 This method may set a @ref com_warnings "warning result code".
6690 </note>
6691 <note>
6692 If USB functionality is not available in the given edition of
6693 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6694 </note>
6695
6696 <see>#USBDeviceFilters</see>
6697
6698 <result name="E_INVALIDARG">
6699 USB device filter list empty or invalid @a position.
6700 </result>
6701
6702 </desc>
6703 <param name="position" type="unsigned long" dir="in">
6704 <desc>Position to remove the filter from.</desc>
6705 </param>
6706 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6707 <desc>Removed USB device filter.</desc>
6708 </param>
6709 </method>
6710
6711 <method name="findHostNetworkInterfaceByName">
6712 <desc>
6713 Searches through all host network interfaces for an interface with
6714 the given name.
6715 <note>
6716 The method returns an error if the given name does not
6717 correspond to any host network interface.
6718 </note>
6719 </desc>
6720 <param name="name" type="wstring" dir="in">
6721 <desc>Name of the host network interface to search for.</desc>
6722 </param>
6723 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6724 <desc>Found host network interface object.</desc>
6725 </param>
6726 </method>
6727 <method name="findHostNetworkInterfaceById">
6728 <desc>
6729 Searches through all host network interfaces for an interface with
6730 the given GUID.
6731 <note>
6732 The method returns an error if the given GUID does not
6733 correspond to any host network interface.
6734 </note>
6735 </desc>
6736 <param name="id" type="uuid" dir="in">
6737 <desc>GUID of the host network interface to search for.</desc>
6738 </param>
6739 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6740 <desc>Found host network interface object.</desc>
6741 </param>
6742 </method>
6743 </interface>
6744
6745 <!--
6746 // ISystemProperties
6747 /////////////////////////////////////////////////////////////////////////
6748 -->
6749
6750 <interface
6751 name="ISystemProperties"
6752 extends="$unknown"
6753 uuid="604afeba-5963-4d12-a577-902ffb96352a"
6754 wsmap="managed"
6755 >
6756 <desc>
6757 The ISystemProperties interface represents global properties of the given
6758 VirtualBox installation.
6759
6760 These properties define limits and default values for various attributes
6761 and parameters. Most of the properties are read-only, but some can be
6762 changed by a user.
6763 </desc>
6764
6765 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
6766 <desc>Minimum guest system memory in Megabytes.</desc>
6767 </attribute>
6768
6769 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
6770 <desc>Maximum guest system memory in Megabytes.</desc>
6771 </attribute>
6772
6773 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
6774 <desc>Minimum guest video memory in Megabytes.</desc>
6775 </attribute>
6776
6777 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
6778 <desc>Maximum guest video memory in Megabytes.</desc>
6779 </attribute>
6780
6781 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
6782 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
6783 </attribute>
6784
6785 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
6786 <desc>
6787 Number of network adapters associated with every
6788 <link to="IMachine"/> instance.
6789 </desc>
6790 </attribute>
6791
6792 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
6793 <desc>
6794 Number of serial ports associated with every
6795 <link to="IMachine"/> instance.
6796 </desc>
6797 </attribute>
6798
6799 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
6800 <desc>
6801 Number of parallel ports associated with every
6802 <link to="IMachine"/> instance.
6803 </desc>
6804 </attribute>
6805
6806 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
6807 <desc>
6808 Maximum device position in the boot order. This value corresponds
6809 to the total number of devices a machine can boot from, to make it
6810 possible to include all possible devices to the boot list.
6811 <see><link to="IMachine::setBootOrder()"/></see>
6812 </desc>
6813 </attribute>
6814
6815 <attribute name="defaultMachineFolder" type="wstring">
6816 <desc>
6817 Full path to the default directory used to create new or open
6818 existing machines when a settings file name contains no
6819 path.
6820
6821 The initial value of this property is
6822 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
6823 VirtualBox_home</link><tt>&gt;/Machines</tt>.
6824
6825 <note>
6826 Setting this property to <tt>null</tt> will restore the
6827 initial value.
6828 </note>
6829 <note>
6830 When settings this property, the specified path can be
6831 absolute (full path) or relative
6832 to the <link to="IVirtualBox::homeFolder">
6833 VirtualBox home directory</link>.
6834 When reading this property, a full path is
6835 always returned.
6836 </note>
6837 <note>
6838 The specified path may not exist, it will be created
6839 when necessary.
6840 </note>
6841
6842 <see>
6843 <link to="IVirtualBox::createMachine()"/>,
6844 <link to="IVirtualBox::openMachine()"/>
6845 </see>
6846 </desc>
6847 </attribute>
6848
6849 <attribute name="defaultHardDiskFolder" type="wstring">
6850 <desc>
6851 Full path to the default directory used to create new or open existing
6852 virtual disks.
6853
6854 This path is used when the storage unit of a hard disk is a regular file
6855 in the host's file system and only a file name that contains no path is
6856 given.
6857
6858 The initial value of this property is
6859 <tt>&lt;</tt>
6860 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
6861 <tt>&gt;/HardDisks</tt>.
6862
6863 <note>
6864 Setting this property to <tt>null</tt> will restore the
6865 initial value.
6866 </note>
6867 <note>
6868 When settings this property, the specified path can be relative
6869 to the
6870 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
6871 absolute. When reading this property, a full path is
6872 always returned.
6873 </note>
6874 <note>
6875 The specified path may not exist, it will be created
6876 when necessary.
6877 </note>
6878
6879 <see>
6880 IHardDisk2,
6881 <link to="IVirtualBox::createHardDisk2()"/>,
6882 <link to="IVirtualBox::openHardDisk2()"/>,
6883 <link to="IMedium::location"/>
6884 </see>
6885 </desc>
6886 </attribute>
6887
6888 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
6889 <desc>
6890 List of all hard disk storage formats supported by this VirtualBox
6891 installation.
6892
6893 Keep in mind that the hard disk format identifier
6894 (<link to="IHardDiskFormat::id"/>) used in other API calls like
6895 <link to="IVirtualBox::createHardDisk2()"/> to refer to a particular
6896 hard disk format is a case-insensitive string. This means that, for
6897 example, all of the following strings:
6898 <pre>
6899 "VDI"
6900 "vdi"
6901 "VdI"</pre>
6902 refer to the same hard disk format.
6903
6904 Note that the virtual hard disk framework is backend-based, therefore
6905 the list of supported formats depends on what backends are currently
6906 installed.
6907
6908 <see>
6909 <link to="IHardDiskFormat"/>,
6910 </see>
6911 </desc>
6912 </attribute>
6913
6914 <attribute name="defaultHardDiskFormat" type="wstring">
6915 <desc>
6916 Identifier of the default hard disk format used by VirtualBox.
6917
6918 The hard disk format set by this attribute is used by VirtualBox
6919 when the hard disk format was not specified explicitly. One example is
6920 <link to="IVirtualBox::createHardDisk2()"/> with the <tt>null</tt>
6921 format argument. A more complex example is implicit creation of
6922 differencing hard disks when taking a snapshot of a virtual machine:
6923 this operation will try to use a format of the parent hard disk first
6924 and if this format does not support differencing hard disks the default
6925 format specified by this argument will be used.
6926
6927 The list of supported hard disk formats may be obtained by the
6928 <link to="#hardDiskFormats"/> call. Note that the default hard disk
6929 format must have a capability to create differencing hard disks;
6930 otherwise opeartions that create hard disks implicitly may fail
6931 unexpectedly.
6932
6933 The initial value of this property is <tt>VDI</tt> in the current
6934 version of the VirtualBox product, but may change in the future.
6935
6936 <note>
6937 Setting this property to <tt>null</tt> will restore the
6938 initial value.
6939 </note>
6940
6941 <see>
6942 <link to="#hardDiskFormats"/>,
6943 <link to="IHardDiskFormat::id"/>,
6944 <link to="IVirtualBox::createHardDisk2()"/>
6945 </see>
6946 </desc>
6947 </attribute>
6948
6949 <attribute name="remoteDisplayAuthLibrary" type="wstring">
6950 <desc>
6951 Library that provides authentication for VRDP clients. The library
6952 is used if a virtual machine's authentication type is set to "external"
6953 in the VM RemoteDisplay configuration.
6954
6955 The system library extension (".DLL" or ".so") must be omitted.
6956 A full path can be specified; if not, then the library must reside on the
6957 system's default library path.
6958
6959 The default value of this property is <tt>VRDPAuth</tt>. There is a library
6960 of that name in one of the default VirtualBox library directories.
6961
6962 For details about VirtualBox authentication libraries and how to implement
6963 them, please refer to the VirtualBox manual.
6964
6965 <note>
6966 Setting this property to <tt>null</tt> will restore the
6967 initial value.
6968 </note>
6969 </desc>
6970 </attribute>
6971
6972 <attribute name="webServiceAuthLibrary" type="wstring">
6973 <desc>
6974 Library that provides authentication for webservice clients. The library
6975 is used if a virtual machine's authentication type is set to "external"
6976 in the VM RemoteDisplay configuration and will be called from
6977 within the <link to="IWebsessionManager::logon" /> implementation.
6978
6979 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
6980 there is no per-VM setting for this, as the webservice is a global
6981 resource (if it is running). Only for this setting (for the webservice),
6982 setting this value to a literal "null" string disables authentication,
6983 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
6984 no matter what user name and password are supplied.
6985
6986 The initial value of this property is <tt>VRDPAuth</tt>,
6987 meaning that the webservice will use the same authentication
6988 library that is used by default for VBoxVRDP (again, see
6989 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
6990 The format and calling convention of authentication libraries
6991 is the same for the webservice as it is for VBoxVRDP.
6992
6993 </desc>
6994 </attribute>
6995
6996 <attribute name="HWVirtExEnabled" type="boolean">
6997 <desc>
6998 This specifies the default value for hardware virtualization
6999 extensions. If enabled, virtual machines will make use of
7000 hardware virtualization extensions such as Intel VT-x and
7001 AMD-V by default. This value can be overridden by each VM
7002 using their <link to="IMachine::HWVirtExEnabled" /> property.
7003 </desc>
7004 </attribute>
7005
7006 <attribute name="LogHistoryCount" type="unsigned long">
7007 <desc>
7008 This value specifies how many old release log files are kept.
7009 </desc>
7010 </attribute>
7011 </interface>
7012
7013 <!--
7014 // IGuest
7015 /////////////////////////////////////////////////////////////////////////
7016 -->
7017
7018 <interface
7019 name="IGuestOSType" extends="$unknown"
7020 uuid="bc415228-eed0-402c-92f5-96fc4e2dd7e4"
7021 wsmap="struct"
7022 >
7023 <desc>
7024 </desc>
7025
7026 <attribute name="familyId" type="wstring" readonly="yes">
7027 <desc>Guest OS family identifier string.</desc>
7028 </attribute>
7029
7030 <attribute name="familyDescription" type="wstring" readonly="yes">
7031 <desc>Human readable description of the guest OS family.</desc>
7032 </attribute>
7033
7034 <attribute name="id" type="wstring" readonly="yes">
7035 <desc>Guest OS identifier string.</desc>
7036 </attribute>
7037
7038 <attribute name="description" type="wstring" readonly="yes">
7039 <desc>Human readable description of the guest OS.</desc>
7040 </attribute>
7041
7042 <attribute name="is64Bit" type="boolean" readonly="yes">
7043 <desc>Returns @c true if the given OS is 64-bit</desc>
7044 </attribute>
7045
7046 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7047 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7048 </attribute>
7049
7050 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7051 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7052 </attribute>
7053
7054 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7055 <desc>Recommended RAM size in Megabytes.</desc>
7056 </attribute>
7057
7058 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7059 <desc>Recommended video RAM size in Megabytes.</desc>
7060 </attribute>
7061
7062 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7063 <desc>Recommended hard disk size in Megabytes.</desc>
7064 </attribute>
7065
7066 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7067 <desc>Returns recommended network adapter for this OS type.</desc>
7068 </attribute>
7069 </interface>
7070
7071
7072 <enumerator
7073 name="IGuestOSTypeEnumerator" type="IGuestOSType"
7074 uuid="a3335e02-4669-4e3c-80c7-c4dc7056a07c"
7075 />
7076
7077 <collection
7078 name="IGuestOSTypeCollection" type="IGuestOSType" enumerator="IGuestOSTypeEnumerator"
7079 uuid="a5e36749-a610-498b-9f29-2e36c1042d65"
7080 readonly="yes"
7081 />
7082
7083 <interface
7084 name="IGuest" extends="$unknown"
7085 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7086
7087 wsmap="suppress"
7088 >
7089 <desc>
7090 The IGuest interface represents information about the operating system
7091 running inside the virtual machine. Used in
7092 <link to="IConsole::guest"/>.
7093
7094 IGuest provides information about the guest operating system, whether
7095 Guest Additions are installed and other OS-specific virtual machine
7096 properties.
7097 </desc>
7098
7099 <attribute name="OSTypeId" type="wstring" readonly="yes">
7100 <desc>
7101 Identifier of the Guest OS type as reported by the Guest
7102 Additions.
7103 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7104 an IGuestOSType object representing details about the given
7105 Guest OS type.
7106 <note>
7107 If Guest Additions are not installed, this value will be
7108 the same as <link to="IMachine::OSTypeId"/>.
7109 </note>
7110 </desc>
7111 </attribute>
7112
7113 <attribute name="additionsActive" type="boolean" readonly="yes">
7114 <desc>
7115 Flag whether the Guest Additions are installed and active
7116 in which case their version will be returned by the
7117 <link to="#additionsVersion"/> property.
7118 </desc>
7119 </attribute>
7120
7121 <attribute name="additionsVersion" type="wstring" readonly="yes">
7122 <desc>
7123 Version of the Guest Additions (3 decimal numbers separated
7124 by dots) or empty when the Additions are not installed. The
7125 Additions may also report a version but yet not be active as
7126 the version might be refused by VirtualBox (incompatible) or
7127 other failures occurred.
7128 </desc>
7129 </attribute>
7130
7131 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7132 <desc>
7133 Flag whether seamless guest display rendering (seamless desktop
7134 integration) is supported.
7135 </desc>
7136 </attribute>
7137
7138 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7139 <desc>
7140 Flag whether the guest is in graphics mode. If it is not, then
7141 seamless rendering will not work, resize hints are not immediately
7142 acted on and guest display resizes are probably not initiated by
7143 the guest additions.
7144 </desc>
7145 </attribute>
7146
7147 <attribute name="memoryBalloonSize" type="unsigned long">
7148 <desc>Guest system memory balloon size in megabytes.</desc>
7149 </attribute>
7150
7151 <attribute name="statisticsUpdateInterval" type="unsigned long">
7152 <desc>Interval to update guest statistics in seconds.</desc>
7153 </attribute>
7154
7155 <method name="setCredentials">
7156 <desc>
7157 Store login credentials that can be queried by guest operating
7158 systems with Additions installed. The credentials are transient
7159 to the session and the guest may also choose to erase them. Note
7160 that the caller cannot determine whether the guest operating system
7161 has queried or made use of the credentials.
7162
7163 <result name="VBOX_E_VM_ERROR">
7164 VMM device is not available.
7165 </result>
7166
7167 </desc>
7168 <param name="userName" type="wstring" dir="in">
7169 <desc>User name string, can be empty</desc>
7170 </param>
7171 <param name="password" type="wstring" dir="in">
7172 <desc>Password string, can be empty</desc>
7173 </param>
7174 <param name="domain" type="wstring" dir="in">
7175 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7176 </param>
7177 <param name="allowInteractiveLogon" type="boolean" dir="in">
7178 <desc>
7179 Flag whether the guest should alternatively allow the user to
7180 interactively specify different credentials. This flag might
7181 not be supported by all versions of the Additions.
7182 </desc>
7183 </param>
7184 </method>
7185
7186 <method name="getStatistic">
7187 <desc>
7188 Query specified guest statistics as reported by the VirtualBox Additions.
7189 </desc>
7190 <param name="cpuId" type="unsigned long" dir="in">
7191 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7192 </param>
7193 <param name="statistic" type="GuestStatisticType" dir="in">
7194 <desc>Statistic type.</desc>
7195 </param>
7196 <param name="statVal" type="unsigned long" dir="out">
7197 <desc>Statistics value</desc>
7198 </param>
7199 </method>
7200
7201 </interface>
7202
7203
7204 <!--
7205 // IProgress
7206 /////////////////////////////////////////////////////////////////////////
7207 -->
7208
7209 <enumerator
7210 name="IProgressEnumerator" type="IProgress"
7211 uuid="e0380522-4ef1-48f4-856c-e455177ccb2d"
7212 />
7213
7214 <collection
7215 name="IProgressCollection" type="IProgress" enumerator="IProgressEnumerator"
7216 uuid="78B76A7C-F0F2-467c-9F0E-F089A54EE957"
7217 readonly="yes"
7218 />
7219
7220 <interface
7221 name="IProgress" extends="$unknown"
7222 uuid="10CC03A1-717E-429b-992D-C67B56175A51"
7223 wsmap="managed"
7224 >
7225 <desc>
7226 The IProgress interface represents a task progress object that allows
7227 to wait for the completion of some asynchronous task.
7228
7229 The task consists of one or more operations that run sequentially,
7230 one after one. There is an individual percent of completion of the
7231 current operation and the percent of completion of the task as a
7232 whole. Similarly, you can wait for the completion of a particular
7233 operation or for the completion of the whole task.
7234
7235 Every operation is identified by a number (starting from 0)
7236 and has a separate description.
7237 </desc>
7238
7239 <attribute name="id" type="uuid" readonly="yes">
7240 <desc>ID of the task.</desc>
7241 </attribute>
7242
7243 <attribute name="description" type="wstring" readonly="yes">
7244 <desc>Description of the task.</desc>
7245 </attribute>
7246
7247 <attribute name="initiator" type="$unknown" readonly="yes">
7248 <desc>Initiator of the task.</desc>
7249 </attribute>
7250
7251 <attribute name="cancelable" type="boolean" readonly="yes">
7252 <desc>Whether the task can be interrupted.</desc>
7253 </attribute>
7254
7255 <attribute name="percent" type="long" readonly="yes">
7256 <desc>
7257 Current task progress value in percent.
7258 This value depends on how many operations are already complete.
7259 </desc>
7260 </attribute>
7261
7262 <attribute name="completed" type="boolean" readonly="yes">
7263 <desc>Whether the task has been completed.</desc>
7264 </attribute>
7265
7266 <attribute name="canceled" type="boolean" readonly="yes">
7267 <desc>Whether the task has been canceled.</desc>
7268 </attribute>
7269
7270 <attribute name="resultCode" type="result" readonly="yes">
7271 <desc>
7272 Result code of the progress task.
7273 Valid only if <link to="#completed"/> is true.
7274 </desc>
7275 </attribute>
7276
7277 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7278 <desc>
7279 Extended information about the unsuccessful result of the
7280 progress operation. May be NULL when no extended information
7281 is available.
7282 Valid only if <link to="#completed"/> is true and
7283 <link to="#resultCode"/> indicates a failure.
7284 </desc>
7285 </attribute>
7286
7287 <attribute name="operationCount" type="unsigned long" readonly="yes">
7288 <desc>
7289 Number of operations this task is divided into.
7290 Every task consists of at least one operation.
7291 </desc>
7292 </attribute>
7293
7294 <attribute name="operation" type="unsigned long" readonly="yes">
7295 <desc>Number of the operation being currently executed.</desc>
7296 </attribute>
7297
7298 <attribute name="operationDescription" type="wstring" readonly="yes">
7299 <desc>
7300 Description of the operation being currently executed.
7301 </desc>
7302 </attribute>
7303
7304 <attribute name="operationPercent" type="long" readonly="yes">
7305 <desc>Current operation progress value in percent.</desc>
7306 </attribute>
7307
7308 <method name="waitForCompletion">
7309 <desc>
7310 Waits until the task is done (including all operations) with a
7311 given timeout.
7312
7313 <result name="VBOX_E_IPRT_ERROR">
7314 Failed to wait for task completion.
7315 </result>
7316
7317 </desc>
7318 <param name="timeout" type="long" dir="in">
7319 <desc>
7320 Timeout value in milliseconds.
7321 Specify -1 for an indefinite wait.
7322 </desc>
7323 </param>
7324 </method>
7325
7326 <method name="waitForOperationCompletion">
7327 <desc>
7328 Waits until the given operation is done with a given timeout.
7329
7330 <result name="VBOX_E_IPRT_ERROR">
7331 Failed to wait for operation completion.
7332 </result>
7333
7334 </desc>
7335 <param name="operation" type="unsigned long" dir="in">
7336 <desc>
7337 Number of the operation to wait for.
7338 Must be less than <link to="#operationCount"/>.
7339 </desc>
7340 </param>
7341 <param name="timeout" type="long" dir="in">
7342 <desc>
7343 Timeout value in milliseconds.
7344 Specify -1 for an indefinite wait.
7345 </desc>
7346 </param>
7347 </method>
7348
7349 <method name="cancel">
7350 <desc>
7351 Cancels the task.
7352 <note>
7353 If <link to="#cancelable"/> is <tt>false</tt>, then
7354 this method will fail.
7355 </note>
7356
7357 <result name="VBOX_E_INVALID_OBJECT_STATE">
7358 Operation cannot be canceled.
7359 </result>
7360
7361 </desc>
7362 </method>
7363
7364 </interface>
7365
7366
7367 <!--
7368 // ISnapshot
7369 /////////////////////////////////////////////////////////////////////////
7370 -->
7371
7372 <enumerator
7373 name="ISnapshotEnumerator" type="ISnapshot"
7374 uuid="25cfa2a4-1f1d-4f05-9658-b7a5894ef1a3"
7375 />
7376
7377 <collection
7378 name="ISnapshotCollection" type="ISnapshot"
7379 enumerator="ISnapshotEnumerator"
7380 uuid="23852e3c-94cd-4801-ab05-ed35675b3894"
7381 readonly="yes"
7382 />
7383
7384 <interface
7385 name="ISnapshot" extends="$unknown"
7386 uuid="9f1bbf79-13b0-4da2-abba-4a992c65c083"
7387 wsmap="managed"
7388 >
7389 <desc>
7390 The ISnapshot interface represents a snapshot of the virtual
7391 machine.
7392
7393 The <i>snapshot</i> stores all the information about a virtual
7394 machine necessary to bring it to exactly the same state as it was at
7395 the time of taking the snapshot. The snapshot includes:
7396
7397 <ul>
7398 <li>all settings of the virtual machine (i.e. its hardware
7399 configuration: RAM size, attached hard disks, etc.)
7400 </li>
7401 <li>the execution state of the virtual machine (memory contents,
7402 CPU state, etc.).
7403 </li>
7404 </ul>
7405
7406 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7407 or <i>online</i> (taken when the VM is running). The execution
7408 state of the offline snapshot is called a <i>zero execution state</i>
7409 (it doesn't actually contain any information about memory contents
7410 or the CPU state, assuming that all hardware is just powered off).
7411
7412 <h3>Snapshot branches</h3>
7413
7414 Snapshots can be chained. Chained snapshots form a branch where
7415 every next snapshot is based on the previous one. This chaining is
7416 mostly related to hard disk branching (see <link to="IHardDisk2"/>
7417 description). This means that every time a new snapshot is created,
7418 a new differencing hard disk is implicitly created for all normal
7419 hard disks attached to the given virtual machine. This allows to
7420 fully restore hard disk contents when the machine is later reverted
7421 to a particular snapshot.
7422
7423 In the current implementation, multiple snapshot branches within one
7424 virtual machine are not allowed. Every machine has a single branch,
7425 and <link to="IConsole::takeSnapshot()"/> operation adds a new
7426 snapshot to the top of that branch.
7427
7428 Existing snapshots can be discarded using
7429 <link to="IConsole::discardSnapshot()"/>.
7430
7431 <h3>Current snapshot</h3>
7432
7433 Every virtual machine has a current snapshot, identified by
7434 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7435 a base for the <i>current machine state</i> (see below), to the effect
7436 that all normal hard disks of the machine and its execution
7437 state are based on this snapshot.
7438
7439 In the current implementation, the current snapshot is always the
7440 last taken snapshot (i.e. the head snapshot on the branch) and it
7441 cannot be changed.
7442
7443 The current snapshot is <tt>null</tt> if the machine doesn't have
7444 snapshots at all; in this case the current machine state is just
7445 current settings of this machine plus its current execution state.
7446
7447 <h3>Current machine state</h3>
7448
7449 The current machine state is what represented by IMachine instances got
7450 directly from IVirtualBox
7451 using <link
7452 to="IVirtualBox::getMachine()">getMachine()</link>, <link
7453 to="IVirtualBox::findMachine()">findMachine()</link>, etc. (as opposed
7454 to instances returned by <link to="ISnapshot::machine"/>). This state
7455 is always used when the machine is <link to="IConsole::powerUp"> powered
7456 on</link>.
7457
7458 The current machine state also includes the current execution state.
7459 If the machine is being currently executed
7460 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7461 and above), its execution state is just what's happening now.
7462 If it is powered off (<link to="MachineState_PoweredOff"/> or
7463 <link to="MachineState_Aborted"/>), it has a zero execution state.
7464 If the machine is saved (<link to="MachineState_Saved"/>), its
7465 execution state is what saved in the execution state file
7466 (<link to="IMachine::stateFilePath"/>).
7467
7468 If the machine is in the saved state, then, next time it is powered
7469 on, its execution state will be fully restored from the saved state
7470 file and the execution will continue from the point where the state
7471 was saved.
7472
7473 Similarly to snapshots, the current machine state can be discarded
7474 using <link to="IConsole::discardCurrentState()"/>.
7475
7476 <h3>Taking and discarding snapshots</h3>
7477
7478 The table below briefly explains the meaning of every snapshot
7479 operation:
7480
7481 <table>
7482 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7483
7484 <tr><td><link to="IConsole::takeSnapshot()"/></td>
7485
7486 <td>Save the current state of the virtual machine, including all
7487 settings, contents of normal hard disks and the current modifications
7488 to immutable hard disks (for online snapshots)</td>
7489
7490 <td>The current state is not changed (the machine will continue
7491 execution if it is being executed when the snapshot is
7492 taken)</td></tr>
7493
7494 <tr><td><link to="IConsole::discardSnapshot()"/></td>
7495
7496 <td>Forget the state of the virtual machine stored in the snapshot:
7497 dismiss all saved settings and delete the saved execution state (for
7498 online snapshots)</td>
7499
7500 <td>Other snapshots (including child snapshots, if any) and the
7501 current state are not directly affected</td></tr>
7502
7503 <tr><td><link to="IConsole::discardCurrentState()"/></td>
7504
7505 <td>Restore the current state of the virtual machine from the state
7506 stored in the current snapshot, including all settings and hard disk
7507 contents</td>
7508
7509 <td>The current state of the machine existed prior to this operation
7510 is lost</td></tr>
7511
7512 <tr><td><link to="IConsole::discardCurrentSnapshotAndState()"/></td>
7513
7514 <td>Completely revert the virtual machine to the state it was in
7515 before the current snapshot has been taken</td>
7516
7517 <td>The current state, as well as the current snapshot, are
7518 lost</td></tr>
7519
7520 </table>
7521
7522 </desc>
7523
7524 <attribute name="id" type="uuid" readonly="yes">
7525 <desc>UUID of the snapshot.</desc>
7526 </attribute>
7527
7528 <attribute name="name" type="wstring">
7529 <desc>Short name of the snapshot.</desc>
7530 </attribute>
7531
7532 <attribute name="description" type="wstring">
7533 <desc>Optional description of the snapshot.</desc>
7534 </attribute>
7535
7536 <attribute name="timeStamp" type="long long" readonly="yes">
7537 <desc>
7538 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7539 </desc>
7540 </attribute>
7541
7542 <attribute name="online" type="boolean" readonly="yes">
7543 <desc>
7544 <tt>true</tt> if this snapshot is an online snapshot and
7545 <tt>false</tt> otherwise.
7546
7547 <note>
7548 When this attribute is <tt>true</tt>, the
7549 <link to="IMachine::stateFilePath"/> attribute of the
7550 <link to="#machine"/> object associated with this snapshot
7551 will point to the saved state file. Otherwise, it will be
7552 <tt>null</tt>.
7553 </note>
7554 </desc>
7555 </attribute>
7556
7557 <attribute name="machine" type="IMachine" readonly="yes">
7558 <desc>
7559 Virtual machine this snapshot is taken on. This object
7560 stores all settings the machine had when taking this snapshot.
7561 <note>
7562 The returned machine object is immutable, i.e. no
7563 any settings can be changed.
7564 </note>
7565 </desc>
7566 </attribute>
7567
7568 <attribute name="parent" type="ISnapshot" readonly="yes">
7569 <desc>
7570 Parent snapshot (a snapshot this one is based on).
7571 <note>
7572 It's not an error to read this attribute on a snapshot
7573 that doesn't have a parent -- a null object will be
7574 returned to indicate this.
7575 </note>
7576 </desc>
7577 </attribute>
7578
7579 <attribute name="children" type="ISnapshotCollection" readonly="yes">
7580 <desc>
7581 Child snapshots (all snapshots having this one as a parent).
7582 <note>
7583 In the current implementation, there can be only one
7584 child snapshot, or no children at all, meaning this is the
7585 last (head) snapshot.
7586 </note>
7587 </desc>
7588 </attribute>
7589
7590 </interface>
7591
7592
7593 <!--
7594 // IMedia
7595 /////////////////////////////////////////////////////////////////////////
7596 -->
7597
7598 <enum
7599 name="MediaState"
7600 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7601 >
7602 <desc>
7603 Virtual media state.
7604 <see>IMedia</see>
7605 </desc>
7606
7607 <const name="NotCreated" value="0">
7608 <desc>
7609 Associated media storage does not exist (either was not created yet or
7610 was deleted).
7611 </desc>
7612 </const>
7613 <const name="Created" value="1">
7614 <desc>
7615 Associated storage exists and accessible.
7616 </desc>
7617 </const>
7618 <const name="LockedRead" value="2">
7619 <desc>
7620 Media is locked for reading, no data modification is possible.
7621 </desc>
7622 </const>
7623 <const name="LockedWrite" value="3">
7624 <desc>
7625 Media is locked for writing, no concurrent data reading or modification
7626 is possible.
7627 </desc>
7628 </const>
7629 <const name="Inaccessible" value="4">
7630 <desc>
7631 Associated media storage is not accessible.
7632 </desc>
7633 </const>
7634 <const name="Creating" value="5">
7635 <desc>
7636 Associated media storage is being created.
7637 </desc>
7638 </const>
7639 <const name="Deleting" value="6">
7640 <desc>
7641 Associated media storage is being deleted.
7642 </desc>
7643 </const>
7644 </enum>
7645
7646 <interface
7647 name="IMedium" extends="$unknown"
7648 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7649 wsmap="managed"
7650 >
7651 <desc>
7652 The IMedium interface is a common interface for all objects representing
7653 virtual media such as hard disks, DVD images.
7654
7655 Each medium is associated with a storage unit (such as a file on the host
7656 computer or a network resource) that holds actual data. The location of
7657 the storage unit is represented by the #location attribute. The value of
7658 this attribute is media type dependent.
7659
7660 The exact media type may be determined by querying the appropriate
7661 interface such as:
7662 <ul>
7663 <li>IHardDisk2 (virtual hard disks)</li>
7664 <li>IDVDImage2 (standard CD/DVD ISO image files)</li>
7665 <li>IFloppyImage2 (raw floppy image files)</li>
7666 </ul>
7667
7668 Existing media are opened using the following methods, depending on the
7669 media type:
7670 <ul>
7671 <li><link to="IVirtualBox::openHardDisk2()"/></li>
7672 <li><link to="IVirtualBox::openDVDImage()"/></li>
7673 <li><link to="IVirtualBox::openFloppyImage()"/></li>
7674 </ul>
7675
7676 New hard disk media are created using the
7677 <link to="IVirtualBox::createHardDisk2()"/> method. CD/DVD and floppy
7678 images are created outside VirtualBox, usually by storing a copy
7679 of the real medium of the corresponding type in a regular file.
7680
7681 <h3>Known Media</h3>
7682
7683 When an existing medium gets opened for the first time, it gets
7684 automatically remembered by the given VirtualBox installation or, in other
7685 words, becomes a <i>known medium</i>. Known media are stored in the media
7686 registry transparently maintained by VirtualBox and stored in settings
7687 files so that this registry is preserved when VirtualBox is not running.
7688
7689 Newly created virtual hard disks get remembered only when the associated
7690 storage unit is actually created (see IHardDisk2 for more details).
7691
7692 All known media can be enumerated using
7693 <link to="IVirtualBox::hardDisks2"/>,
7694 <link to="IVirtualBox::DVDImages"/> and
7695 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7696 quickly found by UUID using <link to="IVirtualBox::getHardDisk2()"/>
7697 and similar methods or by location using
7698 <link to="IVirtualBox::findHardDisk2()"/> and similar methods.
7699
7700 Only known media can be attached to virtual machines.
7701
7702 Removing known media from the media registry is performed when the given
7703 medium is closed using the <link to="#close()"/> method or when its
7704 associated storage unit is deleted (only for hard disks).
7705
7706 <h3>Accessibility Checks</h3>
7707
7708 The given medium (with the created storage unit) is considered to be
7709 <i>accessible</i> when its storage unit can be successfully read from.
7710 Accessible media are indicated by the <link to="MediaState_Created"/>
7711 value of the <link to="#state"/> attribute. When the storage unit cannot
7712 be read (for example, because it is located on a disconnected network
7713 resource, or was accidentally deleted outside VirtualBox), the medium is
7714 considered to be <i>inaccessible</i> which is indicated by the
7715 <link to="MediaState_Inaccessible"/> state. The details about the reason
7716 of being inaccessible can be obtained using the
7717 <link to="#lastAccessError"/> attribute.
7718
7719 A new accessibility check is performed each time the <link to="#state"/>
7720 attribute is read. Please note that this check may take long time (several
7721 seconds or even minutes, depending on the storage unit location and
7722 format), and will block the calling thread until finished. For this
7723 reason, it is recommended to never read this attribute on the main UI
7724 thread to avoid making the UI unresponsive.
7725
7726 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7727 created for the first time), all known media are in the
7728 <link to="MediaState_Inaccessible"/> state but the value of the <link
7729 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7730 accessibility check is made on startup. This is done to make the
7731 VirtualBox object ready for serving requests as
7732 fast as possible and let the end-user application decide if it needs to
7733 check media accessibility right away or not.
7734 </desc>
7735
7736 <attribute name="id" type="uuid" readonly="yes">
7737 <desc>
7738 UUID of the medium. For a newly created medium, this value is a randomly
7739 generated UUID.
7740
7741 <note>
7742 For media in one of MediaState_NotCreated, MediaState_Creating or
7743 MediaState_Deleting states, the value of this property is undefined
7744 and will most likely be an empty UUID.
7745 </note>
7746 </desc>
7747 </attribute>
7748
7749 <attribute name="description" type="wstring">
7750 <desc>
7751 Optional description of the medium. For newly created media, the value
7752 of this attribute value is <tt>null</tt>.
7753
7754 Media types that don't support this attribute will return E_NOTIMPL in
7755 attempt to get or set this attribute's value.
7756
7757 <note>
7758 For some storage types, reading this attribute may return an outdated
7759 (last known) value when <link to="#state"/> is <link
7760 to="MediaState_Inaccessible"/> or <link
7761 to="MediaState_LockedWrite"/> because the value of this attribute is
7762 stored within the storage unit itself. Also note that changing the
7763 attribute value is not possible in such case, as well as when the
7764 medium is the <link to="MediaState_LockedRead"/> state.
7765 </note>
7766 </desc>
7767 </attribute>
7768
7769 <attribute name="state" type="MediaState" readonly="yes">
7770 <desc>
7771 Current media state. Inspect <link to="MediaState"/> values for details.
7772
7773 Reading this attribute may take long time because a new accessibility
7774 check of the storage unit is performed every time the attribute is read.
7775 This check may cause a significant delay if the storage unit of the
7776 given medium is, for example, a file located on a network share which is
7777 not currently accessible due to connectivity problems -- the call will
7778 not return until a timeout interval defined by the host OS for this
7779 operation expires.
7780
7781 If the last known state of the medium is <link to="MediaState_Created"/>
7782 and the accessibility check fails then the state would be set to
7783 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
7784 may be used to get more details about the failure. If the state of the
7785 medium is <link to="MediaState_LockedRead"/> or
7786 <link to="MediaState_LockedWrite"/> then it remains the same, and a
7787 non-null value of <link to="#lastAccessError"/> will indicate a failed
7788 accessibility check in this case.
7789
7790 Note that not all media states are applicable to certain media types.
7791 For example, states <link to="MediaState_NotCreated"/>,
7792 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
7793 <link to="MediaState_Deleting"/> are meaningless for IDVDImage2 and
7794 IFloppyImage2 media.
7795 </desc>
7796 </attribute>
7797
7798 <attribute name="location" type="wstring">
7799 <desc>
7800 Location of the storage unit holding media data.
7801
7802 The format of the location string is media type specific. For media
7803 types that use regular files in a host's file system, the location
7804 string is just a full file name.
7805
7806 Some media types may support changing the storage unit location by
7807 simply changing the value of this property. If this operation is not
7808 supported, the implementation will return E_NOTIMPL in attempt to set
7809 this attribute's value.
7810
7811 When setting a value of the location attribute which is a regular file
7812 in the host's file system, the given file name may be either relative to
7813 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
7814 absolute. Note that if the given location specification does not contain
7815 the file extension part then a proper default extension will be
7816 automatically appended by the implementation depending on the media type.
7817 </desc>
7818 </attribute>
7819
7820 <attribute name="name" type="wstring" readonly="yes">
7821 <desc>
7822 Name of the storage unit holding media data.
7823
7824 The returned string is a short version of the <link to="#location"/>
7825 attribute that is suitable for representing the medium in situations
7826 where the full location specification is too long (such as lists
7827 and comboboxes in GUI frontends). This string is also used by frontends
7828 to sort the media list alphabetically when needed.
7829
7830 For example, for locations that are regular files in the host's file
7831 system, the value of this attribute is just a file name (+ extension),
7832 without the path specification.
7833
7834 Note that as opposed to the <link to="#location"/> attribute, the name
7835 attribute will not necessary be unique for a list of media of the
7836 given type and format.
7837 </desc>
7838 </attribute>
7839
7840 <attribute name="size" type="unsigned long long" readonly="yes">
7841 <desc>
7842 Physical size of the storage unit used to hold media data (in bytes).
7843
7844 <note>
7845 For media whose <link to="#state"/> is <link
7846 to="MediaState_Inaccessible"/>, the value of this property is the
7847 last known size. For <link to="MediaState_NotCreated"/> media,
7848 the returned value is zero.
7849 </note>
7850 </desc>
7851 </attribute>
7852
7853 <attribute name="lastAccessError" type="wstring" readonly="yes">
7854 <desc>
7855 Text message that represents the result of the last accessibility
7856 check.
7857
7858 Accessibility checks are performed each time the <link to="#state"/>
7859 attribute is read. A @c null string is returned if the last
7860 accessibility check was successful. A non-null string indicates a
7861 failure and should normally describe a reason of the failure (for
7862 example, a file read error).
7863 </desc>
7864 </attribute>
7865
7866 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
7867 <desc>
7868 Array of UUIDs of all machines this medium is attached to.
7869
7870 A <tt>null</tt> array is returned if this medium is not attached to any
7871 machine or to any machine's snapshot.
7872
7873 <note>
7874 The returned array will include a machine even if this medium is not
7875 attached to that machine in the current state but attached to it in
7876 one of the machine's snapshots. See <link to="#getSnapshotIds()"/> for
7877 details.
7878 </note>
7879 </desc>
7880 </attribute>
7881
7882 <method name="getSnapshotIds">
7883 <desc>
7884 Returns an array of UUIDs of all snapshots of the given machine where
7885 this medium is attached to it.
7886
7887 If the medium is attached to the machine in the current state, then the
7888 first element in the array will always be the ID of the queried machine
7889 (i.e. the value equal to the @c machineId argument), followed by
7890 snapshot IDs (if any).
7891
7892 If the medium is not attached to the machine in the current state, then
7893 the array will contain only snapshot IDs.
7894
7895 The returned array may be <tt>null</tt> if this medium is not attached
7896 to the given machine at all, neither in the current state nor in one of
7897 snapshots.
7898 </desc>
7899 <param name="machineId" type="uuid" dir="in">
7900 <desc>
7901 UUID of the machine to query.
7902 </desc>
7903 </param>
7904 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
7905 <desc>
7906 Array of snapshot UUIDs of the given machine using this medium.
7907 </desc>
7908 </param>
7909 </method>
7910
7911 <method name="lockRead">
7912 <desc>
7913 Locks this medium for reading.
7914
7915 The read lock is shared: many clients can simultaneously lock the
7916 same media for reading unless it is already locked for writing (see
7917 <link to="#lockWrite()"/>) in which case an error is returned.
7918
7919 When the medium is locked for reading, it cannot be modified
7920 from within VirtualBox. This means that any method that changes
7921 the properties of this medium or contents of the storage unit
7922 will return an error (unless explicitly stated otherwise) and
7923 that an attempt to start a virtual machine that wants to modify
7924 the medium will also fail.
7925
7926 When the virtual machine is started up, it locks for reading all
7927 media it uses in read-only mode. If some media cannot be locked
7928 for reading, the startup procedure will fail.
7929
7930 The medium locked for reading must be unlocked using the <link
7931 to="#unlockRead()"/> method. Calls to <link to="#lockRead()"/>
7932 can be nested and must be followed by the same number of paired
7933 <link to="#unlockRead()"/> calls.
7934
7935 This method sets the media state to <link
7936 to="MediaState_LockedRead"/> on success. The state prior to
7937 this call must be <link to="MediaState_Created"/>, <link
7938 to="MediaState_Inaccessible"/> or <link
7939 to="MediaState_LockedRead"/>. As you can see, inaccessible
7940 media can be locked too. This is not an error; this method
7941 performs a logical lock that prevents modifications of this
7942 media through the VirtualBox API, not a physical lock of the
7943 underlying storage unit.
7944
7945 This method returns the current state of the medium
7946 <b>before</b> the operation.
7947
7948 <result name="VBOX_E_INVALID_OBJECT_STATE">
7949 Invalid media state (e.g. not created, locked, inaccessible,
7950 creating, deleting).
7951 </result>
7952
7953 </desc>
7954 <param name="state" type="MediaState" dir="return">
7955 <desc>
7956 State of the medium after the operation.
7957 </desc>
7958 </param>
7959 </method>
7960
7961 <method name="unlockRead">
7962 <desc>
7963 Cancels the read lock previously set by <link to="#lockRead()"/>.
7964
7965 Either on success or on failure, this method returns the current state
7966 of the medium <b>after</b> the operation.
7967
7968 See <link to="#lockRead()"/> for more details.
7969
7970 <result name="VBOX_E_INVALID_OBJECT_STATE">
7971 Medium not locked for reading.
7972 </result>
7973
7974 </desc>
7975 <param name="state" type="MediaState" dir="return">
7976 <desc>
7977 State of the medium after the operation.
7978 </desc>
7979 </param>
7980 </method>
7981
7982 <method name="lockWrite">
7983 <desc>
7984 Locks this medium for writing.
7985
7986 The write lock, as opposed to <link to="#lockRead()"/>, is
7987 exclusive: there may be only one client that holds a write lock
7988 and there may be no read locks while the write lock is held.
7989
7990 When the medium is locked for writing, it cannot be modified
7991 from within VirtualBox and it is not guaranteed that the values
7992 of its properties are up-to-date. Any method that changes the
7993 properties of this medium or contents of the storage unit will
7994 return an error ((unless explicitly stated otherwise) and an
7995 attempt to start a virtual machine that wants to modify or to
7996 read the medium will also fail.
7997
7998 When the virtual machine is started up, it locks for writing all
7999 media it uses to write data to. If some media cannot be locked
8000 for writing, the startup procedure will fail.
8001
8002 The medium locked for writing must be unlocked using the <link
8003 to="#unlockWrite()"/> method. Calls to <link to="#lockWrite()"/>
8004 can <b>not</b> be nested and must be followed by a paired <link
8005 to="#unlockWrite()"/> call.
8006
8007 This method sets the media state to <link
8008 to="MediaState_LockedWrite"/> on success. The state prior to
8009 this call must be <link to="MediaState_Created"/> or <link
8010 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8011 media can be locked too. This is not an error; this method
8012 performs a logical lock that prevents modifications of this
8013 media through the VirtualBox API, not a physical lock of the
8014 underlying storage unit.
8015
8016 Either on success or on failure, this method returns the current
8017 state of the medium <b>before</b> the operation.
8018
8019 <result name="VBOX_E_INVALID_OBJECT_STATE">
8020 Invalid media state (e.g. not created, locked, inaccessible,
8021 creating, deleting).
8022 </result>
8023
8024 </desc>
8025 <param name="state" type="MediaState" dir="return">
8026 <desc>
8027 State of the medium after the operation.
8028 </desc>
8029 </param>
8030 </method>
8031
8032 <method name="unlockWrite">
8033 <desc>
8034 Cancels the write lock previously set by <link to="#lockWrite()"/>.
8035
8036 Either on success or on failure, this method returns the current
8037 state of the medium <b>after</b> the operation.
8038
8039 See <link to="#lockWrite()"/> for more details.
8040
8041 <result name="VBOX_E_INVALID_OBJECT_STATE">
8042 Medium not locked for writing.
8043 </result>
8044
8045 </desc>
8046 <param name="state" type="MediaState" dir="return">
8047 <desc>
8048 State of the medium after the operation.
8049 </desc>
8050 </param>
8051 </method>
8052
8053 <method name="close">
8054 <desc>
8055 Closes this medium.
8056
8057 The hard disk must not be attached to any known virtual machine
8058 and must not have any known child hard disks, otherwise the
8059 operation will fail.
8060
8061 When the hard disk is successfully closed, it gets removed from
8062 the list of remembered hard disks, but its storage unit is not
8063 deleted. In particular, this means that this hard disk can be
8064 later opened again using the <link
8065 to="IVirtualBox::openHardDisk2"/> call.
8066
8067 Note that after this method successfully returns, the given hard
8068 disk object becomes uninitialized. This means that any attempt
8069 to call any of its methods or attributes will fail with the
8070 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8071
8072 <result name="VBOX_E_INVALID_OBJECT_STATE">
8073 Invalid media state (other than not created, created or
8074 inaccessible).
8075 </result>
8076 <result name="VBOX_E_OBJECT_IN_USE">
8077 Medium attached to virtual machine.
8078 </result>
8079 <result name="VBOX_E_FILE_ERROR">
8080 Settings file not accessible.
8081 </result>
8082 <result name="VBOX_E_XML_ERROR">
8083 Could not parse the settings file.
8084 </result>
8085
8086 </desc>
8087 </method>
8088
8089 </interface>
8090
8091
8092 <!--
8093 // IHardDisk2
8094 /////////////////////////////////////////////////////////////////////////
8095 -->
8096
8097 <enum
8098 name="HardDiskType"
8099 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8100 >
8101 <desc>
8102 Virtual hard disk type.
8103 <see>IHardDisk</see>
8104 </desc>
8105
8106 <const name="Normal" value="0">
8107 <desc>
8108 Normal hard disk (attached directly or indirectly, preserved
8109 when taking snapshots).
8110 </desc>
8111 </const>
8112 <const name="Immutable" value="1">
8113 <desc>
8114 Immutable hard disk (attached indirectly, changes are wiped out
8115 after powering off the virtual machine).
8116 </desc>
8117 </const>
8118 <const name="Writethrough" value="2">
8119 <desc>
8120 Write through hard disk (attached directly, ignored when
8121 taking snapshots).
8122 </desc>
8123 </const>
8124 </enum>
8125
8126 <interface
8127 name="IHardDisk2Attachment" extends="$unknown"
8128 uuid="fa2f4619-2c14-4090-869e-73b45419b7b5"
8129 wsmap="struct"
8130 >
8131 <desc>
8132 The IHardDisk2Attachment interface represents a hard disk attachment of a
8133 virtual machine.
8134
8135 Every hard disk attachment specifies a slot of the virtual hard disk
8136 controller and a virtual hard disk attached to this slot.
8137
8138 The array of hard disk attachments is returned by
8139 <link to="IMachine::hardDisk2Attachments"/>.
8140
8141 <note>
8142 With the COM API, this is an interface like all the others. With the
8143 webservice, this is mapped to a structure, so querying the attribute
8144 will not return an object, but a complete structure.
8145 </note>
8146 </desc>
8147 <attribute name="hardDisk" type="IHardDisk2" readonly="yes">
8148 <desc>Hard disk object associated with this attachment.</desc>
8149 </attribute>
8150
8151 <attribute name="bus" type="StorageBus" readonly="yes">
8152 <desc>Interface bus of this attachment.</desc>
8153 </attribute>
8154
8155 <attribute name="channel" type="long" readonly="yes">
8156 <desc>Channel number of this attachment.</desc>
8157 </attribute>
8158
8159 <attribute name="device" type="long" readonly="yes">
8160 <desc>Device slot number of this attachment.</desc>
8161 </attribute>
8162
8163 </interface>
8164
8165 <interface
8166 name="IHardDisk2" extends="IMedium"
8167 uuid="ed6e2525-c2fd-42a4-917a-7a9045ac9e15"
8168 wsmap="managed"
8169 >
8170 <desc>
8171 The IHardDisk2 interface represents a virtual hard disk drive
8172 used by a virtual machine.
8173
8174 Virtual hard disk objects virtualize the hard disk hardware and look like
8175 regular hard disks for the guest OS running inside the virtual machine.
8176
8177 <h3>Hard Disk Types</h3>
8178
8179 There are three types of hard disks:
8180 <link to="HardDiskType_Normal">Normal</link>,
8181 <link to="HardDiskType_Immutable">Immutable</link> and
8182 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8183 hard disk defines how the hard disk is attached to a virtual machine and
8184 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8185 machine with the attached hard disk is taken. The type of the hard disk is
8186 defined by the <link to="#type"/> attribute.
8187
8188 All hard disks can be also divided in two big groups: <i>base</i> hard
8189 disks and <i>differencing</i> hard disks. A base hard disk contains all
8190 sectors of the hard disk data in its storage unit and therefore can be
8191 used independently. On the contrary, a differencing hard disk contains
8192 only some part of the hard disk data (a subset of sectors) and needs
8193 another hard disk to get access to the missing sectors of data. This
8194 another hard disk is called a <i>parent</i> hard disk and defines a hard
8195 disk to which this differencing hard disk is known to be <i>linked to</i>.
8196 The parent hard disk may be itself a differencing hard disk. This
8197 way, differencing hard disks form a linked hard disk chain. This chain
8198 always ends with the base hard disk which is sometimes referred to as the
8199 root hard disk of this chain. Note that several differencing hard disks
8200 may be linked to the same parent hard disk. This way, all known hard disks
8201 form a hard disk tree which is based on their parent-child relationship.
8202
8203 Differencing hard disks can be distinguished from base hard disks by
8204 querying the <link to="#parent"/> attribute: base hard disks do not have
8205 parents they would depend on, so the value of this attribute is always
8206 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8207 the hard disk tree (from the child hard disk to its parent). It is also
8208 possible to walk down the tree using the <link to="#children"/>
8209 attribute.
8210
8211 Note that the type of all differencing hard disks is
8212 <link to="HardDiskType_Normal">Normal</link>; all other values are
8213 meaningless for them. Base hard disks may be of any type.
8214
8215 <h3>Creating Hard Disks</h3>
8216
8217 New base hard disks are created using
8218 <link to="IVirtualBox::createHardDisk2()"/>. Existing hard disks are
8219 opened using <link to="IVirtualBox::openHardDisk2()"/>. Differencing hard
8220 disks are usually implicitly created by VirtualBox when needed but may
8221 also be created explicitly using <link to="#createDiffStorage()"/>.
8222
8223 After the hard disk is successfully created (including the storage unit)
8224 or opened, it becomes a known hard disk (remembered in the internal media
8225 registry). Known hard disks can be attached to a virtual machine, accessed
8226 through <link to="IVirtualBox::getHardDisk2()"/> and
8227 <link to="IVirtualBox::findHardDisk2()"/> methods or enumerated using the
8228 <link to="IVirtualBox::hardDisks2"/> array (only for base hard disks).
8229
8230 The following methods, besides <link to="IMedium::close()"/>,
8231 automatically remove the hard disk from the media registry:
8232 <ul>
8233 <li><link to="#deleteStorage()"/></li>
8234 <li><link to="#mergeTo()"/></li>
8235 </ul>
8236
8237 If the storage unit of the hard disk is a regular file in the host's
8238 file system then the rules stated in the description of the
8239 <link to="IMedium::location"/> attribute apply when setting its value. In
8240 addition, a plain file name without any path may be given, in which case
8241 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8242 folder</link> will be prepended to it.
8243
8244 <h4>Automatic composition of the file name part</h4>
8245
8246 Another extension to the <link to="IMedium::location"/> attribute is that
8247 there is a possibility to cause VirtualBox to compose a unique value for
8248 the file name part of the location using the UUID of the hard disk. This
8249 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8250 e.g. before the storage unit is created, and works as follows. You set the
8251 value of the <link to="IMedium::location"/> attribute to a location
8252 specification which only contains the path specification but not the file
8253 name part and ends with either a forward slash or a backslash character.
8254 In response, VirtualBox will generate a new UUID for the hard disk and
8255 compose the file name using the following pattern:
8256 <pre>
8257 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8258 </pre>
8259 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8260 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8261 is the default extension for the storage format of this hard disk. After
8262 that, you may call any of the methods that create a new hard disk storage
8263 unit and they will use the generated UUID and file name.
8264
8265 <h3>Attaching Hard Disks</h3>
8266
8267 Hard disks are attached to virtual machines using the
8268 <link to="IMachine::attachHardDisk2()"/> method and detached using the
8269 <link to="IMachine::detachHardDisk2()"/> method. Depending on their
8270 <link to="#type"/>, hard disks are attached either
8271 <i>directly</i> or <i>indirectly</i>.
8272
8273 When a hard disk is being attached directly, it is associated with the
8274 virtual machine and used for hard disk operations when the machine is
8275 running. When a hard disk is being attached indirectly, a new differencing
8276 hard disk linked to it is implicitly created and this differencing hard
8277 disk is associated with the machine and used for hard disk operations.
8278 This also means that if <link to="IMachine::attachHardDisk2()"/> performs
8279 a direct attachment then the same hard disk will be returned in response
8280 to the subsequent <link to="IMachine::getHardDisk2()"/> call; however if
8281 an indirect attachment is performed then
8282 <link to="IMachine::getHardDisk2()"/> will return the implicitly created
8283 differencing hard disk, not the original one passed to <link
8284 to="IMachine::attachHardDisk2()"/>. The following table shows the
8285 dependency of the attachment type on the hard disk type:
8286
8287 <table>
8288 <tr>
8289 <th>Hard Disk Type</th>
8290 <th>Direct or Indirect?</th>
8291 </tr>
8292 <tr>
8293 <td>Normal (Base)</td>
8294 <td>
8295 Normal base hard disks that do not have children (i.e. differencing
8296 hard disks linked to them) and that are not already attached to
8297 virtual machines in snapshots are attached <b>directly</b>.
8298 Otherwise, they are attached <b>indirectly</b> because having
8299 dependent children or being part of the snapshot makes it impossible
8300 to modify hard disk contents without breaking the integrity of the
8301 dependent party. The <link to="#readOnly"/> attribute allows to
8302 quickly determine the kind of the attachment for the given hard
8303 disk. Note that if a normal base hard disk is to be indirectly
8304 attached to a virtual machine with snapshots then a special
8305 procedure called <i>smart attachment</i> is performed (see below).
8306 </td>
8307 </tr>
8308 <tr>
8309 <td>Normal (Differencing)</td>
8310 <td>
8311 Differencing hard disks are like normal base hard disks: attached
8312 <b>directly</b> if they do not have children and are not attached to
8313 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8314 that the smart attachment procedure is never performed for
8315 differencing hard disks.
8316 </td>
8317 </tr>
8318 <tr>
8319 <td>Immutable</td>
8320 <td>
8321 Immutable hard disks are always attached <b>indirectly</b> because
8322 they are designed to be non-writable. If an immutable hard disk is
8323 attached to a virtual machine with snapshots then a special
8324 procedure called smart attachment is performed (see below).
8325 </td>
8326 </tr>
8327 <tr>
8328 <td>Writethrough</td>
8329 <td>
8330 Writethrough hard disks are always attached <b>directly</b>, also as
8331 designed. This also means that writethrough hard disks cannot have
8332 other hard disks linked to them at all.
8333 </td>
8334 </tr>
8335 </table>
8336
8337 Note that the same hard disk, regardless of its type, may be attached to
8338 more than one virtual machine at a time. In this case, the machine that is
8339 started first gains exclusive access to the hard disk and attempts to
8340 start other machines having this hard disk attached will fail until the
8341 first machine is powered down.
8342
8343 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8344 that the given hard disk remains associated with the given machine after a
8345 successful <link to="IMachine::detachHardDisk2()"/> call until
8346 <link to="IMachine::saveSettings()"/> is called to save all changes to
8347 machine settings to disk. This deferring is necessary to guarantee that
8348 the hard disk configuration may be restored at any time by a call to
8349 <link to="IMachine::discardSettings()"/> before the settings
8350 are saved (committed).
8351
8352 Note that if <link to="IMachine::discardSettings()"/> is called after
8353 indirectly attaching some hard disks to the machine but before a call to
8354 <link to="IMachine::saveSettings()"/> is made, it will implicitly delete
8355 all differencing hard disks implicitly created by
8356 <link to="IMachine::attachHardDisk2()"/> for these indirect attachments.
8357 Such implicitly created hard disks will also be immediately deleted when
8358 detached explicitly using the <link to="IMachine::detachHardDisk2()"/>
8359 call if it is made before <link to="IMachine::saveSettings()"/>. This
8360 implicit deletion is safe because newly created differencing hard
8361 disks do not contain any user data.
8362
8363 However, keep in mind that detaching differencing hard disks that were
8364 implicitly created by <link to="IMachine::attachHardDisk2()"/>
8365 before the last <link to="IMachine::saveSettings()"/> call will
8366 <b>not</b> implicitly delete them as they may already contain some data
8367 (for example, as a result of virtual machine execution). If these hard
8368 disks are no more necessary, the caller can always delete them explicitly
8369 using <link to="#deleteStorage()"/> after they are actually de-associated
8370 from this machine by the <link to="IMachine::saveSettings()"/> call.
8371
8372 <h3>Smart Attachment</h3>
8373
8374 When normal base or immutable hard disks are indirectly attached to a
8375 virtual machine then some additional steps are performed to make sure the
8376 virtual machine will have the most recent "view" of the hard disk being
8377 attached. These steps include walking through the machine's snapshots
8378 starting from the current one and going through ancestors up to the first
8379 snapshot. Hard disks attached to the virtual machine in all
8380 of the encountered snapshots are checked whether they are descendants of
8381 the given normal base or immutable hard disk. The first found child (which
8382 is the differencing hard disk) will be used instead of the normal base or
8383 immutable hard disk as a parent for creating a new differencing hard disk
8384 that will be actually attached to the machine. And only if no descendants
8385 are found or if the virtual machine does not have any snapshots then the
8386 normal base or immutable hard disk will be used itself as a parent for
8387 this differencing hard disk.
8388
8389 It is easier to explain what smart attachment does using the
8390 following example:
8391 <pre>
8392BEFORE attaching B.vdi: AFTER attaching B.vdi:
8393
8394Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8395 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8396 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8397 Snapshot 4 (none) Snapshot 4 (none)
8398 CurState (none) CurState (D3->D2.vdi)
8399
8400 NOT
8401 ...
8402 CurState (D3->B.vdi)
8403 </pre>
8404 The first column is the virtual machine configuration before the base hard
8405 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8406 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8407 mean that the hard disk that is actually attached to the machine is a
8408 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8409 another hard disk, <tt>B.vdi</tt>.
8410
8411 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8412 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8413 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8414 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8415 it cannot be attached directly and needs an indirect attachment (i.e.
8416 implicit creation of a new differencing hard disk). Due to the smart
8417 attachment procedure, the new differencing hard disk
8418 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8419 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8420 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8421 machine.
8422
8423 Note that if there is more than one descendant hard disk of the given base
8424 hard disk found in a snapshot, and there is an exact device, channel and
8425 bus match, then this exact match will be used. Otherwise, the youngest
8426 descendant will be picked up.
8427
8428 There is one more important aspect of the smart attachment procedure which
8429 is not related to snapshots at all. Before walking through the snapshots
8430 as described above, the backup copy of the current list of hard disk
8431 attachment is searched for descendants. This backup copy is created when
8432 the hard disk configuration is changed for the first time after the last
8433 <link to="IMachine::saveSettings()"/> call and used by
8434 <link to="IMachine::discardSettings()"/> to undo the recent hard disk
8435 changes. When such a descendant is found in this backup copy, it will be
8436 simply re-attached back, without creating a new differencing hard disk for
8437 it. This optimization is necessary to make it possible to re-attach the
8438 base or immutable hard disk to a different bus, channel or device slot
8439 without losing the contents of the differencing hard disk actually
8440 attached to the machine in place of it.
8441 </desc>
8442
8443 <attribute name="format" type="wstring" readonly="yes">
8444 <desc>
8445 Storage format of this hard disk.
8446
8447 The value of this attribute is a string that specifies a backend used to
8448 store hard disk data. The storage format is defined when you create a
8449 new hard disk or automatically detected when you open an existing hard
8450 disk medium, and cannot be changed later.
8451
8452 The list of all storage formats supported by this VirtualBox
8453 installation can be obtained using
8454 <link to="ISystemProperties::hardDiskFormats"/>.
8455 </desc>
8456 </attribute>
8457
8458 <attribute name="type" type="HardDiskType">
8459 <desc>
8460 Type (role) of this hard disk.
8461
8462 The following constraints apply when changing the value of this
8463 attribute:
8464 <ul>
8465 <li>If a hard disk is attached to a virtual machine (either in the
8466 current state or in one of the snapshots), its type cannot be
8467 changed.
8468 </li>
8469 <li>As long as the hard disk has children, its type cannot be set
8470 to <link to="HardDiskType_Writethrough"/>.
8471 </li>
8472 <li>The type of all differencing hard disks is
8473 <link to="HardDiskType_Normal"/> and cannot be changed.
8474 </li>
8475 </ul>
8476
8477 The type of a newly created or opened hard disk is set to
8478 <link to="HardDiskType_Normal"/>.
8479 </desc>
8480 </attribute>
8481
8482 <attribute name="parent" type="IHardDisk2" readonly="yes">
8483 <desc>
8484 Parent of this hard disk (a hard disk this hard disk is directly based
8485 on).
8486
8487 Only differencing hard disks have parents. For base (non-differencing)
8488 hard disks, <tt>null</tt> is returned.
8489 </desc>
8490 </attribute>
8491
8492 <attribute name="children" type="IHardDisk2" safearray="yes" readonly="yes">
8493 <desc>
8494 Children of this hard disk (all differencing hard disks directly based
8495 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8496 does not have any children.
8497 </desc>
8498 </attribute>
8499
8500 <attribute name="root" type="IHardDisk2" readonly="yes">
8501 <desc>
8502 Root hard disk of this hard disk.
8503
8504 If this is a differencing hard disk, its root hard disk is the base hard
8505 disk the given hard disk branch starts from. For all other types of hard
8506 disks, this property returns the hard disk object itself (i.e. the same
8507 object this property is read on).
8508 </desc>
8509 </attribute>
8510
8511 <attribute name="readOnly" type="boolean" readonly="yes">
8512 <desc>
8513 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8514 otherwise.
8515
8516 A hard disk is considered to be read-only when its contents cannot be
8517 modified without breaking the integrity of other parties that depend on
8518 this hard disk such as its child hard disks or snapshots of virtual
8519 machines where this hard disk is attached to these machines. If there
8520 are no children and no such snapshots then there is no dependency and
8521 the hard disk is not read-only.
8522
8523 The value of this attribute can be used to determine the kind of the
8524 attachment that will take place when attaching this hard disk to a
8525 virtual machine. If the value is <tt>false</tt> then the hard disk will
8526 be attached directly. If the value is <tt>true</tt> then the hard disk
8527 will be attached indirectly by creating a new differencing child hard
8528 disk for that. See the interface description for more information.
8529
8530 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8531 disks are always read-only while all
8532 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8533 always not.
8534
8535 <note>
8536 The read-only condition represented by this attribute is related to
8537 the hard disk type and usage, not to the current
8538 <link to="IMedium::state">media state</link> and not to the read-only
8539 state of the storage unit.
8540 </note>
8541 </desc>
8542 </attribute>
8543
8544 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8545 <desc>
8546 Logical size of this hard disk (in megabytes), as reported to the
8547 guest OS running inside the virtual machine this disk is
8548 attached to. The logical size is defined when the hard disk is created
8549 and cannot be changed later.
8550
8551 <note>
8552 Reading this property on a differencing hard disk will return the size
8553 of its <link to="#root"/> hard disk.
8554 </note>
8555 <note>
8556 For hard disks whose state is <link to="#state"/> is <link
8557 to="MediaState_Inaccessible"/>, the value of this property is the
8558 last known logical size. For <link to="MediaState_NotCreated"/> hard
8559 disks, the returned value is zero.
8560 </note>
8561 </desc>
8562 </attribute>
8563
8564 <!-- storage methods -->
8565
8566 <method name="getProperty">
8567 <desc>
8568 Returns the value of the custom hard disk property with the given name.
8569
8570 The list of all properties supported by the given hard disk format can
8571 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8572
8573 Note that if this method returns a <tt>null</tt> @a value, the requested
8574 property is supported but currently not assigned any value.
8575
8576 <result name="VBOX_E_OBJECT_NOT_FOUND">
8577 Requested property does not exist (not supported by the format).
8578 </result>
8579 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8580 </desc>
8581 <param name="name" type="wstring" dir="in">
8582 <desc>Name of the property to get.</desc>
8583 </param>
8584 <param name="value" type="wstring" dir="return">
8585 <desc>Current property value.</desc>
8586 </param>
8587 </method>
8588
8589 <method name="setProperty">
8590 <desc>
8591 Sets the value of the custom hard disk property with the given name.
8592
8593 The list of all properties supported by the given hard disk format can
8594 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8595
8596 Note that setting the property value to <tt>null</tt> is equivalent to
8597 deleting the existing value. A default value (if it is defined for this
8598 property) will be used by the format backend in this case.
8599
8600 <result name="VBOX_E_OBJECT_NOT_FOUND">
8601 Requested property does not exist (not supported by the format).
8602 </result>
8603 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8604 </desc>
8605 <param name="name" type="wstring" dir="in">
8606 <desc>Name of the property to set.</desc>
8607 </param>
8608 <param name="value" type="wstring" dir="in">
8609 <desc>Property value to set.</desc>
8610 </param>
8611 </method>
8612
8613 <method name="getProperties">
8614 <desc>
8615 Returns values for a group of properties in one call.
8616
8617 The names of the properties to get are specified using the @a names
8618 argument which is a list of comma-separated property names or
8619 <tt>null</tt> if all properties are to be returned. Note that currently
8620 the value of this argument is ignored and the method always returns all
8621 existing properties.
8622
8623 The list of all properties supported by the given hard disk format can
8624 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8625
8626 The method returns two arrays, the array of property names corresponding
8627 to the @a names argument and the current values of these properties.
8628 Both arrays have the same number of elements with each elemend at the
8629 given index in the first array corresponds to an element at the same
8630 index in the second array.
8631
8632 Note that for properties that do not have assigned values,
8633 <tt>null</tt> is returned at the appropriate index in the @a
8634 returnValues array.
8635
8636 </desc>
8637 <param name="names" type="wstring" dir="in">
8638 <desc>
8639 Names of properties to get.
8640 </desc>
8641 </param>
8642 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8643 <desc>Names of returned properties.</desc>
8644 </param>
8645 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8646 <desc>Values of returned properties.</desc>
8647 </param>
8648 </method>
8649
8650 <method name="setProperties">
8651 <desc>
8652 Sets values for a group of properties in one call.
8653
8654 The names of the properties to set are passed in the @a names
8655 array along with the new values for them in the @a values array. Both
8656 arrays have the same number of elements with each elemend at the given
8657 index in the first array corresponding to an element at the same index
8658 in the second array.
8659
8660 If there is at least one property name in @a names that is not valid,
8661 the method will fail before changing the values of any other properties
8662 from the @a names array.
8663
8664 Using this method over <link to="#setProperty()"/> is preferred if you
8665 need to set several properties at once since it will result into less
8666 IPC calls.
8667
8668 The list of all properties supported by the given hard disk format can
8669 be obtained with <link to="IHardDiskFormat::describeProperties()"/>.
8670
8671 Note that setting the property value to <tt>null</tt> is equivalent to
8672 deleting the existing value. A default value (if it is defined for this
8673 property) will be used by the format backend in this case.
8674 </desc>
8675 <param name="names" type="wstring" safearray="yes" dir="in">
8676 <desc>Names of properties to set.</desc>
8677 </param>
8678 <param name="values" type="wstring" safearray="yes" dir="in">
8679 <desc>Values of properties to set.</desc>
8680 </param>
8681 </method>
8682
8683 <!-- storage methods -->
8684
8685 <method name="createDynamicStorage">
8686 <desc>
8687 Starts creating a dynamically expanding hard disk storage unit in the
8688 background. The previous storage unit created for this object, if
8689 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
8690 the operation will fail.
8691
8692 Before the operation starts, the hard disk is placed in
8693 <link to="MediaState_Creating"/> state. If the create operation
8694 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
8695 state.
8696
8697 After the returned progress object reports that the operation has
8698 successfully completed, the media state will be set to <link
8699 to="MediaState_Created"/>, the hard disk will be remembered by this
8700 VirtualBox installation and may be attached to virtual machines.
8701
8702 <result name="VBOX_E_NOT_SUPPORTED">
8703 Dynamic storage creation operation is not supported. See <link
8704 to="IHardDiskFormat::capabilities"/>.
8705 </result>
8706 </desc>
8707 <param name="logicalSize" type="unsigned long long" dir="in">
8708 <desc>Maximum logical size of the hard disk in megabytes.</desc>
8709 </param>
8710 <param name="progress" type="IProgress" dir="return">
8711 <desc>Progress object to track the operation completion.</desc>
8712 </param>
8713 </method>
8714
8715 <method name="createFixedStorage">
8716 <desc>
8717 Starts creating a fixed-size hard disk storage unit in the background.
8718 The previous storage unit created for this object, if
8719 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
8720 the operation will fail.
8721
8722 Before the operation starts, the hard disk is placed to
8723 <link to="MediaState_Creating"/> state. If the create operation
8724 fails, the media will placed back to <link to="MediaState_NotCreated"/>
8725 state.
8726
8727 After the returned progress object reports that the operation is
8728 successfully complete, the media state will be set to <link
8729 to="MediaState_Created"/>, the hard disk will be remembered by this
8730 VirtualBox installation and may be attached to virtual machines.
8731
8732 <result name="VBOX_E_NOT_SUPPORTED">
8733 Fixed storage creation operation is not supported. See
8734 <link to="IHardDiskFormat::capabilities"/>.
8735 </result>
8736 </desc>
8737 <param name="logicalSize" type="unsigned long long" dir="in">
8738 <desc>Logical size of the hard disk in megabytes.</desc>
8739 </param>
8740 <param name="progress" type="IProgress" dir="return">
8741 <desc>Progress object to track the operation completion.</desc>
8742 </param>
8743 </method>
8744
8745 <method name="deleteStorage">
8746 <desc>
8747 Starts deleting the storage unit of this hard disk.
8748
8749 The hard disk must not be attached to any known virtual machine and must
8750 not have any known child hard disks, otherwise the operation will fail.
8751 It will also fail if there is no storage unit to delete or if deletion
8752 is already in progress, or if the hard disk is being in use (locked for
8753 read or for write) or inaccessible. Therefore, the only valid state for
8754 this operation to succeed is <link to="MediaState_Created"/>.
8755
8756 Before the operation starts, the hard disk is placed to
8757 <link to="MediaState_Deleting"/> state and gets removed from the list
8758 of remembered hard disks (media registry). If the delete operation
8759 fails, the media will be remembered again and placed back to
8760 <link to="MediaState_Created"/> state.
8761
8762 After the returned progress object reports that the operation is
8763 complete, the media state will be set to
8764 <link to="MediaState_NotCreated"/> and you will be able to use one of
8765 the storage creation methods to create it again.
8766
8767 <see>#close()</see>
8768
8769 <result name="VBOX_E_OBJECT_IN_USE">
8770 Hard disk is attached to a virtual machine.
8771 </result>
8772 <result name="VBOX_E_NOT_SUPPORTED">
8773 Storage deletion is not allowed because neither of storage creation
8774 operations are supported. See
8775 <link to="IHardDiskFormat::capabilities"/>.
8776 </result>
8777
8778 <note>
8779 If the deletion operation fails, it is not guaranteed that the storage
8780 unit still exists. You may check the <link to="IMedium::state"/> value
8781 to answer this question.
8782 </note>
8783 </desc>
8784 <param name="progress" type="IProgress" dir="return">
8785 <desc>Progress object to track the operation completion.</desc>
8786 </param>
8787 </method>
8788
8789 <!-- diff methods -->
8790
8791 <method name="createDiffStorage">
8792 <desc>
8793 Starts creating an empty differencing storage unit based on this hard
8794 disk in the format and at the location defined by the @a target
8795 argument.
8796
8797 The target hard disk must be in <link to="MediaState_NotCreated"/>
8798 state (i.e. must not have an existing storage unit). Upon successful
8799 completion, this operation will set the type of the target hard disk to
8800 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
8801 represent the differencing hard disk data in the given format (according
8802 to the storage format of the target object).
8803
8804 After the returned progress object reports that the operation is
8805 successfully complete, the target hard disk gets remembered by this
8806 VirtualBox installation and may be attached to virtual machines.
8807
8808 <note>
8809 The hard disk will be set to <link to="MediaState_LockedRead"/>
8810 state for the duration of this operation.
8811 </note>
8812 <result name="VBOX_E_OBJECT_IN_USE">
8813 Hard disk not in NotCreated state.
8814 </result>
8815 </desc>
8816 <param name="target" type="IHardDisk2" dir="in">
8817 <desc>Target hard disk.</desc>
8818 </param>
8819 <param name="progress" type="IProgress" dir="return">
8820 <desc>Progress object to track the operation completion.</desc>
8821 </param>
8822 </method>
8823
8824 <method name="mergeTo">
8825 <desc>
8826 Starts merging the contents of this hard disk and all intermediate
8827 differencing hard disks in the chain to the given target hard disk.
8828
8829 The target hard disk must be either a descendant of this hard disk or
8830 its ancestor (otherwise this method will immediately return a failure).
8831 It follows that there are two logical directions of the merge operation:
8832 from ancestor to descendant (<i>forward merge</i>) and from descendant to
8833 ancestor (<i>backward merge</i>). Let us consider the following hard disk
8834 chain:
8835
8836 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
8837
8838 Here, calling this method on the <tt>Base</tt> hard disk object with
8839 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
8840 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
8841 merge. Note that in both cases the contents of the resulting hard disk
8842 will be the same, the only difference is the hard disk object that takes
8843 the result of the merge operation. In case of the forward merge in the
8844 above example, the result will be written to <tt>Diff_2</tt>; in case of
8845 the backward merge, the result will be written to <tt>Base</tt>. In
8846 other words, the result of the operation is always stored in the target
8847 hard disk.
8848
8849 Upon successful operation completion, the storage units of all hard
8850 disks in the chain between this (source) hard disk and the target hard
8851 disk, including the source hard disk itself, will be automatically
8852 deleted and the relevant hard disk objects (including this hard disk)
8853 will become uninitialized. This means that any attempt to call any of
8854 their methods or attributes will fail with the
8855 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
8856 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
8857 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
8858 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
8859 disk itself since it will no longer be based on any other hard disk.
8860
8861 Considering the above, all of the following conditions must be met in
8862 order for the merge operation to succeed:
8863 <ul>
8864 <li>
8865 Neither this (source) hard disk nor any intermediate
8866 differencing hard disk in the chain between it and the target
8867 hard disk is attached to any virtual machine.
8868 </li>
8869 <li>
8870 Neither the source hard disk nor the target hard disk is an
8871 <link to="HardDiskType_Immutable"/> hard disk.
8872 </li>
8873 <li>
8874 The part of the hard disk tree from the source hard disk to the
8875 target hard disk is a linear chain, i.e. all hard disks in this
8876 chain have exactly one child which is the next hard disk in this
8877 chain. The only exception from this rule is the target hard disk in
8878 the forward merge operation; it is allowed to have any number of
8879 child hard disks because the merge operation will hot change its
8880 logical contents (as it is seen by the guest OS or by children).
8881 </li>
8882 <li>
8883 None of the involved hard disks are in
8884 <link to="MediaState_LockedRead"/> or
8885 <link to="MediaState_LockedWrite"/> state.
8886 </li>
8887 </ul>
8888
8889 <note>
8890 This (source) hard disk and all intermediates will be placed to <link
8891 to="MediaState_Deleting"/> state and the target hard disk will be
8892 placed to <link to="MediaState_LockedWrite"/> state and for the
8893 duration of this operation.
8894 </note>
8895 </desc>
8896 <param name="targetId" type="uuid" dir="in">
8897 <desc>UUID of the target ancestor or descendant hard disk.</desc>
8898 </param>
8899 <param name="progress" type="IProgress" dir="return">
8900 <desc>Progress object to track the operation completion.</desc>
8901 </param>
8902 </method>
8903
8904 <!-- clone methods -->
8905
8906 <method name="cloneTo">
8907 <desc>
8908 Starts creating a clone of this hard disk in the format and at the
8909 location defined by the @a target argument.
8910
8911 The target hard disk must be in <link to="MediaState_NotCreated"/>
8912 state (i.e. must not have an existing storage unit). Upon successful
8913 completion, the cloned hard disk will contain exactly the same sector
8914 data as the hard disk being cloned, except that a new UUID for the clone
8915 will be randomly generated.
8916
8917 After the returned progress object reports that the operation is
8918 successfully complete, the target hard disk gets remembered by this
8919 VirtualBox installation and may be attached to virtual machines.
8920
8921 <note>
8922 If the cloned hard disk is a differencing hard disk, it will inherit
8923 parent dependency of the original hard disk.
8924 </note>
8925 <note>
8926 This hard disk will be placed to <link to="MediaState_LockedRead"/>
8927 state for the duration of this operation.
8928 </note>
8929 </desc>
8930 <param name="target" type="IHardDisk2" dir="in">
8931 <desc>Target hard disk.</desc>
8932 </param>
8933 <param name="progress" type="IProgress" dir="return">
8934 <desc>Progress object to track the operation completion.</desc>
8935 </param>
8936 </method>
8937
8938 <method name="flattenTo">
8939 <desc>
8940 Starts creating a deep (independent) clone of this hard disk in the
8941 format and at the location defined by the @a target argument.
8942
8943 This operation is similar to <link to="#cloneTo()"/> except that when
8944 applied to a differencing hard disk, it will also copy missing hard disk
8945 data from all parent hard disks it is linked to. This will make the
8946 created clone an independent base hard disk that contains all hard disk
8947 data and does not need any other hard disks to operate.
8948
8949 After the returned progress object reports that the operation is
8950 successfully complete, the target hard disk gets remembered by this
8951 VirtualBox installation and may be attached to virtual machines.
8952
8953 <note>
8954 For base hard disks, this operation is identical to
8955 <link to="#cloneTo()"/>.
8956 </note>
8957 <note>
8958 This hard disk and all its parent hard disks will be placed to <link
8959 to="MediaState_LockedRead"/> state for the duration of this
8960 operation.
8961 </note>
8962 </desc>
8963 <param name="target" type="IHardDisk2" dir="in">
8964 <desc>Target hard disk.</desc>
8965 </param>
8966 <param name="progress" type="IProgress" dir="return">
8967 <desc>Progress object to track the operation completion.</desc>
8968 </param>
8969 </method>
8970
8971 <method name="compact">
8972 <desc>
8973 Starts compacting of this hard disk. This means that the disk is
8974 transformed into a possibly more compact storage representation.
8975 This potentially creates temporary images, which can require a
8976 substantial amount of additional disk space.
8977
8978 After the returned progress object reports that the operation is
8979 successfully complete, the media state will be set back to the
8980 current state.
8981
8982 <note>
8983 This hard disk and all its parent hard disks will be placed to <link
8984 to="MediaState_LockedRead"/> state for the duration of this
8985 operation.
8986 </note>
8987 </desc>
8988 <param name="progress" type="IProgress" dir="return">
8989 <desc>Progress object to track the operation completion.</desc>
8990 </param>
8991 </method>
8992
8993 </interface>
8994
8995
8996 <!--
8997 // IHardDiskFormat
8998 /////////////////////////////////////////////////////////////////////////
8999 -->
9000
9001 <enum
9002 name="DataType"
9003 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9004 >
9005 <const name="Int32" value="0"/>
9006 <const name="Int8" value="1"/>
9007 <const name="String" value="2"/>
9008 </enum>
9009
9010 <enum
9011 name="DataFlags"
9012 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9013 >
9014 <const name="None" value="0x00"/>
9015 <const name="Mandatory" value="0x01"/>
9016 <const name="Expert" value="0x02"/>
9017 <const name="Array" value="0x04"/>
9018 <const name="FlagMask" value="0x07"/>
9019 </enum>
9020
9021 <enum
9022 name="HardDiskFormatCapabilities"
9023 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9024 >
9025 <desc>
9026 Hard disk format capability flags.
9027 </desc>
9028
9029 <const name="Uuid" value="0x01">
9030 <desc>
9031 Supports UUIDs as expected by VirtualBox code.
9032 </desc>
9033 </const>
9034
9035 <const name="CreateFixed" value="0x02">
9036 <desc>
9037 Supports creating fixed size images, allocating all space instantly.
9038 </desc>
9039 </const>
9040
9041 <const name="CreateDynamic" value="0x04">
9042 <desc>
9043 Supports creating dynamically growing images, allocating space on
9044 demand.
9045 </desc>
9046 </const>
9047
9048 <const name="CreateSplit2G" value="0x08">
9049 <desc>
9050 Supports creating images split in chunks of a bit less than 2 GBytes.
9051 </desc>
9052 </const>
9053
9054 <const name="Differencing" value="0x10">
9055 <desc>
9056 Supports being used as a format for differencing hard disks (see <link
9057 to="IHardDisk2::createDiffStorage"/>).
9058 </desc>
9059 </const>
9060
9061 <const name="Asynchronous" value="0x20">
9062 <desc>
9063 Supports asynchronous I/O operations for at least some configurations.
9064 </desc>
9065 </const>
9066
9067 <const name="File" value="0x40">
9068 <desc>
9069 The format backend operates on files (the <link to="IMedium::location"/>
9070 attribute of the hard disk specifies a file used to store hard disk
9071 data; for a list of supported file extensions see
9072 <link to="IHardDiskFormat::fileExtensions"/>).
9073 </desc>
9074 </const>
9075
9076 <const name="Properties" value="0x80">
9077 <desc>
9078 The format backend uses the property interface to configure the storage
9079 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9080 method is used to get access to properties supported by the given hard
9081 disk format).
9082 </desc>
9083 </const>
9084
9085 <const name="CapabilityMask" value="0xFF"/>
9086 </enum>
9087
9088 <interface
9089 name="IHardDiskFormat" extends="$unknown"
9090 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9091 wsmap="managed"
9092 >
9093 <desc>
9094 The IHardDiskFormat interface represents a virtual hard disk format.
9095
9096 Each hard disk format has an associated backend which is used to handle
9097 hard disks stored in this format. This interface provides information
9098 about the properties of the associated backend.
9099
9100 Each hard disk format is identified by a string represented by the
9101 <link to="#id"/> attribute. This string is used in calls like
9102 <link to="IVirtualBox::createHardDisk2()"/> to specify the desired
9103 format.
9104
9105 The list of all supported hard disk formats can be obtained using
9106 <link to="ISystemProperties::hardDiskFormats"/>.
9107
9108 <see>IHardDisk2</see>
9109 </desc>
9110
9111 <attribute name="id" type="wstring" readonly="yes">
9112 <desc>
9113 Identifier of this format.
9114
9115 The format identifier is a non-null non-empty ASCII string. Note that
9116 this string is case-insensitive. This means that, for example, all of
9117 the following strings:
9118 <pre>
9119 "VDI"
9120 "vdi"
9121 "VdI"</pre>
9122 refer to the same hard disk format.
9123
9124 This string is used in methods of other interfaces where it is necessary
9125 to specify a hard disk format, such as
9126 <link to="IVirtualBox::createHardDisk2()"/>.
9127 </desc>
9128 </attribute>
9129
9130 <attribute name="name" type="wstring" readonly="yes">
9131 <desc>
9132 Human readable description of this format.
9133
9134 Mainly for use in file open dialogs.
9135 </desc>
9136 </attribute>
9137
9138 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9139 <desc>
9140 Array of strings containing the supported file extensions.
9141
9142 The first extension in the array is the extension preferred by the
9143 backend. It is recommended to use this extension when specifying a
9144 location of the storage unit for a new hard disk.
9145
9146 Note that some backends do not work on files, so this array may be
9147 empty.
9148
9149 <see>IHardDiskFormat::capabilities</see>
9150 </desc>
9151 </attribute>
9152
9153 <attribute name="capabilities" type="unsigned long" readonly="yes">
9154 <desc>
9155 Capabilities of the format as a set of bit flags.
9156
9157 For the meaning of individual capability flags see
9158 <link to="HardDiskFormatCapabilities"/>.
9159 </desc>
9160 </attribute>
9161
9162 <method name="describeProperties">
9163 <desc>
9164 Returns several arrays describing the properties supported by this
9165 format.
9166
9167 An element with the given index in each array describes one
9168 property. Thus, the number of elements in each returned array is the
9169 same and corresponds to the number of supported properties.
9170
9171 The returned arrays are filled in only if the
9172 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9173 All arguments must be non-NULL.
9174
9175 <see>DataType</see>
9176 <see>DataFlags</see>
9177 </desc>
9178
9179 <param name="names" type="wstring" safearray="yes" dir="out">
9180 <desc>Array of property names.</desc>
9181 </param>
9182 <param name="description" type="wstring" safearray="yes" dir="out">
9183 <desc>Array of property descriptions.</desc>
9184 </param>
9185 <param name="types" type="DataType" safearray="yes" dir="out">
9186 <desc>Array of property types.</desc>
9187 </param>
9188 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9189 <desc>Array of property flags.</desc>
9190 </param>
9191 <param name="defaults" type="wstring" safearray="yes" dir="out">
9192 <desc>Array of default property values.</desc>
9193 </param>
9194 </method>
9195
9196 </interface>
9197
9198
9199 <!--
9200 // IFloppyImage2
9201 /////////////////////////////////////////////////////////////////////////
9202 -->
9203
9204 <interface
9205 name="IFloppyImage2" extends="IMedium"
9206 uuid="fcdee8f0-03f9-11dd-95ff-0800200c9a66"
9207 wsmap="managed"
9208 >
9209 <desc>
9210 The IFloppyImage2 interface represents a medium containing the image
9211 of a floppy disk.
9212 </desc>
9213
9214 </interface>
9215
9216
9217 <!--
9218 // IDVDImage2
9219 /////////////////////////////////////////////////////////////////////////
9220 -->
9221
9222 <interface
9223 name="IDVDImage2" extends="IMedium"
9224 uuid="1c5165f1-9543-478d-a117-84a1d2317068"
9225 wsmap="managed"
9226 >
9227 <desc>
9228 The IDVDImage2 interface represents a medium containing the image
9229 of a CD or DVD disk in the ISO format.
9230 </desc>
9231
9232 </interface>
9233
9234
9235 <!--
9236 // IDVDDrive
9237 /////////////////////////////////////////////////////////////////////////
9238 -->
9239
9240 <interface
9241 name="IDVDDrive" extends="$unknown"
9242 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9243 wsmap="managed"
9244 >
9245 <desc>
9246 The IDVDDrive interface represents the virtual CD/DVD drive of the
9247 virtual machine. An object of this type is returned by
9248 <link to="IMachine::DVDDrive"/>.
9249 </desc>
9250
9251 <attribute name="state" type="DriveState" readonly="yes">
9252 <desc>Current drive state.</desc>
9253 </attribute>
9254
9255 <attribute name="passthrough" type="boolean">
9256 <desc>
9257 When a host drive is mounted and passthrough is enabled
9258 the guest OS will be able to directly send SCSI commands to
9259 the host drive. This enables the guest OS to use CD/DVD writers
9260 but is potentially dangerous.
9261 </desc>
9262 </attribute>
9263
9264 <method name="mountImage">
9265 <desc>Mounts a CD/DVD image with the specified UUID.
9266
9267 <result name="VBOX_E_FILE_ERROR">
9268 Invalid image file location.
9269 </result>
9270 <result name="VBOX_E_OBJECT_NOT_FOUND">
9271 Could not find a CD/DVD image matching @a imageID.
9272 </result>
9273 <result name="VBOX_E_INVALID_OBJECT_STATE">
9274 Invalid media state.
9275 </result>
9276
9277 </desc>
9278 <param name="imageId" type="uuid" dir="in"/>
9279 </method>
9280
9281 <method name="captureHostDrive">
9282 <desc>Captures the specified host CD/DVD drive.</desc>
9283 <param name="drive" type="IHostDVDDrive" dir="in"/>
9284 </method>
9285
9286 <method name="unmount">
9287 <desc>Unmounts the currently mounted image or host drive.</desc>
9288 </method>
9289
9290 <method name="getImage">
9291 <desc>Returns the currently mounted CD/DVD image.</desc>
9292 <param name="image" type="IDVDImage2" dir="return"/>
9293 </method>
9294
9295 <method name="getHostDrive">
9296 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9297 <param name="drive" type="IHostDVDDrive" dir="return"/>
9298 </method>
9299
9300 </interface>
9301
9302
9303 <!--
9304 // IFloppyDrive
9305 /////////////////////////////////////////////////////////////////////////
9306 -->
9307
9308 <interface
9309 name="IFloppyDrive" extends="$unknown"
9310 uuid="159412cd-bab8-452e-8097-218a020825a6"
9311 wsmap="managed"
9312 >
9313 <desc>
9314 The IFloppyDrive interface represents the virtual floppy drive of the
9315 virtual machine. An object of this type is returned by
9316 <link to="IMachine::floppyDrive" />.
9317 </desc>
9318
9319 <attribute name="enabled" type="boolean">
9320 <desc>
9321 Flag whether the floppy drive is enabled. If it is disabled,
9322 the floppy drive will not be reported to the guest OS.
9323 </desc>
9324 </attribute>
9325
9326 <attribute name="state" type="DriveState" readonly="yes">
9327 <desc>Current drive state.</desc>
9328 </attribute>
9329
9330 <method name="mountImage">
9331 <desc>Mounts a floppy image with the specified UUID.
9332
9333 <result name="VBOX_E_FILE_ERROR">
9334 Invalid image file location.
9335 </result>
9336 <result name="VBOX_E_OBJECT_NOT_FOUND">
9337 Could not find a floppy image matching @a imageID.
9338 </result>
9339 <result name="VBOX_E_INVALID_OBJECT_STATE">
9340 Invalid media state.
9341 </result>
9342
9343 </desc>
9344 <param name="imageId" type="uuid" dir="in"/>
9345 </method>
9346
9347 <method name="captureHostDrive">
9348 <desc>Captures the specified host floppy drive.</desc>
9349 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9350 </method>
9351
9352 <method name="unmount">
9353 <desc>Unmounts the currently mounted image or host drive.</desc>
9354 </method>
9355
9356 <method name="getImage">
9357 <desc>Returns the currently mounted floppy image.</desc>
9358 <param name="image" type="IFloppyImage2" dir="return"/>
9359 </method>
9360
9361 <method name="getHostDrive">
9362 <desc>Returns the currently mounted host floppy drive.</desc>
9363 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9364 </method>
9365
9366 </interface>
9367
9368
9369 <!--
9370 // IKeyboard
9371 /////////////////////////////////////////////////////////////////////////
9372 -->
9373
9374 <interface
9375 name="IKeyboard" extends="$unknown"
9376 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9377 wsmap="managed"
9378 >
9379 <desc>
9380 The IKeyboard interface represents the virtual machine's keyboard. Used
9381 in <link to="IConsole::keyboard"/>.
9382
9383 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9384 to the virtual machine.
9385
9386 </desc>
9387 <method name="putScancode">
9388 <desc>Sends a scancode to the keyboard.
9389
9390 <result name="VBOX_E_IPRT_ERROR">
9391 Could not send scan code to virtual keyboard.
9392 </result>
9393
9394 </desc>
9395 <param name="scancode" type="long" dir="in"/>
9396 </method>
9397
9398 <method name="putScancodes">
9399 <desc>Sends an array of scancodes to the keyboard.
9400
9401 <result name="VBOX_E_IPRT_ERROR">
9402 Could not send all scan codes to virtual keyboard.
9403 </result>
9404
9405 </desc>
9406 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9407 <param name="codesStored" type="unsigned long" dir="return"/>
9408 </method>
9409
9410 <method name="putCAD">
9411 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9412 function is nothing special, it is just a convenience function
9413 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9414
9415 <result name="VBOX_E_IPRT_ERROR">
9416 Could not send all scan codes to virtual keyboard.
9417 </result>
9418
9419 </desc>
9420 </method>
9421
9422 </interface>
9423
9424
9425 <!--
9426 // IMouse
9427 /////////////////////////////////////////////////////////////////////////
9428 -->
9429
9430 <enum
9431 name="MouseButtonState"
9432 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9433 >
9434 <desc>
9435 Mouse button state.
9436 </desc>
9437
9438 <const name="LeftButton" value="0x01"/>
9439 <const name="RightButton" value="0x02"/>
9440 <const name="MiddleButton" value="0x04"/>
9441 <const name="WheelUp" value="0x08"/>
9442 <const name="WheelDown" value="0x10"/>
9443 <const name="MouseStateMask" value="0x1F"/>
9444 </enum>
9445
9446 <interface
9447 name="IMouse" extends="$unknown"
9448 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9449 wsmap="managed"
9450 >
9451 <desc>
9452 The IMouse interface represents the virtual machine's mouse. Used in
9453 <link to="IConsole::mouse"/>.
9454
9455 Through this interface, the virtual machine's virtual mouse can be
9456 controlled.
9457 </desc>
9458
9459 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9460 <desc>
9461 Whether the guest OS supports absolute mouse pointer positioning
9462 or not.
9463 <note>
9464 VirtualBox Guest Tools need to be installed to the guest OS
9465 in order to enable absolute mouse positioning support.
9466 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9467 callback to be instantly informed about changes of this attribute
9468 during virtual machine execution.
9469 </note>
9470 <see><link to="#putMouseEventAbsolute"/></see>
9471 </desc>
9472 </attribute>
9473
9474 <method name="putMouseEvent">
9475 <desc>
9476 Initiates a mouse event using relative pointer movements
9477 along x and y axis.
9478
9479 <result name="E_ACCESSDENIED">
9480 Console not powered up.
9481 </result>
9482 <result name="VBOX_E_IPRT_ERROR">
9483 Could not send mouse event to virtual mouse.
9484 </result>
9485
9486 </desc>
9487
9488 <param name="dx" type="long" dir="in">
9489 <desc>
9490 Amount of pixels the mouse should move to the right.
9491 Negative values move the mouse to the left.
9492 </desc>
9493 </param>
9494 <param name="dy" type="long" dir="in">
9495 <desc>
9496 Amount of pixels the mouse should move downwards.
9497 Negative values move the mouse upwards.
9498 </desc>
9499 </param>
9500 <param name="dz" type="long" dir="in">
9501 <desc>
9502 Amount of mouse wheel moves.
9503 Positive values describe clockwise wheel rotations,
9504 negative values describe counterclockwise rotations.
9505 </desc>
9506 </param>
9507 <param name="buttonState" type="long" dir="in">
9508 <desc>
9509 The current state of mouse buttons. Every bit represents
9510 a mouse button as follows:
9511 <table>
9512 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9513 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9514 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9515 </table>
9516 A value of <tt>1</tt> means the corresponding button is pressed.
9517 otherwise it is released.
9518 </desc>
9519 </param>
9520 </method>
9521
9522 <method name="putMouseEventAbsolute">
9523 <desc>
9524 Positions the mouse pointer using absolute x and y coordinates.
9525 These coordinates are expressed in pixels and
9526 start from <tt>[1,1]</tt> which corresponds to the top left
9527 corner of the virtual display.
9528
9529 <result name="E_ACCESSDENIED">
9530 Console not powered up.
9531 </result>
9532 <result name="VBOX_E_IPRT_ERROR">
9533 Could not send mouse event to virtual mouse.
9534 </result>
9535
9536 <note>
9537 This method will have effect only if absolute mouse
9538 positioning is supported by the guest OS.
9539 </note>
9540
9541 <see><link to="#absoluteSupported"/></see>
9542 </desc>
9543
9544 <param name="x" type="long" dir="in">
9545 <desc>
9546 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9547 </desc>
9548 </param>
9549 <param name="y" type="long" dir="in">
9550 <desc>
9551 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9552 </desc>
9553 </param>
9554 <param name="dz" type="long" dir="in">
9555 <desc>
9556 Amount of mouse wheel moves.
9557 Positive values describe clockwise wheel rotations,
9558 negative values describe counterclockwise rotations.
9559 </desc>
9560 </param>
9561 <param name="buttonState" type="long" dir="in">
9562 <desc>
9563 The current state of mouse buttons. Every bit represents
9564 a mouse button as follows:
9565 <table>
9566 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9567 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9568 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9569 </table>
9570 A value of <tt>1</tt> means the corresponding button is pressed.
9571 otherwise it is released.
9572 </desc>
9573 </param>
9574 </method>
9575
9576 </interface>
9577
9578 <!--
9579 // IDisplay
9580 /////////////////////////////////////////////////////////////////////////
9581 -->
9582
9583 <enum
9584 name="FramebufferAccelerationOperation"
9585 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9586 >
9587 <desc>
9588 Frame buffer acceleration operation.
9589 </desc>
9590
9591 <const name="SolidFillAcceleration" value="1"/>
9592 <const name="ScreenCopyAcceleration" value="2"/>
9593 </enum>
9594
9595 <enum
9596 name="FramebufferPixelFormat"
9597 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
9598 >
9599 <desc>
9600 Format of the video memory buffer. Constants represented by this enum can
9601 be used to test for particular values of <link
9602 to="IFramebuffer::pixelFormat"/>. See also <link
9603 to="IFramebuffer::requestResize()"/>.
9604
9605 See also www.fourcc.org for more information about FOURCC pixel formats.
9606 </desc>
9607
9608 <const name="Opaque" value="0">
9609 <desc>
9610 Unknown buffer format (the user may not assume any particular format of
9611 the buffer).
9612 </desc>
9613 </const>
9614 <const name="FOURCC_RGB" value="0x32424752">
9615 <desc>
9616 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9617 bit layout).
9618 </desc>
9619 </const>
9620 </enum>
9621
9622 <interface
9623 name="IFramebuffer" extends="$unknown"
9624 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9625 wsmap="suppress"
9626 >
9627 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9628 <desc>Address of the start byte of the frame buffer.</desc>
9629 </attribute>
9630
9631 <attribute name="width" type="unsigned long" readonly="yes">
9632 <desc>Frame buffer width, in pixels.</desc>
9633 </attribute>
9634
9635 <attribute name="height" type="unsigned long" readonly="yes">
9636 <desc>Frame buffer height, in pixels.</desc>
9637 </attribute>
9638
9639 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9640 <desc>
9641 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9642 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9643 are: 8, 15, 16, 24 and 32.
9644 </desc>
9645 </attribute>
9646
9647 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9648 <desc>
9649 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9650 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9651 size of the scan line must be aligned to 32 bits.
9652 </desc>
9653 </attribute>
9654
9655 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
9656 <desc>
9657 Frame buffer pixel format. It's either one of the values defined by <link
9658 to="FramebufferPixelFormat"/> or a raw FOURCC code.
9659 <note>
9660 This attribute must never return <link
9661 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
9662 <link to="#address"/> points to must be always known.
9663 </note>
9664 </desc>
9665 </attribute>
9666
9667 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
9668 <desc>
9669 Defines whether this frame buffer uses the virtual video card's memory
9670 buffer (guest VRAM) directly or not. See <link
9671 to="IFramebuffer::requestResize()"/> for more information.
9672 </desc>
9673 </attribute>
9674
9675 <attribute name="heightReduction" type="unsigned long" readonly="yes">
9676 <desc>
9677 Hint from the frame buffer about how much of the standard
9678 screen height it wants to use for itself. This information is
9679 exposed to the guest through the VESA BIOS and VMMDev interface
9680 so that it can use it for determining its video mode table. It
9681 is not guaranteed that the guest respects the value.
9682 </desc>
9683 </attribute>
9684
9685 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
9686 <desc>
9687 An alpha-blended overlay which is superposed over the frame buffer.
9688 The initial purpose is to allow the display of icons providing
9689 information about the VM state, including disk activity, in front
9690 ends which do not have other means of doing that. The overlay is
9691 designed to controlled exclusively by IDisplay. It has no locking
9692 of its own, and any changes made to it are not guaranteed to be
9693 visible until the affected portion of IFramebuffer is updated. The
9694 overlay can be created lazily the first time it is requested. This
9695 attribute can also return NULL to signal that the overlay is not
9696 implemented.
9697 </desc>
9698 </attribute>
9699
9700 <attribute name="winId" type="unsigned long long" readonly="yes">
9701 <desc>
9702 Platform-dependent identifier of the window where context of this
9703 frame buffer is drawn, or zero if there's no such window.
9704 </desc>
9705 </attribute>
9706
9707 <method name="lock">
9708 <desc>
9709 Locks the frame buffer.
9710 Gets called by the IDisplay object where this frame buffer is
9711 bound to.
9712 </desc>
9713 </method>
9714
9715 <method name="unlock">
9716 <desc>
9717 Unlocks the frame buffer.
9718 Gets called by the IDisplay object where this frame buffer is
9719 bound to.
9720 </desc>
9721 </method>
9722
9723 <method name="notifyUpdate">
9724 <desc>
9725 Informs about an update.
9726 Gets called by the display object where this buffer is
9727 registered.
9728 </desc>
9729 <param name="x" type="unsigned long" dir="in"/>
9730 <param name="y" type="unsigned long" dir="in"/>
9731 <param name="width" type="unsigned long" dir="in"/>
9732 <param name="height" type="unsigned long" dir="in"/>
9733 <param name="finished" type="boolean" dir="return"/>
9734 </method>
9735
9736 <method name="requestResize">
9737 <desc>
9738 Requests a size and pixel format change.
9739
9740 There are two modes of working with the video buffer of the virtual
9741 machine. The <i>indirect</i> mode implies that the IFramebuffer
9742 implementation allocates a memory buffer for the requested display mode
9743 and provides it to the virtual machine. In <i>direct</i> mode, the
9744 IFramebuffer implementation uses the memory buffer allocated and owned
9745 by the virtual machine. This buffer represents the video memory of the
9746 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
9747 usually faster because the implementation gets a raw pointer to the
9748 guest VRAM buffer which it can directly use for visualizing the contents
9749 of the virtual display, as opposed to the indirect mode where the
9750 contents of guest VRAM are copied to the memory buffer provided by
9751 the implementation every time a display update occurs.
9752
9753 It is important to note that the direct mode is really fast only when
9754 the implementation uses the given guest VRAM buffer directly, for
9755 example, by blitting it to the window representing the virtual machine's
9756 display, which saves at least one copy operation comparing to the
9757 indirect mode. However, using the guest VRAM buffer directly is not
9758 always possible: the format and the color depth of this buffer may be
9759 not supported by the target window, or it may be unknown (opaque) as in
9760 case of text or non-linear multi-plane VGA video modes. In this case,
9761 the indirect mode (that is always available) should be used as a
9762 fallback: when the guest VRAM contents are copied to the
9763 implementation-provided memory buffer, color and format conversion is
9764 done automatically by the underlying code.
9765
9766 The @a pixelFormat parameter defines whether the direct mode is
9767 available or not. If @a pixelFormat is <link
9768 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
9769 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and @a
9770 bytesPerLine parameters must be ignored and the implementation must use
9771 the indirect mode (where it provides its own buffer in one of the
9772 supported formats). In all other cases, @a pixelFormat together with @a
9773 bitsPerPixel and @a bytesPerLine define the format of the video memory
9774 buffer pointed to by the @a VRAM parameter and the implementation is
9775 free to choose which mode to use. To indicate that this frame buffer uses
9776 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
9777 attribute must return <tt>true</tt> and <link to="#address"/> must
9778 return exactly the same address that is passed in the @a VRAM parameter
9779 of this method; otherwise it is assumed that the indirect strategy is
9780 chosen.
9781
9782 The @a width and @a height parameters represent the size of the
9783 requested display mode in both modes. In case of indirect mode, the
9784 provided memory buffer should be big enough to store data of the given
9785 display mode. In case of direct mode, it is guaranteed that the given @a
9786 VRAM buffer contains enough space to represent the display mode of the
9787 given size. Note that this frame buffer's <link to="#width"/> and <link
9788 to="#height"/> attributes must return exactly the same values as
9789 passed to this method after the resize is completed (see below).
9790
9791 The @a finished output parameter determines if the implementation has
9792 finished resizing the frame buffer or not. If, for some reason, the
9793 resize cannot be finished immediately during this call, @a finished
9794 must be set to @c false, and the implementation must call
9795 <link to="IDisplay::resizeCompleted()"/> after it has returned from
9796 this method as soon as possible. If @a finished is @c false, the
9797 machine will not call any frame buffer methods until
9798 <link to="IDisplay::resizeCompleted()"/> is called.
9799
9800 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
9801 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
9802 this frame buffer must return exactly the same values as specified in the
9803 parameters of this method, after the resize is completed. If the
9804 indirect mode is chosen, these attributes must return values describing
9805 the format of the implementation's own memory buffer <link
9806 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
9807 value must always correlate with <link to="#pixelFormat"/>. Note that
9808 the <link to="#pixelFormat"/> attribute must never return <link
9809 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
9810
9811 <note>
9812 This method is called by the IDisplay object under the
9813 <link to="#lock()"/> provided by this IFramebuffer
9814 implementation. If this method returns @c false in @a finished, then
9815 this lock is not released until
9816 <link to="IDisplay::resizeCompleted()"/> is called.
9817 </note>
9818 </desc>
9819 <param name="screenId" type="unsigned long" dir="in">
9820 <desc>
9821 Logical screen number. Must be used in the corresponding call to
9822 <link to="IDisplay::resizeCompleted()"/> if this call is made.
9823 </desc>
9824 </param>
9825 <param name="pixelFormat" type="unsigned long" dir="in">
9826 <desc>
9827 Pixel format of the memory buffer pointed to by @a VRAM.
9828 See also <link to="FramebufferPixelFormat"/>.
9829 </desc>
9830 </param>
9831 <param name="VRAM" type="octet" mod="ptr" dir="in">
9832 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
9833 </param>
9834 <param name="bitsPerPixel" type="unsigned long" dir="in">
9835 <desc>Color depth, bits per pixel.</desc>
9836 </param>
9837 <param name="bytesPerLine" type="unsigned long" dir="in">
9838 <desc>Size of one scan line, in bytes.</desc>
9839 </param>
9840 <param name="width" type="unsigned long" dir="in">
9841 <desc>Width of the guest display, in pixels.</desc>
9842 </param>
9843 <param name="height" type="unsigned long" dir="in">
9844 <desc>Height of the guest display, in pixels.</desc>
9845 </param>
9846 <param name="finished" type="boolean" dir="return">
9847 <desc>
9848 Can the VM start using the new frame buffer immediately
9849 after this method returns or it should wait for
9850 <link to="IDisplay::resizeCompleted()"/>.
9851 </desc>
9852 </param>
9853 </method>
9854
9855 <method name="operationSupported">
9856 <desc>
9857 Returns whether the given acceleration operation is supported
9858 by the IFramebuffer implementation. If not, the display object
9859 will not attempt to call the corresponding IFramebuffer entry
9860 point. Even if an operation is indicated as supported, the
9861 IFramebuffer implementation always has the option to return non
9862 supported from the corresponding acceleration method in which
9863 case the operation will be performed by the display engine. This
9864 allows for reduced IFramebuffer implementation complexity where
9865 only common cases are handled.
9866 </desc>
9867 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
9868 <param name="supported" type="boolean" dir="return"/>
9869 </method>
9870
9871 <method name="videoModeSupported">
9872 <desc>
9873 Returns whether the frame buffer implementation is willing to
9874 support a given video mode. In case it is not able to render
9875 the video mode (or for some reason not willing), it should
9876 return false. Usually this method is called when the guest
9877 asks the VMM device whether a given video mode is supported
9878 so the information returned is directly exposed to the guest.
9879 It is important that this method returns very quickly.
9880 </desc>
9881 <param name="width" type="unsigned long" dir="in"/>
9882 <param name="height" type="unsigned long" dir="in"/>
9883 <param name="bpp" type="unsigned long" dir="in"/>
9884 <param name="supported" type="boolean" dir="return"/>
9885 </method>
9886
9887 <method name="solidFill">
9888 <desc>
9889 Fills the specified rectangle on screen with a solid color.
9890 </desc>
9891 <param name="x" type="unsigned long" dir="in"/>
9892 <param name="y" type="unsigned long" dir="in"/>
9893 <param name="width" type="unsigned long" dir="in"/>
9894 <param name="height" type="unsigned long" dir="in"/>
9895 <param name="color" type="unsigned long" dir="in"/>
9896 <param name="handled" type="boolean" dir="return"/>
9897 </method>
9898
9899 <method name="copyScreenBits">
9900 <desc>
9901 Copies specified rectangle on the screen.
9902 </desc>
9903 <param name="xDst" type="unsigned long" dir="in"/>
9904 <param name="yDst" type="unsigned long" dir="in"/>
9905 <param name="xSrc" type="unsigned long" dir="in"/>
9906 <param name="ySrc" type="unsigned long" dir="in"/>
9907 <param name="width" type="unsigned long" dir="in"/>
9908 <param name="height" type="unsigned long" dir="in"/>
9909 <param name="handled" type="boolean" dir="return"/>
9910 </method>
9911
9912 <method name="getVisibleRegion">
9913 <desc>
9914 Returns the visible region of this frame buffer.
9915
9916 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
9917 @a count parameter is ignored and the number of elements necessary to
9918 describe the current visible region is returned in @a countCopied.
9919
9920 If @a rectangles is not <tt>NULL</tt> but @a count is less
9921 than the required number of elements to store region data, the method
9922 will report a failure. If @a count is equal or greater than the
9923 required number of elements, then the actual number of elements copied
9924 to the provided array will be returned in @a countCopied.
9925
9926 <note>
9927 The address of the provided array must be in the process space of
9928 this IFramebuffer object.
9929 </note>
9930 <note>
9931 Method not yet implemented.
9932 </note>
9933 </desc>
9934 <param name="rectangles" type="octet" mod="ptr" dir="in">
9935 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
9936 </param>
9937 <param name="count" type="unsigned long" dir="in">
9938 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9939 </param>
9940 <param name="countCopied" type="unsigned long" dir="return">
9941 <desc>Number of elements copied to the @a rectangles array.</desc>
9942 </param>
9943 </method>
9944
9945 <method name="setVisibleRegion">
9946 <desc>
9947 Suggests a new visible region to this frame buffer. This region
9948 represents the area of the VM display which is a union of regions of
9949 all top-level windows of the guest operating system running inside the
9950 VM (if the Guest Additions for this system support this
9951 functionality). This information may be used by the frontends to
9952 implement the seamless desktop integration feature.
9953
9954 <note>
9955 The address of the provided array must be in the process space of
9956 this IFramebuffer object.
9957 </note>
9958 <note>
9959 The IFramebuffer implementation must make a copy of the provided
9960 array of rectangles.
9961 </note>
9962 <note>
9963 Method not yet implemented.
9964 </note>
9965 </desc>
9966 <param name="rectangles" type="octet" mod="ptr" dir="in">
9967 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
9968 </param>
9969 <param name="count" type="unsigned long" dir="in">
9970 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
9971 </param>
9972 </method>
9973
9974 </interface>
9975
9976 <interface
9977 name="IFramebufferOverlay" extends="IFramebuffer"
9978 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
9979 wsmap="suppress"
9980 >
9981 <desc>
9982 The IFramebufferOverlay interface represents an alpha blended overlay
9983 for displaying status icons above an IFramebuffer. It is always created
9984 not visible, so that it must be explicitly shown. It only covers a
9985 portion of the IFramebuffer, determined by its width, height and
9986 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
9987 that order) format, and may be written to directly. Do re-read the
9988 width though, after setting it, as it may be adjusted (increased) to
9989 make it more suitable for the front end.
9990 </desc>
9991 <attribute name="x" type="unsigned long" readonly="yes">
9992 <desc>X position of the overlay, relative to the frame buffer.</desc>
9993 </attribute>
9994
9995 <attribute name="y" type="unsigned long" readonly="yes">
9996 <desc>Y position of the overlay, relative to the frame buffer.</desc>
9997 </attribute>
9998
9999 <attribute name="visible" type="boolean" readonly="no">
10000 <desc>
10001 Whether the overlay is currently visible.
10002 </desc>
10003 </attribute>
10004
10005 <attribute name="alpha" type="unsigned long" readonly="no">
10006 <desc>
10007 The global alpha value for the overlay. This may or may not be
10008 supported by a given front end.
10009 </desc>
10010 </attribute>
10011
10012 <method name="move">
10013 <desc>
10014 Changes the overlay's position relative to the IFramebuffer.
10015 </desc>
10016 <param name="x" type="unsigned long" dir="in"/>
10017 <param name="y" type="unsigned long" dir="in"/>
10018 </method>
10019
10020 </interface>
10021
10022 <interface
10023 name="IDisplay" extends="$unknown"
10024 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10025 wsmap="suppress"
10026 >
10027 <desc>
10028 The IDisplay interface represents the virtual machine's display.
10029
10030 The object implementing this interface is contained in each
10031 <link to="IConsole::display"/> attribute and represents the visual
10032 output of the virtual machine.
10033
10034 The virtual display supports pluggable output targets represented by the
10035 IFramebuffer interface. Examples of the output target are a window on
10036 the host computer or an RDP session's display on a remote computer.
10037 </desc>
10038 <attribute name="width" type="unsigned long" readonly="yes">
10039 <desc>Current display width.</desc>
10040 </attribute>
10041
10042 <attribute name="height" type="unsigned long" readonly="yes">
10043 <desc>Current display height.</desc>
10044 </attribute>
10045
10046 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10047 <desc>
10048 Current guest display color depth. Note that this may differ
10049 from <link to="IFramebuffer::bitsPerPixel"/>.
10050 </desc>
10051 </attribute>
10052
10053 <method name="setupInternalFramebuffer">
10054 <desc>
10055 Prepares an internally managed frame buffer.
10056 </desc>
10057 <param name="depth" type="unsigned long" dir="in"/>
10058 </method>
10059
10060 <method name="lockFramebuffer">
10061 <desc>
10062 Requests access to the internal frame buffer.
10063
10064 <result name="VBOX_E_NOT_SUPPORTED">
10065 Attempt to lock a non-internal frame buffer.
10066 </result>
10067
10068 </desc>
10069 <param name="address" type="octet" mod="ptr" dir="return"/>
10070 </method>
10071
10072 <method name="unlockFramebuffer">
10073 <desc>
10074 Releases access to the internal frame buffer.
10075
10076 <result name="VBOX_E_NOT_SUPPORTED">
10077 Attempt to unlock a non-internal frame buffer.
10078 </result>
10079
10080 </desc>
10081 </method>
10082
10083 <method name="registerExternalFramebuffer">
10084 <desc>
10085 Registers an external frame buffer.
10086 </desc>
10087 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10088 </method>
10089
10090 <method name="setFramebuffer">
10091 <desc>
10092 Sets the framebuffer for given screen.
10093 </desc>
10094 <param name="screenId" type="unsigned long" dir="in"/>
10095 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10096 </method>
10097
10098 <method name="getFramebuffer">
10099 <desc>
10100 Queries the framebuffer for given screen.
10101 </desc>
10102 <param name="screenId" type="unsigned long" dir="in"/>
10103 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10104 <param name="xOrigin" type="long" dir="out"/>
10105 <param name="yOrigin" type="long" dir="out"/>
10106 </method>
10107
10108 <method name="setVideoModeHint">
10109 <desc>
10110 Asks VirtualBox to request the given video mode from
10111 the guest. This is just a hint and it cannot be guaranteed
10112 that the requested resolution will be used. Guest Additions
10113 are required for the request to be seen by guests. The caller
10114 should issue the request and wait for a resolution change and
10115 after a timeout retry.
10116
10117 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10118 parameters means that the corresponding values should be taken from the
10119 current video mode (i.e. left unchanged).
10120
10121 If the guest OS supports multi-monitor configuration then the @a display
10122 parameter specifies the number of the guest display to send the hint to:
10123 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10124 so on. If the multi-monitor configuration is not supported, @a display
10125 must be <tt>0</tt>.
10126
10127 <result name="E_INVALIDARG">
10128 The @a display is not associated with any monitor.
10129 </result>
10130
10131 </desc>
10132 <param name="width" type="unsigned long" dir="in"/>
10133 <param name="height" type="unsigned long" dir="in"/>
10134 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10135 <param name="display" type="unsigned long" dir="in"/>
10136 </method>
10137
10138 <method name="setSeamlessMode">
10139 <desc>
10140 Enables or disables seamless guest display rendering (seamless desktop
10141 integration) mode.
10142 <note>
10143 Calling this method has no effect if <link
10144 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10145 </note>
10146 </desc>
10147 <param name="enabled" type="boolean" dir="in"/>
10148 </method>
10149
10150 <method name="takeScreenShot">
10151 <desc>
10152 Takes a screen shot of the requested size and copies it to the
10153 32-bpp buffer allocated by the caller.
10154
10155 <result name="E_NOTIMPL">
10156 Feature not implemented.
10157 </result>
10158 <result name="VBOX_E_IPRT_ERROR">
10159 Could not take a screenshot.
10160 </result>
10161
10162 </desc>
10163 <param name="address" type="octet" mod="ptr" dir="in"/>
10164 <param name="width" type="unsigned long" dir="in"/>
10165 <param name="height" type="unsigned long" dir="in"/>
10166 </method>
10167
10168 <method name="drawToScreen">
10169 <desc>
10170 Draws a 32-bpp image of the specified size from the given buffer
10171 to the given point on the VM display.
10172
10173 <result name="E_NOTIMPL">
10174 Feature not implemented.
10175 </result>
10176 <result name="VBOX_E_IPRT_ERROR">
10177 Could not draw to screen.
10178 </result>
10179
10180 </desc>
10181 <param name="address" type="octet" mod="ptr" dir="in"/>
10182 <param name="x" type="unsigned long" dir="in"/>
10183 <param name="y" type="unsigned long" dir="in"/>
10184 <param name="width" type="unsigned long" dir="in"/>
10185 <param name="height" type="unsigned long" dir="in"/>
10186 </method>
10187
10188 <method name="invalidateAndUpdate">
10189 <desc>
10190 Does a full invalidation of the VM display and instructs the VM
10191 to update it.
10192
10193 <result name="VBOX_E_IPRT_ERROR">
10194 Could not invalidate and update screen.
10195 </result>
10196
10197 </desc>
10198 </method>
10199
10200 <method name="resizeCompleted">
10201 <desc>
10202 Signals that a framebuffer has completed the resize operation.
10203
10204 <result name="VBOX_E_NOT_SUPPORTED">
10205 Operation only valid for external frame buffers.
10206 </result>
10207
10208 </desc>
10209 <param name="screenId" type="unsigned long" dir="in"/>
10210 </method>
10211
10212 <method name="updateCompleted">
10213 <desc>
10214 Signals that a framebuffer has completed the update operation.
10215
10216 <result name="VBOX_E_NOT_SUPPORTED">
10217 Operation only valid for external frame buffers.
10218 </result>
10219
10220 </desc>
10221 </method>
10222
10223 </interface>
10224
10225 <!--
10226 // INetworkAdapter
10227 /////////////////////////////////////////////////////////////////////////
10228 -->
10229
10230 <enum
10231 name="NetworkAttachmentType"
10232 uuid="64e770dc-dd1d-4879-9f12-5bd6bc879b78"
10233 >
10234 <desc>
10235 Network attachment type.
10236 </desc>
10237
10238 <const name="Null" value="0">
10239 <desc>Null value, also means "not attached".</desc>
10240 </const>
10241 <const name="NAT" value="1"/>
10242 <const name="HostInterface" value="2"/>
10243 <const name="Internal" value="3"/>
10244 <const name="HostOnly" value="4"/>
10245 </enum>
10246
10247 <enum
10248 name="NetworkAdapterType"
10249 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10250 >
10251 <desc>
10252 Network adapter type.
10253 </desc>
10254
10255 <const name="Null" value="0">
10256 <desc>Null value (never used by the API).</desc>
10257 </const>
10258 <const name="Am79C970A" value="1"/>
10259 <const name="Am79C973" value="2"/>
10260 <const name="I82540EM" value="3"/>
10261 <const name="I82543GC" value="4"/>
10262 </enum>
10263
10264 <interface
10265 name="INetworkAdapter" extends="$unknown"
10266 uuid="4a1ee64e-6c5f-47dd-acfa-f834d7cb74fb"
10267 wsmap="managed"
10268 >
10269 <attribute name="adapterType" type="NetworkAdapterType">
10270 <desc>
10271 Type of the virtual network adapter. Depending on this value,
10272 VirtualBox will provide a different virtual network hardware
10273 to the guest.
10274 </desc>
10275 </attribute>
10276
10277 <attribute name="slot" type="unsigned long" readonly="yes">
10278 <desc>
10279 Slot number this adapter is plugged into. Corresponds to
10280 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10281 to obtain this instance.
10282 </desc>
10283 </attribute>
10284
10285 <attribute name="enabled" type="boolean">
10286 <desc>
10287 Flag whether the network adapter is present in the
10288 guest system. If disabled, the virtual guest hardware will
10289 not contain this network adapter. Can only be changed when
10290 the VM is not running.
10291 </desc>
10292 </attribute>
10293
10294 <attribute name="MACAddress" type="wstring">
10295 <desc>
10296 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10297 it to NULL, VirtualBox will generate a unique MAC address.
10298 </desc>
10299 </attribute>
10300
10301 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10302
10303 <attribute name="hostInterface" type="wstring">
10304 <desc>
10305 Name of the host network interface the VM is attached to.
10306 </desc>
10307 </attribute>
10308
10309 <attribute name="internalNetwork" type="wstring">
10310 <desc>
10311 Name of the internal network the VM is attached to.
10312 </desc>
10313 </attribute>
10314
10315 <attribute name="NATNetwork" type="wstring">
10316 <desc>
10317 Name of the NAT network the VM is attached to.
10318 </desc>
10319 </attribute>
10320
10321 <attribute name="cableConnected" type="boolean">
10322 <desc>
10323 Flag whether the adapter reports the cable as connected or not.
10324 It can be used to report offline situations to a VM.
10325 </desc>
10326 </attribute>
10327
10328 <attribute name="lineSpeed" type="unsigned long">
10329 <desc>
10330 Line speed reported by custom drivers, in units of 1 kbps.
10331 </desc>
10332 </attribute>
10333
10334 <attribute name="traceEnabled" type="boolean">
10335 <desc>
10336 Flag whether network traffic from/to the network card should be traced.
10337 Can only be toggled when the VM is turned off.
10338 </desc>
10339 </attribute>
10340
10341 <attribute name="traceFile" type="wstring">
10342 <desc>
10343 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10344 will be used.
10345 </desc>
10346 </attribute>
10347
10348 <method name="attachToNAT">
10349 <desc>
10350 Attach the network adapter to the Network Address Translation (NAT) interface.
10351 </desc>
10352 </method>
10353
10354 <method name="attachToHostInterface">
10355 <desc>
10356 Attach the network adapter to a host interface.
10357 </desc>
10358 </method>
10359
10360 <method name="attachToInternalNetwork">
10361 <desc>
10362 Attach the network adapter to an internal network.
10363 </desc>
10364 </method>
10365
10366 <method name="attachToHostOnlyNetwork">
10367 <desc>
10368 Attach the network adapter to the host-only network.
10369 </desc>
10370 </method>
10371
10372 <method name="detach">
10373 <desc>
10374 Detach the network adapter
10375 </desc>
10376 </method>
10377 </interface>
10378
10379
10380 <!--
10381 // ISerialPort
10382 /////////////////////////////////////////////////////////////////////////
10383 -->
10384
10385 <enum
10386 name="PortMode"
10387 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10388 >
10389 <desc>
10390 The PortMode enumeration represents possible communication modes for
10391 the virtual serial port device.
10392 </desc>
10393
10394 <const name="Disconnected" value="0">
10395 <desc>Virtual device is not attached to any real host device.</desc>
10396 </const>
10397 <const name="HostPipe" value="1">
10398 <desc>Virtual device is attached to a host pipe.</desc>
10399 </const>
10400 <const name="HostDevice" value="2">
10401 <desc>Virtual device is attached to a host device.</desc>
10402 </const>
10403 </enum>
10404
10405 <interface
10406 name="ISerialPort" extends="$unknown"
10407 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10408 wsmap="managed"
10409 >
10410
10411 <desc>
10412 The ISerialPort interface represents the virtual serial port device.
10413
10414 The virtual serial port device acts like an ordinary serial port
10415 inside the virtual machine. This device communicates to the real
10416 serial port hardware in one of two modes: host pipe or host device.
10417
10418 In host pipe mode, the #path attribute specifies the path to the pipe on
10419 the host computer that represents a serial port. The #server attribute
10420 determines if this pipe is created by the virtual machine process at
10421 machine startup or it must already exist before starting machine
10422 execution.
10423
10424 In host device mode, the #path attribute specifies the name of the
10425 serial port device on the host computer.
10426
10427 There is also a third communication mode: the disconnected mode. In this
10428 mode, the guest OS running inside the virtual machine will be able to
10429 detect the serial port, but all port write operations will be discarded
10430 and all port read operations will return no data.
10431
10432 <see>IMachine::getSerialPort</see>
10433 </desc>
10434
10435 <attribute name="slot" type="unsigned long" readonly="yes">
10436 <desc>
10437 Slot number this serial port is plugged into. Corresponds to
10438 the value you pass to <link to="IMachine::getSerialPort"/>
10439 to obtain this instance.
10440 </desc>
10441 </attribute>
10442
10443 <attribute name="enabled" type="boolean">
10444 <desc>
10445 Flag whether the serial port is enabled. If disabled,
10446 the serial port will not be reported to the guest OS.
10447 </desc>
10448 </attribute>
10449
10450 <attribute name="IOBase" type="unsigned long">
10451 <desc>Base I/O address of the serial port.</desc>
10452 </attribute>
10453
10454 <attribute name="IRQ" type="unsigned long">
10455 <desc>IRQ number of the serial port.</desc>
10456 </attribute>
10457
10458 <attribute name="hostMode" type="PortMode">
10459 <desc>
10460 How is this port connected to the host.
10461 <note>
10462 Changing this attribute may fail if the conditions for
10463 <link to="#path"/> are not met.
10464 </note>
10465 </desc>
10466 </attribute>
10467
10468 <attribute name="server" type="boolean">
10469 <desc>
10470 Flag whether this serial port acts as a server (creates a new pipe on
10471 the host) or as a client (uses the existing pipe). This attribute is
10472 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10473 </desc>
10474 </attribute>
10475
10476 <attribute name="path" type="wstring">
10477 <desc>
10478 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
10479 PortMode_HostPipe, or the host serial device name when
10480 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
10481 cases, setting a @c null or an empty string as the attribute's value
10482 will result into an error. Otherwise, the value of this property is
10483 ignored.
10484 </desc>
10485 </attribute>
10486
10487 </interface>
10488
10489 <!--
10490 // IParallelPort
10491 /////////////////////////////////////////////////////////////////////////
10492 -->
10493
10494 <interface
10495 name="IParallelPort" extends="$unknown"
10496 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10497 wsmap="managed"
10498 >
10499
10500 <desc>
10501 The IParallelPort interface represents the virtual parallel port device.
10502
10503 The virtual parallel port device acts like an ordinary parallel port
10504 inside the virtual machine. This device communicates to the real
10505 parallel port hardware using the name of the parallel device on the host
10506 computer specified in the #path attribute.
10507
10508 Each virtual parallel port device is assigned a base I/O address and an
10509 IRQ number that will be reported to the guest operating system and used
10510 to operate the given parallel port from within the virtual machine.
10511
10512 <see>IMachine::getParallelPort</see>
10513 </desc>
10514
10515 <attribute name="slot" type="unsigned long" readonly="yes">
10516 <desc>
10517 Slot number this parallel port is plugged into. Corresponds to
10518 the value you pass to <link to="IMachine::getParallelPort"/>
10519 to obtain this instance.
10520 </desc>
10521 </attribute>
10522
10523 <attribute name="enabled" type="boolean">
10524 <desc>
10525 Flag whether the parallel port is enabled. If disabled,
10526 the parallel port will not be reported to the guest OS.
10527 </desc>
10528 </attribute>
10529
10530 <attribute name="IOBase" type="unsigned long">
10531 <desc>Base I/O address of the parallel port.</desc>
10532 </attribute>
10533
10534 <attribute name="IRQ" type="unsigned long">
10535 <desc>IRQ number of the parallel port.</desc>
10536 </attribute>
10537
10538 <attribute name="path" type="wstring">
10539 <desc>
10540 Host parallel device name. If this parallel port is enabled, setting a
10541 @c null or an empty string as this attribute's value will result into
10542 an error.
10543 </desc>
10544 </attribute>
10545
10546 </interface>
10547
10548
10549 <!--
10550 // IMachineDebugger
10551 /////////////////////////////////////////////////////////////////////////
10552 -->
10553
10554 <interface
10555 name="IMachineDebugger" extends="$unknown"
10556 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10557 wsmap="suppress"
10558 >
10559 <method name="resetStats">
10560 <desc>
10561 Reset VM statistics.
10562 </desc>
10563 <param name="pattern" type="wstring" dir="in">
10564 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10565 </param>
10566 </method>
10567
10568 <method name="dumpStats">
10569 <desc>
10570 Dumps VM statistics.
10571 </desc>
10572 <param name="pattern" type="wstring" dir="in">
10573 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10574 </param>
10575 </method>
10576
10577 <method name="getStats">
10578 <desc>
10579 Get the VM statistics in a XMLish format.
10580 </desc>
10581 <param name="pattern" type="wstring" dir="in">
10582 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10583 </param>
10584 <param name="withDescriptions" type="boolean" dir="in">
10585 <desc>Whether to include the descriptions.</desc>
10586 </param>
10587 <param name="stats" type="wstring" dir="out">
10588 <desc>The XML document containing the statistics.</desc>
10589 </param>
10590 </method>
10591
10592 <method name="injectNMI">
10593 <desc>
10594 Inject an NMI into a running VT-x/AMD-V VM.
10595 </desc>
10596 </method>
10597
10598 <attribute name="singlestep" type="boolean">
10599 <desc>Switch for enabling singlestepping.</desc>
10600 </attribute>
10601
10602 <attribute name="recompileUser" type="boolean">
10603 <desc>Switch for forcing code recompilation for user mode code.</desc>
10604 </attribute>
10605
10606 <attribute name="recompileSupervisor" type="boolean">
10607 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10608 </attribute>
10609
10610 <attribute name="PATMEnabled" type="boolean">
10611 <desc>Switch for enabling and disabling the PATM component.</desc>
10612 </attribute>
10613
10614 <attribute name="CSAMEnabled" type="boolean">
10615 <desc>Switch for enabling and disabling the CSAM component.</desc>
10616 </attribute>
10617
10618 <attribute name="logEnabled" type="boolean">
10619 <desc>Switch for enabling and disabling logging.</desc>
10620 </attribute>
10621
10622 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10623 <desc>
10624 Flag indicating whether the VM is currently making use of CPU hardware
10625 virtualization extensions.
10626 </desc>
10627 </attribute>
10628
10629 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10630 <desc>
10631 Flag indicating whether the VM is currently making use of the nested paging
10632 CPU hardware virtualization extension.
10633 </desc>
10634 </attribute>
10635
10636 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10637 <desc>
10638 Flag indicating whether the VM is currently making use of the VPID
10639 VT-x extension.
10640 </desc>
10641 </attribute>
10642
10643 <attribute name="PAEEnabled" type="boolean" readonly="yes">
10644 <desc>
10645 Flag indicating whether the VM is currently making use of the Physical
10646 Address Extension CPU feature.
10647 </desc>
10648 </attribute>
10649
10650 <attribute name="virtualTimeRate" type="unsigned long">
10651 <desc>
10652 The rate at which the virtual time runs expressed as a percentage.
10653 The accepted range is 2% to 20000%.
10654 </desc>
10655 </attribute>
10656
10657 <!-- @todo method for setting log flags, groups and destination! -->
10658
10659 <attribute name="VM" type="unsigned long long" readonly="yes">
10660 <desc>
10661 Gets the VM handle. This is only for internal use while
10662 we carve the details of this interface.
10663 </desc>
10664 </attribute>
10665
10666 </interface>
10667
10668 <!--
10669 // IUSBController
10670 /////////////////////////////////////////////////////////////////////////
10671 -->
10672
10673 <interface
10674 name="IUSBController" extends="$unknown"
10675 uuid="f4c2d3dc-f109-4da7-93b1-ec28973ac89f"
10676 wsmap="managed"
10677 >
10678 <attribute name="enabled" type="boolean">
10679 <desc>
10680 Flag whether the USB controller is present in the
10681 guest system. If disabled, the virtual guest hardware will
10682 not contain any USB controller. Can only be changed when
10683 the VM is powered off.
10684 </desc>
10685 </attribute>
10686
10687 <attribute name="enabledEhci" type="boolean">
10688 <desc>
10689 Flag whether the USB EHCI controller is present in the
10690 guest system. If disabled, the virtual guest hardware will
10691 not contain a USB EHCI controller. Can only be changed when
10692 the VM is powered off.
10693 </desc>
10694 </attribute>
10695
10696 <attribute name="USBStandard" type="unsigned short" readonly="yes">
10697 <desc>
10698 USB standard version which the controller implements.
10699 This is a BCD which means that the major version is in the
10700 high byte and minor version is in the low byte.
10701 </desc>
10702 </attribute>
10703
10704 <attribute name="deviceFilters" type="IUSBDeviceFilterCollection" readonly="yes">
10705 <desc>
10706 List of USB device filters associated with the machine.
10707
10708 If the machine is currently running, these filters are activated
10709 every time a new (supported) USB device is attached to the host
10710 computer that was not ignored by global filters
10711 (<link to="IHost::USBDeviceFilters"/>).
10712
10713 These filters are also activated when the machine is powered up.
10714 They are run against a list of all currently available USB
10715 devices (in states
10716 <link to="USBDeviceState_Available"/>,
10717 <link to="USBDeviceState_Busy"/>,
10718 <link to="USBDeviceState_Held"/>) that were not previously
10719 ignored by global filters.
10720
10721 If at least one filter matches the USB device in question, this
10722 device is automatically captured (attached to) the virtual USB
10723 controller of this machine.
10724
10725 <see>IUSBDeviceFilter, ::IUSBController</see>
10726 </desc>
10727 </attribute>
10728
10729 <method name="createDeviceFilter">
10730 <desc>
10731 Creates a new USB device filter. All attributes except
10732 the filter name are set to <tt>null</tt> (any match),
10733 <i>active</i> is <tt>false</tt> (the filter is not active).
10734
10735 The created filter can then be added to the list of filters using
10736 <link to="#insertDeviceFilter()"/>.
10737
10738 <result name="VBOX_E_INVALID_VM_STATE">
10739 The virtual machine is not mutable.
10740 </result>
10741
10742 <see>#deviceFilters</see>
10743 </desc>
10744 <param name="name" type="wstring" dir="in">
10745 <desc>
10746 Filter name. See <link to="IUSBDeviceFilter::name"/>
10747 for more info.
10748 </desc>
10749 </param>
10750 <param name="filter" type="IUSBDeviceFilter" dir="return">
10751 <desc>Created filter object.</desc>
10752 </param>
10753 </method>
10754
10755 <method name="insertDeviceFilter">
10756 <desc>
10757 Inserts the given USB device to the specified position
10758 in the list of filters.
10759
10760 Positions are numbered starting from <tt>0</tt>. If the specified
10761 position is equal to or greater than the number of elements in
10762 the list, the filter is added to the end of the collection.
10763
10764 <note>
10765 Duplicates are not allowed, so an attempt to insert a
10766 filter that is already in the collection, will return an
10767 error.
10768 </note>
10769
10770 <result name="VBOX_E_INVALID_VM_STATE">
10771 Virtual machine is not mutable.
10772 </result>
10773 <result name="E_INVALIDARG">
10774 USB device filter not created within this VirtualBox instance.
10775 </result>
10776 <result name="VBOX_E_INVALID_OBJECT_STATE">
10777 USB device filter already in list.
10778 </result>
10779
10780 <see>#deviceFilters</see>
10781 </desc>
10782 <param name="position" type="unsigned long" dir="in">
10783 <desc>Position to insert the filter to.</desc>
10784 </param>
10785 <param name="filter" type="IUSBDeviceFilter" dir="in">
10786 <desc>USB device filter to insert.</desc>
10787 </param>
10788 </method>
10789
10790 <method name="removeDeviceFilter">
10791 <desc>
10792 Removes a USB device filter from the specified position in the
10793 list of filters.
10794
10795 Positions are numbered starting from <tt>0</tt>. Specifying a
10796 position equal to or greater than the number of elements in
10797 the list will produce an error.
10798
10799 <see>#deviceFilters</see>
10800
10801 <result name="VBOX_E_INVALID_VM_STATE">
10802 Virtual machine is not mutable.
10803 </result>
10804 <result name="E_INVALIDARG">
10805 USB device filter list empty or invalid @a position.
10806 </result>
10807
10808 </desc>
10809 <param name="position" type="unsigned long" dir="in">
10810 <desc>Position to remove the filter from.</desc>
10811 </param>
10812 <param name="filter" type="IUSBDeviceFilter" dir="return">
10813 <desc>Removed USB device filter.</desc>
10814 </param>
10815 </method>
10816
10817 </interface>
10818
10819
10820 <!--
10821 // IUSBDevice
10822 /////////////////////////////////////////////////////////////////////////
10823 -->
10824
10825 <enumerator
10826 name="IUSBDeviceEnumerator" type="IUSBDevice"
10827 uuid="aefe00f7-eb8a-454b-9ea4-fd5ad93c0e99"
10828 />
10829
10830 <collection
10831 name="IUSBDeviceCollection" type="IUSBDevice"
10832 enumerator="IUSBDeviceEnumerator"
10833 uuid="e31f3248-90dd-4ca2-95f0-6b36042d96a2"
10834 readonly="yes"
10835 >
10836 <method name="findById">
10837 <desc>
10838 Searches this collection for a USB device with the given UUID.
10839 <note>
10840 The method returns an error if the given UUID does not
10841 correspond to any USB device in the collection.
10842 </note>
10843 <see>IUSBDevice::id</see>
10844 </desc>
10845 <param name="id" type="uuid" dir="in">
10846 <desc>UUID of the USB device to search for.</desc>
10847 </param>
10848 <param name="device" type="IUSBDevice" dir="return">
10849 <desc>Found USB device object.</desc>
10850 </param>
10851 </method>
10852
10853 <method name="findByAddress">
10854 <desc>
10855 Searches this collection for a USB device with the given
10856 host address.
10857 <note>
10858 The method returns an error if the given address does not
10859 correspond to any USB device in the collection.
10860 </note>
10861 <see>IUSBDevice::address</see>
10862 </desc>
10863 <param name="name" type="wstring" dir="in">
10864 <desc>
10865 Address of the USB device (as assigned by the host) to
10866 search for.
10867 </desc>
10868 </param>
10869 <param name="device" type="IUSBDevice" dir="return">
10870 <desc>Found USB device object.</desc>
10871 </param>
10872 </method>
10873
10874 </collection>
10875
10876 <interface
10877 name="IUSBDevice" extends="$unknown"
10878 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
10879 wsmap="managed"
10880 >
10881 <desc>
10882 The IUSBDevice interface represents a virtual USB device attached to the
10883 virtual machine.
10884
10885 A collection of objects implementing this interface is stored in the
10886 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
10887 attached to a running virtual machine's USB controller.
10888 </desc>
10889
10890 <attribute name="id" type="uuid" readonly="yes">
10891 <desc>
10892 Unique USB device ID. This ID is built from #vendorId,
10893 #productId, #revision and #serialNumber.
10894 </desc>
10895 </attribute>
10896
10897 <attribute name="vendorId" type="unsigned short" readonly="yes">
10898 <desc>Vendor ID.</desc>
10899 </attribute>
10900
10901 <attribute name="productId" type="unsigned short" readonly="yes">
10902 <desc>Product ID.</desc>
10903 </attribute>
10904
10905 <attribute name="revision" type="unsigned short" readonly="yes">
10906 <desc>
10907 Product revision number. This is a packed BCD represented as
10908 unsigned short. The high byte is the integer part and the low
10909 byte is the decimal.
10910 </desc>
10911 </attribute>
10912
10913 <attribute name="manufacturer" type="wstring" readonly="yes">
10914 <desc>Manufacturer string.</desc>
10915 </attribute>
10916
10917 <attribute name="product" type="wstring" readonly="yes">
10918 <desc>Product string.</desc>
10919 </attribute>
10920
10921 <attribute name="serialNumber" type="wstring" readonly="yes">
10922 <desc>Serial number string.</desc>
10923 </attribute>
10924
10925 <attribute name="address" type="wstring" readonly="yes">
10926 <desc>Host specific address of the device.</desc>
10927 </attribute>
10928
10929 <attribute name="port" type="unsigned short" readonly="yes">
10930 <desc>
10931 Host USB port number the device is physically
10932 connected to.
10933 </desc>
10934 </attribute>
10935
10936 <attribute name="version" type="unsigned short" readonly="yes">
10937 <desc>
10938 The major USB version of the device - 1 or 2.
10939 </desc>
10940 </attribute>
10941
10942 <attribute name="portVersion" type="unsigned short" readonly="yes">
10943 <desc>
10944 The major USB version of the host USB port the device is
10945 physically connected to - 1 or 2. For devices not connected to
10946 anything this will have the same value as the version attribute.
10947 </desc>
10948 </attribute>
10949
10950 <attribute name="remote" type="boolean" readonly="yes">
10951 <desc>
10952 Whether the device is physically connected to a remote VRDP
10953 client or to a local host machine.
10954 </desc>
10955 </attribute>
10956
10957 </interface>
10958
10959
10960 <!--
10961 // IUSBDeviceFilter
10962 /////////////////////////////////////////////////////////////////////////
10963 -->
10964
10965 <enumerator
10966 name="IUSBDeviceFilterEnumerator" type="IUSBDeviceFilter"
10967 uuid="d5109c61-93e7-4726-926b-0dee1020da56"
10968 />
10969
10970 <collection
10971 name="IUSBDeviceFilterCollection" type="IUSBDeviceFilter"
10972 enumerator="IUSBDeviceFilterEnumerator"
10973 uuid="4fa3fc99-ceb1-4bf5-a9cb-e962d825c1ef"
10974 readonly="yes"
10975 />
10976
10977 <interface
10978 name="IUSBDeviceFilter" extends="$unknown"
10979 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
10980 wsmap="managed"
10981 >
10982 <desc>
10983 The IUSBDeviceFilter interface represents an USB device filter used
10984 to perform actions on a group of USB devices.
10985
10986 This type of filters is used by running virtual machines to
10987 automatically capture selected USB devices once they are physically
10988 attached to the host computer.
10989
10990 A USB device is matched to the given device filter if and only if all
10991 attributes of the device match the corresponding attributes of the
10992 filter (that is, attributes are joined together using the logical AND
10993 operation). On the other hand, all together, filters in the list of
10994 filters carry the semantics of the logical OR operation. So if it is
10995 desirable to create a match like "this vendor id OR this product id",
10996 one needs to create two filters and specify "any match" (see below)
10997 for unused attributes.
10998
10999 All filter attributes used for matching are strings. Each string
11000 is an expression representing a set of values of the corresponding
11001 device attribute, that will match the given filter. Currently, the
11002 following filtering expressions are supported:
11003
11004 <ul>
11005 <li><i>Interval filters</i>. Used to specify valid intervals for
11006 integer device attributes (Vendor ID, Product ID and Revision).
11007 The format of the string is:
11008
11009 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11010
11011 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11012 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11013 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11014 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11015 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11016 possible integer is assumed.
11017 </li>
11018 <li><i>Boolean filters</i>. Used to specify acceptable values for
11019 boolean device attributes. The format of the string is:
11020
11021 <tt>true|false|yes|no|0|1</tt>
11022
11023 </li>
11024 <li><i>Exact match</i>. Used to specify a single value for the given
11025 device attribute. Any string that doesn't start with <tt>int:</tt>
11026 represents the exact match. String device attributes are compared to
11027 this string including case of symbols. Integer attributes are first
11028 converted to a string (see individual filter attributes) and then
11029 compared ignoring case.
11030
11031 </li>
11032 <li><i>Any match</i>. Any value of the corresponding device attribute
11033 will match the given filter. An empty or <tt>null</tt> string is
11034 used to construct this type of filtering expressions.
11035
11036 </li>
11037 </ul>
11038
11039 <note>
11040 On the Windows host platform, interval filters are not currently
11041 available. Also all string filter attributes
11042 (<link to="#manufacturer"/>, <link to="#product"/>,
11043 <link to="#serialNumber"/>) are ignored, so they behave as
11044 <i>any match</i> no matter what string expression is specified.
11045 </note>
11046
11047 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11048 </desc>
11049
11050 <attribute name="name" type="wstring">
11051 <desc>
11052 Visible name for this filter.
11053 This name is used to visually distinguish one filter from another,
11054 so it can neither be <tt>null</tt> nor an empty string.
11055 </desc>
11056 </attribute>
11057
11058 <attribute name="active" type="boolean">
11059 <desc>Whether this filter active or has been temporarily disabled.</desc>
11060 </attribute>
11061
11062 <attribute name="vendorId" type="wstring">
11063 <desc>
11064 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11065 The string representation for the <i>exact matching</i>
11066 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11067 (including leading zeroes).
11068 </desc>
11069 </attribute>
11070
11071 <attribute name="productId" type="wstring">
11072 <desc>
11073 <link to="IUSBDevice::productId">Product ID</link> filter.
11074 The string representation for the <i>exact matching</i>
11075 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11076 (including leading zeroes).
11077 </desc>
11078 </attribute>
11079
11080 <attribute name="revision" type="wstring">
11081 <desc>
11082 <link to="IUSBDevice::productId">Product revision number</link>
11083 filter. The string representation for the <i>exact matching</i>
11084 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11085 of the integer part of the revision, and <tt>F</tt> is the
11086 decimal digit of its fractional part (including leading and
11087 trailing zeros).
11088 Note that for interval filters, it's best to use the hexadecimal
11089 form, because the revision is stored as a 16 bit packed BCD value;
11090 so the expression <tt>int:0x0100-0x0199</tt> will match any
11091 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11092 </desc>
11093 </attribute>
11094
11095 <attribute name="manufacturer" type="wstring">
11096 <desc>
11097 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11098 </desc>
11099 </attribute>
11100
11101 <attribute name="product" type="wstring">
11102 <desc>
11103 <link to="IUSBDevice::product">Product</link> filter.
11104 </desc>
11105 </attribute>
11106
11107 <attribute name="serialNumber" type="wstring">
11108 <desc>
11109 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11110 </desc>
11111 </attribute>
11112
11113 <attribute name="port" type="wstring">
11114 <desc>
11115 <link to="IUSBDevice::port">Host USB port</link> filter.
11116 </desc>
11117 </attribute>
11118
11119 <attribute name="remote" type="wstring">
11120 <desc>
11121 <link to="IUSBDevice::remote">Remote state</link> filter.
11122 <note>
11123 This filter makes sense only for machine USB filters,
11124 i.e. it is ignored by IHostUSBDeviceFilter objects.
11125 </note>
11126 </desc>
11127 </attribute>
11128
11129 <attribute name="maskedInterfaces" type="unsigned long">
11130 <desc>
11131 This is an advanced option for hiding one or more USB interfaces
11132 from the guest. The value is a bit mask where the bits that are set
11133 means the corresponding USB interface should be hidden, masked off
11134 if you like.
11135 This feature only works on Linux hosts.
11136 </desc>
11137 </attribute>
11138
11139 </interface>
11140
11141
11142 <!--
11143 // IHostUSBDevice
11144 /////////////////////////////////////////////////////////////////////////
11145 -->
11146
11147 <enum
11148 name="USBDeviceState"
11149 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11150 >
11151 <desc>
11152 USB device state. This enumeration represents all possible states
11153 of the USB device physically attached to the host computer regarding
11154 its state on the host computer and availability to guest computers
11155 (all currently running virtual machines).
11156
11157 Once a supported USB device is attached to the host, global USB
11158 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11159 either ignore the device, or put it to USBDeviceState_Held state, or do
11160 nothing. Unless the device is ignored by global filters, filters of all
11161 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11162 activated that can put it to USBDeviceState_Captured state.
11163
11164 If the device was ignored by global filters, or didn't match
11165 any filters at all (including guest ones), it is handled by the host
11166 in a normal way. In this case, the device state is determined by
11167 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11168 or USBDeviceState_Available, depending on the current device usage.
11169
11170 Besides auto-capturing based on filters, the device can be manually
11171 captured by guests (<link to="IConsole::attachUSBDevice()"/>) if its
11172 state is USBDeviceState_Busy, USBDeviceState_Available or
11173 USBDeviceState_Held.
11174
11175 <note>
11176 Due to differences in USB stack implementations in Linux and Win32,
11177 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11178 only to the Linux version of the product. This also means that (<link
11179 to="IConsole::attachUSBDevice()"/>) can only succeed on Win32 if the
11180 device state is USBDeviceState_Held.
11181 </note>
11182
11183 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11184 </desc>
11185
11186 <const name="NotSupported" value="0">
11187 <desc>
11188 Not supported by the VirtualBox server, not available to guests.
11189 </desc>
11190 </const>
11191 <const name="Unavailable" value="1">
11192 <desc>
11193 Being used by the host computer exclusively,
11194 not available to guests.
11195 </desc>
11196 </const>
11197 <const name="Busy" value="2">
11198 <desc>
11199 Being used by the host computer, potentially available to guests.
11200 </desc>
11201 </const>
11202 <const name="Available" value="3">
11203 <desc>
11204 Not used by the host computer, available to guests (the host computer
11205 can also start using the device at any time).
11206 </desc>
11207 </const>
11208 <const name="Held" value="4">
11209 <desc>
11210 Held by the VirtualBox server (ignored by the host computer),
11211 available to guests.
11212 </desc>
11213 </const>
11214 <const name="Captured" value="5">
11215 <desc>
11216 Captured by one of the guest computers, not available
11217 to anybody else.
11218 </desc>
11219 </const>
11220 </enum>
11221
11222 <enumerator
11223 name="IHostUSBDeviceEnumerator" type="IHostUSBDevice"
11224 uuid="a0c55136-939f-4d20-b9d3-4d406f08bfa5"
11225 />
11226
11227 <collection
11228 name="IHostUSBDeviceCollection" type="IHostUSBDevice"
11229 enumerator="IHostUSBDeviceEnumerator"
11230 uuid="f9d3f96d-b027-4994-b589-70bb9ee0d364"
11231 readonly="yes"
11232 >
11233 <method name="findById">
11234 <desc>
11235 Searches this collection for a USB device with the given UUID.
11236 <note>
11237 The method returns an error if the given UUID does not
11238 correspond to any USB device in the collection.
11239 </note>
11240 <see>IHostUSBDevice::id</see>
11241 </desc>
11242 <param name="id" type="uuid" dir="in">
11243 <desc>UUID of the USB device to search for.</desc>
11244 </param>
11245 <param name="device" type="IHostUSBDevice" dir="return">
11246 <desc>Found USB device object.</desc>
11247 </param>
11248 </method>
11249
11250 <method name="findByAddress">
11251 <desc>
11252 Searches this collection for a USB device with the given
11253 host address.
11254 <note>
11255 The method returns an error if the given address does not
11256 correspond to any USB device in the collection.
11257 </note>
11258 <see>IHostUSBDevice::address</see>
11259 </desc>
11260 <param name="name" type="wstring" dir="in">
11261 <desc>
11262 Address of the USB device (as assigned by the host) to
11263 search for.
11264 </desc>
11265 </param>
11266 <param name="device" type="IHostUSBDevice" dir="return">
11267 <desc>Found USB device object.</desc>
11268 </param>
11269 </method>
11270
11271 </collection>
11272
11273 <interface
11274 name="IHostUSBDevice" extends="IUSBDevice"
11275 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11276 wsmap="managed"
11277 >
11278 <desc>
11279 The IHostUSBDevice interface represents a physical USB device attached
11280 to the host computer.
11281
11282 Besides properties inherited from IUSBDevice, this interface adds the
11283 <link to="#state"/> property that holds the current state of the USB
11284 device.
11285
11286 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11287 </desc>
11288
11289 <attribute name="state" type="USBDeviceState" readonly="yes">
11290 <desc>
11291 Current state of the device.
11292 </desc>
11293 </attribute>
11294
11295 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11296
11297 </interface>
11298
11299
11300 <!--
11301 // IHostUSBDeviceFilter
11302 /////////////////////////////////////////////////////////////////////////
11303 -->
11304
11305 <enum
11306 name="USBDeviceFilterAction"
11307 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11308 >
11309 <desc>
11310 Actions for host USB device filters.
11311 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11312 </desc>
11313
11314 <const name="Null" value="0">
11315 <desc>Null value (never used by the API).</desc>
11316 </const>
11317 <const name="Ignore" value="1">
11318 <desc>Ignore the matched USB device.</desc>
11319 </const>
11320 <const name="Hold" value="2">
11321 <desc>Hold the matched USB device.</desc>
11322 </const>
11323 </enum>
11324
11325 <enumerator
11326 name="IHostUSBDeviceFilterEnumerator" type="IHostUSBDeviceFilter"
11327 uuid="ff735211-903e-4642-9c37-189eb44579fe"
11328 />
11329
11330 <collection
11331 name="IHostUSBDeviceFilterCollection" type="IHostUSBDeviceFilter"
11332 enumerator="IHostUSBDeviceFilterEnumerator"
11333 uuid="1a80458b-87f1-4a74-995d-04e2330119e0"
11334 readonly="yes"
11335 />
11336
11337 <interface
11338 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11339 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11340 wsmap="managed"
11341 >
11342 <desc>
11343 The IHostUSBDeviceFilter interface represents a global filter for a
11344 physical USB device used by the host computer. Used indirectly in
11345 <link to="IHost::USBDeviceFilters"/>.
11346
11347 Using filters of this type, the host computer determines the initial
11348 state of the USB device after it is physically attached to the
11349 host's USB controller.
11350
11351 <note>
11352 The <link to="#remote"/> attribute is ignored by this type of
11353 filters, because it makes sense only for
11354 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11355 </note>
11356
11357 <see>IHost::USBDeviceFilters</see>
11358 </desc>
11359
11360 <attribute name="action" type="USBDeviceFilterAction">
11361 <desc>
11362 Action performed by the host when an attached USB device
11363 matches this filter.
11364 </desc>
11365 </attribute>
11366
11367 </interface>
11368
11369 <!--
11370 // IAudioAdapter
11371 /////////////////////////////////////////////////////////////////////////
11372 -->
11373
11374 <enum
11375 name="AudioDriverType"
11376 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11377 >
11378 <desc>
11379 Host audio driver type.
11380 </desc>
11381
11382 <const name="Null" value="0">
11383 <desc>Null value, also means "dummy audio driver".</desc>
11384 </const>
11385 <const name="WinMM" value="1"/>
11386 <const name="OSS" value="2"/>
11387 <const name="ALSA" value="3"/>
11388 <const name="DirectSound" value="4"/>
11389 <const name="CoreAudio" value="5"/>
11390 <const name="MMPM" value="6"/>
11391 <const name="Pulse" value="7"/>
11392 <const name="SolAudio" value="8"/>
11393 </enum>
11394
11395 <enum
11396 name="AudioControllerType"
11397 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11398 >
11399 <desc>
11400 Virtual audio controller type.
11401 </desc>
11402
11403 <const name="AC97" value="0"/>
11404 <const name="SB16" value="1"/>
11405 </enum>
11406
11407 <interface
11408 name="IAudioAdapter" extends="$unknown"
11409 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11410 wsmap="managed"
11411 >
11412 <desc>
11413 The IAudioAdapter interface represents the virtual audio adapter of
11414 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11415 </desc>
11416 <attribute name="enabled" type="boolean">
11417 <desc>
11418 Flag whether the audio adapter is present in the
11419 guest system. If disabled, the virtual guest hardware will
11420 not contain any audio adapter. Can only be changed when
11421 the VM is not running.
11422 </desc>
11423 </attribute>
11424 <attribute name="audioController" type="AudioControllerType">
11425 <desc>
11426 The audio hardware we emulate.
11427 </desc>
11428 </attribute>
11429 <attribute name="audioDriver" type="AudioDriverType">
11430 <desc>
11431 Audio driver the adapter is connected to. This setting
11432 can only be changed when the VM is not running.
11433 </desc>
11434 </attribute>
11435 </interface>
11436
11437 <!--
11438 // IVRDPServer
11439 /////////////////////////////////////////////////////////////////////////
11440 -->
11441
11442 <enum
11443 name="VRDPAuthType"
11444 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11445 >
11446 <desc>
11447 VRDP authentication type.
11448 </desc>
11449
11450 <const name="Null" value="0">
11451 <desc>Null value, also means "no authentication".</desc>
11452 </const>
11453 <const name="External" value="1"/>
11454 <const name="Guest" value="2"/>
11455 </enum>
11456
11457 <interface
11458 name="IVRDPServer" extends="$unknown"
11459 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11460 wsmap="managed"
11461 >
11462 <attribute name="enabled" type="boolean">
11463 <desc>VRDP server status.</desc>
11464 </attribute>
11465
11466 <attribute name="port" type="unsigned long">
11467 <desc>
11468 VRDP server port number.
11469 <note>
11470 Setting the value of this property to <tt>0</tt> will reset the port
11471 number to the default value which is
11472 currently <tt>3389</tt>. Reading this property will always return a
11473 real port number, even after it has been set to <tt>0</tt> (in which
11474 case the default port is returned).
11475 </note>
11476 </desc>
11477 </attribute>
11478
11479 <attribute name="netAddress" type="wstring">
11480 <desc>VRDP server address.</desc>
11481 </attribute>
11482
11483 <attribute name="authType" type="VRDPAuthType">
11484 <desc>VRDP authentication method.</desc>
11485 </attribute>
11486
11487 <attribute name="authTimeout" type="unsigned long">
11488 <desc>Timeout for guest authentication. Milliseconds.</desc>
11489 </attribute>
11490
11491 <attribute name="allowMultiConnection" type="boolean">
11492 <desc>
11493 Flag whether multiple simultaneous connections to the VM are permitted.
11494 Note that this will be replaced by a more powerful mechanism in the future.
11495 </desc>
11496 </attribute>
11497
11498 <attribute name="reuseSingleConnection" type="boolean">
11499 <desc>
11500 Flag whether the existing connection must be dropped and a new connection
11501 must be established by the VRDP server, when a new client connects in single
11502 connection mode.
11503 </desc>
11504 </attribute>
11505
11506 </interface>
11507
11508
11509 <!--
11510 // ISharedFolder
11511 /////////////////////////////////////////////////////////////////////////
11512 -->
11513
11514 <enumerator
11515 name="ISharedFolderEnumerator" type="ISharedFolder"
11516 uuid="1d420fd8-e7c1-4511-abf4-a504dc6d0cbf"
11517 />
11518
11519 <collection
11520 name="ISharedFolderCollection" type="ISharedFolder"
11521 enumerator="ISharedFolderEnumerator"
11522 uuid="9c7e2282-bb16-4fa7-9138-f383c5e02353"
11523 readonly="yes">
11524
11525 <method name="findByName">
11526 <desc>
11527 Searches this collection for a shared folder with the given logical
11528 name.
11529 <note>
11530 The method returns an error if the given name does not correspond to
11531 any shared folder in the collection.
11532 </note>
11533 </desc>
11534 <param name="name" type="wstring" dir="in">
11535 <desc>Logical name of the shared folder to search for</desc>
11536 </param>
11537 <param name="sharedFolder" type="ISharedFolder" dir="return">
11538 <desc>Found shared folder object</desc>
11539 </param>
11540 </method>
11541
11542 </collection>
11543
11544 <interface
11545 name="ISharedFolder" extends="$unknown"
11546 uuid="ef41869b-ef31-4b30-8e8f-95af35c0e378"
11547 wsmap="struct"
11548 >
11549 <desc>
11550 The ISharedFolder interface represents a folder in the host computer's
11551 file system accessible from the guest OS running inside a virtual
11552 machine using an associated logical name.
11553
11554 There are three types of shared folders:
11555 <ul>
11556 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11557 folders available to all virtual machines.</li>
11558 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11559 VM-specific shared folders available to the given virtual machine at
11560 startup.</li>
11561 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11562 VM-specific shared folders created in the session context (for
11563 example, when the virtual machine is running) and automatically
11564 discarded when the session is closed (the VM is powered off).</li>
11565 </ul>
11566
11567 Logical names of shared folders must be unique within the given scope
11568 (global, permanent or transient). However, they do not need to be unique
11569 across scopes. In this case, the definition of the shared folder in a
11570 more specific scope takes precedence over definitions in all other
11571 scopes. The order of precedence is (more specific to more general):
11572 <ol>
11573 <li>Transient definitions</li>
11574 <li>Permanent definitions</li>
11575 <li>Global definitions</li>
11576 </ol>
11577
11578 For example, if MyMachine has a shared folder named
11579 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11580 transient shared folder named <tt>C_DRIVE</tt> (that points
11581 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11582 of <tt>C_DRIVE</tt> in the guest OS so
11583 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11584 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11585 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11586 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11587 to <tt>C:\\</tt> if it still exists.
11588
11589 Note that permanent and transient shared folders of different machines
11590 are in different name spaces, so they don't overlap and don't need to
11591 have unique logical names.
11592
11593 <note>
11594 Global shared folders are not implemented in the current version of the
11595 product.
11596 </note>
11597 </desc>
11598
11599 <attribute name="name" type="wstring" readonly="yes">
11600 <desc>Logical name of the shared folder.</desc>
11601 </attribute>
11602
11603 <attribute name="hostPath" type="wstring" readonly="yes">
11604 <desc>Full path to the shared folder in the host file system.</desc>
11605 </attribute>
11606
11607 <attribute name="accessible" type="boolean" readonly="yes">
11608 <desc>
11609 Whether the folder defined by the host path is currently
11610 accessible or not.
11611 For example, the folder can be unaccessible if it is placed
11612 on the network share that is not available by the time
11613 this property is read.
11614 </desc>
11615 </attribute>
11616
11617 <attribute name="writable" type="boolean" readonly="yes">
11618 <desc>
11619 Whether the folder defined by the host path is writable or
11620 not.
11621 </desc>
11622 </attribute>
11623
11624 <attribute name="lastAccessError" type="wstring" readonly="yes">
11625 <desc>
11626 Text message that represents the result of the last accessibility
11627 check.
11628
11629 Accessibility checks are performed each time the <link to="#accessible"/>
11630 attribute is read. A @c null string is returned if the last
11631 accessibility check was successful. A non-null string indicates a
11632 failure and should normally describe a reason of the failure (for
11633 example, a file read error).
11634 </desc>
11635 </attribute>
11636
11637 </interface>
11638
11639 <!--
11640 // ISession
11641 /////////////////////////////////////////////////////////////////////////
11642 -->
11643
11644 <interface
11645 name="IInternalSessionControl" extends="$unknown"
11646 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11647 internal="yes"
11648 wsmap="suppress"
11649 >
11650 <method name="getPID">
11651 <desc>PID of the process that has created this Session object.
11652 </desc>
11653 <param name="pid" type="unsigned long" dir="return"/>
11654 </method>
11655
11656 <method name="getRemoteConsole">
11657 <desc>
11658 Returns the console object suitable for remote control.
11659
11660 <result name="VBOX_E_INVALID_VM_STATE">
11661 Session state prevents operation.
11662 </result>
11663 <result name="VBOX_E_INVALID_OBJECT_STATE">
11664 Session type prevents operation.
11665 </result>
11666
11667 </desc>
11668 <param name="console" type="IConsole" dir="return"/>
11669 </method>
11670
11671 <method name="assignMachine">
11672 <desc>
11673 Assigns the machine object associated with this direct-type
11674 session or informs the session that it will be a remote one
11675 (if @a machine == NULL).
11676
11677 <result name="VBOX_E_INVALID_VM_STATE">
11678 Session state prevents operation.
11679 </result>
11680 <result name="VBOX_E_INVALID_OBJECT_STATE">
11681 Session type prevents operation.
11682 </result>
11683
11684 </desc>
11685 <param name="machine" type="IMachine" dir="in"/>
11686 </method>
11687
11688 <method name="assignRemoteMachine">
11689 <desc>
11690 Assigns the machine and the (remote) console object associated with
11691 this remote-type session.
11692
11693 <result name="VBOX_E_INVALID_VM_STATE">
11694 Session state prevents operation.
11695 </result>
11696
11697 </desc>
11698 <param name="machine" type="IMachine" dir="in"/>
11699 <param name="console" type="IConsole" dir="in"/>
11700 </method>
11701
11702 <method name="updateMachineState">
11703 <desc>
11704 Updates the machine state in the VM process.
11705 Must be called only in certain cases
11706 (see the method implementation).
11707
11708 <result name="VBOX_E_INVALID_VM_STATE">
11709 Session state prevents operation.
11710 </result>
11711 <result name="VBOX_E_INVALID_OBJECT_STATE">
11712 Session type prevents operation.
11713 </result>
11714
11715 </desc>
11716 <param name="aMachineState" type="MachineState" dir="in"/>
11717 </method>
11718
11719 <method name="uninitialize">
11720 <desc>
11721 Uninitializes (closes) this session. Used by VirtualBox to close
11722 the corresponding remote session when the direct session dies
11723 or gets closed.
11724
11725 <result name="VBOX_E_INVALID_VM_STATE">
11726 Session state prevents operation.
11727 </result>
11728
11729 </desc>
11730 </method>
11731
11732 <method name="onDVDDriveChange">
11733 <desc>
11734 Triggered when settings of the DVD drive object of the
11735 associated virtual machine have changed.
11736
11737 <result name="VBOX_E_INVALID_VM_STATE">
11738 Session state prevents operation.
11739 </result>
11740 <result name="VBOX_E_INVALID_OBJECT_STATE">
11741 Session type prevents operation.
11742 </result>
11743
11744 </desc>
11745 </method>
11746
11747 <method name="onFloppyDriveChange">
11748 <desc>
11749 Triggered when settings of the floppy drive object of the
11750 associated virtual machine have changed.
11751
11752 <result name="VBOX_E_INVALID_VM_STATE">
11753 Session state prevents operation.
11754 </result>
11755 <result name="VBOX_E_INVALID_OBJECT_STATE">
11756 Session type prevents operation.
11757 </result>
11758
11759 </desc>
11760 </method>
11761
11762 <method name="onNetworkAdapterChange">
11763 <desc>
11764 Triggered when settings of a network adapter of the
11765 associated virtual machine have changed.
11766
11767 <result name="VBOX_E_INVALID_VM_STATE">
11768 Session state prevents operation.
11769 </result>
11770 <result name="VBOX_E_INVALID_OBJECT_STATE">
11771 Session type prevents operation.
11772 </result>
11773
11774 </desc>
11775 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11776 </method>
11777
11778 <method name="onSerialPortChange">
11779 <desc>
11780 Triggered when settings of a serial port of the
11781 associated virtual machine have changed.
11782
11783 <result name="VBOX_E_INVALID_VM_STATE">
11784 Session state prevents operation.
11785 </result>
11786 <result name="VBOX_E_INVALID_OBJECT_STATE">
11787 Session type prevents operation.
11788 </result>
11789
11790 </desc>
11791 <param name="serialPort" type="ISerialPort" dir="in"/>
11792 </method>
11793
11794 <method name="onParallelPortChange">
11795 <desc>
11796 Triggered when settings of a parallel port of the
11797 associated virtual machine have changed.
11798
11799 <result name="VBOX_E_INVALID_VM_STATE">
11800 Session state prevents operation.
11801 </result>
11802 <result name="VBOX_E_INVALID_OBJECT_STATE">
11803 Session type prevents operation.
11804 </result>
11805
11806 </desc>
11807 <param name="parallelPort" type="IParallelPort" dir="in"/>
11808 </method>
11809
11810 <method name="onVRDPServerChange">
11811 <desc>
11812 Triggered when settings of the VRDP server object of the
11813 associated virtual machine have changed.
11814
11815 <result name="VBOX_E_INVALID_VM_STATE">
11816 Session state prevents operation.
11817 </result>
11818 <result name="VBOX_E_INVALID_OBJECT_STATE">
11819 Session type prevents operation.
11820 </result>
11821
11822 </desc>
11823 </method>
11824
11825 <method name="onUSBControllerChange">
11826 <desc>
11827 Triggered when settings of the USB controller object of the
11828 associated virtual machine have changed.
11829
11830 <result name="VBOX_E_INVALID_VM_STATE">
11831 Session state prevents operation.
11832 </result>
11833 <result name="VBOX_E_INVALID_OBJECT_STATE">
11834 Session type prevents operation.
11835 </result>
11836
11837 </desc>
11838 </method>
11839
11840 <method name="onSharedFolderChange">
11841 <desc>
11842 Triggered when a permanent (global or machine) shared folder has been
11843 created or removed.
11844 <note>
11845 We don't pass shared folder parameters in this notification because
11846 the order in which parallel notifications are delivered is not defined,
11847 therefore it could happen that these parameters were outdated by the
11848 time of processing this notification.
11849 </note>
11850
11851 <result name="VBOX_E_INVALID_VM_STATE">
11852 Session state prevents operation.
11853 </result>
11854 <result name="VBOX_E_INVALID_OBJECT_STATE">
11855 Session type prevents operation.
11856 </result>
11857
11858 </desc>
11859 <param name="global" type="boolean" dir="in"/>
11860 </method>
11861
11862 <method name="onUSBDeviceAttach">
11863 <desc>
11864 Triggered when a request to capture a USB device (as a result
11865 of matched USB filters or direct call to
11866 <link to="IConsole::attachUSBDevice"/>) has completed.
11867 A @c null @a error object means success, otherwise it
11868 describes a failure.
11869
11870 <result name="VBOX_E_INVALID_VM_STATE">
11871 Session state prevents operation.
11872 </result>
11873 <result name="VBOX_E_INVALID_OBJECT_STATE">
11874 Session type prevents operation.
11875 </result>
11876
11877 </desc>
11878 <param name="device" type="IUSBDevice" dir="in"/>
11879 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11880 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
11881 </method>
11882
11883 <method name="onUSBDeviceDetach">
11884 <desc>
11885 Triggered when a request to release the USB device (as a result
11886 of machine termination or direct call to
11887 <link to="IConsole::detachUSBDevice"/>) has completed.
11888 A @c null @a error object means success, otherwise it
11889
11890 <result name="VBOX_E_INVALID_VM_STATE">
11891 Session state prevents operation.
11892 </result>
11893 <result name="VBOX_E_INVALID_OBJECT_STATE">
11894 Session type prevents operation.
11895 </result>
11896
11897 </desc>
11898 <param name="id" type="uuid" dir="in"/>
11899 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
11900 </method>
11901
11902 <method name="onShowWindow">
11903 <desc>
11904 Called by <link to="IMachine::canShowConsoleWindow()"/> and by
11905 <link to="IMachine::showConsoleWindow()"/> in order to notify
11906 console callbacks
11907 <link to="IConsoleCallback::onCanShowWindow()"/>
11908 and <link to="IConsoleCallback::onShowWindow()"/>.
11909
11910 <result name="VBOX_E_INVALID_OBJECT_STATE">
11911 Session type prevents operation.
11912 </result>
11913
11914 </desc>
11915 <param name="check" type="boolean" dir="in"/>
11916 <param name="canShow" type="boolean" dir="out"/>
11917 <param name="winId" type="unsigned long long" dir="out"/>
11918 </method>
11919
11920 <method name="accessGuestProperty">
11921 <desc>
11922 Called by <link to="IMachine::getGuestProperty()"/> and by
11923 <link to="IMachine::setGuestProperty()"/> in order to read and
11924 modify guest properties.
11925
11926 <result name="VBOX_E_INVALID_VM_STATE">
11927 Machine session is not open.
11928 </result>
11929 <result name="VBOX_E_INVALID_OBJECT_STATE">
11930 Session type is not direct.
11931 </result>
11932
11933 </desc>
11934 <param name="name" type="wstring" dir="in"/>
11935 <param name="value" type="wstring" dir="in"/>
11936 <param name="flags" type="wstring" dir="in"/>
11937 <param name="isSetter" type="boolean" dir="in"/>
11938 <param name="retValue" type="wstring" dir="out"/>
11939 <param name="retTimestamp" type="unsigned long long" dir="out"/>
11940 <param name="retFlags" type="wstring" dir="out"/>
11941 </method>
11942
11943 <method name="enumerateGuestProperties">
11944 <desc>
11945 Return a list of the guest properties matching a set of patterns along
11946 with their values, time stamps and flags.
11947
11948 <result name="VBOX_E_INVALID_VM_STATE">
11949 Machine session is not open.
11950 </result>
11951 <result name="VBOX_E_INVALID_OBJECT_STATE">
11952 Session type is not direct.
11953 </result>
11954
11955 </desc>
11956 <param name="patterns" type="wstring" dir="in">
11957 <desc>
11958 The patterns to match the properties against as a comma-separated
11959 string. If this is empty, all properties currently set will be
11960 returned.
11961 </desc>
11962 </param>
11963 <param name="key" type="wstring" dir="out" safearray="yes">
11964 <desc>
11965 The key names of the properties returned.
11966 </desc>
11967 </param>
11968 <param name="value" type="wstring" dir="out" safearray="yes">
11969 <desc>
11970 The values of the properties returned. The array entries match the
11971 corresponding entries in the @a key array.
11972 </desc>
11973 </param>
11974 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
11975 <desc>
11976 The time stamps of the properties returned. The array entries match
11977 the corresponding entries in the @a key array.
11978 </desc>
11979 </param>
11980 <param name="flags" type="wstring" dir="out" safearray="yes">
11981 <desc>
11982 The flags of the properties returned. The array entries match the
11983 corresponding entries in the @a key array.
11984 </desc>
11985 </param>
11986 </method>
11987
11988 </interface>
11989
11990 <interface
11991 name="ISession" extends="$dispatched"
11992 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
11993 wsmap="managed"
11994 >
11995 <desc>
11996 The ISession interface represents a serialization primitive for virtual
11997 machines.
11998
11999 With VirtualBox, every time one wishes to manipulate a virtual machine
12000 (e.g. change its settings or start execution), a session object is
12001 required. Such an object must be passed to one of the session methods
12002 that open the given session, which then initiates the machine manipulation.
12003
12004 A session serves several purposes: it identifies to the inter-process VirtualBox
12005 code which process is currently working with the virtual machine, and it ensures
12006 that there are no incompatible requests from several processes for the
12007 same virtual machine. Session objects can therefore be thought of as mutex
12008 semaphores that lock virtual machines to prevent conflicting accesses from
12009 several processes.
12010
12011 How sessions objects are used depends on whether you use the Main API
12012 via COM or via the webservice:
12013
12014 <ul>
12015 <li>When using the COM API directly, an object of the Session class from the
12016 VirtualBox type library needs to be created. In regular COM C++ client code,
12017 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12018 This object will then act as a local session object in further calls to open
12019 a session.
12020 </li>
12021
12022 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12023 one session object automatically when <link to="IWebsessionManager::logon" />
12024 is called. A managed object reference to that session object can be retrieved by
12025 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12026 reference can then be used to open sessions.
12027 </li>
12028 </ul>
12029
12030 Sessions are mainly used in two variations:
12031
12032 <ul>
12033 <li>
12034 To start a virtual machine in a separate process, one would call
12035 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12036 object as its first parameter. This session then identifies the caller
12037 and lets him control the started machine (for example, pause machine
12038 execution or power it down) as well as be notified about machine
12039 execution state changes.
12040 </li>
12041
12042 <li>To alter machine settings, or to start machine execution within the
12043 current process, one needs to open a direct session for the machine first by
12044 calling <link to="IVirtualBox::openSession"/>. While a direct session
12045 is open within one process, no any other process may open another direct
12046 session for the same machine. This prevents the machine from being changed
12047 by other processes while it is running or while the machine is being configured.
12048 </li>
12049 </ul>
12050
12051 One also can attach to an existing direct session already opened by
12052 another process (for example, in order to send a control request to the
12053 virtual machine such as the pause or the reset request). This is done by
12054 calling <link to="IVirtualBox::openExistingSession"/>.
12055
12056 <note>
12057 Unless you are trying to write a new VirtualBox front-end that
12058 performs direct machine execution (like the VirtualBox or VBoxSDL
12059 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12060 session opened by <link to="IVirtualBox::openSession"/> and use this
12061 session only to change virtual machine settings. If you simply want to
12062 start virtual machine execution using one of the existing front-ends
12063 (for example the VirtualBox GUI or headless server), simply use
12064 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12065 will power up the machine automatically for you.
12066 </note>
12067 </desc>
12068
12069 <attribute name="state" type="SessionState" readonly="yes">
12070 <desc>Current state of this session.</desc>
12071 </attribute>
12072
12073 <attribute name="type" type="SessionType" readonly="yes">
12074 <desc>
12075 Type of this session. The value of this attribute is valid only
12076 if the session is currently open (i.e. its #state is
12077 SessionType_SessionOpen), otherwise an error will be returned.
12078 </desc>
12079 </attribute>
12080
12081 <attribute name="machine" type="IMachine" readonly="yes">
12082 <desc>Machine object associated with this session.</desc>
12083 </attribute>
12084
12085 <attribute name="console" type="IConsole" readonly="yes">
12086 <desc>Console object associated with this session.</desc>
12087 </attribute>
12088
12089 <method name="close">
12090 <desc>
12091 Closes a session that was previously opened.
12092
12093 It is recommended that every time an "open session" method (such as
12094 <link to="IVirtualBox::openRemoteSession" /> or
12095 <link to="IVirtualBox::openSession" />) has been called to
12096 manipulate a virtual machine, the caller invoke
12097 ISession::close() when it's done doing so. Since sessions are
12098 serialization primitives much like ordinary mutexes, they are
12099 best used the same way: for each "open" call, there should be
12100 a matching "close" call, even when errors occur.
12101
12102 Otherwise, if a direct session for a machine opened with
12103 <link to="IVirtualBox::openSession()"/> is not explicitly closed
12104 when the application terminates, the state of the machine will
12105 be set to <link to="MachineState_Aborted" /> on the server.
12106
12107 Generally, it is recommended to close all open sessions explicitly
12108 before terminating the application (regardless of the reason for
12109 the termination).
12110
12111 <note>
12112 Do not expect the session state (<link to="ISession::state" />
12113 to return to "Closed" immediately after you invoke
12114 ISession::close(), particularly if you have started a remote
12115 session to execute the VM in a new process. The session state will
12116 automatically return to "Closed" once the VM is no longer executing,
12117 which can of course take a very long time.
12118 </note>
12119
12120 <result name="E_UNEXPECTED">
12121 Session is not open.
12122 </result>
12123
12124 </desc>
12125 </method>
12126
12127 </interface>
12128
12129 <!--
12130 // ISATAController
12131 /////////////////////////////////////////////////////////////////////////
12132 -->
12133
12134 <interface
12135 name="ISATAController" extends="$unknown"
12136 uuid="9a4b868b-1376-4533-8ef5-065b8e8cedff"
12137 wsmap="managed"
12138 >
12139 <attribute name="enabled" type="boolean">
12140 <desc>
12141 Flag whether the SATA controller is present in the
12142 guest system. If disabled, the virtual guest hardware will
12143 not contain any SATA controller. Can only be changed when
12144 the VM is powered off.
12145 </desc>
12146 </attribute>
12147
12148 <attribute name="portCount" type="unsigned long">
12149 <desc>
12150 The number of usable ports on the SATA controller.
12151 It ranges from 1 to 30.
12152 </desc>
12153 </attribute>
12154
12155 <method name="GetIDEEmulationPort">
12156 <desc>
12157 Gets the corresponding port number which is emulated as an IDE device.
12158
12159 <result name="E_INVALIDARG">
12160 The @a devicePosition is not in the range 0 to 3.
12161 </result>
12162
12163 </desc>
12164 <param name="devicePosition" type="long" dir="in"/>
12165 <param name="portNumber" type="long" dir="return"/>
12166 </method>
12167
12168 <method name="SetIDEEmulationPort">
12169 <desc>
12170 Sets the port number which is emulated as an IDE device.
12171
12172 <result name="E_INVALIDARG">
12173 The @a devicePosition is not in the range 0 to 3 or the
12174 @a portNumber is not in the range 0 to 29.
12175 </result>
12176
12177 </desc>
12178 <param name="devicePosition" type="long" dir="in"/>
12179 <param name="portNumber" type="long" dir="in"/>
12180 </method>
12181
12182 </interface>
12183
12184<if target="wsdl">
12185
12186 <!--
12187 // IManagedObjectRef
12188 /////////////////////////////////////////////////////////////////////////
12189 -->
12190
12191 <interface
12192 name="IManagedObjectRef" extends="$unknown"
12193 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12194 internal="yes"
12195 wsmap="managed"
12196 wscpp="hardcoded"
12197 >
12198 <desc>
12199 Managed object reference.
12200
12201 Only within the webservice, a managed object reference (which is really
12202 an opaque number) allows a webservice client to address an object
12203 that lives in the address space of the webservice server.
12204
12205 Behind each managed object reference, there is a COM object that lives
12206 in the webservice server's address space. The COM object is not freed
12207 until the managed object reference is released, either by an explicit
12208 call to <link to="IManagedObjectRef::release" /> or by logging off from
12209 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12210 all objects created during the webservice session.
12211
12212 Whenever a method call of the VirtualBox API returns a COM object, the
12213 webservice representation of that method will instead return a
12214 managed object reference, which can then be used to invoke methods
12215 on that object.
12216 </desc>
12217
12218 <method name="getInterfaceName">
12219 <desc>
12220 Returns the name of the interface that this managed object represents,
12221 for example, "IMachine", as a string.
12222 </desc>
12223 <param name="return" type="wstring" dir="return"/>
12224 </method>
12225
12226 <method name="release">
12227 <desc>
12228 Releases this managed object reference and frees the resources that
12229 were allocated for it in the webservice server process. After calling
12230 this method, the identifier of the reference can no longer be used.
12231 </desc>
12232 </method>
12233
12234 </interface>
12235
12236 <!--
12237 // IWebsessionManager
12238 /////////////////////////////////////////////////////////////////////////
12239 -->
12240
12241 <interface
12242 name="IWebsessionManager" extends="$unknown"
12243 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12244 internal="yes"
12245 wsmap="global"
12246 wscpp="hardcoded"
12247 >
12248 <desc>
12249 Websession manager. This provides essential services
12250 to webservice clients.
12251 </desc>
12252 <method name="logon">
12253 <desc>
12254 Logs a new client onto the webservice and returns a managed object reference to
12255 the IVirtualBox instance, which the client can then use as a basis to further
12256 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12257 interface, in one way or the other.
12258 </desc>
12259 <param name="username" type="wstring" dir="in"/>
12260 <param name="password" type="wstring" dir="in"/>
12261 <param name="return" type="IVirtualBox" dir="return"/>
12262 </method>
12263
12264 <method name="getSessionObject">
12265 <desc>
12266 Returns a managed object reference to the internal ISession object that was created
12267 for this web service session when the client logged on.
12268
12269 <see>ISession</see>
12270 </desc>
12271 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12272 <param name="return" type="ISession" dir="return"/>
12273 </method>
12274
12275 <method name="logoff">
12276 <desc>
12277 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12278 and destroys all resources associated with the session (most importantly, all
12279 managed objects created in the server while the session was active).
12280 </desc>
12281 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12282 </method>
12283
12284 </interface>
12285
12286</if>
12287
12288 <!--
12289 // IPerformanceCollector & friends
12290 /////////////////////////////////////////////////////////////////////////
12291 -->
12292
12293 <interface
12294 name="IPerformanceMetric" extends="$unknown"
12295 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12296 >
12297 <desc>
12298 The IPerformanceMetric interface represents parameters of the given
12299 performance metric.
12300 </desc>
12301
12302 <attribute name="metricName" type="wstring" readonly="yes">
12303 <desc>
12304 Name of the metric.
12305 </desc>
12306 </attribute>
12307
12308 <attribute name="object" type="$unknown" readonly="yes">
12309 <desc>
12310 Object this metric belongs to.
12311 </desc>
12312 </attribute>
12313
12314 <attribute name="description" type="wstring" readonly="yes">
12315 <desc>
12316 Textual description of the metric.
12317 </desc>
12318 </attribute>
12319
12320 <attribute name="period" type="unsigned long" readonly="yes">
12321 <desc>
12322 Time interval between samples, measured in seconds.
12323 </desc>
12324 </attribute>
12325
12326 <attribute name="count" type="unsigned long" readonly="yes">
12327 <desc>
12328 Number of recent samples retained by the performance collector for this
12329 metric.
12330
12331 When the collected sample count exceeds this number, older samples
12332 are discarded.
12333 </desc>
12334 </attribute>
12335
12336 <attribute name="unit" type="wstring" readonly="yes">
12337 <desc>
12338 Unit of measurement.
12339 </desc>
12340 </attribute>
12341
12342 <attribute name="minimumValue" type="long" readonly="yes">
12343 <desc>
12344 Minimum possible value of this metric.
12345 </desc>
12346 </attribute>
12347
12348 <attribute name="maximumValue" type="long" readonly="yes">
12349 <desc>
12350 Maximum possible value of this metric.
12351 </desc>
12352 </attribute>
12353 </interface>
12354
12355 <interface
12356 name="IPerformanceCollector" extends="$unknown"
12357 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12358 wsmap="managed"
12359 >
12360 <desc>
12361 The IPerformanceCollector interface represents a service that collects and
12362 stores performance metrics data.
12363
12364 Performance metrics are associated with objects like IHost and
12365 IMachine. Each object has a distinct set of performance metrics.
12366 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12367
12368 Metric data are collected at the specified intervals and are retained
12369 internally. The interval and the number of samples retained can be set
12370 with <link to="IPerformanceCollector::setupMetrics" />.
12371
12372 Metrics are organized hierarchically, each level separated by slash (/).
12373 General scheme for metric name is
12374 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12375 metric name stands for: CPU category, Load metric, User submetric, average
12376 aggregate. An aggregate function is computed over all retained data. Valid
12377 aggregate functions are:
12378
12379 <ul>
12380 <li>avg -- average</li>
12381 <li>min -- minimum</li>
12382 <li>max -- maximum</li>
12383 </ul>
12384
12385 "Category/Metric" together form base metric name. A base metric is the
12386 smallest unit for which a sampling interval and the number of retained
12387 samples can be set. Only base metrics can be enabled and disabled. All
12388 sub-metrics are collected when their base metric is collected.
12389 Collected values for any set of sub-metrics can be queried with
12390 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12391 metric parameters, querying metric data, enabling or disabling metrics
12392 wildcards can be used in metric names to specify a subset of metrics. For
12393 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12394 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12395 values without aggregates <tt>*:</tt> can be used.
12396
12397 The valid names for base metrics are:
12398
12399 <ul>
12400 <li>CPU/Load</li>
12401 <li>CPU/MHz</li>
12402 <li>RAM/Usage</li>
12403 </ul>
12404
12405 The general sequence for collecting and retrieving the metrics is:
12406 <ul>
12407 <li>
12408 Obtain an instance of IPerformanceCollector with
12409 <link to="IVirtualBox::performanceCollector" />
12410 </li>
12411 <li>
12412 Allocate and populate an array with references to objects the metrics
12413 will be collected for. Use references to IHost and IMachine objects.
12414 </li>
12415 <li>
12416 Allocate and populate an array with base metric names the data will be
12417 collected for.
12418 </li>
12419 <li>
12420 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12421 metric data will be collected and stored.
12422 </li>
12423 <li>
12424 Wait for the data to get collected.
12425 </li>
12426 <li>
12427 Allocate and populate an array with references to objects the metric
12428 values will be queried for. You can re-use the object array used for
12429 setting base metrics.
12430 </li>
12431 <li>
12432 Allocate and populate an array with metric names the data will be
12433 collected for. Note that metric names differ from base metric names.
12434 </li>
12435 <li>
12436 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12437 have been collected so far are returned. Note that the values are still
12438 retained internally and data collection continues.
12439 </li>
12440 </ul>
12441
12442 For an example of usage refer to the following files in VirtualBox SDK:
12443 <ul>
12444 <li>
12445 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12446 </li>
12447 <li>
12448 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12449 </li>
12450 </ul>
12451 </desc>
12452
12453 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12454 <desc>
12455 Array of unique names of metrics.
12456
12457 This array represents all metrics supported by the performance
12458 collector. Individual objects do not necessarily support all of them.
12459 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12460 list of supported metrics for a particular object.
12461 </desc>
12462 </attribute>
12463
12464 <method name="getMetrics">
12465 <desc>
12466 Returns parameters of specified metrics for a set of objects.
12467 <note>
12468 @c Null metrics array means all metrics. @c Null object array means
12469 all existing objects.
12470 </note>
12471 </desc>
12472 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12473 <desc>
12474 Metric name filter. Currently, only a comma-separated list of metrics
12475 is supported.
12476 </desc>
12477 </param>
12478 <param name="objects" type="$unknown" dir="in" safearray="yes">
12479 <desc>
12480 Set of objects to return metric parameters for.
12481 </desc>
12482 </param>
12483 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12484 <desc>
12485 Array of returned metric parameters.
12486 </desc>
12487 </param>
12488 </method>
12489
12490 <method name="setupMetrics">
12491 <desc>
12492 Sets parameters of specified base metrics for a set of objects. Returns
12493 an array of <link to="IPerformanceMetric" /> describing the metrics have
12494 been affected.
12495 <note>
12496 @c Null or empty metric name array means all metrics. @c Null or empty
12497 object array means all existing objects. If metric name array contains
12498 a single element and object array contains many, the single metric
12499 name array element is applied to each object array element to form
12500 metric/object pairs.
12501 </note>
12502 </desc>
12503 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12504 <desc>
12505 Metric name filter. Comma-separated list of metrics with wildcard
12506 support.
12507 </desc>
12508 </param>
12509 <param name="objects" type="$unknown" dir="in" safearray="yes">
12510 <desc>
12511 Set of objects to setup metric parameters for.
12512 </desc>
12513 </param>
12514 <param name="period" type="unsigned long" dir="in">
12515 <desc>
12516 Time interval in seconds between two consecutive samples of performance
12517 data.
12518 </desc>
12519 </param>
12520 <param name="count" type="unsigned long" dir="in">
12521 <desc>
12522 Number of samples to retain in performance data history. Older samples
12523 get discarded.
12524 </desc>
12525 </param>
12526 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12527 <desc>
12528 Array of metrics that have been modified by the call to this method.
12529 </desc>
12530 </param>
12531 </method>
12532
12533 <method name="enableMetrics">
12534 <desc>
12535 Turns on collecting specified base metrics. Returns an array of
12536 <link to="IPerformanceMetric" /> describing the metrics have been
12537 affected.
12538 <note>
12539 @c Null or empty metric name array means all metrics. @c Null or empty
12540 object array means all existing objects. If metric name array contains
12541 a single element and object array contains many, the single metric
12542 name array element is applied to each object array element to form
12543 metric/object pairs.
12544 </note>
12545 </desc>
12546 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12547 <desc>
12548 Metric name filter. Comma-separated list of metrics with wildcard
12549 support.
12550 </desc>
12551 </param>
12552 <param name="objects" type="$unknown" dir="in" safearray="yes">
12553 <desc>
12554 Set of objects to enable metrics for.
12555 </desc>
12556 </param>
12557 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12558 <desc>
12559 Array of metrics that have been modified by the call to this method.
12560 </desc>
12561 </param>
12562 </method>
12563
12564 <method name="disableMetrics">
12565 <desc>
12566 Turns off collecting specified base metrics. Returns an array of
12567 <link to="IPerformanceMetric" /> describing the metrics have been
12568 affected.
12569 <note>
12570 @c Null or empty metric name array means all metrics. @c Null or empty
12571 object array means all existing objects. If metric name array contains
12572 a single element and object array contains many, the single metric
12573 name array element is applied to each object array element to form
12574 metric/object pairs.
12575 </note>
12576 </desc>
12577 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12578 <desc>
12579 Metric name filter. Comma-separated list of metrics with wildcard
12580 support.
12581 </desc>
12582 </param>
12583 <param name="objects" type="$unknown" dir="in" safearray="yes">
12584 <desc>
12585 Set of objects to disable metrics for.
12586 </desc>
12587 </param>
12588 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12589 <desc>
12590 Array of metrics that have been modified by the call to this method.
12591 </desc>
12592 </param>
12593 </method>
12594
12595 <method name="queryMetricsData">
12596 <desc>
12597 Queries collected metrics data for a set of objects.
12598
12599 The data itself and related metric information are returned in seven
12600 parallel and one flattened array of arrays. Elements of
12601 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12602 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12603 the same index describe one set of values corresponding to a single
12604 metric.
12605
12606 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12607 start and length of a sub-array is indicated by
12608 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12609 value for metric <tt>metricNames[i]</tt> is at
12610 <tt>returnData[returnIndices[i]]</tt>.
12611
12612 <note>
12613 @c Null or empty metric name array means all metrics. @c Null or empty
12614 object array means all existing objects. If metric name array contains
12615 a single element and object array contains many, the single metric
12616 name array element is applied to each object array element to form
12617 metric/object pairs.
12618 </note>
12619 <note>
12620 Data collection continues behind the scenes after call to @c
12621 queryMetricsData. The return data can be seen as the snapshot of
12622 the current state at the time of @c queryMetricsData call. The
12623 internally kept metric values are not cleared by the call. This makes
12624 possible querying different subsets of metrics or aggregates with
12625 subsequent calls. If periodic querying is needed it is highly
12626 suggested to query the values with @c interval*count period to avoid
12627 confusion. This way a completely new set of data values will be
12628 provided by each query.
12629 </note>
12630 </desc>
12631 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12632 <desc>
12633 Metric name filter. Comma-separated list of metrics with wildcard
12634 support.
12635 </desc>
12636 </param>
12637 <param name="objects" type="$unknown" dir="in" safearray="yes">
12638 <desc>
12639 Set of objects to query metrics for.
12640 </desc>
12641 </param>
12642 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12643 <desc>
12644 Names of metrics returned in @c returnData.
12645 </desc>
12646 </param>
12647 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12648 <desc>
12649 Objects associated with metrics returned in @c returnData.
12650 </desc>
12651 </param>
12652 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12653 <desc>
12654 Units of measurement for each returned metric.
12655 </desc>
12656 </param>
12657 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12658 <desc>
12659 Divisor that should be applied to return values in order to get
12660 floating point values. For example:
12661 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12662 will retrieve the floating point value of i-th sample of the first
12663 metric.
12664 </desc>
12665 </param>
12666 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12667 <desc>
12668 Sequence numbers of the first elements of value sequences of particular metrics
12669 returned in @c returnData. For aggregate metrics it is the sequence number of
12670 the sample the aggregate started calculation from.
12671 </desc>
12672 </param>
12673 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12674 <desc>
12675 Indices of the first elements of value sequences of particular metrics
12676 returned in @c returnData.
12677 </desc>
12678 </param>
12679 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12680 <desc>
12681 Lengths of value sequences of particular metrics.
12682 </desc>
12683 </param>
12684 <param name="returnData" type="long" dir="return" safearray="yes">
12685 <desc>
12686 Flattened array of all metric data containing sequences of values for
12687 each metric.
12688 </desc>
12689 </param>
12690 </method>
12691
12692 </interface>
12693
12694 <module name="VBoxSVC" context="LocalServer">
12695 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
12696 namespace="virtualbox.org">
12697 <interface name="IVirtualBox" default="yes"/>
12698 </class>
12699 </module>
12700
12701 <module name="VBoxC" context="InprocServer" threadingModel="Free">
12702 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
12703 namespace="virtualbox.org">
12704 <interface name="ISession" default="yes"/>
12705 </class>
12706 </module>
12707
12708</library>
12709
12710</idl>
12711
12712<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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