VirtualBox

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

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

Main: fix SDK breakage, always use dir=return instead of dir=out when only one output param is present

  • Property svn:eol-style set to native
File size: 489.7 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-2009 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="AccessMode"
363 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
364 >
365 <desc>
366 Access mode for opening files.
367 </desc>
368
369 <const name="ReadOnly" value="1"/>
370 <const name="ReadWrite" value="2"/>
371 </enum>
372
373 <enum
374 name="MachineState"
375 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
376 >
377 <desc>
378 Virtual machine execution state.
379
380 This enumeration represents possible values of the <link
381 to="IMachine::state"/> attribute.
382
383 Below is the basic virtual machine state diagram. It shows how the state
384 changes during virtual machine execution. The text in square braces shows
385 a method of the IConsole interface that performs the given state
386 transition.
387
388 <pre>
389 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
390 V |
391 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
392 | | | | V |
393 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
394 | | ^ | ^ |
395 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
396 | ^ | | | |
397 | | +-----------------------------------------+-|-------------------+ +
398 | | | | |
399 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
400 | | | |
401 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
402 | | |
403 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
404 </pre>
405
406 Note that states to the right from PoweredOff, Aborted and Saved in the
407 above diagram are called <i>online VM states</i>. These states
408 represent the virtual machine which is being executed in a dedicated
409 process (usually with a GUI window attached to it where you can see the
410 activity of the virtual machine and interact with it). There are two
411 special pseudo-states, FirstOnline and LastOnline, that can be used in
412 relational expressions to detect if the given machine state is online or
413 not:
414
415 <pre>
416 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
417 machine.GetState() &lt;= MachineState_LastOnline)
418 {
419 ...the machine is being executed...
420 }
421 </pre>
422
423 When the virtual machine is in one of the online VM states (that is, being
424 executed), only a few machine settings can be modified. Methods working
425 with such settings contain an explicit note about that. An attempt to
426 change any oter setting or perform a modifying operation during this time
427 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
428
429 All online states except Running, Paused and Stuck are transitional: they
430 represent temporary conditions of the virtual machine that will last as
431 long as the operation that initiated such a condition.
432
433 The Stuck state is a special case. It means that execution of the machine
434 has reached the "Guru Meditation" condition. This condition indicates an
435 internal VMM (virtual machine manager) failure which may happen as a
436 result of either an unhandled low-level virtual hardware exception or one
437 of the recompiler exceptions (such as the <i>too-many-traps</i>
438 condition).
439
440 Note also that any online VM state may transit to the Aborted state. This
441 happens if the process that is executing the virtual machine terminates
442 unexpectedly (for example, crashes). Other than that, the Aborted state is
443 equivalent to PoweredOff.
444
445 There are also a few additional state diagrams that do not deal with
446 virtual machine execution and therefore are shown separately. The states
447 shown on these diagrams are called <i>offline VM states</i> (this includes
448 PoweredOff, Aborted and Saved too).
449
450 The first diagram shows what happens when a lengthy setup operation is
451 being executed (such as <link to="IMachine::attachHardDisk"/>).
452
453 <pre>
454 +-----------------------------------(same sate as before the call)------+
455 | |
456 +-&gt; PoweredOff --+ |
457 | | |
458 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
459 | |
460 +-&gt; Saved -------+
461 </pre>
462
463 The next two diagrams demonstrate the process of taking a snapshot of a
464 powered off virtual machine and performing one of the "discard..."
465 operations, respectively.
466
467 <pre>
468 +-----------------------------------(same sate as before the call)------+
469 | |
470 +-&gt; PoweredOff --+ |
471 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
472 +-&gt; Aborted -----+
473
474 +-&gt; PoweredOff --+
475 | |
476 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
477 | | [discardCurrentState()] |
478 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
479 | |
480 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
481 </pre>
482
483 Note that the Saving state is present in both the offline state group and
484 online state group. Currently, the only way to determine what group is
485 assumed in a particular case is to remember the previous machine state: if
486 it was Running or Paused, then Saving is an online state, otherwise it is
487 an offline state. This inconsistency may be removed in one of the future
488 versions of VirtualBox by adding a new state.
489
490 <note internal="yes">
491 For whoever decides to touch this enum: In order to keep the
492 comparisons involving FirstOnline and LastOnline pseudo-states valid,
493 the numeric values of these states must be correspondingly updated if
494 needed: for any online VM state, the condition
495 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
496 <tt>true</tt>. The same relates to transient states for which
497 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
498 <tt>true</tt>.
499 </note>
500 </desc>
501
502 <const name="Null" value="0">
503 <desc>Null value (nver used by the API).</desc>
504 </const>
505 <const name="PoweredOff" value="1">
506 <desc>
507 The machine is not running.
508 </desc>
509 </const>
510 <const name="Saved" value="2">
511 <desc>
512 The machine is not currently running, but the execution state of the machine
513 has been saved to an external file when it was running.
514 </desc>
515 </const>
516 <const name="Aborted" value="3">
517 <desc>
518 The process running the machine has terminated abnormally.
519 </desc>
520 </const>
521 <const name="Running" value="4">
522 <desc>
523 The machine is currently being executed.
524 <note internal="yes">
525 For whoever decides to touch this enum: In order to keep the
526 comparisons in the old source code valid, this state must immediately
527 precede the Paused state.
528 </note>
529 </desc>
530 </const>
531 <const name="Paused" value="5">
532 <desc>
533 Execution of the machine has been paused.
534 <note internal="yes">
535 For whoever decides to touch this enum: In order to keep the
536 comparisons in the old source code valid, this state must immediately
537 follow the Running state.
538 </note>
539 </desc>
540 </const>
541 <const name="Stuck" value="6">
542 <desc>
543 Execution of the machine has reached the "Guru Meditation"
544 condition.
545 </desc>
546 </const>
547 <const name="Starting" value="7">
548 <desc>
549 Machine is being started after powering it on from a
550 zero execution state.
551 </desc>
552 </const>
553 <const name="Stopping" value="8">
554 <desc>
555 Machine is being normally stopped powering it off, or after the guest OS
556 has initiated a shutdown sequence.
557 </desc>
558 </const>
559 <const name="Saving" value="9">
560 <desc>
561 Machine is saving its execution state to a file or an online
562 snapshot of the machine is being taken.
563 </desc>
564 </const>
565 <const name="Restoring" value="10">
566 <desc>
567 Execution state of the machine is being restored from a file
568 after powering it on from the saved execution state.
569 </desc>
570 </const>
571 <const name="Discarding" value="11">
572 <desc>
573 Snapshot of the machine is being discarded.
574 </desc>
575 </const>
576 <const name="SettingUp" value="12">
577 <desc>
578 Lengthy setup operation is in progress.
579 </desc>
580 </const>
581
582 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
583 <desc>
584 Pseudo-state: first online state (for use in relational expressions).
585 </desc>
586 </const>
587 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
588 <desc>
589 Pseudo-state: last online state (for use in relational expressions).
590 </desc>
591 </const>
592
593 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
594 <desc>
595 Pseudo-state: first transient state (for use in relational expressions).
596 </desc>
597 </const>
598 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
599 <desc>
600 Pseudo-state: last transient state (for use in relational expressions).
601 </desc>
602 </const>
603
604 </enum>
605
606 <enum
607 name="SessionState"
608 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
609 >
610 <desc>
611 Session state. This enumeration represents possible values of
612 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
613 attributes. See individual enumerator descriptions for the meaning for
614 every value.
615 </desc>
616
617 <const name="Null" value="0">
618 <desc>Null value (never used by the API).</desc>
619 </const>
620 <const name="Closed" value="1">
621 <desc>
622 The machine has no open sessions (<link to="IMachine::sessionState"/>);
623 the session is closed (<link to="ISession::state"/>)
624 </desc>
625 </const>
626 <const name="Open" value="2">
627 <desc>
628 The machine has an open direct session (<link to="IMachine::sessionState"/>);
629 the session is open (<link to="ISession::state"/>)
630 </desc>
631 </const>
632 <const name="Spawning" value="3">
633 <desc>
634 A new (direct) session is being opened for the machine
635 as a result of <link to="IVirtualBox::openRemoteSession"/>
636 call (<link to="IMachine::sessionState"/>);
637 the session is currently being opened
638 as a result of <link to="IVirtualBox::openRemoteSession"/>
639 call (<link to="ISession::state"/>)
640 </desc>
641 </const>
642 <const name="Closing" value="4">
643 <desc>
644 The direct session is being closed (<link to="IMachine::sessionState"/>);
645 the session is being closed (<link to="ISession::state"/>)
646 </desc>
647 </const>
648 </enum>
649
650 <enum
651 name="SessionType"
652 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
653 >
654 <desc>
655 Session type. This enumeration represents possible values of the
656 <link to="ISession::type"/> attribute.
657 </desc>
658
659 <const name="Null" value="0">
660 <desc>Null value (never used by the API).</desc>
661 </const>
662 <const name="Direct" value="1">
663 <desc>
664 Direct session
665 (opened by <link to="IVirtualBox::openSession"/>)
666 </desc>
667 </const>
668 <const name="Remote" value="2">
669 <desc>
670 Remote session
671 (opened by <link to="IVirtualBox::openRemoteSession"/>)
672 </desc>
673 </const>
674 <const name="Existing" value="3">
675 <desc>
676 Existing session
677 (opened by <link to="IVirtualBox::openExistingSession"/>)
678 </desc>
679 </const>
680 </enum>
681
682 <enum
683 name="DeviceType"
684 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
685 >
686 <desc>
687 Device type.
688 </desc>
689 <const name="Null" value="0">
690 <desc>
691 Null value, may also mean "no device" (not allowed for
692 <link to="IConsole::getDeviceActivity"/>).
693 </desc>
694 </const>
695 <const name="Floppy" value="1">
696 <desc>Floppy device.</desc>
697 </const>
698 <const name="DVD" value="2">
699 <desc>CD/DVD-ROM device.</desc>
700 </const>
701 <const name="HardDisk" value="3">
702 <desc>Hard disk device.</desc>
703 </const>
704 <const name="Network" value="4">
705 <desc>Network device.</desc>
706 </const>
707 <const name="USB" value="5">
708 <desc>USB device.</desc>
709 </const>
710 <const name="SharedFolder" value="6">
711 <desc>Shared folder device.</desc>
712 </const>
713 </enum>
714
715 <enum
716 name="DeviceActivity"
717 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
718 >
719 <desc>
720 Device activity for <link to="IConsole::getDeviceActivity"/>.
721 </desc>
722
723 <const name="Null" value="0"/>
724 <const name="Idle" value="1"/>
725 <const name="Reading" value="2"/>
726 <const name="Writing" value="3"/>
727 </enum>
728
729 <enum
730 name="ClipboardMode"
731 uuid="33364716-4008-4701-8f14-be0fa3d62950"
732 >
733 <desc>
734 Host-Guest clipboard interchange mode.
735 </desc>
736
737 <const name="Disabled" value="0"/>
738 <const name="HostToGuest" value="1"/>
739 <const name="GuestToHost" value="2"/>
740 <const name="Bidirectional" value="3"/>
741 </enum>
742
743 <enum
744 name="Scope"
745 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
746 >
747 <desc>
748 Scope of the operation.
749
750 A generic enumeration used in various methods to define the action or
751 argument scope.
752 </desc>
753
754 <const name="Global" value="0"/>
755 <const name="Machine" value="1"/>
756 <const name="Session" value="2"/>
757 </enum>
758
759 <enum
760 name="GuestStatisticType"
761 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
762 >
763 <desc>
764 Statistics type for <link to="IGuest::getStatistic"/>.
765 </desc>
766
767 <const name="CPULoad_Idle" value="0">
768 <desc>
769 Idle CPU load (0-100%) for last interval.
770 </desc>
771 </const>
772 <const name="CPULoad_Kernel" value="1">
773 <desc>
774 Kernel CPU load (0-100%) for last interval.
775 </desc>
776 </const>
777 <const name="CPULoad_User" value="2">
778 <desc>
779 User CPU load (0-100%) for last interval.
780 </desc>
781 </const>
782 <const name="Threads" value="3">
783 <desc>
784 Total number of threads in the system.
785 </desc>
786 </const>
787 <const name="Processes" value="4">
788 <desc>
789 Total number of processes in the system.
790 </desc>
791 </const>
792 <const name="Handles" value="5">
793 <desc>
794 Total number of handles in the system.
795 </desc>
796 </const>
797 <const name="MemoryLoad" value="6">
798 <desc>
799 Memory load (0-100%).
800 </desc>
801 </const>
802 <const name="PhysMemTotal" value="7">
803 <desc>
804 Total physical memory in megabytes.
805 </desc>
806 </const>
807 <const name="PhysMemAvailable" value="8">
808 <desc>
809 Free physical memory in megabytes.
810 </desc>
811 </const>
812 <const name="PhysMemBalloon" value="9">
813 <desc>
814 Ballooned physical memory in megabytes.
815 </desc>
816 </const>
817 <const name="MemCommitTotal" value="10">
818 <desc>
819 Total amount of memory in the committed state in megabytes.
820 </desc>
821 </const>
822 <const name="MemKernelTotal" value="11">
823 <desc>
824 Total amount of memory used by the guest OS's kernel in megabytes.
825 </desc>
826 </const>
827 <const name="MemKernelPaged" value="12">
828 <desc>
829 Total amount of paged memory used by the guest OS's kernel in megabytes.
830 </desc>
831 </const>
832 <const name="MemKernelNonpaged" value="13">
833 <desc>
834 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
835 </desc>
836 </const>
837 <const name="MemSystemCache" value="14">
838 <desc>
839 Total amount of memory used by the guest OS's system cache in megabytes.
840 </desc>
841 </const>
842 <const name="PageFileSize" value="15">
843 <desc>
844 Pagefile size in megabytes.
845 </desc>
846 </const>
847 <const name="SampleNumber" value="16">
848 <desc>
849 Statistics sample number
850 </desc>
851 </const>
852 <const name="MaxVal" value="17"/>
853 </enum>
854
855 <enum
856 name="BIOSBootMenuMode"
857 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
858 >
859 <desc>
860 BIOS boot menu mode.
861 </desc>
862
863 <const name="Disabled" value="0"/>
864 <const name="MenuOnly" value="1"/>
865 <const name="MessageAndMenu" value="2"/>
866 </enum>
867
868 <enum
869 name="DriveState"
870 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
871 >
872 <const name="Null" value="0">
873 <desc>Null value (never used by the API).</desc>
874 </const>
875 <const name="NotMounted" value="1"/>
876 <const name="ImageMounted" value="2"/>
877 <const name="HostDriveCaptured" value="3"/>
878 </enum>
879
880 <enum
881 name="ProcessorFeature"
882 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
883 >
884 <desc>
885 CPU features.
886 </desc>
887
888 <const name="HWVirtEx" value="0"/>
889 <const name="PAE" value="1"/>
890 <const name="LongMode" value="2"/>
891 </enum>
892
893
894 <!--
895 // IVirtualBoxErrorInfo
896 /////////////////////////////////////////////////////////////////////////
897 -->
898
899 <interface
900 name="IVirtualBoxErrorInfo" extends="$errorinfo"
901 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
902 supportsErrorInfo="no"
903 wsmap="suppress"
904 >
905 <desc>
906 The IVirtualBoxErrorInfo interface represents extended error information.
907
908 Extended error information can be set by VirtualBox components after
909 unsuccessful or partially successful method invocation. This information
910 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
911 and then shown to the client in addition to the plain 32-bit result code.
912
913 In MS COM, this interface extends the IErrorInfo interface,
914 in XPCOM, it extends the nsIException interface. In both cases,
915 it provides a set of common attributes to retrieve error
916 information.
917
918 Sometimes invocation of some component's method may involve methods of
919 other components that may also fail (independently of this method's
920 failure), or a series of non-fatal errors may precede a fatal error that
921 causes method failure. In cases like that, it may be desirable to preserve
922 information about all errors happened during method invocation and deliver
923 it to the caller. The <link to="#next"/> attribute is intended
924 specifically for this purpose and allows to represent a chain of errors
925 through a single IVirtualBoxErrorInfo object set after method invocation.
926
927 Note that errors are stored to a chain in the reverse order, i.e. the
928 initial error object you query right after method invocation is the last
929 error set by the callee, the object it points to in the @a next attribute
930 is the previous error and so on, up to the first error (which is the last
931 in the chain).
932 </desc>
933
934 <attribute name="resultCode" type="result" readonly="yes">
935 <desc>
936 Result code of the error.
937 Usually, it will be the same as the result code returned
938 by the method that provided this error information, but not
939 always. For example, on Win32, CoCreateInstance() will most
940 likely return E_NOINTERFACE upon unsuccessful component
941 instantiation attempt, but not the value the component factory
942 returned.
943 <note>
944 In MS COM, there is no equivalent.
945 In XPCOM, it is the same as nsIException::result.
946 </note>
947 </desc>
948 </attribute>
949
950 <attribute name="interfaceID" type="uuid" readonly="yes">
951 <desc>
952 UUID of the interface that defined the error.
953 <note>
954 In MS COM, it is the same as IErrorInfo::GetGUID.
955 In XPCOM, there is no equivalent.
956 </note>
957 </desc>
958 </attribute>
959
960 <attribute name="component" type="wstring" readonly="yes">
961 <desc>
962 Name of the component that generated the error.
963 <note>
964 In MS COM, it is the same as IErrorInfo::GetSource.
965 In XPCOM, there is no equivalent.
966 </note>
967 </desc>
968 </attribute>
969
970 <attribute name="text" type="wstring" readonly="yes">
971 <desc>
972 Text description of the error.
973 <note>
974 In MS COM, it is the same as IErrorInfo::GetDescription.
975 In XPCOM, it is the same as nsIException::message.
976 </note>
977 </desc>
978 </attribute>
979
980 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
981 <desc>
982 Next error object if there is any, or @c null otherwise.
983 <note>
984 In MS COM, there is no equivalent.
985 In XPCOM, it is the same as nsIException::inner.
986 </note>
987 </desc>
988 </attribute>
989
990 </interface>
991
992
993 <!--
994 // IVirtualBox
995 /////////////////////////////////////////////////////////////////////////
996 -->
997
998 <interface
999 name="IVirtualBoxCallback" extends="$unknown"
1000 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1001 wsmap="suppress"
1002 >
1003 <method name="onMachineStateChange">
1004 <desc>
1005 The execution state of the given machine has changed.
1006 <see>IMachine::state</see>
1007 </desc>
1008 <param name="machineId" type="uuid" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 <param name="state" type="MachineState" dir="in">
1012 <desc>New execution state.</desc>
1013 </param>
1014 </method>
1015
1016 <method name="onMachineDataChange">
1017 <desc>
1018 Any of the settings of the given machine has changed.
1019 </desc>
1020 <param name="machineId" type="uuid" dir="in">
1021 <desc>ID of the machine this event relates to.</desc>
1022 </param>
1023 </method>
1024
1025 <method name="onExtraDataCanChange">
1026 <desc>
1027 Notification when someone tries to change extra data for
1028 either the given machine or (if null) global extra data.
1029 This gives the chance to veto against changes.
1030 </desc>
1031 <param name="machineId" type="uuid" dir="in">
1032 <desc>
1033 ID of the machine this event relates to
1034 (null ID for global extra data change requests).
1035 </desc>
1036 </param>
1037 <param name="key" type="wstring" dir="in">
1038 <desc>
1039 Extra data key for the attempted write.
1040 </desc>
1041 </param>
1042 <param name="value" type="wstring" dir="in">
1043 <desc>
1044 Extra data value for the given key.
1045 </desc>
1046 </param>
1047 <param name="error" type="wstring" dir="out">
1048 <desc>
1049 Optional error message describing the reason of the
1050 veto (ignored if this notification returns @c true).
1051 </desc>
1052 </param>
1053 <param name="allowChange" type="boolean" dir="return">
1054 <desc>
1055 Flag to indicate whether the callee agrees (@c true)
1056 or vetoes against the change (@c false).
1057 </desc>
1058 </param>
1059 </method>
1060
1061 <method name="onExtraDataChange">
1062 <desc>
1063 Notification when machine specific or global extra data
1064 has changed.
1065 </desc>
1066 <param name="machineId" type="uuid" dir="in">
1067 <desc>
1068 ID of the machine this event relates to.
1069 Null for global extra data changes.
1070 </desc>
1071 </param>
1072 <param name="key" type="wstring" dir="in">
1073 <desc>
1074 Extra data key that has changed.
1075 </desc>
1076 </param>
1077 <param name="value" type="wstring" dir="in">
1078 <desc>
1079 Extra data value for the given key.
1080 </desc>
1081 </param>
1082 </method>
1083
1084 <method name="onMediaRegistered">
1085 <desc>
1086 The given media was registered or unregistered
1087 within this VirtualBox installation.
1088
1089 The @a mediaType parameter describes what type of
1090 media the specified @a mediaId refers to. Possible
1091 values are:
1092
1093 <ul>
1094 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1095 that, if registered, can be obtained using the
1096 <link to="IVirtualBox::getHardDisk"/> call.</li>
1097 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1098 that, if registered, can be obtained using the
1099 <link to="IVirtualBox::getDVDImage"/> call.</li>
1100 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1101 that, if registered, can be obtained using the
1102 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1103 </ul>
1104
1105 Note that if this is a deregistration notification,
1106 there is no way to access the object representing the
1107 unregistered media. It is supposed that the
1108 application will do required cleanup based on the
1109 @a mediaId value.
1110 </desc>
1111 <param name="mediaId" type="uuid" dir="in">
1112 <desc>ID of the media this event relates to.</desc>
1113 </param>
1114 <param name="mediaType" type="DeviceType" dir="in">
1115 <desc>Type of the media this event relates to.</desc>
1116 </param>
1117 <param name="registered" type="boolean" dir="in">
1118 <desc>
1119 If true, the media was registered, otherwise it was
1120 unregistered.
1121 </desc>
1122 </param>
1123 </method>
1124
1125 <method name="onMachineRegistered">
1126 <desc>
1127 The given machine was registered or unregistered
1128 within this VirtualBox installation.
1129 </desc>
1130 <param name="machineId" type="uuid" dir="in">
1131 <desc>ID of the machine this event relates to.</desc>
1132 </param>
1133 <param name="registered" type="boolean" dir="in">
1134 <desc>
1135 If true, the machine was registered, otherwise it was
1136 unregistered.
1137 </desc>
1138 </param>
1139 </method>
1140
1141 <method name="onSessionStateChange">
1142 <desc>
1143 The state of the session for the given machine was changed.
1144 <see>IMachine::sessionState</see>
1145 </desc>
1146 <param name="machineId" type="uuid" dir="in">
1147 <desc>ID of the machine this event relates to.</desc>
1148 </param>
1149 <param name="state" type="SessionState" dir="in">
1150 <desc>New session state.</desc>
1151 </param>
1152 </method>
1153
1154 <method name="onSnapshotTaken">
1155 <desc>
1156 A new snapshot of the machine has been taken.
1157 <see>ISnapshot</see>
1158 </desc>
1159 <param name="machineId" type="uuid" dir="in">
1160 <desc>ID of the machine this event relates to.</desc>
1161 </param>
1162 <param name="snapshotId" type="uuid" dir="in">
1163 <desc>ID of the new snapshot.</desc>
1164 </param>
1165 </method>
1166
1167 <method name="onSnapshotDiscarded">
1168 <desc>
1169 Snapshot of the given machine has been discarded.
1170
1171 <note>
1172 This notification is delivered <b>after</b> the snapshot
1173 object has been uninitialized on the server (so that any
1174 attempt to call its methods will return an error).
1175 </note>
1176
1177 <see>ISnapshot</see>
1178 </desc>
1179 <param name="machineId" type="uuid" dir="in">
1180 <desc>ID of the machine this event relates to.</desc>
1181 </param>
1182 <param name="snapshotId" type="uuid" dir="in">
1183 <desc>
1184 ID of the discarded snapshot. <tt>null</tt> means the
1185 current machine state has been discarded (restored from
1186 the current snapshot).
1187 </desc>
1188 </param>
1189 </method>
1190
1191 <method name="onSnapshotChange">
1192 <desc>
1193 Snapshot properties (name and/or description) have been changed.
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>ID of the changed snapshot.</desc>
1201 </param>
1202 </method>
1203
1204 <method name="onGuestPropertyChange">
1205 <desc>
1206 Notification when a guest property has changed.
1207 </desc>
1208 <param name="machineId" type="uuid" dir="in">
1209 <desc>
1210 ID of the machine this event relates to.
1211 </desc>
1212 </param>
1213 <param name="name" type="wstring" dir="in">
1214 <desc>
1215 The name of the property that has changed.
1216 </desc>
1217 </param>
1218 <param name="value" type="wstring" dir="in">
1219 <desc>
1220 The new property value.
1221 </desc>
1222 </param>
1223 <param name="flags" type="wstring" dir="in">
1224 <desc>
1225 The new property flags.
1226 </desc>
1227 </param>
1228 </method>
1229
1230 </interface>
1231
1232 <interface
1233 name="IDHCPServer" extends="$unknown"
1234 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1235 wsmap="managed"
1236 >
1237 <desc>
1238 The IDHCPServer interface represents the vbox dhcp server configuration.
1239
1240 To enumerate all the dhcp servers on the host, use the
1241 <link to="IVirtualBox::DHCPServers"/> attribute.
1242 </desc>
1243
1244 <attribute name="enabled" type="boolean">
1245 <desc>
1246 specifies if the dhcp server is enabled
1247 </desc>
1248 </attribute>
1249
1250 <attribute name="IPAddress" type="wstring" readonly="yes">
1251 <desc>
1252 specifies server IP
1253 </desc>
1254 </attribute>
1255
1256 <attribute name="networkMask" type="wstring" readonly="yes">
1257 <desc>
1258 specifies server network mask
1259 </desc>
1260 </attribute>
1261
1262 <attribute name="networkName" type="wstring" readonly="yes">
1263 <desc>
1264 specifies internal network name the server is used for
1265 </desc>
1266 </attribute>
1267
1268 <attribute name="lowerIP" type="wstring" readonly="yes">
1269 <desc>
1270 specifies from IP adrres in server address range
1271 </desc>
1272 </attribute>
1273
1274 <attribute name="upperIP" type="wstring" readonly="yes">
1275 <desc>
1276 specifies to IP adrres in server address range
1277 </desc>
1278 </attribute>
1279
1280 <method name="setConfiguration">
1281 <desc>
1282 configures the server
1283 <result name="E_INVALIDARG">
1284 invalid configuration supplied
1285 </result>
1286 </desc>
1287 <param name="IPAddress" type="wstring" dir="in">
1288 <desc>
1289 server IP address
1290 </desc>
1291 </param>
1292 <param name="networkMask" type="wstring" dir="in">
1293 <desc>
1294 server network mask
1295 </desc>
1296 </param>
1297 <param name="FromIPAddress" type="wstring" dir="in">
1298 <desc>
1299 server From IP address for address range
1300 </desc>
1301 </param>
1302 <param name="ToIPAddress" type="wstring" dir="in">
1303 <desc>
1304 server To IP address for address range
1305 </desc>
1306 </param>
1307 </method>
1308
1309 <method name="start">
1310 <desc>
1311 Starts DHCP server process.
1312 <result name="E_FAIL">
1313 Failed to start the process.
1314 </result>
1315 </desc>
1316 <param name="networkName" type="wstring" dir="in">
1317 <desc>
1318 Name of internal network DHCP server should attach to.
1319 </desc>
1320 </param>
1321 <param name="trunkName" type="wstring" dir="in">
1322 <desc>
1323 Name of internal network trunk.
1324 </desc>
1325 </param>
1326 <param name="trunkType" type="wstring" dir="in">
1327 <desc>
1328 Type of internal network trunk.
1329 </desc>
1330 </param>
1331 </method>
1332
1333 <method name="stop">
1334 <desc>
1335 Stops DHCP server process.
1336 <result name="E_FAIL">
1337 Failed to stop the process.
1338 </result>
1339 </desc>
1340 </method>
1341 </interface>
1342
1343 <interface
1344 name="IVirtualBox" extends="$dispatched"
1345 uuid="779264f4-65ed-48ed-be39-518ca549e296"
1346 wsmap="managed"
1347 >
1348 <desc>
1349 The IVirtualBox interface represents the main interface exposed by the
1350 product that provides virtual machine management.
1351
1352 An instance of IVirtualBox is required for the product to do anything
1353 useful. Even though the interface does not expose this, internally,
1354 IVirtualBox is implemented as a singleton and actually lives in the
1355 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1356 IVirtualBox can track the state of all virtual machines on a particular
1357 host, regardless of which frontend started them.
1358
1359 To enumerate all the virtual machines on the host, use the
1360 <link to="IVirtualBox::machines"/> attribute.
1361 </desc>
1362
1363 <attribute name="version" type="wstring" readonly="yes">
1364 <desc>
1365 A string representing the version number of the product. The
1366 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1367 last number represents the build number and will frequently change.
1368 </desc>
1369 </attribute>
1370
1371 <attribute name="revision" type="unsigned long" readonly="yes">
1372 <desc>
1373 The internal build revision number of the product.
1374 </desc>
1375 </attribute>
1376
1377 <attribute name="packageType" type="wstring" readonly="yes">
1378 <desc>
1379 A string representing the package type of this product. The
1380 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1381 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1382 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1383 this.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="homeFolder" type="wstring" readonly="yes">
1388 <desc>
1389 Full path to the directory where the global settings file,
1390 <tt>VirtualBox.xml</tt>, is stored.
1391
1392 In this version of VirtualBox, the value of this property is
1393 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1394 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1395 as determined by the host OS), and cannot be changed.
1396
1397 This path is also used as the base to resolve relative paths in
1398 places where relative paths are allowed (unless otherwise
1399 expressly indicated).
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1404 <desc>
1405 Full name of the global settings file.
1406 The value of this property corresponds to the value of
1407 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1408 </desc>
1409 </attribute>
1410
1411 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1412 <desc>
1413 Current version of the format of the global VirtualBox settings file
1414 (<tt>VirtualBox.xml</tt>).
1415
1416 The version string has the following format:
1417 <pre>
1418 x.y-platform
1419 </pre>
1420 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1421 versions, and <tt>platform</tt> is the platform identifier.
1422
1423 The current version usually matches the value of the
1424 <link to="#settingsFormatVersion"/> attribute unless the
1425 settings file was created by an older version of VirtualBox and there
1426 was a change of the settings file format since then.
1427
1428 Note that VirtualBox automatically converts settings files from older
1429 versions to the most recent version when reading them (usually at
1430 VirtualBox startup) but it doesn't save the changes back until
1431 you call a method that implicitly saves settings (such as
1432 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1433 explicitly. Therefore, if the value of this attribute differs from the
1434 value of <link to="#settingsFormatVersion"/>, then it
1435 means that the settings file was converted but the result of the
1436 conversion is not yet saved to disk.
1437
1438 The above feature may be used by interactive front-ends to inform users
1439 about the settings file format change and offer them to explicitly save
1440 all converted settings files (the global and VM-specific ones),
1441 optionally create backup copies of the old settings files before saving,
1442 etc.
1443
1444 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1445 </desc>
1446 </attribute>
1447
1448 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1449 <desc>
1450 Most recent version of the settings file format.
1451
1452 The version string has the following format:
1453 <pre>
1454 x.y-platform
1455 </pre>
1456 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1457 versions, and <tt>platform</tt> is the platform identifier.
1458
1459 VirtualBox uses this version of the format when saving settings files
1460 (either as a result of method calls that require to save settings or as
1461 a result of an explicit call to <link to="#saveSettings"/>).
1462
1463 <see>settingsFileVersion</see>
1464 </desc>
1465 </attribute>
1466
1467 <attribute name="host" type="IHost" readonly="yes">
1468 <desc>Associated host object.</desc>
1469 </attribute>
1470
1471 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1472 <desc>Associated system information object.</desc>
1473 </attribute>
1474
1475 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1476 <desc>
1477 Array of machine objects registered within this VirtualBox instance.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1482 <desc>
1483 Array of hard disk objects known to this VirtualBox installation.
1484
1485 This array contains only base (root) hard disks. All differencing
1486 hard disks of the given base hard disk can be enumerated using
1487 <link to="IHardDisk::children"/>.
1488 </desc>
1489 </attribute>
1490
1491 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1492 <desc>
1493 Array of CD/DVD image objects registered with this VirtualBox instance.
1494 </desc>
1495 </attribute>
1496
1497 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1498 <desc>
1499 Array of floppy image objects registered with this VirtualBox instance.
1500 </desc>
1501 </attribute>
1502
1503 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1504
1505 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1506
1507 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1508 <desc>
1509 Collection of global shared folders. Global shared folders are
1510 available to all virtual machines.
1511
1512 New shared folders are added to the collection using
1513 <link to="#createSharedFolder"/>. Existing shared folders can be
1514 removed using <link to="#removeSharedFolder"/>.
1515
1516 <note>
1517 In the current version of the product, global shared folders are not
1518 implemented and therefore this collection is always empty.
1519 </note>
1520 </desc>
1521 </attribute>
1522
1523 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1524 <desc>
1525 Associated performance collector object.
1526 </desc>
1527 </attribute>
1528
1529 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1530 <desc>
1531 dhcp server settings.
1532 </desc>
1533 </attribute>
1534
1535 <method name="createMachine">
1536 <desc>
1537 Creates a new virtual machine.
1538
1539 The new machine is created unregistered, with the initial configuration
1540 set according to the specified guest OS type. A typical sequence of
1541 actions to create a new virtual machine is as follows:
1542
1543 <ol>
1544 <li>
1545 Call this method to have a new machine created. The returned machine
1546 object will be "mutable" allowing to change any machine property.
1547 </li>
1548
1549 <li>
1550 Configure the machine using the appropriate attributes and methods.
1551 </li>
1552
1553 <li>
1554 Call <link to="IMachine::saveSettings" /> to write the settings
1555 to the machine's XML settings file. The configuration of the newly
1556 created machine will not be saved to disk until this method is
1557 called.
1558 </li>
1559
1560 <li>
1561 Call <link to="#registerMachine" /> to add the machine to the list
1562 of machines known to VirtualBox.
1563 </li>
1564 </ol>
1565
1566 You should specify valid name for the newly created machine when calling
1567 this method. See the <link to="IMachine::name"/> attribute description
1568 for more details about the machine name.
1569
1570 The specified guest OS type identifier must match an ID of one of known
1571 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1572 array.
1573
1574 Every machine has a <i>settings file</i> that is used to store
1575 the machine configuration. This file is stored in a directory called the
1576 <i>machine settings subfolder</i>. Both the settings subfolder and file
1577 will have a name that corresponds to the name of the virtual machine.
1578 You can specify where to create the machine setting subfolder using the
1579 @a baseFolder argument. The base folder can be absolute (full path) or
1580 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1581 directory</link>.
1582
1583 If @a baseFolder is a null or empty string (which is recommended), the
1584 <link to="ISystemProperties::defaultMachineFolder">default machine
1585 settings folder</link> will be used as a base folder for the created
1586 machine. Otherwise the given base folder will be used. In either case,
1587 the full path to the resulting settings file has the following
1588 structure:
1589 <pre>
1590 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1591 </pre>
1592
1593 Note that if the resulting settings file already exists, this method
1594 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1595
1596 Optionally, you may specify an UUID of to assign to the created machine.
1597 However, this is not recommended and you should normally pass an empty
1598 (null) UUID to this method so that a new UUID will be automatically
1599 generated for every created machine. You can use UUID
1600 00000000-0000-0000-0000-000000000000 as null value.
1601
1602 <note>
1603 There is no way to change the name of the settings file or
1604 subfolder of the created machine directly.
1605 </note>
1606
1607 <result name="VBOX_E_OBJECT_NOT_FOUND">
1608 @a osTypeId is invalid.
1609 </result>
1610 <result name="VBOX_E_FILE_ERROR">
1611 Resulting settings file name is invalid or the settings file already
1612 exists or could not be created due to an I/O error.
1613 </result>
1614 <result name="E_INVALIDARG">
1615 @a name is empty or null.
1616 </result>
1617 </desc>
1618
1619 <param name="name" type="wstring" dir="in">
1620 <desc>Machine name.</desc>
1621 </param>
1622 <param name="osTypeId" type="wstring" dir="in">
1623 <desc>Guest OS Type ID.</desc>
1624 </param>
1625 <param name="baseFolder" type="wstring" dir="in">
1626 <desc>Base machine folder (optional).</desc>
1627 </param>
1628 <param name="id" type="uuid" dir="in">
1629 <desc>Machine UUID (optional).</desc>
1630 </param>
1631 <param name="machine" type="IMachine" dir="return">
1632 <desc>Created machine object.</desc>
1633 </param>
1634 </method>
1635
1636 <method name="createLegacyMachine">
1637 <desc>
1638 Creates a new virtual machine in "legacy" mode, using the specified
1639 settings file to store machine settings.
1640
1641 As opposed to machines created by <link to="#createMachine"/>,
1642 the settings file of the machine created in "legacy" mode is not
1643 automatically renamed when the machine name is changed -- it will always
1644 remain the same as specified in this method call.
1645
1646 The specified settings file name can be absolute (full path) or relative
1647 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1648 directory</link>. If the file name doesn't contain an extension, the
1649 default extension (.xml) will be appended.
1650
1651 Note that the configuration of the newly created machine is not
1652 saved to disk (and therefore no settings file is created)
1653 until <link to="IMachine::saveSettings"/> is called. If the
1654 specified settings file already exists, this method
1655 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1656
1657 See <link to="#createMachine"/> for more information.
1658
1659 @deprecated This method may be removed later. Use <link
1660 to="IVirtualBox::createMachine"/> instead.
1661
1662 <note>
1663 There is no way to change the name of the settings file
1664 of the machine created in "legacy" mode.
1665 </note>
1666
1667 <result name="VBOX_E_OBJECT_NOT_FOUND">
1668 @a osTypeId is invalid.
1669 </result>
1670 <result name="VBOX_E_FILE_ERROR">
1671 @a settingsFile is invalid or the settings file already exists or
1672 could not be created due to an I/O error.
1673 </result>
1674 <result name="E_INVALIDARG">
1675 @a name or @a settingsFile is empty or null.
1676 </result>
1677 </desc>
1678
1679 <param name="name" type="wstring" dir="in">
1680 <desc>Machine name.</desc>
1681 </param>
1682 <param name="osTypeId" type="wstring" dir="in">
1683 <desc>Machine OS Type ID.</desc>
1684 </param>
1685 <param name="settingsFile" type="wstring" dir="in">
1686 <desc>Name of the machine settings file.</desc>
1687 </param>
1688 <param name="id" type="uuid" dir="in">
1689 <desc>Machine UUID (optional).</desc>
1690 </param>
1691 <param name="machine" type="IMachine" dir="return">
1692 <desc>Created machine object.</desc>
1693 </param>
1694 </method>
1695
1696 <method name="openMachine">
1697 <desc>
1698 Opens a virtual machine from the existing settings file.
1699 The opened machine remains unregistered until you call
1700 <link to="#registerMachine"/>.
1701
1702 The specified settings file name can be absolute
1703 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1704 VirtualBox home directory</link>. This file must exist
1705 and must be a valid machine settings file whose contents
1706 will be used to construct the machine object.
1707
1708 @deprecated Will be removed soon.
1709 <result name="VBOX_E_FILE_ERROR">
1710 Settings file name invalid, not found or sharing violation.
1711 </result>
1712 </desc>
1713 <param name="settingsFile" type="wstring" dir="in">
1714 <desc>
1715 Name of the machine settings file.
1716 </desc>
1717 </param>
1718 <param name="machine" type="IMachine" dir="return">
1719 <desc>Opened machine object.</desc>
1720 </param>
1721 <note>
1722 <link to="IMachine::settingsModified"/> will return
1723 false for the created machine, until any of machine settings
1724 are changed.
1725 </note>
1726 </method>
1727
1728 <method name="registerMachine">
1729 <desc>
1730
1731 Registers the machine previously created using
1732 <link to="#createMachine"/> or opened using
1733 <link to="#openMachine"/> within this VirtualBox installation. After
1734 successful method invocation, the
1735 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1736 to all registered callbacks.
1737
1738 <note>
1739 This method implicitly calls <link to="IMachine::saveSettings"/>
1740 to save all current machine settings before registering it.
1741 </note>
1742
1743 <result name="VBOX_E_OBJECT_NOT_FOUND">
1744 No matching virtual machine found.
1745 </result>
1746 <result name="VBOX_E_INVALID_OBJECT_STATE">
1747 Virtual machine was not created within this VirtualBox instance.
1748 </result>
1749
1750 </desc>
1751 <param name="machine" type="IMachine" dir="in"/>
1752 </method>
1753
1754 <method name="getMachine">
1755 <desc>
1756 Attempts to find a virtual machine given its UUID.
1757 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1758 instead.
1759
1760 <result name="VBOX_E_OBJECT_NOT_FOUND">
1761 Could not find registered machine matching @a id.
1762 </result>
1763
1764 </desc>
1765 <param name="id" type="uuid" dir="in"/>
1766 <param name="machine" type="IMachine" dir="return"/>
1767 </method>
1768
1769 <method name="findMachine">
1770 <desc>
1771 Attempts to find a virtual machine given its name.
1772 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1773 instead.
1774
1775 <result name="VBOX_E_OBJECT_NOT_FOUND">
1776 Could not find registered machine matching @a name.
1777 </result>
1778
1779 </desc>
1780 <param name="name" type="wstring" dir="in"/>
1781 <param name="machine" type="IMachine" dir="return"/>
1782 </method>
1783
1784 <method name="unregisterMachine">
1785 <desc>
1786
1787 Unregisters the machine previously registered using
1788 <link to="#registerMachine"/>. After successful method invocation, the
1789 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1790 to all registered callbacks.
1791
1792 <note>
1793 The specified machine must not be in the Saved state, have an open
1794 (or a spawning) direct session associated with it, have snapshots or
1795 have hard disks attached.
1796 </note>
1797
1798 <note>
1799 This method implicitly calls <link to="IMachine::saveSettings"/> to
1800 save all current machine settings before unregistering it.
1801 </note>
1802
1803 <note>
1804 If the given machine is inaccessible (see
1805 <link to="IMachine::accessible"/>), it will be unregistered and
1806 fully uninitialized right afterwards. As a result, the returned
1807 machine object will be unusable and an attempt to call
1808 <b>any</b> method will return the "Object not ready" error.
1809 </note>
1810
1811 <result name="VBOX_E_OBJECT_NOT_FOUND">
1812 Could not find registered machine matching @a id.
1813 </result>
1814 <result name="VBOX_E_INVALID_VM_STATE">
1815 Machine is in Saved state.
1816 </result>
1817 <result name="VBOX_E_INVALID_OBJECT_STATE">
1818 Machine has snapshot or open session or hard disk attached.
1819 </result>
1820
1821 </desc>
1822 <param name="id" type="uuid" dir="in">
1823 <desc>UUID of the machine to unregister.</desc>
1824 </param>
1825 <param name="machine" type="IMachine" dir="return">
1826 <desc>Unregistered machine object.</desc>
1827 </param>
1828 </method>
1829
1830 <method name="createAppliance">
1831 <desc>
1832 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1833 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1834 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1835 </desc>
1836 <param name="appliance" type="IAppliance" dir="return">
1837 <desc>New appliance.</desc>
1838 </param>
1839 </method>
1840
1841 <method name="createHardDisk">
1842 <desc>
1843 Creates a new base hard disk object that will use the given storage
1844 format and location for hard disk data.
1845
1846 Note that the actual storage unit is not created by this method. In
1847 order to do it, and before you are able to attach the created hard disk
1848 to virtual machines, you must call one of the following methods to
1849 allocate a format-specific storage unit at the specified location:
1850 <ul>
1851 <li><link to="IHardDisk::createBaseStorage"/></li>
1852 <li><link to="IHardDisk::createDiffStorage"/></li>
1853 </ul>
1854
1855 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1856 remain uninitialized until the hard disk storage unit is successfully
1857 created by one of the above methods.
1858
1859 After the storage unit is successfully created, the hard disk gets
1860 remembered by this VirtualBox installation and will be accessible
1861 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1862 methods. Remembered root (base) hard disks are also returned as part of
1863 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1864
1865 The list of all storage formats supported by this VirtualBox
1866 installation can be obtained using
1867 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1868 attribute is empty or <tt>null</tt> then the default storage format
1869 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1870 be used for creating a storage unit of the hard disk.
1871
1872 Note that the format of the location string is storage format specific.
1873 See <link to="IMedium::location"/>, IHardDisk and
1874 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1875
1876 <result name="VBOX_E_OBJECT_NOT_FOUND">
1877 @a format identifier is invalid. See
1878 <link to="ISystemProperties::hardDiskFormats"/>.
1879 </result>
1880 <result name="VBOX_E_FILE_ERROR">
1881 @a location is a not valid file name (for file-based formats only).
1882 </result>
1883 <result name="E_INVALIDARG">
1884 @a format is a null or empty string.
1885 </result>
1886 </desc>
1887 <param name="format" type="wstring" dir="in">
1888 <desc>
1889 Identifier of the storage format to use for the new hard disk.
1890 </desc>
1891 </param>
1892 <param name="location" type="wstring" dir="in">
1893 <desc>
1894 Location of the storage unit for the new hard disk.
1895 </desc>
1896 </param>
1897 <param name="hardDisk" type="IHardDisk" dir="return">
1898 <desc>Created hard disk object.</desc>
1899 </param>
1900 </method>
1901
1902 <method name="openHardDisk">
1903 <desc>
1904 Opens a hard disk from an existing location.
1905
1906 After the hard disk is successfully opened by this method, it gets
1907 remembered by (known to) this VirtualBox installation and will be
1908 accessible through <link to="#getHardDisk"/> and
1909 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1910 are also returned as part of the <link to="#hardDisks"/> array and can
1911 be attached to virtual machines. See IHardDisk for more details.
1912
1913 If a differencing hard disk is to be opened by this method, the
1914 operation will succeed only if its parent hard disk and all ancestors,
1915 if any, are already known to this VirtualBox installation (for example,
1916 were opened by this method before).
1917
1918 This method tries to guess the storage format of the specified hard disk
1919 by reading hard disk data at the specified location.
1920
1921 If @a write is ReadWrite (which it should be), the image is opened for
1922 read/write access and must have according permissions, as VirtualBox
1923 may actually write status information into the disk's metadata sections.
1924
1925 Note that write access is required for all typical image usage in VirtualBox,
1926 since VirtualBox may need to write metadata such as a UUID into the image.
1927 The only exception is opening a source image temporarily for copying and
1928 cloning when the image will quickly be closed again.
1929
1930 Note that the format of the location string is storage format specific.
1931 See <link to="IMedium::location"/>, IHardDisk and
1932 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1933
1934 <result name="VBOX_E_FILE_ERROR">
1935 Invalid hard disk storage file location.
1936 </result>
1937 <result name="VBOX_E_IPRT_ERROR">
1938 Could not get hard disk storage format.
1939 </result>
1940 <result name="E_INVALIDARG">
1941 Invalid hard disk storage format.
1942 </result>
1943
1944 </desc>
1945 <param name="location" type="wstring" dir="in">
1946 <desc>
1947 Location of the storage unit that contains hard disk data in one of
1948 the supported storage formats.
1949 </desc>
1950 </param>
1951 <param name="accessMode" type="AccessMode" dir="in">
1952 <desc>
1953 Determines whether to open the image in read/write or read-only mode.
1954 </desc>
1955 </param>
1956 <param name="hardDisk" type="IHardDisk" dir="return">
1957 <desc>Opened hard disk object.</desc>
1958 </param>
1959 </method>
1960
1961 <method name="getHardDisk" const="yes">
1962 <desc>
1963 Returns a hard disk with the given UUID.
1964
1965 The hard disk with the given UUID must be known to this VirtualBox
1966 installation, i.e. it must be previously created by
1967 <link to="#createHardDisk"/> or opened by <link
1968 to="#openHardDisk"/>, or attached to some known virtual machine.
1969
1970 <result name="VBOX_E_OBJECT_NOT_FOUND">
1971 No hard disk object matching @a id found.
1972 </result>
1973
1974 </desc>
1975 <param name="id" type="uuid" dir="in">
1976 <desc>UUID of the hard disk to look for.</desc>
1977 </param>
1978 <param name="hardDisk" type="IHardDisk" dir="return">
1979 <desc>Found hard disk object.</desc>
1980 </param>
1981 </method>
1982
1983 <method name="findHardDisk">
1984 <desc>
1985 Returns a hard disk that uses the given location to store hard
1986 disk data.
1987
1988 The given hard disk must be known to this VirtualBox installation, i.e.
1989 it must be previously created by
1990 <link to="#createHardDisk"/> or opened by <link
1991 to="#openHardDisk"/>, or attached to some known virtual machine.
1992
1993 The search is done by comparing the value of the @a location argument to
1994 the <link to="IHardDisk::location"/> attribute of each known hard
1995 disk.
1996
1997 For locations represented by file names in the host's file system, the
1998 requested location can be a path relative to the
1999 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2000 only a file name without any path is given, the
2001 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2002 folder</link> will be prepended to the file name before searching. Note
2003 that on case sensitive file systems, a case sensitive comparison is
2004 performed, otherwise the case of symbols in the file path is ignored.
2005
2006 <result name="VBOX_E_OBJECT_NOT_FOUND">
2007 No hard disk object matching @a location found.
2008 </result>
2009
2010 </desc>
2011 <param name="location" type="wstring" dir="in">
2012 <desc>Location string to search for.</desc>
2013 </param>
2014 <param name="hardDisk" type="IHardDisk" dir="return">
2015 <desc>Found hard disk object.</desc>
2016 </param>
2017 </method>
2018
2019 <method name="openDVDImage">
2020 <desc>
2021 Opens a CD/DVD image contained in the specified file of the supported
2022 format and assigns it the given UUID.
2023
2024 After the image is successfully opened by this method, it gets
2025 remembered by (known to) this VirtualBox installation and will be
2026 accessible through <link to="#getDVDImage"/> and
2027 <link to="#findDVDImage"/> methods. Remembered images are also
2028 returned as part of the <link to="#DVDImages"/> array and can be mounted
2029 to virtual machines. See IMedium for more details.
2030
2031 See <link to="IMedium::location"/> to get more details about the format
2032 of the location string.
2033
2034 <note>
2035 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2036 </note>
2037
2038 <result name="VBOX_E_INVALID_OBJECT_STATE">
2039 CD/DVD image already exists in the media registry.
2040 </result>
2041
2042 </desc>
2043 <param name="location" type="wstring" dir="in">
2044 <desc>
2045 Full path to the file that contains a valid CD/DVD image.
2046 </desc>
2047 </param>
2048 <param name="id" type="uuid" dir="in">
2049 <desc>
2050 UUID to assign to the given image within this VirtualBox installation.
2051 If an empty (null) UUID is specified, the system will randomly
2052 generate a new UUID.
2053 </desc>
2054 </param>
2055 <param name="image" type="IDVDImage" dir="return">
2056 <desc>Opened CD/DVD image object.</desc>
2057 </param>
2058 </method>
2059
2060 <method name="getDVDImage">
2061 <desc>
2062 Returns a CD/DVD image with the given UUID.
2063
2064 The image with the given UUID must be known to this VirtualBox
2065 installation, i.e. it must be previously opened by <link
2066 to="#openDVDImage"/>, or mounted to some known virtual machine.
2067
2068 <result name="VBOX_E_OBJECT_NOT_FOUND">
2069 No matching DVD image found in the media registry.
2070 </result>
2071
2072 </desc>
2073 <param name="id" type="uuid" dir="in">
2074 <desc>UUID of the image to look for.</desc>
2075 </param>
2076 <param name="image" type="IDVDImage" dir="return">
2077 <desc>Found CD/DVD image object.</desc>
2078 </param>
2079 </method>
2080
2081 <method name="findDVDImage">
2082 <desc>
2083 Returns a CD/DVD image with the given image location.
2084
2085 The image with the given UUID must be known to this VirtualBox
2086 installation, i.e. it must be previously opened by <link
2087 to="#openDVDImage"/>, or mounted to some known virtual machine.
2088
2089 The search is done by comparing the value of the @a location argument to
2090 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2091
2092 The requested location can be a path relative to the
2093 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2094 only a file name without any path is given, the
2095 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2096 folder</link> will be prepended to the file name before searching. Note
2097 that on case sensitive file systems, a case sensitive comparison is
2098 performed, otherwise the case in the file path is ignored.
2099
2100 <result name="VBOX_E_FILE_ERROR">
2101 Invalid image file location.
2102 </result>
2103 <result name="VBOX_E_OBJECT_NOT_FOUND">
2104 No matching DVD image found in the media registry.
2105 </result>
2106
2107 </desc>
2108 <param name="location" type="wstring" dir="in">
2109 <desc>CD/DVD image file path to look for.</desc>
2110 </param>
2111 <param name="image" type="IDVDImage" dir="return">
2112 <desc>Found CD/DVD image object.</desc>
2113 </param>
2114 </method>
2115
2116 <method name="openFloppyImage">
2117 <desc>
2118 Opens a floppy image contained in the specified file of the supported
2119 format and assigns it the given UUID.
2120
2121 After the image is successfully opened by this method, it gets
2122 remembered by (known to) this VirtualBox installation and will be
2123 accessible through <link to="#getFloppyImage"/> and
2124 <link to="#findFloppyImage"/> methods. Remembered images are also
2125 returned as part of the <link to="#floppyImages"/> array and can be
2126 mounted to virtual machines. See IMedium for more details.
2127
2128 See <link to="IMedium::location"/> to get more details about the format
2129 of the location string.
2130
2131 <result name="VBOX_E_FILE_ERROR">
2132 Floppy image specified by @a location not accessible.
2133 </result>
2134 <result name="VBOX_E_INVALID_OBJECT_STATE">
2135 Floppy image already exists in the media registry.
2136 </result>
2137
2138 <note>
2139 Currently, only raw floppy images are supported by VirtualBox.
2140 </note>
2141 </desc>
2142 <param name="location" type="wstring" dir="in">
2143 <desc>
2144 Full path to the file that contains a valid floppy image.
2145 </desc>
2146 </param>
2147 <param name="id" type="uuid" dir="in">
2148 <desc>
2149 UUID to assign to the given image file within this VirtualBox
2150 installation. If an empty (null) UUID is specified, the system will
2151 randomly generate a new UUID.
2152 </desc>
2153 </param>
2154 <param name="image" type="IFloppyImage" dir="return">
2155 <desc>Opened floppy image object.</desc>
2156 </param>
2157 </method>
2158
2159 <method name="getFloppyImage">
2160 <desc>
2161 Returns a floppy image with the given UUID.
2162
2163 The image with the given UUID must be known to this VirtualBox
2164 installation, i.e. it must be previously opened by <link
2165 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2166
2167 <result name="VBOX_E_OBJECT_NOT_FOUND">
2168 No matching floppy image found in the media registry.
2169 </result>
2170
2171 </desc>
2172 <param name="id" type="uuid" dir="in">
2173 <desc>UUID of the image to look for.</desc>
2174 </param>
2175 <param name="image" type="IFloppyImage" dir="return">
2176 <desc>Found floppy image object.</desc>
2177 </param>
2178 </method>
2179
2180 <method name="findFloppyImage">
2181 <desc>
2182 Returns a floppy image with the given image location.
2183
2184 The image with the given UUID must be known to this VirtualBox
2185 installation, i.e. it must be previously opened by <link
2186 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2187
2188 The search is done by comparing the value of the @a location argument to
2189 the <link to="IMedium::location"/> attribute of each known floppy image.
2190
2191 The requested location can be a path relative to the
2192 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2193 only a file name without any path is given, the
2194 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2195 folder</link> will be prepended to the file name before searching. Note
2196 that on case sensitive file systems, a case sensitive comparison is
2197 performed, otherwise the case of symbols in the file path is ignored.
2198
2199 <result name="VBOX_E_FILE_ERROR">
2200 Invalid image file location.
2201 </result>
2202 <result name="VBOX_E_OBJECT_NOT_FOUND">
2203 No matching floppy image found in the media registry.
2204 </result>
2205
2206 </desc>
2207 <param name="location" type="wstring" dir="in">
2208 <desc>Floppy image file path to look for.</desc>
2209 </param>
2210 <param name="image" type="IFloppyImage" dir="return">
2211 <desc>Found floppy image object.</desc>
2212 </param>
2213 </method>
2214
2215 <method name="getGuestOSType">
2216 <desc>
2217 Returns an object describing the specified guest OS type.
2218
2219 The requested guest OS type is specified using a string which is a
2220 mnemonic identifier of the guest operating system, such as
2221 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2222 particular virtual machine can be read or set using the
2223 <link to="IMachine::OSTypeId"/> attribute.
2224
2225 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2226 available guest OS type objects. Each object has an
2227 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2228 the guest OS this object describes.
2229
2230 <result name="E_INVALIDARG">
2231 @a id is not a valid Guest OS type.
2232 </result>
2233
2234 </desc>
2235 <param name="id" type="wstring" dir="in">
2236 <desc>Guest OS type ID string.</desc>
2237 </param>
2238 <param name="type" type="IGuestOSType" dir="return">
2239 <desc>Guest OS type object.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="createSharedFolder">
2244 <desc>
2245 Creates a new global shared folder by associating the given logical
2246 name with the given host path, adds it to the collection of shared
2247 folders and starts sharing it. Refer to the description of
2248 <link to="ISharedFolder"/> to read more about logical names.
2249 <note>
2250 In the current implementation, this operation is not
2251 implemented.
2252 </note>
2253 </desc>
2254 <param name="name" type="wstring" dir="in">
2255 <desc>Unique logical name of the shared folder.</desc>
2256 </param>
2257 <param name="hostPath" type="wstring" dir="in">
2258 <desc>Full path to the shared folder in the host file system.</desc>
2259 </param>
2260 <param name="writable" type="boolean" dir="in">
2261 <desc>Whether the share is writable or readonly</desc>
2262 </param>
2263 </method>
2264
2265 <method name="removeSharedFolder">
2266 <desc>
2267 Removes the global shared folder with the given name previously
2268 created by <link to="#createSharedFolder"/> from the collection of
2269 shared folders and stops sharing it.
2270 <note>
2271 In the current implementation, this operation is not
2272 implemented.
2273 </note>
2274 </desc>
2275 <param name="name" type="wstring" dir="in">
2276 <desc>Logical name of the shared folder to remove.</desc>
2277 </param>
2278 </method>
2279
2280 <method name="getNextExtraDataKey">
2281 <desc>
2282 Returns the global extra data key name following the supplied key.
2283
2284 An error is returned if the supplied @a key does not exist. @c NULL is
2285 returned in @a nextKey if the supplied key is the last key. When
2286 supplying @c NULL or an empty string for the @a key, the first key item
2287 is returned in @a nextKey (if there is any). @a nextValue is an optional
2288 parameter and if supplied, the next key's value is returned in it.
2289
2290 <result name="VBOX_E_OBJECT_NOT_FOUND">
2291 Extra data @a key not found.
2292 </result>
2293
2294 </desc>
2295 <param name="key" type="wstring" dir="in">
2296 <desc>Name of the data key to follow.</desc>
2297 </param>
2298 <param name="nextKey" type="wstring" dir="out">
2299 <desc>Name of the next data key.</desc>
2300 </param>
2301 <param name="nextValue" type="wstring" dir="out">
2302 <desc>Value of the next data key.</desc>
2303 </param>
2304 </method>
2305
2306 <method name="getExtraData">
2307 <desc>
2308 Returns associated global extra data.
2309
2310 If the requested data @a key does not exist, this function will
2311 succeed and return @c NULL in the @a value argument.
2312
2313 <result name="VBOX_E_FILE_ERROR">
2314 Settings file not accessible.
2315 </result>
2316 <result name="VBOX_E_XML_ERROR">
2317 Could not parse the settings file.
2318 </result>
2319
2320 </desc>
2321 <param name="key" type="wstring" dir="in">
2322 <desc>Name of the data key to get.</desc>
2323 </param>
2324 <param name="value" type="wstring" dir="return">
2325 <desc>Value of the requested data key.</desc>
2326 </param>
2327 </method>
2328
2329 <method name="setExtraData">
2330 <desc>
2331 Sets associated global extra data.
2332
2333 If you pass @c NULL as a key @a value, the given @a key will be
2334 deleted.
2335
2336 <note>
2337 Before performing the actual data change, this method will ask all
2338 registered callbacks using the
2339 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2340 notification for a permission. If one of the callbacks refuses the
2341 new value, the change will not be performed.
2342 </note>
2343 <note>
2344 On success, the
2345 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2346 is called to inform all registered callbacks about a successful data
2347 change.
2348 </note>
2349
2350 <result name="VBOX_E_FILE_ERROR">
2351 Settings file not accessible.
2352 </result>
2353 <result name="VBOX_E_XML_ERROR">
2354 Could not parse the settings file.
2355 </result>
2356 <result name="E_ACCESSDENIED">
2357 Modification request refused.
2358 </result>
2359
2360 </desc>
2361 <param name="key" type="wstring" dir="in">
2362 <desc>Name of the data key to set.</desc>
2363 </param>
2364 <param name="value" type="wstring" dir="in">
2365 <desc>Value to assign to the key.</desc>
2366 </param>
2367 </method>
2368
2369 <method name="openSession">
2370 <desc>
2371 Opens a new direct session with the given virtual machine.
2372
2373 A direct session acts as a local lock on the given VM.
2374 There can be only one direct session open at a time for every
2375 virtual machine, protecting the VM from being manipulated by
2376 conflicting actions from different processes. Only after a
2377 direct session has been opened, one can change all VM settings
2378 and execute the VM in the process space of the session object.
2379
2380 Sessions therefore can be compared to mutex semaphores that
2381 lock a given VM for modification and execution.
2382 See <link to="ISession">ISession</link> for details.
2383
2384 <note>Unless you are writing a new VM frontend, you will not
2385 want to execute a VM in the current process. To spawn a new
2386 process that executes a VM, use
2387 <link to="IVirtualBox::openRemoteSession" />
2388 instead.</note>
2389
2390 Upon successful return, the session object can be used to
2391 get access to the machine and to the VM console.
2392
2393 In VirtualBox terminology, the machine becomes "mutable" after
2394 a session has been opened. Note that the "mutable" machine
2395 object, on which you may invoke IMachine methods to change its
2396 settings, will be a different object from the immutable IMachine
2397 objects returned by various IVirtualBox methods. To obtain a
2398 mutable IMachine object (upon which you can invoke settings methods),
2399 use the <link to="ISession::machine" /> attribute.
2400
2401 One must always call <link to="ISession::close" /> to release the
2402 lock on the machine, or the machine's state will eventually be
2403 set to "Aborted".
2404
2405 In other words, to change settings on a machine, the following
2406 sequence is typically performed:
2407
2408 <ol>
2409 <li>Call this method (openSession) to have a machine locked for
2410 the current session.</li>
2411
2412 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2413
2414 <li>Change the settings of the machine.</li>
2415
2416 <li>Call <link to="IMachine::saveSettings" />.</li>
2417
2418 <li>Close the session by calling <link to="ISession::close"/>.</li>
2419 </ol>
2420
2421 <result name="E_UNEXPECTED">
2422 Virtual machine not registered.
2423 </result>
2424 <result name="E_ACCESSDENIED">
2425 Process not started by OpenRemoteSession.
2426 </result>
2427 <result name="VBOX_E_OBJECT_NOT_FOUND">
2428 No matching virtual machine found.
2429 </result>
2430 <result name="VBOX_E_INVALID_OBJECT_STATE">
2431 Session already open or being opened.
2432 </result>
2433 <result name="VBOX_E_VM_ERROR">
2434 Failed to assign machine to session.
2435 </result>
2436
2437 </desc>
2438 <param name="session" type="ISession" dir="in">
2439 <desc>
2440 Session object that will represent the opened session after
2441 successful method invocation. This object must not represent
2442 the already open session.
2443 <note>
2444 This session will be automatically closed if the
2445 VirtualBox server is terminated for some reason.
2446 </note>
2447 </desc>
2448 </param>
2449 <param name="machineId" type="uuid" dir="in">
2450 <desc>ID of the virtual machine to open a session with.</desc>
2451 </param>
2452 </method>
2453
2454 <method name="openRemoteSession">
2455 <desc>
2456 Spawns a new process that executes a virtual machine (called a
2457 "remote session").
2458
2459 Opening a remote session causes the VirtualBox server to start a new
2460 process that opens a direct session with the given VM. As a result, the
2461 VM is locked by that direct session in the new process, preventing
2462 conflicting changes from other processes. Since sessions act as locks
2463 that prevent conflicting changes, one cannot open a remote session
2464 for a VM that already has another open session (direct or remote), or
2465 is currently in the process of opening one (see <link
2466 to="IMachine::sessionState"/>).
2467
2468 While the remote session still provides some level of control over the
2469 VM execution to the caller (using the <link to="IConsole" /> interface),
2470 not all VM settings are available for modification within the remote
2471 session context.
2472
2473 This operation can take some time (a new VM is started in a new process,
2474 for which memory and other resources need to be set up). Because of this,
2475 an <link to="IProgress" /> is returned to allow the caller to wait for this
2476 asynchronous operation to be completed. Until then, the remote session
2477 object remains in the closed state, and accessing the machine or its
2478 console through it is invalid. It is recommended to use
2479 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2480 completion.
2481
2482 As with all <link to="ISession" /> objects, it is recommended to call
2483 <link to="ISession::close" /> on the local session object once openRemoteSession()
2484 has been called. However, the session's state (see <link to="ISession::state" />)
2485 will not return to "Closed" until the remote session has also closed (i.e.
2486 until the VM is no longer running). In that case, however, the state of
2487 the session will automatically change back to "Closed".
2488
2489 Currently supported session types (values of the @a type
2490 argument) are:
2491 <ul>
2492 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2493 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2494 </ul>
2495
2496 The @a environment argument is a string containing definitions of
2497 environment variables in the following format:
2498 @code
2499 NAME[=VALUE]\n
2500 NAME[=VALUE]\n
2501 ...
2502 @endcode
2503 where <tt>\\n</tt> is the new line character. These environment
2504 variables will be appended to the environment of the VirtualBox server
2505 process. If an environment variable exists both in the server process
2506 and in this list, the value from this list takes precedence over the
2507 server's variable. If the value of the environment variable is
2508 omitted, this variable will be removed from the resulting environment.
2509 If the environment string is @c null, the server environment is
2510 inherited by the started process as is.
2511
2512 <see>openExistingSession</see>
2513
2514 <result name="E_UNEXPECTED">
2515 Virtual machine not registered.
2516 </result>
2517 <result name="E_INVALIDARG">
2518 Invalid session type @a type.
2519 </result>
2520 <result name="VBOX_E_OBJECT_NOT_FOUND">
2521 No machine matching @a machineId found.
2522 </result>
2523 <result name="VBOX_E_INVALID_OBJECT_STATE">
2524 Session already open or being opened.
2525 </result>
2526 <result name="VBOX_E_IPRT_ERROR">
2527 Launching process for machine failed.
2528 </result>
2529 <result name="VBOX_E_VM_ERROR">
2530 Failed to assign machine to session.
2531 </result>
2532
2533 </desc>
2534 <param name="session" type="ISession" dir="in">
2535 <desc>
2536 Session object that will represent the opened remote session
2537 after successful method invocation (this object must not
2538 represent an already open session).
2539 </desc>
2540 </param>
2541 <param name="machineId" type="uuid" dir="in">
2542 <desc>ID of the virtual machine to open a session with.</desc>
2543 </param>
2544 <param name="type" type="wstring" dir="in">
2545 <desc>
2546 Type of the remote session (case sensitive).
2547 </desc>
2548 </param>
2549 <param name="environment" type="wstring" dir="in">
2550 <desc>
2551 Environment to pass to the opened session (may be @c null).
2552 </desc>
2553 </param>
2554 <param name="progress" type="IProgress" dir="return">
2555 <desc>Progress object to track the operation completion.</desc>
2556 </param>
2557 </method>
2558
2559 <method name="openExistingSession">
2560 <desc>
2561 Opens a new remote session with the virtual machine for
2562 which a direct session is already open.
2563
2564 The remote session provides some level of control over the VM
2565 execution (using the IConsole interface) to the caller; however,
2566 within the remote session context, not all VM settings are available
2567 for modification.
2568
2569 As opposed to <link to="#openRemoteSession"/>, the number of
2570 remote sessions opened this way is not limited by the API
2571
2572 <note>
2573 It is an error to open a remote session with the machine that
2574 doesn't have an open direct session.
2575 </note>
2576
2577 <result name="E_UNEXPECTED">
2578 Virtual machine not registered.
2579 </result>
2580 <result name="VBOX_E_OBJECT_NOT_FOUND">
2581 No machine matching @a machineId found.
2582 </result>
2583 <result name="VBOX_E_INVALID_OBJECT_STATE">
2584 Session already open or being opened.
2585 </result>
2586 <result name="VBOX_E_INVALID_SESSION_STATE">
2587 Direct session state not Open.
2588 </result>
2589 <result name="VBOX_E_VM_ERROR">
2590 Failed to get console object from direct session or assign
2591 machine to session.
2592 </result>
2593
2594 <see>openRemoteSession</see>
2595 </desc>
2596 <param name="session" type="ISession" dir="in">
2597 <desc>
2598 Session object that will represent the open remote session
2599 after successful method invocation. This object must not
2600 represent an already open session.
2601 <note>
2602 This session will be automatically closed when the peer
2603 (direct) session dies or gets closed.
2604 </note>
2605 </desc>
2606 </param>
2607 <param name="machineId" type="uuid" dir="in">
2608 <desc>ID of the virtual machine to open a session with.</desc>
2609 </param>
2610 </method>
2611
2612 <method name="registerCallback">
2613 <desc>
2614 Registers a new global VirtualBox callback. The methods of the given
2615 callback object will be called by VirtualBox when an appropriate
2616 event occurs.
2617
2618 <result name="E_INVALIDARG">
2619 A @c NULL callback cannot be registered.
2620 </result>
2621
2622 </desc>
2623 <param name="callback" type="IVirtualBoxCallback" dir="in">
2624 <desc>Callback object to register.</desc>
2625 </param>
2626 </method>
2627
2628 <method name="unregisterCallback">
2629 <desc>
2630 Unregisters the previously registered global VirtualBox callback.
2631
2632 <result name="E_INVALIDARG">
2633 Specified @a callback not registered.
2634 </result>
2635
2636 </desc>
2637 <param name="callback" type="IVirtualBoxCallback" dir="in">
2638 <desc>Callback object to unregister.</desc>
2639 </param>
2640 </method>
2641
2642 <method name="waitForPropertyChange">
2643 <desc>
2644 Blocks the caller until any of the properties represented by the
2645 @a what argument changes the value or until the given timeout interval
2646 expires.
2647
2648 The @a what argument is a comma separated list of property masks that
2649 describe properties the caller is interested in. The property mask is
2650 a string in the following format:
2651
2652 <pre>
2653 [[group.]subgroup.]name
2654 </pre>
2655
2656 where @c name is the property name and @c group, @c subgroup are zero
2657 or more property group specifiers. Each element (group or name) in
2658 the property mask may be either a Latin string or an asterisk symbol
2659 (@c "*") which is used to match any string for the given element. A
2660 property mask that doesn't contain asterisk symbols represents a
2661 single fully qualified property name.
2662
2663 Groups in the fully qualified property name go from more generic (the
2664 left-most part) to more specific (the right-most part). The first
2665 element is usually a name of the object the property belongs to. The
2666 second element may be either a property name, or a child object name,
2667 or an index if the preceding element names an object which is one of
2668 many objects of the same type. This way, property names form a
2669 hierarchy of properties. Here are some examples of property names:
2670
2671 <table>
2672 <tr>
2673 <td><tt>VirtualBox.version</tt></td>
2674 <td><link to="IVirtualBox::version"/> property</td>
2675 </tr>
2676 <tr>
2677 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2678 <td><link to="IMachine::name"/> property of the machine with the
2679 given UUID</td>
2680 </tr>
2681 </table>
2682
2683 Most property names directly correspond to the properties of objects
2684 (components) provided by the VirtualBox library and may be used to
2685 track changes to these properties. However, there may be
2686 pseudo-property names that don't correspond to any existing object's
2687 property directly, as well as there may be object properties that
2688 don't have a corresponding property name that is understood by this
2689 method, and therefore changes to such properties cannot be
2690 tracked. See individual object's property descriptions to get a
2691 fully qualified property name that can be used with this method (if
2692 any).
2693
2694 There is a special property mask @c "*" (i.e. a string consisting of a
2695 single asterisk symbol) that can be used to match all properties.
2696 Below are more examples of property masks:
2697
2698 <table>
2699 <tr>
2700 <td><tt>VirtualBox.*</tt></td>
2701 <td>Track all properties of the VirtualBox object</td>
2702 </tr>
2703 <tr>
2704 <td><tt>Machine.*.name</tt></td>
2705 <td>Track changes to the <link to="IMachine::name"/> property of
2706 all registered virtual machines</td>
2707 </tr>
2708 </table>
2709
2710 <note>
2711 This function is not implemented in the current version of the
2712 product.
2713 </note>
2714 </desc>
2715 <param name="what" type="wstring" dir="in">
2716 <desc>Comma separated list of property masks.</desc>
2717 </param>
2718 <param name="timeout" type="unsigned long" dir="in">
2719 <desc>
2720 Wait timeout in milliseconds.
2721 Specify -1 for an indefinite wait.
2722 </desc>
2723 </param>
2724 <param name="changed" type="wstring" dir="out">
2725 <desc>
2726 Comma separated list of properties that have been changed and caused
2727 this method to return to the caller.
2728 </desc>
2729 </param>
2730 <param name="values" type="wstring" dir="out">
2731 <desc>Reserved, not currently used.</desc>
2732 </param>
2733 </method>
2734
2735 <method name="saveSettings">
2736 <desc>
2737 Saves the global settings to the global settings file
2738 (<link to="#settingsFilePath"/>).
2739
2740 This method is only useful for explicitly saving the global settings
2741 file after it has been auto-converted from the old format to the most
2742 recent format (see <link to="#settingsFileVersion"/> for details).
2743 Normally, the global settings file is implicitly saved when a global
2744 setting is changed.
2745
2746 <result name="VBOX_E_FILE_ERROR">
2747 Settings file not accessible.
2748 </result>
2749 <result name="VBOX_E_XML_ERROR">
2750 Could not parse the settings file.
2751 </result>
2752
2753 </desc>
2754 </method>
2755
2756 <method name="saveSettingsWithBackup">
2757 <desc>
2758 Creates a backup copy of the global settings file
2759 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2760 calls <link to="#saveSettings"/>.
2761
2762 Note that the backup copy is created <b>only</b> if the settings file
2763 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2764 details). Otherwise, this call is fully equivalent to
2765 <link to="#saveSettings"/> and no backup copying is done.
2766
2767 The backup copy is created in the same directory where the original
2768 settings file is located. It is given the following file name:
2769 <pre>
2770 original.xml.x.y-platform.bak
2771 </pre>
2772 where <tt>original.xml</tt> is the original settings file name
2773 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2774 format of the settings file (before auto-conversion).
2775
2776 If the given backup file already exists, this method will try to add the
2777 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2778 0 to 9) and copy it again until it succeeds. If all suffixes are
2779 occupied, or if any other copy error occurs, this method will return a
2780 failure.
2781
2782 If the copy operation succeeds, the @a bakFileName return argument will
2783 receive a full path to the created backup file (for informational
2784 purposes). Note that this will happen even if the subsequent
2785 <link to="#saveSettings"/> call performed by this method after the
2786 copy operation, fails.
2787
2788 <note>
2789 The VirtualBox API never calls this method. It is intended purely for
2790 the purposes of creating backup copies of the settings files by
2791 front-ends before saving the results of the automatically performed
2792 settings conversion to disk.
2793 </note>
2794
2795 <see>settingsFileVersion</see>
2796
2797 <result name="VBOX_E_FILE_ERROR">
2798 Settings file not accessible.
2799 </result>
2800 <result name="VBOX_E_XML_ERROR">
2801 Could not parse the settings file.
2802 </result>
2803 <result name="VBOX_E_IPRT_ERROR">
2804 Could not copy the settings file.
2805 </result>
2806
2807 </desc>
2808 <param name="bakFileName" type="wstring" dir="return">
2809 <desc>Full path to the created backup copy.</desc>
2810 </param>
2811 </method>
2812
2813 <!--method name="createDHCPServerForInterface">
2814 <desc>
2815 Creates a dhcp server settings to be used for the given interface
2816 <result name="E_INVALIDARG">
2817 Host network interface @a name already exists.
2818 </result>
2819 </desc>
2820 <param name="interface" type="IHostNetworkInterface" dir="in">
2821 <desc>Network Interface</desc>
2822 </param>
2823 <param name="server" type="IDHCPServer" dir="out">
2824 <desc>Dhcp server settings</desc>
2825 </param>
2826 </method-->
2827
2828 <method name="createDHCPServer">
2829 <desc>
2830 Creates a dhcp server settings to be used for the given internal network name
2831 <result name="E_INVALIDARG">
2832 Host network interface @a name already exists.
2833 </result>
2834 </desc>
2835 <param name="name" type="wstring" dir="in">
2836 <desc>server name</desc>
2837 </param>
2838 <param name="server" type="IDHCPServer" dir="return">
2839 <desc>Dhcp server settings</desc>
2840 </param>
2841 </method>
2842
2843 <method name="findDHCPServerByNetworkName">
2844 <desc>
2845 Searches a dhcp server settings to be used for the given internal network name
2846 <result name="E_INVALIDARG">
2847 Host network interface @a name already exists.
2848 </result>
2849
2850 </desc>
2851 <param name="name" type="wstring" dir="in">
2852 <desc>server name</desc>
2853 </param>
2854 <param name="server" type="IDHCPServer" dir="return">
2855 <desc>Dhcp server settings</desc>
2856 </param>
2857 </method>
2858
2859 <!--method name="findDHCPServerForInterface">
2860 <desc>
2861 Searches a dhcp server settings to be used for the given interface
2862 <result name="E_INVALIDARG">
2863 Host network interface @a name already exists.
2864 </result>
2865 </desc>
2866 <param name="interface" type="IHostNetworkInterface" dir="in">
2867 <desc>Network Interface</desc>
2868 </param>
2869 <param name="server" type="IDHCPServer" dir="out">
2870 <desc>Dhcp server settings</desc>
2871 </param>
2872 </method-->
2873
2874 <method name="removeDHCPServer">
2875 <desc>
2876 Removes the dhcp server settings
2877 <result name="E_INVALIDARG">
2878 Host network interface @a name already exists.
2879 </result>
2880 </desc>
2881 <param name="server" type="IDHCPServer" dir="in">
2882 <desc>Dhcp server settings to be removed</desc>
2883 </param>
2884 </method>
2885
2886 </interface>
2887
2888 <!--
2889 // IAppliance
2890 /////////////////////////////////////////////////////////////////////////
2891 -->
2892
2893 <enum
2894 name="CIMOSType"
2895 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2896 >
2897 <desc>
2898 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2899 </desc>
2900
2901 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2902 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2903 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2904 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2905 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2906 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2907 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2908 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2909 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2910 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2911 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2912 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2913 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2914 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2915 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2916 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2917 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2918 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2919 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2920 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2921 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2922 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2923 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2924 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2925 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2926 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2927 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2928 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2929 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2930 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2931 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2932 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2933 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2934 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2935 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2936 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2937 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2938 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2939 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2940 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2941 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2942 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2943 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2944 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2945 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2946 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2947 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2948 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2949 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2950 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2951 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2952 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2953 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2954 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2955 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2956 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2957 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2958 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2959 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2960 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2961 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2962 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2963 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2964 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2965 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2966 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2967 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2968 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2969 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2970 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2971 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2972 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2973 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2974 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2975 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2976 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2977 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2978 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2979 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2980 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2981 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2982 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2983 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2984 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2985 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2986 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2987 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2988 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2989 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2990 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2991 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2992 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2993 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2994 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2995 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2996 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2997 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2998 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2999 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
3000 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
3001 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
3002 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
3003 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
3004 </enum>
3005
3006 <enum
3007 name="OVFResourceType"
3008 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
3009 >
3010 <desc>
3011 OVF resource type (as listed with CIM_ResourceAllocationSettingData; see for example
3012 http://msdn.microsoft.com/en-us/library/cc136877(VS.85).aspx).
3013 </desc>
3014
3015 <const name="Other" value="1" />
3016 <const name="ComputerSystem" value="2" />
3017 <const name="Processor" value="3" />
3018 <const name="Memory" value="4" />
3019 <const name="IDEController" value="5" />
3020 <const name="ParallelSCSIHBA" value="6" />
3021 <const name="FCHBA" value="7" />
3022 <const name="iSCSIHBA" value="8" />
3023 <const name="IBHCA" value="9" />
3024 <const name="EthernetAdapter" value="10" />
3025 <const name="OtherNetworkAdapter" value="11" />
3026 <const name="IOSlot" value="12" />
3027 <const name="IODevice" value="13" />
3028 <const name="FloppyDrive" value="14" />
3029 <const name="CDDrive" value="15" />
3030 <const name="DVDDrive" value="16" />
3031 <const name="HardDisk" value="17" />
3032 <const name="OtherStorageDevice" value="20" />
3033 <const name="USBController" value="23" />
3034 <const name="SoundCard" value="35" />
3035 </enum>
3036
3037 <interface
3038 name="IAppliance" extends="$unknown"
3039 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
3040 wsmap="managed"
3041 >
3042 <desc>
3043 Represents a platform-independent appliance in OVF format. An instance of this is returned
3044 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3045 appliances with VirtualBox.
3046
3047 The OVF standard suggests two different physical file formats:
3048
3049 <ol>
3050 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3051 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3052 this descriptor file references other files, as OVF appliances distributed as a set of
3053 files most likely do, those files must be in the same directory as the descriptor file.</li>
3054
3055 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3056 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3057 files and optionally other files.
3058
3059 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3060 be added with a later version.</li>
3061 </ol>
3062
3063 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3064 <link to="IMachine" /> involves the following sequence of API calls:
3065
3066 <ol>
3067 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3068 </li>
3069
3070 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3071 would like to import. So long as this file is syntactically valid, this will succeed
3072 and return an instance of IAppliance that contains the parsed data from the OVF file.
3073 </li>
3074
3075 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3076 contents of the IAppliance attributes accordingly. These can be inspected by a
3077 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3078 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3079 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3080 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3081 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3082 The GUI can then give the user the option to confirm and/or change these suggestions.
3083 </li>
3084
3085 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3086 virtual system to override the suggestions made by the interpret() routine.
3087 </li>
3088
3089 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3090 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3091 virtual system descriptions.
3092 </li>
3093 </ol>
3094
3095 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3096
3097 <ol>
3098 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3099 an empty IAppliance object.
3100 </li>
3101
3102 <li>For each machine you would like to export, call <link to="IMachine::export" />
3103 with the IAppliance object you just created. This creates an instance of
3104 <link to="IVirtualSystemDescription" /> inside the appliance.
3105 </li>
3106
3107 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3108 virtual system to override the suggestions made by the export() routine.
3109 </li>
3110
3111 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3112 file written.</li>
3113 </ol>
3114
3115 </desc>
3116
3117 <attribute name="path" type="wstring" readonly="yes">
3118 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3119 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3120 <link to="#write" /> (for export).
3121 This attribute is empty until one of these methods has been called.
3122 </desc>
3123 </attribute>
3124
3125 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3126 <desc>
3127 Array of virtual disk definitions. One such description exists for each
3128 disk definition in the OVF; each string array item represents one such piece of
3129 disk information, with the information fields separated by tab (\t) characters.
3130
3131 The caller should be prepared for additional fields being appended to
3132 this string in future versions of VirtualBox and therefore check for
3133 the number of tabs in the strings returned.
3134
3135 In the current version, the following eight fields are returned per string
3136 in the array:
3137
3138 <ol>
3139 <li>Disk ID (unique string identifier given to disk)</li>
3140
3141 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3142
3143 <li>Populated size (optional unsigned integer indicating the current size of the
3144 disk; can be approximate; -1 if unspecified)</li>
3145
3146 <li>Format (string identifying the disk format, typically
3147 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3148
3149 <li>Reference (where to find the disk image, typically a file name; if empty,
3150 then the disk should be created on import)</li>
3151
3152 <li>Image size (optional unsigned integer indicating the size of the image,
3153 which need not necessarily be the same as the values specified above, since
3154 the image may be compressed or sparse; -1 if not specified)</li>
3155
3156 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3157 presently unsupported and always -1)</li>
3158
3159 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3160 </ol>
3161 </desc>
3162 </attribute>
3163
3164 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3165 <desc> Array of virtual system descriptions. One such description is created
3166 for each virtual system found in the OVF.
3167 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3168 (for export) has been called.
3169 </desc>
3170 </attribute>
3171
3172 <method name="read">
3173 <desc>
3174 Reads an OVF file into the appliance object.
3175
3176 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3177 mere fact that this method returns successfully does not mean that VirtualBox supports all
3178 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3179 </desc>
3180 <param name="file" type="wstring" dir="in">
3181 <desc>
3182 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3183 on whether the appliance is distributed as a set of files or as a single file, respectively).
3184 </desc>
3185 </param>
3186 </method>
3187
3188 <method name="interpret">
3189 <desc>
3190 Interprets the OVF data that was read when the appliance was constructed. After
3191 calling this method, one can inspect the
3192 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3193 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3194 the appliance.
3195
3196 Calling this method is the second step of importing an appliance into VirtualBox;
3197 see <link to="IAppliance" /> for an overview.
3198
3199 After calling this method, one should call <link to="#getWarnings" /> to find out
3200 if problems were encountered during the processing which might later lead to
3201 errors.
3202 </desc>
3203 </method>
3204
3205 <method name="importMachines">
3206 <desc>
3207 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3208 and other interfaces that match the information contained in the appliance as
3209 closely as possible, as represented by the import instructions in the
3210 <link to="#virtualSystemDescriptions" /> array.
3211
3212 Calling this method is the final step of importing an appliance into VirtualBox;
3213 see <link to="IAppliance" /> for an overview.
3214
3215 Since importing the appliance will most probably involve copying and converting
3216 disk images, which can take a long time, this method operates asynchronously and
3217 returns an IProgress object to allow the caller to monitor the progress.
3218 </desc>
3219
3220 <param name="aProgress" type="IProgress" dir="return">
3221 <desc></desc>
3222 </param>
3223 </method>
3224
3225 <method name="write">
3226 <desc>
3227 Writes the contents of the appliance exports into a new OVF file.
3228
3229 Calling this method is the final step of exporting an appliance from VirtualBox;
3230 see <link to="IAppliance" /> for an overview.
3231
3232 Since exporting the appliance will most probably involve copying and converting
3233 disk images, which can take a long time, this method operates asynchronously and
3234 returns an IProgress object to allow the caller to monitor the progress.
3235 </desc>
3236 <param name="path" type="wstring" dir="in">
3237 <desc>
3238 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3239 on whether the appliance is distributed as a set of files or as a single file, respectively).
3240 </desc>
3241 </param>
3242 <param name="aProgress" type="IProgress" dir="return">
3243 <desc></desc>
3244 </param>
3245 </method>
3246
3247 <method name="getWarnings">
3248 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3249
3250 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3251 <desc></desc>
3252 </param>
3253 </method>
3254
3255 </interface>
3256
3257 <enum
3258 name="VirtualSystemDescriptionType"
3259 uuid="325e7fec-ce06-4174-9654-98f99478d03f"
3260 >
3261 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3262 a configuration value.</desc>
3263
3264 <const name="Ignore" value="1" />
3265 <const name="OS" value="2" />
3266 <const name="Name" value="3" />
3267 <const name="Description" value="4" />
3268 <const name="License" value="5" />
3269 <const name="CPU" value="6" />
3270 <const name="Memory" value="7" />
3271 <const name="HardDiskControllerIDE" value="8" />
3272 <const name="HardDiskControllerSATA" value="9" />
3273 <const name="HardDiskControllerSCSI" value="10" />
3274 <const name="HardDiskImage" value="11" />
3275 <const name="Floppy" value="12" />
3276 <const name="CDROM" value="13" />
3277 <const name="NetworkAdapter" value="14" />
3278 <const name="USBController" value="15" />
3279 <const name="SoundCard" value="16" />
3280
3281 </enum>
3282
3283 <enum
3284 name="VirtualSystemDescriptionValueType"
3285 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3286 >
3287 <desc>Used with <link to="GetValuesByType" /> to describe the value
3288 type to fetch.</desc>
3289
3290 <const name="Reference" value="1" />
3291 <const name="Original" value="2" />
3292 <const name="Auto" value="3" />
3293 <const name="ExtraConfig" value="4" />
3294
3295 </enum>
3296
3297 <interface
3298 name="IVirtualSystemDescription" extends="$unknown"
3299 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3300 wsmap="managed"
3301 >
3302
3303 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3304 After <link to="IAppliance::interpret" /> has been called, that array contains
3305 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3306 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3307 into VirtualBox.
3308 </desc>
3309
3310 <attribute name="count" type="unsigned long" readonly="yes">
3311 <desc>Return the number of virtual system description entries.</desc>
3312 </attribute>
3313
3314 <method name="getDescription">
3315 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3316 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3317
3318 The list below identifies the value sets that are possible depending on the
3319 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3320 the array item with the same index in aOvfValues[] will contain the original value as contained
3321 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3322 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3323 the aExtraConfigValues[] array item may also be used.
3324
3325 <ul>
3326 <li>
3327 "OS": the guest operating system type. There must be exactly one such array item on import. The
3328 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3329 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3330 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3331 (see <link to="CIMOSType" />).
3332 </li>
3333 <li>
3334 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3335 if none is present on import, then an automatic name will be created from the operating system
3336 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3337 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3338 <link to="IMachine" /> name that does not exist yet.
3339 </li>
3340 <li>
3341 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3342 </li>
3343 <li>
3344 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3345 is present on import, then VirtualBox will set a meaningful default based on the operating system
3346 type.
3347 </li>
3348 <li>
3349 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3350 has no value in aOvfValues[] or aVboxValues[].
3351 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3352 type can use to specify which hard disk controller a virtual disk should be connected to.
3353 </li>
3354 <li>
3355 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3356 has no value in aOvfValues[] or aVboxValues[].
3357 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3358 </li>
3359 <li>
3360 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3361 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3362 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3363 </li>
3364 <li>
3365 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3366 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3367
3368 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3369 a path since the image file should be in the same location as the OVF file itself), whereas the
3370 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3371 hard disk image. This means that on import the image will be copied and converted from the
3372 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3373 On import, the target image will also be registered with VirtualBox.
3374
3375 The matching item in the aExtraConfigValues[] array must contain a string of the following
3376 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3377 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3378 the image to. That number must be the index of an array item with one of the hard disk controller
3379 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3380 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3381 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3382 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3383 SCSI conrollers, the channel can range from 0-29.
3384 </li>
3385 <li>
3386 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3387 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3388 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3389 </li>
3390 <li>
3391 "USBController": a USB controller. There can be at most one such item. If and only if such an
3392 item ispresent, USB support will be enabled for the new virtual machine.
3393 </li>
3394 <li>
3395 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3396 present, sound support will be enabled for the new virtual machine. Note that the virtual
3397 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3398 may be different from the virtual soundcard expected by the appliance.
3399 </li>
3400 </ul>
3401
3402 </desc>
3403
3404 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3405 <desc></desc>
3406 </param>
3407
3408 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3409 <desc></desc>
3410 </param>
3411
3412 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3413 <desc></desc>
3414 </param>
3415
3416 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3417 <desc></desc>
3418 </param>
3419
3420 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3421 <desc></desc>
3422 </param>
3423
3424 </method>
3425
3426 <method name="getDescriptionByType">
3427 <desc>This is the same as <link to="getDescription" /> except that you can specify which types
3428 should be returned.</desc>
3429
3430 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3431 <desc></desc>
3432 </param>
3433
3434 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3435 <desc></desc>
3436 </param>
3437
3438 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3439 <desc></desc>
3440 </param>
3441
3442 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3443 <desc></desc>
3444 </param>
3445
3446 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3447 <desc></desc>
3448 </param>
3449
3450 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3451 <desc></desc>
3452 </param>
3453
3454 </method>
3455
3456 <method name="getValuesByType">
3457 <desc>This is the same as <link to="getDescriptionByType" /> except that you can specify which
3458 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3459 values.</desc>
3460
3461 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3462 <desc></desc>
3463 </param>
3464
3465 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3466 <desc></desc>
3467 </param>
3468
3469 <param name="aValues" type="wstring" dir="return" safearray="yes">
3470 <desc></desc>
3471 </param>
3472
3473 </method>
3474
3475 <method name="setFinalValues">
3476 <desc>
3477 This method allows the appliance's user to change the configuration for the virtual
3478 system descriptions. For each array item returned from <link to="getDescription" />,
3479 you must pass in one boolean value and one configuration value.
3480
3481 Each item in the boolean array determines whether the particular configuration item
3482 should be enabled.
3483 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3484 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3485 and SoundCard.
3486
3487 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3488 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3489 the configuration remains unchanged. Please see the documentation for getDescription()
3490 for valid configuration values for the individual array item types. If the
3491 corresponding item in the aEnabled array is false, the configuration value is ignored.
3492 </desc>
3493
3494 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3495 <desc></desc>
3496 </param>
3497
3498 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3499 <desc></desc>
3500 </param>
3501
3502 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3503 <desc></desc>
3504 </param>
3505 </method>
3506
3507 <method name="addDescription">
3508 <desc>
3509 This method adds an additional description entry to the stack of already
3510 available descriptions for this virtual system. This is handy for writing
3511 values which aren't directly supported by VirtualBox. One example would
3512 be the License type of <link to="VirtualSystemDescriptionType" />.
3513 </desc>
3514
3515 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3516 <desc></desc>
3517 </param>
3518
3519 <param name="aVboxValue" type="wstring" dir="in">
3520 <desc></desc>
3521 </param>
3522
3523 <param name="aExtraConfigValue" type="wstring" dir="in">
3524 <desc></desc>
3525 </param>
3526 </method>
3527 </interface>
3528
3529
3530 <!--
3531 // IMachine
3532 /////////////////////////////////////////////////////////////////////////
3533 -->
3534
3535 <interface
3536 name="IInternalMachineControl" extends="$unknown"
3537 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3538 internal="yes"
3539 wsmap="suppress"
3540 >
3541 <method name="updateState">
3542 <desc>
3543 Updates the VM state.
3544 <note>
3545 This operation will also update the settings file with
3546 the correct information about the saved state file
3547 and delete this file from disk when appropriate.
3548 </note>
3549 </desc>
3550 <param name="state" type="MachineState" dir="in"/>
3551 </method>
3552
3553 <method name="getIPCId">
3554 <param name="id" type="wstring" dir="return"/>
3555 </method>
3556
3557 <method name="runUSBDeviceFilters">
3558 <desc>
3559 Asks the server to run USB devices filters of the associated
3560 machine against the given USB device and tell if there is
3561 a match.
3562 <note>
3563 Intended to be used only for remote USB devices. Local
3564 ones don't require to call this method (this is done
3565 implicitly by the Host and USBProxyService).
3566 </note>
3567 </desc>
3568 <param name="device" type="IUSBDevice" dir="in"/>
3569 <param name="matched" type="boolean" dir="out"/>
3570 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3571 </method>
3572
3573 <method name="captureUSBDevice">
3574 <desc>
3575 Requests a capture of the given host USB device.
3576 When the request is completed, the VM process will
3577 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3578 notification.
3579 </desc>
3580 <param name="id" type="uuid" dir="in"/>
3581 </method>
3582
3583 <method name="detachUSBDevice">
3584 <desc>
3585 Notification that a VM is going to detach (done = false) or has
3586 already detached (done = true) the given USB device.
3587 When the done = true request is completed, the VM process will
3588 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3589 notification.
3590 <note>
3591 In the done = true case, the server must run its own filters
3592 and filters of all VMs but this one on the detached device
3593 as if it were just attached to the host computer.
3594 </note>
3595 </desc>
3596 <param name="id" type="uuid" dir="in"/>
3597 <param name="done" type="boolean" dir="in"/>
3598 </method>
3599
3600 <method name="autoCaptureUSBDevices">
3601 <desc>
3602 Requests a capture all matching USB devices attached to the host.
3603 When the request is completed, the VM process will
3604 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3605 notification per every captured device.
3606 </desc>
3607 </method>
3608
3609 <method name="detachAllUSBDevices">
3610 <desc>
3611 Notification that a VM that is being powered down. The done
3612 parameter indicates whether which stage of the power down
3613 we're at. When done = false the VM is announcing its
3614 intentions, while when done = true the VM is reporting
3615 what it has done.
3616 <note>
3617 In the done = true case, the server must run its own filters
3618 and filters of all VMs but this one on all detach devices as
3619 if they were just attached to the host computer.
3620 </note>
3621 </desc>
3622 <param name="done" type="boolean" dir="in"/>
3623 </method>
3624
3625 <method name="onSessionEnd">
3626 <desc>
3627 Triggered by the given session object when the session is about
3628 to close normally.
3629 </desc>
3630 <param name="session" type="ISession" dir="in">
3631 <desc>Session that is being closed</desc>
3632 </param>
3633 <param name="progress" type="IProgress" dir="return">
3634 <desc>
3635 Used to wait until the corresponding machine is actually
3636 dissociated from the given session on the server.
3637 Returned only when this session is a direct one.
3638 </desc>
3639 </param>
3640 </method>
3641
3642 <method name="beginSavingState">
3643 <desc>
3644 Called by the VM process to inform the server it wants to
3645 save the current state and stop the VM execution.
3646 </desc>
3647 <param name="progress" type="IProgress" dir="in">
3648 <desc>
3649 Progress object created by the VM process to wait until
3650 the state is saved.
3651 </desc>
3652 </param>
3653 <param name="stateFilePath" type="wstring" dir="out">
3654 <desc>
3655 File path the VM process must save the execution state to.
3656 </desc>
3657 </param>
3658 </method>
3659
3660 <method name="endSavingState">
3661 <desc>
3662 Called by the VM process to inform the server that saving
3663 the state previously requested by #beginSavingState is either
3664 successfully finished or there was a failure.
3665
3666 <result name="VBOX_E_FILE_ERROR">
3667 Settings file not accessible.
3668 </result>
3669 <result name="VBOX_E_XML_ERROR">
3670 Could not parse the settings file.
3671 </result>
3672
3673 </desc>
3674
3675 <param name="success" type="boolean" dir="in">
3676 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3677 otherwise.
3678 </desc>
3679 </param>
3680 </method>
3681
3682 <method name="adoptSavedState">
3683 <desc>
3684 Gets called by IConsole::adoptSavedState.
3685 <result name="VBOX_E_FILE_ERROR">
3686 Invalid saved state file path.
3687 </result>
3688 </desc>
3689 <param name="savedStateFile" type="wstring" dir="in">
3690 <desc>Path to the saved state file to adopt.</desc>
3691 </param>
3692 </method>
3693
3694 <method name="beginTakingSnapshot">
3695 <desc>
3696 Called by the VM process to inform the server it wants to
3697 take a snapshot.
3698
3699 <result name="VBOX_E_FILE_ERROR">
3700 Settings file not accessible.
3701 </result>
3702 <result name="VBOX_E_XML_ERROR">
3703 Could not parse the settings file.
3704 </result>
3705 </desc>
3706 <param name="initiator" type="IConsole" dir="in">
3707 <desc>The console object that initiated this call.</desc>
3708 </param>
3709 <param name="name" type="wstring" dir="in">
3710 <desc>Snapshot name.</desc>
3711 </param>
3712 <param name="description" type="wstring" dir="in">
3713 <desc>Snapshot description.</desc>
3714 </param>
3715 <param name="progress" type="IProgress" dir="in">
3716 <desc>
3717 Progress object created by the VM process to wait until
3718 the state is saved (only for online snapshots).
3719 </desc>
3720 </param>
3721 <param name="stateFilePath" type="wstring" dir="out">
3722 <desc>
3723 File path the VM process must save the execution state to.
3724 </desc>
3725 </param>
3726 <param name="serverProgress" type="IProgress" dir="out">
3727 <desc>
3728 Progress object created by the server process to wait until
3729 the snapshot is taken (VDI diff creation, etc.).
3730 </desc>
3731 </param>
3732 </method>
3733
3734 <method name="endTakingSnapshot">
3735 <desc>
3736 Called by the VM process to inform the server that the snapshot
3737 previously requested by #beginTakingSnapshot is either
3738 successfully taken or there was a failure.
3739 </desc>
3740
3741 <param name="success" type="boolean" dir="in">
3742 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3743 </param>
3744 </method>
3745
3746 <method name="discardSnapshot">
3747 <desc>
3748 Gets called by IConsole::discardSnapshot.
3749 <result name="VBOX_E_INVALID_OBJECT_STATE">
3750 Snapshot has more than one child snapshot.
3751 </result>
3752 </desc>
3753 <param name="initiator" type="IConsole" dir="in">
3754 <desc>The console object that initiated this call.</desc>
3755 </param>
3756 <param name="id" type="uuid" dir="in">
3757 <desc>UUID of the snapshot to discard.</desc>
3758 </param>
3759 <param name="machineState" type="MachineState" dir="out">
3760 <desc>New machine state after this operation is started.</desc>
3761 </param>
3762 <param name="progress" type="IProgress" dir="return">
3763 <desc>Progress object to track the operation completion.</desc>
3764 </param>
3765 </method>
3766
3767 <method name="discardCurrentState">
3768 <desc>
3769 Gets called by IConsole::discardCurrentState.
3770 <result name="VBOX_E_INVALID_OBJECT_STATE">
3771 Virtual machine does not have any snapshot.
3772 </result>
3773 </desc>
3774 <param name="initiator" type="IConsole" dir="in">
3775 <desc>The console object that initiated this call.</desc>
3776 </param>
3777 <param name="machineState" type="MachineState" dir="out">
3778 <desc>New machine state after this operation is started.</desc>
3779 </param>
3780 <param name="progress" type="IProgress" dir="return">
3781 <desc>Progress object to track the operation completion.</desc>
3782 </param>
3783 </method>
3784
3785 <method name="discardCurrentSnapshotAndState">
3786 <desc>
3787 Gets called by IConsole::discardCurrentSnapshotAndState.
3788 <result name="VBOX_E_INVALID_OBJECT_STATE">
3789 Virtual machine does not have any snapshot.
3790 </result>
3791 </desc>
3792 <param name="initiator" type="IConsole" dir="in">
3793 <desc>The console object that initiated this call.</desc>
3794 </param>
3795 <param name="machineState" type="MachineState" dir="out">
3796 <desc>New machine state after this operation is started.</desc>
3797 </param>
3798 <param name="progress" type="IProgress" dir="return">
3799 <desc>Progress object to track the operation completion.</desc>
3800 </param>
3801 </method>
3802
3803 <method name="pullGuestProperties">
3804 <desc>
3805 Get the list of the guest properties matching a set of patterns along
3806 with their values, time stamps and flags and give responsibility for
3807 managing properties to the console.
3808 </desc>
3809 <param name="name" type="wstring" dir="out" safearray="yes">
3810 <desc>
3811 The names of the properties returned.
3812 </desc>
3813 </param>
3814 <param name="value" type="wstring" dir="out" safearray="yes">
3815 <desc>
3816 The values of the properties returned. The array entries match the
3817 corresponding entries in the @a name array.
3818 </desc>
3819 </param>
3820 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3821 <desc>
3822 The time stamps of the properties returned. The array entries match
3823 the corresponding entries in the @a name array.
3824 </desc>
3825 </param>
3826 <param name="flags" type="wstring" dir="out" safearray="yes">
3827 <desc>
3828 The flags of the properties returned. The array entries match the
3829 corresponding entries in the @a name array.
3830 </desc>
3831 </param>
3832 </method>
3833
3834 <method name="pushGuestProperties">
3835 <desc>
3836 Set the list of the guest properties matching a set of patterns along
3837 with their values, time stamps and flags and return responsibility for
3838 managing properties to IMachine.
3839 </desc>
3840 <param name="name" type="wstring" dir="in" safearray="yes">
3841 <desc>
3842 The names of the properties.
3843 </desc>
3844 </param>
3845 <param name="value" type="wstring" dir="in" safearray="yes">
3846 <desc>
3847 The values of the properties. The array entries match the
3848 corresponding entries in the @a name array.
3849 </desc>
3850 </param>
3851 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3852 <desc>
3853 The time stamps of the properties. The array entries match
3854 the corresponding entries in the @a name array.
3855 </desc>
3856 </param>
3857 <param name="flags" type="wstring" dir="in" safearray="yes">
3858 <desc>
3859 The flags of the properties. The array entries match the
3860 corresponding entries in the @a name array.
3861 </desc>
3862 </param>
3863 </method>
3864 <method name="pushGuestProperty">
3865 <desc>
3866 Update a single guest property in IMachine.
3867 </desc>
3868 <param name="name" type="wstring" dir="in">
3869 <desc>
3870 The name of the property to be updated.
3871 </desc>
3872 </param>
3873 <param name="value" type="wstring" dir="in">
3874 <desc>
3875 The value of the property.
3876 </desc>
3877 </param>
3878 <param name="timestamp" type="unsigned long long" dir="in">
3879 <desc>
3880 The timestamp of the property.
3881 </desc>
3882 </param>
3883 <param name="flags" type="wstring" dir="in">
3884 <desc>
3885 The flags of the property.
3886 </desc>
3887 </param>
3888 </method>
3889
3890 <method name="lockMedia">
3891 <desc>
3892 Locks all media attached to the machine for writing and parents of
3893 attahced different hard disks (if any) for reading. This operation is
3894 atomic so that if it fails no media is actually locked.
3895
3896 This method is intended to be called when the machine is in Starting or
3897 Restoring state. The locked media will be automatically unlocked when
3898 the machine is powered off or crashed.
3899 </desc>
3900 </method>
3901 </interface>
3902
3903 <interface
3904 name="IBIOSSettings" extends="$unknown"
3905 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3906 wsmap="managed"
3907 >
3908 <desc>
3909 The IBIOSSettings interface represents BIOS settings of the virtual
3910 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3911 </desc>
3912 <attribute name="logoFadeIn" type="boolean">
3913 <desc>Fade in flag for BIOS logo animation.</desc>
3914 </attribute>
3915
3916 <attribute name="logoFadeOut" type="boolean">
3917 <desc>Fade out flag for BIOS logo animation.</desc>
3918 </attribute>
3919
3920 <attribute name="logoDisplayTime" type="unsigned long">
3921 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3922 </attribute>
3923
3924 <attribute name="logoImagePath" type="wstring">
3925 <desc>Local file system path for external BIOS image.</desc>
3926 </attribute>
3927
3928 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3929 <desc>Mode of the BIOS boot device menu.</desc>
3930 </attribute>
3931
3932 <attribute name="ACPIEnabled" type="boolean">
3933 <desc>ACPI support flag.</desc>
3934 </attribute>
3935
3936 <attribute name="IOAPICEnabled" type="boolean">
3937 <desc>
3938 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3939 and support IRQs above 15.
3940 </desc>
3941 </attribute>
3942
3943 <attribute name="timeOffset" type="long long">
3944 <desc>
3945 Offset in milliseconds from the host system time. This allows for
3946 guests running with a different system date/time than the host.
3947 It is equivalent to setting the system date/time in the BIOS except
3948 it is not an absolute value but a relative one. Guest Additions
3949 time synchronization honors this offset.
3950 </desc>
3951 </attribute>
3952
3953 <attribute name="PXEDebugEnabled" type="boolean">
3954 <desc>
3955 PXE debug logging flag. If set, VirtualBox will write extensive
3956 PXE trace information to the release log.
3957 </desc>
3958 </attribute>
3959
3960 </interface>
3961
3962 <interface
3963 name="IMachine" extends="$unknown"
3964 uuid="13420cbb-175a-4456-85d0-301126dfdec7"
3965 wsmap="managed"
3966 >
3967 <desc>
3968 The IMachine interface represents a virtual machine, or guest, created
3969 in VirtualBox.
3970
3971 This interface is used in two contexts. First of all, a collection of
3972 objects implementing this interface is stored in the
3973 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3974 machines that are currently registered with this VirtualBox
3975 installation. Also, once a session has been opened for the given virtual
3976 machine (e.g. the virtual machine is running), the machine object
3977 associated with the open session can be queried from the session object;
3978 see <link to="ISession"/> for details.
3979
3980 The main role of this interface is to expose the settings of the virtual
3981 machine and provide methods to change various aspects of the virtual
3982 machine's configuration. For machine objects stored in the
3983 <link to="IVirtualBox::machines"/> collection, all attributes are
3984 read-only unless explicitly stated otherwise in individual attribute
3985 and method descriptions. In order to change a machine setting, a session
3986 for this machine must be opened using one of
3987 <link to="IVirtualBox::openSession"/>,
3988 <link to="IVirtualBox::openRemoteSession"/> or
3989 <link to="IVirtualBox::openExistingSession"/> methods. After the
3990 session has been successfully opened, a mutable machine object needs to
3991 be queried from the session object and then the desired settings changes
3992 can be applied to the returned object using IMachine attributes and
3993 methods. See the ISession interface description for more information
3994 about sessions.
3995
3996 Note that the IMachine interface does not provide methods to control
3997 virtual machine execution (such as start the machine, or power it
3998 down) -- these methods are grouped in a separate IConsole
3999 interface. Refer to the IConsole interface description to get more
4000 information about this topic.
4001
4002 <see>ISession, IConsole</see>
4003 </desc>
4004
4005 <attribute name="parent" type="IVirtualBox" readonly="yes">
4006 <desc>Associated parent object.</desc>
4007 </attribute>
4008
4009 <attribute name="accessible" type="boolean" readonly="yes">
4010 <desc>
4011 Whether this virtual machine is currently accessible or not.
4012
4013 The machine is considered to be inaccessible when:
4014 <ul>
4015 <li>It is a registered virtual machine, and
4016 </li>
4017 <li>Its settings file is inaccessible (for example, it is
4018 located on a network share that is not accessible during
4019 VirtualBox startup, or becomes inaccessible later, or if
4020 the settings file can be read but is invalid).
4021 </li>
4022 </ul>
4023
4024 Otherwise, the value of this property is always <tt>true</tt>.
4025
4026 Every time this property is read, the accessibility state of
4027 this machine is re-evaluated. If the returned value is |false|,
4028 the <link to="#accessError"/> property may be used to get the
4029 detailed error information describing the reason of
4030 inaccessibility.
4031
4032 When the machine is inaccessible, only the following properties
4033 can be used on it:
4034 <ul>
4035 <li><link to="#parent"/></li>
4036 <li><link to="#id"/></li>
4037 <li><link to="#settingsFilePath"/></li>
4038 <li><link to="#accessible"/></li>
4039 <li><link to="#accessError"/></li>
4040 </ul>
4041
4042 An attempt to access any other property or method will return
4043 an error.
4044
4045 The only possible action you can perform on an inaccessible
4046 machine is to unregister it using the
4047 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4048 for the accessibility state once more by querying this
4049 property).
4050
4051 <note>
4052 In the current implementation, once this property returns
4053 <tt>true</tt>, the machine will never become inaccessible
4054 later, even if its settings file cannot be successfully
4055 read/written any more (at least, until the VirtualBox
4056 server is restarted). This limitation may be removed in
4057 future releases.
4058 </note>
4059 </desc>
4060 </attribute>
4061
4062 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4063 <desc>
4064 Error information describing the reason of machine
4065 inaccessibility.
4066
4067 Reading this property is only valid after the last call to
4068 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
4069 machine is currently unaccessible). Otherwise, a null
4070 IVirtualBoxErrorInfo object will be returned.
4071 </desc>
4072 </attribute>
4073
4074 <attribute name="name" type="wstring">
4075 <desc>
4076 Name of the virtual machine.
4077
4078 Besides being used for human-readable identification purposes
4079 everywhere in VirtualBox, the virtual machine name is also used
4080 as a name of the machine's settings file and as a name of the
4081 subdirectory this settings file resides in. Thus, every time you
4082 change the value of this property, the settings file will be
4083 renamed once you call <link to="#saveSettings"/> to confirm the
4084 change. The containing subdirectory will be also renamed, but
4085 only if it has exactly the same name as the settings file
4086 itself prior to changing this property (for backward compatibility
4087 with previous API releases). The above implies the following
4088 limitations:
4089 <ul>
4090 <li>The machine name cannot be empty.</li>
4091 <li>The machine name can contain only characters that are valid
4092 file name characters according to the rules of the file
4093 system used to store VirtualBox configuration.</li>
4094 <li>You cannot have two or more machines with the same name
4095 if they use the same subdirectory for storing the machine
4096 settings files.</li>
4097 <li>You cannot change the name of the machine if it is running,
4098 or if any file in the directory containing the settings file
4099 is being used by another running machine or by any other
4100 process in the host operating system at a time when
4101 <link to="#saveSettings"/> is called.
4102 </li>
4103 </ul>
4104 If any of the above limitations are hit, <link to="#saveSettings"/>
4105 will return an appropriate error message explaining the exact
4106 reason and the changes you made to this machine will not be
4107 saved.
4108 <note>
4109 For "legacy" machines created using the
4110 <link to="IVirtualBox::createLegacyMachine"/> call,
4111 the above naming limitations do not apply because the
4112 machine name does not affect the settings file name.
4113 The settings file name remains the same as it was specified
4114 during machine creation and never changes.
4115 </note>
4116 </desc>
4117 </attribute>
4118
4119 <attribute name="description" type="wstring">
4120 <desc>
4121 Description of the virtual machine.
4122
4123 The description attribute can contain any text and is
4124 typically used to describe the hardware and software
4125 configuration of the virtual machine in detail (i.e. network
4126 settings, versions of the installed software and so on).
4127 </desc>
4128 </attribute>
4129
4130 <attribute name="id" type="uuid" readonly="yes">
4131 <desc>UUID of the virtual machine.</desc>
4132 </attribute>
4133
4134 <attribute name="OSTypeId" type="wstring">
4135 <desc>
4136 User-defined identifier of the Guest OS type.
4137 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4138 an IGuestOSType object representing details about the given
4139 Guest OS type.
4140 <note>
4141 This value may differ from the value returned by
4142 <link to="IGuest::OSTypeId"/> if Guest Additions are
4143 installed to the guest OS.
4144 </note>
4145 </desc>
4146 </attribute>
4147
4148 <attribute name="HardwareVersion" type="wstring">
4149 <desc>Hardware version identifier. Internal use only for now.</desc>
4150 </attribute>
4151
4152 <attribute name="CPUCount" type="unsigned long">
4153 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
4154 </attribute>
4155
4156 <attribute name="memorySize" type="unsigned long">
4157 <desc>System memory size in megabytes.</desc>
4158 </attribute>
4159
4160 <attribute name="memoryBalloonSize" type="unsigned long">
4161 <desc>Initial memory balloon size in megabytes.</desc>
4162 </attribute>
4163
4164 <attribute name="statisticsUpdateInterval" type="unsigned long">
4165 <desc>Initial interval to update guest statistics in seconds.</desc>
4166 </attribute>
4167
4168 <attribute name="VRAMSize" type="unsigned long">
4169 <desc>Video memory size in megabytes.</desc>
4170 </attribute>
4171
4172 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4173 <desc>
4174 This setting determines whether VirtualBox allows guests to make use
4175 of the 3D graphics support available on the host. Currently limited
4176 to OpenGL only. </desc>
4177 </attribute>
4178
4179 <attribute name="monitorCount" type="unsigned long">
4180 <desc>
4181 Number of virtual monitors.
4182 <note>
4183 Only effective on Windows XP and later guests with
4184 Guest Additions installed.
4185 </note>
4186 </desc>
4187 </attribute>
4188
4189 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4190 <desc>Object containing all BIOS settings.</desc>
4191 </attribute>
4192
4193 <attribute name="HWVirtExEnabled" type="TSBool">
4194 <desc>
4195 This setting determines whether VirtualBox will try to make use of
4196 the host CPU's hardware virtualization extensions such as Intel VT-x
4197 and AMD-V. Note that in case such extensions are not available,
4198 they will not be used.
4199 </desc>
4200 </attribute>
4201
4202 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4203 <desc>
4204 This setting determines whether VirtualBox will try to make use of
4205 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4206 such extensions are not available, they will not be used.
4207 </desc>
4208 </attribute>
4209
4210 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4211 <desc>
4212 This setting determines whether VirtualBox will try to make use of
4213 the VPID extension of Intel VT-x. Note that in case such extensions are
4214 not available, they will not be used.
4215 </desc>
4216 </attribute>
4217
4218 <attribute name="PAEEnabled" type="boolean" default="false">
4219 <desc>
4220 This setting determines whether VirtualBox will expose the Physical Address
4221 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4222 is not available, it will not be reported.
4223 </desc>
4224 </attribute>
4225
4226 <attribute name="snapshotFolder" type="wstring">
4227 <desc>
4228 Full path to the directory used to store snapshot data
4229 (differencing hard disks and saved state files) of this machine.
4230
4231 The initial value of this property is
4232 <tt>&lt;</tt><link to="#settingsFilePath">
4233 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4234 <link to="#id">machine_uuid</link>
4235 <tt>&gt;</tt>.
4236
4237 Currently, it is an error to try to change this property on
4238 a machine that has snapshots (because this would require to
4239 move possibly large files to a different location).
4240 A separate method will be available for this purpose later.
4241
4242 <note>
4243 Setting this property to <tt>null</tt> will restore the
4244 initial value.
4245 </note>
4246 <note>
4247 When setting this property, the specified path can be
4248 absolute (full path) or relative to the directory where the
4249 <link to="#settingsFilePath">machine settings file</link>
4250 is located. When reading this property, a full path is
4251 always returned.
4252 </note>
4253 <note>
4254 The specified path may not exist, it will be created
4255 when necessary.
4256 </note>
4257 </desc>
4258 </attribute>
4259
4260 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4261 <desc>VRDP server object.</desc>
4262 </attribute>
4263
4264 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4265 <desc>Array of hard disks attached to this machine.</desc>
4266 </attribute>
4267
4268 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4269 <desc>Associated DVD drive object.</desc>
4270 </attribute>
4271
4272 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4273 <desc>Associated floppy drive object.</desc>
4274 </attribute>
4275
4276 <attribute name="USBController" type="IUSBController" readonly="yes">
4277 <desc>
4278 Associated USB controller object.
4279
4280 <note>
4281 This method may set a @ref com_warnings "warning result code".
4282 </note>
4283 <note>
4284 If USB functionality is not available in the given edition of
4285 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4286 </note>
4287 </desc>
4288 </attribute>
4289
4290 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4291 <desc>Associated audio adapter, always present.</desc>
4292 </attribute>
4293
4294 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4295 <desc>Array of storage controllers attached to this machine.</desc>
4296 </attribute>
4297
4298 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4299 <desc>
4300 Full name of the file containing machine settings data.
4301 </desc>
4302 </attribute>
4303
4304 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4305 <desc>
4306 Current version of the format of the settings file of this machine
4307 (<link to="#settingsFilePath"/>).
4308
4309 The version string has the following format:
4310 <pre>
4311 x.y-platform
4312 </pre>
4313 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4314 versions, and <tt>platform</tt> is the platform identifier.
4315
4316 The current version usually matches the value of the
4317 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4318 settings file was created by an older version of VirtualBox and there
4319 was a change of the settings file format since then.
4320
4321 Note that VirtualBox automatically converts settings files from older
4322 versions to the most recent version when reading them (usually at
4323 VirtualBox startup) but it doesn't save the changes back until
4324 you call a method that implicitly saves settings (such as
4325 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4326 explicitly. Therefore, if the value of this attribute differs from the
4327 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4328 means that the settings file was converted but the result of the
4329 conversion is not yet saved to disk.
4330
4331 The above feature may be used by interactive front-ends to inform users
4332 about the settings file format change and offer them to explicitly save
4333 all converted settings files (the global and VM-specific ones),
4334 optionally create backup copies of the old settings files before saving,
4335 etc.
4336
4337 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4338 </desc>
4339 </attribute>
4340
4341 <attribute name="settingsModified" type="boolean" readonly="yes">
4342 <desc>
4343 Whether the settings of this machine have been modified
4344 (but neither yet saved nor discarded).
4345 <note>
4346 Reading this property is only valid on instances returned
4347 by <link to="ISession::machine"/> and on new machines
4348 created by <link to="IVirtualBox::createMachine"/> or opened
4349 by <link to="IVirtualBox::openMachine"/> but not
4350 yet registered, or on unregistered machines after calling
4351 <link to="IVirtualBox::unregisterMachine"/>. For all other
4352 cases, the settings can never be modified.
4353 </note>
4354 <note>
4355 For newly created unregistered machines, the value of this
4356 property is always TRUE until <link to="#saveSettings"/>
4357 is called (no matter if any machine settings have been
4358 changed after the creation or not). For opened machines
4359 the value is set to FALSE (and then follows to normal rules).
4360 </note>
4361 </desc>
4362 </attribute>
4363
4364 <attribute name="sessionState" type="SessionState" readonly="yes">
4365 <desc>Current session state for this machine.</desc>
4366 </attribute>
4367
4368 <attribute name="sessionType" type="wstring" readonly="yes">
4369 <desc>
4370 Type of the session. If <link to="#sessionState"/> is
4371 SessionSpawning or SessionOpen, this attribute contains the
4372 same value as passed to the
4373 <link to="IVirtualBox::openRemoteSession"/> method in the
4374 @a type parameter. If the session was opened directly using
4375 <link to="IVirtualBox::openSession"/>, or if
4376 <link to="#sessionState"/> is SessionClosed, the value of this
4377 attribute is @c null.
4378 </desc>
4379 </attribute>
4380
4381 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4382 <desc>
4383 Identifier of the session process. This attribute contains the
4384 platform-dependent identifier of the process that has opened a
4385 direct session for this machine using the
4386 <link to="IVirtualBox::openSession"/> call. The returned value
4387 is only valid if <link to="#sessionState"/> is SessionOpen or
4388 SessionClosing (i.e. a session is currently open or being
4389 closed) by the time this property is read.
4390 </desc>
4391 </attribute>
4392
4393 <attribute name="state" type="MachineState" readonly="yes">
4394 <desc>Current execution state of this machine.</desc>
4395 </attribute>
4396
4397 <attribute name="lastStateChange" type="long long" readonly="yes">
4398 <desc>
4399 Time stamp of the last execution state change,
4400 in milliseconds since 1970-01-01 UTC.
4401 </desc>
4402 </attribute>
4403
4404 <attribute name="stateFilePath" type="wstring" readonly="yes">
4405 <desc>
4406 Full path to the file that stores the execution state of
4407 the machine when it is in the <link to="MachineState_Saved"/> state.
4408 <note>
4409 When the machine is not in the Saved state, this attribute
4410 <tt>null</tt>.
4411 </note>
4412 </desc>
4413 </attribute>
4414
4415 <attribute name="logFolder" type="wstring" readonly="yes">
4416 <desc>
4417 Full path to the folder that stores a set of rotated log files
4418 recorded during machine execution. The most recent log file is
4419 named <tt>VBox.log</tt>, the previous log file is
4420 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4421 in the current version).
4422 </desc>
4423 </attribute>
4424
4425 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4426 <desc>
4427 Current snapshot of this machine.
4428 <note>
4429 A <tt>null</tt> object is returned if the machine doesn't
4430 have snapshots.
4431 </note>
4432 <see><link to="ISnapshot"/></see>
4433 </desc>
4434 </attribute>
4435
4436 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4437 <desc>
4438 Number of snapshots taken on this machine. Zero means the
4439 machine doesn't have any snapshots.
4440 </desc>
4441 </attribute>
4442
4443 <attribute name="currentStateModified" type="boolean" readonly="yes">
4444 <desc>
4445 Returns <tt>true</tt> if the current state of the machine is not
4446 identical to the state stored in the current snapshot.
4447
4448 The current state is identical to the current snapshot right
4449 after one of the following calls are made:
4450 <ul>
4451 <li><link to="IConsole::discardCurrentState"/> or
4452 <link to="IConsole::discardCurrentSnapshotAndState"/>
4453 </li>
4454 <li><link to="IConsole::takeSnapshot"/> (issued on a
4455 powered off or saved machine, for which
4456 <link to="#settingsModified"/> returns <tt>false</tt>)
4457 </li>
4458 <li><link to="IMachine::setCurrentSnapshot"/>
4459 </li>
4460 </ul>
4461
4462 The current state remains identical until one of the following
4463 happens:
4464 <ul>
4465 <li>settings of the machine are changed</li>
4466 <li>the saved state is discarded</li>
4467 <li>the current snapshot is discarded</li>
4468 <li>an attempt to execute the machine is made</li>
4469 </ul>
4470
4471 <note>
4472 For machines that don't have snapshots, this property is
4473 always <tt>false</tt>.
4474 </note>
4475 </desc>
4476 </attribute>
4477
4478 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4479 <desc>
4480 Collection of shared folders for this machine (permanent shared
4481 folders). These folders are shared automatically at machine startup
4482 and available only to the guest OS installed within this machine.
4483
4484 New shared folders are added to the collection using
4485 <link to="#createSharedFolder"/>. Existing shared folders can be
4486 removed using <link to="#removeSharedFolder"/>.
4487 </desc>
4488 </attribute>
4489
4490 <attribute name="clipboardMode" type="ClipboardMode">
4491 <desc>
4492 Synchronization mode between the host OS clipboard
4493 and the guest OS clipboard.
4494 </desc>
4495 </attribute>
4496
4497 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4498 <desc>
4499 A comma-separated list of simple glob patterns. Changes to guest
4500 properties whose name matches one of the patterns will generate an
4501 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4502 </desc>
4503 </attribute>
4504
4505 <method name="setBootOrder">
4506 <desc>
4507 Puts the given device to the specified position in
4508 the boot order.
4509
4510 To indicate that no device is associated with the given position,
4511 <link to="DeviceType_Null"/> should be used.
4512
4513 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4514
4515 <result name="E_INVALIDARG">
4516 Boot @a position out of range.
4517 </result>
4518 <result name="E_NOTIMPL">
4519 Booting from USB @a device currently not supported.
4520 </result>
4521
4522 </desc>
4523 <param name="position" type="unsigned long" dir="in">
4524 <desc>
4525 Position in the boot order (<tt>1</tt> to the total number of
4526 devices the machine can boot from, as returned by
4527 <link to="ISystemProperties::maxBootPosition"/>).
4528 </desc>
4529 </param>
4530 <param name="device" type="DeviceType" dir="in">
4531 <desc>
4532 The type of the device used to boot at the given position.
4533 </desc>
4534 </param>
4535 </method>
4536
4537 <method name="getBootOrder" const="yes">
4538 <desc>
4539 Returns the device type that occupies the specified
4540 position in the boot order.
4541
4542 @todo [remove?]
4543 If the machine can have more than one device of the returned type
4544 (such as hard disks), then a separate method should be used to
4545 retrieve the individual device that occupies the given position.
4546
4547 If here are no devices at the given position, then
4548 <link to="DeviceType_Null"/> is returned.
4549
4550 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4551
4552 <result name="E_INVALIDARG">
4553 Boot @a position out of range.
4554 </result>
4555
4556 </desc>
4557 <param name="position" type="unsigned long" dir="in">
4558 <desc>
4559 Position in the boot order (<tt>1</tt> to the total number of
4560 devices the machine can boot from, as returned by
4561 <link to="ISystemProperties::maxBootPosition"/>).
4562 </desc>
4563 </param>
4564 <param name="device" type="DeviceType" dir="return">
4565 <desc>
4566 Device at the given position.
4567 </desc>
4568 </param>
4569 </method>
4570
4571 <method name="attachHardDisk">
4572 <desc>
4573 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4574 by the given UUID @a id) to the given hard disk controller
4575 (<link to="IStorageController" />, identified by @a name),
4576 at the indicated port and device.
4577
4578 For the IDE bus, the @a controllerPort parameter can be either
4579 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4580 respectively. For the primary controller of the IDE bus,
4581 @a device can be either @c 0 or @c 1, to specify the master or the
4582 slave device, respectively. For the secondary IDE controller, the
4583 device number must be @c 1 because VirtualBox reserves the
4584 secondary master for the CD-ROM drive.
4585
4586 For an SATA controller, @a controllerPort must be a number ranging
4587 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4588 be a number ranging from @c 0 to @c 15.
4589
4590 For both SCSI and SATA, the @a device parameter is unused and must
4591 be @c 0.
4592
4593 The specified device slot must not have another disk attached to it, or
4594 this method will fail.
4595
4596 See <link to="IHardDisk"/> for more detailed information about
4597 attaching hard disks.
4598
4599 <note>
4600 You cannot attach a hard disk to a running machine. Also, you cannot
4601 attach a hard disk to a newly created machine until this machine's
4602 settings are saved to disk using <link to="#saveSettings"/>.
4603 </note>
4604 <note>
4605 If the hard disk is being attached indirectly, a new differencing hard
4606 disk will implicitly be created for it and attached instead. If the
4607 changes made to the machine settings (including this indirect
4608 attachment) are later cancelled using <link to="#discardSettings"/>,
4609 this implicitly created differencing hard disk will implicitly
4610 be deleted.
4611 </note>
4612
4613 <result name="E_INVALIDARG">
4614 SATA device, SATA port, IDE port or IDE slot out of range.
4615 </result>
4616 <result name="VBOX_E_INVALID_OBJECT_STATE">
4617 Attempt to attach hard disk to an unregistered virtual machine.
4618 </result>
4619 <result name="VBOX_E_INVALID_VM_STATE">
4620 Invalid machine state.
4621 </result>
4622 <result name="VBOX_E_OBJECT_IN_USE">
4623 Hard disk already attached to this or another virtual machine.
4624 </result>
4625
4626 </desc>
4627 <param name="id" type="uuid" dir="in">
4628 <desc>UUID of the hard disk to attach.</desc>
4629 </param>
4630 <param name="name" type="wstring" dir="in">
4631 <desc>Name of the storage controller to attach the hard disk to.</desc>
4632 </param>
4633 <param name="controllerPort" type="long" dir="in">
4634 <desc>Port to attach the hard disk to.</desc>
4635 </param>
4636 <param name="device" type="long" dir="in">
4637 <desc>
4638 Device slot in the given port to attach the hard disk to.
4639 </desc>
4640 </param>
4641 </method>
4642
4643 <method name="getHardDisk" const="yes">
4644 <desc>
4645 Returns the virtual hard disk attached to a device slot of the specified
4646 bus.
4647
4648 Note that if the hard disk was indirectly attached by
4649 <link to="#attachHardDisk"/> to the given device slot then this
4650 method will return not the same object as passed to the
4651 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4652 more detailed information about attaching hard disks.
4653
4654 <result name="VBOX_E_OBJECT_NOT_FOUND">
4655 No hard disk attached to given slot/bus.
4656 </result>
4657
4658 </desc>
4659 <param name="name" type="wstring" dir="in">
4660 <desc>Name of the storage controller the hard disk is attached to.</desc>
4661 </param>
4662 <param name="controllerPort" type="long" dir="in">
4663 <desc>Port to query.</desc>
4664 </param>
4665 <param name="device" type="long" dir="in">
4666 <desc>Device slot in the given port to query.</desc>
4667 </param>
4668 <param name="hardDisk" type="IHardDisk" dir="return">
4669 <desc>Attached hard disk object.</desc>
4670 </param>
4671 </method>
4672
4673 <method name="detachHardDisk">
4674 <desc>
4675 Detaches the virtual hard disk attached to a device slot of the
4676 specified bus.
4677
4678 Detaching the hard disk from the virtual machine is deferred. This means
4679 that the hard disk remains associated with the machine when this method
4680 returns and gets actually de-associated only after a successful
4681 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4682 for more detailed information about attaching hard disks.
4683
4684 <note>
4685 You cannot detach the hard disk from a running machine.
4686 </note>
4687 <note>
4688 Detaching differencing hard disks implicitly created by <link
4689 to="#attachHardDisk"/> for the indirect attachment using this
4690 method will <b>not</b> implicitly delete them. The
4691 <link to="IHardDisk::deleteStorage"/> operation should be
4692 explicitly performed by the caller after the hard disk is successfully
4693 detached and the settings are saved with
4694 <link to="#saveSettings"/>, if it is the desired action.
4695 </note>
4696
4697 <result name="VBOX_E_INVALID_VM_STATE">
4698 Attempt to detach hard disk from a running virtual machine.
4699 </result>
4700 <result name="VBOX_E_OBJECT_NOT_FOUND">
4701 No hard disk attached to given slot/bus.
4702 </result>
4703 <result name="VBOX_E_NOT_SUPPORTED">
4704 Hard disk format does not support storage deletion.
4705 </result>
4706
4707 </desc>
4708 <param name="name" type="wstring" dir="in">
4709 <desc>name of the storage controller to detach the hard disk from.</desc>
4710 </param>
4711 <param name="controllerPort" type="long" dir="in">
4712 <desc>Port number to detach the hard disk from.</desc>
4713 </param>
4714 <param name="device" type="long" dir="in">
4715 <desc>Device slot number to detach the hard disk from.</desc>
4716 </param>
4717 </method>
4718
4719 <method name="getHardDiskAttachmentsOfController" const="yes">
4720 <desc>
4721 Returns an array of hard disk attachments which are attached to the
4722 the controller with the given name.
4723
4724 <result name="VBOX_E_OBJECT_NOT_FOUND">
4725 A storage controller with given name doesn't exist.
4726 </result>
4727 </desc>
4728 <param name="name" type="wstring" dir="in"/>
4729 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4730 </method>
4731
4732 <method name="getNetworkAdapter" const="yes">
4733 <desc>
4734 Returns the network adapter associated with the given slot.
4735 Slots are numbered sequentially, starting with zero. The total
4736 number of adapters per machine is defined by the
4737 <link to="ISystemProperties::networkAdapterCount"/> property,
4738 so the maximum slot number is one less than that property's value.
4739
4740 <result name="E_INVALIDARG">
4741 Invalid @a slot number.
4742 </result>
4743
4744 </desc>
4745 <param name="slot" type="unsigned long" dir="in"/>
4746 <param name="adapter" type="INetworkAdapter" dir="return"/>
4747 </method>
4748
4749 <method name="addStorageController">
4750 <desc>
4751 Adds a new storage controller (SCSI or SATA controller) to the
4752 machine and returns it as an instance of
4753 <link to="IStorageController" />.
4754
4755 @a name identifies the controller with subsequent calls such as
4756 <link to="#getStorageControllerByName" /> or
4757 <link to="#removeStorageController" /> or
4758 <link to="#attachHardDisk" />.
4759
4760 After the controller has been added, you can set its exact
4761 type by setting the <link to="IStorageController::controllerType" />.
4762
4763 <result name="VBOX_E_OBJECT_IN_USE">
4764 A storage controller with given name exists already.
4765 </result>
4766 <result name="E_INVALIDARG">
4767 Invalid @a controllerType.
4768 </result>
4769 </desc>
4770 <param name="name" type="wstring" dir="in"/>
4771 <param name="connectionType" type="StorageBus" dir="in"/>
4772 <param name="controller" type="IStorageController" dir="return"/>
4773 </method>
4774
4775 <method name="getStorageControllerByName" const="yes">
4776 <desc>
4777 Returns a storage controller with the given name.
4778
4779 <result name="VBOX_E_OBJECT_NOT_FOUND">
4780 A storage controller with given name doesn't exist.
4781 </result>
4782 </desc>
4783 <param name="name" type="wstring" dir="in"/>
4784 <param name="storageController" type="IStorageController" dir="return"/>
4785 </method>
4786
4787 <method name="removeStorageController">
4788 <desc>
4789 Removes a storage controller from the machine.
4790
4791 <result name="VBOX_E_OBJECT_NOT_FOUND">
4792 A storage controller with given name doesn't exist.
4793 </result>
4794 </desc>
4795 <param name="name" type="wstring" dir="in"/>
4796 </method>
4797
4798 <method name="getSerialPort" const="yes">
4799 <desc>
4800 Returns the serial port associated with the given slot.
4801 Slots are numbered sequentially, starting with zero. The total
4802 number of serial ports per machine is defined by the
4803 <link to="ISystemProperties::serialPortCount"/> property,
4804 so the maximum slot number is one less than that property's value.
4805
4806 <result name="E_INVALIDARG">
4807 Invalid @a slot number.
4808 </result>
4809
4810 </desc>
4811 <param name="slot" type="unsigned long" dir="in"/>
4812 <param name="port" type="ISerialPort" dir="return"/>
4813 </method>
4814
4815 <method name="getParallelPort" const="yes">
4816 <desc>
4817 Returns the parallel port associated with the given slot.
4818 Slots are numbered sequentially, starting with zero. The total
4819 number of parallel ports per machine is defined by the
4820 <link to="ISystemProperties::parallelPortCount"/> property,
4821 so the maximum slot number is one less than that property's value.
4822
4823 <result name="E_INVALIDARG">
4824 Invalid @a slot number.
4825 </result>
4826
4827 </desc>
4828 <param name="slot" type="unsigned long" dir="in"/>
4829 <param name="port" type="IParallelPort" dir="return"/>
4830 </method>
4831
4832 <method name="getNextExtraDataKey">
4833 <desc>
4834 Returns the machine-specific extra data key name following the
4835 supplied key.
4836
4837 An error is returned if the supplied @a key does not exist. @c NULL is
4838 returned in @a nextKey if the supplied key is the last key. When
4839 supplying @c NULL for the @a key, the first key item is returned in
4840 @a nextKey (if there is any). @a nextValue is an optional parameter and
4841 if supplied, the next key's value is returned in it.
4842
4843 <result name="VBOX_E_OBJECT_NOT_FOUND">
4844 Extra data @a key not found.
4845 </result>
4846
4847 </desc>
4848 <param name="key" type="wstring" dir="in">
4849 <desc>Name of the data key to follow.</desc>
4850 </param>
4851 <param name="nextKey" type="wstring" dir="out">
4852 <desc>Name of the next data key.</desc>
4853 </param>
4854 <param name="nextValue" type="wstring" dir="out">
4855 <desc>Value of the next data key.</desc>
4856 </param>
4857 </method>
4858
4859 <method name="getExtraData">
4860 <desc>
4861 Returns associated machine-specific extra data.
4862
4863 If the requested data @a key does not exist, this function will
4864 succeed and return @c NULL in the @a value argument.
4865
4866 <result name="VBOX_E_FILE_ERROR">
4867 Settings file not accessible.
4868 </result>
4869 <result name="VBOX_E_XML_ERROR">
4870 Could not parse the settings file.
4871 </result>
4872
4873 </desc>
4874 <param name="key" type="wstring" dir="in">
4875 <desc>Name of the data key to get.</desc>
4876 </param>
4877 <param name="value" type="wstring" dir="return">
4878 <desc>Value of the requested data key.</desc>
4879 </param>
4880 </method>
4881
4882 <method name="setExtraData">
4883 <desc>
4884 Sets associated machine-specific extra data.
4885
4886 If you pass @c NULL as a key @a value, the given @a key will be
4887 deleted.
4888
4889 <note>
4890 Before performing the actual data change, this method will ask all
4891 registered callbacks using the
4892 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4893 notification for a permission. If one of the callbacks refuses the
4894 new value, the change will not be performed.
4895 </note>
4896 <note>
4897 On success, the
4898 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4899 is called to inform all registered callbacks about a successful data
4900 change.
4901 </note>
4902 <note>
4903 This method can be called outside the machine session and therefore
4904 it's a caller's responsibility to handle possible race conditions
4905 when several clients change the same key at the same time.
4906 </note>
4907
4908 <result name="VBOX_E_FILE_ERROR">
4909 Settings file not accessible.
4910 </result>
4911 <result name="VBOX_E_XML_ERROR">
4912 Could not parse the settings file.
4913 </result>
4914
4915 </desc>
4916 <param name="key" type="wstring" dir="in">
4917 <desc>Name of the data key to set.</desc>
4918 </param>
4919 <param name="value" type="wstring" dir="in">
4920 <desc>Value to assign to the key.</desc>
4921 </param>
4922 </method>
4923
4924 <method name="saveSettings">
4925 <desc>
4926 Saves any changes to machine settings made since the session
4927 has been opened or a new machine has been created, or since the
4928 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4929 For registered machines, new settings become visible to all
4930 other VirtualBox clients after successful invocation of this
4931 method.
4932 <note>
4933 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4934 notification event after the configuration has been successfully
4935 saved (only for registered machines).
4936 </note>
4937 <note>
4938 Calling this method is only valid on instances returned
4939 by <link to="ISession::machine"/> and on new machines
4940 created by <link to="IVirtualBox::createMachine"/> but not
4941 yet registered, or on unregistered machines after calling
4942 <link to="IVirtualBox::unregisterMachine"/>.
4943 </note>
4944
4945 <result name="VBOX_E_FILE_ERROR">
4946 Settings file not accessible.
4947 </result>
4948 <result name="VBOX_E_XML_ERROR">
4949 Could not parse the settings file.
4950 </result>
4951 <result name="E_ACCESSDENIED">
4952 Modification request refused.
4953 </result>
4954
4955 </desc>
4956 </method>
4957
4958 <method name="saveSettingsWithBackup">
4959 <desc>
4960 Creates a backup copy of the machine settings file (<link
4961 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4962 <link to="#saveSettings"/>.
4963
4964 Note that the backup copy is created <b>only</b> if the settings file
4965 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4966 details). Otherwise, this call is fully equivalent to
4967 <link to="#saveSettings"/> and no backup copying is done.
4968
4969 The backup copy is created in the same directory where the original
4970 settings file is located. It is given the following file name:
4971 <pre>
4972 original.xml.x.y-platform.bak
4973 </pre>
4974 where <tt>original.xml</tt> is the original settings file name
4975 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4976 format of the settings file (before auto-conversion).
4977
4978 If the given backup file already exists, this method will try to add the
4979 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4980 0 to 9) and copy it again until it succeeds. If all suffixes are
4981 occupied, or if any other copy error occurs, this method will return a
4982 failure.
4983
4984 If the copy operation succeeds, the @a bakFileName return argument will
4985 receive a full path to the created backup file (for informational
4986 purposes). Note that this will happen even if the subsequent
4987 <link to="#saveSettings"/> call performed by this method after the
4988 copy operation, fails.
4989
4990 <note>
4991 The VirtualBox API never calls this method. It is intended purely for
4992 the purposes of creating backup copies of the settings files by
4993 front-ends before saving the results of the automatically performed
4994 settings conversion to disk.
4995 </note>
4996
4997 <see>settingsFileVersion</see>
4998
4999 <result name="VBOX_E_FILE_ERROR">
5000 Settings file not accessible.
5001 </result>
5002 <result name="VBOX_E_XML_ERROR">
5003 Could not parse the settings file.
5004 </result>
5005 <result name="VBOX_E_INVALID_VM_STATE">
5006 Virtual machine is not mutable.
5007 </result>
5008 <result name="E_ACCESSDENIED">
5009 Modification request refused.
5010 </result>
5011
5012 </desc>
5013 <param name="bakFileName" type="wstring" dir="return">
5014 <desc>Full path to the created backup copy.</desc>
5015 </param>
5016 </method>
5017
5018 <method name="discardSettings">
5019 <desc>
5020 Discards any changes to the machine settings made since the session
5021 has been opened or since the last call to <link to="#saveSettings"/>
5022 or <link to="#discardSettings"/>.
5023 <note>
5024 Calling this method is only valid on instances returned
5025 by <link to="ISession::machine"/> and on new machines
5026 created by <link to="IVirtualBox::createMachine"/> or
5027 opened by <link to="IVirtualBox::openMachine"/> but not
5028 yet registered, or on unregistered machines after calling
5029 <link to="IVirtualBox::unregisterMachine"/>.
5030 </note>
5031
5032 <result name="VBOX_E_INVALID_VM_STATE">
5033 Virtual machine is not mutable.
5034 </result>
5035
5036 </desc>
5037 </method>
5038
5039 <method name="deleteSettings">
5040 <desc>
5041 Deletes the settings file of this machine from disk.
5042 The machine must not be registered in order for this operation
5043 to succeed.
5044 <note>
5045 <link to="#settingsModified"/> will return TRUE after this
5046 method successfully returns.
5047 </note>
5048 <note>
5049 Calling this method is only valid on instances returned
5050 by <link to="ISession::machine"/> and on new machines
5051 created by <link to="IVirtualBox::createMachine"/> or
5052 opened by <link to="IVirtualBox::openMachine"/> but not
5053 yet registered, or on unregistered machines after calling
5054 <link to="IVirtualBox::unregisterMachine"/>.
5055 </note>
5056 <note>
5057 The deleted machine settings file can be restored (saved again)
5058 by calling <link to="#saveSettings"/>.
5059 </note>
5060
5061 <result name="VBOX_E_INVALID_VM_STATE">
5062 Cannot delete settings of a registered machine or
5063 machine not mutable.
5064 </result>
5065 <result name="VBOX_E_IPRT_ERROR">
5066 Could not delete the settings file.
5067 </result>
5068
5069 </desc>
5070 </method>
5071
5072 <method name="export">
5073 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5074 steps required to export VirtualBox machines to OVF.
5075 </desc>
5076
5077 <param name="aAppliance" type="IAppliance" dir="in">
5078 <desc>Appliance to export this machine to.</desc>
5079 </param>
5080 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5081 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5082 </param>
5083 </method >
5084
5085 <method name="getSnapshot">
5086 <desc>
5087 Returns a snapshot of this machine with the given UUID.
5088 A <tt>null</tt> UUID can be used to obtain the first snapshot
5089 taken on this machine. This is useful if you want to traverse
5090 the whole tree of snapshots starting from the root.
5091
5092 <result name="VBOX_E_OBJECT_NOT_FOUND">
5093 Virtual machine has no snapshots or snapshot not found.
5094 </result>
5095
5096 </desc>
5097 <param name="id" type="uuid" dir="in">
5098 <desc>UUID of the snapshot to get</desc>
5099 </param>
5100 <param name="snapshot" type="ISnapshot" dir="return">
5101 <desc>Snapshot object with the given UUID.</desc>
5102 </param>
5103 </method>
5104
5105 <method name="findSnapshot">
5106 <desc>
5107 Returns a snapshot of this machine with the given name.
5108
5109 <result name="VBOX_E_OBJECT_NOT_FOUND">
5110 Virtual machine has no snapshots or snapshot not found.
5111 </result>
5112
5113 </desc>
5114 <param name="name" type="wstring" dir="in">
5115 <desc>Name of the snapshot to find</desc>
5116 </param>
5117 <param name="snapshot" type="ISnapshot" dir="return">
5118 <desc>Snapshot object with the given name.</desc>
5119 </param>
5120 </method>
5121
5122 <method name="setCurrentSnapshot">
5123 <desc>
5124 Sets the current snapshot of this machine.
5125 <note>
5126 In the current implementation, this operation is not
5127 implemented.
5128 </note>
5129 </desc>
5130 <param name="id" type="uuid" dir="in">
5131 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5132 </param>
5133 </method>
5134
5135 <method name="createSharedFolder">
5136 <desc>
5137 Creates a new permanent shared folder by associating the given logical
5138 name with the given host path, adds it to the collection of shared
5139 folders and starts sharing it. Refer to the description of
5140 <link to="ISharedFolder"/> to read more about logical names.
5141
5142 <result name="VBOX_E_OBJECT_IN_USE">
5143 Shared folder already exists.
5144 </result>
5145 <result name="VBOX_E_FILE_ERROR">
5146 Shared folder @a hostPath not accessible.
5147 </result>
5148
5149 </desc>
5150 <param name="name" type="wstring" dir="in">
5151 <desc>Unique logical name of the shared folder.</desc>
5152 </param>
5153 <param name="hostPath" type="wstring" dir="in">
5154 <desc>Full path to the shared folder in the host file system.</desc>
5155 </param>
5156 <param name="writable" type="boolean" dir="in">
5157 <desc>Whether the share is writable or readonly</desc>
5158 </param>
5159 </method>
5160
5161 <method name="removeSharedFolder">
5162 <desc>
5163 Removes the permanent shared folder with the given name previously
5164 created by <link to="#createSharedFolder"/> from the collection of
5165 shared folders and stops sharing it.
5166
5167 <result name="VBOX_E_INVALID_VM_STATE">
5168 Virtual machine is not mutable.
5169 </result>
5170 <result name="VBOX_E_OBJECT_NOT_FOUND">
5171 Shared folder @a name does not exist.
5172 </result>
5173
5174 </desc>
5175 <param name="name" type="wstring" dir="in">
5176 <desc>Logical name of the shared folder to remove.</desc>
5177 </param>
5178 </method>
5179
5180 <method name="canShowConsoleWindow">
5181 <desc>
5182 Returns @c true if the VM console process can activate the
5183 console window and bring it to foreground on the desktop of
5184 the host PC.
5185 <note>
5186 This method will fail if a session for this machine is not
5187 currently open.
5188 </note>
5189
5190 <result name="VBOX_E_INVALID_VM_STATE">
5191 Machine session is not open.
5192 </result>
5193
5194 </desc>
5195 <param name="canShow" type="boolean" dir="return">
5196 <desc>
5197 @c true if the console window can be shown and @c
5198 false otherwise.
5199 </desc>
5200 </param>
5201 </method>
5202
5203 <method name="showConsoleWindow">
5204 <desc>
5205 Activates the console window and brings it to foreground on
5206 the desktop of the host PC. Many modern window managers on
5207 many platforms implement some sort of focus stealing
5208 prevention logic, so that it may be impossible to activate
5209 a window without the help of the currently active
5210 application. In this case, this method will return a non-zero
5211 identifier that represents the top-level window of the VM
5212 console process. The caller, if it represents a currently
5213 active process, is responsible to use this identifier (in a
5214 platform-dependent manner) to perform actual window
5215 activation.
5216 <note>
5217 This method will fail if a session for this machine is not
5218 currently open.
5219 </note>
5220
5221 <result name="VBOX_E_INVALID_VM_STATE">
5222 Machine session is not open.
5223 </result>
5224
5225 </desc>
5226 <param name="winId" type="unsigned long long" dir="return">
5227 <desc>
5228 Platform-dependent identifier of the top-level VM console
5229 window, or zero if this method has performed all actions
5230 necessary to implement the <i>show window</i> semantics for
5231 the given platform and/or VirtualBox front-end.
5232 </desc>
5233 </param>
5234 </method>
5235
5236 <method name="getGuestProperty">
5237 <desc>
5238 Reads an entry from the machine's guest property store.
5239
5240 <result name="VBOX_E_INVALID_VM_STATE">
5241 Machine session is not open.
5242 </result>
5243
5244 </desc>
5245 <param name="name" type="wstring" dir="in">
5246 <desc>
5247 The name of the property to read.
5248 </desc>
5249 </param>
5250 <param name="value" type="wstring" dir="out">
5251 <desc>
5252 The value of the property. If the property does not exist then this
5253 will be empty.
5254 </desc>
5255 </param>
5256 <param name="timestamp" type="unsigned long long" dir="out">
5257 <desc>
5258 The time at which the property was last modified, as seen by the
5259 server process.
5260 </desc>
5261 </param>
5262 <param name="flags" type="wstring" dir="out">
5263 <desc>
5264 Additional property parameters, passed as a comma-separated list of
5265 "name=value" type entries.
5266 </desc>
5267 </param>
5268 </method>
5269
5270 <method name="getGuestPropertyValue">
5271 <desc>
5272 Reads a value from the machine's guest property store.
5273
5274 <result name="VBOX_E_INVALID_VM_STATE">
5275 Machine session is not open.
5276 </result>
5277
5278 </desc>
5279 <param name="property" type="wstring" dir="in">
5280 <desc>
5281 The name of the property to read.
5282 </desc>
5283 </param>
5284 <param name="value" type="wstring" dir="return">
5285 <desc>
5286 The value of the property. If the property does not exist then this
5287 will be empty.
5288 </desc>
5289 </param>
5290 </method>
5291
5292 <method name="getGuestPropertyTimestamp">
5293 <desc>
5294 Reads a property timestamp from the machine's guest property store.
5295
5296 <result name="VBOX_E_INVALID_VM_STATE">
5297 Machine session is not open.
5298 </result>
5299
5300 </desc>
5301 <param name="property" type="wstring" dir="in">
5302 <desc>
5303 The name of the property to read.
5304 </desc>
5305 </param>
5306 <param name="value" type="unsigned long long" dir="return">
5307 <desc>
5308 The timestamp. If the property does not exist then this will be
5309 empty.
5310 </desc>
5311 </param>
5312 </method>
5313
5314 <method name="setGuestProperty">
5315 <desc>
5316 Sets, changes or deletes an entry in the machine's guest property
5317 store.
5318
5319 <result name="E_ACCESSDENIED">
5320 Property cannot be changed.
5321 </result>
5322 <result name="E_INVALIDARG">
5323 Invalid @a flags.
5324 </result>
5325 <result name="VBOX_E_INVALID_VM_STATE">
5326 Virtual machine is not mutable or session not open.
5327 </result>
5328 <result name="VBOX_E_INVALID_OBJECT_STATE">
5329 Cannot set transient property when machine not running.
5330 </result>
5331
5332 </desc>
5333 <param name="property" type="wstring" dir="in">
5334 <desc>
5335 The name of the property to set, change or delete.
5336 </desc>
5337 </param>
5338 <param name="value" type="wstring" dir="in">
5339 <desc>
5340 The new value of the property to set, change or delete. If the
5341 property does not yet exist and value is non-empty, it will be
5342 created. If the value is empty, the key will be deleted if it
5343 exists.
5344 </desc>
5345 </param>
5346 <param name="flags" type="wstring" dir="in">
5347 <desc>
5348 Additional property parameters, passed as a comma-separated list of
5349 "name=value" type entries.
5350 </desc>
5351 </param>
5352 </method>
5353
5354 <method name="setGuestPropertyValue">
5355 <desc>
5356 Sets, changes or deletes a value in the machine's guest property
5357 store. The flags field will be left unchanged or created empty for a
5358 new property.
5359
5360 <result name="E_ACCESSDENIED">
5361 Property cannot be changed.
5362 </result>
5363 <result name="VBOX_E_INVALID_VM_STATE">
5364 Virtual machine is not mutable or session not open.
5365 </result>
5366 <result name="VBOX_E_INVALID_OBJECT_STATE">
5367 Cannot set transient property when machine not running.
5368 </result>
5369 </desc>
5370
5371 <param name="property" type="wstring" dir="in">
5372 <desc>
5373 The name of the property to set, change or delete.
5374 </desc>
5375 </param>
5376 <param name="value" type="wstring" dir="in">
5377 <desc>
5378 The new value of the property to set, change or delete. If the
5379 property does not yet exist and value is non-empty, it will be
5380 created. If value is empty, the property will be deleted if it
5381 exists.
5382 </desc>
5383 </param>
5384 </method>
5385
5386 <method name="enumerateGuestProperties">
5387 <desc>
5388 Return a list of the guest properties matching a set of patterns along
5389 with their values, time stamps and flags.
5390 </desc>
5391 <param name="patterns" type="wstring" dir="in">
5392 <desc>
5393 The patterns to match the properties against, separated by '|'
5394 characters. If this is empty or NULL, all properties will match.
5395 </desc>
5396 </param>
5397 <param name="name" type="wstring" dir="out" safearray="yes">
5398 <desc>
5399 The names of the properties returned.
5400 </desc>
5401 </param>
5402 <param name="value" type="wstring" dir="out" safearray="yes">
5403 <desc>
5404 The values of the properties returned. The array entries match the
5405 corresponding entries in the @a name array.
5406 </desc>
5407 </param>
5408 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5409 <desc>
5410 The time stamps of the properties returned. The array entries match
5411 the corresponding entries in the @a name array.
5412 </desc>
5413 </param>
5414 <param name="flags" type="wstring" dir="out" safearray="yes">
5415 <desc>
5416 The flags of the properties returned. The array entries match the
5417 corresponding entries in the @a name array.
5418 </desc>
5419 </param>
5420 </method>
5421</interface>
5422
5423 <!--
5424 // IConsole
5425 /////////////////////////////////////////////////////////////////////////
5426 -->
5427
5428 <interface
5429 name="IConsoleCallback" extends="$unknown"
5430 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5431 wsmap="suppress"
5432 >
5433
5434 <method name="onMousePointerShapeChange">
5435 <desc>
5436 Notification when the guest mouse pointer shape has
5437 changed. The new shape data is given.
5438 </desc>
5439 <param name="visible" type="boolean" dir="in">
5440 <desc>
5441 Flag whether the pointer is visible.
5442 </desc>
5443 </param>
5444 <param name="alpha" type="boolean" dir="in">
5445 <desc>
5446 Flag whether the pointer has an alpha channel.
5447 </desc>
5448 </param>
5449 <param name="xHot" type="unsigned long" dir="in">
5450 <desc>
5451 The pointer hot spot x coordinate.
5452 </desc>
5453 </param>
5454 <param name="yHot" type="unsigned long" dir="in">
5455 <desc>
5456 The pointer hot spot y coordinate.
5457 </desc>
5458 </param>
5459 <param name="width" type="unsigned long" dir="in">
5460 <desc>
5461 Width of the pointer shape in pixels.
5462 </desc>
5463 </param>
5464 <param name="height" type="unsigned long" dir="in">
5465 <desc>
5466 Height of the pointer shape in pixels.
5467 </desc>
5468 </param>
5469 <param name="shape" type="octet" mod="ptr" dir="in">
5470 <desc>
5471 Address of the shape buffer.
5472
5473 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5474 followed by a 32-bpp XOR (color) mask.
5475
5476 For pointers without alpha channel the XOR mask pixels are 32
5477 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5478 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5479
5480 An AND mask is used for pointers with alpha channel, so if the
5481 callback does not support alpha, the pointer could be
5482 displayed as a normal color pointer.
5483
5484 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5485 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5486 height</tt>. The padding bits at the end of each scanline are
5487 undefined.
5488
5489 The XOR mask follows the AND mask on the next 4-byte aligned
5490 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5491 Bytes in the gap between the AND and the XOR mask are undefined.
5492 The XOR mask scanlines have no gap between them and the size of
5493 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5494
5495 <note>
5496 If @a shape is 0, only the pointer visibility is changed.
5497 </note>
5498 </desc>
5499 </param>
5500 </method>
5501
5502 <method name="onMouseCapabilityChange">
5503 <desc>
5504 Notification when the mouse capabilities reported by the
5505 guest have changed. The new capabilities are passed.
5506 </desc>
5507 <param name="supportsAbsolute" type="boolean" dir="in"/>
5508 <param name="needsHostCursor" type="boolean" dir="in"/>
5509 </method>
5510
5511 <method name="onKeyboardLedsChange">
5512 <desc>
5513 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5514 to alter the state of the keyboard LEDs.
5515 </desc>
5516 <param name="numLock" type="boolean" dir="in"/>
5517 <param name="capsLock" type="boolean" dir="in"/>
5518 <param name="scrollLock" type="boolean" dir="in"/>
5519 </method>
5520
5521 <method name="onStateChange">
5522 <desc>
5523 Notification when the execution state of the machine has changed.
5524 The new state will be given.
5525 </desc>
5526 <param name="state" type="MachineState" dir="in"/>
5527 </method>
5528
5529 <method name="onAdditionsStateChange">
5530 <desc>
5531 Notification when a Guest Additions property changes.
5532 Interested callees should query IGuest attributes to
5533 find out what has changed.
5534 </desc>
5535 </method>
5536
5537 <method name="onDVDDriveChange">
5538 <desc>
5539 Notification when a property of the
5540 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5541 Interested callees should use IDVDDrive methods to find out what has
5542 changed.
5543 </desc>
5544 </method>
5545
5546 <method name="onFloppyDriveChange">
5547 <desc>
5548 Notification when a property of the
5549 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5550 Interested callees should use IFloppyDrive methods to find out what
5551 has changed.
5552 </desc>
5553 </method>
5554
5555 <method name="onNetworkAdapterChange">
5556 <desc>
5557 Notification when a property of one of the
5558 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5559 changes. Interested callees should use INetworkAdapter methods and
5560 attributes to find out what has changed.
5561 </desc>
5562 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5563 <desc>Network adapter that is subject to change.</desc>
5564 </param>
5565 </method>
5566
5567 <method name="onSerialPortChange">
5568 <desc>
5569 Notification when a property of one of the
5570 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5571 Interested callees should use ISerialPort methods and attributes
5572 to find out what has changed.
5573 </desc>
5574 <param name="serialPort" type="ISerialPort" dir="in">
5575 <desc>Serial port that is subject to change.</desc>
5576 </param>
5577 </method>
5578
5579 <method name="onParallelPortChange">
5580 <desc>
5581 Notification when a property of one of the
5582 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5583 changes. Interested callees should use ISerialPort methods and
5584 attributes to find out what has changed.
5585 </desc>
5586 <param name="parallelPort" type="IParallelPort" dir="in">
5587 <desc>Parallel port that is subject to change.</desc>
5588 </param>
5589 </method>
5590
5591 <method name="onStorageControllerChange">
5592 <desc>
5593 Notification when a property of one of the
5594 virtual <link to="IMachine::getStorageControllers">storage controllers</link>
5595 changes. Interested callees should use query the corresponding collections
5596 to find out what has changed.
5597 </desc>
5598 </method>
5599
5600 <method name="onVRDPServerChange">
5601 <desc>
5602 Notification when a property of the
5603 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5604 Interested callees should use IVRDPServer methods and attributes to
5605 find out what has changed.
5606 </desc>
5607 </method>
5608
5609 <method name="onUSBControllerChange">
5610 <desc>
5611 Notification when a property of the virtual
5612 <link to="IMachine::USBController">USB controller</link> changes.
5613 Interested callees should use IUSBController methods and attributes to
5614 find out what has changed.
5615 </desc>
5616 </method>
5617
5618 <method name="onUSBDeviceStateChange">
5619 <desc>
5620 Notification when a USB device is attached to or detached from
5621 the virtual USB controller.
5622
5623 This notification is sent as a result of the indirect
5624 request to attach the device because it matches one of the
5625 machine USB filters, or as a result of the direct request
5626 issued by <link to="IConsole::attachUSBDevice"/> or
5627 <link to="IConsole::detachUSBDevice"/>.
5628
5629 This notification is sent in case of both a succeeded and a
5630 failed request completion. When the request succeeds, the
5631 @a error parameter is @c null, and the given device has been
5632 already added to (when @a attached is @c true) or removed from
5633 (when @a attached is @c false) the collection represented by
5634 <link to="IConsole::USBDevices"/>. On failure, the collection
5635 doesn't change and the @a error parameter represents the error
5636 message describing the failure.
5637
5638 </desc>
5639 <param name="device" type="IUSBDevice" dir="in">
5640 <desc>Device that is subject to state change.</desc>
5641 </param>
5642 <param name="attached" type="boolean" dir="in">
5643 <desc>
5644 <tt>true</tt> if the device was attached
5645 and <tt>false</tt> otherwise.
5646 </desc>
5647 </param>
5648 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5649 <desc>
5650 <tt>null</tt> on success or an error message object on
5651 failure.
5652 </desc>
5653 </param>
5654 </method>
5655
5656 <method name="onSharedFolderChange">
5657 <desc>
5658 Notification when a shared folder is added or removed.
5659 The @a scope argument defines one of three scopes:
5660 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5661 (<link to="Scope_Global">Global</link>),
5662 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5663 the machine (<link to="Scope_Machine">Machine</link>) or <link
5664 to="IConsole::sharedFolders">transient shared folders</link> of the
5665 machine (<link to="Scope_Session">Session</link>). Interested callees
5666 should use query the corresponding collections to find out what has
5667 changed.
5668 </desc>
5669 <param name="scope" type="Scope" dir="in">
5670 <desc>Scope of the notification.</desc>
5671 </param>
5672 </method>
5673
5674 <method name="onRuntimeError">
5675 <desc>
5676 Notification when an error happens during the virtual
5677 machine execution.
5678
5679 There are three kinds of runtime errors:
5680 <ul>
5681 <li><i>fatal</i></li>
5682 <li><i>non-fatal with retry</i></li>
5683 <li><i>non-fatal warnings</i></li>
5684 </ul>
5685
5686 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5687 to <tt>true</tt>. In case of fatal errors, the virtual machine
5688 execution is always paused before calling this notification, and
5689 the notification handler is supposed either to immediately save
5690 the virtual machine state using <link to="IConsole::saveState"/>
5691 or power it off using <link to="IConsole::powerDown"/>.
5692 Resuming the execution can lead to unpredictable results.
5693
5694 <b>Non-fatal</b> errors and warnings are indicated by the
5695 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5696 is in the Paused state by the time the error notification is
5697 received, it means that the user can <i>try to resume</i> the machine
5698 execution after attempting to solve the problem that caused the
5699 error. In this case, the notification handler is supposed
5700 to show an appropriate message to the user (depending on the
5701 value of the @a id parameter) that offers several actions such
5702 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5703 wants to retry, the notification handler should continue
5704 the machine execution using the <link to="IConsole::resume"/>
5705 call. If the machine execution is not Paused during this
5706 notification, then it means this notification is a <i>warning</i>
5707 (for example, about a fatal condition that can happen very soon);
5708 no immediate action is required from the user, the machine
5709 continues its normal execution.
5710
5711 Note that in either case the notification handler
5712 <b>must not</b> perform any action directly on a thread
5713 where this notification is called. Everything it is allowed to
5714 do is to post a message to another thread that will then talk
5715 to the user and take the corresponding action.
5716
5717 Currently, the following error identifiers are known:
5718 <ul>
5719 <li><tt>"HostMemoryLow"</tt></li>
5720 <li><tt>"HostAudioNotResponding"</tt></li>
5721 <li><tt>"VDIStorageFull"</tt></li>
5722 </ul>
5723
5724 <note>
5725 This notification is not designed to be implemented by
5726 more than one callback at a time. If you have multiple
5727 IConsoleCallback instances registered on the given
5728 IConsole object, make sure you simply do nothing but
5729 return @c S_OK from all but one of them that does actual
5730 user notification and performs necessary actions.
5731 </note>
5732
5733 </desc>
5734 <param name="fatal" type="boolean" dir="in">
5735 <desc>Whether the error is fatal or not</desc>
5736 </param>
5737 <param name="id" type="wstring" dir="in">
5738 <desc>Error identifier</desc>
5739 </param>
5740 <param name="message" type="wstring" dir="in">
5741 <desc>Optional error message</desc>
5742 </param>
5743 </method>
5744
5745 <method name="onCanShowWindow">
5746 <desc>
5747 Notification when a call to
5748 <link to="IMachine::canShowConsoleWindow"/> is made by a
5749 front-end to check if a subsequent call to
5750 <link to="IMachine::showConsoleWindow"/> can succeed.
5751
5752 The callee should give an answer appropriate to the current
5753 machine state in the @a canShow argument. This answer must
5754 remain valid at least until the next
5755 <link to="IConsole::state">machine state</link> change.
5756
5757 <note>
5758 This notification is not designed to be implemented by
5759 more than one callback at a time. If you have multiple
5760 IConsoleCallback instances registered on the given
5761 IConsole object, make sure you simply do nothing but
5762 return @c true and @c S_OK from all but one of them that
5763 actually manages console window activation.
5764 </note>
5765 </desc>
5766 <param name="canShow" type="boolean" dir="return">
5767 <desc>
5768 @c true if the console window can be shown and @c
5769 false otherwise.
5770 </desc>
5771 </param>
5772 </method>
5773
5774 <method name="onShowWindow">
5775 <desc>
5776 Notification when a call to
5777 <link to="IMachine::showConsoleWindow"/>
5778 requests the console window to be activated and brought to
5779 foreground on the desktop of the host PC.
5780
5781 This notification should cause the VM console process to
5782 perform the requested action as described above. If it is
5783 impossible to do it at a time of this notification, this
5784 method should return a failure.
5785
5786 Note that many modern window managers on many platforms
5787 implement some sort of focus stealing prevention logic, so
5788 that it may be impossible to activate a window without the
5789 help of the currently active application (which is supposedly
5790 an initiator of this notification). In this case, this method
5791 must return a non-zero identifier that represents the
5792 top-level window of the VM console process. The caller, if it
5793 represents a currently active process, is responsible to use
5794 this identifier (in a platform-dependent manner) to perform
5795 actual window activation.
5796
5797 This method must set @a winId to zero if it has performed all
5798 actions necessary to complete the request and the console
5799 window is now active and in foreground, to indicate that no
5800 further action is required on the caller's side.
5801
5802 <note>
5803 This notification is not designed to be implemented by
5804 more than one callback at a time. If you have multiple
5805 IConsoleCallback instances registered on the given
5806 IConsole object, make sure you simply do nothing but
5807 return @c S_OK from all but one of them that actually
5808 manages console window activation.
5809 </note>
5810 </desc>
5811 <param name="winId" type="unsigned long long" dir="return">
5812 <desc>
5813 Platform-dependent identifier of the top-level VM console
5814 window, or zero if this method has performed all actions
5815 necessary to implement the <i>show window</i> semantics for
5816 the given platform and/or this VirtualBox front-end.
5817 </desc>
5818 </param>
5819 </method>
5820
5821 </interface>
5822
5823 <interface
5824 name="IRemoteDisplayInfo" extends="$unknown"
5825 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5826 wsmap="struct"
5827 >
5828 <desc>
5829 Contains information about the remote display (VRDP) capabilities and status.
5830 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5831 </desc>
5832
5833 <attribute name="active" type="boolean" readonly="yes">
5834 <desc>
5835 Whether the remote display connection is active.
5836 </desc>
5837 </attribute>
5838
5839 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5840 <desc>
5841 How many times a client connected.
5842 </desc>
5843 </attribute>
5844
5845 <attribute name="beginTime" type="long long" readonly="yes">
5846 <desc>
5847 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5848 </desc>
5849 </attribute>
5850
5851 <attribute name="endTime" type="long long" readonly="yes">
5852 <desc>
5853 When the last connection was terminated or the current time, if
5854 connection is still active, in milliseconds since 1970-01-01 UTC.
5855 </desc>
5856 </attribute>
5857
5858 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5859 <desc>
5860 How many bytes were sent in last or current, if still active, connection.
5861 </desc>
5862 </attribute>
5863
5864 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5865 <desc>
5866 How many bytes were sent in all connections.
5867 </desc>
5868 </attribute>
5869
5870 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5871 <desc>
5872 How many bytes were received in last or current, if still active, connection.
5873 </desc>
5874 </attribute>
5875
5876 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5877 <desc>
5878 How many bytes were received in all connections.
5879 </desc>
5880 </attribute>
5881
5882 <attribute name="user" type="wstring" readonly="yes">
5883 <desc>
5884 Login user name supplied by the client.
5885 </desc>
5886 </attribute>
5887
5888 <attribute name="domain" type="wstring" readonly="yes">
5889 <desc>
5890 Login domain name supplied by the client.
5891 </desc>
5892 </attribute>
5893
5894 <attribute name="clientName" type="wstring" readonly="yes">
5895 <desc>
5896 The client name supplied by the client.
5897 </desc>
5898 </attribute>
5899
5900 <attribute name="clientIP" type="wstring" readonly="yes">
5901 <desc>
5902 The IP address of the client.
5903 </desc>
5904 </attribute>
5905
5906 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5907 <desc>
5908 The client software version number.
5909 </desc>
5910 </attribute>
5911
5912 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5913 <desc>
5914 Public key exchange method used when connection was established.
5915 Values: 0 - RDP4 public key exchange scheme.
5916 1 - X509 certificates were sent to client.
5917 </desc>
5918 </attribute>
5919
5920 </interface>
5921
5922 <interface
5923 name="IConsole" extends="$unknown"
5924 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5925 wsmap="managed"
5926 >
5927 <desc>
5928 The IConsole interface represents an interface to control virtual
5929 machine execution.
5930
5931 The console object that implements the IConsole interface is obtained
5932 from a session object after the session for the given machine has been
5933 opened using one of <link to="IVirtualBox::openSession"/>,
5934 <link to="IVirtualBox::openRemoteSession"/> or
5935 <link to="IVirtualBox::openExistingSession"/> methods.
5936
5937 Methods of the IConsole interface allow the caller to query the current
5938 virtual machine execution state, pause the machine or power it down, save
5939 the machine state or take a snapshot, attach and detach removable media
5940 and so on.
5941
5942 <see>ISession</see>
5943 </desc>
5944
5945 <attribute name="machine" type="IMachine" readonly="yes">
5946 <desc>
5947 Machine object this console is sessioned with.
5948 <note>
5949 This is a convenience property, it has the same value as
5950 <link to="ISession::machine"/> of the corresponding session
5951 object.
5952 </note>
5953 </desc>
5954 </attribute>
5955
5956 <attribute name="state" type="MachineState" readonly="yes">
5957 <desc>
5958 Current execution state of the machine.
5959 <note>
5960 This property always returns the same value as the corresponding
5961 property of the IMachine object this console is sessioned with.
5962 For the process that owns (executes) the VM, this is the
5963 preferable way of querying the VM state, because no IPC
5964 calls are made.
5965 </note>
5966 </desc>
5967 </attribute>
5968
5969 <attribute name="guest" type="IGuest" readonly="yes">
5970 <desc>Guest object.</desc>
5971 </attribute>
5972
5973 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5974 <desc>
5975 Virtual keyboard object.
5976 <note>
5977 If the machine is not running, any attempt to use
5978 the returned object will result in an error.
5979 </note>
5980 </desc>
5981 </attribute>
5982
5983 <attribute name="mouse" type="IMouse" readonly="yes">
5984 <desc>
5985 Virtual mouse object.
5986 <note>
5987 If the machine is not running, any attempt to use
5988 the returned object will result in an error.
5989 </note>
5990 </desc>
5991 </attribute>
5992
5993 <attribute name="display" type="IDisplay" readonly="yes">
5994 <desc>Virtual display object.
5995 <note>
5996 If the machine is not running, any attempt to use
5997 the returned object will result in an error.
5998 </note>
5999 </desc>
6000 </attribute>
6001
6002 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6003 <desc>Debugging interface.</desc>
6004 </attribute>
6005
6006 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6007 <desc>
6008 Collection of USB devices currently attached to the virtual
6009 USB controller.
6010 <note>
6011 The collection is empty if the machine is not running.
6012 </note>
6013 </desc>
6014 </attribute>
6015
6016 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6017 <desc>
6018 List of USB devices currently attached to the remote VRDP client.
6019 Once a new device is physically attached to the remote host computer,
6020 it appears in this list and remains there until detached.
6021 </desc>
6022 </attribute>
6023
6024 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6025 <desc>
6026 Collection of shared folders for the current session. These folders
6027 are called transient shared folders because they are available to the
6028 guest OS running inside the associated virtual machine only for the
6029 duration of the session (as opposed to
6030 <link to="IMachine::sharedFolders"/> which represent permanent shared
6031 folders). When the session is closed (e.g. the machine is powered down),
6032 these folders are automatically discarded.
6033
6034 New shared folders are added to the collection using
6035 <link to="#createSharedFolder"/>. Existing shared folders can be
6036 removed using <link to="#removeSharedFolder"/>.
6037 </desc>
6038 </attribute>
6039
6040 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6041 <desc>
6042 Interface that provides information on Remote Display (VRDP) connection.
6043 </desc>
6044 </attribute>
6045
6046 <method name="powerUp">
6047 <desc>
6048 Starts the virtual machine execution using the current machine
6049 state (that is, its current execution state, current settings and
6050 current hard disks).
6051
6052 If the machine is powered off or aborted, the execution will
6053 start from the beginning (as if the real hardware were just
6054 powered on).
6055
6056 If the machine is in the <link to="MachineState_Saved"/> state,
6057 it will continue its execution the point where the state has
6058 been saved.
6059
6060 <note>
6061 Unless you are trying to write a new VirtualBox front-end that
6062 performs direct machine execution (like the VirtualBox or VBoxSDL
6063 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6064 session opened by <link to="IVirtualBox::openSession"/> and use this
6065 session only to change virtual machine settings. If you simply want to
6066 start virtual machine execution using one of the existing front-ends
6067 (for example the VirtualBox GUI or headless server), simply use
6068 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6069 power up the machine automatically for you.
6070 </note>
6071
6072 <see>#saveState</see>
6073 <result name="VBOX_E_INVALID_VM_STATE">
6074 Virtual machine already running.
6075 </result>
6076 <result name="VBOX_E_HOST_ERROR">
6077 Host interface does not exist or name not set.
6078 </result>
6079 <result name="VBOX_E_FILE_ERROR">
6080 Invalid saved state file.
6081 </result>
6082 </desc>
6083 <param name="progress" type="IProgress" dir="return">
6084 <desc>Progress object to track the operation completion.</desc>
6085 </param>
6086 </method>
6087
6088 <method name="powerUpPaused">
6089 <desc>
6090 Identical to powerUp except that the VM will enter the
6091 <link to="MachineState_Paused"/> state, instead of
6092 <link to="MachineState_Running"/>.
6093
6094 <see>#powerUp</see>
6095 <result name="VBOX_E_INVALID_VM_STATE">
6096 Virtual machine already running.
6097 </result>
6098 <result name="VBOX_E_HOST_ERROR">
6099 Host interface does not exist or name not set.
6100 </result>
6101 <result name="VBOX_E_FILE_ERROR">
6102 Invalid saved state file.
6103 </result>
6104 </desc>
6105 <param name="progress" type="IProgress" dir="return">
6106 <desc>Progress object to track the operation completion.</desc>
6107 </param>
6108 </method>
6109
6110 <method name="powerDown">
6111 <desc>
6112 Stops the virtual machine execution.
6113 After this operation completes, the machine will go to the
6114 PoweredOff state.
6115
6116 @deprecated This method will be removed in VirtualBox 2.1 where the
6117 powerDownAsync() method will take its name. Do not use this method in
6118 the code.
6119 <result name="VBOX_E_INVALID_VM_STATE">
6120 Virtual machine must be Running, Paused or Stuck to be powered down.
6121 </result>
6122 <result name="VBOX_E_VM_ERROR">
6123 Unable to power off or destroy virtual machine.
6124 </result>
6125 </desc>
6126 </method>
6127
6128 <method name="powerDownAsync">
6129 <desc>
6130 Initiates the power down procedure to stop the virtual machine
6131 execution.
6132
6133 The completion of the power down procedure is tracked using the returned
6134 IProgress object. After the operation is complete, the machine will go
6135 to the PoweredOff state.
6136
6137 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
6138 where the original powerDown() method will be removed. You will need to
6139 rename "powerDownAsync" to "powerDown" in your sources to make them
6140 build with version 2.1.
6141 <result name="VBOX_E_INVALID_VM_STATE">
6142 Virtual machine must be Running, Paused or Stuck to be powered down.
6143 </result>
6144 </desc>
6145 <param name="progress" type="IProgress" dir="return">
6146 <desc>Progress object to track the operation completion.</desc>
6147 </param>
6148 </method>
6149
6150 <method name="reset">
6151 <desc>Resets the virtual machine.
6152 <result name="VBOX_E_INVALID_VM_STATE">
6153 Virtual machine not in Running state.
6154 </result>
6155 <result name="VBOX_E_VM_ERROR">
6156 Virtual machine error in reset operation.
6157 </result>
6158 </desc>
6159 </method>
6160
6161 <method name="pause">
6162 <desc>Pauses the virtual machine execution.
6163 <result name="VBOX_E_INVALID_VM_STATE">
6164 Virtual machine not in Running state.
6165 </result>
6166 <result name="VBOX_E_VM_ERROR">
6167 Virtual machine error in suspend operation.
6168 </result>
6169 </desc>
6170 </method>
6171
6172 <method name="resume">
6173 <desc>Resumes the virtual machine execution.
6174 <result name="VBOX_E_INVALID_VM_STATE">
6175 Virtual machine not in Paused state.
6176 </result>
6177 <result name="VBOX_E_VM_ERROR">
6178 Virtual machine error in resume operation.
6179 </result>
6180 </desc>
6181 </method>
6182
6183 <method name="powerButton">
6184 <desc>Sends the ACPI power button event to the guest.
6185 <result name="VBOX_E_INVALID_VM_STATE">
6186 Virtual machine not in Running state.
6187 </result>
6188 <result name="VBOX_E_PDM_ERROR">
6189 Controlled power off failed.
6190 </result>
6191 </desc>
6192 </method>
6193
6194 <method name="sleepButton">
6195 <desc>Sends the ACPI sleep button event to the guest.
6196 <result name="VBOX_E_INVALID_VM_STATE">
6197 Virtual machine not in Running state.
6198 </result>
6199 <result name="VBOX_E_PDM_ERROR">
6200 Sending sleep button event failed.
6201 </result>
6202 </desc>
6203 </method>
6204
6205 <method name="getPowerButtonHandled">
6206 <desc>Checks if the last power button event was handled by guest.
6207 <result name="VBOX_E_PDM_ERROR">
6208 Checking if the event was handled by the guest OS failed.
6209 </result>
6210 </desc>
6211 <param name="handled" type="boolean" dir="return"/>
6212 </method>
6213
6214 <method name="getGuestEnteredACPIMode">
6215 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6216 G1 (sleeping). If this method returns false, the guest will
6217 most likely not respond to external ACPI events.
6218 <result name="VBOX_E_INVALID_VM_STATE">
6219 Virtual machine not in Running state.
6220 </result>
6221 </desc>
6222 <param name="entered" type="boolean" dir="return"/>
6223 </method>
6224
6225 <method name="saveState">
6226 <desc>
6227 Saves the current execution state of a running virtual machine
6228 and stops its execution.
6229
6230 After this operation completes, the machine will go to the
6231 Saved state. Next time it is powered up, this state will
6232 be restored and the machine will continue its execution from
6233 the place where it was saved.
6234
6235 This operation differs from taking a snapshot to the effect
6236 that it doesn't create new differencing hard disks. Also, once
6237 the machine is powered up from the state saved using this method,
6238 the saved state is deleted, so it will be impossible to return
6239 to this state later.
6240
6241 <note>
6242 On success, this method implicitly calls
6243 <link to="IMachine::saveSettings"/> to save all current machine
6244 settings (including runtime changes to the DVD drive, etc.).
6245 Together with the impossibility to change any VM settings when it is
6246 in the Saved state, this guarantees adequate hardware
6247 configuration of the machine when it is restored from the saved
6248 state file.
6249 </note>
6250
6251 <note>
6252 The machine must be in the Running or Paused state, otherwise
6253 the operation will fail.
6254 </note>
6255 <result name="VBOX_E_INVALID_VM_STATE">
6256 Virtual machine state neither Running nor Paused.
6257 </result>
6258 <result name="VBOX_E_FILE_ERROR">
6259 Failed to create directory for saved state file.
6260 </result>
6261
6262 <see><link to="#takeSnapshot"/></see>
6263 </desc>
6264 <param name="progress" type="IProgress" dir="return">
6265 <desc>Progress object to track the operation completion.</desc>
6266 </param>
6267 </method>
6268
6269 <method name="adoptSavedState">
6270 <desc>
6271 Associates the given saved state file to the virtual machine.
6272
6273 On success, the machine will go to the Saved state. Next time it is
6274 powered up, it will be restored from the adopted saved state and
6275 continue execution from the place where the saved state file was
6276 created.
6277
6278 The specified saved state file path may be absolute or relative to the
6279 folder the VM normally saves the state to (usually,
6280 <link to="IMachine::snapshotFolder"/>).
6281
6282 <note>
6283 It's a caller's responsibility to make sure the given saved state
6284 file is compatible with the settings of this virtual machine that
6285 represent its virtual hardware (memory size, hard disk configuration
6286 etc.). If there is a mismatch, the behavior of the virtual machine
6287 is undefined.
6288 </note>
6289 <result name="VBOX_E_INVALID_VM_STATE">
6290 Virtual machine state neither PoweredOff nor Aborted.
6291 </result>
6292 </desc>
6293 <param name="savedStateFile" type="wstring" dir="in">
6294 <desc>Path to the saved state file to adopt.</desc>
6295 </param>
6296 </method>
6297
6298 <method name="discardSavedState">
6299 <desc>
6300 Discards (deletes) the saved state of the virtual machine
6301 previously created by <link to="#saveState"/>. Next time the
6302 machine is powered up, a clean boot will occur.
6303 <note>
6304 This operation is equivalent to resetting or powering off
6305 the machine without doing a proper shutdown in the guest OS.
6306 </note>
6307 <result name="VBOX_E_INVALID_VM_STATE">
6308 Virtual machine not in state Saved.
6309 </result>
6310 </desc>
6311 </method>
6312
6313 <method name="getDeviceActivity">
6314 <desc>
6315 Gets the current activity type of a given device or device group.
6316 <result name="E_INVALIDARG">
6317 Invalid device type.
6318 </result>
6319 </desc>
6320 <param name="type" type="DeviceType" dir="in"/>
6321 <param name="activity" type="DeviceActivity" dir="return"/>
6322 </method>
6323
6324 <method name="attachUSBDevice">
6325 <desc>
6326 Attaches a host USB device with the given UUID to the
6327 USB controller of the virtual machine.
6328
6329 The device needs to be in one of the following states:
6330 <link to="USBDeviceState_Busy"/>,
6331 <link to="USBDeviceState_Available"/> or
6332 <link to="USBDeviceState_Held"/>,
6333 otherwise an error is immediately returned.
6334
6335 When the device state is
6336 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6337 be returned if the host computer refuses to release it for some reason.
6338
6339 <see>IUSBController::deviceFilters, USBDeviceState</see>
6340 <result name="VBOX_E_INVALID_VM_STATE">
6341 Virtual machine state neither Running nor Paused.
6342 </result>
6343 <result name="VBOX_E_PDM_ERROR">
6344 Virtual machine does not have a USB controller.
6345 </result>
6346 </desc>
6347 <param name="id" type="uuid" dir="in">
6348 <desc>UUID of the host USB device to attach.</desc>
6349 </param>
6350 </method>
6351
6352 <method name="detachUSBDevice">
6353 <desc>
6354 Detaches an USB device with the given UUID from the USB controller
6355 of the virtual machine.
6356
6357 After this method succeeds, the VirtualBox server re-initiates
6358 all USB filters as if the device were just physically attached
6359 to the host, but filters of this machine are ignored to avoid
6360 a possible automatic re-attachment.
6361
6362 <see>IUSBController::deviceFilters, USBDeviceState</see>
6363
6364 <result name="VBOX_E_PDM_ERROR">
6365 Virtual machine does not have a USB controller.
6366 </result>
6367 <result name="E_INVALIDARG">
6368 USB device not attached to this virtual machine.
6369 </result>
6370 </desc>
6371 <param name="id" type="uuid" dir="in">
6372 <desc>UUID of the USB device to detach.</desc>
6373 </param>
6374 <param name="device" type="IUSBDevice" dir="return">
6375 <desc>Detached USB device.</desc>
6376 </param>
6377 </method>
6378
6379 <method name="findUSBDeviceByAddress">
6380 <desc>
6381 Searches for a USB device with the given host address.
6382
6383 <result name="VBOX_E_OBJECT_NOT_FOUND">
6384 Given @c name does not correspond to any USB device.
6385 </result>
6386
6387 <see>IUSBDevice::address</see>
6388 </desc>
6389 <param name="name" type="wstring" dir="in">
6390 <desc>
6391 Address of the USB device (as assigned by the host) to
6392 search for.
6393 </desc>
6394 </param>
6395 <param name="device" type="IUSBDevice" dir="return">
6396 <desc>Found USB device object.</desc>
6397 </param>
6398 </method>
6399
6400 <method name="findUSBDeviceById">
6401 <desc>
6402 Searches for a USB device with the given UUID.
6403
6404 <result name="VBOX_E_OBJECT_NOT_FOUND">
6405 Given @c id does not correspond to any USB device.
6406 </result>
6407
6408 <see>IUSBDevice::id</see>
6409 </desc>
6410 <param name="id" type="uuid" dir="in">
6411 <desc>UUID of the USB device to search for.</desc>
6412 </param>
6413 <param name="device" type="IUSBDevice" dir="return">
6414 <desc>Found USB device object.</desc>
6415 </param>
6416 </method>
6417
6418 <method name="createSharedFolder">
6419 <desc>
6420 Creates a transient new shared folder by associating the given logical
6421 name with the given host path, adds it to the collection of shared
6422 folders and starts sharing it. Refer to the description of
6423 <link to="ISharedFolder"/> to read more about logical names.
6424
6425 <result name="VBOX_E_INVALID_VM_STATE">
6426 Virtual machine in Saved state or currently changing state.
6427 </result>
6428 <result name="VBOX_E_FILE_ERROR">
6429 Shared folder already exists or not accessible.
6430 </result>
6431 </desc>
6432 <param name="name" type="wstring" dir="in">
6433 <desc>Unique logical name of the shared folder.</desc>
6434 </param>
6435 <param name="hostPath" type="wstring" dir="in">
6436 <desc>Full path to the shared folder in the host file system.</desc>
6437 </param>
6438 <param name="writable" type="boolean" dir="in">
6439 <desc>Whether the share is writable or readonly</desc>
6440 </param>
6441 </method>
6442
6443 <method name="removeSharedFolder">
6444 <desc>
6445 Removes a transient shared folder with the given name previously
6446 created by <link to="#createSharedFolder"/> from the collection of
6447 shared folders and stops sharing it.
6448 <result name="VBOX_E_INVALID_VM_STATE">
6449 Virtual machine in Saved state or currently changing state.
6450 </result>
6451 <result name="VBOX_E_FILE_ERROR">
6452 Shared folder does not exists.
6453 </result>
6454 </desc>
6455 <param name="name" type="wstring" dir="in">
6456 <desc>Logical name of the shared folder to remove.</desc>
6457 </param>
6458 </method>
6459
6460 <method name="takeSnapshot">
6461 <desc>
6462 Saves the current execution state and all settings of the
6463 machine and creates differencing images for all
6464 normal (non-independent) hard disks.
6465
6466 This method can be called for a PoweredOff, Saved, Running or
6467 Paused virtual machine. When the machine is PoweredOff, an
6468 offline <link to="ISnapshot">snapshot</link> is created,
6469 in all other cases -- an online snapshot.
6470
6471 The taken snapshot is always based on the
6472 <link to="IMachine::currentSnapshot">current
6473 snapshot</link> of the associated virtual machine and becomes
6474 a new current snapshot.
6475
6476 <note>
6477 This method implicitly calls <link to="IMachine::saveSettings"/> to
6478 save all current machine settings before taking an offline snapshot.
6479 </note>
6480
6481 <see>ISnapshot, <link to="#saveState"/></see>
6482 <result name="VBOX_E_INVALID_VM_STATE">
6483 Virtual machine currently changing state.
6484 </result>
6485 </desc>
6486 <param name="name" type="wstring" dir="in">
6487 <desc>Short name for the snapshot.</desc>
6488 </param>
6489 <param name="description" type="wstring" dir="in">
6490 <desc>Optional description of the snapshot.</desc>
6491 </param>
6492 <param name="progress" type="IProgress" dir="return">
6493 <desc>Progress object to track the operation completion.</desc>
6494 </param>
6495 </method>
6496
6497 <method name="discardSnapshot">
6498 <desc>
6499
6500 Starts discarding the specified snapshot. The execution state
6501 and settings of the associated machine stored in the snapshot
6502 will be deleted. The contents of all differencing hard disks of
6503 this snapshot will be merged with the contents of their
6504 dependent child hard disks to keep the, disks valid (in other
6505 words, all changes represented by hard disks being discarded
6506 will be propagated to their child hard disks). After that, this
6507 snapshot's differencing hard disks will be deleted. The parent
6508 of this snapshot will become a new parent for all its child
6509 snapshots.
6510
6511 If the discarded snapshot is the current one, its parent
6512 snapshot will become a new current snapshot. The current machine
6513 state is not directly affected in this case, except that
6514 currently attached differencing hard disks based on hard disks
6515 of the discarded snapshot will be also merged as described
6516 above.
6517
6518 If the discarded snapshot is the first one (the root snapshot)
6519 and it has exactly one child snapshot, this child snapshot will
6520 become the first snapshot after discarding. If there are no
6521 children at all (i.e. the first snapshot is the only snapshot of
6522 the machine), both the current and the first snapshot of the
6523 machine will be set to null. In all other cases, the first
6524 snapshot cannot be discarded.
6525
6526 You cannot discard the snapshot if it
6527 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6528 hard disks that have differencing hard disks based on them. Snapshots of
6529 such kind can be discarded only when every normal hard disk has either
6530 no children at all or exactly one child. In the former case, the normal
6531 hard disk simply becomes unused (i.e. not attached to any VM). In the
6532 latter case, it receives all the changes stored in the child hard disk,
6533 and then it replaces the child hard disk in the configuration of the
6534 corresponding snapshot or machine.
6535
6536 Also, you cannot discard the snapshot if it stores hard disks
6537 (of any type) having differencing child hard disks that belong
6538 to other machines. Such snapshots can be only discarded after
6539 you discard all snapshots of other machines containing "foreign"
6540 child disks, or detach these "foreign" child disks from machines
6541 they are attached to.
6542
6543 One particular example of the snapshot storing normal hard disks
6544 is the first snapshot of a virtual machine that had normal hard
6545 disks attached when taking the snapshot. Be careful when
6546 discarding such snapshots because this implicitly commits
6547 changes (made since the snapshot being discarded has been taken)
6548 to normal hard disks (as described above), which may be not what
6549 you want.
6550
6551 The virtual machine is put to
6552 the <link to="MachineState_Discarding">Discarding</link> state until
6553 the discard operation is completed.
6554
6555 <note>
6556 The machine must not be running, otherwise the operation
6557 will fail.
6558 </note>
6559
6560 <note>
6561 Child hard disks of all normal hard disks of the discarded snapshot
6562 must be accessible (see <link to="IMedium::state"/>) for this
6563 operation to succeed. In particular, this means that all virtual
6564 machines, whose hard disks are directly or indirectly based on the
6565 hard disks of discarded snapshot, must be powered off.
6566 </note>
6567 <note>
6568 Merging hard disk contents can be very time and disk space
6569 consuming, if these disks are big in size and have many
6570 children. However, if the snapshot being discarded is the last
6571 (head) snapshot on the branch, the operation will be rather
6572 quick.
6573 </note>
6574 <note>
6575 Note that discarding the current snapshot
6576 will implicitly call <link to="IMachine::saveSettings"/> to
6577 make all current machine settings permanent.
6578 </note>
6579 <result name="VBOX_E_INVALID_VM_STATE">
6580 Virtual machine is running.
6581 </result>
6582 </desc>
6583 <param name="id" type="uuid" dir="in">
6584 <desc>UUID of the snapshot to discard.</desc>
6585 </param>
6586 <param name="progress" type="IProgress" dir="return">
6587 <desc>Progress object to track the operation completion.</desc>
6588 </param>
6589 </method>
6590
6591 <method name="discardCurrentState">
6592 <desc>
6593 This operation is similar to <link to="#discardSnapshot"/> but
6594 affects the current machine state. This means that the state stored in
6595 the current snapshot will become a new current state, and all current
6596 settings of the machine and changes stored in differencing hard disks
6597 will be lost.
6598
6599 After this operation is successfully completed, new empty differencing
6600 hard disks are created for all normal hard disks of the machine.
6601
6602 If the current snapshot of the machine is an online snapshot, the
6603 machine will go to the <link to="MachineState_Saved"> saved
6604 state</link>, so that the next time it is powered on, the execution
6605 state will be restored from the current snapshot.
6606
6607 <note>
6608 The machine must not be running, otherwise the operation will fail.
6609 </note>
6610
6611 <note>
6612 If the machine state is <link to="MachineState_Saved">Saved</link>
6613 prior to this operation, the saved state file will be implicitly
6614 discarded (as if <link to="IConsole::discardSavedState"/> were
6615 called).
6616 </note>
6617
6618 <result name="VBOX_E_INVALID_VM_STATE">
6619 Virtual machine is running.
6620 </result>
6621 </desc>
6622 <param name="progress" type="IProgress" dir="return">
6623 <desc>Progress object to track the operation completion.</desc>
6624 </param>
6625 </method>
6626
6627 <method name="discardCurrentSnapshotAndState">
6628 <desc>
6629
6630 This method is equivalent to
6631 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6632 (currentSnapshot.id(), progress) followed by
6633 <link to="#discardCurrentState"/>.
6634
6635 As a result, the machine will be fully restored from the
6636 snapshot preceding the current snapshot, while both the current
6637 snapshot and the current machine state will be discarded.
6638
6639 If the current snapshot is the first snapshot of the machine (i.e. it
6640 has the only snapshot), the current machine state will be
6641 discarded <b>before</b> discarding the snapshot. In other words, the
6642 machine will be restored from its last snapshot, before discarding
6643 it. This differs from performing a single
6644 <link to="#discardSnapshot"/> call (note that no
6645 <link to="#discardCurrentState"/> will be possible after it)
6646 to the effect that the latter will preserve the current state instead of
6647 discarding it.
6648
6649 Unless explicitly mentioned otherwise, all remarks and
6650 limitations of the above two methods also apply to this method.
6651
6652 <note>
6653 The machine must not be running, otherwise the operation
6654 will fail.
6655 </note>
6656
6657 <note>
6658 If the machine state is <link to="MachineState_Saved">Saved</link>
6659 prior to this operation, the saved state file will be implicitly
6660 discarded (as if <link to="#discardSavedState"/> were
6661 called).
6662 </note>
6663
6664 <note>
6665 This method is more efficient than calling both of the above
6666 methods separately: it requires less IPC calls and provides
6667 a single progress object.
6668 </note>
6669
6670 <result name="VBOX_E_INVALID_VM_STATE">
6671 Virtual machine is running.
6672 </result>
6673 </desc>
6674 <param name="progress" type="IProgress" dir="return">
6675 <desc>Progress object to track the operation completion.</desc>
6676 </param>
6677 </method>
6678
6679 <method name="registerCallback">
6680 <desc>
6681 Registers a new console callback on this instance. The methods of the
6682 callback interface will be called by this instance when the appropriate
6683 event occurs.
6684 </desc>
6685 <param name="callback" type="IConsoleCallback" dir="in"/>
6686 </method>
6687
6688 <method name="unregisterCallback">
6689 <desc>
6690 Unregisters the console callback previously registered using
6691 <link to="#registerCallback"/>.
6692 <result name="E_INVALIDARG">
6693 Given @a callback handler is not registered.
6694 </result>
6695 </desc>
6696 <param name="callback" type="IConsoleCallback" dir="in"/>
6697 </method>
6698 </interface>
6699
6700 <!--
6701 // IHost
6702 /////////////////////////////////////////////////////////////////////////
6703 -->
6704
6705 <interface
6706 name="IHostDVDDrive" extends="$unknown"
6707 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6708 wsmap="managed"
6709 >
6710 <desc>
6711 The IHostDVDDrive interface represents the physical CD/DVD drive
6712 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6713 </desc>
6714
6715 <attribute name="name" type="wstring" readonly="yes">
6716 <desc>
6717 Returns the platform-specific device identifier.
6718 On DOS-like platforms, it is a drive name (e.g. R:).
6719 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6720 </desc>
6721 </attribute>
6722 <attribute name="description" type="wstring" readonly="yes">
6723 <desc>
6724 Returns a human readable description for the drive. This
6725 description usually contains the product and vendor name. A
6726 @c null string is returned if the description is not available.
6727 </desc>
6728 </attribute>
6729 <attribute name="udi" type="wstring" readonly="yes">
6730 <desc>
6731 Returns the unique device identifier for the drive. This
6732 attribute is reserved for future use instead of
6733 <link to="#name"/>. Currently it is not used and may return
6734 @c null on some platforms.
6735 </desc>
6736 </attribute>
6737
6738 </interface>
6739
6740 <interface
6741 name="IHostFloppyDrive" extends="$unknown"
6742 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6743 wsmap="managed"
6744 >
6745 <desc>
6746 The IHostFloppyDrive interface represents the physical floppy drive
6747 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6748 </desc>
6749 <attribute name="name" type="wstring" readonly="yes">
6750 <desc>
6751 Returns the platform-specific device identifier.
6752 On DOS-like platforms, it is a drive name (e.g. A:).
6753 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6754 </desc>
6755 </attribute>
6756 <attribute name="description" type="wstring" readonly="yes">
6757 <desc>
6758 Returns a human readable description for the drive. This
6759 description usually contains the product and vendor name. A
6760 @c null string is returned if the description is not available.
6761 </desc>
6762 </attribute>
6763 <attribute name="udi" type="wstring" readonly="yes">
6764 <desc>
6765 Returns the unique device identifier for the drive. This
6766 attribute is reserved for future use instead of
6767 <link to="#name"/>. Currently it is not used and may return
6768 @c null on some platforms.
6769 </desc>
6770 </attribute>
6771 </interface>
6772
6773 <enum
6774 name="HostNetworkInterfaceMediumType"
6775 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6776 >
6777 <desc>
6778 Type of encapsulation. Ethernet encapsulation includes both wired and
6779 wireless Ethernet connections.
6780 <see>IHostNetworkInterface</see>
6781 </desc>
6782
6783 <const name="Unknown" value="0">
6784 <desc>
6785 The type of interface cannot be determined.
6786 </desc>
6787 </const>
6788 <const name="Ethernet" value="1">
6789 <desc>
6790 Ethernet frame encapsulation.
6791 </desc>
6792 </const>
6793 <const name="PPP" value="2">
6794 <desc>
6795 Point-to-point protocol encapsulation.
6796 </desc>
6797 </const>
6798 <const name="SLIP" value="3">
6799 <desc>
6800 Serial line IP encapsulation.
6801 </desc>
6802 </const>
6803 </enum>
6804
6805 <enum
6806 name="HostNetworkInterfaceStatus"
6807 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6808 >
6809 <desc>
6810 Current status of the interface.
6811 <see>IHostNetworkInterface</see>
6812 </desc>
6813
6814 <const name="Unknown" value="0">
6815 <desc>
6816 The state of interface cannot be determined.
6817 </desc>
6818 </const>
6819 <const name="Up" value="1">
6820 <desc>
6821 The interface is fully operational.
6822 </desc>
6823 </const>
6824 <const name="Down" value="2">
6825 <desc>
6826 The interface is not functioning.
6827 </desc>
6828 </const>
6829 </enum>
6830
6831 <enum
6832 name="HostNetworkInterfaceType"
6833 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6834 >
6835 <desc>
6836 Network interface type.
6837 </desc>
6838 <const name="Bridged" value="1"/>
6839 <const name="HostOnly" value="2"/>
6840 </enum>
6841
6842 <interface
6843 name="IHostNetworkInterface" extends="$unknown"
6844 uuid="88adaf3f-166b-4542-9457-0f1323507fae"
6845 wsmap="managed"
6846 >
6847 <desc>
6848 Reprents one of host's network interfaces. IP V6 address and network
6849 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6850 separated by colons.
6851 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6852 </desc>
6853 <attribute name="name" type="wstring" readonly="yes">
6854 <desc>Returns the host network interface name.</desc>
6855 </attribute>
6856
6857 <attribute name="id" type="uuid" readonly="yes">
6858 <desc>Returns the interface UUID.</desc>
6859 </attribute>
6860
6861 <attribute name="networkName" type="wstring" readonly="yes">
6862 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6863 </attribute>
6864
6865 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6866 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6867 </attribute>
6868
6869 <attribute name="IPAddress" type="wstring" readonly="yes">
6870 <desc>Returns the IP V4 address of the interface.</desc>
6871 </attribute>
6872
6873 <attribute name="networkMask" type="wstring" readonly="yes">
6874 <desc>Returns the network mask of the interface.</desc>
6875 </attribute>
6876
6877 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6878 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6879 </attribute>
6880
6881 <attribute name="IPV6Address" type="wstring" readonly="yes">
6882 <desc>Returns the IP V6 address of the interface.</desc>
6883 </attribute>
6884
6885 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6886 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6887 </attribute>
6888
6889 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6890 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6891 </attribute>
6892
6893 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6894 <desc>Type of protocol encapsulation used.</desc>
6895 </attribute>
6896
6897 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6898 <desc>Status of the interface.</desc>
6899 </attribute>
6900
6901 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6902 <desc>specifies the host interface type.</desc>
6903 </attribute>
6904
6905 <method name="enableStaticIpConfig">
6906 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6907 <param name="IPAddress" type="wstring" dir="in">
6908 <desc>
6909 IP address.
6910 </desc>
6911 </param>
6912 <param name="networkMask" type="wstring" dir="in">
6913 <desc>
6914 network mask.
6915 </desc>
6916 </param>
6917 </method>
6918
6919 <method name="enableStaticIpConfigV6">
6920 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6921 <param name="IPV6Address" type="wstring" dir="in">
6922 <desc>
6923 IP address.
6924 </desc>
6925 </param>
6926 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6927 <desc>
6928 network mask.
6929 </desc>
6930 </param>
6931 </method>
6932
6933 <method name="enableDynamicIpConfig">
6934 <desc>enables the dynamic IP configuration.</desc>
6935 </method>
6936
6937 <method name="dhcpRediscover">
6938 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6939 </method>
6940
6941 </interface>
6942
6943 <interface
6944 name="IHost" extends="$unknown"
6945 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6946 wsmap="managed"
6947 >
6948 <desc>
6949 The IHost interface represents the physical machine that this VirtualBox
6950 installation runs on.
6951
6952 An object implementing this interface is returned by the
6953 <link to="IVirtualBox::host" /> attribute. This interface contains
6954 read-only information about the host's physical hardware (such as what
6955 processors and disks are available, what the host operating system is,
6956 and so on) and also allows for manipulating some of the host's hardware,
6957 such as global USB device filters and host interface networking.
6958
6959 </desc>
6960 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6961 <desc>List of DVD drives available on the host.</desc>
6962 </attribute>
6963
6964 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6965 <desc>List of floppy drives available on the host.</desc>
6966 </attribute>
6967
6968 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6969 <desc>
6970 List of USB devices currently attached to the host.
6971 Once a new device is physically attached to the host computer,
6972 it appears in this list and remains there until detached.
6973
6974 <note>
6975 This method may set a @ref com_warnings "warning result code".
6976 </note>
6977 <note>
6978 If USB functionality is not available in the given edition of
6979 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6980 </note>
6981 </desc>
6982 </attribute>
6983
6984 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6985 <desc>
6986 List of USB device filters in action.
6987 When a new device is physically attached to the host computer,
6988 filters from this list are applied to it (in order they are stored
6989 in the list). The first matched filter will determine the
6990 <link to="IHostUSBDeviceFilter::action">action</link>
6991 performed on the device.
6992
6993 Unless the device is ignored by these filters, filters of all
6994 currently running virtual machines
6995 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6996
6997 <note>
6998 This method may set a @ref com_warnings "warning result code".
6999 </note>
7000 <note>
7001 If USB functionality is not available in the given edition of
7002 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7003 </note>
7004
7005 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7006 </desc>
7007 </attribute>
7008
7009 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7010 <desc>List of host network interfaces currently defined on the host.</desc>
7011 </attribute>
7012
7013 <attribute name="processorCount" type="unsigned long" readonly="yes">
7014 <desc>Number of (logical) CPUs installed in the host system.</desc>
7015 </attribute>
7016
7017 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7018 <desc>Number of (logical) CPUs online in the host system.</desc>
7019 </attribute>
7020
7021 <method name="getProcessorSpeed">
7022 <desc>Query the (approximate) maximum speed of a specified host CPU in
7023 Megahertz.
7024 </desc>
7025 <param name="cpuId" type="unsigned long" dir="in">
7026 <desc>
7027 Identifier of the CPU.
7028 </desc>
7029 </param>
7030 <param name="speed" type="unsigned long" dir="return">
7031 <desc>
7032 Speed value. 0 is returned if value is not known or @a cpuId is
7033 invalid.
7034 </desc>
7035 </param>
7036 </method>
7037
7038 <method name="getProcessorFeature">
7039 <desc>Query whether a CPU feature is supported or not.</desc>
7040 <param name="feature" type="ProcessorFeature" dir="in">
7041 <desc>
7042 CPU Feature identifier.
7043 </desc>
7044 </param>
7045 <param name="supported" type="boolean" dir="return">
7046 <desc>
7047 Feature is supported or not.
7048 </desc>
7049 </param>
7050 </method>
7051
7052 <method name="getProcessorDescription">
7053 <desc>Query the model string of a specified host CPU.
7054 <note>
7055 This function is not implemented in the current version of the
7056 product.
7057 </note>
7058 </desc>
7059 <param name="cpuId" type="unsigned long" dir="in">
7060 <desc>
7061 Identifier of the CPU.
7062 </desc>
7063 </param>
7064 <param name="description" type="wstring" dir="return">
7065 <desc>
7066 Model string. A NULL string is returned if value is not known or
7067 @a cpuId is invalid.
7068 </desc>
7069 </param>
7070 </method>
7071
7072 <attribute name="memorySize" type="unsigned long" readonly="yes">
7073 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7074 </attribute>
7075
7076 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7077 <desc>Available system memory in the host system.</desc>
7078 </attribute>
7079
7080 <attribute name="operatingSystem" type="wstring" readonly="yes">
7081 <desc>Name of the host system's operating system.</desc>
7082 </attribute>
7083
7084 <attribute name="OSVersion" type="wstring" readonly="yes">
7085 <desc>Host operating system's version string.</desc>
7086 </attribute>
7087
7088 <attribute name="UTCTime" type="long long" readonly="yes">
7089 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7090 </attribute>
7091
7092<if target="midl">
7093 <method name="createHostOnlyNetworkInterface">
7094 <desc>
7095 Creates a new adapter for Host Only Networking.
7096 <result name="E_INVALIDARG">
7097 Host network interface @a name already exists.
7098 </result>
7099 </desc>
7100 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7101 <desc>
7102 Created host interface object.
7103 </desc>
7104 </param>
7105 <param name="progress" type="IProgress" dir="return">
7106 <desc>
7107 Progress object to track the operation completion.
7108 </desc>
7109 </param>
7110 </method>
7111 <method name="removeHostOnlyNetworkInterface">
7112 <desc>
7113 Removes the given Host Only Networking interface.
7114 <result name="VBOX_E_OBJECT_NOT_FOUND">
7115 No host network interface matching @a id found.
7116 </result>
7117 </desc>
7118 <param name="id" type="uuid" dir="in">
7119 <desc>
7120 Adapter GUID.
7121 </desc>
7122 </param>
7123 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7124 <desc>
7125 Removed host interface object.
7126 </desc>
7127 </param>
7128 <param name="progress" type="IProgress" dir="return">
7129 <desc>
7130 Progress object to track the operation completion.
7131 </desc>
7132 </param>
7133 </method>
7134</if>
7135
7136 <method name="createUSBDeviceFilter">
7137 <desc>
7138 Creates a new USB device filter. All attributes except
7139 the filter name are set to <tt>null</tt> (any match),
7140 <i>active</i> is <tt>false</tt> (the filter is not active).
7141
7142 The created filter can be added to the list of filters using
7143 <link to="#insertUSBDeviceFilter"/>.
7144
7145 <see>#USBDeviceFilters</see>
7146 </desc>
7147 <param name="name" type="wstring" dir="in">
7148 <desc>
7149 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7150 for more info.
7151 </desc>
7152 </param>
7153 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7154 <desc>Created filter object.</desc>
7155 </param>
7156 </method>
7157
7158 <method name="insertUSBDeviceFilter">
7159 <desc>
7160 Inserts the given USB device to the specified position
7161 in the list of filters.
7162
7163 Positions are numbered starting from <tt>0</tt>. If the specified
7164 position is equal to or greater than the number of elements in
7165 the list, the filter is added at the end of the collection.
7166
7167 <note>
7168 Duplicates are not allowed, so an attempt to insert a
7169 filter that is already in the list, will return an
7170 error.
7171 </note>
7172 <note>
7173 This method may set a @ref com_warnings "warning result code".
7174 </note>
7175 <note>
7176 If USB functionality is not available in the given edition of
7177 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7178 </note>
7179
7180 <see>#USBDeviceFilters</see>
7181
7182 <result name="VBOX_E_INVALID_OBJECT_STATE">
7183 USB device filter is not created within this VirtualBox instance.
7184 </result>
7185 <result name="E_INVALIDARG">
7186 USB device filter already in list.
7187 </result>
7188
7189 </desc>
7190 <param name="position" type="unsigned long" dir="in">
7191 <desc>Position to insert the filter to.</desc>
7192 </param>
7193 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7194 <desc>USB device filter to insert.</desc>
7195 </param>
7196 </method>
7197
7198 <method name="removeUSBDeviceFilter">
7199 <desc>
7200 Removes a USB device filter from the specified position in the
7201 list of filters.
7202
7203 Positions are numbered starting from <tt>0</tt>. Specifying a
7204 position equal to or greater than the number of elements in
7205 the list will produce an error.
7206
7207 <note>
7208 This method may set a @ref com_warnings "warning result code".
7209 </note>
7210 <note>
7211 If USB functionality is not available in the given edition of
7212 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7213 </note>
7214
7215 <see>#USBDeviceFilters</see>
7216
7217 <result name="E_INVALIDARG">
7218 USB device filter list empty or invalid @a position.
7219 </result>
7220
7221 </desc>
7222 <param name="position" type="unsigned long" dir="in">
7223 <desc>Position to remove the filter from.</desc>
7224 </param>
7225 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7226 <desc>Removed USB device filter.</desc>
7227 </param>
7228 </method>
7229
7230 <method name="findHostDVDDrive">
7231 <desc>
7232 Searches for a host DVD drive with the given @c name.
7233
7234 <result name="VBOX_E_OBJECT_NOT_FOUND">
7235 Given @c name does not correspond to any host drive.
7236 </result>
7237
7238 </desc>
7239 <param name="name" type="wstring" dir="in">
7240 <desc>Name of the host drive to search for</desc>
7241 </param>
7242 <param name="drive" type="IHostDVDDrive" dir="return">
7243 <desc>Found host drive object</desc>
7244 </param>
7245 </method>
7246
7247 <method name="findHostFloppyDrive">
7248 <desc>
7249 Searches for a host floppy drive with the given @c name.
7250
7251 <result name="VBOX_E_OBJECT_NOT_FOUND">
7252 Given @c name does not correspond to any host floppy drive.
7253 </result>
7254
7255 </desc>
7256 <param name="name" type="wstring" dir="in">
7257 <desc>Name of the host floppy drive to search for</desc>
7258 </param>
7259 <param name="drive" type="IHostFloppyDrive" dir="return">
7260 <desc>Found host floppy drive object</desc>
7261 </param>
7262 </method>
7263
7264 <method name="findHostNetworkInterfaceByName">
7265 <desc>
7266 Searches through all host network interfaces for an interface with
7267 the given @c name.
7268 <note>
7269 The method returns an error if the given @c name does not
7270 correspond to any host network interface.
7271 </note>
7272 </desc>
7273 <param name="name" type="wstring" dir="in">
7274 <desc>Name of the host network interface to search for.</desc>
7275 </param>
7276 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7277 <desc>Found host network interface object.</desc>
7278 </param>
7279 </method>
7280 <method name="findHostNetworkInterfaceById">
7281 <desc>
7282 Searches through all host network interfaces for an interface with
7283 the given GUID.
7284 <note>
7285 The method returns an error if the given GUID does not
7286 correspond to any host network interface.
7287 </note>
7288 </desc>
7289 <param name="id" type="uuid" dir="in">
7290 <desc>GUID of the host network interface to search for.</desc>
7291 </param>
7292 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7293 <desc>Found host network interface object.</desc>
7294 </param>
7295 </method>
7296 <method name="findHostNetworkInterfacesOfType">
7297 <desc>
7298 Searches through all host network interfaces and returns a list of interfaces of the specified type
7299 </desc>
7300 <param name="type" type="HostNetworkInterfaceType" dir="in">
7301 <desc>type of the host network interfaces to search for.</desc>
7302 </param>
7303 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7304 <desc>Found host network interface objects.</desc>
7305 </param>
7306 </method>
7307
7308 <method name="findUSBDeviceById">
7309 <desc>
7310 Searches for a USB device with the given UUID.
7311
7312 <result name="VBOX_E_OBJECT_NOT_FOUND">
7313 Given @id does not correspond to any USB device.
7314 </result>
7315
7316 <see>IHostUSBDevice::id</see>
7317 </desc>
7318 <param name="id" type="uuid" dir="in">
7319 <desc>UUID of the USB device to search for.</desc>
7320 </param>
7321 <param name="device" type="IHostUSBDevice" dir="return">
7322 <desc>Found USB device object.</desc>
7323 </param>
7324 </method>
7325
7326 <method name="findUSBDeviceByAddress">
7327 <desc>
7328 Searches for a USB device with the given host address.
7329
7330 <result name="VBOX_E_OBJECT_NOT_FOUND">
7331 Given @c name does not correspond to any USB device.
7332 </result>
7333
7334 <see>IHostUSBDevice::address</see>
7335 </desc>
7336 <param name="name" type="wstring" dir="in">
7337 <desc>
7338 Address of the USB device (as assigned by the host) to
7339 search for.
7340 </desc>
7341 </param>
7342 <param name="device" type="IHostUSBDevice" dir="return">
7343 <desc>Found USB device object.</desc>
7344 </param>
7345 </method>
7346
7347 </interface>
7348
7349 <!--
7350 // ISystemProperties
7351 /////////////////////////////////////////////////////////////////////////
7352 -->
7353
7354 <interface
7355 name="ISystemProperties"
7356 extends="$unknown"
7357 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7358 wsmap="managed"
7359 >
7360 <desc>
7361 The ISystemProperties interface represents global properties of the given
7362 VirtualBox installation.
7363
7364 These properties define limits and default values for various attributes
7365 and parameters. Most of the properties are read-only, but some can be
7366 changed by a user.
7367 </desc>
7368
7369 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7370 <desc>Minimum guest system memory in Megabytes.</desc>
7371 </attribute>
7372
7373 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7374 <desc>Maximum guest system memory in Megabytes.</desc>
7375 </attribute>
7376
7377 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7378 <desc>Minimum guest video memory in Megabytes.</desc>
7379 </attribute>
7380
7381 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7382 <desc>Maximum guest video memory in Megabytes.</desc>
7383 </attribute>
7384
7385 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7386 <desc>Minimum CPU count.</desc>
7387 </attribute>
7388
7389 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7390 <desc>Maximum CPU count.</desc>
7391 </attribute>
7392
7393 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7394 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7395 </attribute>
7396
7397 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7398 <desc>
7399 Number of network adapters associated with every
7400 <link to="IMachine"/> instance.
7401 </desc>
7402 </attribute>
7403
7404 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7405 <desc>
7406 Number of serial ports associated with every
7407 <link to="IMachine"/> instance.
7408 </desc>
7409 </attribute>
7410
7411 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7412 <desc>
7413 Number of parallel ports associated with every
7414 <link to="IMachine"/> instance.
7415 </desc>
7416 </attribute>
7417
7418 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7419 <desc>
7420 Maximum device position in the boot order. This value corresponds
7421 to the total number of devices a machine can boot from, to make it
7422 possible to include all possible devices to the boot list.
7423 <see><link to="IMachine::setBootOrder"/></see>
7424 </desc>
7425 </attribute>
7426
7427 <attribute name="defaultMachineFolder" type="wstring">
7428 <desc>
7429 Full path to the default directory used to create new or open
7430 existing machines when a settings file name contains no
7431 path.
7432
7433 The initial value of this property is
7434 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7435 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7436
7437 <note>
7438 Setting this property to <tt>null</tt> will restore the
7439 initial value.
7440 </note>
7441 <note>
7442 When settings this property, the specified path can be
7443 absolute (full path) or relative
7444 to the <link to="IVirtualBox::homeFolder">
7445 VirtualBox home directory</link>.
7446 When reading this property, a full path is
7447 always returned.
7448 </note>
7449 <note>
7450 The specified path may not exist, it will be created
7451 when necessary.
7452 </note>
7453
7454 <see>
7455 <link to="IVirtualBox::createMachine"/>,
7456 <link to="IVirtualBox::openMachine"/>
7457 </see>
7458 </desc>
7459 </attribute>
7460
7461 <attribute name="defaultHardDiskFolder" type="wstring">
7462 <desc>
7463 Full path to the default directory used to create new or open existing
7464 virtual disks.
7465
7466 This path is used when the storage unit of a hard disk is a regular file
7467 in the host's file system and only a file name that contains no path is
7468 given.
7469
7470 The initial value of this property is
7471 <tt>&lt;</tt>
7472 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7473 <tt>&gt;/HardDisks</tt>.
7474
7475 <note>
7476 Setting this property to <tt>null</tt> will restore the
7477 initial value.
7478 </note>
7479 <note>
7480 When settings this property, the specified path can be relative
7481 to the
7482 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7483 absolute. When reading this property, a full path is
7484 always returned.
7485 </note>
7486 <note>
7487 The specified path may not exist, it will be created
7488 when necessary.
7489 </note>
7490
7491 <see>
7492 IHardDisk,
7493 <link to="IVirtualBox::createHardDisk"/>,
7494 <link to="IVirtualBox::openHardDisk"/>,
7495 <link to="IMedium::location"/>
7496 </see>
7497 </desc>
7498 </attribute>
7499
7500 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7501 <desc>
7502 List of all hard disk storage formats supported by this VirtualBox
7503 installation.
7504
7505 Keep in mind that the hard disk format identifier
7506 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7507 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7508 hard disk format is a case-insensitive string. This means that, for
7509 example, all of the following strings:
7510 <pre>
7511 "VDI"
7512 "vdi"
7513 "VdI"</pre>
7514 refer to the same hard disk format.
7515
7516 Note that the virtual hard disk framework is backend-based, therefore
7517 the list of supported formats depends on what backends are currently
7518 installed.
7519
7520 <see>
7521 <link to="IHardDiskFormat"/>,
7522 </see>
7523 </desc>
7524 </attribute>
7525
7526 <attribute name="defaultHardDiskFormat" type="wstring">
7527 <desc>
7528 Identifier of the default hard disk format used by VirtualBox.
7529
7530 The hard disk format set by this attribute is used by VirtualBox
7531 when the hard disk format was not specified explicitly. One example is
7532 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7533 format argument. A more complex example is implicit creation of
7534 differencing hard disks when taking a snapshot of a virtual machine:
7535 this operation will try to use a format of the parent hard disk first
7536 and if this format does not support differencing hard disks the default
7537 format specified by this argument will be used.
7538
7539 The list of supported hard disk formats may be obtained by the
7540 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7541 format must have a capability to create differencing hard disks;
7542 otherwise opeartions that create hard disks implicitly may fail
7543 unexpectedly.
7544
7545 The initial value of this property is <tt>VDI</tt> in the current
7546 version of the VirtualBox product, but may change in the future.
7547
7548 <note>
7549 Setting this property to <tt>null</tt> will restore the
7550 initial value.
7551 </note>
7552
7553 <see>
7554 <link to="#hardDiskFormats"/>,
7555 <link to="IHardDiskFormat::id"/>,
7556 <link to="IVirtualBox::createHardDisk"/>
7557 </see>
7558 </desc>
7559 </attribute>
7560
7561 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7562 <desc>
7563 Library that provides authentication for VRDP clients. The library
7564 is used if a virtual machine's authentication type is set to "external"
7565 in the VM RemoteDisplay configuration.
7566
7567 The system library extension (".DLL" or ".so") must be omitted.
7568 A full path can be specified; if not, then the library must reside on the
7569 system's default library path.
7570
7571 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7572 of that name in one of the default VirtualBox library directories.
7573
7574 For details about VirtualBox authentication libraries and how to implement
7575 them, please refer to the VirtualBox manual.
7576
7577 <note>
7578 Setting this property to <tt>null</tt> will restore the
7579 initial value.
7580 </note>
7581 </desc>
7582 </attribute>
7583
7584 <attribute name="webServiceAuthLibrary" type="wstring">
7585 <desc>
7586 Library that provides authentication for webservice clients. The library
7587 is used if a virtual machine's authentication type is set to "external"
7588 in the VM RemoteDisplay configuration and will be called from
7589 within the <link to="IWebsessionManager::logon" /> implementation.
7590
7591 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7592 there is no per-VM setting for this, as the webservice is a global
7593 resource (if it is running). Only for this setting (for the webservice),
7594 setting this value to a literal "null" string disables authentication,
7595 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7596 no matter what user name and password are supplied.
7597
7598 The initial value of this property is <tt>VRDPAuth</tt>,
7599 meaning that the webservice will use the same authentication
7600 library that is used by default for VBoxVRDP (again, see
7601 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7602 The format and calling convention of authentication libraries
7603 is the same for the webservice as it is for VBoxVRDP.
7604
7605 </desc>
7606 </attribute>
7607
7608 <attribute name="HWVirtExEnabled" type="boolean">
7609 <desc>
7610 This specifies the default value for hardware virtualization
7611 extensions. If enabled, virtual machines will make use of
7612 hardware virtualization extensions such as Intel VT-x and
7613 AMD-V by default. This value can be overridden by each VM
7614 using their <link to="IMachine::HWVirtExEnabled" /> property.
7615 </desc>
7616 </attribute>
7617
7618 <attribute name="LogHistoryCount" type="unsigned long">
7619 <desc>
7620 This value specifies how many old release log files are kept.
7621 </desc>
7622 </attribute>
7623 </interface>
7624
7625 <!--
7626 // IGuest
7627 /////////////////////////////////////////////////////////////////////////
7628 -->
7629
7630 <interface
7631 name="IGuestOSType" extends="$unknown"
7632 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7633 wsmap="struct"
7634 >
7635 <desc>
7636 </desc>
7637
7638 <attribute name="familyId" type="wstring" readonly="yes">
7639 <desc>Guest OS family identifier string.</desc>
7640 </attribute>
7641
7642 <attribute name="familyDescription" type="wstring" readonly="yes">
7643 <desc>Human readable description of the guest OS family.</desc>
7644 </attribute>
7645
7646 <attribute name="id" type="wstring" readonly="yes">
7647 <desc>Guest OS identifier string.</desc>
7648 </attribute>
7649
7650 <attribute name="description" type="wstring" readonly="yes">
7651 <desc>Human readable description of the guest OS.</desc>
7652 </attribute>
7653
7654 <attribute name="is64Bit" type="boolean" readonly="yes">
7655 <desc>Returns @c true if the given OS is 64-bit</desc>
7656 </attribute>
7657
7658 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7659 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7660 </attribute>
7661
7662 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7663 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7664 </attribute>
7665
7666 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7667 <desc>Recommended RAM size in Megabytes.</desc>
7668 </attribute>
7669
7670 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7671 <desc>Recommended video RAM size in Megabytes.</desc>
7672 </attribute>
7673
7674 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7675 <desc>Recommended hard disk size in Megabytes.</desc>
7676 </attribute>
7677
7678 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7679 <desc>Returns recommended network adapter for this OS type.</desc>
7680 </attribute>
7681 </interface>
7682
7683 <interface
7684 name="IGuest" extends="$unknown"
7685 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7686
7687 wsmap="suppress"
7688 >
7689 <desc>
7690 The IGuest interface represents information about the operating system
7691 running inside the virtual machine. Used in
7692 <link to="IConsole::guest"/>.
7693
7694 IGuest provides information about the guest operating system, whether
7695 Guest Additions are installed and other OS-specific virtual machine
7696 properties.
7697 </desc>
7698
7699 <attribute name="OSTypeId" type="wstring" readonly="yes">
7700 <desc>
7701 Identifier of the Guest OS type as reported by the Guest
7702 Additions.
7703 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7704 an IGuestOSType object representing details about the given
7705 Guest OS type.
7706 <note>
7707 If Guest Additions are not installed, this value will be
7708 the same as <link to="IMachine::OSTypeId"/>.
7709 </note>
7710 </desc>
7711 </attribute>
7712
7713 <attribute name="additionsActive" type="boolean" readonly="yes">
7714 <desc>
7715 Flag whether the Guest Additions are installed and active
7716 in which case their version will be returned by the
7717 <link to="#additionsVersion"/> property.
7718 </desc>
7719 </attribute>
7720
7721 <attribute name="additionsVersion" type="wstring" readonly="yes">
7722 <desc>
7723 Version of the Guest Additions (3 decimal numbers separated
7724 by dots) or empty when the Additions are not installed. The
7725 Additions may also report a version but yet not be active as
7726 the version might be refused by VirtualBox (incompatible) or
7727 other failures occurred.
7728 </desc>
7729 </attribute>
7730
7731 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7732 <desc>
7733 Flag whether seamless guest display rendering (seamless desktop
7734 integration) is supported.
7735 </desc>
7736 </attribute>
7737
7738 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7739 <desc>
7740 Flag whether the guest is in graphics mode. If it is not, then
7741 seamless rendering will not work, resize hints are not immediately
7742 acted on and guest display resizes are probably not initiated by
7743 the guest additions.
7744 </desc>
7745 </attribute>
7746
7747 <attribute name="memoryBalloonSize" type="unsigned long">
7748 <desc>Guest system memory balloon size in megabytes.</desc>
7749 </attribute>
7750
7751 <attribute name="statisticsUpdateInterval" type="unsigned long">
7752 <desc>Interval to update guest statistics in seconds.</desc>
7753 </attribute>
7754
7755 <method name="setCredentials">
7756 <desc>
7757 Store login credentials that can be queried by guest operating
7758 systems with Additions installed. The credentials are transient
7759 to the session and the guest may also choose to erase them. Note
7760 that the caller cannot determine whether the guest operating system
7761 has queried or made use of the credentials.
7762
7763 <result name="VBOX_E_VM_ERROR">
7764 VMM device is not available.
7765 </result>
7766
7767 </desc>
7768 <param name="userName" type="wstring" dir="in">
7769 <desc>User name string, can be empty</desc>
7770 </param>
7771 <param name="password" type="wstring" dir="in">
7772 <desc>Password string, can be empty</desc>
7773 </param>
7774 <param name="domain" type="wstring" dir="in">
7775 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7776 </param>
7777 <param name="allowInteractiveLogon" type="boolean" dir="in">
7778 <desc>
7779 Flag whether the guest should alternatively allow the user to
7780 interactively specify different credentials. This flag might
7781 not be supported by all versions of the Additions.
7782 </desc>
7783 </param>
7784 </method>
7785
7786 <method name="getStatistic">
7787 <desc>
7788 Query specified guest statistics as reported by the VirtualBox Additions.
7789 </desc>
7790 <param name="cpuId" type="unsigned long" dir="in">
7791 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7792 </param>
7793 <param name="statistic" type="GuestStatisticType" dir="in">
7794 <desc>Statistic type.</desc>
7795 </param>
7796 <param name="statVal" type="unsigned long" dir="out">
7797 <desc>Statistics value</desc>
7798 </param>
7799 </method>
7800
7801 </interface>
7802
7803
7804 <!--
7805 // IProgress
7806 /////////////////////////////////////////////////////////////////////////
7807 -->
7808
7809 <interface
7810 name="IProgress" extends="$unknown"
7811 uuid="d3aa5417-6103-41fc-9e54-01ee1d08f42f"
7812 wsmap="managed"
7813 >
7814 <desc>
7815 The IProgress interface represents a task progress object that allows
7816 to wait for the completion of some asynchronous task.
7817
7818 The task consists of one or more operations that run sequentially,
7819 one by one. There is an individual percentage of completion of the
7820 current operation and the percentage of completion of the task as a
7821 whole. Similarly, you can wait for the completion of a particular
7822 operation or for the completion of the whole task.
7823
7824 Every operation is identified by a number (starting from 0)
7825 and has a separate description.
7826 </desc>
7827
7828 <attribute name="id" type="uuid" readonly="yes">
7829 <desc>ID of the task.</desc>
7830 </attribute>
7831
7832 <attribute name="description" type="wstring" readonly="yes">
7833 <desc>Description of the task.</desc>
7834 </attribute>
7835
7836 <attribute name="initiator" type="$unknown" readonly="yes">
7837 <desc>Initiator of the task.</desc>
7838 </attribute>
7839
7840 <attribute name="cancelable" type="boolean" readonly="yes">
7841 <desc>Whether the task can be interrupted.</desc>
7842 </attribute>
7843
7844 <attribute name="percent" type="long" readonly="yes">
7845 <desc>
7846 Current task progress value in percent.
7847 This value depends on how many operations are already complete.
7848 </desc>
7849 </attribute>
7850
7851 <attribute name="completed" type="boolean" readonly="yes">
7852 <desc>Whether the task has been completed.</desc>
7853 </attribute>
7854
7855 <attribute name="canceled" type="boolean" readonly="yes">
7856 <desc>Whether the task has been canceled.</desc>
7857 </attribute>
7858
7859 <attribute name="resultCode" type="result" readonly="yes">
7860 <desc>
7861 Result code of the progress task.
7862 Valid only if <link to="#completed"/> is true.
7863 </desc>
7864 </attribute>
7865
7866 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7867 <desc>
7868 Extended information about the unsuccessful result of the
7869 progress operation. May be NULL when no extended information
7870 is available.
7871 Valid only if <link to="#completed"/> is true and
7872 <link to="#resultCode"/> indicates a failure.
7873 </desc>
7874 </attribute>
7875
7876 <attribute name="operationCount" type="unsigned long" readonly="yes">
7877 <desc>
7878 Number of operations this task is divided into.
7879 Every task consists of at least one operation.
7880 </desc>
7881 </attribute>
7882
7883 <attribute name="operation" type="unsigned long" readonly="yes">
7884 <desc>Number of the operation being currently executed.</desc>
7885 </attribute>
7886
7887 <attribute name="operationDescription" type="wstring" readonly="yes">
7888 <desc>
7889 Description of the operation being currently executed.
7890 </desc>
7891 </attribute>
7892
7893 <attribute name="operationPercent" type="long" readonly="yes">
7894 <desc>Current operation progress value in percent.</desc>
7895 </attribute>
7896
7897 <method name="waitForCompletion">
7898 <desc>
7899 Waits until the task is done (including all operations) with a
7900 given timeout.
7901
7902 <result name="VBOX_E_IPRT_ERROR">
7903 Failed to wait for task completion.
7904 </result>
7905
7906 </desc>
7907 <param name="timeout" type="long" dir="in">
7908 <desc>
7909 Timeout value in milliseconds.
7910 Specify -1 for an indefinite wait.
7911 </desc>
7912 </param>
7913 </method>
7914
7915 <method name="waitForOperationCompletion">
7916 <desc>
7917 Waits until the given operation is done with a given timeout.
7918
7919 <result name="VBOX_E_IPRT_ERROR">
7920 Failed to wait for operation completion.
7921 </result>
7922
7923 </desc>
7924 <param name="operation" type="unsigned long" dir="in">
7925 <desc>
7926 Number of the operation to wait for.
7927 Must be less than <link to="#operationCount"/>.
7928 </desc>
7929 </param>
7930 <param name="timeout" type="long" dir="in">
7931 <desc>
7932 Timeout value in milliseconds.
7933 Specify -1 for an indefinite wait.
7934 </desc>
7935 </param>
7936 </method>
7937
7938 <method name="cancel">
7939 <desc>
7940 Cancels the task.
7941 <note>
7942 If <link to="#cancelable"/> is <tt>false</tt>, then
7943 this method will fail.
7944 </note>
7945
7946 <result name="VBOX_E_INVALID_OBJECT_STATE">
7947 Operation cannot be canceled.
7948 </result>
7949
7950 </desc>
7951 </method>
7952
7953 </interface>
7954
7955
7956 <!--
7957 // ISnapshot
7958 /////////////////////////////////////////////////////////////////////////
7959 -->
7960
7961 <interface
7962 name="ISnapshot" extends="$unknown"
7963 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
7964 wsmap="managed"
7965 >
7966 <desc>
7967 The ISnapshot interface represents a snapshot of the virtual
7968 machine.
7969
7970 The <i>snapshot</i> stores all the information about a virtual
7971 machine necessary to bring it to exactly the same state as it was at
7972 the time of taking the snapshot. The snapshot includes:
7973
7974 <ul>
7975 <li>all settings of the virtual machine (i.e. its hardware
7976 configuration: RAM size, attached hard disks, etc.)
7977 </li>
7978 <li>the execution state of the virtual machine (memory contents,
7979 CPU state, etc.).
7980 </li>
7981 </ul>
7982
7983 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7984 or <i>online</i> (taken when the VM is running). The execution
7985 state of the offline snapshot is called a <i>zero execution state</i>
7986 (it doesn't actually contain any information about memory contents
7987 or the CPU state, assuming that all hardware is just powered off).
7988
7989 <h3>Snapshot branches</h3>
7990
7991 Snapshots can be chained. Chained snapshots form a branch where
7992 every next snapshot is based on the previous one. This chaining is
7993 mostly related to hard disk branching (see <link to="IHardDisk"/>
7994 description). This means that every time a new snapshot is created,
7995 a new differencing hard disk is implicitly created for all normal
7996 hard disks attached to the given virtual machine. This allows to
7997 fully restore hard disk contents when the machine is later reverted
7998 to a particular snapshot.
7999
8000 In the current implementation, multiple snapshot branches within one
8001 virtual machine are not allowed. Every machine has a single branch,
8002 and <link to="IConsole::takeSnapshot"/> operation adds a new
8003 snapshot to the top of that branch.
8004
8005 Existing snapshots can be discarded using
8006 <link to="IConsole::discardSnapshot"/>.
8007
8008 <h3>Current snapshot</h3>
8009
8010 Every virtual machine has a current snapshot, identified by
8011 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
8012 a base for the <i>current machine state</i> (see below), to the effect
8013 that all normal hard disks of the machine and its execution
8014 state are based on this snapshot.
8015
8016 In the current implementation, the current snapshot is always the
8017 last taken snapshot (i.e. the head snapshot on the branch) and it
8018 cannot be changed.
8019
8020 The current snapshot is <tt>null</tt> if the machine doesn't have
8021 snapshots at all; in this case the current machine state is just
8022 current settings of this machine plus its current execution state.
8023
8024 <h3>Current machine state</h3>
8025
8026 The current machine state is what represented by IMachine instances got
8027 directly from IVirtualBox
8028 using <link
8029 to="IVirtualBox::getMachine">getMachine()</link>, <link
8030 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
8031 to instances returned by <link to="ISnapshot::machine"/>). This state
8032 is always used when the machine is <link to="IConsole::powerUp"> powered
8033 on</link>.
8034
8035 The current machine state also includes the current execution state.
8036 If the machine is being currently executed
8037 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
8038 and above), its execution state is just what's happening now.
8039 If it is powered off (<link to="MachineState_PoweredOff"/> or
8040 <link to="MachineState_Aborted"/>), it has a zero execution state.
8041 If the machine is saved (<link to="MachineState_Saved"/>), its
8042 execution state is what saved in the execution state file
8043 (<link to="IMachine::stateFilePath"/>).
8044
8045 If the machine is in the saved state, then, next time it is powered
8046 on, its execution state will be fully restored from the saved state
8047 file and the execution will continue from the point where the state
8048 was saved.
8049
8050 Similarly to snapshots, the current machine state can be discarded
8051 using <link to="IConsole::discardCurrentState"/>.
8052
8053 <h3>Taking and discarding snapshots</h3>
8054
8055 The table below briefly explains the meaning of every snapshot
8056 operation:
8057
8058 <table>
8059 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
8060
8061 <tr><td><link to="IConsole::takeSnapshot"/></td>
8062
8063 <td>Save the current state of the virtual machine, including all
8064 settings, contents of normal hard disks and the current modifications
8065 to immutable hard disks (for online snapshots)</td>
8066
8067 <td>The current state is not changed (the machine will continue
8068 execution if it is being executed when the snapshot is
8069 taken)</td></tr>
8070
8071 <tr><td><link to="IConsole::discardSnapshot"/></td>
8072
8073 <td>Forget the state of the virtual machine stored in the snapshot:
8074 dismiss all saved settings and delete the saved execution state (for
8075 online snapshots)</td>
8076
8077 <td>Other snapshots (including child snapshots, if any) and the
8078 current state are not directly affected</td></tr>
8079
8080 <tr><td><link to="IConsole::discardCurrentState"/></td>
8081
8082 <td>Restore the current state of the virtual machine from the state
8083 stored in the current snapshot, including all settings and hard disk
8084 contents</td>
8085
8086 <td>The current state of the machine existed prior to this operation
8087 is lost</td></tr>
8088
8089 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
8090
8091 <td>Completely revert the virtual machine to the state it was in
8092 before the current snapshot has been taken</td>
8093
8094 <td>The current state, as well as the current snapshot, are
8095 lost</td></tr>
8096
8097 </table>
8098
8099 </desc>
8100
8101 <attribute name="id" type="uuid" readonly="yes">
8102 <desc>UUID of the snapshot.</desc>
8103 </attribute>
8104
8105 <attribute name="name" type="wstring">
8106 <desc>Short name of the snapshot.</desc>
8107 </attribute>
8108
8109 <attribute name="description" type="wstring">
8110 <desc>Optional description of the snapshot.</desc>
8111 </attribute>
8112
8113 <attribute name="timeStamp" type="long long" readonly="yes">
8114 <desc>
8115 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8116 </desc>
8117 </attribute>
8118
8119 <attribute name="online" type="boolean" readonly="yes">
8120 <desc>
8121 <tt>true</tt> if this snapshot is an online snapshot and
8122 <tt>false</tt> otherwise.
8123
8124 <note>
8125 When this attribute is <tt>true</tt>, the
8126 <link to="IMachine::stateFilePath"/> attribute of the
8127 <link to="#machine"/> object associated with this snapshot
8128 will point to the saved state file. Otherwise, it will be
8129 <tt>null</tt>.
8130 </note>
8131 </desc>
8132 </attribute>
8133
8134 <attribute name="machine" type="IMachine" readonly="yes">
8135 <desc>
8136 Virtual machine this snapshot is taken on. This object
8137 stores all settings the machine had when taking this snapshot.
8138 <note>
8139 The returned machine object is immutable, i.e. no
8140 any settings can be changed.
8141 </note>
8142 </desc>
8143 </attribute>
8144
8145 <attribute name="parent" type="ISnapshot" readonly="yes">
8146 <desc>
8147 Parent snapshot (a snapshot this one is based on).
8148 <note>
8149 It's not an error to read this attribute on a snapshot
8150 that doesn't have a parent -- a null object will be
8151 returned to indicate this.
8152 </note>
8153 </desc>
8154 </attribute>
8155
8156 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8157 <desc>
8158 Child snapshots (all snapshots having this one as a parent).
8159 <note>
8160 In the current implementation, there can be only one
8161 child snapshot, or no children at all, meaning this is the
8162 last (head) snapshot.
8163 </note>
8164 </desc>
8165 </attribute>
8166
8167 </interface>
8168
8169
8170 <!--
8171 // IMedia
8172 /////////////////////////////////////////////////////////////////////////
8173 -->
8174
8175 <enum
8176 name="MediaState"
8177 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8178 >
8179 <desc>
8180 Virtual media state.
8181 <see>IMedia</see>
8182 </desc>
8183
8184 <const name="NotCreated" value="0">
8185 <desc>
8186 Associated media storage does not exist (either was not created yet or
8187 was deleted).
8188 </desc>
8189 </const>
8190 <const name="Created" value="1">
8191 <desc>
8192 Associated storage exists and accessible.
8193 </desc>
8194 </const>
8195 <const name="LockedRead" value="2">
8196 <desc>
8197 Media is locked for reading, no data modification is possible.
8198 </desc>
8199 </const>
8200 <const name="LockedWrite" value="3">
8201 <desc>
8202 Media is locked for writing, no concurrent data reading or modification
8203 is possible.
8204 </desc>
8205 </const>
8206 <const name="Inaccessible" value="4">
8207 <desc>
8208 Associated media storage is not accessible.
8209 </desc>
8210 </const>
8211 <const name="Creating" value="5">
8212 <desc>
8213 Associated media storage is being created.
8214 </desc>
8215 </const>
8216 <const name="Deleting" value="6">
8217 <desc>
8218 Associated media storage is being deleted.
8219 </desc>
8220 </const>
8221 </enum>
8222
8223 <interface
8224 name="IMedium" extends="$unknown"
8225 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
8226 wsmap="managed"
8227 >
8228 <desc>
8229 The IMedium interface is a common interface for all objects representing
8230 virtual media such as hard disks, CD/DVD images and floppy images.
8231
8232 Each medium is associated with a storage unit (such as a file on the host
8233 computer or a network resource) that holds actual data. The location of
8234 the storage unit is represented by the #location attribute. The value of
8235 this attribute is media type dependent.
8236
8237 The exact media type may be determined by querying the appropriate
8238 interface such as:
8239 <ul>
8240 <li>IHardDisk (virtual hard disks)</li>
8241 <li>IDVDImage (standard CD/DVD ISO image files)</li>
8242 <li>IFloppyImage (raw floppy image files)</li>
8243 </ul>
8244
8245 Existing media are opened using the following methods, depending on the
8246 media type:
8247 <ul>
8248 <li><link to="IVirtualBox::openHardDisk"/></li>
8249 <li><link to="IVirtualBox::openDVDImage"/></li>
8250 <li><link to="IVirtualBox::openFloppyImage"/></li>
8251 </ul>
8252
8253 New hard disk media are created using the
8254 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8255 images are created outside VirtualBox, usually by storing a copy
8256 of the real medium of the corresponding type in a regular file.
8257
8258 <h3>Known Media</h3>
8259
8260 When an existing medium gets opened for the first time, it gets
8261 automatically remembered by the given VirtualBox installation or, in other
8262 words, becomes a <i>known medium</i>. Known media are stored in the media
8263 registry transparently maintained by VirtualBox and stored in settings
8264 files so that this registry is preserved when VirtualBox is not running.
8265
8266 Newly created virtual hard disks get remembered only when the associated
8267 storage unit is actually created (see IHardDisk for more details).
8268
8269 All known media can be enumerated using
8270 <link to="IVirtualBox::hardDisks"/>,
8271 <link to="IVirtualBox::DVDImages"/> and
8272 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8273 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8274 and similar methods or by location using
8275 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8276
8277 Only known media can be attached to virtual machines.
8278
8279 Removing known media from the media registry is performed when the given
8280 medium is closed using the <link to="#close"/> method or when its
8281 associated storage unit is deleted (only for hard disks).
8282
8283 <h3>Accessibility Checks</h3>
8284
8285 The given medium (with the created storage unit) is considered to be
8286 <i>accessible</i> when its storage unit can be read.
8287 Accessible media are indicated by the <link to="MediaState_Created"/>
8288 value of the <link to="#state"/> attribute. When the storage unit cannot
8289 be read (for example, because it is located on a disconnected network
8290 resource, or was accidentally deleted outside VirtualBox), the medium is
8291 considered to be <i>inaccessible</i> which is indicated by the
8292 <link to="MediaState_Inaccessible"/> state. The details about the reason
8293 of being inaccessible can be obtained using the
8294 <link to="#lastAccessError"/> attribute.
8295
8296 A new accessibility check is performed each time the <link to="#state"/>
8297 attribute is read. Please note that this check may take long time (several
8298 seconds or even minutes, depending on the storage unit location and
8299 format), and will block the calling thread until finished. For this
8300 reason, it is recommended to never read this attribute on the main UI
8301 thread to avoid making the UI unresponsive.
8302
8303 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8304 created for the first time), all known media are in the
8305 <link to="MediaState_Inaccessible"/> state but the value of the <link
8306 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
8307 accessibility check is made on startup. This is done to make the
8308 VirtualBox object ready for serving requests as
8309 fast as possible and let the end-user application decide if it needs to
8310 check media accessibility right away or not.
8311 </desc>
8312
8313 <attribute name="id" type="uuid" readonly="yes">
8314 <desc>
8315 UUID of the medium. For a newly created medium, this value is a randomly
8316 generated UUID.
8317
8318 <note>
8319 For media in one of MediaState_NotCreated, MediaState_Creating or
8320 MediaState_Deleting states, the value of this property is undefined
8321 and will most likely be an empty UUID.
8322 </note>
8323 </desc>
8324 </attribute>
8325
8326 <attribute name="description" type="wstring">
8327 <desc>
8328 Optional description of the medium. For newly created media, the value
8329 of this attribute value is <tt>null</tt>.
8330
8331 Media types that don't support this attribute will return E_NOTIMPL in
8332 attempt to get or set this attribute's value.
8333
8334 <note>
8335 For some storage types, reading this attribute may return an outdated
8336 (last known) value when <link to="#state"/> is <link
8337 to="MediaState_Inaccessible"/> or <link
8338 to="MediaState_LockedWrite"/> because the value of this attribute is
8339 stored within the storage unit itself. Also note that changing the
8340 attribute value is not possible in such case, as well as when the
8341 medium is the <link to="MediaState_LockedRead"/> state.
8342 </note>
8343 </desc>
8344 </attribute>
8345
8346 <attribute name="state" type="MediaState" readonly="yes">
8347 <desc>
8348 Current media state. Inspect <link to="MediaState"/> values for details.
8349
8350 Reading this attribute may take a long time because an accessibility
8351 check of the storage unit is performed each time the attribute is read.
8352 This check may cause a significant delay if the storage unit of the
8353 given medium is, for example, a file located on a network share which is
8354 not currently accessible due to connectivity problems -- the call will
8355 not return until a timeout interval defined by the host OS for this
8356 operation expires.
8357
8358 If the last known state of the medium is <link to="MediaState_Created"/>
8359 and the accessibility check fails then the state would be set to
8360 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8361 may be used to get more details about the failure. If the state of the
8362 medium is <link to="MediaState_LockedRead"/> or
8363 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8364 non-null value of <link to="#lastAccessError"/> will indicate a failed
8365 accessibility check in this case.
8366
8367 Note that not all media states are applicable to all media types.
8368 For example, states <link to="MediaState_NotCreated"/>,
8369 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8370 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8371 IFloppyImage media.
8372 </desc>
8373 </attribute>
8374
8375 <attribute name="location" type="wstring">
8376 <desc>
8377 Location of the storage unit holding media data.
8378
8379 The format of the location string is media type specific. For media
8380 types using regular files in a host's file system, the location
8381 string is the full file name.
8382
8383 Some media types may support changing the storage unit location by
8384 simply changing the value of this property. If this operation is not
8385 supported, the implementation will return E_NOTIMPL in attempt to set
8386 this attribute's value.
8387
8388 When setting a value of the location attribute which is a regular file
8389 in the host's file system, the given file name may be either relative to
8390 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8391 absolute. Note that if the given location specification does not contain
8392 the file extension part then a proper default extension will be
8393 automatically appended by the implementation depending on the media type.
8394 </desc>
8395 </attribute>
8396
8397 <attribute name="name" type="wstring" readonly="yes">
8398 <desc>
8399 Name of the storage unit holding media data.
8400
8401 The returned string is a short version of the <link to="#location"/>
8402 attribute that is suitable for representing the medium in situations
8403 where the full location specification is too long (such as lists
8404 and comboboxes in GUI frontends). This string is also used by frontends
8405 to sort the media list alphabetically when needed.
8406
8407 For example, for locations that are regular files in the host's file
8408 system, the value of this attribute is just the file name (+ extension),
8409 without the path specification.
8410
8411 Note that as opposed to the <link to="#location"/> attribute, the name
8412 attribute will not necessary be unique for a list of media of the
8413 given type and format.
8414 </desc>
8415 </attribute>
8416
8417 <attribute name="size" type="unsigned long long" readonly="yes">
8418 <desc>
8419 Physical size of the storage unit used to hold media data (in bytes).
8420
8421 <note>
8422 For media whose <link to="#state"/> is <link
8423 to="MediaState_Inaccessible"/>, the value of this property is the
8424 last known size. For <link to="MediaState_NotCreated"/> media,
8425 the returned value is zero.
8426 </note>
8427 </desc>
8428 </attribute>
8429
8430 <attribute name="lastAccessError" type="wstring" readonly="yes">
8431 <desc>
8432 Text message that represents the result of the last accessibility
8433 check.
8434
8435 Accessibility checks are performed each time the <link to="#state"/>
8436 attribute is read. A @c null string is returned if the last
8437 accessibility check was successful. A non-null string indicates a
8438 failure and should normally describe a reason of the failure (for
8439 example, a file read error).
8440 </desc>
8441 </attribute>
8442
8443 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8444 <desc>
8445 Array of UUIDs of all machines this medium is attached to.
8446
8447 A <tt>null</tt> array is returned if this medium is not attached to any
8448 machine or to any machine's snapshot.
8449
8450 <note>
8451 The returned array will include a machine even if this medium is not
8452 attached to that machine in the current state but attached to it in
8453 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8454 details.
8455 </note>
8456 </desc>
8457 </attribute>
8458
8459 <method name="getSnapshotIds">
8460 <desc>
8461 Returns an array of UUIDs of all snapshots of the given machine where
8462 this medium is attached to.
8463
8464 If the medium is attached to the machine in the current state, then the
8465 first element in the array will always be the ID of the queried machine
8466 (i.e. the value equal to the @c machineId argument), followed by
8467 snapshot IDs (if any).
8468
8469 If the medium is not attached to the machine in the current state, then
8470 the array will contain only snapshot IDs.
8471
8472 The returned array may be <tt>null</tt> if this medium is not attached
8473 to the given machine at all, neither in the current state nor in one of
8474 the snapshots.
8475 </desc>
8476 <param name="machineId" type="uuid" dir="in">
8477 <desc>
8478 UUID of the machine to query.
8479 </desc>
8480 </param>
8481 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8482 <desc>
8483 Array of snapshot UUIDs of the given machine using this medium.
8484 </desc>
8485 </param>
8486 </method>
8487
8488 <method name="lockRead">
8489 <desc>
8490 Locks this medium for reading.
8491
8492 The read lock is shared: many clients can simultaneously lock the
8493 same media for reading unless it is already locked for writing (see
8494 <link to="#lockWrite"/>) in which case an error is returned.
8495
8496 When the medium is locked for reading, it cannot be modified
8497 from within VirtualBox. This means that any method that changes
8498 the properties of this medium or contents of the storage unit
8499 will return an error (unless explicitly stated otherwise) and
8500 that an attempt to start a virtual machine that wants to modify
8501 the medium will also fail.
8502
8503 When the virtual machine is started up, it locks for reading all
8504 media it uses in read-only mode. If some media cannot be locked
8505 for reading, the startup procedure will fail.
8506
8507 The medium locked for reading must be unlocked using the <link
8508 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8509 can be nested and must be followed by the same number of paired
8510 <link to="#unlockRead"/> calls.
8511
8512 This method sets the media state to <link
8513 to="MediaState_LockedRead"/> on success. The state prior to
8514 this call must be <link to="MediaState_Created"/>, <link
8515 to="MediaState_Inaccessible"/> or <link
8516 to="MediaState_LockedRead"/>. As you can see, inaccessible
8517 media can be locked too. This is not an error; this method
8518 performs a logical lock that prevents modifications of this
8519 media through the VirtualBox API, not a physical lock of the
8520 underlying storage unit.
8521
8522 This method returns the current state of the medium
8523 <b>before</b> the operation.
8524
8525 <result name="VBOX_E_INVALID_OBJECT_STATE">
8526 Invalid media state (e.g. not created, locked, inaccessible,
8527 creating, deleting).
8528 </result>
8529
8530 </desc>
8531 <param name="state" type="MediaState" dir="return">
8532 <desc>
8533 State of the medium after the operation.
8534 </desc>
8535 </param>
8536 </method>
8537
8538 <method name="unlockRead">
8539 <desc>
8540 Cancels the read lock previously set by <link to="#lockRead"/>.
8541
8542 For both, success and failure, this method returns the current state
8543 of the medium <b>after</b> the operation.
8544
8545 See <link to="#lockRead"/> for more details.
8546
8547 <result name="VBOX_E_INVALID_OBJECT_STATE">
8548 Medium not locked for reading.
8549 </result>
8550
8551 </desc>
8552 <param name="state" type="MediaState" dir="return">
8553 <desc>
8554 State of the medium after the operation.
8555 </desc>
8556 </param>
8557 </method>
8558
8559 <method name="lockWrite">
8560 <desc>
8561 Locks this medium for writing.
8562
8563 The write lock, as opposed to <link to="#lockRead"/>, is
8564 exclusive: there may be only one client holding a write lock
8565 and there may be no read locks while the write lock is held.
8566
8567 When the medium is locked for writing, it cannot be modified
8568 from within VirtualBox and it is not guaranteed that the values
8569 of its properties are up-to-date. Any method that changes the
8570 properties of this medium or contents of the storage unit will
8571 return an error (unless explicitly stated otherwise) and an
8572 attempt to start a virtual machine wanting to modify or to
8573 read the medium will fail.
8574
8575 When the virtual machine is started up, it locks for writing all
8576 media it uses to write data to. If any medium could not be locked
8577 for writing, the startup procedure will fail.
8578
8579 The medium locked for writing must be unlocked using the <link
8580 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8581 can <b>not</b> be nested and must be followed by a<link
8582 to="#unlockWrite"/> call before the next lockWrite call.
8583
8584 This method sets the media state to <link
8585 to="MediaState_LockedWrite"/> on success. The state prior to
8586 this call must be <link to="MediaState_Created"/> or <link
8587 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8588 media can be locked too. This is not an error; this method
8589 performs a logical lock preventing modifications of this
8590 media through the VirtualBox API, not a physical lock of the
8591 underlying storage unit.
8592
8593 For both, success and failure, this method returns the current
8594 state of the medium <b>before</b> the operation.
8595
8596 <result name="VBOX_E_INVALID_OBJECT_STATE">
8597 Invalid media state (e.g. not created, locked, inaccessible,
8598 creating, deleting).
8599 </result>
8600
8601 </desc>
8602 <param name="state" type="MediaState" dir="return">
8603 <desc>
8604 State of the medium after the operation.
8605 </desc>
8606 </param>
8607 </method>
8608
8609 <method name="unlockWrite">
8610 <desc>
8611 Cancels the write lock previously set by <link to="#lockWrite"/>.
8612
8613 For both, success and failure, this method returns the current
8614 state of the medium <b>after</b> the operation.
8615
8616 See <link to="#lockWrite"/> for more details.
8617
8618 <result name="VBOX_E_INVALID_OBJECT_STATE">
8619 Medium not locked for writing.
8620 </result>
8621
8622 </desc>
8623 <param name="state" type="MediaState" dir="return">
8624 <desc>
8625 State of the medium after the operation.
8626 </desc>
8627 </param>
8628 </method>
8629
8630 <method name="close">
8631 <desc>
8632 Closes this medium.
8633
8634 The hard disk must not be attached to any known virtual machine
8635 and must not have any known child hard disks, otherwise the
8636 operation will fail.
8637
8638 When the hard disk is successfully closed, it gets removed from
8639 the list of remembered hard disks, but its storage unit is not
8640 deleted. In particular, this means that this hard disk can be
8641 later opened again using the <link
8642 to="IVirtualBox::openHardDisk"/> call.
8643
8644 Note that after this method successfully returns, the given hard
8645 disk object becomes uninitialized. This means that any attempt
8646 to call any of its methods or attributes will fail with the
8647 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8648
8649 <result name="VBOX_E_INVALID_OBJECT_STATE">
8650 Invalid media state (other than not created, created or
8651 inaccessible).
8652 </result>
8653 <result name="VBOX_E_OBJECT_IN_USE">
8654 Medium attached to virtual machine.
8655 </result>
8656 <result name="VBOX_E_FILE_ERROR">
8657 Settings file not accessible.
8658 </result>
8659 <result name="VBOX_E_XML_ERROR">
8660 Could not parse the settings file.
8661 </result>
8662
8663 </desc>
8664 </method>
8665
8666 </interface>
8667
8668
8669 <!--
8670 // IHardDisk
8671 /////////////////////////////////////////////////////////////////////////
8672 -->
8673
8674 <enum
8675 name="HardDiskType"
8676 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8677 >
8678 <desc>
8679 Virtual hard disk type.
8680 <see>IHardDisk</see>
8681 </desc>
8682
8683 <const name="Normal" value="0">
8684 <desc>
8685 Normal hard disk (attached directly or indirectly, preserved
8686 when taking snapshots).
8687 </desc>
8688 </const>
8689 <const name="Immutable" value="1">
8690 <desc>
8691 Immutable hard disk (attached indirectly, changes are wiped out
8692 after powering off the virtual machine).
8693 </desc>
8694 </const>
8695 <const name="Writethrough" value="2">
8696 <desc>
8697 Write through hard disk (attached directly, ignored when
8698 taking snapshots).
8699 </desc>
8700 </const>
8701 </enum>
8702
8703 <enum
8704 name="HardDiskVariant"
8705 uuid="99334b63-7ed0-4f61-8a7e-7ec3e20dd912"
8706 >
8707 <desc>
8708 Virtual hard disk image variant. More than one flag may be set.
8709 <see>IHardDisk</see>
8710 </desc>
8711
8712 <const name="Standard" value="0">
8713 <desc>
8714 No particular variant requested, results in using the backend default.
8715 </desc>
8716 </const>
8717 <const name="VmdkSplit2G" value="0x01">
8718 <desc>
8719 VMDK image split in chunks of less than 2GByte.
8720 </desc>
8721 </const>
8722 <const name="VmdkStreamOptimized" value="0x04">
8723 <desc>
8724 VMDK streamOptimized image. Special import/export format which is
8725 read-only/append-only.
8726 </desc>
8727 </const>
8728 <const name="Fixed" value="0x1000">
8729 <desc>
8730 Fixed image. Only allowed for base images.
8731 </desc>
8732 </const>
8733 <const name="Diff" value="0x2000">
8734 <desc>
8735 Fixed image. Only allowed for base images.
8736 </desc>
8737 </const>
8738 </enum>
8739
8740 <interface
8741 name="IHardDiskAttachment" extends="$unknown"
8742 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8743 wsmap="struct"
8744 >
8745 <desc>
8746 The IHardDiskAttachment interface represents a hard disk attachment of a
8747 virtual machine.
8748
8749 Every hard disk attachment specifies a slot of the virtual hard disk
8750 controller and a virtual hard disk attached to this slot.
8751
8752 The array of hard disk attachments is returned by
8753 <link to="IMachine::hardDiskAttachments"/>.
8754 </desc>
8755 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8756 <desc>Hard disk object associated with this attachment.</desc>
8757 </attribute>
8758
8759 <attribute name="controller" type="wstring" readonly="yes">
8760 <desc>Interface bus of this attachment.</desc>
8761 </attribute>
8762
8763 <attribute name="port" type="long" readonly="yes">
8764 <desc>Port number of this attachment.</desc>
8765 </attribute>
8766
8767 <attribute name="device" type="long" readonly="yes">
8768 <desc>Device slot number of this attachment.</desc>
8769 </attribute>
8770
8771 </interface>
8772
8773 <interface
8774 name="IHardDisk" extends="IMedium"
8775 uuid="3498d065-dee6-48bf-bcc5-47018fee4f42"
8776 wsmap="managed"
8777 >
8778 <desc>
8779 The IHardDisk interface represents a virtual hard disk drive
8780 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8781
8782 Virtual hard disk objects virtualize the hard disk hardware and look like
8783 regular hard disks for the guest OS running inside the virtual machine.
8784
8785 <h3>Hard Disk Types</h3>
8786
8787 There are three types of hard disks:
8788 <link to="HardDiskType_Normal">Normal</link>,
8789 <link to="HardDiskType_Immutable">Immutable</link> and
8790 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8791 hard disk defines how the hard disk is attached to a virtual machine and
8792 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8793 machine with the attached hard disk is taken. The type of the hard disk is
8794 defined by the <link to="#type"/> attribute.
8795
8796 All hard disks can be also divided in two big groups: <i>base</i> hard
8797 disks and <i>differencing</i> hard disks. A base hard disk contains all
8798 sectors of the hard disk data in its storage unit and therefore can be
8799 used independently. On the contrary, a differencing hard disk contains
8800 only some part of the hard disk data (a subset of sectors) and needs
8801 another hard disk to get access to the missing sectors of data. This
8802 another hard disk is called a <i>parent</i> hard disk and defines a hard
8803 disk to which this differencing hard disk is known to be <i>linked to</i>.
8804 The parent hard disk may be itself a differencing hard disk. This
8805 way, differencing hard disks form a linked hard disk chain. This chain
8806 always ends with the base hard disk which is sometimes referred to as the
8807 root hard disk of this chain. Note that several differencing hard disks
8808 may be linked to the same parent hard disk. This way, all known hard disks
8809 form a hard disk tree which is based on their parent-child relationship.
8810
8811 Differencing hard disks can be distinguished from base hard disks by
8812 querying the <link to="#parent"/> attribute: base hard disks do not have
8813 parents they would depend on, so the value of this attribute is always
8814 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8815 the hard disk tree (from the child hard disk to its parent). It is also
8816 possible to walk down the tree using the <link to="#children"/>
8817 attribute.
8818
8819 Note that the type of all differencing hard disks is
8820 <link to="HardDiskType_Normal">Normal</link>; all other values are
8821 meaningless for them. Base hard disks may be of any type.
8822
8823 <h3>Creating Hard Disks</h3>
8824
8825 New base hard disks are created using
8826 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8827 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8828 disks are usually implicitly created by VirtualBox when needed but may
8829 also be created explicitly using <link to="#createDiffStorage"/>.
8830
8831 After the hard disk is successfully created (including the storage unit)
8832 or opened, it becomes a known hard disk (remembered in the internal media
8833 registry). Known hard disks can be attached to a virtual machine, accessed
8834 through <link to="IVirtualBox::getHardDisk"/> and
8835 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8836 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8837
8838 The following methods, besides <link to="IMedium::close"/>,
8839 automatically remove the hard disk from the media registry:
8840 <ul>
8841 <li><link to="#deleteStorage"/></li>
8842 <li><link to="#mergeTo"/></li>
8843 </ul>
8844
8845 If the storage unit of the hard disk is a regular file in the host's
8846 file system then the rules stated in the description of the
8847 <link to="IMedium::location"/> attribute apply when setting its value. In
8848 addition, a plain file name without any path may be given, in which case
8849 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8850 folder</link> will be prepended to it.
8851
8852 <h4>Automatic composition of the file name part</h4>
8853
8854 Another extension to the <link to="IMedium::location"/> attribute is that
8855 there is a possibility to cause VirtualBox to compose a unique value for
8856 the file name part of the location using the UUID of the hard disk. This
8857 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8858 e.g. before the storage unit is created, and works as follows. You set the
8859 value of the <link to="IMedium::location"/> attribute to a location
8860 specification which only contains the path specification but not the file
8861 name part and ends with either a forward slash or a backslash character.
8862 In response, VirtualBox will generate a new UUID for the hard disk and
8863 compose the file name using the following pattern:
8864 <pre>
8865 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8866 </pre>
8867 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8868 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8869 is the default extension for the storage format of this hard disk. After
8870 that, you may call any of the methods that create a new hard disk storage
8871 unit and they will use the generated UUID and file name.
8872
8873 <h3>Attaching Hard Disks</h3>
8874
8875 Hard disks are attached to virtual machines using the
8876 <link to="IMachine::attachHardDisk"/> method and detached using the
8877 <link to="IMachine::detachHardDisk"/> method. Depending on their
8878 <link to="#type"/>, hard disks are attached either
8879 <i>directly</i> or <i>indirectly</i>.
8880
8881 When a hard disk is being attached directly, it is associated with the
8882 virtual machine and used for hard disk operations when the machine is
8883 running. When a hard disk is being attached indirectly, a new differencing
8884 hard disk linked to it is implicitly created and this differencing hard
8885 disk is associated with the machine and used for hard disk operations.
8886 This also means that if <link to="IMachine::attachHardDisk"/> performs
8887 a direct attachment then the same hard disk will be returned in response
8888 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8889 an indirect attachment is performed then
8890 <link to="IMachine::getHardDisk"/> will return the implicitly created
8891 differencing hard disk, not the original one passed to <link
8892 to="IMachine::attachHardDisk"/>. The following table shows the
8893 dependency of the attachment type on the hard disk type:
8894
8895 <table>
8896 <tr>
8897 <th>Hard Disk Type</th>
8898 <th>Direct or Indirect?</th>
8899 </tr>
8900 <tr>
8901 <td>Normal (Base)</td>
8902 <td>
8903 Normal base hard disks that do not have children (i.e. differencing
8904 hard disks linked to them) and that are not already attached to
8905 virtual machines in snapshots are attached <b>directly</b>.
8906 Otherwise, they are attached <b>indirectly</b> because having
8907 dependent children or being part of the snapshot makes it impossible
8908 to modify hard disk contents without breaking the integrity of the
8909 dependent party. The <link to="#readOnly"/> attribute allows to
8910 quickly determine the kind of the attachment for the given hard
8911 disk. Note that if a normal base hard disk is to be indirectly
8912 attached to a virtual machine with snapshots then a special
8913 procedure called <i>smart attachment</i> is performed (see below).
8914 </td>
8915 </tr>
8916 <tr>
8917 <td>Normal (Differencing)</td>
8918 <td>
8919 Differencing hard disks are like normal base hard disks: attached
8920 <b>directly</b> if they do not have children and are not attached to
8921 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8922 that the smart attachment procedure is never performed for
8923 differencing hard disks.
8924 </td>
8925 </tr>
8926 <tr>
8927 <td>Immutable</td>
8928 <td>
8929 Immutable hard disks are always attached <b>indirectly</b> because
8930 they are designed to be non-writable. If an immutable hard disk is
8931 attached to a virtual machine with snapshots then a special
8932 procedure called smart attachment is performed (see below).
8933 </td>
8934 </tr>
8935 <tr>
8936 <td>Writethrough</td>
8937 <td>
8938 Writethrough hard disks are always attached <b>directly</b>, also as
8939 designed. This also means that writethrough hard disks cannot have
8940 other hard disks linked to them at all.
8941 </td>
8942 </tr>
8943 </table>
8944
8945 Note that the same hard disk, regardless of its type, may be attached to
8946 more than one virtual machine at a time. In this case, the machine that is
8947 started first gains exclusive access to the hard disk and attempts to
8948 start other machines having this hard disk attached will fail until the
8949 first machine is powered down.
8950
8951 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8952 that the given hard disk remains associated with the given machine after a
8953 successful <link to="IMachine::detachHardDisk"/> call until
8954 <link to="IMachine::saveSettings"/> is called to save all changes to
8955 machine settings to disk. This deferring is necessary to guarantee that
8956 the hard disk configuration may be restored at any time by a call to
8957 <link to="IMachine::discardSettings"/> before the settings
8958 are saved (committed).
8959
8960 Note that if <link to="IMachine::discardSettings"/> is called after
8961 indirectly attaching some hard disks to the machine but before a call to
8962 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8963 all differencing hard disks implicitly created by
8964 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8965 Such implicitly created hard disks will also be immediately deleted when
8966 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8967 call if it is made before <link to="IMachine::saveSettings"/>. This
8968 implicit deletion is safe because newly created differencing hard
8969 disks do not contain any user data.
8970
8971 However, keep in mind that detaching differencing hard disks that were
8972 implicitly created by <link to="IMachine::attachHardDisk"/>
8973 before the last <link to="IMachine::saveSettings"/> call will
8974 <b>not</b> implicitly delete them as they may already contain some data
8975 (for example, as a result of virtual machine execution). If these hard
8976 disks are no more necessary, the caller can always delete them explicitly
8977 using <link to="#deleteStorage"/> after they are actually de-associated
8978 from this machine by the <link to="IMachine::saveSettings"/> call.
8979
8980 <h3>Smart Attachment</h3>
8981
8982 When normal base or immutable hard disks are indirectly attached to a
8983 virtual machine then some additional steps are performed to make sure the
8984 virtual machine will have the most recent "view" of the hard disk being
8985 attached. These steps include walking through the machine's snapshots
8986 starting from the current one and going through ancestors up to the first
8987 snapshot. Hard disks attached to the virtual machine in all
8988 of the encountered snapshots are checked whether they are descendants of
8989 the given normal base or immutable hard disk. The first found child (which
8990 is the differencing hard disk) will be used instead of the normal base or
8991 immutable hard disk as a parent for creating a new differencing hard disk
8992 that will be actually attached to the machine. And only if no descendants
8993 are found or if the virtual machine does not have any snapshots then the
8994 normal base or immutable hard disk will be used itself as a parent for
8995 this differencing hard disk.
8996
8997 It is easier to explain what smart attachment does using the
8998 following example:
8999 <pre>
9000BEFORE attaching B.vdi: AFTER attaching B.vdi:
9001
9002Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9003 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9004 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9005 Snapshot 4 (none) Snapshot 4 (none)
9006 CurState (none) CurState (D3->D2.vdi)
9007
9008 NOT
9009 ...
9010 CurState (D3->B.vdi)
9011 </pre>
9012 The first column is the virtual machine configuration before the base hard
9013 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9014 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9015 mean that the hard disk that is actually attached to the machine is a
9016 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9017 another hard disk, <tt>B.vdi</tt>.
9018
9019 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9020 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9021 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9022 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9023 it cannot be attached directly and needs an indirect attachment (i.e.
9024 implicit creation of a new differencing hard disk). Due to the smart
9025 attachment procedure, the new differencing hard disk
9026 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9027 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9028 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9029 machine.
9030
9031 Note that if there is more than one descendant hard disk of the given base
9032 hard disk found in a snapshot, and there is an exact device, channel and
9033 bus match, then this exact match will be used. Otherwise, the youngest
9034 descendant will be picked up.
9035
9036 There is one more important aspect of the smart attachment procedure which
9037 is not related to snapshots at all. Before walking through the snapshots
9038 as described above, the backup copy of the current list of hard disk
9039 attachment is searched for descendants. This backup copy is created when
9040 the hard disk configuration is changed for the first time after the last
9041 <link to="IMachine::saveSettings"/> call and used by
9042 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9043 changes. When such a descendant is found in this backup copy, it will be
9044 simply re-attached back, without creating a new differencing hard disk for
9045 it. This optimization is necessary to make it possible to re-attach the
9046 base or immutable hard disk to a different bus, channel or device slot
9047 without losing the contents of the differencing hard disk actually
9048 attached to the machine in place of it.
9049 </desc>
9050
9051 <attribute name="format" type="wstring" readonly="yes">
9052 <desc>
9053 Storage format of this hard disk.
9054
9055 The value of this attribute is a string that specifies a backend used to
9056 store hard disk data. The storage format is defined when you create a
9057 new hard disk or automatically detected when you open an existing hard
9058 disk medium, and cannot be changed later.
9059
9060 The list of all storage formats supported by this VirtualBox
9061 installation can be obtained using
9062 <link to="ISystemProperties::hardDiskFormats"/>.
9063 </desc>
9064 </attribute>
9065
9066 <attribute name="type" type="HardDiskType">
9067 <desc>
9068 Type (role) of this hard disk.
9069
9070 The following constraints apply when changing the value of this
9071 attribute:
9072 <ul>
9073 <li>If a hard disk is attached to a virtual machine (either in the
9074 current state or in one of the snapshots), its type cannot be
9075 changed.
9076 </li>
9077 <li>As long as the hard disk has children, its type cannot be set
9078 to <link to="HardDiskType_Writethrough"/>.
9079 </li>
9080 <li>The type of all differencing hard disks is
9081 <link to="HardDiskType_Normal"/> and cannot be changed.
9082 </li>
9083 </ul>
9084
9085 The type of a newly created or opened hard disk is set to
9086 <link to="HardDiskType_Normal"/>.
9087 </desc>
9088 </attribute>
9089
9090 <attribute name="parent" type="IHardDisk" readonly="yes">
9091 <desc>
9092 Parent of this hard disk (a hard disk this hard disk is directly based
9093 on).
9094
9095 Only differencing hard disks have parents. For base (non-differencing)
9096 hard disks, <tt>null</tt> is returned.
9097 </desc>
9098 </attribute>
9099
9100 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9101 <desc>
9102 Children of this hard disk (all differencing hard disks directly based
9103 on this hard disk). A <tt>null</tt> array is returned if this hard disk
9104 does not have any children.
9105 </desc>
9106 </attribute>
9107
9108 <attribute name="root" type="IHardDisk" readonly="yes">
9109 <desc>
9110 Root hard disk of this hard disk.
9111
9112 If this is a differencing hard disk, its root hard disk is the base hard
9113 disk the given hard disk branch starts from. For all other types of hard
9114 disks, this property returns the hard disk object itself (i.e. the same
9115 object this property is read on).
9116 </desc>
9117 </attribute>
9118
9119 <attribute name="readOnly" type="boolean" readonly="yes">
9120 <desc>
9121 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
9122 otherwise.
9123
9124 A hard disk is considered to be read-only when its contents cannot be
9125 modified without breaking the integrity of other parties that depend on
9126 this hard disk such as its child hard disks or snapshots of virtual
9127 machines where this hard disk is attached to these machines. If there
9128 are no children and no such snapshots then there is no dependency and
9129 the hard disk is not read-only.
9130
9131 The value of this attribute can be used to determine the kind of the
9132 attachment that will take place when attaching this hard disk to a
9133 virtual machine. If the value is <tt>false</tt> then the hard disk will
9134 be attached directly. If the value is <tt>true</tt> then the hard disk
9135 will be attached indirectly by creating a new differencing child hard
9136 disk for that. See the interface description for more information.
9137
9138 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9139 disks are always read-only while all
9140 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9141 always not.
9142
9143 <note>
9144 The read-only condition represented by this attribute is related to
9145 the hard disk type and usage, not to the current
9146 <link to="IMedium::state">media state</link> and not to the read-only
9147 state of the storage unit.
9148 </note>
9149 </desc>
9150 </attribute>
9151
9152 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9153 <desc>
9154 Logical size of this hard disk (in megabytes), as reported to the
9155 guest OS running inside the virtual machine this disk is
9156 attached to. The logical size is defined when the hard disk is created
9157 and cannot be changed later.
9158
9159 <note>
9160 Reading this property on a differencing hard disk will return the size
9161 of its <link to="#root"/> hard disk.
9162 </note>
9163 <note>
9164 For hard disks whose state is <link to="#state"/> is <link
9165 to="MediaState_Inaccessible"/>, the value of this property is the
9166 last known logical size. For <link to="MediaState_NotCreated"/> hard
9167 disks, the returned value is zero.
9168 </note>
9169 </desc>
9170 </attribute>
9171
9172 <attribute name="autoReset" type="boolean">
9173 <desc>
9174 Whether this differencing hard disk will be automatically reset each
9175 time a virtual machine it is attached to is powered up.
9176
9177 See <link to="#reset()"/> for more information about resetting
9178 differencing hard disks.
9179
9180 <note>
9181 Reading this property on a base (non-differencing) hard disk will
9182 always <tt>false</tt>. Changing the value of this property in this
9183 case is not supported.
9184 </note>
9185
9186 <result name="VBOX_E_NOT_SUPPORTED">
9187 This is not a differencing hard disk (when changing the attribute
9188 value).
9189 </result>
9190 </desc>
9191 </attribute>
9192
9193 <!-- storage methods -->
9194
9195 <method name="getProperty">
9196 <desc>
9197 Returns the value of the custom hard disk property with the given name.
9198
9199 The list of all properties supported by the given hard disk format can
9200 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9201
9202 Note that if this method returns a <tt>null</tt> @a value, the requested
9203 property is supported but currently not assigned any value.
9204
9205 <result name="VBOX_E_OBJECT_NOT_FOUND">
9206 Requested property does not exist (not supported by the format).
9207 </result>
9208 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9209 </desc>
9210 <param name="name" type="wstring" dir="in">
9211 <desc>Name of the property to get.</desc>
9212 </param>
9213 <param name="value" type="wstring" dir="return">
9214 <desc>Current property value.</desc>
9215 </param>
9216 </method>
9217
9218 <method name="setProperty">
9219 <desc>
9220 Sets the value of the custom hard disk property with the given name.
9221
9222 The list of all properties supported by the given hard disk format can
9223 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9224
9225 Note that setting the property value to <tt>null</tt> is equivalent to
9226 deleting the existing value. A default value (if it is defined for this
9227 property) will be used by the format backend in this case.
9228
9229 <result name="VBOX_E_OBJECT_NOT_FOUND">
9230 Requested property does not exist (not supported by the format).
9231 </result>
9232 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9233 </desc>
9234 <param name="name" type="wstring" dir="in">
9235 <desc>Name of the property to set.</desc>
9236 </param>
9237 <param name="value" type="wstring" dir="in">
9238 <desc>Property value to set.</desc>
9239 </param>
9240 </method>
9241
9242 <method name="getProperties">
9243 <desc>
9244 Returns values for a group of properties in one call.
9245
9246 The names of the properties to get are specified using the @a names
9247 argument which is a list of comma-separated property names or
9248 <tt>null</tt> if all properties are to be returned. Note that currently
9249 the value of this argument is ignored and the method always returns all
9250 existing properties.
9251
9252 The list of all properties supported by the given hard disk format can
9253 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9254
9255 The method returns two arrays, the array of property names corresponding
9256 to the @a names argument and the current values of these properties.
9257 Both arrays have the same number of elements with each elemend at the
9258 given index in the first array corresponds to an element at the same
9259 index in the second array.
9260
9261 Note that for properties that do not have assigned values,
9262 <tt>null</tt> is returned at the appropriate index in the
9263 @a returnValues array.
9264
9265 </desc>
9266 <param name="names" type="wstring" dir="in">
9267 <desc>
9268 Names of properties to get.
9269 </desc>
9270 </param>
9271 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9272 <desc>Names of returned properties.</desc>
9273 </param>
9274 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9275 <desc>Values of returned properties.</desc>
9276 </param>
9277 </method>
9278
9279 <method name="setProperties">
9280 <desc>
9281 Sets values for a group of properties in one call.
9282
9283 The names of the properties to set are passed in the @a names
9284 array along with the new values for them in the @a values array. Both
9285 arrays have the same number of elements with each elemend at the given
9286 index in the first array corresponding to an element at the same index
9287 in the second array.
9288
9289 If there is at least one property name in @a names that is not valid,
9290 the method will fail before changing the values of any other properties
9291 from the @a names array.
9292
9293 Using this method over <link to="#setProperty"/> is preferred if you
9294 need to set several properties at once since it will result into less
9295 IPC calls.
9296
9297 The list of all properties supported by the given hard disk format can
9298 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9299
9300 Note that setting the property value to <tt>null</tt> is equivalent to
9301 deleting the existing value. A default value (if it is defined for this
9302 property) will be used by the format backend in this case.
9303 </desc>
9304 <param name="names" type="wstring" safearray="yes" dir="in">
9305 <desc>Names of properties to set.</desc>
9306 </param>
9307 <param name="values" type="wstring" safearray="yes" dir="in">
9308 <desc>Values of properties to set.</desc>
9309 </param>
9310 </method>
9311
9312 <!-- storage methods -->
9313
9314 <method name="createBaseStorage">
9315 <desc>
9316 Starts creating a hard disk storage unit (fixed/dynamic, according
9317 to the variant flags) in in the background. The previous storage unit
9318 created for this object, if any, must first be deleted using
9319 <link to="#deleteStorage"/>, otherwise the operation will fail.
9320
9321 Before the operation starts, the hard disk is placed in
9322 <link to="MediaState_Creating"/> state. If the create operation
9323 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9324 state.
9325
9326 After the returned progress object reports that the operation has
9327 successfully completed, the media state will be set to <link
9328 to="MediaState_Created"/>, the hard disk will be remembered by this
9329 VirtualBox installation and may be attached to virtual machines.
9330
9331 <result name="VBOX_E_NOT_SUPPORTED">
9332 The variant of storage creation operation is not supported. See <link
9333 to="IHardDiskFormat::capabilities"/>.
9334 </result>
9335 </desc>
9336 <param name="logicalSize" type="unsigned long long" dir="in">
9337 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9338 </param>
9339 <param name="variant" type="HardDiskVariant" dir="in">
9340 <desc>Exact image variant which should be created.</desc>
9341 </param>
9342 <param name="progress" type="IProgress" dir="return">
9343 <desc>Progress object to track the operation completion.</desc>
9344 </param>
9345 </method>
9346
9347 <method name="deleteStorage">
9348 <desc>
9349 Starts deleting the storage unit of this hard disk.
9350
9351 The hard disk must not be attached to any known virtual machine and must
9352 not have any known child hard disks, otherwise the operation will fail.
9353 It will also fail if there is no storage unit to delete or if deletion
9354 is already in progress, or if the hard disk is being in use (locked for
9355 read or for write) or inaccessible. Therefore, the only valid state for
9356 this operation to succeed is <link to="MediaState_Created"/>.
9357
9358 Before the operation starts, the hard disk is placed to
9359 <link to="MediaState_Deleting"/> state and gets removed from the list
9360 of remembered hard disks (media registry). If the delete operation
9361 fails, the media will be remembered again and placed back to
9362 <link to="MediaState_Created"/> state.
9363
9364 After the returned progress object reports that the operation is
9365 complete, the media state will be set to
9366 <link to="MediaState_NotCreated"/> and you will be able to use one of
9367 the storage creation methods to create it again.
9368
9369 <see>#close()</see>
9370
9371 <result name="VBOX_E_OBJECT_IN_USE">
9372 Hard disk is attached to a virtual machine.
9373 </result>
9374 <result name="VBOX_E_NOT_SUPPORTED">
9375 Storage deletion is not allowed because neither of storage creation
9376 operations are supported. See
9377 <link to="IHardDiskFormat::capabilities"/>.
9378 </result>
9379
9380 <note>
9381 If the deletion operation fails, it is not guaranteed that the storage
9382 unit still exists. You may check the <link to="IMedium::state"/> value
9383 to answer this question.
9384 </note>
9385 </desc>
9386 <param name="progress" type="IProgress" dir="return">
9387 <desc>Progress object to track the operation completion.</desc>
9388 </param>
9389 </method>
9390
9391 <!-- diff methods -->
9392
9393 <method name="createDiffStorage">
9394 <desc>
9395 Starts creating an empty differencing storage unit based on this hard
9396 disk in the format and at the location defined by the @a target
9397 argument.
9398
9399 The target hard disk must be in <link to="MediaState_NotCreated"/>
9400 state (i.e. must not have an existing storage unit). Upon successful
9401 completion, this operation will set the type of the target hard disk to
9402 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9403 represent the differencing hard disk data in the given format (according
9404 to the storage format of the target object).
9405
9406 After the returned progress object reports that the operation is
9407 successfully complete, the target hard disk gets remembered by this
9408 VirtualBox installation and may be attached to virtual machines.
9409
9410 <note>
9411 The hard disk will be set to <link to="MediaState_LockedRead"/>
9412 state for the duration of this operation.
9413 </note>
9414 <result name="VBOX_E_OBJECT_IN_USE">
9415 Hard disk not in NotCreated state.
9416 </result>
9417 </desc>
9418 <param name="target" type="IHardDisk" dir="in">
9419 <desc>Target hard disk.</desc>
9420 </param>
9421 <param name="variant" type="HardDiskVariant" dir="in">
9422 <desc>Exact image variant which should be created.</desc>
9423 </param>
9424 <param name="progress" type="IProgress" dir="return">
9425 <desc>Progress object to track the operation completion.</desc>
9426 </param>
9427 </method>
9428
9429 <method name="mergeTo">
9430 <desc>
9431 Starts merging the contents of this hard disk and all intermediate
9432 differencing hard disks in the chain to the given target hard disk.
9433
9434 The target hard disk must be either a descendant of this hard disk or
9435 its ancestor (otherwise this method will immediately return a failure).
9436 It follows that there are two logical directions of the merge operation:
9437 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9438 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9439 chain:
9440
9441 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9442
9443 Here, calling this method on the <tt>Base</tt> hard disk object with
9444 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9445 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9446 merge. Note that in both cases the contents of the resulting hard disk
9447 will be the same, the only difference is the hard disk object that takes
9448 the result of the merge operation. In case of the forward merge in the
9449 above example, the result will be written to <tt>Diff_2</tt>; in case of
9450 the backward merge, the result will be written to <tt>Base</tt>. In
9451 other words, the result of the operation is always stored in the target
9452 hard disk.
9453
9454 Upon successful operation completion, the storage units of all hard
9455 disks in the chain between this (source) hard disk and the target hard
9456 disk, including the source hard disk itself, will be automatically
9457 deleted and the relevant hard disk objects (including this hard disk)
9458 will become uninitialized. This means that any attempt to call any of
9459 their methods or attributes will fail with the
9460 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9461 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9462 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9463 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9464 disk itself since it will no longer be based on any other hard disk.
9465
9466 Considering the above, all of the following conditions must be met in
9467 order for the merge operation to succeed:
9468 <ul>
9469 <li>
9470 Neither this (source) hard disk nor any intermediate
9471 differencing hard disk in the chain between it and the target
9472 hard disk is attached to any virtual machine.
9473 </li>
9474 <li>
9475 Neither the source hard disk nor the target hard disk is an
9476 <link to="HardDiskType_Immutable"/> hard disk.
9477 </li>
9478 <li>
9479 The part of the hard disk tree from the source hard disk to the
9480 target hard disk is a linear chain, i.e. all hard disks in this
9481 chain have exactly one child which is the next hard disk in this
9482 chain. The only exception from this rule is the target hard disk in
9483 the forward merge operation; it is allowed to have any number of
9484 child hard disks because the merge operation will hot change its
9485 logical contents (as it is seen by the guest OS or by children).
9486 </li>
9487 <li>
9488 None of the involved hard disks are in
9489 <link to="MediaState_LockedRead"/> or
9490 <link to="MediaState_LockedWrite"/> state.
9491 </li>
9492 </ul>
9493
9494 <note>
9495 This (source) hard disk and all intermediates will be placed to <link
9496 to="MediaState_Deleting"/> state and the target hard disk will be
9497 placed to <link to="MediaState_LockedWrite"/> state and for the
9498 duration of this operation.
9499 </note>
9500 </desc>
9501 <param name="targetId" type="uuid" dir="in">
9502 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9503 </param>
9504 <param name="progress" type="IProgress" dir="return">
9505 <desc>Progress object to track the operation completion.</desc>
9506 </param>
9507 </method>
9508
9509 <!-- clone methods -->
9510
9511 <method name="cloneTo">
9512 <desc>
9513 Starts creating a clone of this hard disk in the format and at the
9514 location defined by the @a target argument.
9515
9516 The target hard disk must be in <link to="MediaState_NotCreated"/>
9517 state (i.e. must not have an existing storage unit). Upon successful
9518 completion, the cloned hard disk will contain exactly the same sector
9519 data as the hard disk being cloned, except that a new UUID for the clone
9520 will be randomly generated.
9521
9522 After the returned progress object reports that the operation is
9523 successfully complete, the target hard disk gets remembered by this
9524 VirtualBox installation and may be attached to virtual machines.
9525
9526 <note>
9527 If the cloned hard disk is a differencing hard disk, it will inherit
9528 parent dependency of the original hard disk.
9529 </note>
9530 <note>
9531 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9532 state for the duration of this operation.
9533 </note>
9534 </desc>
9535 <param name="target" type="IHardDisk" dir="in">
9536 <desc>Target hard disk.</desc>
9537 </param>
9538 <param name="variant" type="HardDiskVariant" dir="in">
9539 <desc>Exact image variant which should be created.</desc>
9540 </param>
9541 <param name="progress" type="IProgress" dir="return">
9542 <desc>Progress object to track the operation completion.</desc>
9543 </param>
9544 </method>
9545
9546 <method name="flattenTo">
9547 <desc>
9548 Starts creating a deep (independent) clone of this hard disk in the
9549 format and at the location defined by the @a target argument.
9550
9551 This operation is similar to <link to="#cloneTo"/> except that when
9552 applied to a differencing hard disk, it will also copy missing hard disk
9553 data from all parent hard disks it is linked to. This will make the
9554 created clone an independent base hard disk that contains all hard disk
9555 data and does not need any other hard disks to operate.
9556
9557 After the returned progress object reports that the operation is
9558 successfully complete, the target hard disk gets remembered by this
9559 VirtualBox installation and may be attached to virtual machines.
9560
9561 <note>
9562 For base hard disks, this operation is identical to
9563 <link to="#cloneTo"/>.
9564 </note>
9565 <note>
9566 This hard disk and all its parent hard disks will be placed to <link
9567 to="MediaState_LockedRead"/> state for the duration of this
9568 operation.
9569 </note>
9570 </desc>
9571 <param name="target" type="IHardDisk" dir="in">
9572 <desc>Target hard disk.</desc>
9573 </param>
9574 <param name="variant" type="HardDiskVariant" dir="in">
9575 <desc>Exact image variant which should be created.</desc>
9576 </param>
9577 <param name="progress" type="IProgress" dir="return">
9578 <desc>Progress object to track the operation completion.</desc>
9579 </param>
9580 </method>
9581
9582 <!-- other methods -->
9583
9584 <method name="compact">
9585 <desc>
9586 Starts compacting of this hard disk. This means that the disk is
9587 transformed into a possibly more compact storage representation.
9588 This potentially creates temporary images, which can require a
9589 substantial amount of additional disk space.
9590
9591 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9592 state and all its parent hard disks (if any) will be placed to
9593 <link to="MediaState_LockedRead"/> state for the duration of this
9594 operation.
9595 </desc>
9596 <param name="progress" type="IProgress" dir="return">
9597 <desc>Progress object to track the operation completion.</desc>
9598 </param>
9599 </method>
9600
9601 <method name="reset">
9602 <desc>
9603 Starts erasing the contents of this differencing hard disk.
9604
9605 This operation will reset the differencing hard disk to its initial
9606 state when it does not contain any sector data and any read operation is
9607 redirected to its parent hard disk.
9608
9609 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9610 for the duration of this operation.
9611
9612 <result name="VBOX_E_NOT_SUPPORTED">
9613 This is not a differencing hard disk.
9614 </result>
9615 <result name="VBOX_E_INVALID_OBJECT_STATE">
9616 Hard disk is not in <link to="MediaState_Created"/> or
9617 <link to="MediaState_Inaccessible"/> state.
9618 </result>
9619 </desc>
9620 <param name="progress" type="IProgress" dir="return">
9621 <desc>Progress object to track the operation completion.</desc>
9622 </param>
9623 </method>
9624
9625 </interface>
9626
9627
9628 <!--
9629 // IHardDiskFormat
9630 /////////////////////////////////////////////////////////////////////////
9631 -->
9632
9633 <enum
9634 name="DataType"
9635 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9636 >
9637 <const name="Int32" value="0"/>
9638 <const name="Int8" value="1"/>
9639 <const name="String" value="2"/>
9640 </enum>
9641
9642 <enum
9643 name="DataFlags"
9644 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9645 >
9646 <const name="None" value="0x00"/>
9647 <const name="Mandatory" value="0x01"/>
9648 <const name="Expert" value="0x02"/>
9649 <const name="Array" value="0x04"/>
9650 <const name="FlagMask" value="0x07"/>
9651 </enum>
9652
9653 <enum
9654 name="HardDiskFormatCapabilities"
9655 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9656 >
9657 <desc>
9658 Hard disk format capability flags.
9659 </desc>
9660
9661 <const name="Uuid" value="0x01">
9662 <desc>
9663 Supports UUIDs as expected by VirtualBox code.
9664 </desc>
9665 </const>
9666
9667 <const name="CreateFixed" value="0x02">
9668 <desc>
9669 Supports creating fixed size images, allocating all space instantly.
9670 </desc>
9671 </const>
9672
9673 <const name="CreateDynamic" value="0x04">
9674 <desc>
9675 Supports creating dynamically growing images, allocating space on
9676 demand.
9677 </desc>
9678 </const>
9679
9680 <const name="CreateSplit2G" value="0x08">
9681 <desc>
9682 Supports creating images split in chunks of a bit less than 2 GBytes.
9683 </desc>
9684 </const>
9685
9686 <const name="Differencing" value="0x10">
9687 <desc>
9688 Supports being used as a format for differencing hard disks (see <link
9689 to="IHardDisk::createDiffStorage"/>).
9690 </desc>
9691 </const>
9692
9693 <const name="Asynchronous" value="0x20">
9694 <desc>
9695 Supports asynchronous I/O operations for at least some configurations.
9696 </desc>
9697 </const>
9698
9699 <const name="File" value="0x40">
9700 <desc>
9701 The format backend operates on files (the <link to="IMedium::location"/>
9702 attribute of the hard disk specifies a file used to store hard disk
9703 data; for a list of supported file extensions see
9704 <link to="IHardDiskFormat::fileExtensions"/>).
9705 </desc>
9706 </const>
9707
9708 <const name="Properties" value="0x80">
9709 <desc>
9710 The format backend uses the property interface to configure the storage
9711 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9712 method is used to get access to properties supported by the given hard
9713 disk format).
9714 </desc>
9715 </const>
9716
9717 <const name="CapabilityMask" value="0xFF"/>
9718 </enum>
9719
9720 <interface
9721 name="IHardDiskFormat" extends="$unknown"
9722 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9723 wsmap="managed"
9724 >
9725 <desc>
9726 The IHardDiskFormat interface represents a virtual hard disk format.
9727
9728 Each hard disk format has an associated backend which is used to handle
9729 hard disks stored in this format. This interface provides information
9730 about the properties of the associated backend.
9731
9732 Each hard disk format is identified by a string represented by the
9733 <link to="#id"/> attribute. This string is used in calls like
9734 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9735 format.
9736
9737 The list of all supported hard disk formats can be obtained using
9738 <link to="ISystemProperties::hardDiskFormats"/>.
9739
9740 <see>IHardDisk</see>
9741 </desc>
9742
9743 <attribute name="id" type="wstring" readonly="yes">
9744 <desc>
9745 Identifier of this format.
9746
9747 The format identifier is a non-null non-empty ASCII string. Note that
9748 this string is case-insensitive. This means that, for example, all of
9749 the following strings:
9750 <pre>
9751 "VDI"
9752 "vdi"
9753 "VdI"</pre>
9754 refer to the same hard disk format.
9755
9756 This string is used in methods of other interfaces where it is necessary
9757 to specify a hard disk format, such as
9758 <link to="IVirtualBox::createHardDisk"/>.
9759 </desc>
9760 </attribute>
9761
9762 <attribute name="name" type="wstring" readonly="yes">
9763 <desc>
9764 Human readable description of this format.
9765
9766 Mainly for use in file open dialogs.
9767 </desc>
9768 </attribute>
9769
9770 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9771 <desc>
9772 Array of strings containing the supported file extensions.
9773
9774 The first extension in the array is the extension preferred by the
9775 backend. It is recommended to use this extension when specifying a
9776 location of the storage unit for a new hard disk.
9777
9778 Note that some backends do not work on files, so this array may be
9779 empty.
9780
9781 <see>IHardDiskFormat::capabilities</see>
9782 </desc>
9783 </attribute>
9784
9785 <attribute name="capabilities" type="unsigned long" readonly="yes">
9786 <desc>
9787 Capabilities of the format as a set of bit flags.
9788
9789 For the meaning of individual capability flags see
9790 <link to="HardDiskFormatCapabilities"/>.
9791 </desc>
9792 </attribute>
9793
9794 <method name="describeProperties">
9795 <desc>
9796 Returns several arrays describing the properties supported by this
9797 format.
9798
9799 An element with the given index in each array describes one
9800 property. Thus, the number of elements in each returned array is the
9801 same and corresponds to the number of supported properties.
9802
9803 The returned arrays are filled in only if the
9804 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9805 All arguments must be non-NULL.
9806
9807 <see>DataType</see>
9808 <see>DataFlags</see>
9809 </desc>
9810
9811 <param name="names" type="wstring" safearray="yes" dir="out">
9812 <desc>Array of property names.</desc>
9813 </param>
9814 <param name="description" type="wstring" safearray="yes" dir="out">
9815 <desc>Array of property descriptions.</desc>
9816 </param>
9817 <param name="types" type="DataType" safearray="yes" dir="out">
9818 <desc>Array of property types.</desc>
9819 </param>
9820 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9821 <desc>Array of property flags.</desc>
9822 </param>
9823 <param name="defaults" type="wstring" safearray="yes" dir="out">
9824 <desc>Array of default property values.</desc>
9825 </param>
9826 </method>
9827
9828 </interface>
9829
9830
9831 <!--
9832 // IFloppyImage
9833 /////////////////////////////////////////////////////////////////////////
9834 -->
9835
9836 <interface
9837 name="IFloppyImage" extends="IMedium"
9838 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9839 wsmap="managed"
9840 >
9841 <desc>
9842 The IFloppyImage interface represents a medium containing the image
9843 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9844 </desc>
9845
9846 </interface>
9847
9848
9849 <!--
9850 // IDVDImage
9851 /////////////////////////////////////////////////////////////////////////
9852 -->
9853
9854 <interface
9855 name="IDVDImage" extends="IMedium"
9856 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9857 wsmap="managed"
9858 >
9859 <desc>
9860 The IDVDImage interface represents a medium containing the image
9861 of a CD or DVD disk in the ISO format.
9862
9863 This is a subclass of <link to="IMedium" />; see remarks there.
9864 </desc>
9865
9866 </interface>
9867
9868
9869 <!--
9870 // IDVDDrive
9871 /////////////////////////////////////////////////////////////////////////
9872 -->
9873
9874 <interface
9875 name="IDVDDrive" extends="$unknown"
9876 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9877 wsmap="managed"
9878 >
9879 <desc>
9880 The IDVDDrive interface represents the virtual CD/DVD drive of the
9881 virtual machine. An object of this type is returned by
9882 <link to="IMachine::DVDDrive"/>.
9883 </desc>
9884
9885 <attribute name="state" type="DriveState" readonly="yes">
9886 <desc>Current drive state.</desc>
9887 </attribute>
9888
9889 <attribute name="passthrough" type="boolean">
9890 <desc>
9891 When a host drive is mounted and passthrough is enabled
9892 the guest OS will be able to directly send SCSI commands to
9893 the host drive. This enables the guest OS to use CD/DVD writers
9894 but is potentially dangerous.
9895 </desc>
9896 </attribute>
9897
9898 <method name="mountImage">
9899 <desc>Mounts a CD/DVD image with the specified UUID.
9900
9901 <result name="VBOX_E_FILE_ERROR">
9902 Invalid image file location.
9903 </result>
9904 <result name="VBOX_E_OBJECT_NOT_FOUND">
9905 Could not find a CD/DVD image matching @a imageId.
9906 </result>
9907 <result name="VBOX_E_INVALID_OBJECT_STATE">
9908 Invalid media state.
9909 </result>
9910
9911 </desc>
9912 <param name="imageId" type="uuid" dir="in"/>
9913 </method>
9914
9915 <method name="captureHostDrive">
9916 <desc>Captures the specified host CD/DVD drive.</desc>
9917 <param name="drive" type="IHostDVDDrive" dir="in"/>
9918 </method>
9919
9920 <method name="unmount">
9921 <desc>Unmounts the currently mounted image or host drive.</desc>
9922 </method>
9923
9924 <method name="getImage">
9925 <desc>Returns the currently mounted CD/DVD image.</desc>
9926 <param name="image" type="IDVDImage" dir="return"/>
9927 </method>
9928
9929 <method name="getHostDrive">
9930 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9931 <param name="drive" type="IHostDVDDrive" dir="return"/>
9932 </method>
9933
9934 </interface>
9935
9936
9937 <!--
9938 // IFloppyDrive
9939 /////////////////////////////////////////////////////////////////////////
9940 -->
9941
9942 <interface
9943 name="IFloppyDrive" extends="$unknown"
9944 uuid="159412cd-bab8-452e-8097-218a020825a6"
9945 wsmap="managed"
9946 >
9947 <desc>
9948 The IFloppyDrive interface represents the virtual floppy drive of the
9949 virtual machine. An object of this type is returned by
9950 <link to="IMachine::floppyDrive" />.
9951 </desc>
9952
9953 <attribute name="enabled" type="boolean">
9954 <desc>
9955 Flag whether the floppy drive is enabled. If it is disabled,
9956 the floppy drive will not be reported to the guest OS.
9957 </desc>
9958 </attribute>
9959
9960 <attribute name="state" type="DriveState" readonly="yes">
9961 <desc>Current drive state.</desc>
9962 </attribute>
9963
9964 <method name="mountImage">
9965 <desc>Mounts a floppy image with the specified UUID.
9966
9967 <result name="VBOX_E_FILE_ERROR">
9968 Invalid image file location.
9969 </result>
9970 <result name="VBOX_E_OBJECT_NOT_FOUND">
9971 Could not find a floppy image matching @a imageID.
9972 </result>
9973 <result name="VBOX_E_INVALID_OBJECT_STATE">
9974 Invalid media state.
9975 </result>
9976
9977 </desc>
9978 <param name="imageId" type="uuid" dir="in"/>
9979 </method>
9980
9981 <method name="captureHostDrive">
9982 <desc>Captures the specified host floppy drive.</desc>
9983 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9984 </method>
9985
9986 <method name="unmount">
9987 <desc>Unmounts the currently mounted image or host drive.</desc>
9988 </method>
9989
9990 <method name="getImage">
9991 <desc>Returns the currently mounted floppy image.</desc>
9992 <param name="image" type="IFloppyImage" dir="return"/>
9993 </method>
9994
9995 <method name="getHostDrive">
9996 <desc>Returns the currently mounted host floppy drive.</desc>
9997 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9998 </method>
9999
10000 </interface>
10001
10002
10003 <!--
10004 // IKeyboard
10005 /////////////////////////////////////////////////////////////////////////
10006 -->
10007
10008 <interface
10009 name="IKeyboard" extends="$unknown"
10010 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10011 wsmap="managed"
10012 >
10013 <desc>
10014 The IKeyboard interface represents the virtual machine's keyboard. Used
10015 in <link to="IConsole::keyboard"/>.
10016
10017 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10018 to the virtual machine.
10019
10020 </desc>
10021 <method name="putScancode">
10022 <desc>Sends a scancode to the keyboard.
10023
10024 <result name="VBOX_E_IPRT_ERROR">
10025 Could not send scan code to virtual keyboard.
10026 </result>
10027
10028 </desc>
10029 <param name="scancode" type="long" dir="in"/>
10030 </method>
10031
10032 <method name="putScancodes">
10033 <desc>Sends an array of scancodes to the keyboard.
10034
10035 <result name="VBOX_E_IPRT_ERROR">
10036 Could not send all scan codes to virtual keyboard.
10037 </result>
10038
10039 </desc>
10040 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10041 <param name="codesStored" type="unsigned long" dir="return"/>
10042 </method>
10043
10044 <method name="putCAD">
10045 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10046 function is nothing special, it is just a convenience function
10047 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10048
10049 <result name="VBOX_E_IPRT_ERROR">
10050 Could not send all scan codes to virtual keyboard.
10051 </result>
10052
10053 </desc>
10054 </method>
10055
10056 </interface>
10057
10058
10059 <!--
10060 // IMouse
10061 /////////////////////////////////////////////////////////////////////////
10062 -->
10063
10064 <enum
10065 name="MouseButtonState"
10066 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
10067 >
10068 <desc>
10069 Mouse button state.
10070 </desc>
10071
10072 <const name="LeftButton" value="0x01"/>
10073 <const name="RightButton" value="0x02"/>
10074 <const name="MiddleButton" value="0x04"/>
10075 <const name="WheelUp" value="0x08"/>
10076 <const name="WheelDown" value="0x10"/>
10077 <const name="MouseStateMask" value="0x1F"/>
10078 </enum>
10079
10080 <interface
10081 name="IMouse" extends="$unknown"
10082 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
10083 wsmap="managed"
10084 >
10085 <desc>
10086 The IMouse interface represents the virtual machine's mouse. Used in
10087 <link to="IConsole::mouse"/>.
10088
10089 Through this interface, the virtual machine's virtual mouse can be
10090 controlled.
10091 </desc>
10092
10093 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10094 <desc>
10095 Whether the guest OS supports absolute mouse pointer positioning
10096 or not.
10097 <note>
10098 VirtualBox Guest Tools need to be installed to the guest OS
10099 in order to enable absolute mouse positioning support.
10100 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10101 callback to be instantly informed about changes of this attribute
10102 during virtual machine execution.
10103 </note>
10104 <see><link to="#putMouseEventAbsolute"/></see>
10105 </desc>
10106 </attribute>
10107
10108 <method name="putMouseEvent">
10109 <desc>
10110 Initiates a mouse event using relative pointer movements
10111 along x and y axis.
10112
10113 <result name="E_ACCESSDENIED">
10114 Console not powered up.
10115 </result>
10116 <result name="VBOX_E_IPRT_ERROR">
10117 Could not send mouse event to virtual mouse.
10118 </result>
10119
10120 </desc>
10121
10122 <param name="dx" type="long" dir="in">
10123 <desc>
10124 Amount of pixels the mouse should move to the right.
10125 Negative values move the mouse to the left.
10126 </desc>
10127 </param>
10128 <param name="dy" type="long" dir="in">
10129 <desc>
10130 Amount of pixels the mouse should move downwards.
10131 Negative values move the mouse upwards.
10132 </desc>
10133 </param>
10134 <param name="dz" type="long" dir="in">
10135 <desc>
10136 Amount of mouse wheel moves.
10137 Positive values describe clockwise wheel rotations,
10138 negative values describe counterclockwise rotations.
10139 </desc>
10140 </param>
10141 <param name="buttonState" type="long" dir="in">
10142 <desc>
10143 The current state of mouse buttons. Every bit represents
10144 a mouse button as follows:
10145 <table>
10146 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10147 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10148 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10149 </table>
10150 A value of <tt>1</tt> means the corresponding button is pressed.
10151 otherwise it is released.
10152 </desc>
10153 </param>
10154 </method>
10155
10156 <method name="putMouseEventAbsolute">
10157 <desc>
10158 Positions the mouse pointer using absolute x and y coordinates.
10159 These coordinates are expressed in pixels and
10160 start from <tt>[1,1]</tt> which corresponds to the top left
10161 corner of the virtual display.
10162
10163 <result name="E_ACCESSDENIED">
10164 Console not powered up.
10165 </result>
10166 <result name="VBOX_E_IPRT_ERROR">
10167 Could not send mouse event to virtual mouse.
10168 </result>
10169
10170 <note>
10171 This method will have effect only if absolute mouse
10172 positioning is supported by the guest OS.
10173 </note>
10174
10175 <see><link to="#absoluteSupported"/></see>
10176 </desc>
10177
10178 <param name="x" type="long" dir="in">
10179 <desc>
10180 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
10181 </desc>
10182 </param>
10183 <param name="y" type="long" dir="in">
10184 <desc>
10185 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
10186 </desc>
10187 </param>
10188 <param name="dz" type="long" dir="in">
10189 <desc>
10190 Amount of mouse wheel moves.
10191 Positive values describe clockwise wheel rotations,
10192 negative values describe counterclockwise rotations.
10193 </desc>
10194 </param>
10195 <param name="buttonState" type="long" dir="in">
10196 <desc>
10197 The current state of mouse buttons. Every bit represents
10198 a mouse button as follows:
10199 <table>
10200 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10201 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10202 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10203 </table>
10204 A value of <tt>1</tt> means the corresponding button is pressed.
10205 otherwise it is released.
10206 </desc>
10207 </param>
10208 </method>
10209
10210 </interface>
10211
10212 <!--
10213 // IDisplay
10214 /////////////////////////////////////////////////////////////////////////
10215 -->
10216
10217 <enum
10218 name="FramebufferAccelerationOperation"
10219 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
10220 >
10221 <desc>
10222 Frame buffer acceleration operation.
10223 </desc>
10224
10225 <const name="SolidFillAcceleration" value="1"/>
10226 <const name="ScreenCopyAcceleration" value="2"/>
10227 </enum>
10228
10229 <enum
10230 name="FramebufferPixelFormat"
10231 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10232 >
10233 <desc>
10234 Format of the video memory buffer. Constants represented by this enum can
10235 be used to test for particular values of <link
10236 to="IFramebuffer::pixelFormat"/>. See also <link
10237 to="IFramebuffer::requestResize"/>.
10238
10239 See also www.fourcc.org for more information about FOURCC pixel formats.
10240 </desc>
10241
10242 <const name="Opaque" value="0">
10243 <desc>
10244 Unknown buffer format (the user may not assume any particular format of
10245 the buffer).
10246 </desc>
10247 </const>
10248 <const name="FOURCC_RGB" value="0x32424752">
10249 <desc>
10250 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10251 bit layout).
10252 </desc>
10253 </const>
10254 </enum>
10255
10256 <interface
10257 name="IFramebuffer" extends="$unknown"
10258 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
10259 wsmap="suppress"
10260 >
10261 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10262 <desc>Address of the start byte of the frame buffer.</desc>
10263 </attribute>
10264
10265 <attribute name="width" type="unsigned long" readonly="yes">
10266 <desc>Frame buffer width, in pixels.</desc>
10267 </attribute>
10268
10269 <attribute name="height" type="unsigned long" readonly="yes">
10270 <desc>Frame buffer height, in pixels.</desc>
10271 </attribute>
10272
10273 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10274 <desc>
10275 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10276 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10277 are: 8, 15, 16, 24 and 32.
10278 </desc>
10279 </attribute>
10280
10281 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10282 <desc>
10283 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10284 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10285 size of the scan line must be aligned to 32 bits.
10286 </desc>
10287 </attribute>
10288
10289 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10290 <desc>
10291 Frame buffer pixel format. It's either one of the values defined by <link
10292 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10293 <note>
10294 This attribute must never return <link
10295 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10296 <link to="#address"/> points to must be always known.
10297 </note>
10298 </desc>
10299 </attribute>
10300
10301 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10302 <desc>
10303 Defines whether this frame buffer uses the virtual video card's memory
10304 buffer (guest VRAM) directly or not. See <link
10305 to="IFramebuffer::requestResize"/> for more information.
10306 </desc>
10307 </attribute>
10308
10309 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10310 <desc>
10311 Hint from the frame buffer about how much of the standard
10312 screen height it wants to use for itself. This information is
10313 exposed to the guest through the VESA BIOS and VMMDev interface
10314 so that it can use it for determining its video mode table. It
10315 is not guaranteed that the guest respects the value.
10316 </desc>
10317 </attribute>
10318
10319 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10320 <desc>
10321 An alpha-blended overlay which is superposed over the frame buffer.
10322 The initial purpose is to allow the display of icons providing
10323 information about the VM state, including disk activity, in front
10324 ends which do not have other means of doing that. The overlay is
10325 designed to controlled exclusively by IDisplay. It has no locking
10326 of its own, and any changes made to it are not guaranteed to be
10327 visible until the affected portion of IFramebuffer is updated. The
10328 overlay can be created lazily the first time it is requested. This
10329 attribute can also return NULL to signal that the overlay is not
10330 implemented.
10331 </desc>
10332 </attribute>
10333
10334 <attribute name="winId" type="unsigned long long" readonly="yes">
10335 <desc>
10336 Platform-dependent identifier of the window where context of this
10337 frame buffer is drawn, or zero if there's no such window.
10338 </desc>
10339 </attribute>
10340
10341 <method name="lock">
10342 <desc>
10343 Locks the frame buffer.
10344 Gets called by the IDisplay object where this frame buffer is
10345 bound to.
10346 </desc>
10347 </method>
10348
10349 <method name="unlock">
10350 <desc>
10351 Unlocks the frame buffer.
10352 Gets called by the IDisplay object where this frame buffer is
10353 bound to.
10354 </desc>
10355 </method>
10356
10357 <method name="notifyUpdate">
10358 <desc>
10359 Informs about an update.
10360 Gets called by the display object where this buffer is
10361 registered.
10362 </desc>
10363 <param name="x" type="unsigned long" dir="in"/>
10364 <param name="y" type="unsigned long" dir="in"/>
10365 <param name="width" type="unsigned long" dir="in"/>
10366 <param name="height" type="unsigned long" dir="in"/>
10367 <param name="finished" type="boolean" dir="return"/>
10368 </method>
10369
10370 <method name="requestResize">
10371 <desc>
10372 Requests a size and pixel format change.
10373
10374 There are two modes of working with the video buffer of the virtual
10375 machine. The <i>indirect</i> mode implies that the IFramebuffer
10376 implementation allocates a memory buffer for the requested display mode
10377 and provides it to the virtual machine. In <i>direct</i> mode, the
10378 IFramebuffer implementation uses the memory buffer allocated and owned
10379 by the virtual machine. This buffer represents the video memory of the
10380 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10381 usually faster because the implementation gets a raw pointer to the
10382 guest VRAM buffer which it can directly use for visualizing the contents
10383 of the virtual display, as opposed to the indirect mode where the
10384 contents of guest VRAM are copied to the memory buffer provided by
10385 the implementation every time a display update occurs.
10386
10387 It is important to note that the direct mode is really fast only when
10388 the implementation uses the given guest VRAM buffer directly, for
10389 example, by blitting it to the window representing the virtual machine's
10390 display, which saves at least one copy operation comparing to the
10391 indirect mode. However, using the guest VRAM buffer directly is not
10392 always possible: the format and the color depth of this buffer may be
10393 not supported by the target window, or it may be unknown (opaque) as in
10394 case of text or non-linear multi-plane VGA video modes. In this case,
10395 the indirect mode (that is always available) should be used as a
10396 fallback: when the guest VRAM contents are copied to the
10397 implementation-provided memory buffer, color and format conversion is
10398 done automatically by the underlying code.
10399
10400 The @a pixelFormat parameter defines whether the direct mode is
10401 available or not. If @a pixelFormat is <link
10402 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10403 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10404 @a bytesPerLine parameters must be ignored and the implementation must use
10405 the indirect mode (where it provides its own buffer in one of the
10406 supported formats). In all other cases, @a pixelFormat together with
10407 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10408 buffer pointed to by the @a VRAM parameter and the implementation is
10409 free to choose which mode to use. To indicate that this frame buffer uses
10410 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10411 attribute must return <tt>true</tt> and <link to="#address"/> must
10412 return exactly the same address that is passed in the @a VRAM parameter
10413 of this method; otherwise it is assumed that the indirect strategy is
10414 chosen.
10415
10416 The @a width and @a height parameters represent the size of the
10417 requested display mode in both modes. In case of indirect mode, the
10418 provided memory buffer should be big enough to store data of the given
10419 display mode. In case of direct mode, it is guaranteed that the given
10420 @a VRAM buffer contains enough space to represent the display mode of the
10421 given size. Note that this frame buffer's <link to="#width"/> and <link
10422 to="#height"/> attributes must return exactly the same values as
10423 passed to this method after the resize is completed (see below).
10424
10425 The @a finished output parameter determines if the implementation has
10426 finished resizing the frame buffer or not. If, for some reason, the
10427 resize cannot be finished immediately during this call, @a finished
10428 must be set to @c false, and the implementation must call
10429 <link to="IDisplay::resizeCompleted"/> after it has returned from
10430 this method as soon as possible. If @a finished is @c false, the
10431 machine will not call any frame buffer methods until
10432 <link to="IDisplay::resizeCompleted"/> is called.
10433
10434 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10435 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10436 this frame buffer must return exactly the same values as specified in the
10437 parameters of this method, after the resize is completed. If the
10438 indirect mode is chosen, these attributes must return values describing
10439 the format of the implementation's own memory buffer <link
10440 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10441 value must always correlate with <link to="#pixelFormat"/>. Note that
10442 the <link to="#pixelFormat"/> attribute must never return <link
10443 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10444
10445 <note>
10446 This method is called by the IDisplay object under the
10447 <link to="#lock"/> provided by this IFramebuffer
10448 implementation. If this method returns @c false in @a finished, then
10449 this lock is not released until
10450 <link to="IDisplay::resizeCompleted"/> is called.
10451 </note>
10452 </desc>
10453 <param name="screenId" type="unsigned long" dir="in">
10454 <desc>
10455 Logical screen number. Must be used in the corresponding call to
10456 <link to="IDisplay::resizeCompleted"/> if this call is made.
10457 </desc>
10458 </param>
10459 <param name="pixelFormat" type="unsigned long" dir="in">
10460 <desc>
10461 Pixel format of the memory buffer pointed to by @a VRAM.
10462 See also <link to="FramebufferPixelFormat"/>.
10463 </desc>
10464 </param>
10465 <param name="VRAM" type="octet" mod="ptr" dir="in">
10466 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10467 </param>
10468 <param name="bitsPerPixel" type="unsigned long" dir="in">
10469 <desc>Color depth, bits per pixel.</desc>
10470 </param>
10471 <param name="bytesPerLine" type="unsigned long" dir="in">
10472 <desc>Size of one scan line, in bytes.</desc>
10473 </param>
10474 <param name="width" type="unsigned long" dir="in">
10475 <desc>Width of the guest display, in pixels.</desc>
10476 </param>
10477 <param name="height" type="unsigned long" dir="in">
10478 <desc>Height of the guest display, in pixels.</desc>
10479 </param>
10480 <param name="finished" type="boolean" dir="return">
10481 <desc>
10482 Can the VM start using the new frame buffer immediately
10483 after this method returns or it should wait for
10484 <link to="IDisplay::resizeCompleted"/>.
10485 </desc>
10486 </param>
10487 </method>
10488
10489 <method name="operationSupported">
10490 <desc>
10491 Returns whether the given acceleration operation is supported
10492 by the IFramebuffer implementation. If not, the display object
10493 will not attempt to call the corresponding IFramebuffer entry
10494 point. Even if an operation is indicated as supported, the
10495 IFramebuffer implementation always has the option to return non
10496 supported from the corresponding acceleration method in which
10497 case the operation will be performed by the display engine. This
10498 allows for reduced IFramebuffer implementation complexity where
10499 only common cases are handled.
10500 </desc>
10501 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10502 <param name="supported" type="boolean" dir="return"/>
10503 </method>
10504
10505 <method name="videoModeSupported">
10506 <desc>
10507 Returns whether the frame buffer implementation is willing to
10508 support a given video mode. In case it is not able to render
10509 the video mode (or for some reason not willing), it should
10510 return false. Usually this method is called when the guest
10511 asks the VMM device whether a given video mode is supported
10512 so the information returned is directly exposed to the guest.
10513 It is important that this method returns very quickly.
10514 </desc>
10515 <param name="width" type="unsigned long" dir="in"/>
10516 <param name="height" type="unsigned long" dir="in"/>
10517 <param name="bpp" type="unsigned long" dir="in"/>
10518 <param name="supported" type="boolean" dir="return"/>
10519 </method>
10520
10521 <method name="solidFill">
10522 <desc>
10523 Fills the specified rectangle on screen with a solid color.
10524 </desc>
10525 <param name="x" type="unsigned long" dir="in"/>
10526 <param name="y" type="unsigned long" dir="in"/>
10527 <param name="width" type="unsigned long" dir="in"/>
10528 <param name="height" type="unsigned long" dir="in"/>
10529 <param name="color" type="unsigned long" dir="in"/>
10530 <param name="handled" type="boolean" dir="return"/>
10531 </method>
10532
10533 <method name="copyScreenBits">
10534 <desc>
10535 Copies specified rectangle on the screen.
10536 </desc>
10537 <param name="xDst" type="unsigned long" dir="in"/>
10538 <param name="yDst" type="unsigned long" dir="in"/>
10539 <param name="xSrc" type="unsigned long" dir="in"/>
10540 <param name="ySrc" type="unsigned long" dir="in"/>
10541 <param name="width" type="unsigned long" dir="in"/>
10542 <param name="height" type="unsigned long" dir="in"/>
10543 <param name="handled" type="boolean" dir="return"/>
10544 </method>
10545
10546 <method name="getVisibleRegion">
10547 <desc>
10548 Returns the visible region of this frame buffer.
10549
10550 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10551 @a count parameter is ignored and the number of elements necessary to
10552 describe the current visible region is returned in @a countCopied.
10553
10554 If @a rectangles is not <tt>NULL</tt> but @a count is less
10555 than the required number of elements to store region data, the method
10556 will report a failure. If @a count is equal or greater than the
10557 required number of elements, then the actual number of elements copied
10558 to the provided array will be returned in @a countCopied.
10559
10560 <note>
10561 The address of the provided array must be in the process space of
10562 this IFramebuffer object.
10563 </note>
10564 <note>
10565 Method not yet implemented.
10566 </note>
10567 </desc>
10568 <param name="rectangles" type="octet" mod="ptr" dir="in">
10569 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10570 </param>
10571 <param name="count" type="unsigned long" dir="in">
10572 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10573 </param>
10574 <param name="countCopied" type="unsigned long" dir="return">
10575 <desc>Number of elements copied to the @a rectangles array.</desc>
10576 </param>
10577 </method>
10578
10579 <method name="setVisibleRegion">
10580 <desc>
10581 Suggests a new visible region to this frame buffer. This region
10582 represents the area of the VM display which is a union of regions of
10583 all top-level windows of the guest operating system running inside the
10584 VM (if the Guest Additions for this system support this
10585 functionality). This information may be used by the frontends to
10586 implement the seamless desktop integration feature.
10587
10588 <note>
10589 The address of the provided array must be in the process space of
10590 this IFramebuffer object.
10591 </note>
10592 <note>
10593 The IFramebuffer implementation must make a copy of the provided
10594 array of rectangles.
10595 </note>
10596 <note>
10597 Method not yet implemented.
10598 </note>
10599 </desc>
10600 <param name="rectangles" type="octet" mod="ptr" dir="in">
10601 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10602 </param>
10603 <param name="count" type="unsigned long" dir="in">
10604 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10605 </param>
10606 </method>
10607
10608 </interface>
10609
10610 <interface
10611 name="IFramebufferOverlay" extends="IFramebuffer"
10612 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10613 wsmap="suppress"
10614 >
10615 <desc>
10616 The IFramebufferOverlay interface represents an alpha blended overlay
10617 for displaying status icons above an IFramebuffer. It is always created
10618 not visible, so that it must be explicitly shown. It only covers a
10619 portion of the IFramebuffer, determined by its width, height and
10620 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10621 that order) format, and may be written to directly. Do re-read the
10622 width though, after setting it, as it may be adjusted (increased) to
10623 make it more suitable for the front end.
10624 </desc>
10625 <attribute name="x" type="unsigned long" readonly="yes">
10626 <desc>X position of the overlay, relative to the frame buffer.</desc>
10627 </attribute>
10628
10629 <attribute name="y" type="unsigned long" readonly="yes">
10630 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10631 </attribute>
10632
10633 <attribute name="visible" type="boolean" readonly="no">
10634 <desc>
10635 Whether the overlay is currently visible.
10636 </desc>
10637 </attribute>
10638
10639 <attribute name="alpha" type="unsigned long" readonly="no">
10640 <desc>
10641 The global alpha value for the overlay. This may or may not be
10642 supported by a given front end.
10643 </desc>
10644 </attribute>
10645
10646 <method name="move">
10647 <desc>
10648 Changes the overlay's position relative to the IFramebuffer.
10649 </desc>
10650 <param name="x" type="unsigned long" dir="in"/>
10651 <param name="y" type="unsigned long" dir="in"/>
10652 </method>
10653
10654 </interface>
10655
10656 <interface
10657 name="IDisplay" extends="$unknown"
10658 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10659 wsmap="suppress"
10660 >
10661 <desc>
10662 The IDisplay interface represents the virtual machine's display.
10663
10664 The object implementing this interface is contained in each
10665 <link to="IConsole::display"/> attribute and represents the visual
10666 output of the virtual machine.
10667
10668 The virtual display supports pluggable output targets represented by the
10669 IFramebuffer interface. Examples of the output target are a window on
10670 the host computer or an RDP session's display on a remote computer.
10671 </desc>
10672 <attribute name="width" type="unsigned long" readonly="yes">
10673 <desc>Current display width.</desc>
10674 </attribute>
10675
10676 <attribute name="height" type="unsigned long" readonly="yes">
10677 <desc>Current display height.</desc>
10678 </attribute>
10679
10680 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10681 <desc>
10682 Current guest display color depth. Note that this may differ
10683 from <link to="IFramebuffer::bitsPerPixel"/>.
10684 </desc>
10685 </attribute>
10686
10687 <method name="setupInternalFramebuffer">
10688 <desc>
10689 Prepares an internally managed frame buffer.
10690 </desc>
10691 <param name="depth" type="unsigned long" dir="in"/>
10692 </method>
10693
10694 <method name="lockFramebuffer">
10695 <desc>
10696 Requests access to the internal frame buffer.
10697
10698 <result name="VBOX_E_NOT_SUPPORTED">
10699 Attempt to lock a non-internal frame buffer.
10700 </result>
10701
10702 </desc>
10703 <param name="address" type="octet" mod="ptr" dir="return"/>
10704 </method>
10705
10706 <method name="unlockFramebuffer">
10707 <desc>
10708 Releases access to the internal frame buffer.
10709
10710 <result name="VBOX_E_NOT_SUPPORTED">
10711 Attempt to unlock a non-internal frame buffer.
10712 </result>
10713
10714 </desc>
10715 </method>
10716
10717 <method name="registerExternalFramebuffer">
10718 <desc>
10719 Registers an external frame buffer.
10720 </desc>
10721 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10722 </method>
10723
10724 <method name="setFramebuffer">
10725 <desc>
10726 Sets the framebuffer for given screen.
10727 </desc>
10728 <param name="screenId" type="unsigned long" dir="in"/>
10729 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10730 </method>
10731
10732 <method name="getFramebuffer">
10733 <desc>
10734 Queries the framebuffer for given screen.
10735 </desc>
10736 <param name="screenId" type="unsigned long" dir="in"/>
10737 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10738 <param name="xOrigin" type="long" dir="out"/>
10739 <param name="yOrigin" type="long" dir="out"/>
10740 </method>
10741
10742 <method name="setVideoModeHint">
10743 <desc>
10744 Asks VirtualBox to request the given video mode from
10745 the guest. This is just a hint and it cannot be guaranteed
10746 that the requested resolution will be used. Guest Additions
10747 are required for the request to be seen by guests. The caller
10748 should issue the request and wait for a resolution change and
10749 after a timeout retry.
10750
10751 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10752 parameters means that the corresponding values should be taken from the
10753 current video mode (i.e. left unchanged).
10754
10755 If the guest OS supports multi-monitor configuration then the @a display
10756 parameter specifies the number of the guest display to send the hint to:
10757 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10758 so on. If the multi-monitor configuration is not supported, @a display
10759 must be <tt>0</tt>.
10760
10761 <result name="E_INVALIDARG">
10762 The @a display is not associated with any monitor.
10763 </result>
10764
10765 </desc>
10766 <param name="width" type="unsigned long" dir="in"/>
10767 <param name="height" type="unsigned long" dir="in"/>
10768 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10769 <param name="display" type="unsigned long" dir="in"/>
10770 </method>
10771
10772 <method name="setSeamlessMode">
10773 <desc>
10774 Enables or disables seamless guest display rendering (seamless desktop
10775 integration) mode.
10776 <note>
10777 Calling this method has no effect if <link
10778 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10779 </note>
10780 </desc>
10781 <param name="enabled" type="boolean" dir="in"/>
10782 </method>
10783
10784 <method name="takeScreenShot">
10785 <desc>
10786 Takes a screen shot of the requested size and copies it to the
10787 32-bpp buffer allocated by the caller.
10788
10789 <result name="E_NOTIMPL">
10790 Feature not implemented.
10791 </result>
10792 <result name="VBOX_E_IPRT_ERROR">
10793 Could not take a screenshot.
10794 </result>
10795
10796 </desc>
10797 <param name="address" type="octet" mod="ptr" dir="in"/>
10798 <param name="width" type="unsigned long" dir="in"/>
10799 <param name="height" type="unsigned long" dir="in"/>
10800 </method>
10801
10802 <method name="drawToScreen">
10803 <desc>
10804 Draws a 32-bpp image of the specified size from the given buffer
10805 to the given point on the VM display.
10806
10807 <result name="E_NOTIMPL">
10808 Feature not implemented.
10809 </result>
10810 <result name="VBOX_E_IPRT_ERROR">
10811 Could not draw to screen.
10812 </result>
10813
10814 </desc>
10815 <param name="address" type="octet" mod="ptr" dir="in"/>
10816 <param name="x" type="unsigned long" dir="in"/>
10817 <param name="y" type="unsigned long" dir="in"/>
10818 <param name="width" type="unsigned long" dir="in"/>
10819 <param name="height" type="unsigned long" dir="in"/>
10820 </method>
10821
10822 <method name="invalidateAndUpdate">
10823 <desc>
10824 Does a full invalidation of the VM display and instructs the VM
10825 to update it.
10826
10827 <result name="VBOX_E_IPRT_ERROR">
10828 Could not invalidate and update screen.
10829 </result>
10830
10831 </desc>
10832 </method>
10833
10834 <method name="resizeCompleted">
10835 <desc>
10836 Signals that a framebuffer has completed the resize operation.
10837
10838 <result name="VBOX_E_NOT_SUPPORTED">
10839 Operation only valid for external frame buffers.
10840 </result>
10841
10842 </desc>
10843 <param name="screenId" type="unsigned long" dir="in"/>
10844 </method>
10845
10846 <method name="updateCompleted">
10847 <desc>
10848 Signals that a framebuffer has completed the update operation.
10849
10850 <result name="VBOX_E_NOT_SUPPORTED">
10851 Operation only valid for external frame buffers.
10852 </result>
10853
10854 </desc>
10855 </method>
10856
10857 </interface>
10858
10859 <!--
10860 // INetworkAdapter
10861 /////////////////////////////////////////////////////////////////////////
10862 -->
10863
10864 <enum
10865 name="NetworkAttachmentType"
10866 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10867 >
10868 <desc>
10869 Network attachment type.
10870 </desc>
10871
10872 <const name="Null" value="0">
10873 <desc>Null value, also means "not attached".</desc>
10874 </const>
10875 <const name="NAT" value="1"/>
10876 <const name="Bridged" value="2"/>
10877 <const name="Internal" value="3"/>
10878 <const name="HostOnly" value="4"/>
10879 </enum>
10880
10881 <enum
10882 name="NetworkAdapterType"
10883 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10884 >
10885 <desc>
10886 Network adapter type.
10887 </desc>
10888
10889 <const name="Null" value="0">
10890 <desc>Null value (never used by the API).</desc>
10891 </const>
10892 <const name="Am79C970A" value="1"/>
10893 <const name="Am79C973" value="2"/>
10894 <const name="I82540EM" value="3"/>
10895 <const name="I82543GC" value="4"/>
10896 </enum>
10897
10898 <interface
10899 name="INetworkAdapter" extends="$unknown"
10900 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10901 wsmap="managed"
10902 >
10903 <desc>
10904 Represents a virtual network adapter that is attached to a virtual machine.
10905 Each virtual machine has a fixed number of network adapter slots with one
10906 instance of this attached to each of them. Call
10907 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10908 is attached to a given slot in a given machine.
10909
10910 Each network adapter can be in one of five attachment modes, which are
10911 represented by the <link to="NetworkAttachmentType" /> enumeration;
10912 see the <link to="#attachmentType" /> attribute.
10913 </desc>
10914
10915 <attribute name="adapterType" type="NetworkAdapterType">
10916 <desc>
10917 Type of the virtual network adapter. Depending on this value,
10918 VirtualBox will provide a different virtual network hardware
10919 to the guest.
10920 </desc>
10921 </attribute>
10922
10923 <attribute name="slot" type="unsigned long" readonly="yes">
10924 <desc>
10925 Slot number this adapter is plugged into. Corresponds to
10926 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10927 to obtain this instance.
10928 </desc>
10929 </attribute>
10930
10931 <attribute name="enabled" type="boolean">
10932 <desc>
10933 Flag whether the network adapter is present in the
10934 guest system. If disabled, the virtual guest hardware will
10935 not contain this network adapter. Can only be changed when
10936 the VM is not running.
10937 </desc>
10938 </attribute>
10939
10940 <attribute name="MACAddress" type="wstring">
10941 <desc>
10942 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10943 it to NULL, VirtualBox will generate a unique MAC address.
10944 </desc>
10945 </attribute>
10946
10947 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10948
10949 <attribute name="hostInterface" type="wstring">
10950 <desc>
10951 Name of the host network interface the VM is attached to.
10952 </desc>
10953 </attribute>
10954
10955 <attribute name="internalNetwork" type="wstring">
10956 <desc>
10957 Name of the internal network the VM is attached to.
10958 </desc>
10959 </attribute>
10960
10961 <attribute name="NATNetwork" type="wstring">
10962 <desc>
10963 Name of the NAT network the VM is attached to.
10964 </desc>
10965 </attribute>
10966
10967 <attribute name="cableConnected" type="boolean">
10968 <desc>
10969 Flag whether the adapter reports the cable as connected or not.
10970 It can be used to report offline situations to a VM.
10971 </desc>
10972 </attribute>
10973
10974 <attribute name="lineSpeed" type="unsigned long">
10975 <desc>
10976 Line speed reported by custom drivers, in units of 1 kbps.
10977 </desc>
10978 </attribute>
10979
10980 <attribute name="traceEnabled" type="boolean">
10981 <desc>
10982 Flag whether network traffic from/to the network card should be traced.
10983 Can only be toggled when the VM is turned off.
10984 </desc>
10985 </attribute>
10986
10987 <attribute name="traceFile" type="wstring">
10988 <desc>
10989 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10990 will be used.
10991 </desc>
10992 </attribute>
10993
10994 <method name="attachToNAT">
10995 <desc>
10996 Attach the network adapter to the Network Address Translation (NAT) interface.
10997 </desc>
10998 </method>
10999
11000 <method name="attachToBridgedInterface">
11001 <desc>
11002 Attach the network adapter to a bridged host interface.
11003 </desc>
11004 </method>
11005
11006 <method name="attachToInternalNetwork">
11007 <desc>
11008 Attach the network adapter to an internal network.
11009 </desc>
11010 </method>
11011
11012 <method name="attachToHostOnlyInterface">
11013 <desc>
11014 Attach the network adapter to the host-only network.
11015 </desc>
11016 </method>
11017
11018 <method name="detach">
11019 <desc>
11020 Detach the network adapter
11021 </desc>
11022 </method>
11023 </interface>
11024
11025
11026 <!--
11027 // ISerialPort
11028 /////////////////////////////////////////////////////////////////////////
11029 -->
11030
11031 <enum
11032 name="PortMode"
11033 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
11034 >
11035 <desc>
11036 The PortMode enumeration represents possible communication modes for
11037 the virtual serial port device.
11038 </desc>
11039
11040 <const name="Disconnected" value="0">
11041 <desc>Virtual device is not attached to any real host device.</desc>
11042 </const>
11043 <const name="HostPipe" value="1">
11044 <desc>Virtual device is attached to a host pipe.</desc>
11045 </const>
11046 <const name="HostDevice" value="2">
11047 <desc>Virtual device is attached to a host device.</desc>
11048 </const>
11049 </enum>
11050
11051 <interface
11052 name="ISerialPort" extends="$unknown"
11053 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11054 wsmap="managed"
11055 >
11056
11057 <desc>
11058 The ISerialPort interface represents the virtual serial port device.
11059
11060 The virtual serial port device acts like an ordinary serial port
11061 inside the virtual machine. This device communicates to the real
11062 serial port hardware in one of two modes: host pipe or host device.
11063
11064 In host pipe mode, the #path attribute specifies the path to the pipe on
11065 the host computer that represents a serial port. The #server attribute
11066 determines if this pipe is created by the virtual machine process at
11067 machine startup or it must already exist before starting machine
11068 execution.
11069
11070 In host device mode, the #path attribute specifies the name of the
11071 serial port device on the host computer.
11072
11073 There is also a third communication mode: the disconnected mode. In this
11074 mode, the guest OS running inside the virtual machine will be able to
11075 detect the serial port, but all port write operations will be discarded
11076 and all port read operations will return no data.
11077
11078 <see>IMachine::getSerialPort</see>
11079 </desc>
11080
11081 <attribute name="slot" type="unsigned long" readonly="yes">
11082 <desc>
11083 Slot number this serial port is plugged into. Corresponds to
11084 the value you pass to <link to="IMachine::getSerialPort"/>
11085 to obtain this instance.
11086 </desc>
11087 </attribute>
11088
11089 <attribute name="enabled" type="boolean">
11090 <desc>
11091 Flag whether the serial port is enabled. If disabled,
11092 the serial port will not be reported to the guest OS.
11093 </desc>
11094 </attribute>
11095
11096 <attribute name="IOBase" type="unsigned long">
11097 <desc>Base I/O address of the serial port.</desc>
11098 </attribute>
11099
11100 <attribute name="IRQ" type="unsigned long">
11101 <desc>IRQ number of the serial port.</desc>
11102 </attribute>
11103
11104 <attribute name="hostMode" type="PortMode">
11105 <desc>
11106 How is this port connected to the host.
11107 <note>
11108 Changing this attribute may fail if the conditions for
11109 <link to="#path"/> are not met.
11110 </note>
11111 </desc>
11112 </attribute>
11113
11114 <attribute name="server" type="boolean">
11115 <desc>
11116 Flag whether this serial port acts as a server (creates a new pipe on
11117 the host) or as a client (uses the existing pipe). This attribute is
11118 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11119 </desc>
11120 </attribute>
11121
11122 <attribute name="path" type="wstring">
11123 <desc>
11124 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
11125 PortMode_HostPipe, or the host serial device name when
11126 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
11127 cases, setting a @c null or an empty string as the attribute's value
11128 will result into an error. Otherwise, the value of this property is
11129 ignored.
11130 </desc>
11131 </attribute>
11132
11133 </interface>
11134
11135 <!--
11136 // IParallelPort
11137 /////////////////////////////////////////////////////////////////////////
11138 -->
11139
11140 <interface
11141 name="IParallelPort" extends="$unknown"
11142 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11143 wsmap="managed"
11144 >
11145
11146 <desc>
11147 The IParallelPort interface represents the virtual parallel port device.
11148
11149 The virtual parallel port device acts like an ordinary parallel port
11150 inside the virtual machine. This device communicates to the real
11151 parallel port hardware using the name of the parallel device on the host
11152 computer specified in the #path attribute.
11153
11154 Each virtual parallel port device is assigned a base I/O address and an
11155 IRQ number that will be reported to the guest operating system and used
11156 to operate the given parallel port from within the virtual machine.
11157
11158 <see>IMachine::getParallelPort</see>
11159 </desc>
11160
11161 <attribute name="slot" type="unsigned long" readonly="yes">
11162 <desc>
11163 Slot number this parallel port is plugged into. Corresponds to
11164 the value you pass to <link to="IMachine::getParallelPort"/>
11165 to obtain this instance.
11166 </desc>
11167 </attribute>
11168
11169 <attribute name="enabled" type="boolean">
11170 <desc>
11171 Flag whether the parallel port is enabled. If disabled,
11172 the parallel port will not be reported to the guest OS.
11173 </desc>
11174 </attribute>
11175
11176 <attribute name="IOBase" type="unsigned long">
11177 <desc>Base I/O address of the parallel port.</desc>
11178 </attribute>
11179
11180 <attribute name="IRQ" type="unsigned long">
11181 <desc>IRQ number of the parallel port.</desc>
11182 </attribute>
11183
11184 <attribute name="path" type="wstring">
11185 <desc>
11186 Host parallel device name. If this parallel port is enabled, setting a
11187 @c null or an empty string as this attribute's value will result into
11188 an error.
11189 </desc>
11190 </attribute>
11191
11192 </interface>
11193
11194
11195 <!--
11196 // IMachineDebugger
11197 /////////////////////////////////////////////////////////////////////////
11198 -->
11199
11200 <interface
11201 name="IMachineDebugger" extends="$unknown"
11202 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11203 wsmap="suppress"
11204 >
11205 <method name="resetStats">
11206 <desc>
11207 Reset VM statistics.
11208 </desc>
11209 <param name="pattern" type="wstring" dir="in">
11210 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11211 </param>
11212 </method>
11213
11214 <method name="dumpStats">
11215 <desc>
11216 Dumps VM statistics.
11217 </desc>
11218 <param name="pattern" type="wstring" dir="in">
11219 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11220 </param>
11221 </method>
11222
11223 <method name="getStats">
11224 <desc>
11225 Get the VM statistics in a XMLish format.
11226 </desc>
11227 <param name="pattern" type="wstring" dir="in">
11228 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11229 </param>
11230 <param name="withDescriptions" type="boolean" dir="in">
11231 <desc>Whether to include the descriptions.</desc>
11232 </param>
11233 <param name="stats" type="wstring" dir="out">
11234 <desc>The XML document containing the statistics.</desc>
11235 </param>
11236 </method>
11237
11238 <method name="injectNMI">
11239 <desc>
11240 Inject an NMI into a running VT-x/AMD-V VM.
11241 </desc>
11242 </method>
11243
11244 <attribute name="singlestep" type="boolean">
11245 <desc>Switch for enabling singlestepping.</desc>
11246 </attribute>
11247
11248 <attribute name="recompileUser" type="boolean">
11249 <desc>Switch for forcing code recompilation for user mode code.</desc>
11250 </attribute>
11251
11252 <attribute name="recompileSupervisor" type="boolean">
11253 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11254 </attribute>
11255
11256 <attribute name="PATMEnabled" type="boolean">
11257 <desc>Switch for enabling and disabling the PATM component.</desc>
11258 </attribute>
11259
11260 <attribute name="CSAMEnabled" type="boolean">
11261 <desc>Switch for enabling and disabling the CSAM component.</desc>
11262 </attribute>
11263
11264 <attribute name="logEnabled" type="boolean">
11265 <desc>Switch for enabling and disabling logging.</desc>
11266 </attribute>
11267
11268 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11269 <desc>
11270 Flag indicating whether the VM is currently making use of CPU hardware
11271 virtualization extensions.
11272 </desc>
11273 </attribute>
11274
11275 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11276 <desc>
11277 Flag indicating whether the VM is currently making use of the nested paging
11278 CPU hardware virtualization extension.
11279 </desc>
11280 </attribute>
11281
11282 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11283 <desc>
11284 Flag indicating whether the VM is currently making use of the VPID
11285 VT-x extension.
11286 </desc>
11287 </attribute>
11288
11289 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11290 <desc>
11291 Flag indicating whether the VM is currently making use of the Physical
11292 Address Extension CPU feature.
11293 </desc>
11294 </attribute>
11295
11296 <attribute name="virtualTimeRate" type="unsigned long">
11297 <desc>
11298 The rate at which the virtual time runs expressed as a percentage.
11299 The accepted range is 2% to 20000%.
11300 </desc>
11301 </attribute>
11302
11303 <!-- @todo method for setting log flags, groups and destination! -->
11304
11305 <attribute name="VM" type="unsigned long long" readonly="yes">
11306 <desc>
11307 Gets the VM handle. This is only for internal use while
11308 we carve the details of this interface.
11309 </desc>
11310 </attribute>
11311
11312 </interface>
11313
11314 <!--
11315 // IUSBController
11316 /////////////////////////////////////////////////////////////////////////
11317 -->
11318
11319 <interface
11320 name="IUSBController" extends="$unknown"
11321 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11322 wsmap="managed"
11323 >
11324 <attribute name="enabled" type="boolean">
11325 <desc>
11326 Flag whether the USB controller is present in the
11327 guest system. If disabled, the virtual guest hardware will
11328 not contain any USB controller. Can only be changed when
11329 the VM is powered off.
11330 </desc>
11331 </attribute>
11332
11333 <attribute name="enabledEhci" type="boolean">
11334 <desc>
11335 Flag whether the USB EHCI controller is present in the
11336 guest system. If disabled, the virtual guest hardware will
11337 not contain a USB EHCI controller. Can only be changed when
11338 the VM is powered off.
11339 </desc>
11340 </attribute>
11341
11342 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11343 <desc>
11344 USB standard version which the controller implements.
11345 This is a BCD which means that the major version is in the
11346 high byte and minor version is in the low byte.
11347 </desc>
11348 </attribute>
11349
11350 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11351 <desc>
11352 List of USB device filters associated with the machine.
11353
11354 If the machine is currently running, these filters are activated
11355 every time a new (supported) USB device is attached to the host
11356 computer that was not ignored by global filters
11357 (<link to="IHost::USBDeviceFilters"/>).
11358
11359 These filters are also activated when the machine is powered up.
11360 They are run against a list of all currently available USB
11361 devices (in states
11362 <link to="USBDeviceState_Available"/>,
11363 <link to="USBDeviceState_Busy"/>,
11364 <link to="USBDeviceState_Held"/>) that were not previously
11365 ignored by global filters.
11366
11367 If at least one filter matches the USB device in question, this
11368 device is automatically captured (attached to) the virtual USB
11369 controller of this machine.
11370
11371 <see>IUSBDeviceFilter, ::IUSBController</see>
11372 </desc>
11373 </attribute>
11374
11375 <method name="createDeviceFilter">
11376 <desc>
11377 Creates a new USB device filter. All attributes except
11378 the filter name are set to <tt>null</tt> (any match),
11379 <i>active</i> is <tt>false</tt> (the filter is not active).
11380
11381 The created filter can then be added to the list of filters using
11382 <link to="#insertDeviceFilter"/>.
11383
11384 <result name="VBOX_E_INVALID_VM_STATE">
11385 The virtual machine is not mutable.
11386 </result>
11387
11388 <see>#deviceFilters</see>
11389 </desc>
11390 <param name="name" type="wstring" dir="in">
11391 <desc>
11392 Filter name. See <link to="IUSBDeviceFilter::name"/>
11393 for more info.
11394 </desc>
11395 </param>
11396 <param name="filter" type="IUSBDeviceFilter" dir="return">
11397 <desc>Created filter object.</desc>
11398 </param>
11399 </method>
11400
11401 <method name="insertDeviceFilter">
11402 <desc>
11403 Inserts the given USB device to the specified position
11404 in the list of filters.
11405
11406 Positions are numbered starting from <tt>0</tt>. If the specified
11407 position is equal to or greater than the number of elements in
11408 the list, the filter is added to the end of the collection.
11409
11410 <note>
11411 Duplicates are not allowed, so an attempt to insert a
11412 filter that is already in the collection, will return an
11413 error.
11414 </note>
11415
11416 <result name="VBOX_E_INVALID_VM_STATE">
11417 Virtual machine is not mutable.
11418 </result>
11419 <result name="E_INVALIDARG">
11420 USB device filter not created within this VirtualBox instance.
11421 </result>
11422 <result name="VBOX_E_INVALID_OBJECT_STATE">
11423 USB device filter already in list.
11424 </result>
11425
11426 <see>#deviceFilters</see>
11427 </desc>
11428 <param name="position" type="unsigned long" dir="in">
11429 <desc>Position to insert the filter to.</desc>
11430 </param>
11431 <param name="filter" type="IUSBDeviceFilter" dir="in">
11432 <desc>USB device filter to insert.</desc>
11433 </param>
11434 </method>
11435
11436 <method name="removeDeviceFilter">
11437 <desc>
11438 Removes a USB device filter from the specified position in the
11439 list of filters.
11440
11441 Positions are numbered starting from <tt>0</tt>. Specifying a
11442 position equal to or greater than the number of elements in
11443 the list will produce an error.
11444
11445 <see>#deviceFilters</see>
11446
11447 <result name="VBOX_E_INVALID_VM_STATE">
11448 Virtual machine is not mutable.
11449 </result>
11450 <result name="E_INVALIDARG">
11451 USB device filter list empty or invalid @a position.
11452 </result>
11453
11454 </desc>
11455 <param name="position" type="unsigned long" dir="in">
11456 <desc>Position to remove the filter from.</desc>
11457 </param>
11458 <param name="filter" type="IUSBDeviceFilter" dir="return">
11459 <desc>Removed USB device filter.</desc>
11460 </param>
11461 </method>
11462
11463 </interface>
11464
11465
11466 <!--
11467 // IUSBDevice
11468 /////////////////////////////////////////////////////////////////////////
11469 -->
11470
11471 <interface
11472 name="IUSBDevice" extends="$unknown"
11473 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11474 wsmap="managed"
11475 >
11476 <desc>
11477 The IUSBDevice interface represents a virtual USB device attached to the
11478 virtual machine.
11479
11480 A collection of objects implementing this interface is stored in the
11481 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11482 attached to a running virtual machine's USB controller.
11483 </desc>
11484
11485 <attribute name="id" type="uuid" readonly="yes">
11486 <desc>
11487 Unique USB device ID. This ID is built from #vendorId,
11488 #productId, #revision and #serialNumber.
11489 </desc>
11490 </attribute>
11491
11492 <attribute name="vendorId" type="unsigned short" readonly="yes">
11493 <desc>Vendor ID.</desc>
11494 </attribute>
11495
11496 <attribute name="productId" type="unsigned short" readonly="yes">
11497 <desc>Product ID.</desc>
11498 </attribute>
11499
11500 <attribute name="revision" type="unsigned short" readonly="yes">
11501 <desc>
11502 Product revision number. This is a packed BCD represented as
11503 unsigned short. The high byte is the integer part and the low
11504 byte is the decimal.
11505 </desc>
11506 </attribute>
11507
11508 <attribute name="manufacturer" type="wstring" readonly="yes">
11509 <desc>Manufacturer string.</desc>
11510 </attribute>
11511
11512 <attribute name="product" type="wstring" readonly="yes">
11513 <desc>Product string.</desc>
11514 </attribute>
11515
11516 <attribute name="serialNumber" type="wstring" readonly="yes">
11517 <desc>Serial number string.</desc>
11518 </attribute>
11519
11520 <attribute name="address" type="wstring" readonly="yes">
11521 <desc>Host specific address of the device.</desc>
11522 </attribute>
11523
11524 <attribute name="port" type="unsigned short" readonly="yes">
11525 <desc>
11526 Host USB port number the device is physically
11527 connected to.
11528 </desc>
11529 </attribute>
11530
11531 <attribute name="version" type="unsigned short" readonly="yes">
11532 <desc>
11533 The major USB version of the device - 1 or 2.
11534 </desc>
11535 </attribute>
11536
11537 <attribute name="portVersion" type="unsigned short" readonly="yes">
11538 <desc>
11539 The major USB version of the host USB port the device is
11540 physically connected to - 1 or 2. For devices not connected to
11541 anything this will have the same value as the version attribute.
11542 </desc>
11543 </attribute>
11544
11545 <attribute name="remote" type="boolean" readonly="yes">
11546 <desc>
11547 Whether the device is physically connected to a remote VRDP
11548 client or to a local host machine.
11549 </desc>
11550 </attribute>
11551
11552 </interface>
11553
11554
11555 <!--
11556 // IUSBDeviceFilter
11557 /////////////////////////////////////////////////////////////////////////
11558 -->
11559
11560 <interface
11561 name="IUSBDeviceFilter" extends="$unknown"
11562 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11563 wsmap="managed"
11564 >
11565 <desc>
11566 The IUSBDeviceFilter interface represents an USB device filter used
11567 to perform actions on a group of USB devices.
11568
11569 This type of filters is used by running virtual machines to
11570 automatically capture selected USB devices once they are physically
11571 attached to the host computer.
11572
11573 A USB device is matched to the given device filter if and only if all
11574 attributes of the device match the corresponding attributes of the
11575 filter (that is, attributes are joined together using the logical AND
11576 operation). On the other hand, all together, filters in the list of
11577 filters carry the semantics of the logical OR operation. So if it is
11578 desirable to create a match like "this vendor id OR this product id",
11579 one needs to create two filters and specify "any match" (see below)
11580 for unused attributes.
11581
11582 All filter attributes used for matching are strings. Each string
11583 is an expression representing a set of values of the corresponding
11584 device attribute, that will match the given filter. Currently, the
11585 following filtering expressions are supported:
11586
11587 <ul>
11588 <li><i>Interval filters</i>. Used to specify valid intervals for
11589 integer device attributes (Vendor ID, Product ID and Revision).
11590 The format of the string is:
11591
11592 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11593
11594 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11595 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11596 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11597 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11598 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11599 possible integer is assumed.
11600 </li>
11601 <li><i>Boolean filters</i>. Used to specify acceptable values for
11602 boolean device attributes. The format of the string is:
11603
11604 <tt>true|false|yes|no|0|1</tt>
11605
11606 </li>
11607 <li><i>Exact match</i>. Used to specify a single value for the given
11608 device attribute. Any string that doesn't start with <tt>int:</tt>
11609 represents the exact match. String device attributes are compared to
11610 this string including case of symbols. Integer attributes are first
11611 converted to a string (see individual filter attributes) and then
11612 compared ignoring case.
11613
11614 </li>
11615 <li><i>Any match</i>. Any value of the corresponding device attribute
11616 will match the given filter. An empty or <tt>null</tt> string is
11617 used to construct this type of filtering expressions.
11618
11619 </li>
11620 </ul>
11621
11622 <note>
11623 On the Windows host platform, interval filters are not currently
11624 available. Also all string filter attributes
11625 (<link to="#manufacturer"/>, <link to="#product"/>,
11626 <link to="#serialNumber"/>) are ignored, so they behave as
11627 <i>any match</i> no matter what string expression is specified.
11628 </note>
11629
11630 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11631 </desc>
11632
11633 <attribute name="name" type="wstring">
11634 <desc>
11635 Visible name for this filter.
11636 This name is used to visually distinguish one filter from another,
11637 so it can neither be <tt>null</tt> nor an empty string.
11638 </desc>
11639 </attribute>
11640
11641 <attribute name="active" type="boolean">
11642 <desc>Whether this filter active or has been temporarily disabled.</desc>
11643 </attribute>
11644
11645 <attribute name="vendorId" type="wstring">
11646 <desc>
11647 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11648 The string representation for the <i>exact matching</i>
11649 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11650 (including leading zeroes).
11651 </desc>
11652 </attribute>
11653
11654 <attribute name="productId" type="wstring">
11655 <desc>
11656 <link to="IUSBDevice::productId">Product ID</link> filter.
11657 The string representation for the <i>exact matching</i>
11658 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11659 (including leading zeroes).
11660 </desc>
11661 </attribute>
11662
11663 <attribute name="revision" type="wstring">
11664 <desc>
11665 <link to="IUSBDevice::productId">Product revision number</link>
11666 filter. The string representation for the <i>exact matching</i>
11667 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11668 of the integer part of the revision, and <tt>F</tt> is the
11669 decimal digit of its fractional part (including leading and
11670 trailing zeros).
11671 Note that for interval filters, it's best to use the hexadecimal
11672 form, because the revision is stored as a 16 bit packed BCD value;
11673 so the expression <tt>int:0x0100-0x0199</tt> will match any
11674 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11675 </desc>
11676 </attribute>
11677
11678 <attribute name="manufacturer" type="wstring">
11679 <desc>
11680 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11681 </desc>
11682 </attribute>
11683
11684 <attribute name="product" type="wstring">
11685 <desc>
11686 <link to="IUSBDevice::product">Product</link> filter.
11687 </desc>
11688 </attribute>
11689
11690 <attribute name="serialNumber" type="wstring">
11691 <desc>
11692 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11693 </desc>
11694 </attribute>
11695
11696 <attribute name="port" type="wstring">
11697 <desc>
11698 <link to="IUSBDevice::port">Host USB port</link> filter.
11699 </desc>
11700 </attribute>
11701
11702 <attribute name="remote" type="wstring">
11703 <desc>
11704 <link to="IUSBDevice::remote">Remote state</link> filter.
11705 <note>
11706 This filter makes sense only for machine USB filters,
11707 i.e. it is ignored by IHostUSBDeviceFilter objects.
11708 </note>
11709 </desc>
11710 </attribute>
11711
11712 <attribute name="maskedInterfaces" type="unsigned long">
11713 <desc>
11714 This is an advanced option for hiding one or more USB interfaces
11715 from the guest. The value is a bit mask where the bits that are set
11716 means the corresponding USB interface should be hidden, masked off
11717 if you like.
11718 This feature only works on Linux hosts.
11719 </desc>
11720 </attribute>
11721
11722 </interface>
11723
11724
11725 <!--
11726 // IHostUSBDevice
11727 /////////////////////////////////////////////////////////////////////////
11728 -->
11729
11730 <enum
11731 name="USBDeviceState"
11732 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11733 >
11734 <desc>
11735 USB device state. This enumeration represents all possible states
11736 of the USB device physically attached to the host computer regarding
11737 its state on the host computer and availability to guest computers
11738 (all currently running virtual machines).
11739
11740 Once a supported USB device is attached to the host, global USB
11741 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11742 either ignore the device, or put it to USBDeviceState_Held state, or do
11743 nothing. Unless the device is ignored by global filters, filters of all
11744 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11745 activated that can put it to USBDeviceState_Captured state.
11746
11747 If the device was ignored by global filters, or didn't match
11748 any filters at all (including guest ones), it is handled by the host
11749 in a normal way. In this case, the device state is determined by
11750 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11751 or USBDeviceState_Available, depending on the current device usage.
11752
11753 Besides auto-capturing based on filters, the device can be manually
11754 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11755 state is USBDeviceState_Busy, USBDeviceState_Available or
11756 USBDeviceState_Held.
11757
11758 <note>
11759 Due to differences in USB stack implementations in Linux and Win32,
11760 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11761 only to the Linux version of the product. This also means that (<link
11762 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11763 device state is USBDeviceState_Held.
11764 </note>
11765
11766 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11767 </desc>
11768
11769 <const name="NotSupported" value="0">
11770 <desc>
11771 Not supported by the VirtualBox server, not available to guests.
11772 </desc>
11773 </const>
11774 <const name="Unavailable" value="1">
11775 <desc>
11776 Being used by the host computer exclusively,
11777 not available to guests.
11778 </desc>
11779 </const>
11780 <const name="Busy" value="2">
11781 <desc>
11782 Being used by the host computer, potentially available to guests.
11783 </desc>
11784 </const>
11785 <const name="Available" value="3">
11786 <desc>
11787 Not used by the host computer, available to guests (the host computer
11788 can also start using the device at any time).
11789 </desc>
11790 </const>
11791 <const name="Held" value="4">
11792 <desc>
11793 Held by the VirtualBox server (ignored by the host computer),
11794 available to guests.
11795 </desc>
11796 </const>
11797 <const name="Captured" value="5">
11798 <desc>
11799 Captured by one of the guest computers, not available
11800 to anybody else.
11801 </desc>
11802 </const>
11803 </enum>
11804
11805 <interface
11806 name="IHostUSBDevice" extends="IUSBDevice"
11807 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11808 wsmap="managed"
11809 >
11810 <desc>
11811 The IHostUSBDevice interface represents a physical USB device attached
11812 to the host computer.
11813
11814 Besides properties inherited from IUSBDevice, this interface adds the
11815 <link to="#state"/> property that holds the current state of the USB
11816 device.
11817
11818 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11819 </desc>
11820
11821 <attribute name="state" type="USBDeviceState" readonly="yes">
11822 <desc>
11823 Current state of the device.
11824 </desc>
11825 </attribute>
11826
11827 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11828
11829 </interface>
11830
11831
11832 <!--
11833 // IHostUSBDeviceFilter
11834 /////////////////////////////////////////////////////////////////////////
11835 -->
11836
11837 <enum
11838 name="USBDeviceFilterAction"
11839 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11840 >
11841 <desc>
11842 Actions for host USB device filters.
11843 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11844 </desc>
11845
11846 <const name="Null" value="0">
11847 <desc>Null value (never used by the API).</desc>
11848 </const>
11849 <const name="Ignore" value="1">
11850 <desc>Ignore the matched USB device.</desc>
11851 </const>
11852 <const name="Hold" value="2">
11853 <desc>Hold the matched USB device.</desc>
11854 </const>
11855 </enum>
11856
11857 <interface
11858 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11859 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11860 wsmap="managed"
11861 >
11862 <desc>
11863 The IHostUSBDeviceFilter interface represents a global filter for a
11864 physical USB device used by the host computer. Used indirectly in
11865 <link to="IHost::USBDeviceFilters"/>.
11866
11867 Using filters of this type, the host computer determines the initial
11868 state of the USB device after it is physically attached to the
11869 host's USB controller.
11870
11871 <note>
11872 The <link to="#remote"/> attribute is ignored by this type of
11873 filters, because it makes sense only for
11874 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11875 </note>
11876
11877 <see>IHost::USBDeviceFilters</see>
11878 </desc>
11879
11880 <attribute name="action" type="USBDeviceFilterAction">
11881 <desc>
11882 Action performed by the host when an attached USB device
11883 matches this filter.
11884 </desc>
11885 </attribute>
11886
11887 </interface>
11888
11889 <!--
11890 // IAudioAdapter
11891 /////////////////////////////////////////////////////////////////////////
11892 -->
11893
11894 <enum
11895 name="AudioDriverType"
11896 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11897 >
11898 <desc>
11899 Host audio driver type.
11900 </desc>
11901
11902 <const name="Null" value="0">
11903 <desc>Null value, also means "dummy audio driver".</desc>
11904 </const>
11905 <const name="WinMM" value="1"/>
11906 <const name="OSS" value="2"/>
11907 <const name="ALSA" value="3"/>
11908 <const name="DirectSound" value="4"/>
11909 <const name="CoreAudio" value="5"/>
11910 <const name="MMPM" value="6"/>
11911 <const name="Pulse" value="7"/>
11912 <const name="SolAudio" value="8"/>
11913 </enum>
11914
11915 <enum
11916 name="AudioControllerType"
11917 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11918 >
11919 <desc>
11920 Virtual audio controller type.
11921 </desc>
11922
11923 <const name="AC97" value="0"/>
11924 <const name="SB16" value="1"/>
11925 </enum>
11926
11927 <interface
11928 name="IAudioAdapter" extends="$unknown"
11929 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11930 wsmap="managed"
11931 >
11932 <desc>
11933 The IAudioAdapter interface represents the virtual audio adapter of
11934 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11935 </desc>
11936 <attribute name="enabled" type="boolean">
11937 <desc>
11938 Flag whether the audio adapter is present in the
11939 guest system. If disabled, the virtual guest hardware will
11940 not contain any audio adapter. Can only be changed when
11941 the VM is not running.
11942 </desc>
11943 </attribute>
11944 <attribute name="audioController" type="AudioControllerType">
11945 <desc>
11946 The audio hardware we emulate.
11947 </desc>
11948 </attribute>
11949 <attribute name="audioDriver" type="AudioDriverType">
11950 <desc>
11951 Audio driver the adapter is connected to. This setting
11952 can only be changed when the VM is not running.
11953 </desc>
11954 </attribute>
11955 </interface>
11956
11957 <!--
11958 // IVRDPServer
11959 /////////////////////////////////////////////////////////////////////////
11960 -->
11961
11962 <enum
11963 name="VRDPAuthType"
11964 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11965 >
11966 <desc>
11967 VRDP authentication type.
11968 </desc>
11969
11970 <const name="Null" value="0">
11971 <desc>Null value, also means "no authentication".</desc>
11972 </const>
11973 <const name="External" value="1"/>
11974 <const name="Guest" value="2"/>
11975 </enum>
11976
11977 <interface
11978 name="IVRDPServer" extends="$unknown"
11979 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11980 wsmap="managed"
11981 >
11982 <attribute name="enabled" type="boolean">
11983 <desc>VRDP server status.</desc>
11984 </attribute>
11985
11986 <attribute name="port" type="unsigned long">
11987 <desc>
11988 VRDP server port number.
11989 <note>
11990 Setting the value of this property to <tt>0</tt> will reset the port
11991 number to the default value which is
11992 currently <tt>3389</tt>. Reading this property will always return a
11993 real port number, even after it has been set to <tt>0</tt> (in which
11994 case the default port is returned).
11995 </note>
11996 </desc>
11997 </attribute>
11998
11999 <attribute name="netAddress" type="wstring">
12000 <desc>VRDP server address.</desc>
12001 </attribute>
12002
12003 <attribute name="authType" type="VRDPAuthType">
12004 <desc>VRDP authentication method.</desc>
12005 </attribute>
12006
12007 <attribute name="authTimeout" type="unsigned long">
12008 <desc>Timeout for guest authentication. Milliseconds.</desc>
12009 </attribute>
12010
12011 <attribute name="allowMultiConnection" type="boolean">
12012 <desc>
12013 Flag whether multiple simultaneous connections to the VM are permitted.
12014 Note that this will be replaced by a more powerful mechanism in the future.
12015 </desc>
12016 </attribute>
12017
12018 <attribute name="reuseSingleConnection" type="boolean">
12019 <desc>
12020 Flag whether the existing connection must be dropped and a new connection
12021 must be established by the VRDP server, when a new client connects in single
12022 connection mode.
12023 </desc>
12024 </attribute>
12025
12026 </interface>
12027
12028
12029 <!--
12030 // ISharedFolder
12031 /////////////////////////////////////////////////////////////////////////
12032 -->
12033
12034 <interface
12035 name="ISharedFolder" extends="$unknown"
12036 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12037 wsmap="struct"
12038 >
12039 <desc>
12040 The ISharedFolder interface represents a folder in the host computer's
12041 file system accessible from the guest OS running inside a virtual
12042 machine using an associated logical name.
12043
12044 There are three types of shared folders:
12045 <ul>
12046 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12047 folders available to all virtual machines.</li>
12048 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12049 VM-specific shared folders available to the given virtual machine at
12050 startup.</li>
12051 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12052 VM-specific shared folders created in the session context (for
12053 example, when the virtual machine is running) and automatically
12054 discarded when the session is closed (the VM is powered off).</li>
12055 </ul>
12056
12057 Logical names of shared folders must be unique within the given scope
12058 (global, permanent or transient). However, they do not need to be unique
12059 across scopes. In this case, the definition of the shared folder in a
12060 more specific scope takes precedence over definitions in all other
12061 scopes. The order of precedence is (more specific to more general):
12062 <ol>
12063 <li>Transient definitions</li>
12064 <li>Permanent definitions</li>
12065 <li>Global definitions</li>
12066 </ol>
12067
12068 For example, if MyMachine has a shared folder named
12069 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12070 transient shared folder named <tt>C_DRIVE</tt> (that points
12071 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12072 of <tt>C_DRIVE</tt> in the guest OS so
12073 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12074 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12075 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12076 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12077 to <tt>C:\\</tt> if it still exists.
12078
12079 Note that permanent and transient shared folders of different machines
12080 are in different name spaces, so they don't overlap and don't need to
12081 have unique logical names.
12082
12083 <note>
12084 Global shared folders are not implemented in the current version of the
12085 product.
12086 </note>
12087 </desc>
12088
12089 <attribute name="name" type="wstring" readonly="yes">
12090 <desc>Logical name of the shared folder.</desc>
12091 </attribute>
12092
12093 <attribute name="hostPath" type="wstring" readonly="yes">
12094 <desc>Full path to the shared folder in the host file system.</desc>
12095 </attribute>
12096
12097 <attribute name="accessible" type="boolean" readonly="yes">
12098 <desc>
12099 Whether the folder defined by the host path is currently
12100 accessible or not.
12101 For example, the folder can be unaccessible if it is placed
12102 on the network share that is not available by the time
12103 this property is read.
12104 </desc>
12105 </attribute>
12106
12107 <attribute name="writable" type="boolean" readonly="yes">
12108 <desc>
12109 Whether the folder defined by the host path is writable or
12110 not.
12111 </desc>
12112 </attribute>
12113
12114 <attribute name="lastAccessError" type="wstring" readonly="yes">
12115 <desc>
12116 Text message that represents the result of the last accessibility
12117 check.
12118
12119 Accessibility checks are performed each time the <link to="#accessible"/>
12120 attribute is read. A @c null string is returned if the last
12121 accessibility check was successful. A non-null string indicates a
12122 failure and should normally describe a reason of the failure (for
12123 example, a file read error).
12124 </desc>
12125 </attribute>
12126
12127 </interface>
12128
12129 <!--
12130 // ISession
12131 /////////////////////////////////////////////////////////////////////////
12132 -->
12133
12134 <interface
12135 name="IInternalSessionControl" extends="$unknown"
12136 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
12137 internal="yes"
12138 wsmap="suppress"
12139 >
12140 <method name="getPID">
12141 <desc>PID of the process that has created this Session object.
12142 </desc>
12143 <param name="pid" type="unsigned long" dir="return"/>
12144 </method>
12145
12146 <method name="getRemoteConsole">
12147 <desc>
12148 Returns the console object suitable for remote control.
12149
12150 <result name="VBOX_E_INVALID_VM_STATE">
12151 Session state prevents operation.
12152 </result>
12153 <result name="VBOX_E_INVALID_OBJECT_STATE">
12154 Session type prevents operation.
12155 </result>
12156
12157 </desc>
12158 <param name="console" type="IConsole" dir="return"/>
12159 </method>
12160
12161 <method name="assignMachine">
12162 <desc>
12163 Assigns the machine object associated with this direct-type
12164 session or informs the session that it will be a remote one
12165 (if @a machine == NULL).
12166
12167 <result name="VBOX_E_INVALID_VM_STATE">
12168 Session state prevents operation.
12169 </result>
12170 <result name="VBOX_E_INVALID_OBJECT_STATE">
12171 Session type prevents operation.
12172 </result>
12173
12174 </desc>
12175 <param name="machine" type="IMachine" dir="in"/>
12176 </method>
12177
12178 <method name="assignRemoteMachine">
12179 <desc>
12180 Assigns the machine and the (remote) console object associated with
12181 this remote-type session.
12182
12183 <result name="VBOX_E_INVALID_VM_STATE">
12184 Session state prevents operation.
12185 </result>
12186
12187 </desc>
12188 <param name="machine" type="IMachine" dir="in"/>
12189 <param name="console" type="IConsole" dir="in"/>
12190 </method>
12191
12192 <method name="updateMachineState">
12193 <desc>
12194 Updates the machine state in the VM process.
12195 Must be called only in certain cases
12196 (see the method implementation).
12197
12198 <result name="VBOX_E_INVALID_VM_STATE">
12199 Session state prevents operation.
12200 </result>
12201 <result name="VBOX_E_INVALID_OBJECT_STATE">
12202 Session type prevents operation.
12203 </result>
12204
12205 </desc>
12206 <param name="aMachineState" type="MachineState" dir="in"/>
12207 </method>
12208
12209 <method name="uninitialize">
12210 <desc>
12211 Uninitializes (closes) this session. Used by VirtualBox to close
12212 the corresponding remote session when the direct session dies
12213 or gets closed.
12214
12215 <result name="VBOX_E_INVALID_VM_STATE">
12216 Session state prevents operation.
12217 </result>
12218
12219 </desc>
12220 </method>
12221
12222 <method name="onDVDDriveChange">
12223 <desc>
12224 Triggered when settings of the DVD drive object of the
12225 associated virtual machine have changed.
12226
12227 <result name="VBOX_E_INVALID_VM_STATE">
12228 Session state prevents operation.
12229 </result>
12230 <result name="VBOX_E_INVALID_OBJECT_STATE">
12231 Session type prevents operation.
12232 </result>
12233
12234 </desc>
12235 </method>
12236
12237 <method name="onFloppyDriveChange">
12238 <desc>
12239 Triggered when settings of the floppy drive object of the
12240 associated virtual machine have changed.
12241
12242 <result name="VBOX_E_INVALID_VM_STATE">
12243 Session state prevents operation.
12244 </result>
12245 <result name="VBOX_E_INVALID_OBJECT_STATE">
12246 Session type prevents operation.
12247 </result>
12248
12249 </desc>
12250 </method>
12251
12252 <method name="onNetworkAdapterChange">
12253 <desc>
12254 Triggered when settings of a network adapter of the
12255 associated virtual machine have changed.
12256
12257 <result name="VBOX_E_INVALID_VM_STATE">
12258 Session state prevents operation.
12259 </result>
12260 <result name="VBOX_E_INVALID_OBJECT_STATE">
12261 Session type prevents operation.
12262 </result>
12263
12264 </desc>
12265 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12266 </method>
12267
12268 <method name="onSerialPortChange">
12269 <desc>
12270 Triggered when settings of a serial port of the
12271 associated virtual machine have changed.
12272
12273 <result name="VBOX_E_INVALID_VM_STATE">
12274 Session state prevents operation.
12275 </result>
12276 <result name="VBOX_E_INVALID_OBJECT_STATE">
12277 Session type prevents operation.
12278 </result>
12279
12280 </desc>
12281 <param name="serialPort" type="ISerialPort" dir="in"/>
12282 </method>
12283
12284 <method name="onParallelPortChange">
12285 <desc>
12286 Triggered when settings of a parallel port of the
12287 associated virtual machine have changed.
12288
12289 <result name="VBOX_E_INVALID_VM_STATE">
12290 Session state prevents operation.
12291 </result>
12292 <result name="VBOX_E_INVALID_OBJECT_STATE">
12293 Session type prevents operation.
12294 </result>
12295
12296 </desc>
12297 <param name="parallelPort" type="IParallelPort" dir="in"/>
12298 </method>
12299
12300 <method name="onStorageControllerChange">
12301 <desc>
12302 Triggered when settings of a storage controller of the
12303 associated virtual machine have changed.
12304
12305 <result name="VBOX_E_INVALID_VM_STATE">
12306 Session state prevents operation.
12307 </result>
12308 <result name="VBOX_E_INVALID_OBJECT_STATE">
12309 Session type prevents operation.
12310 </result>
12311
12312 </desc>
12313 </method>
12314
12315 <method name="onVRDPServerChange">
12316 <desc>
12317 Triggered when settings of the VRDP server object of the
12318 associated virtual machine have changed.
12319
12320 <result name="VBOX_E_INVALID_VM_STATE">
12321 Session state prevents operation.
12322 </result>
12323 <result name="VBOX_E_INVALID_OBJECT_STATE">
12324 Session type prevents operation.
12325 </result>
12326
12327 </desc>
12328 </method>
12329
12330 <method name="onUSBControllerChange">
12331 <desc>
12332 Triggered when settings of the USB controller object of the
12333 associated virtual machine have changed.
12334
12335 <result name="VBOX_E_INVALID_VM_STATE">
12336 Session state prevents operation.
12337 </result>
12338 <result name="VBOX_E_INVALID_OBJECT_STATE">
12339 Session type prevents operation.
12340 </result>
12341
12342 </desc>
12343 </method>
12344
12345 <method name="onSharedFolderChange">
12346 <desc>
12347 Triggered when a permanent (global or machine) shared folder has been
12348 created or removed.
12349 <note>
12350 We don't pass shared folder parameters in this notification because
12351 the order in which parallel notifications are delivered is not defined,
12352 therefore it could happen that these parameters were outdated by the
12353 time of processing this notification.
12354 </note>
12355
12356 <result name="VBOX_E_INVALID_VM_STATE">
12357 Session state prevents operation.
12358 </result>
12359 <result name="VBOX_E_INVALID_OBJECT_STATE">
12360 Session type prevents operation.
12361 </result>
12362
12363 </desc>
12364 <param name="global" type="boolean" dir="in"/>
12365 </method>
12366
12367 <method name="onUSBDeviceAttach">
12368 <desc>
12369 Triggered when a request to capture a USB device (as a result
12370 of matched USB filters or direct call to
12371 <link to="IConsole::attachUSBDevice"/>) has completed.
12372 A @c null @a error object means success, otherwise it
12373 describes a failure.
12374
12375 <result name="VBOX_E_INVALID_VM_STATE">
12376 Session state prevents operation.
12377 </result>
12378 <result name="VBOX_E_INVALID_OBJECT_STATE">
12379 Session type prevents operation.
12380 </result>
12381
12382 </desc>
12383 <param name="device" type="IUSBDevice" dir="in"/>
12384 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12385 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12386 </method>
12387
12388 <method name="onUSBDeviceDetach">
12389 <desc>
12390 Triggered when a request to release the USB device (as a result
12391 of machine termination or direct call to
12392 <link to="IConsole::detachUSBDevice"/>) has completed.
12393 A @c null @a error object means success, otherwise it
12394
12395 <result name="VBOX_E_INVALID_VM_STATE">
12396 Session state prevents operation.
12397 </result>
12398 <result name="VBOX_E_INVALID_OBJECT_STATE">
12399 Session type prevents operation.
12400 </result>
12401
12402 </desc>
12403 <param name="id" type="uuid" dir="in"/>
12404 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12405 </method>
12406
12407 <method name="onShowWindow">
12408 <desc>
12409 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12410 <link to="IMachine::showConsoleWindow"/> in order to notify
12411 console callbacks
12412 <link to="IConsoleCallback::onCanShowWindow"/>
12413 and <link to="IConsoleCallback::onShowWindow"/>.
12414
12415 <result name="VBOX_E_INVALID_OBJECT_STATE">
12416 Session type prevents operation.
12417 </result>
12418
12419 </desc>
12420 <param name="check" type="boolean" dir="in"/>
12421 <param name="canShow" type="boolean" dir="out"/>
12422 <param name="winId" type="unsigned long long" dir="out"/>
12423 </method>
12424
12425 <method name="accessGuestProperty">
12426 <desc>
12427 Called by <link to="IMachine::getGuestProperty"/> and by
12428 <link to="IMachine::setGuestProperty"/> in order to read and
12429 modify guest properties.
12430
12431 <result name="VBOX_E_INVALID_VM_STATE">
12432 Machine session is not open.
12433 </result>
12434 <result name="VBOX_E_INVALID_OBJECT_STATE">
12435 Session type is not direct.
12436 </result>
12437
12438 </desc>
12439 <param name="name" type="wstring" dir="in"/>
12440 <param name="value" type="wstring" dir="in"/>
12441 <param name="flags" type="wstring" dir="in"/>
12442 <param name="isSetter" type="boolean" dir="in"/>
12443 <param name="retValue" type="wstring" dir="out"/>
12444 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12445 <param name="retFlags" type="wstring" dir="out"/>
12446 </method>
12447
12448 <method name="enumerateGuestProperties">
12449 <desc>
12450 Return a list of the guest properties matching a set of patterns along
12451 with their values, time stamps and flags.
12452
12453 <result name="VBOX_E_INVALID_VM_STATE">
12454 Machine session is not open.
12455 </result>
12456 <result name="VBOX_E_INVALID_OBJECT_STATE">
12457 Session type is not direct.
12458 </result>
12459
12460 </desc>
12461 <param name="patterns" type="wstring" dir="in">
12462 <desc>
12463 The patterns to match the properties against as a comma-separated
12464 string. If this is empty, all properties currently set will be
12465 returned.
12466 </desc>
12467 </param>
12468 <param name="key" type="wstring" dir="out" safearray="yes">
12469 <desc>
12470 The key names of the properties returned.
12471 </desc>
12472 </param>
12473 <param name="value" type="wstring" dir="out" safearray="yes">
12474 <desc>
12475 The values of the properties returned. The array entries match the
12476 corresponding entries in the @a key array.
12477 </desc>
12478 </param>
12479 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12480 <desc>
12481 The time stamps of the properties returned. The array entries match
12482 the corresponding entries in the @a key array.
12483 </desc>
12484 </param>
12485 <param name="flags" type="wstring" dir="out" safearray="yes">
12486 <desc>
12487 The flags of the properties returned. The array entries match the
12488 corresponding entries in the @a key array.
12489 </desc>
12490 </param>
12491 </method>
12492
12493 </interface>
12494
12495 <interface
12496 name="ISession" extends="$dispatched"
12497 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12498 wsmap="managed"
12499 >
12500 <desc>
12501 The ISession interface represents a serialization primitive for virtual
12502 machines.
12503
12504 With VirtualBox, every time one wishes to manipulate a virtual machine
12505 (e.g. change its settings or start execution), a session object is
12506 required. Such an object must be passed to one of the session methods
12507 that open the given session, which then initiates the machine manipulation.
12508
12509 A session serves several purposes: it identifies to the inter-process VirtualBox
12510 code which process is currently working with the virtual machine, and it ensures
12511 that there are no incompatible requests from several processes for the
12512 same virtual machine. Session objects can therefore be thought of as mutex
12513 semaphores that lock virtual machines to prevent conflicting accesses from
12514 several processes.
12515
12516 How sessions objects are used depends on whether you use the Main API
12517 via COM or via the webservice:
12518
12519 <ul>
12520 <li>When using the COM API directly, an object of the Session class from the
12521 VirtualBox type library needs to be created. In regular COM C++ client code,
12522 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12523 This object will then act as a local session object in further calls to open
12524 a session.
12525 </li>
12526
12527 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12528 one session object automatically when <link to="IWebsessionManager::logon" />
12529 is called. A managed object reference to that session object can be retrieved by
12530 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12531 reference can then be used to open sessions.
12532 </li>
12533 </ul>
12534
12535 Sessions are mainly used in two variations:
12536
12537 <ul>
12538 <li>
12539 To start a virtual machine in a separate process, one would call
12540 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12541 object as its first parameter. This session then identifies the caller
12542 and lets him control the started machine (for example, pause machine
12543 execution or power it down) as well as be notified about machine
12544 execution state changes.
12545 </li>
12546
12547 <li>To alter machine settings, or to start machine execution within the
12548 current process, one needs to open a direct session for the machine first by
12549 calling <link to="IVirtualBox::openSession"/>. While a direct session
12550 is open within one process, no any other process may open another direct
12551 session for the same machine. This prevents the machine from being changed
12552 by other processes while it is running or while the machine is being configured.
12553 </li>
12554 </ul>
12555
12556 One also can attach to an existing direct session already opened by
12557 another process (for example, in order to send a control request to the
12558 virtual machine such as the pause or the reset request). This is done by
12559 calling <link to="IVirtualBox::openExistingSession"/>.
12560
12561 <note>
12562 Unless you are trying to write a new VirtualBox front-end that
12563 performs direct machine execution (like the VirtualBox or VBoxSDL
12564 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12565 session opened by <link to="IVirtualBox::openSession"/> and use this
12566 session only to change virtual machine settings. If you simply want to
12567 start virtual machine execution using one of the existing front-ends
12568 (for example the VirtualBox GUI or headless server), simply use
12569 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12570 will power up the machine automatically for you.
12571 </note>
12572 </desc>
12573
12574 <attribute name="state" type="SessionState" readonly="yes">
12575 <desc>Current state of this session.</desc>
12576 </attribute>
12577
12578 <attribute name="type" type="SessionType" readonly="yes">
12579 <desc>
12580 Type of this session. The value of this attribute is valid only
12581 if the session is currently open (i.e. its #state is
12582 SessionType_SessionOpen), otherwise an error will be returned.
12583 </desc>
12584 </attribute>
12585
12586 <attribute name="machine" type="IMachine" readonly="yes">
12587 <desc>Machine object associated with this session.</desc>
12588 </attribute>
12589
12590 <attribute name="console" type="IConsole" readonly="yes">
12591 <desc>Console object associated with this session.</desc>
12592 </attribute>
12593
12594 <method name="close">
12595 <desc>
12596 Closes a session that was previously opened.
12597
12598 It is recommended that every time an "open session" method (such as
12599 <link to="IVirtualBox::openRemoteSession" /> or
12600 <link to="IVirtualBox::openSession" />) has been called to
12601 manipulate a virtual machine, the caller invoke
12602 ISession::close() when it's done doing so. Since sessions are
12603 serialization primitives much like ordinary mutexes, they are
12604 best used the same way: for each "open" call, there should be
12605 a matching "close" call, even when errors occur.
12606
12607 Otherwise, if a direct session for a machine opened with
12608 <link to="IVirtualBox::openSession"/> is not explicitly closed
12609 when the application terminates, the state of the machine will
12610 be set to <link to="MachineState_Aborted" /> on the server.
12611
12612 Generally, it is recommended to close all open sessions explicitly
12613 before terminating the application (regardless of the reason for
12614 the termination).
12615
12616 <note>
12617 Do not expect the session state (<link to="ISession::state" />
12618 to return to "Closed" immediately after you invoke
12619 ISession::close(), particularly if you have started a remote
12620 session to execute the VM in a new process. The session state will
12621 automatically return to "Closed" once the VM is no longer executing,
12622 which can of course take a very long time.
12623 </note>
12624
12625 <result name="E_UNEXPECTED">
12626 Session is not open.
12627 </result>
12628
12629 </desc>
12630 </method>
12631
12632 </interface>
12633
12634 <!--
12635 // IStorageController
12636 /////////////////////////////////////////////////////////////////////////
12637 -->
12638
12639 <enum
12640 name="StorageBus"
12641 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12642 >
12643 <desc>
12644 The connection type of the storage controller.
12645 </desc>
12646 <const name="Null" value="0">
12647 <desc><tt>null</tt> value. Never used by the API.</desc>
12648 </const>
12649 <const name="IDE" value="1"/>
12650 <const name="SATA" value="2"/>
12651 <const name="SCSI" value="3"/>
12652 </enum>
12653
12654 <enum
12655 name="StorageControllerType"
12656 uuid="685387db-a837-4320-a258-08f46a22f62a"
12657 >
12658 <desc>
12659 Storage controller type.
12660 </desc>
12661
12662 <const name="Null" value="0">
12663 <desc><tt>null</tt> value. Never used by the API.</desc>
12664 </const>
12665 <const name="LsiLogic" value="1"/>
12666 <const name="BusLogic" value="2"/>
12667 <const name="IntelAhci" value="3"/>
12668 <const name="PIIX3" value="4"/>
12669 <const name="PIIX4" value="5"/>
12670 <const name="ICH6" value="6"/>
12671 </enum>
12672
12673 <interface
12674 name="IStorageController" extends="$unknown"
12675 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12676 wsmap="managed"
12677 >
12678 <desc>
12679 Represents a storage controller that is attached to a virtual machine
12680 (<link to="IMachine" />). Just as hard disks are attached to storage
12681 controllers in a real computer, virtual hard disks (represented by
12682 <link to="IHardDisk" />) are attached to virtual storage controllers,
12683 represented by this interface.
12684
12685 VirtualBox supports three types of virtual storage controller hardware:
12686 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12687 these three is used, certain sub-types are available and can be
12688 selected in <link to="#controllerType" />.
12689 </desc>
12690
12691 <attribute name="name" type="wstring" readonly="yes">
12692 <desc>
12693 Name of the storage controller, as originally specified with
12694 <link to="IMachine::addStorageController" />. This then uniquely
12695 identifies this controller with other method calls such as
12696 <link to="IMachine::attachHardDisk" />.
12697 </desc>
12698 </attribute>
12699
12700 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12701 <desc>
12702 Maximum number of devices which can be attached to one port.
12703 </desc>
12704 </attribute>
12705
12706 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12707 <desc>
12708 Minimum number of ports which can be set with
12709 <link to="IStorageController::SetPortCount"/>.
12710 </desc>
12711 </attribute>
12712
12713 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12714 <desc>
12715 Maximum number of ports which can be set with
12716 <link to="IStorageController::SetPortCount"/>.
12717 </desc>
12718 </attribute>
12719
12720 <attribute name="instance" type="unsigned long">
12721 <desc>
12722 The instance number of the device in the running VM.
12723 </desc>
12724 </attribute>
12725
12726 <attribute name="portCount" type="unsigned long">
12727 <desc>
12728 The number of currently usable ports on the controller.
12729 The minimum and maximum number of ports for one controller type can
12730 be determined with <link to="IStorageController::GetMinPortCount"/>
12731 and <link to="IStorageController::GetMaxPortCount"/>..
12732 </desc>
12733 </attribute>
12734
12735 <attribute name="bus" type="StorageBus" readonly="yes">
12736 <desc>
12737 The connection type of the storage controller.
12738 </desc>
12739 </attribute>
12740
12741 <attribute name="controllerType" type="StorageControllerType">
12742 <desc>
12743 Type of the virtual storage controller. Depending on this value,
12744 VirtualBox will provide a different virtual storage controller hardware
12745 to the guest.
12746
12747 For SCSI controllers, the default type is LsiLogic.
12748 </desc>
12749 </attribute>
12750
12751 <method name="GetIDEEmulationPort">
12752 <desc>
12753 Gets the corresponding port number which is emulated as an IDE device.
12754
12755 <result name="E_INVALIDARG">
12756 The @a devicePosition is not in the range 0 to 3.
12757 </result>
12758 <result name="E_NOTIMPL">
12759 The storage controller type is not SATAIntelAhci.
12760 </result>
12761
12762 </desc>
12763 <param name="devicePosition" type="long" dir="in"/>
12764 <param name="portNumber" type="long" dir="return"/>
12765 </method>
12766
12767 <method name="SetIDEEmulationPort">
12768 <desc>
12769 Sets the port number which is emulated as an IDE device.
12770
12771 <result name="E_INVALIDARG">
12772 The @a devicePosition is not in the range 0 to 3 or the
12773 @a portNumber is not in the range 0 to 29.
12774 </result>
12775 <result name="E_NOTIMPL">
12776 The storage controller type is not SATAIntelAhci.
12777 </result>
12778
12779 </desc>
12780 <param name="devicePosition" type="long" dir="in"/>
12781 <param name="portNumber" type="long" dir="in"/>
12782 </method>
12783
12784 </interface>
12785
12786<if target="wsdl">
12787
12788 <!--
12789 // IManagedObjectRef
12790 /////////////////////////////////////////////////////////////////////////
12791 -->
12792
12793 <interface
12794 name="IManagedObjectRef" extends="$unknown"
12795 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12796 internal="yes"
12797 wsmap="managed"
12798 wscpp="hardcoded"
12799 >
12800 <desc>
12801 Managed object reference.
12802
12803 Only within the webservice, a managed object reference (which is really
12804 an opaque number) allows a webservice client to address an object
12805 that lives in the address space of the webservice server.
12806
12807 Behind each managed object reference, there is a COM object that lives
12808 in the webservice server's address space. The COM object is not freed
12809 until the managed object reference is released, either by an explicit
12810 call to <link to="IManagedObjectRef::release" /> or by logging off from
12811 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12812 all objects created during the webservice session.
12813
12814 Whenever a method call of the VirtualBox API returns a COM object, the
12815 webservice representation of that method will instead return a
12816 managed object reference, which can then be used to invoke methods
12817 on that object.
12818 </desc>
12819
12820 <method name="getInterfaceName">
12821 <desc>
12822 Returns the name of the interface that this managed object represents,
12823 for example, "IMachine", as a string.
12824 </desc>
12825 <param name="return" type="wstring" dir="return"/>
12826 </method>
12827
12828 <method name="release">
12829 <desc>
12830 Releases this managed object reference and frees the resources that
12831 were allocated for it in the webservice server process. After calling
12832 this method, the identifier of the reference can no longer be used.
12833 </desc>
12834 </method>
12835
12836 </interface>
12837
12838 <!--
12839 // IWebsessionManager
12840 /////////////////////////////////////////////////////////////////////////
12841 -->
12842
12843 <interface
12844 name="IWebsessionManager" extends="$unknown"
12845 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12846 internal="yes"
12847 wsmap="global"
12848 wscpp="hardcoded"
12849 >
12850 <desc>
12851 Websession manager. This provides essential services
12852 to webservice clients.
12853 </desc>
12854 <method name="logon">
12855 <desc>
12856 Logs a new client onto the webservice and returns a managed object reference to
12857 the IVirtualBox instance, which the client can then use as a basis to further
12858 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12859 interface, in one way or the other.
12860 </desc>
12861 <param name="username" type="wstring" dir="in"/>
12862 <param name="password" type="wstring" dir="in"/>
12863 <param name="return" type="IVirtualBox" dir="return"/>
12864 </method>
12865
12866 <method name="getSessionObject">
12867 <desc>
12868 Returns a managed object reference to the internal ISession object that was created
12869 for this web service session when the client logged on.
12870
12871 <see>ISession</see>
12872 </desc>
12873 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12874 <param name="return" type="ISession" dir="return"/>
12875 </method>
12876
12877 <method name="logoff">
12878 <desc>
12879 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12880 and destroys all resources associated with the session (most importantly, all
12881 managed objects created in the server while the session was active).
12882 </desc>
12883 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12884 </method>
12885
12886 </interface>
12887
12888</if>
12889
12890 <!--
12891 // IPerformanceCollector & friends
12892 /////////////////////////////////////////////////////////////////////////
12893 -->
12894
12895 <interface
12896 name="IPerformanceMetric" extends="$unknown"
12897 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12898 >
12899 <desc>
12900 The IPerformanceMetric interface represents parameters of the given
12901 performance metric.
12902 </desc>
12903
12904 <attribute name="metricName" type="wstring" readonly="yes">
12905 <desc>
12906 Name of the metric.
12907 </desc>
12908 </attribute>
12909
12910 <attribute name="object" type="$unknown" readonly="yes">
12911 <desc>
12912 Object this metric belongs to.
12913 </desc>
12914 </attribute>
12915
12916 <attribute name="description" type="wstring" readonly="yes">
12917 <desc>
12918 Textual description of the metric.
12919 </desc>
12920 </attribute>
12921
12922 <attribute name="period" type="unsigned long" readonly="yes">
12923 <desc>
12924 Time interval between samples, measured in seconds.
12925 </desc>
12926 </attribute>
12927
12928 <attribute name="count" type="unsigned long" readonly="yes">
12929 <desc>
12930 Number of recent samples retained by the performance collector for this
12931 metric.
12932
12933 When the collected sample count exceeds this number, older samples
12934 are discarded.
12935 </desc>
12936 </attribute>
12937
12938 <attribute name="unit" type="wstring" readonly="yes">
12939 <desc>
12940 Unit of measurement.
12941 </desc>
12942 </attribute>
12943
12944 <attribute name="minimumValue" type="long" readonly="yes">
12945 <desc>
12946 Minimum possible value of this metric.
12947 </desc>
12948 </attribute>
12949
12950 <attribute name="maximumValue" type="long" readonly="yes">
12951 <desc>
12952 Maximum possible value of this metric.
12953 </desc>
12954 </attribute>
12955 </interface>
12956
12957 <interface
12958 name="IPerformanceCollector" extends="$unknown"
12959 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12960 wsmap="managed"
12961 >
12962 <desc>
12963 The IPerformanceCollector interface represents a service that collects and
12964 stores performance metrics data.
12965
12966 Performance metrics are associated with objects like IHost and
12967 IMachine. Each object has a distinct set of performance metrics.
12968 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12969
12970 Metric data are collected at the specified intervals and are retained
12971 internally. The interval and the number of samples retained can be set
12972 with <link to="IPerformanceCollector::setupMetrics" />.
12973
12974 Metrics are organized hierarchically, each level separated by slash (/).
12975 General scheme for metric name is
12976 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12977 metric name stands for: CPU category, Load metric, User submetric, average
12978 aggregate. An aggregate function is computed over all retained data. Valid
12979 aggregate functions are:
12980
12981 <ul>
12982 <li>avg -- average</li>
12983 <li>min -- minimum</li>
12984 <li>max -- maximum</li>
12985 </ul>
12986
12987 "Category/Metric" together form base metric name. A base metric is the
12988 smallest unit for which a sampling interval and the number of retained
12989 samples can be set. Only base metrics can be enabled and disabled. All
12990 sub-metrics are collected when their base metric is collected.
12991 Collected values for any set of sub-metrics can be queried with
12992 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12993 metric parameters, querying metric data, enabling or disabling metrics
12994 wildcards can be used in metric names to specify a subset of metrics. For
12995 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12996 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12997 values without aggregates <tt>*:</tt> can be used.
12998
12999 The valid names for base metrics are:
13000
13001 <ul>
13002 <li>CPU/Load</li>
13003 <li>CPU/MHz</li>
13004 <li>RAM/Usage</li>
13005 </ul>
13006
13007 The general sequence for collecting and retrieving the metrics is:
13008 <ul>
13009 <li>
13010 Obtain an instance of IPerformanceCollector with
13011 <link to="IVirtualBox::performanceCollector" />
13012 </li>
13013 <li>
13014 Allocate and populate an array with references to objects the metrics
13015 will be collected for. Use references to IHost and IMachine objects.
13016 </li>
13017 <li>
13018 Allocate and populate an array with base metric names the data will be
13019 collected for.
13020 </li>
13021 <li>
13022 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13023 metric data will be collected and stored.
13024 </li>
13025 <li>
13026 Wait for the data to get collected.
13027 </li>
13028 <li>
13029 Allocate and populate an array with references to objects the metric
13030 values will be queried for. You can re-use the object array used for
13031 setting base metrics.
13032 </li>
13033 <li>
13034 Allocate and populate an array with metric names the data will be
13035 collected for. Note that metric names differ from base metric names.
13036 </li>
13037 <li>
13038 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13039 have been collected so far are returned. Note that the values are still
13040 retained internally and data collection continues.
13041 </li>
13042 </ul>
13043
13044 For an example of usage refer to the following files in VirtualBox SDK:
13045 <ul>
13046 <li>
13047 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13048 </li>
13049 <li>
13050 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13051 </li>
13052 </ul>
13053 </desc>
13054
13055 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13056 <desc>
13057 Array of unique names of metrics.
13058
13059 This array represents all metrics supported by the performance
13060 collector. Individual objects do not necessarily support all of them.
13061 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13062 list of supported metrics for a particular object.
13063 </desc>
13064 </attribute>
13065
13066 <method name="getMetrics">
13067 <desc>
13068 Returns parameters of specified metrics for a set of objects.
13069 <note>
13070 @c Null metrics array means all metrics. @c Null object array means
13071 all existing objects.
13072 </note>
13073 </desc>
13074 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13075 <desc>
13076 Metric name filter. Currently, only a comma-separated list of metrics
13077 is supported.
13078 </desc>
13079 </param>
13080 <param name="objects" type="$unknown" dir="in" safearray="yes">
13081 <desc>
13082 Set of objects to return metric parameters for.
13083 </desc>
13084 </param>
13085 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13086 <desc>
13087 Array of returned metric parameters.
13088 </desc>
13089 </param>
13090 </method>
13091
13092 <method name="setupMetrics">
13093 <desc>
13094 Sets parameters of specified base metrics for a set of objects. Returns
13095 an array of <link to="IPerformanceMetric" /> describing the metrics have
13096 been affected.
13097 <note>
13098 @c Null or empty metric name array means all metrics. @c Null or empty
13099 object array means all existing objects. If metric name array contains
13100 a single element and object array contains many, the single metric
13101 name array element is applied to each object array element to form
13102 metric/object pairs.
13103 </note>
13104 </desc>
13105 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13106 <desc>
13107 Metric name filter. Comma-separated list of metrics with wildcard
13108 support.
13109 </desc>
13110 </param>
13111 <param name="objects" type="$unknown" dir="in" safearray="yes">
13112 <desc>
13113 Set of objects to setup metric parameters for.
13114 </desc>
13115 </param>
13116 <param name="period" type="unsigned long" dir="in">
13117 <desc>
13118 Time interval in seconds between two consecutive samples of performance
13119 data.
13120 </desc>
13121 </param>
13122 <param name="count" type="unsigned long" dir="in">
13123 <desc>
13124 Number of samples to retain in performance data history. Older samples
13125 get discarded.
13126 </desc>
13127 </param>
13128 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13129 <desc>
13130 Array of metrics that have been modified by the call to this method.
13131 </desc>
13132 </param>
13133 </method>
13134
13135 <method name="enableMetrics">
13136 <desc>
13137 Turns on collecting specified base metrics. Returns an array of
13138 <link to="IPerformanceMetric" /> describing the metrics have been
13139 affected.
13140 <note>
13141 @c Null or empty metric name array means all metrics. @c Null or empty
13142 object array means all existing objects. If metric name array contains
13143 a single element and object array contains many, the single metric
13144 name array element is applied to each object array element to form
13145 metric/object pairs.
13146 </note>
13147 </desc>
13148 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13149 <desc>
13150 Metric name filter. Comma-separated list of metrics with wildcard
13151 support.
13152 </desc>
13153 </param>
13154 <param name="objects" type="$unknown" dir="in" safearray="yes">
13155 <desc>
13156 Set of objects to enable metrics for.
13157 </desc>
13158 </param>
13159 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13160 <desc>
13161 Array of metrics that have been modified by the call to this method.
13162 </desc>
13163 </param>
13164 </method>
13165
13166 <method name="disableMetrics">
13167 <desc>
13168 Turns off collecting specified base metrics. Returns an array of
13169 <link to="IPerformanceMetric" /> describing the metrics have been
13170 affected.
13171 <note>
13172 @c Null or empty metric name array means all metrics. @c Null or empty
13173 object array means all existing objects. If metric name array contains
13174 a single element and object array contains many, the single metric
13175 name array element is applied to each object array element to form
13176 metric/object pairs.
13177 </note>
13178 </desc>
13179 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13180 <desc>
13181 Metric name filter. Comma-separated list of metrics with wildcard
13182 support.
13183 </desc>
13184 </param>
13185 <param name="objects" type="$unknown" dir="in" safearray="yes">
13186 <desc>
13187 Set of objects to disable metrics for.
13188 </desc>
13189 </param>
13190 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13191 <desc>
13192 Array of metrics that have been modified by the call to this method.
13193 </desc>
13194 </param>
13195 </method>
13196
13197 <method name="queryMetricsData">
13198 <desc>
13199 Queries collected metrics data for a set of objects.
13200
13201 The data itself and related metric information are returned in seven
13202 parallel and one flattened array of arrays. Elements of
13203 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13204 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13205 the same index describe one set of values corresponding to a single
13206 metric.
13207
13208 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13209 start and length of a sub-array is indicated by
13210 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13211 value for metric <tt>metricNames[i]</tt> is at
13212 <tt>returnData[returnIndices[i]]</tt>.
13213
13214 <note>
13215 @c Null or empty metric name array means all metrics. @c Null or empty
13216 object array means all existing objects. If metric name array contains
13217 a single element and object array contains many, the single metric
13218 name array element is applied to each object array element to form
13219 metric/object pairs.
13220 </note>
13221 <note>
13222 Data collection continues behind the scenes after call to
13223 @c queryMetricsData. The return data can be seen as the snapshot of
13224 the current state at the time of @c queryMetricsData call. The
13225 internally kept metric values are not cleared by the call. This makes
13226 possible querying different subsets of metrics or aggregates with
13227 subsequent calls. If periodic querying is needed it is highly
13228 suggested to query the values with @c interval*count period to avoid
13229 confusion. This way a completely new set of data values will be
13230 provided by each query.
13231 </note>
13232 </desc>
13233 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13234 <desc>
13235 Metric name filter. Comma-separated list of metrics with wildcard
13236 support.
13237 </desc>
13238 </param>
13239 <param name="objects" type="$unknown" dir="in" safearray="yes">
13240 <desc>
13241 Set of objects to query metrics for.
13242 </desc>
13243 </param>
13244 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13245 <desc>
13246 Names of metrics returned in @c returnData.
13247 </desc>
13248 </param>
13249 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13250 <desc>
13251 Objects associated with metrics returned in @c returnData.
13252 </desc>
13253 </param>
13254 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13255 <desc>
13256 Units of measurement for each returned metric.
13257 </desc>
13258 </param>
13259 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13260 <desc>
13261 Divisor that should be applied to return values in order to get
13262 floating point values. For example:
13263 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13264 will retrieve the floating point value of i-th sample of the first
13265 metric.
13266 </desc>
13267 </param>
13268 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13269 <desc>
13270 Sequence numbers of the first elements of value sequences of particular metrics
13271 returned in @c returnData. For aggregate metrics it is the sequence number of
13272 the sample the aggregate started calculation from.
13273 </desc>
13274 </param>
13275 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13276 <desc>
13277 Indices of the first elements of value sequences of particular metrics
13278 returned in @c returnData.
13279 </desc>
13280 </param>
13281 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13282 <desc>
13283 Lengths of value sequences of particular metrics.
13284 </desc>
13285 </param>
13286 <param name="returnData" type="long" dir="return" safearray="yes">
13287 <desc>
13288 Flattened array of all metric data containing sequences of values for
13289 each metric.
13290 </desc>
13291 </param>
13292 </method>
13293
13294 </interface>
13295
13296 <module name="VBoxSVC" context="LocalServer">
13297 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13298 namespace="virtualbox.org">
13299 <interface name="IVirtualBox" default="yes"/>
13300 </class>
13301 </module>
13302
13303 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13304 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13305 namespace="virtualbox.org">
13306 <interface name="ISession" default="yes"/>
13307 </class>
13308 </module>
13309
13310</library>
13311
13312</idl>
13313
13314<!-- 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