VirtualBox

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

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

OVF: Added remote OVF downloading.

  • Property svn:eol-style set to native
File size: 488.1 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, @c null). 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="AccessMode"
350 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
351 >
352 <desc>
353 Access mode for opening files.
354 </desc>
355
356 <const name="ReadOnly" value="1"/>
357 <const name="ReadWrite" value="2"/>
358 </enum>
359
360 <enum
361 name="MachineState"
362 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
363 >
364 <desc>
365 Virtual machine execution state.
366
367 This enumeration represents possible values of the <link
368 to="IMachine::state"/> attribute.
369
370 Below is the basic virtual machine state diagram. It shows how the state
371 changes during virtual machine execution. The text in square braces shows
372 a method of the IConsole interface that performs the given state
373 transition.
374
375 <pre>
376 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
377 V |
378 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
379 | | | | V |
380 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
381 | | ^ | ^ |
382 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
383 | ^ | | | |
384 | | +-----------------------------------------+-|-------------------+ +
385 | | | | |
386 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
387 | | | |
388 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
389 | | |
390 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
391 </pre>
392
393 Note that states to the right from PoweredOff, Aborted and Saved in the
394 above diagram are called <i>online VM states</i>. These states
395 represent the virtual machine which is being executed in a dedicated
396 process (usually with a GUI window attached to it where you can see the
397 activity of the virtual machine and interact with it). There are two
398 special pseudo-states, FirstOnline and LastOnline, that can be used in
399 relational expressions to detect if the given machine state is online or
400 not:
401
402 <pre>
403 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
404 machine.GetState() &lt;= MachineState_LastOnline)
405 {
406 ...the machine is being executed...
407 }
408 </pre>
409
410 When the virtual machine is in one of the online VM states (that is, being
411 executed), only a few machine settings can be modified. Methods working
412 with such settings contain an explicit note about that. An attempt to
413 change any oter setting or perform a modifying operation during this time
414 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
415
416 All online states except Running, Paused and Stuck are transitional: they
417 represent temporary conditions of the virtual machine that will last as
418 long as the operation that initiated such a condition.
419
420 The Stuck state is a special case. It means that execution of the machine
421 has reached the "Guru Meditation" condition. This condition indicates an
422 internal VMM (virtual machine manager) failure which may happen as a
423 result of either an unhandled low-level virtual hardware exception or one
424 of the recompiler exceptions (such as the <i>too-many-traps</i>
425 condition).
426
427 Note also that any online VM state may transit to the Aborted state. This
428 happens if the process that is executing the virtual machine terminates
429 unexpectedly (for example, crashes). Other than that, the Aborted state is
430 equivalent to PoweredOff.
431
432 There are also a few additional state diagrams that do not deal with
433 virtual machine execution and therefore are shown separately. The states
434 shown on these diagrams are called <i>offline VM states</i> (this includes
435 PoweredOff, Aborted and Saved too).
436
437 The first diagram shows what happens when a lengthy setup operation is
438 being executed (such as <link to="IMachine::attachHardDisk"/>).
439
440 <pre>
441 +----------------------------------(same state as before the call)------+
442 | |
443 +-&gt; PoweredOff --+ |
444 | | |
445 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
446 | |
447 +-&gt; Saved -------+
448 </pre>
449
450 The next two diagrams demonstrate the process of taking a snapshot of a
451 powered off virtual machine and performing one of the "discard..."
452 operations, respectively.
453
454 <pre>
455 +----------------------------------(same state as before the call)------+
456 | |
457 +-&gt; PoweredOff --+ |
458 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
459 +-&gt; Aborted -----+
460
461 +-&gt; PoweredOff --+
462 | |
463 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
464 | | [discardCurrentState()] |
465 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
466 | |
467 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
468 </pre>
469
470 Note that the Saving state is present in both the offline state group and
471 online state group. Currently, the only way to determine what group is
472 assumed in a particular case is to remember the previous machine state: if
473 it was Running or Paused, then Saving is an online state, otherwise it is
474 an offline state. This inconsistency may be removed in one of the future
475 versions of VirtualBox by adding a new state.
476
477 <note internal="yes">
478 For whoever decides to touch this enum: In order to keep the
479 comparisons involving FirstOnline and LastOnline pseudo-states valid,
480 the numeric values of these states must be correspondingly updated if
481 needed: for any online VM state, the condition
482 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
483 @c true. The same relates to transient states for which
484 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
485 @c true.
486 </note>
487 </desc>
488
489 <const name="Null" value="0">
490 <desc>Null value (never used by the API).</desc>
491 </const>
492 <const name="PoweredOff" value="1">
493 <desc>
494 The machine is not running.
495 </desc>
496 </const>
497 <const name="Saved" value="2">
498 <desc>
499 The machine is not currently running, but the execution state of the machine
500 has been saved to an external file when it was running.
501 </desc>
502 </const>
503 <const name="Aborted" value="3">
504 <desc>
505 The process running the machine has terminated abnormally.
506 </desc>
507 </const>
508 <const name="Running" value="4">
509 <desc>
510 The machine is currently being executed.
511 <note internal="yes">
512 For whoever decides to touch this enum: In order to keep the
513 comparisons in the old source code valid, this state must immediately
514 precede the Paused state.
515 </note>
516 </desc>
517 </const>
518 <const name="Paused" value="5">
519 <desc>
520 Execution of the machine has been paused.
521 <note internal="yes">
522 For whoever decides to touch this enum: In order to keep the
523 comparisons in the old source code valid, this state must immediately
524 follow the Running state.
525 </note>
526 </desc>
527 </const>
528 <const name="Stuck" value="6">
529 <desc>
530 Execution of the machine has reached the "Guru Meditation"
531 condition.
532 </desc>
533 </const>
534 <const name="Starting" value="7">
535 <desc>
536 Machine is being started after powering it on from a
537 zero execution state.
538 </desc>
539 </const>
540 <const name="Stopping" value="8">
541 <desc>
542 Machine is being normally stopped powering it off, or after the guest OS
543 has initiated a shutdown sequence.
544 </desc>
545 </const>
546 <const name="Saving" value="9">
547 <desc>
548 Machine is saving its execution state to a file or an online
549 snapshot of the machine is being taken.
550 </desc>
551 </const>
552 <const name="Restoring" value="10">
553 <desc>
554 Execution state of the machine is being restored from a file
555 after powering it on from the saved execution state.
556 </desc>
557 </const>
558 <const name="Discarding" value="11">
559 <desc>
560 Snapshot of the machine is being discarded.
561 </desc>
562 </const>
563 <const name="SettingUp" value="12">
564 <desc>
565 Lengthy setup operation is in progress.
566 </desc>
567 </const>
568
569 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
570 <desc>
571 Pseudo-state: first online state (for use in relational expressions).
572 </desc>
573 </const>
574 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
575 <desc>
576 Pseudo-state: last online state (for use in relational expressions).
577 </desc>
578 </const>
579
580 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
581 <desc>
582 Pseudo-state: first transient state (for use in relational expressions).
583 </desc>
584 </const>
585 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
586 <desc>
587 Pseudo-state: last transient state (for use in relational expressions).
588 </desc>
589 </const>
590
591 </enum>
592
593 <enum
594 name="SessionState"
595 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
596 >
597 <desc>
598 Session state. This enumeration represents possible values of
599 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
600 attributes. See individual enumerator descriptions for the meaning for
601 every value.
602 </desc>
603
604 <const name="Null" value="0">
605 <desc>Null value (never used by the API).</desc>
606 </const>
607 <const name="Closed" value="1">
608 <desc>
609 The machine has no open sessions (<link to="IMachine::sessionState"/>);
610 the session is closed (<link to="ISession::state"/>)
611 </desc>
612 </const>
613 <const name="Open" value="2">
614 <desc>
615 The machine has an open direct session (<link to="IMachine::sessionState"/>);
616 the session is open (<link to="ISession::state"/>)
617 </desc>
618 </const>
619 <const name="Spawning" value="3">
620 <desc>
621 A new (direct) session is being opened for the machine
622 as a result of <link to="IVirtualBox::openRemoteSession"/>
623 call (<link to="IMachine::sessionState"/>);
624 the session is currently being opened
625 as a result of <link to="IVirtualBox::openRemoteSession"/>
626 call (<link to="ISession::state"/>)
627 </desc>
628 </const>
629 <const name="Closing" value="4">
630 <desc>
631 The direct session is being closed (<link to="IMachine::sessionState"/>);
632 the session is being closed (<link to="ISession::state"/>)
633 </desc>
634 </const>
635 </enum>
636
637 <enum
638 name="SessionType"
639 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
640 >
641 <desc>
642 Session type. This enumeration represents possible values of the
643 <link to="ISession::type"/> attribute.
644 </desc>
645
646 <const name="Null" value="0">
647 <desc>Null value (never used by the API).</desc>
648 </const>
649 <const name="Direct" value="1">
650 <desc>
651 Direct session
652 (opened by <link to="IVirtualBox::openSession"/>)
653 </desc>
654 </const>
655 <const name="Remote" value="2">
656 <desc>
657 Remote session
658 (opened by <link to="IVirtualBox::openRemoteSession"/>)
659 </desc>
660 </const>
661 <const name="Existing" value="3">
662 <desc>
663 Existing session
664 (opened by <link to="IVirtualBox::openExistingSession"/>)
665 </desc>
666 </const>
667 </enum>
668
669 <enum
670 name="DeviceType"
671 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
672 >
673 <desc>
674 Device type.
675 </desc>
676 <const name="Null" value="0">
677 <desc>
678 Null value, may also mean "no device" (not allowed for
679 <link to="IConsole::getDeviceActivity"/>).
680 </desc>
681 </const>
682 <const name="Floppy" value="1">
683 <desc>Floppy device.</desc>
684 </const>
685 <const name="DVD" value="2">
686 <desc>CD/DVD-ROM device.</desc>
687 </const>
688 <const name="HardDisk" value="3">
689 <desc>Hard disk device.</desc>
690 </const>
691 <const name="Network" value="4">
692 <desc>Network device.</desc>
693 </const>
694 <const name="USB" value="5">
695 <desc>USB device.</desc>
696 </const>
697 <const name="SharedFolder" value="6">
698 <desc>Shared folder device.</desc>
699 </const>
700 </enum>
701
702 <enum
703 name="DeviceActivity"
704 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
705 >
706 <desc>
707 Device activity for <link to="IConsole::getDeviceActivity"/>.
708 </desc>
709
710 <const name="Null" value="0"/>
711 <const name="Idle" value="1"/>
712 <const name="Reading" value="2"/>
713 <const name="Writing" value="3"/>
714 </enum>
715
716 <enum
717 name="ClipboardMode"
718 uuid="33364716-4008-4701-8f14-be0fa3d62950"
719 >
720 <desc>
721 Host-Guest clipboard interchange mode.
722 </desc>
723
724 <const name="Disabled" value="0"/>
725 <const name="HostToGuest" value="1"/>
726 <const name="GuestToHost" value="2"/>
727 <const name="Bidirectional" value="3"/>
728 </enum>
729
730 <enum
731 name="Scope"
732 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
733 >
734 <desc>
735 Scope of the operation.
736
737 A generic enumeration used in various methods to define the action or
738 argument scope.
739 </desc>
740
741 <const name="Global" value="0"/>
742 <const name="Machine" value="1"/>
743 <const name="Session" value="2"/>
744 </enum>
745
746 <enum
747 name="GuestStatisticType"
748 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
749 >
750 <desc>
751 Statistics type for <link to="IGuest::getStatistic"/>.
752 </desc>
753
754 <const name="CPULoad_Idle" value="0">
755 <desc>
756 Idle CPU load (0-100%) for last interval.
757 </desc>
758 </const>
759 <const name="CPULoad_Kernel" value="1">
760 <desc>
761 Kernel CPU load (0-100%) for last interval.
762 </desc>
763 </const>
764 <const name="CPULoad_User" value="2">
765 <desc>
766 User CPU load (0-100%) for last interval.
767 </desc>
768 </const>
769 <const name="Threads" value="3">
770 <desc>
771 Total number of threads in the system.
772 </desc>
773 </const>
774 <const name="Processes" value="4">
775 <desc>
776 Total number of processes in the system.
777 </desc>
778 </const>
779 <const name="Handles" value="5">
780 <desc>
781 Total number of handles in the system.
782 </desc>
783 </const>
784 <const name="MemoryLoad" value="6">
785 <desc>
786 Memory load (0-100%).
787 </desc>
788 </const>
789 <const name="PhysMemTotal" value="7">
790 <desc>
791 Total physical memory in megabytes.
792 </desc>
793 </const>
794 <const name="PhysMemAvailable" value="8">
795 <desc>
796 Free physical memory in megabytes.
797 </desc>
798 </const>
799 <const name="PhysMemBalloon" value="9">
800 <desc>
801 Ballooned physical memory in megabytes.
802 </desc>
803 </const>
804 <const name="MemCommitTotal" value="10">
805 <desc>
806 Total amount of memory in the committed state in megabytes.
807 </desc>
808 </const>
809 <const name="MemKernelTotal" value="11">
810 <desc>
811 Total amount of memory used by the guest OS's kernel in megabytes.
812 </desc>
813 </const>
814 <const name="MemKernelPaged" value="12">
815 <desc>
816 Total amount of paged memory used by the guest OS's kernel in megabytes.
817 </desc>
818 </const>
819 <const name="MemKernelNonpaged" value="13">
820 <desc>
821 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
822 </desc>
823 </const>
824 <const name="MemSystemCache" value="14">
825 <desc>
826 Total amount of memory used by the guest OS's system cache in megabytes.
827 </desc>
828 </const>
829 <const name="PageFileSize" value="15">
830 <desc>
831 Pagefile size in megabytes.
832 </desc>
833 </const>
834 <const name="SampleNumber" value="16">
835 <desc>
836 Statistics sample number
837 </desc>
838 </const>
839 <const name="MaxVal" value="17"/>
840 </enum>
841
842 <enum
843 name="BIOSBootMenuMode"
844 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
845 >
846 <desc>
847 BIOS boot menu mode.
848 </desc>
849
850 <const name="Disabled" value="0"/>
851 <const name="MenuOnly" value="1"/>
852 <const name="MessageAndMenu" value="2"/>
853 </enum>
854
855 <enum
856 name="DriveState"
857 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
858 >
859 <const name="Null" value="0">
860 <desc>Null value (never used by the API).</desc>
861 </const>
862 <const name="NotMounted" value="1"/>
863 <const name="ImageMounted" value="2"/>
864 <const name="HostDriveCaptured" value="3"/>
865 </enum>
866
867 <enum
868 name="ProcessorFeature"
869 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
870 >
871 <desc>
872 CPU features.
873 </desc>
874
875 <const name="HWVirtEx" value="0"/>
876 <const name="PAE" value="1"/>
877 <const name="LongMode" value="2"/>
878 </enum>
879
880
881 <!--
882 // IVirtualBoxErrorInfo
883 /////////////////////////////////////////////////////////////////////////
884 -->
885
886 <interface
887 name="IVirtualBoxErrorInfo" extends="$errorinfo"
888 uuid="bcae7fc3-3fd0-4bac-923c-ec1596c7bc83"
889 supportsErrorInfo="no"
890 wsmap="suppress"
891 >
892 <desc>
893 The IVirtualBoxErrorInfo interface represents extended error information.
894
895 Extended error information can be set by VirtualBox components after
896 unsuccessful or partially successful method invocation. This information
897 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
898 and then shown to the client in addition to the plain 32-bit result code.
899
900 In MS COM, this interface extends the IErrorInfo interface,
901 in XPCOM, it extends the nsIException interface. In both cases,
902 it provides a set of common attributes to retrieve error
903 information.
904
905 Sometimes invocation of some component's method may involve methods of
906 other components that may also fail (independently of this method's
907 failure), or a series of non-fatal errors may precede a fatal error that
908 causes method failure. In cases like that, it may be desirable to preserve
909 information about all errors happened during method invocation and deliver
910 it to the caller. The <link to="#next"/> attribute is intended
911 specifically for this purpose and allows to represent a chain of errors
912 through a single IVirtualBoxErrorInfo object set after method invocation.
913
914 Note that errors are stored to a chain in the reverse order, i.e. the
915 initial error object you query right after method invocation is the last
916 error set by the callee, the object it points to in the @a next attribute
917 is the previous error and so on, up to the first error (which is the last
918 in the chain).
919 </desc>
920
921 <attribute name="resultCode" type="long" readonly="yes">
922 <desc>
923 Result code of the error.
924 Usually, it will be the same as the result code returned
925 by the method that provided this error information, but not
926 always. For example, on Win32, CoCreateInstance() will most
927 likely return E_NOINTERFACE upon unsuccessful component
928 instantiation attempt, but not the value the component factory
929 returned. Value is typed 'long', not 'result',
930 to make interface usable from scripting languages.
931 <note>
932 In MS COM, there is no equivalent.
933 In XPCOM, it is the same as nsIException::result.
934 </note>
935 </desc>
936 </attribute>
937
938 <attribute name="interfaceID" type="uuid" readonly="yes">
939 <desc>
940 UUID of the interface that defined the error.
941 <note>
942 In MS COM, it is the same as IErrorInfo::GetGUID.
943 In XPCOM, there is no equivalent.
944 </note>
945 </desc>
946 </attribute>
947
948 <attribute name="component" type="wstring" readonly="yes">
949 <desc>
950 Name of the component that generated the error.
951 <note>
952 In MS COM, it is the same as IErrorInfo::GetSource.
953 In XPCOM, there is no equivalent.
954 </note>
955 </desc>
956 </attribute>
957
958 <attribute name="text" type="wstring" readonly="yes">
959 <desc>
960 Text description of the error.
961 <note>
962 In MS COM, it is the same as IErrorInfo::GetDescription.
963 In XPCOM, it is the same as nsIException::message.
964 </note>
965 </desc>
966 </attribute>
967
968 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
969 <desc>
970 Next error object if there is any, or @c null otherwise.
971 <note>
972 In MS COM, there is no equivalent.
973 In XPCOM, it is the same as nsIException::inner.
974 </note>
975 </desc>
976 </attribute>
977
978 </interface>
979
980
981 <!--
982 // IVirtualBox
983 /////////////////////////////////////////////////////////////////////////
984 -->
985
986 <interface
987 name="IVirtualBoxCallback" extends="$unknown"
988 uuid="2990059f-5bc8-4635-8415-658917cd3186"
989 wsmap="suppress"
990 >
991 <method name="onMachineStateChange">
992 <desc>
993 The execution state of the given machine has changed.
994 <see>IMachine::state</see>
995 </desc>
996 <param name="machineId" type="wstring" dir="in">
997 <desc>ID of the machine this event relates to.</desc>
998 </param>
999 <param name="state" type="MachineState" dir="in">
1000 <desc>New execution state.</desc>
1001 </param>
1002 </method>
1003
1004 <method name="onMachineDataChange">
1005 <desc>
1006 Any of the settings of the given machine has changed.
1007 </desc>
1008 <param name="machineId" type="wstring" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 </method>
1012
1013 <method name="onExtraDataCanChange">
1014 <desc>
1015 Notification when someone tries to change extra data for
1016 either the given machine or (if @c null) global extra data.
1017 This gives the chance to veto against changes.
1018 </desc>
1019 <param name="machineId" type="wstring" dir="in">
1020 <desc>
1021 ID of the machine this event relates to
1022 (@c null ID for global extra data change requests).
1023 </desc>
1024 </param>
1025 <param name="key" type="wstring" dir="in">
1026 <desc>
1027 Extra data key for the attempted write.
1028 </desc>
1029 </param>
1030 <param name="value" type="wstring" dir="in">
1031 <desc>
1032 Extra data value for the given key.
1033 </desc>
1034 </param>
1035 <param name="error" type="wstring" dir="out">
1036 <desc>
1037 Optional error message describing the reason of the
1038 veto (ignored if this notification returns @c true).
1039 </desc>
1040 </param>
1041 <param name="allowChange" type="boolean" dir="return">
1042 <desc>
1043 Flag to indicate whether the callee agrees (@c true)
1044 or vetoes against the change (@c false).
1045 </desc>
1046 </param>
1047 </method>
1048
1049 <method name="onExtraDataChange">
1050 <desc>
1051 Notification when machine specific or global extra data
1052 has changed.
1053 </desc>
1054 <param name="machineId" type="wstring" dir="in">
1055 <desc>
1056 ID of the machine this event relates to.
1057 Null for global extra data changes.
1058 </desc>
1059 </param>
1060 <param name="key" type="wstring" dir="in">
1061 <desc>
1062 Extra data key that has changed.
1063 </desc>
1064 </param>
1065 <param name="value" type="wstring" dir="in">
1066 <desc>
1067 Extra data value for the given key.
1068 </desc>
1069 </param>
1070 </method>
1071
1072 <method name="onMediaRegistered">
1073 <desc>
1074 The given media was registered or unregistered
1075 within this VirtualBox installation.
1076
1077 The @a mediaType parameter describes what type of
1078 media the specified @a mediaId refers to. Possible
1079 values are:
1080
1081 <ul>
1082 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1083 that, if registered, can be obtained using the
1084 <link to="IVirtualBox::getHardDisk"/> call.</li>
1085 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1086 that, if registered, can be obtained using the
1087 <link to="IVirtualBox::getDVDImage"/> call.</li>
1088 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1089 that, if registered, can be obtained using the
1090 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1091 </ul>
1092
1093 Note that if this is a deregistration notification,
1094 there is no way to access the object representing the
1095 unregistered media. It is supposed that the
1096 application will do required cleanup based on the
1097 @a mediaId value.
1098 </desc>
1099 <param name="mediaId" type="wstring" dir="in">
1100 <desc>ID of the media this event relates to.</desc>
1101 </param>
1102 <param name="mediaType" type="DeviceType" dir="in">
1103 <desc>Type of the media this event relates to.</desc>
1104 </param>
1105 <param name="registered" type="boolean" dir="in">
1106 <desc>
1107 If @c true, the media was registered, otherwise it was
1108 unregistered.
1109 </desc>
1110 </param>
1111 </method>
1112
1113 <method name="onMachineRegistered">
1114 <desc>
1115 The given machine was registered or unregistered
1116 within this VirtualBox installation.
1117 </desc>
1118 <param name="machineId" type="wstring" dir="in">
1119 <desc>ID of the machine this event relates to.</desc>
1120 </param>
1121 <param name="registered" type="boolean" dir="in">
1122 <desc>
1123 If @c true, the machine was registered, otherwise it was
1124 unregistered.
1125 </desc>
1126 </param>
1127 </method>
1128
1129 <method name="onSessionStateChange">
1130 <desc>
1131 The state of the session for the given machine was changed.
1132 <see>IMachine::sessionState</see>
1133 </desc>
1134 <param name="machineId" type="wstring" dir="in">
1135 <desc>ID of the machine this event relates to.</desc>
1136 </param>
1137 <param name="state" type="SessionState" dir="in">
1138 <desc>New session state.</desc>
1139 </param>
1140 </method>
1141
1142 <method name="onSnapshotTaken">
1143 <desc>
1144 A new snapshot of the machine has been taken.
1145 <see>ISnapshot</see>
1146 </desc>
1147 <param name="machineId" type="wstring" dir="in">
1148 <desc>ID of the machine this event relates to.</desc>
1149 </param>
1150 <param name="snapshotId" type="wstring" dir="in">
1151 <desc>ID of the new snapshot.</desc>
1152 </param>
1153 </method>
1154
1155 <method name="onSnapshotDiscarded">
1156 <desc>
1157 Snapshot of the given machine has been discarded.
1158
1159 <note>
1160 This notification is delivered <b>after</b> the snapshot
1161 object has been uninitialized on the server (so that any
1162 attempt to call its methods will return an error).
1163 </note>
1164
1165 <see>ISnapshot</see>
1166 </desc>
1167 <param name="machineId" type="wstring" dir="in">
1168 <desc>ID of the machine this event relates to.</desc>
1169 </param>
1170 <param name="snapshotId" type="wstring" dir="in">
1171 <desc>
1172 ID of the discarded snapshot. @c null means the current machine
1173 state has been discarded (restored from the current snapshot).
1174 </desc>
1175 </param>
1176 </method>
1177
1178 <method name="onSnapshotChange">
1179 <desc>
1180 Snapshot properties (name and/or description) have been changed.
1181 <see>ISnapshot</see>
1182 </desc>
1183 <param name="machineId" type="wstring" dir="in">
1184 <desc>ID of the machine this event relates to.</desc>
1185 </param>
1186 <param name="snapshotId" type="wstring" dir="in">
1187 <desc>ID of the changed snapshot.</desc>
1188 </param>
1189 </method>
1190
1191 <method name="onGuestPropertyChange">
1192 <desc>
1193 Notification when a guest property has changed.
1194 </desc>
1195 <param name="machineId" type="wstring" dir="in">
1196 <desc>
1197 ID of the machine this event relates to.
1198 </desc>
1199 </param>
1200 <param name="name" type="wstring" dir="in">
1201 <desc>
1202 The name of the property that has changed.
1203 </desc>
1204 </param>
1205 <param name="value" type="wstring" dir="in">
1206 <desc>
1207 The new property value.
1208 </desc>
1209 </param>
1210 <param name="flags" type="wstring" dir="in">
1211 <desc>
1212 The new property flags.
1213 </desc>
1214 </param>
1215 </method>
1216
1217 </interface>
1218
1219 <interface
1220 name="IDHCPServer" extends="$unknown"
1221 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1222 wsmap="managed"
1223 >
1224 <desc>
1225 The IDHCPServer interface represents the vbox dhcp server configuration.
1226
1227 To enumerate all the dhcp servers on the host, use the
1228 <link to="IVirtualBox::DHCPServers"/> attribute.
1229 </desc>
1230
1231 <attribute name="enabled" type="boolean">
1232 <desc>
1233 specifies if the dhcp server is enabled
1234 </desc>
1235 </attribute>
1236
1237 <attribute name="IPAddress" type="wstring" readonly="yes">
1238 <desc>
1239 specifies server IP
1240 </desc>
1241 </attribute>
1242
1243 <attribute name="networkMask" type="wstring" readonly="yes">
1244 <desc>
1245 specifies server network mask
1246 </desc>
1247 </attribute>
1248
1249 <attribute name="networkName" type="wstring" readonly="yes">
1250 <desc>
1251 specifies internal network name the server is used for
1252 </desc>
1253 </attribute>
1254
1255 <attribute name="lowerIP" type="wstring" readonly="yes">
1256 <desc>
1257 specifies from IP adrres in server address range
1258 </desc>
1259 </attribute>
1260
1261 <attribute name="upperIP" type="wstring" readonly="yes">
1262 <desc>
1263 specifies to IP adrres in server address range
1264 </desc>
1265 </attribute>
1266
1267 <method name="setConfiguration">
1268 <desc>
1269 configures the server
1270 <result name="E_INVALIDARG">
1271 invalid configuration supplied
1272 </result>
1273 </desc>
1274 <param name="IPAddress" type="wstring" dir="in">
1275 <desc>
1276 server IP address
1277 </desc>
1278 </param>
1279 <param name="networkMask" type="wstring" dir="in">
1280 <desc>
1281 server network mask
1282 </desc>
1283 </param>
1284 <param name="FromIPAddress" type="wstring" dir="in">
1285 <desc>
1286 server From IP address for address range
1287 </desc>
1288 </param>
1289 <param name="ToIPAddress" type="wstring" dir="in">
1290 <desc>
1291 server To IP address for address range
1292 </desc>
1293 </param>
1294 </method>
1295
1296 <method name="start">
1297 <desc>
1298 Starts DHCP server process.
1299 <result name="E_FAIL">
1300 Failed to start the process.
1301 </result>
1302 </desc>
1303 <param name="networkName" type="wstring" dir="in">
1304 <desc>
1305 Name of internal network DHCP server should attach to.
1306 </desc>
1307 </param>
1308 <param name="trunkName" type="wstring" dir="in">
1309 <desc>
1310 Name of internal network trunk.
1311 </desc>
1312 </param>
1313 <param name="trunkType" type="wstring" dir="in">
1314 <desc>
1315 Type of internal network trunk.
1316 </desc>
1317 </param>
1318 </method>
1319
1320 <method name="stop">
1321 <desc>
1322 Stops DHCP server process.
1323 <result name="E_FAIL">
1324 Failed to stop the process.
1325 </result>
1326 </desc>
1327 </method>
1328 </interface>
1329
1330 <interface
1331 name="IVirtualBox" extends="$dispatched"
1332 uuid="3f4ab53a-199b-4526-a91a-93ff62e456b8"
1333 wsmap="managed"
1334 >
1335 <desc>
1336 The IVirtualBox interface represents the main interface exposed by the
1337 product that provides virtual machine management.
1338
1339 An instance of IVirtualBox is required for the product to do anything
1340 useful. Even though the interface does not expose this, internally,
1341 IVirtualBox is implemented as a singleton and actually lives in the
1342 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1343 IVirtualBox can track the state of all virtual machines on a particular
1344 host, regardless of which frontend started them.
1345
1346 To enumerate all the virtual machines on the host, use the
1347 <link to="IVirtualBox::machines"/> attribute.
1348 </desc>
1349
1350 <attribute name="version" type="wstring" readonly="yes">
1351 <desc>
1352 A string representing the version number of the product. The
1353 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1354 last number represents the build number and will frequently change.
1355 </desc>
1356 </attribute>
1357
1358 <attribute name="revision" type="unsigned long" readonly="yes">
1359 <desc>
1360 The internal build revision number of the product.
1361 </desc>
1362 </attribute>
1363
1364 <attribute name="packageType" type="wstring" readonly="yes">
1365 <desc>
1366 A string representing the package type of this product. The
1367 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1368 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1369 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1370 this.
1371 </desc>
1372 </attribute>
1373
1374 <attribute name="homeFolder" type="wstring" readonly="yes">
1375 <desc>
1376 Full path to the directory where the global settings file,
1377 <tt>VirtualBox.xml</tt>, is stored.
1378
1379 In this version of VirtualBox, the value of this property is
1380 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1381 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1382 as determined by the host OS), and cannot be changed.
1383
1384 This path is also used as the base to resolve relative paths in
1385 places where relative paths are allowed (unless otherwise
1386 expressly indicated).
1387 </desc>
1388 </attribute>
1389
1390 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1391 <desc>
1392 Full name of the global settings file.
1393 The value of this property corresponds to the value of
1394 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1395 </desc>
1396 </attribute>
1397
1398 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1399 <desc>
1400 Current version of the format of the global VirtualBox settings file
1401 (<tt>VirtualBox.xml</tt>).
1402
1403 The version string has the following format:
1404 <pre>
1405 x.y-platform
1406 </pre>
1407 where @c x and @c y are the major and the minor format
1408 versions, and @c platform is the platform identifier.
1409
1410 The current version usually matches the value of the
1411 <link to="#settingsFormatVersion"/> attribute unless the
1412 settings file was created by an older version of VirtualBox and there
1413 was a change of the settings file format since then.
1414
1415 Note that VirtualBox automatically converts settings files from older
1416 versions to the most recent version when reading them (usually at
1417 VirtualBox startup) but it doesn't save the changes back until
1418 you call a method that implicitly saves settings (such as
1419 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1420 explicitly. Therefore, if the value of this attribute differs from the
1421 value of <link to="#settingsFormatVersion"/>, then it
1422 means that the settings file was converted but the result of the
1423 conversion is not yet saved to disk.
1424
1425 The above feature may be used by interactive front-ends to inform users
1426 about the settings file format change and offer them to explicitly save
1427 all converted settings files (the global and VM-specific ones),
1428 optionally create backup copies of the old settings files before saving,
1429 etc.
1430
1431 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1432 </desc>
1433 </attribute>
1434
1435 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1436 <desc>
1437 Most recent version of the settings file format.
1438
1439 The version string has the following format:
1440 <pre>
1441 x.y-platform
1442 </pre>
1443 where @c x and @c y are the major and the minor format
1444 versions, and @c platform is the platform identifier.
1445
1446 VirtualBox uses this version of the format when saving settings files
1447 (either as a result of method calls that require to save settings or as
1448 a result of an explicit call to <link to="#saveSettings"/>).
1449
1450 <see>settingsFileVersion</see>
1451 </desc>
1452 </attribute>
1453
1454 <attribute name="host" type="IHost" readonly="yes">
1455 <desc>Associated host object.</desc>
1456 </attribute>
1457
1458 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1459 <desc>Associated system information object.</desc>
1460 </attribute>
1461
1462 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1463 <desc>
1464 Array of machine objects registered within this VirtualBox instance.
1465 </desc>
1466 </attribute>
1467
1468 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1469 <desc>
1470 Array of hard disk objects known to this VirtualBox installation.
1471
1472 This array contains only base (root) hard disks. All differencing
1473 hard disks of the given base hard disk can be enumerated using
1474 <link to="IHardDisk::children"/>.
1475 </desc>
1476 </attribute>
1477
1478 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1479 <desc>
1480 Array of CD/DVD image objects registered with this VirtualBox instance.
1481 </desc>
1482 </attribute>
1483
1484 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1485 <desc>
1486 Array of floppy image objects registered with this VirtualBox instance.
1487 </desc>
1488 </attribute>
1489
1490 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1491
1492 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1493
1494 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1495 <desc>
1496 Collection of global shared folders. Global shared folders are
1497 available to all virtual machines.
1498
1499 New shared folders are added to the collection using
1500 <link to="#createSharedFolder"/>. Existing shared folders can be
1501 removed using <link to="#removeSharedFolder"/>.
1502
1503 <note>
1504 In the current version of the product, global shared folders are not
1505 implemented and therefore this collection is always empty.
1506 </note>
1507 </desc>
1508 </attribute>
1509
1510 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1511 <desc>
1512 Associated performance collector object.
1513 </desc>
1514 </attribute>
1515
1516 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1517 <desc>
1518 dhcp server settings.
1519 </desc>
1520 </attribute>
1521
1522 <method name="createMachine">
1523 <desc>
1524 Creates a new virtual machine.
1525
1526 The new machine is created unregistered, with the initial configuration
1527 set according to the specified guest OS type. A typical sequence of
1528 actions to create a new virtual machine is as follows:
1529
1530 <ol>
1531 <li>
1532 Call this method to have a new machine created. The returned machine
1533 object will be "mutable" allowing to change any machine property.
1534 </li>
1535
1536 <li>
1537 Configure the machine using the appropriate attributes and methods.
1538 </li>
1539
1540 <li>
1541 Call <link to="IMachine::saveSettings" /> to write the settings
1542 to the machine's XML settings file. The configuration of the newly
1543 created machine will not be saved to disk until this method is
1544 called.
1545 </li>
1546
1547 <li>
1548 Call <link to="#registerMachine" /> to add the machine to the list
1549 of machines known to VirtualBox.
1550 </li>
1551 </ol>
1552
1553 You should specify valid name for the newly created machine when calling
1554 this method. See the <link to="IMachine::name"/> attribute description
1555 for more details about the machine name.
1556
1557 The specified guest OS type identifier must match an ID of one of known
1558 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1559 array.
1560
1561 Every machine has a <i>settings file</i> that is used to store
1562 the machine configuration. This file is stored in a directory called the
1563 <i>machine settings subfolder</i>. Both the settings subfolder and file
1564 will have a name that corresponds to the name of the virtual machine.
1565 You can specify where to create the machine setting subfolder using the
1566 @a baseFolder argument. The base folder can be absolute (full path) or
1567 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1568 directory</link>.
1569
1570 If @a baseFolder is a @c null or empty string (which is recommended), the
1571 <link to="ISystemProperties::defaultMachineFolder">default machine
1572 settings folder</link> will be used as a base folder for the created
1573 machine. Otherwise the given base folder will be used. In either case,
1574 the full path to the resulting settings file has the following
1575 structure:
1576 <pre>
1577 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1578 </pre>
1579
1580 Note that if the resulting settings file already exists, this method
1581 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1582
1583 Optionally, you may specify an UUID of to assign to the created machine.
1584 However, this is not recommended and you should normally pass an empty
1585 (@c null) UUID to this method so that a new UUID will be automatically
1586 generated for every created machine. You can use UUID
1587 00000000-0000-0000-0000-000000000000 as @c null value.
1588
1589 <note>
1590 There is no way to change the name of the settings file or
1591 subfolder of the created machine directly.
1592 </note>
1593
1594 <result name="VBOX_E_OBJECT_NOT_FOUND">
1595 @a osTypeId is invalid.
1596 </result>
1597 <result name="VBOX_E_FILE_ERROR">
1598 Resulting settings file name is invalid or the settings file already
1599 exists or could not be created due to an I/O error.
1600 </result>
1601 <result name="E_INVALIDARG">
1602 @a name is empty or @c null.
1603 </result>
1604 </desc>
1605
1606 <param name="name" type="wstring" dir="in">
1607 <desc>Machine name.</desc>
1608 </param>
1609 <param name="osTypeId" type="wstring" dir="in">
1610 <desc>Guest OS Type ID.</desc>
1611 </param>
1612 <param name="baseFolder" type="wstring" dir="in">
1613 <desc>Base machine folder (optional).</desc>
1614 </param>
1615 <param name="id" type="wstring" dir="in">
1616 <desc>Machine UUID (optional).</desc>
1617 </param>
1618 <param name="machine" type="IMachine" dir="return">
1619 <desc>Created machine object.</desc>
1620 </param>
1621 </method>
1622
1623 <method name="createLegacyMachine">
1624 <desc>
1625 Creates a new virtual machine in "legacy" mode, using the specified
1626 settings file to store machine settings.
1627
1628 As opposed to machines created by <link to="#createMachine"/>,
1629 the settings file of the machine created in "legacy" mode is not
1630 automatically renamed when the machine name is changed -- it will always
1631 remain the same as specified in this method call.
1632
1633 The specified settings file name can be absolute (full path) or relative
1634 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1635 directory</link>. If the file name doesn't contain an extension, the
1636 default extension (.xml) will be appended.
1637
1638 Note that the configuration of the newly created machine is not
1639 saved to disk (and therefore no settings file is created)
1640 until <link to="IMachine::saveSettings"/> is called. If the
1641 specified settings file already exists, this method
1642 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1643
1644 See <link to="#createMachine"/> for more information.
1645
1646 @deprecated This method may be removed later. Use <link
1647 to="IVirtualBox::createMachine"/> instead.
1648
1649 <note>
1650 There is no way to change the name of the settings file
1651 of the machine created in "legacy" mode.
1652 </note>
1653
1654 <result name="VBOX_E_OBJECT_NOT_FOUND">
1655 @a osTypeId is invalid.
1656 </result>
1657 <result name="VBOX_E_FILE_ERROR">
1658 @a settingsFile is invalid or the settings file already exists or
1659 could not be created due to an I/O error.
1660 </result>
1661 <result name="E_INVALIDARG">
1662 @a name or @a settingsFile is empty or @c null.
1663 </result>
1664 </desc>
1665
1666 <param name="name" type="wstring" dir="in">
1667 <desc>Machine name.</desc>
1668 </param>
1669 <param name="osTypeId" type="wstring" dir="in">
1670 <desc>Machine OS Type ID.</desc>
1671 </param>
1672 <param name="settingsFile" type="wstring" dir="in">
1673 <desc>Name of the machine settings file.</desc>
1674 </param>
1675 <param name="id" type="wstring" dir="in">
1676 <desc>Machine UUID (optional).</desc>
1677 </param>
1678 <param name="machine" type="IMachine" dir="return">
1679 <desc>Created machine object.</desc>
1680 </param>
1681 </method>
1682
1683 <method name="openMachine">
1684 <desc>
1685 Opens a virtual machine from the existing settings file.
1686 The opened machine remains unregistered until you call
1687 <link to="#registerMachine"/>.
1688
1689 The specified settings file name can be absolute
1690 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1691 VirtualBox home directory</link>. This file must exist
1692 and must be a valid machine settings file whose contents
1693 will be used to construct the machine object.
1694
1695 @deprecated Will be removed soon.
1696 <result name="VBOX_E_FILE_ERROR">
1697 Settings file name invalid, not found or sharing violation.
1698 </result>
1699 </desc>
1700 <param name="settingsFile" type="wstring" dir="in">
1701 <desc>
1702 Name of the machine settings file.
1703 </desc>
1704 </param>
1705 <param name="machine" type="IMachine" dir="return">
1706 <desc>Opened machine object.</desc>
1707 </param>
1708 <note>
1709 <link to="IMachine::settingsModified"/> will return
1710 @c false for the created machine, until any of machine settings
1711 are changed.
1712 </note>
1713 </method>
1714
1715 <method name="registerMachine">
1716 <desc>
1717
1718 Registers the machine previously created using
1719 <link to="#createMachine"/> or opened using
1720 <link to="#openMachine"/> within this VirtualBox installation. After
1721 successful method invocation, the
1722 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1723 to all registered callbacks.
1724
1725 <note>
1726 This method implicitly calls <link to="IMachine::saveSettings"/>
1727 to save all current machine settings before registering it.
1728 </note>
1729
1730 <result name="VBOX_E_OBJECT_NOT_FOUND">
1731 No matching virtual machine found.
1732 </result>
1733 <result name="VBOX_E_INVALID_OBJECT_STATE">
1734 Virtual machine was not created within this VirtualBox instance.
1735 </result>
1736
1737 </desc>
1738 <param name="machine" type="IMachine" dir="in"/>
1739 </method>
1740
1741 <method name="getMachine">
1742 <desc>
1743 Attempts to find a virtual machine given its UUID.
1744 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1745 instead.
1746
1747 <result name="VBOX_E_OBJECT_NOT_FOUND">
1748 Could not find registered machine matching @a id.
1749 </result>
1750
1751 </desc>
1752 <param name="id" type="wstring" dir="in"/>
1753 <param name="machine" type="IMachine" dir="return"/>
1754 </method>
1755
1756 <method name="findMachine">
1757 <desc>
1758 Attempts to find a virtual machine given its name.
1759 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1760 instead.
1761
1762 <result name="VBOX_E_OBJECT_NOT_FOUND">
1763 Could not find registered machine matching @a name.
1764 </result>
1765
1766 </desc>
1767 <param name="name" type="wstring" dir="in"/>
1768 <param name="machine" type="IMachine" dir="return"/>
1769 </method>
1770
1771 <method name="unregisterMachine">
1772 <desc>
1773
1774 Unregisters the machine previously registered using
1775 <link to="#registerMachine"/>. After successful method invocation, the
1776 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1777 to all registered callbacks.
1778
1779 <note>
1780 The specified machine must not be in the Saved state, have an open
1781 (or a spawning) direct session associated with it, have snapshots or
1782 have hard disks attached.
1783 </note>
1784
1785 <note>
1786 This method implicitly calls <link to="IMachine::saveSettings"/> to
1787 save all current machine settings before unregistering it.
1788 </note>
1789
1790 <note>
1791 If the given machine is inaccessible (see
1792 <link to="IMachine::accessible"/>), it will be unregistered and
1793 fully uninitialized right afterwards. As a result, the returned
1794 machine object will be unusable and an attempt to call
1795 <b>any</b> method will return the "Object not ready" error.
1796 </note>
1797
1798 <result name="VBOX_E_OBJECT_NOT_FOUND">
1799 Could not find registered machine matching @a id.
1800 </result>
1801 <result name="VBOX_E_INVALID_VM_STATE">
1802 Machine is in Saved state.
1803 </result>
1804 <result name="VBOX_E_INVALID_OBJECT_STATE">
1805 Machine has snapshot or open session or hard disk attached.
1806 </result>
1807
1808 </desc>
1809 <param name="id" type="wstring" dir="in">
1810 <desc>UUID of the machine to unregister.</desc>
1811 </param>
1812 <param name="machine" type="IMachine" dir="return">
1813 <desc>Unregistered machine object.</desc>
1814 </param>
1815 </method>
1816
1817 <method name="createAppliance">
1818 <desc>
1819 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1820 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1821 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1822 </desc>
1823 <param name="appliance" type="IAppliance" dir="return">
1824 <desc>New appliance.</desc>
1825 </param>
1826 </method>
1827
1828 <method name="createHardDisk">
1829 <desc>
1830 Creates a new base hard disk object that will use the given storage
1831 format and location for hard disk data.
1832
1833 Note that the actual storage unit is not created by this method. In
1834 order to do it, and before you are able to attach the created hard disk
1835 to virtual machines, you must call one of the following methods to
1836 allocate a format-specific storage unit at the specified location:
1837 <ul>
1838 <li><link to="IHardDisk::createBaseStorage"/></li>
1839 <li><link to="IHardDisk::createDiffStorage"/></li>
1840 </ul>
1841
1842 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1843 remain uninitialized until the hard disk storage unit is successfully
1844 created by one of the above methods.
1845
1846 After the storage unit is successfully created, the hard disk gets
1847 remembered by this VirtualBox installation and will be accessible
1848 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1849 methods. Remembered root (base) hard disks are also returned as part of
1850 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1851
1852 The list of all storage formats supported by this VirtualBox
1853 installation can be obtained using
1854 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1855 attribute is empty or @c null then the default storage format
1856 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1857 be used for creating a storage unit of the hard disk.
1858
1859 Note that the format of the location string is storage format specific.
1860 See <link to="IMedium::location"/>, IHardDisk and
1861 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1862
1863 <result name="VBOX_E_OBJECT_NOT_FOUND">
1864 @a format identifier is invalid. See
1865 <link to="ISystemProperties::hardDiskFormats"/>.
1866 </result>
1867 <result name="VBOX_E_FILE_ERROR">
1868 @a location is a not valid file name (for file-based formats only).
1869 </result>
1870 </desc>
1871 <param name="format" type="wstring" dir="in">
1872 <desc>
1873 Identifier of the storage format to use for the new hard disk.
1874 </desc>
1875 </param>
1876 <param name="location" type="wstring" dir="in">
1877 <desc>
1878 Location of the storage unit for the new hard disk.
1879 </desc>
1880 </param>
1881 <param name="hardDisk" type="IHardDisk" dir="return">
1882 <desc>Created hard disk object.</desc>
1883 </param>
1884 </method>
1885
1886 <method name="openHardDisk">
1887 <desc>
1888 Opens a hard disk from an existing location, optionally replacing
1889 the image UUID and/or parent UUID.
1890
1891 After the hard disk is successfully opened by this method, it gets
1892 remembered by (known to) this VirtualBox installation and will be
1893 accessible through <link to="#getHardDisk"/> and
1894 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1895 are also returned as part of the <link to="#hardDisks"/> array and can
1896 be attached to virtual machines. See IHardDisk for more details.
1897
1898 If a differencing hard disk is to be opened by this method, the
1899 operation will succeed only if its parent hard disk and all ancestors,
1900 if any, are already known to this VirtualBox installation (for example,
1901 were opened by this method before).
1902
1903 This method tries to guess the storage format of the specified hard disk
1904 by reading hard disk data at the specified location.
1905
1906 If @a write is ReadWrite (which it should be), the image is opened for
1907 read/write access and must have according permissions, as VirtualBox
1908 may actually write status information into the disk's metadata sections.
1909
1910 Note that write access is required for all typical image usage in VirtualBox,
1911 since VirtualBox may need to write metadata such as a UUID into the image.
1912 The only exception is opening a source image temporarily for copying and
1913 cloning when the image will quickly be closed again.
1914
1915 Note that the format of the location string is storage format specific.
1916 See <link to="IMedium::location"/>, IHardDisk and
1917 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1918
1919 <result name="VBOX_E_FILE_ERROR">
1920 Invalid hard disk storage file location or could not find the hard
1921 disk at the specified location.
1922 </result>
1923 <result name="VBOX_E_IPRT_ERROR">
1924 Could not get hard disk storage format.
1925 </result>
1926 <result name="E_INVALIDARG">
1927 Invalid hard disk storage format.
1928 </result>
1929
1930 </desc>
1931 <param name="location" type="wstring" dir="in">
1932 <desc>
1933 Location of the storage unit that contains hard disk data in one of
1934 the supported storage formats.
1935 </desc>
1936 </param>
1937 <param name="accessMode" type="AccessMode" dir="in">
1938 <desc>
1939 Determines whether to open the image in read/write or read-only mode.
1940 </desc>
1941 </param>
1942 <param name="setImageId" type="boolean" dir="in">
1943 <desc>
1944 Select whether a new image UUID is set or not.
1945 </desc>
1946 </param>
1947 <param name="imageId" type="wstring" dir="in">
1948 <desc>
1949 New UUID for the image. If an empty string is passed, then a new
1950 UUID is automatically created. Specifying a zero UUIDs is not valid.
1951 </desc>
1952 </param>
1953 <param name="setParentId" type="boolean" dir="in">
1954 <desc>
1955 Select whether a new parent UUID is set or not.
1956 </desc>
1957 </param>
1958 <param name="parentId" type="wstring" dir="in">
1959 <desc>
1960 New parent UUID for the image. If an empty string is passed, then a
1961 new UUID is automatically created, provided @a setParentId is
1962 @c true. A zero UUID is valid.
1963 </desc>
1964 </param>
1965 <param name="hardDisk" type="IHardDisk" dir="return">
1966 <desc>Opened hard disk object.</desc>
1967 </param>
1968 </method>
1969
1970 <method name="getHardDisk" const="yes">
1971 <desc>
1972 Returns a hard disk with the given UUID.
1973
1974 The hard disk with the given UUID must be known to this VirtualBox
1975 installation, i.e. it must be previously created by
1976 <link to="#createHardDisk"/> or opened by <link
1977 to="#openHardDisk"/>, or attached to some known virtual machine.
1978
1979 <result name="VBOX_E_OBJECT_NOT_FOUND">
1980 No hard disk object matching @a id found.
1981 </result>
1982
1983 </desc>
1984 <param name="id" type="wstring" dir="in">
1985 <desc>UUID of the hard disk to look for.</desc>
1986 </param>
1987 <param name="hardDisk" type="IHardDisk" dir="return">
1988 <desc>Found hard disk object.</desc>
1989 </param>
1990 </method>
1991
1992 <method name="findHardDisk">
1993 <desc>
1994 Returns a hard disk that uses the given location to store hard
1995 disk data.
1996
1997 The given hard disk must be known to this VirtualBox installation, i.e.
1998 it must be previously created by
1999 <link to="#createHardDisk"/> or opened by <link
2000 to="#openHardDisk"/>, or attached to some known virtual machine.
2001
2002 The search is done by comparing the value of the @a location argument to
2003 the <link to="IHardDisk::location"/> attribute of each known hard
2004 disk.
2005
2006 For locations represented by file names in the host's file system, the
2007 requested location can be a path relative to the
2008 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2009 only a file name without any path is given, the
2010 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2011 folder</link> will be prepended to the file name before searching. Note
2012 that on case sensitive file systems, a case sensitive comparison is
2013 performed, otherwise the case of symbols in the file path is ignored.
2014
2015 <result name="VBOX_E_OBJECT_NOT_FOUND">
2016 No hard disk object matching @a location found.
2017 </result>
2018
2019 </desc>
2020 <param name="location" type="wstring" dir="in">
2021 <desc>Location string to search for.</desc>
2022 </param>
2023 <param name="hardDisk" type="IHardDisk" dir="return">
2024 <desc>Found hard disk object.</desc>
2025 </param>
2026 </method>
2027
2028 <method name="openDVDImage">
2029 <desc>
2030 Opens a CD/DVD image contained in the specified file of the supported
2031 format and assigns it the given UUID.
2032
2033 After the image is successfully opened by this method, it gets
2034 remembered by (known to) this VirtualBox installation and will be
2035 accessible through <link to="#getDVDImage"/> and
2036 <link to="#findDVDImage"/> methods. Remembered images are also
2037 returned as part of the <link to="#DVDImages"/> array and can be mounted
2038 to virtual machines. See IMedium for more details.
2039
2040 See <link to="IMedium::location"/> to get more details about the format
2041 of the location string.
2042
2043 <note>
2044 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2045 </note>
2046
2047 <result name="VBOX_E_FILE_ERROR">
2048 Invalid CD/DVD image file location or could not find the CD/DVD
2049 image at the specified location.
2050 </result>
2051 <result name="VBOX_E_INVALID_OBJECT_STATE">
2052 CD/DVD image already exists in the media registry.
2053 </result>
2054
2055 </desc>
2056 <param name="location" type="wstring" dir="in">
2057 <desc>
2058 Full path to the file that contains a valid CD/DVD image.
2059 </desc>
2060 </param>
2061 <param name="id" type="wstring" dir="in">
2062 <desc>
2063 UUID to assign to the given image within this VirtualBox installation.
2064 If an empty (@c null) UUID is specified, the system will randomly
2065 generate a new UUID.
2066 </desc>
2067 </param>
2068 <param name="image" type="IDVDImage" dir="return">
2069 <desc>Opened CD/DVD image object.</desc>
2070 </param>
2071 </method>
2072
2073 <method name="getDVDImage">
2074 <desc>
2075 Returns a CD/DVD image with the given UUID.
2076
2077 The image with the given UUID must be known to this VirtualBox
2078 installation, i.e. it must be previously opened by <link
2079 to="#openDVDImage"/>, or mounted to some known virtual machine.
2080
2081 <result name="VBOX_E_OBJECT_NOT_FOUND">
2082 No matching DVD image found in the media registry.
2083 </result>
2084
2085 </desc>
2086 <param name="id" type="wstring" dir="in">
2087 <desc>UUID of the image to look for.</desc>
2088 </param>
2089 <param name="image" type="IDVDImage" dir="return">
2090 <desc>Found CD/DVD image object.</desc>
2091 </param>
2092 </method>
2093
2094 <method name="findDVDImage">
2095 <desc>
2096 Returns a CD/DVD image with the given image location.
2097
2098 The image with the given UUID must be known to this VirtualBox
2099 installation, i.e. it must be previously opened by <link
2100 to="#openDVDImage"/>, or mounted to some known virtual machine.
2101
2102 The search is done by comparing the value of the @a location argument to
2103 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2104
2105 The requested location can be a path relative to the
2106 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2107 only a file name without any path is given, the
2108 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2109 folder</link> will be prepended to the file name before searching. Note
2110 that on case sensitive file systems, a case sensitive comparison is
2111 performed, otherwise the case in the file path is ignored.
2112
2113 <result name="VBOX_E_FILE_ERROR">
2114 Invalid image file location.
2115 </result>
2116 <result name="VBOX_E_OBJECT_NOT_FOUND">
2117 No matching DVD image found in the media registry.
2118 </result>
2119
2120 </desc>
2121 <param name="location" type="wstring" dir="in">
2122 <desc>CD/DVD image file path to look for.</desc>
2123 </param>
2124 <param name="image" type="IDVDImage" dir="return">
2125 <desc>Found CD/DVD image object.</desc>
2126 </param>
2127 </method>
2128
2129 <method name="openFloppyImage">
2130 <desc>
2131 Opens a floppy image contained in the specified file of the supported
2132 format and assigns it the given UUID.
2133
2134 After the image is successfully opened by this method, it gets
2135 remembered by (known to) this VirtualBox installation and will be
2136 accessible through <link to="#getFloppyImage"/> and
2137 <link to="#findFloppyImage"/> methods. Remembered images are also
2138 returned as part of the <link to="#floppyImages"/> array and can be
2139 mounted to virtual machines. See IMedium for more details.
2140
2141 See <link to="IMedium::location"/> to get more details about the format
2142 of the location string.
2143
2144 <result name="VBOX_E_FILE_ERROR">
2145 Invalid floppy image file location or could not find the floppy
2146 image at the specified location.
2147 </result>
2148 <result name="VBOX_E_INVALID_OBJECT_STATE">
2149 Floppy image already exists in the media registry.
2150 </result>
2151
2152 <note>
2153 Currently, only raw floppy images are supported by VirtualBox.
2154 </note>
2155 </desc>
2156 <param name="location" type="wstring" dir="in">
2157 <desc>
2158 Full path to the file that contains a valid floppy image.
2159 </desc>
2160 </param>
2161 <param name="id" type="wstring" dir="in">
2162 <desc>
2163 UUID to assign to the given image file within this VirtualBox
2164 installation. If an empty (@c null) UUID is specified, the system will
2165 randomly generate a new UUID.
2166 </desc>
2167 </param>
2168 <param name="image" type="IFloppyImage" dir="return">
2169 <desc>Opened floppy image object.</desc>
2170 </param>
2171 </method>
2172
2173 <method name="getFloppyImage">
2174 <desc>
2175 Returns a floppy image with the given UUID.
2176
2177 The image with the given UUID must be known to this VirtualBox
2178 installation, i.e. it must be previously opened by <link
2179 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2180
2181 <result name="VBOX_E_OBJECT_NOT_FOUND">
2182 No matching floppy image found in the media registry.
2183 </result>
2184
2185 </desc>
2186 <param name="id" type="wstring" dir="in">
2187 <desc>UUID of the image to look for.</desc>
2188 </param>
2189 <param name="image" type="IFloppyImage" dir="return">
2190 <desc>Found floppy image object.</desc>
2191 </param>
2192 </method>
2193
2194 <method name="findFloppyImage">
2195 <desc>
2196 Returns a floppy image with the given image location.
2197
2198 The image with the given UUID must be known to this VirtualBox
2199 installation, i.e. it must be previously opened by <link
2200 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2201
2202 The search is done by comparing the value of the @a location argument to
2203 the <link to="IMedium::location"/> attribute of each known floppy image.
2204
2205 The requested location can be a path relative to the
2206 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2207 only a file name without any path is given, the
2208 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2209 folder</link> will be prepended to the file name before searching. Note
2210 that on case sensitive file systems, a case sensitive comparison is
2211 performed, otherwise the case of symbols in the file path is ignored.
2212
2213 <result name="VBOX_E_FILE_ERROR">
2214 Invalid image file location.
2215 </result>
2216 <result name="VBOX_E_OBJECT_NOT_FOUND">
2217 No matching floppy image found in the media registry.
2218 </result>
2219
2220 </desc>
2221 <param name="location" type="wstring" dir="in">
2222 <desc>Floppy image file path to look for.</desc>
2223 </param>
2224 <param name="image" type="IFloppyImage" dir="return">
2225 <desc>Found floppy image object.</desc>
2226 </param>
2227 </method>
2228
2229 <method name="getGuestOSType">
2230 <desc>
2231 Returns an object describing the specified guest OS type.
2232
2233 The requested guest OS type is specified using a string which is a
2234 mnemonic identifier of the guest operating system, such as
2235 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2236 particular virtual machine can be read or set using the
2237 <link to="IMachine::OSTypeId"/> attribute.
2238
2239 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2240 available guest OS type objects. Each object has an
2241 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2242 the guest OS this object describes.
2243
2244 <result name="E_INVALIDARG">
2245 @a id is not a valid Guest OS type.
2246 </result>
2247
2248 </desc>
2249 <param name="id" type="wstring" dir="in">
2250 <desc>Guest OS type ID string.</desc>
2251 </param>
2252 <param name="type" type="IGuestOSType" dir="return">
2253 <desc>Guest OS type object.</desc>
2254 </param>
2255 </method>
2256
2257 <method name="createSharedFolder">
2258 <desc>
2259 Creates a new global shared folder by associating the given logical
2260 name with the given host path, adds it to the collection of shared
2261 folders and starts sharing it. Refer to the description of
2262 <link to="ISharedFolder"/> to read more about logical names.
2263 <note>
2264 In the current implementation, this operation is not
2265 implemented.
2266 </note>
2267 </desc>
2268 <param name="name" type="wstring" dir="in">
2269 <desc>Unique logical name of the shared folder.</desc>
2270 </param>
2271 <param name="hostPath" type="wstring" dir="in">
2272 <desc>Full path to the shared folder in the host file system.</desc>
2273 </param>
2274 <param name="writable" type="boolean" dir="in">
2275 <desc>Whether the share is writable or readonly</desc>
2276 </param>
2277 </method>
2278
2279 <method name="removeSharedFolder">
2280 <desc>
2281 Removes the global shared folder with the given name previously
2282 created by <link to="#createSharedFolder"/> from the collection of
2283 shared folders and stops sharing it.
2284 <note>
2285 In the current implementation, this operation is not
2286 implemented.
2287 </note>
2288 </desc>
2289 <param name="name" type="wstring" dir="in">
2290 <desc>Logical name of the shared folder to remove.</desc>
2291 </param>
2292 </method>
2293
2294 <method name="getNextExtraDataKey">
2295 <desc>
2296 Returns the global extra data key name following the supplied key.
2297
2298 An error is returned if the supplied @a key does not exist. An empty
2299 string is returned in @a nextKey if the supplied key is the last key. When
2300 supplying @c null or an empty string for the @a key, the first key item
2301 is returned in @a nextKey (if there is any). @a nextValue is an optional
2302 parameter and if supplied, the next key's value is returned in it.
2303
2304 <result name="VBOX_E_OBJECT_NOT_FOUND">
2305 Extra data @a key not found.
2306 </result>
2307
2308 </desc>
2309 <param name="key" type="wstring" dir="in">
2310 <desc>Name of the data key to follow.</desc>
2311 </param>
2312 <param name="nextKey" type="wstring" dir="out">
2313 <desc>Name of the next data key.</desc>
2314 </param>
2315 <param name="nextValue" type="wstring" dir="out">
2316 <desc>Value of the next data key.</desc>
2317 </param>
2318 </method>
2319
2320 <method name="getExtraData">
2321 <desc>
2322 Returns associated global extra data.
2323
2324 If the requested data @a key does not exist, this function will
2325 succeed and return an empty string in the @a value argument.
2326
2327 <result name="VBOX_E_FILE_ERROR">
2328 Settings file not accessible.
2329 </result>
2330 <result name="VBOX_E_XML_ERROR">
2331 Could not parse the settings file.
2332 </result>
2333
2334 </desc>
2335 <param name="key" type="wstring" dir="in">
2336 <desc>Name of the data key to get.</desc>
2337 </param>
2338 <param name="value" type="wstring" dir="return">
2339 <desc>Value of the requested data key.</desc>
2340 </param>
2341 </method>
2342
2343 <method name="setExtraData">
2344 <desc>
2345 Sets associated global extra data.
2346
2347 If you pass @c null or empty string as a key @a value, the given @a key
2348 will be deleted.
2349
2350 <note>
2351 Before performing the actual data change, this method will ask all
2352 registered callbacks using the
2353 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2354 notification for a permission. If one of the callbacks refuses the
2355 new value, the change will not be performed.
2356 </note>
2357 <note>
2358 On success, the
2359 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2360 is called to inform all registered callbacks about a successful data
2361 change.
2362 </note>
2363
2364 <result name="VBOX_E_FILE_ERROR">
2365 Settings file not accessible.
2366 </result>
2367 <result name="VBOX_E_XML_ERROR">
2368 Could not parse the settings file.
2369 </result>
2370 <result name="E_ACCESSDENIED">
2371 Modification request refused.
2372 </result>
2373
2374 </desc>
2375 <param name="key" type="wstring" dir="in">
2376 <desc>Name of the data key to set.</desc>
2377 </param>
2378 <param name="value" type="wstring" dir="in">
2379 <desc>Value to assign to the key.</desc>
2380 </param>
2381 </method>
2382
2383 <method name="openSession">
2384 <desc>
2385 Opens a new direct session with the given virtual machine.
2386
2387 A direct session acts as a local lock on the given VM.
2388 There can be only one direct session open at a time for every
2389 virtual machine, protecting the VM from being manipulated by
2390 conflicting actions from different processes. Only after a
2391 direct session has been opened, one can change all VM settings
2392 and execute the VM in the process space of the session object.
2393
2394 Sessions therefore can be compared to mutex semaphores that
2395 lock a given VM for modification and execution.
2396 See <link to="ISession">ISession</link> for details.
2397
2398 <note>Unless you are writing a new VM frontend, you will not
2399 want to execute a VM in the current process. To spawn a new
2400 process that executes a VM, use
2401 <link to="IVirtualBox::openRemoteSession" />
2402 instead.</note>
2403
2404 Upon successful return, the session object can be used to
2405 get access to the machine and to the VM console.
2406
2407 In VirtualBox terminology, the machine becomes "mutable" after
2408 a session has been opened. Note that the "mutable" machine
2409 object, on which you may invoke IMachine methods to change its
2410 settings, will be a different object from the immutable IMachine
2411 objects returned by various IVirtualBox methods. To obtain a
2412 mutable IMachine object (upon which you can invoke settings methods),
2413 use the <link to="ISession::machine" /> attribute.
2414
2415 One must always call <link to="ISession::close" /> to release the
2416 lock on the machine, or the machine's state will eventually be
2417 set to "Aborted".
2418
2419 In other words, to change settings on a machine, the following
2420 sequence is typically performed:
2421
2422 <ol>
2423 <li>Call this method (openSession) to have a machine locked for
2424 the current session.</li>
2425
2426 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2427
2428 <li>Change the settings of the machine.</li>
2429
2430 <li>Call <link to="IMachine::saveSettings" />.</li>
2431
2432 <li>Close the session by calling <link to="ISession::close"/>.</li>
2433 </ol>
2434
2435 <result name="E_UNEXPECTED">
2436 Virtual machine not registered.
2437 </result>
2438 <result name="E_ACCESSDENIED">
2439 Process not started by OpenRemoteSession.
2440 </result>
2441 <result name="VBOX_E_OBJECT_NOT_FOUND">
2442 No matching virtual machine found.
2443 </result>
2444 <result name="VBOX_E_INVALID_OBJECT_STATE">
2445 Session already open or being opened.
2446 </result>
2447 <result name="VBOX_E_VM_ERROR">
2448 Failed to assign machine to session.
2449 </result>
2450
2451 </desc>
2452 <param name="session" type="ISession" dir="in">
2453 <desc>
2454 Session object that will represent the opened session after
2455 successful method invocation. This object must not represent
2456 the already open session.
2457 <note>
2458 This session will be automatically closed if the
2459 VirtualBox server is terminated for some reason.
2460 </note>
2461 </desc>
2462 </param>
2463 <param name="machineId" type="wstring" dir="in">
2464 <desc>ID of the virtual machine to open a session with.</desc>
2465 </param>
2466 </method>
2467
2468 <method name="openRemoteSession">
2469 <desc>
2470 Spawns a new process that executes a virtual machine (called a
2471 "remote session").
2472
2473 Opening a remote session causes the VirtualBox server to start a new
2474 process that opens a direct session with the given VM. As a result, the
2475 VM is locked by that direct session in the new process, preventing
2476 conflicting changes from other processes. Since sessions act as locks
2477 that prevent conflicting changes, one cannot open a remote session
2478 for a VM that already has another open session (direct or remote), or
2479 is currently in the process of opening one (see <link
2480 to="IMachine::sessionState"/>).
2481
2482 While the remote session still provides some level of control over the
2483 VM execution to the caller (using the <link to="IConsole" /> interface),
2484 not all VM settings are available for modification within the remote
2485 session context.
2486
2487 This operation can take some time (a new VM is started in a new process,
2488 for which memory and other resources need to be set up). Because of this,
2489 an <link to="IProgress" /> is returned to allow the caller to wait for this
2490 asynchronous operation to be completed. Until then, the remote session
2491 object remains in the closed state, and accessing the machine or its
2492 console through it is invalid. It is recommended to use
2493 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2494 completion.
2495
2496 As with all <link to="ISession" /> objects, it is recommended to call
2497 <link to="ISession::close" /> on the local session object once openRemoteSession()
2498 has been called. However, the session's state (see <link to="ISession::state" />)
2499 will not return to "Closed" until the remote session has also closed (i.e.
2500 until the VM is no longer running). In that case, however, the state of
2501 the session will automatically change back to "Closed".
2502
2503 Currently supported session types (values of the @a type
2504 argument) are:
2505 <ul>
2506 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2507 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2508 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2509 </ul>
2510
2511 The @a environment argument is a string containing definitions of
2512 environment variables in the following format:
2513 @code
2514 NAME[=VALUE]\n
2515 NAME[=VALUE]\n
2516 ...
2517 @endcode
2518 where <tt>\\n</tt> is the new line character. These environment
2519 variables will be appended to the environment of the VirtualBox server
2520 process. If an environment variable exists both in the server process
2521 and in this list, the value from this list takes precedence over the
2522 server's variable. If the value of the environment variable is
2523 omitted, this variable will be removed from the resulting environment.
2524 If the environment string is @c null or empty, the server environment
2525 is inherited by the started process as is.
2526
2527 <see>openExistingSession</see>
2528
2529 <result name="E_UNEXPECTED">
2530 Virtual machine not registered.
2531 </result>
2532 <result name="E_INVALIDARG">
2533 Invalid session type @a type.
2534 </result>
2535 <result name="VBOX_E_OBJECT_NOT_FOUND">
2536 No machine matching @a machineId found.
2537 </result>
2538 <result name="VBOX_E_INVALID_OBJECT_STATE">
2539 Session already open or being opened.
2540 </result>
2541 <result name="VBOX_E_IPRT_ERROR">
2542 Launching process for machine failed.
2543 </result>
2544 <result name="VBOX_E_VM_ERROR">
2545 Failed to assign machine to session.
2546 </result>
2547
2548 </desc>
2549 <param name="session" type="ISession" dir="in">
2550 <desc>
2551 Session object that will represent the opened remote session
2552 after successful method invocation (this object must not
2553 represent an already open session).
2554 </desc>
2555 </param>
2556 <param name="machineId" type="wstring" dir="in">
2557 <desc>ID of the virtual machine to open a session with.</desc>
2558 </param>
2559 <param name="type" type="wstring" dir="in">
2560 <desc>
2561 Type of the remote session (case sensitive).
2562 </desc>
2563 </param>
2564 <param name="environment" type="wstring" dir="in">
2565 <desc>
2566 Environment to pass to the opened session.
2567 </desc>
2568 </param>
2569 <param name="progress" type="IProgress" dir="return">
2570 <desc>Progress object to track the operation completion.</desc>
2571 </param>
2572 </method>
2573
2574 <method name="openExistingSession">
2575 <desc>
2576 Opens a new remote session with the virtual machine for
2577 which a direct session is already open.
2578
2579 The remote session provides some level of control over the VM
2580 execution (using the IConsole interface) to the caller; however,
2581 within the remote session context, not all VM settings are available
2582 for modification.
2583
2584 As opposed to <link to="#openRemoteSession"/>, the number of
2585 remote sessions opened this way is not limited by the API
2586
2587 <note>
2588 It is an error to open a remote session with the machine that
2589 doesn't have an open direct session.
2590 </note>
2591
2592 <result name="E_UNEXPECTED">
2593 Virtual machine not registered.
2594 </result>
2595 <result name="VBOX_E_OBJECT_NOT_FOUND">
2596 No machine matching @a machineId found.
2597 </result>
2598 <result name="VBOX_E_INVALID_OBJECT_STATE">
2599 Session already open or being opened.
2600 </result>
2601 <result name="VBOX_E_INVALID_SESSION_STATE">
2602 Direct session state not Open.
2603 </result>
2604 <result name="VBOX_E_VM_ERROR">
2605 Failed to get console object from direct session or assign
2606 machine to session.
2607 </result>
2608
2609 <see>openRemoteSession</see>
2610 </desc>
2611 <param name="session" type="ISession" dir="in">
2612 <desc>
2613 Session object that will represent the open remote session
2614 after successful method invocation. This object must not
2615 represent an already open session.
2616 <note>
2617 This session will be automatically closed when the peer
2618 (direct) session dies or gets closed.
2619 </note>
2620 </desc>
2621 </param>
2622 <param name="machineId" type="wstring" dir="in">
2623 <desc>ID of the virtual machine to open a session with.</desc>
2624 </param>
2625 </method>
2626
2627 <method name="registerCallback">
2628 <desc>
2629 Registers a new global VirtualBox callback. The methods of the given
2630 callback object will be called by VirtualBox when an appropriate
2631 event occurs.
2632
2633 <result name="E_INVALIDARG">
2634 A @c null callback cannot be registered.
2635 </result>
2636
2637 </desc>
2638 <param name="callback" type="IVirtualBoxCallback" dir="in">
2639 <desc>Callback object to register.</desc>
2640 </param>
2641 </method>
2642
2643 <method name="unregisterCallback">
2644 <desc>
2645 Unregisters the previously registered global VirtualBox callback.
2646
2647 <result name="E_INVALIDARG">
2648 Specified @a callback not registered.
2649 </result>
2650
2651 </desc>
2652 <param name="callback" type="IVirtualBoxCallback" dir="in">
2653 <desc>Callback object to unregister.</desc>
2654 </param>
2655 </method>
2656
2657 <method name="waitForPropertyChange">
2658 <desc>
2659 Blocks the caller until any of the properties represented by the
2660 @a what argument changes the value or until the given timeout interval
2661 expires.
2662
2663 The @a what argument is a comma separated list of property masks that
2664 describe properties the caller is interested in. The property mask is
2665 a string in the following format:
2666
2667 <pre>
2668 [[group.]subgroup.]name
2669 </pre>
2670
2671 where @c name is the property name and @c group, @c subgroup are zero
2672 or more property group specifiers. Each element (group or name) in
2673 the property mask may be either a Latin string or an asterisk symbol
2674 (@c "*") which is used to match any string for the given element. A
2675 property mask that doesn't contain asterisk symbols represents a
2676 single fully qualified property name.
2677
2678 Groups in the fully qualified property name go from more generic (the
2679 left-most part) to more specific (the right-most part). The first
2680 element is usually a name of the object the property belongs to. The
2681 second element may be either a property name, or a child object name,
2682 or an index if the preceding element names an object which is one of
2683 many objects of the same type. This way, property names form a
2684 hierarchy of properties. Here are some examples of property names:
2685
2686 <table>
2687 <tr>
2688 <td><tt>VirtualBox.version</tt></td>
2689 <td><link to="IVirtualBox::version"/> property</td>
2690 </tr>
2691 <tr>
2692 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2693 <td><link to="IMachine::name"/> property of the machine with the
2694 given UUID</td>
2695 </tr>
2696 </table>
2697
2698 Most property names directly correspond to the properties of objects
2699 (components) provided by the VirtualBox library and may be used to
2700 track changes to these properties. However, there may be
2701 pseudo-property names that don't correspond to any existing object's
2702 property directly, as well as there may be object properties that
2703 don't have a corresponding property name that is understood by this
2704 method, and therefore changes to such properties cannot be
2705 tracked. See individual object's property descriptions to get a
2706 fully qualified property name that can be used with this method (if
2707 any).
2708
2709 There is a special property mask @c "*" (i.e. a string consisting of a
2710 single asterisk symbol) that can be used to match all properties.
2711 Below are more examples of property masks:
2712
2713 <table>
2714 <tr>
2715 <td><tt>VirtualBox.*</tt></td>
2716 <td>Track all properties of the VirtualBox object</td>
2717 </tr>
2718 <tr>
2719 <td><tt>Machine.*.name</tt></td>
2720 <td>Track changes to the <link to="IMachine::name"/> property of
2721 all registered virtual machines</td>
2722 </tr>
2723 </table>
2724
2725 <note>
2726 This function is not implemented in the current version of the
2727 product.
2728 </note>
2729 </desc>
2730 <param name="what" type="wstring" dir="in">
2731 <desc>Comma separated list of property masks.</desc>
2732 </param>
2733 <param name="timeout" type="unsigned long" dir="in">
2734 <desc>
2735 Wait timeout in milliseconds.
2736 Specify -1 for an indefinite wait.
2737 </desc>
2738 </param>
2739 <param name="changed" type="wstring" dir="out">
2740 <desc>
2741 Comma separated list of properties that have been changed and caused
2742 this method to return to the caller.
2743 </desc>
2744 </param>
2745 <param name="values" type="wstring" dir="out">
2746 <desc>Reserved, not currently used.</desc>
2747 </param>
2748 </method>
2749
2750 <method name="saveSettings">
2751 <desc>
2752 Saves the global settings to the global settings file
2753 (<link to="#settingsFilePath"/>).
2754
2755 This method is only useful for explicitly saving the global settings
2756 file after it has been auto-converted from the old format to the most
2757 recent format (see <link to="#settingsFileVersion"/> for details).
2758 Normally, the global settings file is implicitly saved when a global
2759 setting is changed.
2760
2761 <result name="VBOX_E_FILE_ERROR">
2762 Settings file not accessible.
2763 </result>
2764 <result name="VBOX_E_XML_ERROR">
2765 Could not parse the settings file.
2766 </result>
2767
2768 </desc>
2769 </method>
2770
2771 <method name="saveSettingsWithBackup">
2772 <desc>
2773 Creates a backup copy of the global settings file
2774 (<link to="IVirtualBox::settingsFilePath"/>) in case of auto-conversion,
2775 and then calls <link to="IVirtualBox::saveSettings"/>.
2776
2777 Note that the backup copy is created <b>only</b> if the settings file
2778 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2779 details). Otherwise, this call is fully equivalent to
2780 <link to="IVirtualBox::saveSettings"/> and no backup copying is done.
2781
2782 The backup copy is created in the same directory where the original
2783 settings file is located. It is given the following file name:
2784 <pre>
2785 original.xml.x.y-platform.bak
2786 </pre>
2787 where <tt>original.xml</tt> is the original settings file name
2788 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2789 format of the settings file (before auto-conversion).
2790
2791 If the given backup file already exists, this method will try to add the
2792 <tt>.N</tt> suffix to the backup file name (where @c N counts from
2793 0 to 9) and copy it again until it succeeds. If all suffixes are
2794 occupied, or if any other copy error occurs, this method will return a
2795 failure.
2796
2797 If the copy operation succeeds, the @a bakFileName return argument will
2798 receive a full path to the created backup file (for informational
2799 purposes). Note that this will happen even if the subsequent
2800 <link to="#saveSettings"/> call performed by this method after the
2801 copy operation, fails.
2802
2803 <note>
2804 The VirtualBox API never calls this method. It is intended purely for
2805 the purposes of creating backup copies of the settings files by
2806 front-ends before saving the results of the automatically performed
2807 settings conversion to disk.
2808 </note>
2809
2810 <see>settingsFileVersion</see>
2811
2812 <result name="VBOX_E_FILE_ERROR">
2813 Settings file not accessible.
2814 </result>
2815 <result name="VBOX_E_XML_ERROR">
2816 Could not parse the settings file.
2817 </result>
2818 <result name="VBOX_E_IPRT_ERROR">
2819 Could not copy the settings file.
2820 </result>
2821
2822 </desc>
2823 <param name="bakFileName" type="wstring" dir="return">
2824 <desc>Full path to the created backup copy.</desc>
2825 </param>
2826 </method>
2827
2828 <!--method name="createDHCPServerForInterface">
2829 <desc>
2830 Creates a dhcp server settings to be used for the given interface
2831 <result name="E_INVALIDARG">
2832 Host network interface @a name already exists.
2833 </result>
2834 </desc>
2835 <param name="interface" type="IHostNetworkInterface" dir="in">
2836 <desc>Network Interface</desc>
2837 </param>
2838 <param name="server" type="IDHCPServer" dir="out">
2839 <desc>Dhcp server settings</desc>
2840 </param>
2841 </method-->
2842
2843 <method name="createDHCPServer">
2844 <desc>
2845 Creates 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 </desc>
2850 <param name="name" type="wstring" dir="in">
2851 <desc>server name</desc>
2852 </param>
2853 <param name="server" type="IDHCPServer" dir="return">
2854 <desc>Dhcp server settings</desc>
2855 </param>
2856 </method>
2857
2858 <method name="findDHCPServerByNetworkName">
2859 <desc>
2860 Searches a dhcp server settings to be used for the given internal network name
2861 <result name="E_INVALIDARG">
2862 Host network interface @a name already exists.
2863 </result>
2864
2865 </desc>
2866 <param name="name" type="wstring" dir="in">
2867 <desc>server name</desc>
2868 </param>
2869 <param name="server" type="IDHCPServer" dir="return">
2870 <desc>Dhcp server settings</desc>
2871 </param>
2872 </method>
2873
2874 <!--method name="findDHCPServerForInterface">
2875 <desc>
2876 Searches a dhcp server settings to be used for the given interface
2877 <result name="E_INVALIDARG">
2878 Host network interface @a name already exists.
2879 </result>
2880 </desc>
2881 <param name="interface" type="IHostNetworkInterface" dir="in">
2882 <desc>Network Interface</desc>
2883 </param>
2884 <param name="server" type="IDHCPServer" dir="out">
2885 <desc>Dhcp server settings</desc>
2886 </param>
2887 </method-->
2888
2889 <method name="removeDHCPServer">
2890 <desc>
2891 Removes the dhcp server settings
2892 <result name="E_INVALIDARG">
2893 Host network interface @a name already exists.
2894 </result>
2895 </desc>
2896 <param name="server" type="IDHCPServer" dir="in">
2897 <desc>Dhcp server settings to be removed</desc>
2898 </param>
2899 </method>
2900
2901 </interface>
2902
2903 <!--
2904 // IVFSExplorer
2905 /////////////////////////////////////////////////////////////////////////
2906 -->
2907
2908 <enum
2909 name="VFSType"
2910 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2911 >
2912 <desc>
2913 Virtual file systems supported by VFSExplorer.
2914 </desc>
2915
2916 <const name="File" value="1" />
2917 <const name="Cloud" value="2" />
2918 <const name="S3" value="3" />
2919 <const name="WebDav" value="4" />
2920 </enum>
2921
2922 <enum
2923 name="VFSFileType"
2924 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2925 >
2926 <desc>
2927 File types known by VFSExplorer.
2928 </desc>
2929
2930 <const name="Unknown" value="1" />
2931 <const name="Fifo" value="2" />
2932 <const name="DevChar" value="3" />
2933 <const name="Directory" value="4" />
2934 <const name="DevBlock" value="5" />
2935 <const name="File" value="6" />
2936 <const name="SymLink" value="7" />
2937 <const name="Socket" value="8" />
2938 <const name="WhiteOut" value="9" />
2939 </enum>
2940
2941 <interface
2942 name="IVFSExplorer" extends="$unknown"
2943 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2944 wsmap="managed"
2945 >
2946 <desc>
2947 The VFSExplorer interface unifies access to different file system
2948 types. This includes local file systems as well remote file systems like
2949 S3. For a list of supported types see <link to="VFSType" />.
2950 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2951 </desc>
2952
2953 <attribute name="path" type="wstring" readonly="yes">
2954 <desc>Returns the current path in the virtual file system.</desc>
2955 </attribute>
2956
2957 <attribute name="type" type="VFSType" readonly="yes">
2958 <desc>Returns the file system type which is currently in use.</desc>
2959 </attribute>
2960
2961 <method name="update">
2962 <desc>Updates the internal list of files/directories from the
2963 current directory level. Use <link to="#entryList" /> to get the full list
2964 after a call to this method.</desc>
2965
2966 <param name="aProgress" type="IProgress" dir="return">
2967 <desc>Progress object to track the operation completion.</desc>
2968 </param>
2969 </method>
2970
2971 <method name="cd">
2972 <desc>Change the current directory level.</desc>
2973
2974 <param name="aDir" type="wstring" dir="in">
2975 <desc>The name of the directory to go in.</desc>
2976 </param>
2977
2978 <param name="aProgress" type="IProgress" dir="return">
2979 <desc>Progress object to track the operation completion.</desc>
2980 </param>
2981 </method>
2982
2983 <method name="cdUp">
2984 <desc>Go one directory upwards from the current directory level.</desc>
2985
2986 <param name="aProgress" type="IProgress" dir="return">
2987 <desc>Progress object to track the operation completion.</desc>
2988 </param>
2989 </method>
2990
2991 <method name="entryList">
2992 <desc>Returns a list of files/directories after a call to <link
2993 to="#update" />. The user is responsible for keeping this internal
2994 list up do date.</desc>
2995
2996 <param name="aNames" type="wstring" safearray="yes" dir="out">
2997 <desc>The list of names for the entries.</desc>
2998 </param>
2999
3000 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3001 <desc>The list of types for the entries.</desc>
3002 </param>
3003 </method>
3004
3005 <method name="exists">
3006 <desc>Checks if the given file list exists in the current directory
3007 level.</desc>
3008
3009 <param name="aNames" type="wstring" safearray="yes" dir="in">
3010 <desc>The names to check.</desc>
3011 </param>
3012
3013 <param name="aExists" type="wstring" safearray="yes" dir="return">
3014 <desc>The names which exist.</desc>
3015 </param>
3016 </method>
3017
3018 <method name="remove">
3019 <desc>Deletes the given files in the current directory level.</desc>
3020
3021 <param name="aNames" type="wstring" safearray="yes" dir="in">
3022 <desc>The names to remove.</desc>
3023 </param>
3024
3025 <param name="aProgress" type="IProgress" dir="return">
3026 <desc>Progress object to track the operation completion.</desc>
3027 </param>
3028 </method>
3029
3030 </interface>
3031
3032 <!--
3033 // IAppliance
3034 /////////////////////////////////////////////////////////////////////////
3035 -->
3036
3037 <interface
3038 name="IAppliance" extends="$unknown"
3039 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
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 <param name="aProgress" type="IProgress" dir="return">
3187 <desc></desc>
3188 </param>
3189 </method>
3190
3191 <method name="interpret">
3192 <desc>
3193 Interprets the OVF data that was read when the appliance was constructed. After
3194 calling this method, one can inspect the
3195 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3196 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3197 the appliance.
3198
3199 Calling this method is the second step of importing an appliance into VirtualBox;
3200 see <link to="IAppliance" /> for an overview.
3201
3202 After calling this method, one should call <link to="#getWarnings" /> to find out
3203 if problems were encountered during the processing which might later lead to
3204 errors.
3205 </desc>
3206 </method>
3207
3208 <method name="importMachines">
3209 <desc>
3210 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3211 and other interfaces that match the information contained in the appliance as
3212 closely as possible, as represented by the import instructions in the
3213 <link to="#virtualSystemDescriptions" /> array.
3214
3215 Calling this method is the final step of importing an appliance into VirtualBox;
3216 see <link to="IAppliance" /> for an overview.
3217
3218 Since importing the appliance will most probably involve copying and converting
3219 disk images, which can take a long time, this method operates asynchronously and
3220 returns an IProgress object to allow the caller to monitor the progress.
3221 </desc>
3222
3223 <param name="aProgress" type="IProgress" dir="return">
3224 <desc></desc>
3225 </param>
3226 </method>
3227
3228 <method name="createVFSExplorer">
3229 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3230
3231 <param name="aUri" type="wstring" dir="in">
3232 <desc>The URI describing the file system to use.</desc>
3233 </param>
3234
3235 <param name="aExplorer" type="IVFSExplorer" dir="return">
3236 <desc></desc>
3237 </param>
3238 </method>
3239
3240 <method name="write">
3241 <desc>
3242 Writes the contents of the appliance exports into a new OVF file.
3243
3244 Calling this method is the final step of exporting an appliance from VirtualBox;
3245 see <link to="IAppliance" /> for an overview.
3246
3247 Since exporting the appliance will most probably involve copying and converting
3248 disk images, which can take a long time, this method operates asynchronously and
3249 returns an IProgress object to allow the caller to monitor the progress.
3250 </desc>
3251 <param name="format" type="wstring" dir="in">
3252 <desc>
3253 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3254 future versions of VirtualBox may support additional formats.
3255 </desc>
3256 </param>
3257 <param name="path" type="wstring" dir="in">
3258 <desc>
3259 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3260 on whether the appliance is distributed as a set of files or as a single file, respectively).
3261 </desc>
3262 </param>
3263 <param name="aProgress" type="IProgress" dir="return">
3264 <desc>Progress object to track the operation completion.</desc>
3265 </param>
3266 </method>
3267
3268 <method name="getWarnings">
3269 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3270
3271 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3272 <desc></desc>
3273 </param>
3274 </method>
3275
3276 </interface>
3277
3278 <enum
3279 name="VirtualSystemDescriptionType"
3280 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3281 >
3282 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3283 a configuration value.</desc>
3284
3285 <const name="Ignore" value="1" />
3286 <const name="OS" value="2" />
3287 <const name="Name" value="3" />
3288 <const name="Product" value="4" />
3289 <const name="Vendor" value="5" />
3290 <const name="Version" value="6" />
3291 <const name="ProductUrl" value="7" />
3292 <const name="VendorUrl" value="8" />
3293 <const name="Description" value="9" />
3294 <const name="License" value="10" />
3295 <const name="Miscellaneous" value="11" />
3296 <const name="CPU" value="12" />
3297 <const name="Memory" value="13" />
3298 <const name="HardDiskControllerIDE" value="14" />
3299 <const name="HardDiskControllerSATA" value="15" />
3300 <const name="HardDiskControllerSCSI" value="16" />
3301 <const name="HardDiskImage" value="17" />
3302 <const name="Floppy" value="18" />
3303 <const name="CDROM" value="19" />
3304 <const name="NetworkAdapter" value="20" />
3305 <const name="USBController" value="21" />
3306 <const name="SoundCard" value="22" />
3307
3308 </enum>
3309
3310 <enum
3311 name="VirtualSystemDescriptionValueType"
3312 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3313 >
3314 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3315 type to fetch.</desc>
3316
3317 <const name="Reference" value="1" />
3318 <const name="Original" value="2" />
3319 <const name="Auto" value="3" />
3320 <const name="ExtraConfig" value="4" />
3321
3322 </enum>
3323
3324 <interface
3325 name="IVirtualSystemDescription" extends="$unknown"
3326 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3327 wsmap="managed"
3328 >
3329
3330 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3331 After <link to="IAppliance::interpret" /> has been called, that array contains
3332 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3333 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3334 into VirtualBox.
3335 </desc>
3336
3337 <attribute name="count" type="unsigned long" readonly="yes">
3338 <desc>Return the number of virtual system description entries.</desc>
3339 </attribute>
3340
3341 <method name="getDescription">
3342 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3343 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3344
3345 The list below identifies the value sets that are possible depending on the
3346 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3347 the array item with the same index in aOvfValues[] will contain the original value as contained
3348 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3349 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3350 the aExtraConfigValues[] array item may also be used.
3351
3352 <ul>
3353 <li>
3354 "OS": the guest operating system type. There must be exactly one such array item on import. The
3355 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3356 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3357 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3358 </li>
3359 <li>
3360 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3361 if none is present on import, then an automatic name will be created from the operating system
3362 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3363 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3364 <link to="IMachine" /> name that does not exist yet.
3365 </li>
3366 <li>
3367 "Description": an arbitrary description.
3368 </li>
3369 <li>
3370 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3371 code to display such a license for agreement; the Main API does not enforce any such policy.
3372 </li>
3373 <li>
3374 Miscellaneous: reserved for future use.
3375 </li>
3376 <li>
3377 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3378 </li>
3379 <li>
3380 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3381 is present on import, then VirtualBox will set a meaningful default based on the operating system
3382 type.
3383 </li>
3384 <li>
3385 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3386 has no value in aOvfValues[] or aVBoxValues[].
3387 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3388 type can use to specify which hard disk controller a virtual disk should be connected to.
3389 </li>
3390 <li>
3391 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3392 has no value in aOvfValues[] or aVBoxValues[].
3393 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3394 </li>
3395 <li>
3396 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3397 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3398 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3399 </li>
3400 <li>
3401 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3402 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3403
3404 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3405 a path since the image file should be in the same location as the OVF file itself), whereas the
3406 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3407 hard disk image. This means that on import the image will be copied and converted from the
3408 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3409 On import, the target image will also be registered with VirtualBox.
3410
3411 The matching item in the aExtraConfigValues[] array must contain a string of the following
3412 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3413 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3414 the image to. That number must be the index of an array item with one of the hard disk controller
3415 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3416 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3417 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3418 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3419 SCSI conrollers, the channel can range from 0-29.
3420 </li>
3421 <li>
3422 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3423 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3424 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3425 </li>
3426 <li>
3427 "USBController": a USB controller. There can be at most one such item. If and only if such an
3428 item ispresent, USB support will be enabled for the new virtual machine.
3429 </li>
3430 <li>
3431 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3432 present, sound support will be enabled for the new virtual machine. Note that the virtual
3433 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3434 may be different from the virtual soundcard expected by the appliance.
3435 </li>
3436 </ul>
3437
3438 </desc>
3439
3440 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3441 <desc></desc>
3442 </param>
3443
3444 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3445 <desc></desc>
3446 </param>
3447
3448 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3449 <desc></desc>
3450 </param>
3451
3452 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3453 <desc></desc>
3454 </param>
3455
3456 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3457 <desc></desc>
3458 </param>
3459
3460 </method>
3461
3462 <method name="getDescriptionByType">
3463 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3464 should be returned.</desc>
3465
3466 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3467 <desc></desc>
3468 </param>
3469
3470 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3471 <desc></desc>
3472 </param>
3473
3474 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3475 <desc></desc>
3476 </param>
3477
3478 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3479 <desc></desc>
3480 </param>
3481
3482 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3483 <desc></desc>
3484 </param>
3485
3486 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3487 <desc></desc>
3488 </param>
3489
3490 </method>
3491
3492 <method name="getValuesByType">
3493 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3494 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3495 values.</desc>
3496
3497 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3498 <desc></desc>
3499 </param>
3500
3501 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3502 <desc></desc>
3503 </param>
3504
3505 <param name="aValues" type="wstring" dir="return" safearray="yes">
3506 <desc></desc>
3507 </param>
3508
3509 </method>
3510
3511 <method name="setFinalValues">
3512 <desc>
3513 This method allows the appliance's user to change the configuration for the virtual
3514 system descriptions. For each array item returned from <link to="#getDescription" />,
3515 you must pass in one boolean value and one configuration value.
3516
3517 Each item in the boolean array determines whether the particular configuration item
3518 should be enabled.
3519 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3520 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3521 and SoundCard.
3522
3523 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3524 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3525 the configuration remains unchanged. Please see the documentation for getDescription()
3526 for valid configuration values for the individual array item types. If the
3527 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3528 </desc>
3529
3530 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3531 <desc></desc>
3532 </param>
3533
3534 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3535 <desc></desc>
3536 </param>
3537
3538 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3539 <desc></desc>
3540 </param>
3541 </method>
3542
3543 <method name="addDescription">
3544 <desc>
3545 This method adds an additional description entry to the stack of already
3546 available descriptions for this virtual system. This is handy for writing
3547 values which aren't directly supported by VirtualBox. One example would
3548 be the License type of <link to="VirtualSystemDescriptionType" />.
3549 </desc>
3550
3551 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3552 <desc></desc>
3553 </param>
3554
3555 <param name="aVBoxValue" type="wstring" dir="in">
3556 <desc></desc>
3557 </param>
3558
3559 <param name="aExtraConfigValue" type="wstring" dir="in">
3560 <desc></desc>
3561 </param>
3562 </method>
3563 </interface>
3564
3565
3566 <!--
3567 // IMachine
3568 /////////////////////////////////////////////////////////////////////////
3569 -->
3570
3571 <interface
3572 name="IInternalMachineControl" extends="$unknown"
3573 uuid="ce8087d7-de92-4bbb-8140-a22fb07f37ba"
3574 internal="yes"
3575 wsmap="suppress"
3576 >
3577 <method name="setRemoveSavedState">
3578 <desc>
3579 Updates the flag whether saved state is removed on a machine state
3580 change from Saved to PoweredOff.
3581 </desc>
3582 <param name="aRemove" type="boolean" dir="in"/>
3583 </method>
3584
3585 <method name="updateState">
3586 <desc>
3587 Updates the VM state.
3588 <note>
3589 This operation will also update the settings file with
3590 the correct information about the saved state file
3591 and delete this file from disk when appropriate.
3592 </note>
3593 </desc>
3594 <param name="state" type="MachineState" dir="in"/>
3595 </method>
3596
3597 <method name="getIPCId">
3598 <param name="id" type="wstring" dir="return"/>
3599 </method>
3600
3601 <method name="runUSBDeviceFilters">
3602 <desc>
3603 Asks the server to run USB devices filters of the associated
3604 machine against the given USB device and tell if there is
3605 a match.
3606 <note>
3607 Intended to be used only for remote USB devices. Local
3608 ones don't require to call this method (this is done
3609 implicitly by the Host and USBProxyService).
3610 </note>
3611 </desc>
3612 <param name="device" type="IUSBDevice" dir="in"/>
3613 <param name="matched" type="boolean" dir="out"/>
3614 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3615 </method>
3616
3617 <method name="captureUSBDevice">
3618 <desc>
3619 Requests a capture of the given host USB device.
3620 When the request is completed, the VM process will
3621 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3622 notification.
3623 </desc>
3624 <param name="id" type="wstring" dir="in"/>
3625 </method>
3626
3627 <method name="detachUSBDevice">
3628 <desc>
3629 Notification that a VM is going to detach (@a done = @c false) or has
3630 already detached (@a done = @c true) the given USB device.
3631 When the @a done = @c true request is completed, the VM process will
3632 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3633 notification.
3634 <note>
3635 In the @a done = @c true case, the server must run its own filters
3636 and filters of all VMs but this one on the detached device
3637 as if it were just attached to the host computer.
3638 </note>
3639 </desc>
3640 <param name="id" type="wstring" dir="in"/>
3641 <param name="done" type="boolean" dir="in"/>
3642 </method>
3643
3644 <method name="autoCaptureUSBDevices">
3645 <desc>
3646 Requests a capture all matching USB devices attached to the host.
3647 When the request is completed, the VM process will
3648 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3649 notification per every captured device.
3650 </desc>
3651 </method>
3652
3653 <method name="detachAllUSBDevices">
3654 <desc>
3655 Notification that a VM that is being powered down. The done
3656 parameter indicates whether which stage of the power down
3657 we're at. When @a done = @c false the VM is announcing its
3658 intentions, while when @a done = @c true the VM is reporting
3659 what it has done.
3660 <note>
3661 In the @a done = @c true case, the server must run its own filters
3662 and filters of all VMs but this one on all detach devices as
3663 if they were just attached to the host computer.
3664 </note>
3665 </desc>
3666 <param name="done" type="boolean" dir="in"/>
3667 </method>
3668
3669 <method name="onSessionEnd">
3670 <desc>
3671 Triggered by the given session object when the session is about
3672 to close normally.
3673 </desc>
3674 <param name="session" type="ISession" dir="in">
3675 <desc>Session that is being closed</desc>
3676 </param>
3677 <param name="progress" type="IProgress" dir="return">
3678 <desc>
3679 Used to wait until the corresponding machine is actually
3680 dissociated from the given session on the server.
3681 Returned only when this session is a direct one.
3682 </desc>
3683 </param>
3684 </method>
3685
3686 <method name="beginSavingState">
3687 <desc>
3688 Called by the VM process to inform the server it wants to
3689 save the current state and stop the VM execution.
3690 </desc>
3691 <param name="progress" type="IProgress" dir="in">
3692 <desc>
3693 Progress object created by the VM process to wait until
3694 the state is saved.
3695 </desc>
3696 </param>
3697 <param name="stateFilePath" type="wstring" dir="out">
3698 <desc>
3699 File path the VM process must save the execution state to.
3700 </desc>
3701 </param>
3702 </method>
3703
3704 <method name="endSavingState">
3705 <desc>
3706 Called by the VM process to inform the server that saving
3707 the state previously requested by #beginSavingState is either
3708 successfully finished or there was a failure.
3709
3710 <result name="VBOX_E_FILE_ERROR">
3711 Settings file not accessible.
3712 </result>
3713 <result name="VBOX_E_XML_ERROR">
3714 Could not parse the settings file.
3715 </result>
3716
3717 </desc>
3718
3719 <param name="success" type="boolean" dir="in">
3720 <desc>@c true to indicate success and @c false otherwise.
3721 </desc>
3722 </param>
3723 </method>
3724
3725 <method name="adoptSavedState">
3726 <desc>
3727 Gets called by IConsole::adoptSavedState.
3728 <result name="VBOX_E_FILE_ERROR">
3729 Invalid saved state file path.
3730 </result>
3731 </desc>
3732 <param name="savedStateFile" type="wstring" dir="in">
3733 <desc>Path to the saved state file to adopt.</desc>
3734 </param>
3735 </method>
3736
3737 <method name="beginTakingSnapshot">
3738 <desc>
3739 Called by the VM process to inform the server it wants to
3740 take a snapshot.
3741
3742 <result name="VBOX_E_FILE_ERROR">
3743 Settings file not accessible.
3744 </result>
3745 <result name="VBOX_E_XML_ERROR">
3746 Could not parse the settings file.
3747 </result>
3748 </desc>
3749 <param name="initiator" type="IConsole" dir="in">
3750 <desc>The console object that initiated this call.</desc>
3751 </param>
3752 <param name="name" type="wstring" dir="in">
3753 <desc>Snapshot name.</desc>
3754 </param>
3755 <param name="description" type="wstring" dir="in">
3756 <desc>Snapshot description.</desc>
3757 </param>
3758 <param name="progress" type="IProgress" dir="in">
3759 <desc>
3760 Progress object created by the VM process to wait until
3761 the state is saved (only for online snapshots).
3762 </desc>
3763 </param>
3764 <param name="stateFilePath" type="wstring" dir="out">
3765 <desc>
3766 File path the VM process must save the execution state to.
3767 </desc>
3768 </param>
3769 <param name="serverProgress" type="IProgress" dir="out">
3770 <desc>
3771 Progress object created by the server process to wait until
3772 the snapshot is taken (VDI diff creation, etc.).
3773 </desc>
3774 </param>
3775 </method>
3776
3777 <method name="endTakingSnapshot">
3778 <desc>
3779 Called by the VM process to inform the server that the snapshot
3780 previously requested by #beginTakingSnapshot is either
3781 successfully taken or there was a failure.
3782 </desc>
3783
3784 <param name="success" type="boolean" dir="in">
3785 <desc>@c true to indicate success and @c false otherwise</desc>
3786 </param>
3787 </method>
3788
3789 <method name="discardSnapshot">
3790 <desc>
3791 Gets called by IConsole::discardSnapshot.
3792 <result name="VBOX_E_INVALID_OBJECT_STATE">
3793 Snapshot has more than one child snapshot.
3794 </result>
3795 </desc>
3796 <param name="initiator" type="IConsole" dir="in">
3797 <desc>The console object that initiated this call.</desc>
3798 </param>
3799 <param name="id" type="wstring" dir="in">
3800 <desc>UUID of the snapshot to discard.</desc>
3801 </param>
3802 <param name="machineState" type="MachineState" dir="out">
3803 <desc>New machine state after this operation is started.</desc>
3804 </param>
3805 <param name="progress" type="IProgress" dir="return">
3806 <desc>Progress object to track the operation completion.</desc>
3807 </param>
3808 </method>
3809
3810 <method name="discardCurrentState">
3811 <desc>
3812 Gets called by IConsole::discardCurrentState.
3813 <result name="VBOX_E_INVALID_OBJECT_STATE">
3814 Virtual machine does not have any snapshot.
3815 </result>
3816 </desc>
3817 <param name="initiator" type="IConsole" dir="in">
3818 <desc>The console object that initiated this call.</desc>
3819 </param>
3820 <param name="machineState" type="MachineState" dir="out">
3821 <desc>New machine state after this operation is started.</desc>
3822 </param>
3823 <param name="progress" type="IProgress" dir="return">
3824 <desc>Progress object to track the operation completion.</desc>
3825 </param>
3826 </method>
3827
3828 <method name="discardCurrentSnapshotAndState">
3829 <desc>
3830 Gets called by IConsole::discardCurrentSnapshotAndState.
3831 <result name="VBOX_E_INVALID_OBJECT_STATE">
3832 Virtual machine does not have any snapshot.
3833 </result>
3834 </desc>
3835 <param name="initiator" type="IConsole" dir="in">
3836 <desc>The console object that initiated this call.</desc>
3837 </param>
3838 <param name="machineState" type="MachineState" dir="out">
3839 <desc>New machine state after this operation is started.</desc>
3840 </param>
3841 <param name="progress" type="IProgress" dir="return">
3842 <desc>Progress object to track the operation completion.</desc>
3843 </param>
3844 </method>
3845
3846 <method name="pullGuestProperties">
3847 <desc>
3848 Get the list of the guest properties matching a set of patterns along
3849 with their values, time stamps and flags and give responsibility for
3850 managing properties to the console.
3851 </desc>
3852 <param name="name" type="wstring" dir="out" safearray="yes">
3853 <desc>
3854 The names of the properties returned.
3855 </desc>
3856 </param>
3857 <param name="value" type="wstring" dir="out" safearray="yes">
3858 <desc>
3859 The values of the properties returned. The array entries match the
3860 corresponding entries in the @a name array.
3861 </desc>
3862 </param>
3863 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3864 <desc>
3865 The time stamps of the properties returned. The array entries match
3866 the corresponding entries in the @a name array.
3867 </desc>
3868 </param>
3869 <param name="flags" type="wstring" dir="out" safearray="yes">
3870 <desc>
3871 The flags of the properties returned. The array entries match the
3872 corresponding entries in the @a name array.
3873 </desc>
3874 </param>
3875 </method>
3876
3877 <method name="pushGuestProperties">
3878 <desc>
3879 Set the list of the guest properties matching a set of patterns along
3880 with their values, time stamps and flags and return responsibility for
3881 managing properties to IMachine.
3882 </desc>
3883 <param name="name" type="wstring" dir="in" safearray="yes">
3884 <desc>
3885 The names of the properties.
3886 </desc>
3887 </param>
3888 <param name="value" type="wstring" dir="in" safearray="yes">
3889 <desc>
3890 The values of the properties. The array entries match the
3891 corresponding entries in the @a name array.
3892 </desc>
3893 </param>
3894 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3895 <desc>
3896 The time stamps of the properties. The array entries match
3897 the corresponding entries in the @a name array.
3898 </desc>
3899 </param>
3900 <param name="flags" type="wstring" dir="in" safearray="yes">
3901 <desc>
3902 The flags of the properties. The array entries match the
3903 corresponding entries in the @a name array.
3904 </desc>
3905 </param>
3906 </method>
3907 <method name="pushGuestProperty">
3908 <desc>
3909 Update a single guest property in IMachine.
3910 </desc>
3911 <param name="name" type="wstring" dir="in">
3912 <desc>
3913 The name of the property to be updated.
3914 </desc>
3915 </param>
3916 <param name="value" type="wstring" dir="in">
3917 <desc>
3918 The value of the property.
3919 </desc>
3920 </param>
3921 <param name="timestamp" type="unsigned long long" dir="in">
3922 <desc>
3923 The timestamp of the property.
3924 </desc>
3925 </param>
3926 <param name="flags" type="wstring" dir="in">
3927 <desc>
3928 The flags of the property.
3929 </desc>
3930 </param>
3931 </method>
3932
3933 <method name="lockMedia">
3934 <desc>
3935 Locks all media attached to the machine for writing and parents of
3936 attahced different hard disks (if any) for reading. This operation is
3937 atomic so that if it fails no media is actually locked.
3938
3939 This method is intended to be called when the machine is in Starting or
3940 Restoring state. The locked media will be automatically unlocked when
3941 the machine is powered off or crashed.
3942 </desc>
3943 </method>
3944 </interface>
3945
3946 <interface
3947 name="IBIOSSettings" extends="$unknown"
3948 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3949 wsmap="managed"
3950 >
3951 <desc>
3952 The IBIOSSettings interface represents BIOS settings of the virtual
3953 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3954 </desc>
3955 <attribute name="logoFadeIn" type="boolean">
3956 <desc>Fade in flag for BIOS logo animation.</desc>
3957 </attribute>
3958
3959 <attribute name="logoFadeOut" type="boolean">
3960 <desc>Fade out flag for BIOS logo animation.</desc>
3961 </attribute>
3962
3963 <attribute name="logoDisplayTime" type="unsigned long">
3964 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3965 </attribute>
3966
3967 <attribute name="logoImagePath" type="wstring">
3968 <desc>Local file system path for external BIOS image.</desc>
3969 </attribute>
3970
3971 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3972 <desc>Mode of the BIOS boot device menu.</desc>
3973 </attribute>
3974
3975 <attribute name="ACPIEnabled" type="boolean">
3976 <desc>ACPI support flag.</desc>
3977 </attribute>
3978
3979 <attribute name="IOAPICEnabled" type="boolean">
3980 <desc>
3981 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3982 and support IRQs above 15.
3983 </desc>
3984 </attribute>
3985
3986 <attribute name="timeOffset" type="long long">
3987 <desc>
3988 Offset in milliseconds from the host system time. This allows for
3989 guests running with a different system date/time than the host.
3990 It is equivalent to setting the system date/time in the BIOS except
3991 it is not an absolute value but a relative one. Guest Additions
3992 time synchronization honors this offset.
3993 </desc>
3994 </attribute>
3995
3996 <attribute name="PXEDebugEnabled" type="boolean">
3997 <desc>
3998 PXE debug logging flag. If set, VirtualBox will write extensive
3999 PXE trace information to the release log.
4000 </desc>
4001 </attribute>
4002
4003 </interface>
4004
4005 <interface
4006 name="IMachine" extends="$unknown"
4007 uuid="540dcfda-3df2-49c6-88fa-033a28c2ff85"
4008 wsmap="managed"
4009 >
4010 <desc>
4011 The IMachine interface represents a virtual machine, or guest, created
4012 in VirtualBox.
4013
4014 This interface is used in two contexts. First of all, a collection of
4015 objects implementing this interface is stored in the
4016 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4017 machines that are currently registered with this VirtualBox
4018 installation. Also, once a session has been opened for the given virtual
4019 machine (e.g. the virtual machine is running), the machine object
4020 associated with the open session can be queried from the session object;
4021 see <link to="ISession"/> for details.
4022
4023 The main role of this interface is to expose the settings of the virtual
4024 machine and provide methods to change various aspects of the virtual
4025 machine's configuration. For machine objects stored in the
4026 <link to="IVirtualBox::machines"/> collection, all attributes are
4027 read-only unless explicitly stated otherwise in individual attribute
4028 and method descriptions. In order to change a machine setting, a session
4029 for this machine must be opened using one of
4030 <link to="IVirtualBox::openSession"/>,
4031 <link to="IVirtualBox::openRemoteSession"/> or
4032 <link to="IVirtualBox::openExistingSession"/> methods. After the
4033 session has been successfully opened, a mutable machine object needs to
4034 be queried from the session object and then the desired settings changes
4035 can be applied to the returned object using IMachine attributes and
4036 methods. See the ISession interface description for more information
4037 about sessions.
4038
4039 Note that the IMachine interface does not provide methods to control
4040 virtual machine execution (such as start the machine, or power it
4041 down) -- these methods are grouped in a separate IConsole
4042 interface. Refer to the IConsole interface description to get more
4043 information about this topic.
4044
4045 <see>ISession, IConsole</see>
4046 </desc>
4047
4048 <attribute name="parent" type="IVirtualBox" readonly="yes">
4049 <desc>Associated parent object.</desc>
4050 </attribute>
4051
4052 <attribute name="accessible" type="boolean" readonly="yes">
4053 <desc>
4054 Whether this virtual machine is currently accessible or not.
4055
4056 The machine is considered to be inaccessible when:
4057 <ul>
4058 <li>It is a registered virtual machine, and
4059 </li>
4060 <li>Its settings file is inaccessible (for example, it is
4061 located on a network share that is not accessible during
4062 VirtualBox startup, or becomes inaccessible later, or if
4063 the settings file can be read but is invalid).
4064 </li>
4065 </ul>
4066
4067 Otherwise, the value of this property is always @c true.
4068
4069 Every time this property is read, the accessibility state of
4070 this machine is re-evaluated. If the returned value is @c false,
4071 the <link to="#accessError"/> property may be used to get the
4072 detailed error information describing the reason of
4073 inaccessibility.
4074
4075 When the machine is inaccessible, only the following properties
4076 can be used on it:
4077 <ul>
4078 <li><link to="#parent"/></li>
4079 <li><link to="#id"/></li>
4080 <li><link to="#settingsFilePath"/></li>
4081 <li><link to="#accessible"/></li>
4082 <li><link to="#accessError"/></li>
4083 </ul>
4084
4085 An attempt to access any other property or method will return
4086 an error.
4087
4088 The only possible action you can perform on an inaccessible
4089 machine is to unregister it using the
4090 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4091 for the accessibility state once more by querying this
4092 property).
4093
4094 <note>
4095 In the current implementation, once this property returns
4096 @c true, the machine will never become inaccessible
4097 later, even if its settings file cannot be successfully
4098 read/written any more (at least, until the VirtualBox
4099 server is restarted). This limitation may be removed in
4100 future releases.
4101 </note>
4102 </desc>
4103 </attribute>
4104
4105 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4106 <desc>
4107 Error information describing the reason of machine
4108 inaccessibility.
4109
4110 Reading this property is only valid after the last call to
4111 <link to="#accessible"/> returned @c false (i.e. the
4112 machine is currently unaccessible). Otherwise, a @c null
4113 IVirtualBoxErrorInfo object will be returned.
4114 </desc>
4115 </attribute>
4116
4117 <attribute name="name" type="wstring">
4118 <desc>
4119 Name of the virtual machine.
4120
4121 Besides being used for human-readable identification purposes
4122 everywhere in VirtualBox, the virtual machine name is also used
4123 as a name of the machine's settings file and as a name of the
4124 subdirectory this settings file resides in. Thus, every time you
4125 change the value of this property, the settings file will be
4126 renamed once you call <link to="#saveSettings"/> to confirm the
4127 change. The containing subdirectory will be also renamed, but
4128 only if it has exactly the same name as the settings file
4129 itself prior to changing this property (for backward compatibility
4130 with previous API releases). The above implies the following
4131 limitations:
4132 <ul>
4133 <li>The machine name cannot be empty.</li>
4134 <li>The machine name can contain only characters that are valid
4135 file name characters according to the rules of the file
4136 system used to store VirtualBox configuration.</li>
4137 <li>You cannot have two or more machines with the same name
4138 if they use the same subdirectory for storing the machine
4139 settings files.</li>
4140 <li>You cannot change the name of the machine if it is running,
4141 or if any file in the directory containing the settings file
4142 is being used by another running machine or by any other
4143 process in the host operating system at a time when
4144 <link to="#saveSettings"/> is called.
4145 </li>
4146 </ul>
4147 If any of the above limitations are hit, <link to="#saveSettings"/>
4148 will return an appropriate error message explaining the exact
4149 reason and the changes you made to this machine will not be
4150 saved.
4151 <note>
4152 For "legacy" machines created using the
4153 <link to="IVirtualBox::createLegacyMachine"/> call,
4154 the above naming limitations do not apply because the
4155 machine name does not affect the settings file name.
4156 The settings file name remains the same as it was specified
4157 during machine creation and never changes.
4158 </note>
4159 </desc>
4160 </attribute>
4161
4162 <attribute name="description" type="wstring">
4163 <desc>
4164 Description of the virtual machine.
4165
4166 The description attribute can contain any text and is
4167 typically used to describe the hardware and software
4168 configuration of the virtual machine in detail (i.e. network
4169 settings, versions of the installed software and so on).
4170 </desc>
4171 </attribute>
4172
4173 <attribute name="id" type="wstring" readonly="yes">
4174 <desc>UUID of the virtual machine.</desc>
4175 </attribute>
4176
4177 <attribute name="OSTypeId" type="wstring">
4178 <desc>
4179 User-defined identifier of the Guest OS type.
4180 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4181 an IGuestOSType object representing details about the given
4182 Guest OS type.
4183 <note>
4184 This value may differ from the value returned by
4185 <link to="IGuest::OSTypeId"/> if Guest Additions are
4186 installed to the guest OS.
4187 </note>
4188 </desc>
4189 </attribute>
4190
4191 <attribute name="HardwareVersion" type="wstring">
4192 <desc>Hardware version identifier. Internal use only for now.</desc>
4193 </attribute>
4194
4195 <attribute name="CPUCount" type="unsigned long">
4196 <desc>Number of virtual CPUs in the VM.</desc>
4197 </attribute>
4198
4199 <attribute name="memorySize" type="unsigned long">
4200 <desc>System memory size in megabytes.</desc>
4201 </attribute>
4202
4203 <attribute name="memoryBalloonSize" type="unsigned long">
4204 <desc>Initial memory balloon size in megabytes.</desc>
4205 </attribute>
4206
4207 <attribute name="statisticsUpdateInterval" type="unsigned long">
4208 <desc>Initial interval to update guest statistics in seconds.</desc>
4209 </attribute>
4210
4211 <attribute name="VRAMSize" type="unsigned long">
4212 <desc>Video memory size in megabytes.</desc>
4213 </attribute>
4214
4215 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4216 <desc>
4217 This setting determines whether VirtualBox allows guests to make use
4218 of the 3D graphics support available on the host. Currently limited
4219 to OpenGL only. </desc>
4220 </attribute>
4221
4222 <attribute name="monitorCount" type="unsigned long">
4223 <desc>
4224 Number of virtual monitors.
4225 <note>
4226 Only effective on Windows XP and later guests with
4227 Guest Additions installed.
4228 </note>
4229 </desc>
4230 </attribute>
4231
4232 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4233 <desc>Object containing all BIOS settings.</desc>
4234 </attribute>
4235
4236 <attribute name="HWVirtExEnabled" type="boolean">
4237 <desc>
4238 This setting determines whether VirtualBox will try to make use of
4239 the host CPU's hardware virtualization extensions such as Intel VT-x
4240 and AMD-V. Note that in case such extensions are not available,
4241 they will not be used.
4242 </desc>
4243 </attribute>
4244
4245 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4246 <desc>
4247 This setting determines whether VirtualBox will try to make use of
4248 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4249 such extensions are not available, they will not be used.
4250 </desc>
4251 </attribute>
4252
4253 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4254 <desc>
4255 This setting determines whether VirtualBox will try to make use of
4256 the VPID extension of Intel VT-x. Note that in case such extensions are
4257 not available, they will not be used.
4258 </desc>
4259 </attribute>
4260
4261 <attribute name="PAEEnabled" type="boolean" default="false">
4262 <desc>
4263 This setting determines whether VirtualBox will expose the Physical Address
4264 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4265 is not available, it will not be reported.
4266 </desc>
4267 </attribute>
4268
4269 <attribute name="snapshotFolder" type="wstring">
4270 <desc>
4271 Full path to the directory used to store snapshot data
4272 (differencing hard disks and saved state files) of this machine.
4273
4274 The initial value of this property is
4275 <tt>&lt;</tt><link to="#settingsFilePath">
4276 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4277 <link to="#id">machine_uuid</link>
4278 <tt>&gt;</tt>.
4279
4280 Currently, it is an error to try to change this property on
4281 a machine that has snapshots (because this would require to
4282 move possibly large files to a different location).
4283 A separate method will be available for this purpose later.
4284
4285 <note>
4286 Setting this property to @c null or to an empty string will restore
4287 the initial value.
4288 </note>
4289 <note>
4290 When setting this property, the specified path can be
4291 absolute (full path) or relative to the directory where the
4292 <link to="#settingsFilePath">machine settings file</link>
4293 is located. When reading this property, a full path is
4294 always returned.
4295 </note>
4296 <note>
4297 The specified path may not exist, it will be created
4298 when necessary.
4299 </note>
4300 </desc>
4301 </attribute>
4302
4303 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4304 <desc>VRDP server object.</desc>
4305 </attribute>
4306
4307 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4308 <desc>Array of hard disks attached to this machine.</desc>
4309 </attribute>
4310
4311 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4312 <desc>Associated DVD drive object.</desc>
4313 </attribute>
4314
4315 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4316 <desc>Associated floppy drive object.</desc>
4317 </attribute>
4318
4319 <attribute name="USBController" type="IUSBController" readonly="yes">
4320 <desc>
4321 Associated USB controller object.
4322
4323 <note>
4324 If USB functionality is not available in the given edition of
4325 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4326 </note>
4327 </desc>
4328 </attribute>
4329
4330 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4331 <desc>Associated audio adapter, always present.</desc>
4332 </attribute>
4333
4334 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4335 <desc>Array of storage controllers attached to this machine.</desc>
4336 </attribute>
4337
4338 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4339 <desc>
4340 Full name of the file containing machine settings data.
4341 </desc>
4342 </attribute>
4343
4344 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4345 <desc>
4346 Current version of the format of the settings file of this machine
4347 (<link to="IMachine::settingsFilePath"/>).
4348
4349 The version string has the following format:
4350 <pre>
4351 x.y-platform
4352 </pre>
4353 where @c x and @c y are the major and the minor format
4354 versions, and @c platform is the platform identifier.
4355
4356 The current version usually matches the value of the
4357 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4358 settings file was created by an older version of VirtualBox and there
4359 was a change of the settings file format since then.
4360
4361 Note that VirtualBox automatically converts settings files from older
4362 versions to the most recent version when reading them (usually at
4363 VirtualBox startup) but it doesn't save the changes back until
4364 you call a method that implicitly saves settings (such as
4365 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4366 explicitly. Therefore, if the value of this attribute differs from the
4367 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4368 means that the settings file was converted but the result of the
4369 conversion is not yet saved to disk.
4370
4371 The above feature may be used by interactive front-ends to inform users
4372 about the settings file format change and offer them to explicitly save
4373 all converted settings files (the global and VM-specific ones),
4374 optionally create backup copies of the old settings files before saving,
4375 etc.
4376
4377 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4378 </desc>
4379 </attribute>
4380
4381 <attribute name="settingsModified" type="boolean" readonly="yes">
4382 <desc>
4383 Whether the settings of this machine have been modified
4384 (but neither yet saved nor discarded).
4385 <note>
4386 Reading this property is only valid on instances returned
4387 by <link to="ISession::machine"/> and on new machines
4388 created by <link to="IVirtualBox::createMachine"/> or opened
4389 by <link to="IVirtualBox::openMachine"/> but not
4390 yet registered, or on unregistered machines after calling
4391 <link to="IVirtualBox::unregisterMachine"/>. For all other
4392 cases, the settings can never be modified.
4393 </note>
4394 <note>
4395 For newly created unregistered machines, the value of this
4396 property is always @c true until <link to="#saveSettings"/>
4397 is called (no matter if any machine settings have been
4398 changed after the creation or not). For opened machines
4399 the value is set to @c false (and then follows to normal rules).
4400 </note>
4401 </desc>
4402 </attribute>
4403
4404 <attribute name="sessionState" type="SessionState" readonly="yes">
4405 <desc>Current session state for this machine.</desc>
4406 </attribute>
4407
4408 <attribute name="sessionType" type="wstring" readonly="yes">
4409 <desc>
4410 Type of the session. If <link to="#sessionState"/> is
4411 SessionSpawning or SessionOpen, this attribute contains the
4412 same value as passed to the
4413 <link to="IVirtualBox::openRemoteSession"/> method in the
4414 @a type parameter. If the session was opened directly using
4415 <link to="IVirtualBox::openSession"/>, or if
4416 <link to="#sessionState"/> is SessionClosed, the value of this
4417 attribute is an empty string.
4418 </desc>
4419 </attribute>
4420
4421 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4422 <desc>
4423 Identifier of the session process. This attribute contains the
4424 platform-dependent identifier of the process that has opened a
4425 direct session for this machine using the
4426 <link to="IVirtualBox::openSession"/> call. The returned value
4427 is only valid if <link to="#sessionState"/> is SessionOpen or
4428 SessionClosing (i.e. a session is currently open or being
4429 closed) by the time this property is read.
4430 </desc>
4431 </attribute>
4432
4433 <attribute name="state" type="MachineState" readonly="yes">
4434 <desc>Current execution state of this machine.</desc>
4435 </attribute>
4436
4437 <attribute name="lastStateChange" type="long long" readonly="yes">
4438 <desc>
4439 Time stamp of the last execution state change,
4440 in milliseconds since 1970-01-01 UTC.
4441 </desc>
4442 </attribute>
4443
4444 <attribute name="stateFilePath" type="wstring" readonly="yes">
4445 <desc>
4446 Full path to the file that stores the execution state of
4447 the machine when it is in the <link to="MachineState_Saved"/> state.
4448 <note>
4449 When the machine is not in the Saved state, this attribute is
4450 an empty string.
4451 </note>
4452 </desc>
4453 </attribute>
4454
4455 <attribute name="logFolder" type="wstring" readonly="yes">
4456 <desc>
4457 Full path to the folder that stores a set of rotated log files
4458 recorded during machine execution. The most recent log file is
4459 named <tt>VBox.log</tt>, the previous log file is
4460 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4461 in the current version).
4462 </desc>
4463 </attribute>
4464
4465 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4466 <desc>
4467 Current snapshot of this machine.
4468 <note>
4469 A @c null object is returned if the machine doesn't
4470 have snapshots.
4471 </note>
4472 <see><link to="ISnapshot"/></see>
4473 </desc>
4474 </attribute>
4475
4476 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4477 <desc>
4478 Number of snapshots taken on this machine. Zero means the
4479 machine doesn't have any snapshots.
4480 </desc>
4481 </attribute>
4482
4483 <attribute name="currentStateModified" type="boolean" readonly="yes">
4484 <desc>
4485 Returns @c true if the current state of the machine is not
4486 identical to the state stored in the current snapshot.
4487
4488 The current state is identical to the current snapshot right
4489 after one of the following calls are made:
4490 <ul>
4491 <li><link to="IConsole::discardCurrentState"/> or
4492 <link to="IConsole::discardCurrentSnapshotAndState"/>
4493 </li>
4494 <li><link to="IConsole::takeSnapshot"/> (issued on a
4495 powered off or saved machine, for which
4496 <link to="#settingsModified"/> returns @c false)
4497 </li>
4498 <li><link to="IMachine::setCurrentSnapshot"/>
4499 </li>
4500 </ul>
4501
4502 The current state remains identical until one of the following
4503 happens:
4504 <ul>
4505 <li>settings of the machine are changed</li>
4506 <li>the saved state is discarded</li>
4507 <li>the current snapshot is discarded</li>
4508 <li>an attempt to execute the machine is made</li>
4509 </ul>
4510
4511 <note>
4512 For machines that don't have snapshots, this property is
4513 always @c false.
4514 </note>
4515 </desc>
4516 </attribute>
4517
4518 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4519 <desc>
4520 Collection of shared folders for this machine (permanent shared
4521 folders). These folders are shared automatically at machine startup
4522 and available only to the guest OS installed within this machine.
4523
4524 New shared folders are added to the collection using
4525 <link to="#createSharedFolder"/>. Existing shared folders can be
4526 removed using <link to="#removeSharedFolder"/>.
4527 </desc>
4528 </attribute>
4529
4530 <attribute name="clipboardMode" type="ClipboardMode">
4531 <desc>
4532 Synchronization mode between the host OS clipboard
4533 and the guest OS clipboard.
4534 </desc>
4535 </attribute>
4536
4537 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4538 <desc>
4539 A comma-separated list of simple glob patterns. Changes to guest
4540 properties whose name matches one of the patterns will generate an
4541 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4542 </desc>
4543 </attribute>
4544
4545 <method name="setBootOrder">
4546 <desc>
4547 Puts the given device to the specified position in
4548 the boot order.
4549
4550 To indicate that no device is associated with the given position,
4551 <link to="DeviceType_Null"/> should be used.
4552
4553 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4554
4555 <result name="E_INVALIDARG">
4556 Boot @a position out of range.
4557 </result>
4558 <result name="E_NOTIMPL">
4559 Booting from USB @a device currently not supported.
4560 </result>
4561
4562 </desc>
4563 <param name="position" type="unsigned long" dir="in">
4564 <desc>
4565 Position in the boot order (@c 1 to the total number of
4566 devices the machine can boot from, as returned by
4567 <link to="ISystemProperties::maxBootPosition"/>).
4568 </desc>
4569 </param>
4570 <param name="device" type="DeviceType" dir="in">
4571 <desc>
4572 The type of the device used to boot at the given position.
4573 </desc>
4574 </param>
4575 </method>
4576
4577 <method name="getBootOrder" const="yes">
4578 <desc>
4579 Returns the device type that occupies the specified
4580 position in the boot order.
4581
4582 @todo [remove?]
4583 If the machine can have more than one device of the returned type
4584 (such as hard disks), then a separate method should be used to
4585 retrieve the individual device that occupies the given position.
4586
4587 If here are no devices at the given position, then
4588 <link to="DeviceType_Null"/> is returned.
4589
4590 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4591
4592 <result name="E_INVALIDARG">
4593 Boot @a position out of range.
4594 </result>
4595
4596 </desc>
4597 <param name="position" type="unsigned long" dir="in">
4598 <desc>
4599 Position in the boot order (@c 1 to the total number of
4600 devices the machine can boot from, as returned by
4601 <link to="ISystemProperties::maxBootPosition"/>).
4602 </desc>
4603 </param>
4604 <param name="device" type="DeviceType" dir="return">
4605 <desc>
4606 Device at the given position.
4607 </desc>
4608 </param>
4609 </method>
4610
4611 <method name="attachHardDisk">
4612 <desc>
4613 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4614 by the given UUID @a id) to the given hard disk controller
4615 (<link to="IStorageController" />, identified by @a name),
4616 at the indicated port and device.
4617
4618 For the IDE bus, the @a controllerPort parameter can be either
4619 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4620 respectively. For the primary controller of the IDE bus,
4621 @a device can be either @c 0 or @c 1, to specify the master or the
4622 slave device, respectively. For the secondary IDE controller, the
4623 device number must be @c 1 because VirtualBox reserves the
4624 secondary master for the CD-ROM drive.
4625
4626 For an SATA controller, @a controllerPort must be a number ranging
4627 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4628 be a number ranging from @c 0 to @c 15.
4629
4630 For both SCSI and SATA, the @a device parameter is unused and must
4631 be @c 0.
4632
4633 The specified device slot must not have another disk attached to it, or
4634 this method will fail.
4635
4636 See <link to="IHardDisk"/> for more detailed information about
4637 attaching hard disks.
4638
4639 <note>
4640 You cannot attach a hard disk to a running machine. Also, you cannot
4641 attach a hard disk to a newly created machine until this machine's
4642 settings are saved to disk using <link to="#saveSettings"/>.
4643 </note>
4644 <note>
4645 If the hard disk is being attached indirectly, a new differencing hard
4646 disk will implicitly be created for it and attached instead. If the
4647 changes made to the machine settings (including this indirect
4648 attachment) are later cancelled using <link to="#discardSettings"/>,
4649 this implicitly created differencing hard disk will implicitly
4650 be deleted.
4651 </note>
4652
4653 <result name="E_INVALIDARG">
4654 SATA device, SATA port, IDE port or IDE slot out of range.
4655 </result>
4656 <result name="VBOX_E_INVALID_OBJECT_STATE">
4657 Attempt to attach hard disk to an unregistered virtual machine.
4658 </result>
4659 <result name="VBOX_E_INVALID_VM_STATE">
4660 Invalid machine state.
4661 </result>
4662 <result name="VBOX_E_OBJECT_IN_USE">
4663 Hard disk already attached to this or another virtual machine.
4664 </result>
4665
4666 </desc>
4667 <param name="id" type="wstring" dir="in">
4668 <desc>UUID of the hard disk to attach.</desc>
4669 </param>
4670 <param name="name" type="wstring" dir="in">
4671 <desc>Name of the storage controller to attach the hard disk to.</desc>
4672 </param>
4673 <param name="controllerPort" type="long" dir="in">
4674 <desc>Port to attach the hard disk to.</desc>
4675 </param>
4676 <param name="device" type="long" dir="in">
4677 <desc>
4678 Device slot in the given port to attach the hard disk to.
4679 </desc>
4680 </param>
4681 </method>
4682
4683 <method name="getHardDisk" const="yes">
4684 <desc>
4685 Returns the virtual hard disk attached to a device slot of the specified
4686 bus.
4687
4688 Note that if the hard disk was indirectly attached by
4689 <link to="#attachHardDisk"/> to the given device slot then this
4690 method will return not the same object as passed to the
4691 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4692 more detailed information about attaching hard disks.
4693
4694 <result name="VBOX_E_OBJECT_NOT_FOUND">
4695 No hard disk attached to given slot/bus.
4696 </result>
4697
4698 </desc>
4699 <param name="name" type="wstring" dir="in">
4700 <desc>Name of the storage controller the hard disk is attached to.</desc>
4701 </param>
4702 <param name="controllerPort" type="long" dir="in">
4703 <desc>Port to query.</desc>
4704 </param>
4705 <param name="device" type="long" dir="in">
4706 <desc>Device slot in the given port to query.</desc>
4707 </param>
4708 <param name="hardDisk" type="IHardDisk" dir="return">
4709 <desc>Attached hard disk object.</desc>
4710 </param>
4711 </method>
4712
4713 <method name="detachHardDisk">
4714 <desc>
4715 Detaches the virtual hard disk attached to a device slot of the
4716 specified bus.
4717
4718 Detaching the hard disk from the virtual machine is deferred. This means
4719 that the hard disk remains associated with the machine when this method
4720 returns and gets actually de-associated only after a successful
4721 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4722 for more detailed information about attaching hard disks.
4723
4724 <note>
4725 You cannot detach the hard disk from a running machine.
4726 </note>
4727 <note>
4728 Detaching differencing hard disks implicitly created by <link
4729 to="#attachHardDisk"/> for the indirect attachment using this
4730 method will <b>not</b> implicitly delete them. The
4731 <link to="IHardDisk::deleteStorage"/> operation should be
4732 explicitly performed by the caller after the hard disk is successfully
4733 detached and the settings are saved with
4734 <link to="#saveSettings"/>, if it is the desired action.
4735 </note>
4736
4737 <result name="VBOX_E_INVALID_VM_STATE">
4738 Attempt to detach hard disk from a running virtual machine.
4739 </result>
4740 <result name="VBOX_E_OBJECT_NOT_FOUND">
4741 No hard disk attached to given slot/bus.
4742 </result>
4743 <result name="VBOX_E_NOT_SUPPORTED">
4744 Hard disk format does not support storage deletion.
4745 </result>
4746
4747 </desc>
4748 <param name="name" type="wstring" dir="in">
4749 <desc>name of the storage controller to detach the hard disk from.</desc>
4750 </param>
4751 <param name="controllerPort" type="long" dir="in">
4752 <desc>Port number to detach the hard disk from.</desc>
4753 </param>
4754 <param name="device" type="long" dir="in">
4755 <desc>Device slot number to detach the hard disk from.</desc>
4756 </param>
4757 </method>
4758
4759 <method name="getHardDiskAttachmentsOfController" const="yes">
4760 <desc>
4761 Returns an array of hard disk attachments which are attached to the
4762 the controller with the given name.
4763
4764 <result name="VBOX_E_OBJECT_NOT_FOUND">
4765 A storage controller with given name doesn't exist.
4766 </result>
4767 </desc>
4768 <param name="name" type="wstring" dir="in"/>
4769 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4770 </method>
4771
4772 <method name="getNetworkAdapter" const="yes">
4773 <desc>
4774 Returns the network adapter associated with the given slot.
4775 Slots are numbered sequentially, starting with zero. The total
4776 number of adapters per machine is defined by the
4777 <link to="ISystemProperties::networkAdapterCount"/> property,
4778 so the maximum slot number is one less than that property's value.
4779
4780 <result name="E_INVALIDARG">
4781 Invalid @a slot number.
4782 </result>
4783
4784 </desc>
4785 <param name="slot" type="unsigned long" dir="in"/>
4786 <param name="adapter" type="INetworkAdapter" dir="return"/>
4787 </method>
4788
4789 <method name="addStorageController">
4790 <desc>
4791 Adds a new storage controller (SCSI or SATA controller) to the
4792 machine and returns it as an instance of
4793 <link to="IStorageController" />.
4794
4795 @a name identifies the controller for subsequent calls such as
4796 <link to="#getStorageControllerByName" /> or
4797 <link to="#removeStorageController" /> or
4798 <link to="#attachHardDisk" />.
4799
4800 After the controller has been added, you can set its exact
4801 type by setting the <link to="IStorageController::controllerType" />.
4802
4803 <result name="VBOX_E_OBJECT_IN_USE">
4804 A storage controller with given name exists already.
4805 </result>
4806 <result name="E_INVALIDARG">
4807 Invalid @a controllerType.
4808 </result>
4809 </desc>
4810 <param name="name" type="wstring" dir="in"/>
4811 <param name="connectionType" type="StorageBus" dir="in"/>
4812 <param name="controller" type="IStorageController" dir="return"/>
4813 </method>
4814
4815 <method name="getStorageControllerByName" const="yes">
4816 <desc>
4817 Returns a storage controller with the given name.
4818
4819 <result name="VBOX_E_OBJECT_NOT_FOUND">
4820 A storage controller with given name doesn't exist.
4821 </result>
4822 </desc>
4823 <param name="name" type="wstring" dir="in"/>
4824 <param name="storageController" type="IStorageController" dir="return"/>
4825 </method>
4826
4827 <method name="removeStorageController">
4828 <desc>
4829 Removes a storage controller from the machine.
4830
4831 <result name="VBOX_E_OBJECT_NOT_FOUND">
4832 A storage controller with given name doesn't exist.
4833 </result>
4834 </desc>
4835 <param name="name" type="wstring" dir="in"/>
4836 </method>
4837
4838 <method name="getSerialPort" const="yes">
4839 <desc>
4840 Returns the serial port associated with the given slot.
4841 Slots are numbered sequentially, starting with zero. The total
4842 number of serial ports per machine is defined by the
4843 <link to="ISystemProperties::serialPortCount"/> property,
4844 so the maximum slot number is one less than that property's value.
4845
4846 <result name="E_INVALIDARG">
4847 Invalid @a slot number.
4848 </result>
4849
4850 </desc>
4851 <param name="slot" type="unsigned long" dir="in"/>
4852 <param name="port" type="ISerialPort" dir="return"/>
4853 </method>
4854
4855 <method name="getParallelPort" const="yes">
4856 <desc>
4857 Returns the parallel port associated with the given slot.
4858 Slots are numbered sequentially, starting with zero. The total
4859 number of parallel ports per machine is defined by the
4860 <link to="ISystemProperties::parallelPortCount"/> property,
4861 so the maximum slot number is one less than that property's value.
4862
4863 <result name="E_INVALIDARG">
4864 Invalid @a slot number.
4865 </result>
4866
4867 </desc>
4868 <param name="slot" type="unsigned long" dir="in"/>
4869 <param name="port" type="IParallelPort" dir="return"/>
4870 </method>
4871
4872 <method name="getNextExtraDataKey">
4873 <desc>
4874 Returns the machine-specific extra data key name following the
4875 supplied key.
4876
4877 An error is returned if the supplied @a key does not exist. An empty
4878 string is returned in @a nextKey if the supplied key is the last key.
4879 When supplying @c null or an empty string for the @a key, the first key
4880 item is returned in @a nextKey (if there is any). @a nextValue is an
4881 optional parameter and if supplied, the next key's value is returned in
4882 it.
4883
4884 <result name="VBOX_E_OBJECT_NOT_FOUND">
4885 Extra data @a key not found.
4886 </result>
4887
4888 </desc>
4889 <param name="key" type="wstring" dir="in">
4890 <desc>Name of the data key to follow.</desc>
4891 </param>
4892 <param name="nextKey" type="wstring" dir="out">
4893 <desc>Name of the next data key.</desc>
4894 </param>
4895 <param name="nextValue" type="wstring" dir="out">
4896 <desc>Value of the next data key.</desc>
4897 </param>
4898 </method>
4899
4900 <method name="getExtraData">
4901 <desc>
4902 Returns associated machine-specific extra data.
4903
4904 If the requested data @a key does not exist, this function will
4905 succeed and return an empty string in the @a value argument.
4906
4907 <result name="VBOX_E_FILE_ERROR">
4908 Settings file not accessible.
4909 </result>
4910 <result name="VBOX_E_XML_ERROR">
4911 Could not parse the settings file.
4912 </result>
4913
4914 </desc>
4915 <param name="key" type="wstring" dir="in">
4916 <desc>Name of the data key to get.</desc>
4917 </param>
4918 <param name="value" type="wstring" dir="return">
4919 <desc>Value of the requested data key.</desc>
4920 </param>
4921 </method>
4922
4923 <method name="setExtraData">
4924 <desc>
4925 Sets associated machine-specific extra data.
4926
4927 If you pass @c null or an empty string as a key @a value, the given
4928 @a key will be deleted.
4929
4930 <note>
4931 Before performing the actual data change, this method will ask all
4932 registered callbacks using the
4933 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4934 notification for a permission. If one of the callbacks refuses the
4935 new value, the change will not be performed.
4936 </note>
4937 <note>
4938 On success, the
4939 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4940 is called to inform all registered callbacks about a successful data
4941 change.
4942 </note>
4943 <note>
4944 This method can be called outside the machine session and therefore
4945 it's a caller's responsibility to handle possible race conditions
4946 when several clients change the same key at the same time.
4947 </note>
4948
4949 <result name="VBOX_E_FILE_ERROR">
4950 Settings file not accessible.
4951 </result>
4952 <result name="VBOX_E_XML_ERROR">
4953 Could not parse the settings file.
4954 </result>
4955
4956 </desc>
4957 <param name="key" type="wstring" dir="in">
4958 <desc>Name of the data key to set.</desc>
4959 </param>
4960 <param name="value" type="wstring" dir="in">
4961 <desc>Value to assign to the key.</desc>
4962 </param>
4963 </method>
4964
4965 <method name="saveSettings">
4966 <desc>
4967 Saves any changes to machine settings made since the session
4968 has been opened or a new machine has been created, or since the
4969 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4970 For registered machines, new settings become visible to all
4971 other VirtualBox clients after successful invocation of this
4972 method.
4973 <note>
4974 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4975 notification event after the configuration has been successfully
4976 saved (only for registered machines).
4977 </note>
4978 <note>
4979 Calling this method is only valid on instances returned
4980 by <link to="ISession::machine"/> and on new machines
4981 created by <link to="IVirtualBox::createMachine"/> but not
4982 yet registered, or on unregistered machines after calling
4983 <link to="IVirtualBox::unregisterMachine"/>.
4984 </note>
4985
4986 <result name="VBOX_E_FILE_ERROR">
4987 Settings file not accessible.
4988 </result>
4989 <result name="VBOX_E_XML_ERROR">
4990 Could not parse the settings file.
4991 </result>
4992 <result name="E_ACCESSDENIED">
4993 Modification request refused.
4994 </result>
4995
4996 </desc>
4997 </method>
4998
4999 <method name="saveSettingsWithBackup">
5000 <desc>
5001 Creates a backup copy of the machine settings file (<link
5002 to="IMachine::settingsFilePath"/>) in case of auto-conversion, and then calls
5003 <link to="IMachine::saveSettings"/>.
5004
5005 Note that the backup copy is created <b>only</b> if the settings file
5006 auto-conversion took place (see <link to="#settingsFileVersion"/> for
5007 details). Otherwise, this call is fully equivalent to
5008 <link to="IMachine::saveSettings"/> and no backup copying is done.
5009
5010 The backup copy is created in the same directory where the original
5011 settings file is located. It is given the following file name:
5012 <pre>
5013 original.xml.x.y-platform.bak
5014 </pre>
5015 where <tt>original.xml</tt> is the original settings file name
5016 (excluding path), and <tt>x.y-platform</tt> is the version of the old
5017 format of the settings file (before auto-conversion).
5018
5019 If the given backup file already exists, this method will try to add the
5020 <tt>.N</tt> suffix to the backup file name (where @c N counts from
5021 0 to 9) and copy it again until it succeeds. If all suffixes are
5022 occupied, or if any other copy error occurs, this method will return a
5023 failure.
5024
5025 If the copy operation succeeds, the @a bakFileName return argument will
5026 receive a full path to the created backup file (for informational
5027 purposes). Note that this will happen even if the subsequent
5028 <link to="#saveSettings"/> call performed by this method after the
5029 copy operation, fails.
5030
5031 <note>
5032 The VirtualBox API never calls this method. It is intended purely for
5033 the purposes of creating backup copies of the settings files by
5034 front-ends before saving the results of the automatically performed
5035 settings conversion to disk.
5036 </note>
5037
5038 <see>settingsFileVersion</see>
5039
5040 <result name="VBOX_E_FILE_ERROR">
5041 Settings file not accessible.
5042 </result>
5043 <result name="VBOX_E_XML_ERROR">
5044 Could not parse the settings file.
5045 </result>
5046 <result name="VBOX_E_INVALID_VM_STATE">
5047 Virtual machine is not mutable.
5048 </result>
5049 <result name="E_ACCESSDENIED">
5050 Modification request refused.
5051 </result>
5052
5053 </desc>
5054 <param name="bakFileName" type="wstring" dir="return">
5055 <desc>Full path to the created backup copy.</desc>
5056 </param>
5057 </method>
5058
5059 <method name="discardSettings">
5060 <desc>
5061 Discards any changes to the machine settings made since the session
5062 has been opened or since the last call to <link to="#saveSettings"/>
5063 or <link to="#discardSettings"/>.
5064 <note>
5065 Calling this method is only valid on instances returned
5066 by <link to="ISession::machine"/> and on new machines
5067 created by <link to="IVirtualBox::createMachine"/> or
5068 opened by <link to="IVirtualBox::openMachine"/> but not
5069 yet registered, or on unregistered machines after calling
5070 <link to="IVirtualBox::unregisterMachine"/>.
5071 </note>
5072
5073 <result name="VBOX_E_INVALID_VM_STATE">
5074 Virtual machine is not mutable.
5075 </result>
5076
5077 </desc>
5078 </method>
5079
5080 <method name="deleteSettings">
5081 <desc>
5082 Deletes the settings file of this machine from disk.
5083 The machine must not be registered in order for this operation
5084 to succeed.
5085 <note>
5086 <link to="#settingsModified"/> will return @c true after this
5087 method successfully returns.
5088 </note>
5089 <note>
5090 Calling this method is only valid on instances returned
5091 by <link to="ISession::machine"/> and on new machines
5092 created by <link to="IVirtualBox::createMachine"/> or
5093 opened by <link to="IVirtualBox::openMachine"/> but not
5094 yet registered, or on unregistered machines after calling
5095 <link to="IVirtualBox::unregisterMachine"/>.
5096 </note>
5097 <note>
5098 The deleted machine settings file can be restored (saved again)
5099 by calling <link to="#saveSettings"/>.
5100 </note>
5101
5102 <result name="VBOX_E_INVALID_VM_STATE">
5103 Cannot delete settings of a registered machine or
5104 machine not mutable.
5105 </result>
5106 <result name="VBOX_E_IPRT_ERROR">
5107 Could not delete the settings file.
5108 </result>
5109
5110 </desc>
5111 </method>
5112
5113 <method name="export">
5114 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5115 steps required to export VirtualBox machines to OVF.
5116 </desc>
5117
5118 <param name="aAppliance" type="IAppliance" dir="in">
5119 <desc>Appliance to export this machine to.</desc>
5120 </param>
5121 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5122 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5123 </param>
5124 </method >
5125
5126 <method name="getSnapshot">
5127 <desc>
5128 Returns a snapshot of this machine with the given UUID.
5129 A @c null UUID can be used to obtain the first snapshot
5130 taken on this machine. This is useful if you want to traverse
5131 the whole tree of snapshots starting from the root.
5132
5133 <result name="VBOX_E_OBJECT_NOT_FOUND">
5134 Virtual machine has no snapshots or snapshot not found.
5135 </result>
5136
5137 </desc>
5138 <param name="id" type="wstring" dir="in">
5139 <desc>UUID of the snapshot to get</desc>
5140 </param>
5141 <param name="snapshot" type="ISnapshot" dir="return">
5142 <desc>Snapshot object with the given UUID.</desc>
5143 </param>
5144 </method>
5145
5146 <method name="findSnapshot">
5147 <desc>
5148 Returns a snapshot of this machine with the given name.
5149
5150 <result name="VBOX_E_OBJECT_NOT_FOUND">
5151 Virtual machine has no snapshots or snapshot not found.
5152 </result>
5153
5154 </desc>
5155 <param name="name" type="wstring" dir="in">
5156 <desc>Name of the snapshot to find</desc>
5157 </param>
5158 <param name="snapshot" type="ISnapshot" dir="return">
5159 <desc>Snapshot object with the given name.</desc>
5160 </param>
5161 </method>
5162
5163 <method name="setCurrentSnapshot">
5164 <desc>
5165 Sets the current snapshot of this machine.
5166 <note>
5167 In the current implementation, this operation is not
5168 implemented.
5169 </note>
5170 </desc>
5171 <param name="id" type="wstring" dir="in">
5172 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5173 </param>
5174 </method>
5175
5176 <method name="createSharedFolder">
5177 <desc>
5178 Creates a new permanent shared folder by associating the given logical
5179 name with the given host path, adds it to the collection of shared
5180 folders and starts sharing it. Refer to the description of
5181 <link to="ISharedFolder"/> to read more about logical names.
5182
5183 <result name="VBOX_E_OBJECT_IN_USE">
5184 Shared folder already exists.
5185 </result>
5186 <result name="VBOX_E_FILE_ERROR">
5187 Shared folder @a hostPath not accessible.
5188 </result>
5189
5190 </desc>
5191 <param name="name" type="wstring" dir="in">
5192 <desc>Unique logical name of the shared folder.</desc>
5193 </param>
5194 <param name="hostPath" type="wstring" dir="in">
5195 <desc>Full path to the shared folder in the host file system.</desc>
5196 </param>
5197 <param name="writable" type="boolean" dir="in">
5198 <desc>Whether the share is writable or readonly</desc>
5199 </param>
5200 </method>
5201
5202 <method name="removeSharedFolder">
5203 <desc>
5204 Removes the permanent shared folder with the given name previously
5205 created by <link to="#createSharedFolder"/> from the collection of
5206 shared folders and stops sharing it.
5207
5208 <result name="VBOX_E_INVALID_VM_STATE">
5209 Virtual machine is not mutable.
5210 </result>
5211 <result name="VBOX_E_OBJECT_NOT_FOUND">
5212 Shared folder @a name does not exist.
5213 </result>
5214
5215 </desc>
5216 <param name="name" type="wstring" dir="in">
5217 <desc>Logical name of the shared folder to remove.</desc>
5218 </param>
5219 </method>
5220
5221 <method name="canShowConsoleWindow">
5222 <desc>
5223 Returns @c true if the VM console process can activate the
5224 console window and bring it to foreground on the desktop of
5225 the host PC.
5226 <note>
5227 This method will fail if a session for this machine is not
5228 currently open.
5229 </note>
5230
5231 <result name="VBOX_E_INVALID_VM_STATE">
5232 Machine session is not open.
5233 </result>
5234
5235 </desc>
5236 <param name="canShow" type="boolean" dir="return">
5237 <desc>
5238 @c true if the console window can be shown and @c false otherwise.
5239 </desc>
5240 </param>
5241 </method>
5242
5243 <method name="showConsoleWindow">
5244 <desc>
5245 Activates the console window and brings it to foreground on
5246 the desktop of the host PC. Many modern window managers on
5247 many platforms implement some sort of focus stealing
5248 prevention logic, so that it may be impossible to activate
5249 a window without the help of the currently active
5250 application. In this case, this method will return a non-zero
5251 identifier that represents the top-level window of the VM
5252 console process. The caller, if it represents a currently
5253 active process, is responsible to use this identifier (in a
5254 platform-dependent manner) to perform actual window
5255 activation.
5256 <note>
5257 This method will fail if a session for this machine is not
5258 currently open.
5259 </note>
5260
5261 <result name="VBOX_E_INVALID_VM_STATE">
5262 Machine session is not open.
5263 </result>
5264
5265 </desc>
5266 <param name="winId" type="unsigned long long" dir="return">
5267 <desc>
5268 Platform-dependent identifier of the top-level VM console
5269 window, or zero if this method has performed all actions
5270 necessary to implement the <i>show window</i> semantics for
5271 the given platform and/or VirtualBox front-end.
5272 </desc>
5273 </param>
5274 </method>
5275
5276 <method name="getGuestProperty">
5277 <desc>
5278 Reads an entry from the machine's guest property store.
5279
5280 <result name="VBOX_E_INVALID_VM_STATE">
5281 Machine session is not open.
5282 </result>
5283
5284 </desc>
5285 <param name="name" type="wstring" dir="in">
5286 <desc>
5287 The name of the property to read.
5288 </desc>
5289 </param>
5290 <param name="value" type="wstring" dir="out">
5291 <desc>
5292 The value of the property. If the property does not exist then this
5293 will be empty.
5294 </desc>
5295 </param>
5296 <param name="timestamp" type="unsigned long long" dir="out">
5297 <desc>
5298 The time at which the property was last modified, as seen by the
5299 server process.
5300 </desc>
5301 </param>
5302 <param name="flags" type="wstring" dir="out">
5303 <desc>
5304 Additional property parameters, passed as a comma-separated list of
5305 "name=value" type entries.
5306 </desc>
5307 </param>
5308 </method>
5309
5310 <method name="getGuestPropertyValue">
5311 <desc>
5312 Reads a value from the machine's guest property store.
5313
5314 <result name="VBOX_E_INVALID_VM_STATE">
5315 Machine session is not open.
5316 </result>
5317
5318 </desc>
5319 <param name="property" type="wstring" dir="in">
5320 <desc>
5321 The name of the property to read.
5322 </desc>
5323 </param>
5324 <param name="value" type="wstring" dir="return">
5325 <desc>
5326 The value of the property. If the property does not exist then this
5327 will be empty.
5328 </desc>
5329 </param>
5330 </method>
5331
5332 <method name="getGuestPropertyTimestamp">
5333 <desc>
5334 Reads a property timestamp from the machine's guest property store.
5335
5336 <result name="VBOX_E_INVALID_VM_STATE">
5337 Machine session is not open.
5338 </result>
5339
5340 </desc>
5341 <param name="property" type="wstring" dir="in">
5342 <desc>
5343 The name of the property to read.
5344 </desc>
5345 </param>
5346 <param name="value" type="unsigned long long" dir="return">
5347 <desc>
5348 The timestamp. If the property does not exist then this will be
5349 empty.
5350 </desc>
5351 </param>
5352 </method>
5353
5354 <method name="setGuestProperty">
5355 <desc>
5356 Sets, changes or deletes an entry in the machine's guest property
5357 store.
5358
5359 <result name="E_ACCESSDENIED">
5360 Property cannot be changed.
5361 </result>
5362 <result name="E_INVALIDARG">
5363 Invalid @a flags.
5364 </result>
5365 <result name="VBOX_E_INVALID_VM_STATE">
5366 Virtual machine is not mutable or session not open.
5367 </result>
5368 <result name="VBOX_E_INVALID_OBJECT_STATE">
5369 Cannot set transient property when machine not running.
5370 </result>
5371
5372 </desc>
5373 <param name="property" type="wstring" dir="in">
5374 <desc>
5375 The name of the property to set, change or delete.
5376 </desc>
5377 </param>
5378 <param name="value" type="wstring" dir="in">
5379 <desc>
5380 The new value of the property to set, change or delete. If the
5381 property does not yet exist and value is non-empty, it will be
5382 created. If the value is @c null or empty, the property will be
5383 deleted if it exists.
5384 </desc>
5385 </param>
5386 <param name="flags" type="wstring" dir="in">
5387 <desc>
5388 Additional property parameters, passed as a comma-separated list of
5389 "name=value" type entries.
5390 </desc>
5391 </param>
5392 </method>
5393
5394 <method name="setGuestPropertyValue">
5395 <desc>
5396 Sets, changes or deletes a value in the machine's guest property
5397 store. The flags field will be left unchanged or created empty for a
5398 new property.
5399
5400 <result name="E_ACCESSDENIED">
5401 Property cannot be changed.
5402 </result>
5403 <result name="VBOX_E_INVALID_VM_STATE">
5404 Virtual machine is not mutable or session not open.
5405 </result>
5406 <result name="VBOX_E_INVALID_OBJECT_STATE">
5407 Cannot set transient property when machine not running.
5408 </result>
5409 </desc>
5410
5411 <param name="property" type="wstring" dir="in">
5412 <desc>
5413 The name of the property to set, change or delete.
5414 </desc>
5415 </param>
5416 <param name="value" type="wstring" dir="in">
5417 <desc>
5418 The new value of the property to set, change or delete. If the
5419 property does not yet exist and value is non-empty, it will be
5420 created. If the value is @c null or empty, the property will be
5421 deleted if it exists.
5422 </desc>
5423 </param>
5424 </method>
5425
5426 <method name="enumerateGuestProperties">
5427 <desc>
5428 Return a list of the guest properties matching a set of patterns along
5429 with their values, time stamps and flags.
5430 </desc>
5431 <param name="patterns" type="wstring" dir="in">
5432 <desc>
5433 The patterns to match the properties against, separated by '|'
5434 characters. If this is empty or @c null, all properties will match.
5435 </desc>
5436 </param>
5437 <param name="name" type="wstring" dir="out" safearray="yes">
5438 <desc>
5439 The names of the properties returned.
5440 </desc>
5441 </param>
5442 <param name="value" type="wstring" dir="out" safearray="yes">
5443 <desc>
5444 The values of the properties returned. The array entries match the
5445 corresponding entries in the @a name array.
5446 </desc>
5447 </param>
5448 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5449 <desc>
5450 The time stamps of the properties returned. The array entries match
5451 the corresponding entries in the @a name array.
5452 </desc>
5453 </param>
5454 <param name="flags" type="wstring" dir="out" safearray="yes">
5455 <desc>
5456 The flags of the properties returned. The array entries match the
5457 corresponding entries in the @a name array.
5458 </desc>
5459 </param>
5460 </method>
5461</interface>
5462
5463 <!--
5464 // IConsole
5465 /////////////////////////////////////////////////////////////////////////
5466 -->
5467
5468 <interface
5469 name="IConsoleCallback" extends="$unknown"
5470 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5471 wsmap="suppress"
5472 >
5473
5474 <desc>
5475 This interface is used by a client of the Main API that need to
5476 be notified of events. For example, a graphical user interface
5477 can use this to learn about machine state changes so they can
5478 update the list of virtual machines without having to rely
5479 on polling.
5480
5481 Whenever relevant events occur in VirtualBox, the callbacks in
5482 objects of this interface are called. In order for this to be
5483 useful, a client needs to create its own subclass that implements
5484 this interface in which the methods for the relevant callbacks
5485 are overridden. An instance of this subclass interface can then
5486 be passed to <link to="IConsole::registerCallback" />.
5487 </desc>
5488
5489 <method name="onMousePointerShapeChange">
5490 <desc>
5491 Notification when the guest mouse pointer shape has
5492 changed. The new shape data is given.
5493 </desc>
5494 <param name="visible" type="boolean" dir="in">
5495 <desc>
5496 Flag whether the pointer is visible.
5497 </desc>
5498 </param>
5499 <param name="alpha" type="boolean" dir="in">
5500 <desc>
5501 Flag whether the pointer has an alpha channel.
5502 </desc>
5503 </param>
5504 <param name="xHot" type="unsigned long" dir="in">
5505 <desc>
5506 The pointer hot spot x coordinate.
5507 </desc>
5508 </param>
5509 <param name="yHot" type="unsigned long" dir="in">
5510 <desc>
5511 The pointer hot spot y coordinate.
5512 </desc>
5513 </param>
5514 <param name="width" type="unsigned long" dir="in">
5515 <desc>
5516 Width of the pointer shape in pixels.
5517 </desc>
5518 </param>
5519 <param name="height" type="unsigned long" dir="in">
5520 <desc>
5521 Height of the pointer shape in pixels.
5522 </desc>
5523 </param>
5524 <param name="shape" type="octet" mod="ptr" dir="in">
5525 <desc>
5526 Address of the shape buffer.
5527
5528 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5529 followed by a 32-bpp XOR (color) mask.
5530
5531 For pointers without alpha channel the XOR mask pixels are 32
5532 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5533 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5534
5535 An AND mask is used for pointers with alpha channel, so if the
5536 callback does not support alpha, the pointer could be
5537 displayed as a normal color pointer.
5538
5539 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5540 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5541 height</tt>. The padding bits at the end of each scanline are
5542 undefined.
5543
5544 The XOR mask follows the AND mask on the next 4-byte aligned
5545 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5546 Bytes in the gap between the AND and the XOR mask are undefined.
5547 The XOR mask scanlines have no gap between them and the size of
5548 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5549
5550 <note>
5551 If @a shape is 0, only the pointer visibility is changed.
5552 </note>
5553 </desc>
5554 </param>
5555 </method>
5556
5557 <method name="onMouseCapabilityChange">
5558 <desc>
5559 Notification when the mouse capabilities reported by the
5560 guest have changed. The new capabilities are passed.
5561 </desc>
5562 <param name="supportsAbsolute" type="boolean" dir="in"/>
5563 <param name="needsHostCursor" type="boolean" dir="in"/>
5564 </method>
5565
5566 <method name="onKeyboardLedsChange">
5567 <desc>
5568 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5569 to alter the state of the keyboard LEDs.
5570 </desc>
5571 <param name="numLock" type="boolean" dir="in"/>
5572 <param name="capsLock" type="boolean" dir="in"/>
5573 <param name="scrollLock" type="boolean" dir="in"/>
5574 </method>
5575
5576 <method name="onStateChange">
5577 <desc>
5578 Notification when the execution state of the machine has changed.
5579 The new state will be given.
5580 </desc>
5581 <param name="state" type="MachineState" dir="in"/>
5582 </method>
5583
5584 <method name="onAdditionsStateChange">
5585 <desc>
5586 Notification when a Guest Additions property changes.
5587 Interested callees should query IGuest attributes to
5588 find out what has changed.
5589 </desc>
5590 </method>
5591
5592 <method name="onDVDDriveChange">
5593 <desc>
5594 Notification when a property of the
5595 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5596 Interested callees should use IDVDDrive methods to find out what has
5597 changed.
5598 </desc>
5599 </method>
5600
5601 <method name="onFloppyDriveChange">
5602 <desc>
5603 Notification when a property of the
5604 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5605 Interested callees should use IFloppyDrive methods to find out what
5606 has changed.
5607 </desc>
5608 </method>
5609
5610 <method name="onNetworkAdapterChange">
5611 <desc>
5612 Notification when a property of one of the
5613 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5614 changes. Interested callees should use INetworkAdapter methods and
5615 attributes to find out what has changed.
5616 </desc>
5617 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5618 <desc>Network adapter that is subject to change.</desc>
5619 </param>
5620 </method>
5621
5622 <method name="onSerialPortChange">
5623 <desc>
5624 Notification when a property of one of the
5625 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5626 Interested callees should use ISerialPort methods and attributes
5627 to find out what has changed.
5628 </desc>
5629 <param name="serialPort" type="ISerialPort" dir="in">
5630 <desc>Serial port that is subject to change.</desc>
5631 </param>
5632 </method>
5633
5634 <method name="onParallelPortChange">
5635 <desc>
5636 Notification when a property of one of the
5637 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5638 changes. Interested callees should use ISerialPort methods and
5639 attributes to find out what has changed.
5640 </desc>
5641 <param name="parallelPort" type="IParallelPort" dir="in">
5642 <desc>Parallel port that is subject to change.</desc>
5643 </param>
5644 </method>
5645
5646 <method name="onStorageControllerChange">
5647 <desc>
5648 Notification when a property of one of the
5649 virtual <link to="IMachine::storageControllers">storage controllers</link>
5650 changes. Interested callees should query the corresponding collections
5651 to find out what has changed.
5652 </desc>
5653 </method>
5654
5655 <method name="onVRDPServerChange">
5656 <desc>
5657 Notification when a property of the
5658 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5659 Interested callees should use IVRDPServer methods and attributes to
5660 find out what has changed.
5661 </desc>
5662 </method>
5663
5664 <method name="onUSBControllerChange">
5665 <desc>
5666 Notification when a property of the virtual
5667 <link to="IMachine::USBController">USB controller</link> changes.
5668 Interested callees should use IUSBController methods and attributes to
5669 find out what has changed.
5670 </desc>
5671 </method>
5672
5673 <method name="onUSBDeviceStateChange">
5674 <desc>
5675 Notification when a USB device is attached to or detached from
5676 the virtual USB controller.
5677
5678 This notification is sent as a result of the indirect
5679 request to attach the device because it matches one of the
5680 machine USB filters, or as a result of the direct request
5681 issued by <link to="IConsole::attachUSBDevice"/> or
5682 <link to="IConsole::detachUSBDevice"/>.
5683
5684 This notification is sent in case of both a succeeded and a
5685 failed request completion. When the request succeeds, the
5686 @a error parameter is @c null, and the given device has been
5687 already added to (when @a attached is @c true) or removed from
5688 (when @a attached is @c false) the collection represented by
5689 <link to="IConsole::USBDevices"/>. On failure, the collection
5690 doesn't change and the @a error parameter represents the error
5691 message describing the failure.
5692
5693 </desc>
5694 <param name="device" type="IUSBDevice" dir="in">
5695 <desc>Device that is subject to state change.</desc>
5696 </param>
5697 <param name="attached" type="boolean" dir="in">
5698 <desc>
5699 @c true if the device was attached and @c false otherwise.
5700 </desc>
5701 </param>
5702 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5703 <desc>
5704 @c null on success or an error message object on failure.
5705 </desc>
5706 </param>
5707 </method>
5708
5709 <method name="onSharedFolderChange">
5710 <desc>
5711 Notification when a shared folder is added or removed.
5712 The @a scope argument defines one of three scopes:
5713 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5714 (<link to="Scope_Global">Global</link>),
5715 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5716 the machine (<link to="Scope_Machine">Machine</link>) or <link
5717 to="IConsole::sharedFolders">transient shared folders</link> of the
5718 machine (<link to="Scope_Session">Session</link>). Interested callees
5719 should use query the corresponding collections to find out what has
5720 changed.
5721 </desc>
5722 <param name="scope" type="Scope" dir="in">
5723 <desc>Scope of the notification.</desc>
5724 </param>
5725 </method>
5726
5727 <method name="onRuntimeError">
5728 <desc>
5729 Notification when an error happens during the virtual
5730 machine execution.
5731
5732 There are three kinds of runtime errors:
5733 <ul>
5734 <li><i>fatal</i></li>
5735 <li><i>non-fatal with retry</i></li>
5736 <li><i>non-fatal warnings</i></li>
5737 </ul>
5738
5739 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5740 to @c true. In case of fatal errors, the virtual machine
5741 execution is always paused before calling this notification, and
5742 the notification handler is supposed either to immediately save
5743 the virtual machine state using <link to="IConsole::saveState"/>
5744 or power it off using <link to="IConsole::powerDown"/>.
5745 Resuming the execution can lead to unpredictable results.
5746
5747 <b>Non-fatal</b> errors and warnings are indicated by the
5748 @a fatal parameter set to @c false. If the virtual machine
5749 is in the Paused state by the time the error notification is
5750 received, it means that the user can <i>try to resume</i> the machine
5751 execution after attempting to solve the problem that caused the
5752 error. In this case, the notification handler is supposed
5753 to show an appropriate message to the user (depending on the
5754 value of the @a id parameter) that offers several actions such
5755 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5756 wants to retry, the notification handler should continue
5757 the machine execution using the <link to="IConsole::resume"/>
5758 call. If the machine execution is not Paused during this
5759 notification, then it means this notification is a <i>warning</i>
5760 (for example, about a fatal condition that can happen very soon);
5761 no immediate action is required from the user, the machine
5762 continues its normal execution.
5763
5764 Note that in either case the notification handler
5765 <b>must not</b> perform any action directly on a thread
5766 where this notification is called. Everything it is allowed to
5767 do is to post a message to another thread that will then talk
5768 to the user and take the corresponding action.
5769
5770 Currently, the following error identifiers are known:
5771 <ul>
5772 <li><tt>"HostMemoryLow"</tt></li>
5773 <li><tt>"HostAudioNotResponding"</tt></li>
5774 <li><tt>"VDIStorageFull"</tt></li>
5775 </ul>
5776
5777 <note>
5778 This notification is not designed to be implemented by
5779 more than one callback at a time. If you have multiple
5780 IConsoleCallback instances registered on the given
5781 IConsole object, make sure you simply do nothing but
5782 return @c S_OK from all but one of them that does actual
5783 user notification and performs necessary actions.
5784 </note>
5785
5786 </desc>
5787 <param name="fatal" type="boolean" dir="in">
5788 <desc>Whether the error is fatal or not</desc>
5789 </param>
5790 <param name="id" type="wstring" dir="in">
5791 <desc>Error identifier</desc>
5792 </param>
5793 <param name="message" type="wstring" dir="in">
5794 <desc>Optional error message</desc>
5795 </param>
5796 </method>
5797
5798 <method name="onCanShowWindow">
5799 <desc>
5800 Notification when a call to
5801 <link to="IMachine::canShowConsoleWindow"/> is made by a
5802 front-end to check if a subsequent call to
5803 <link to="IMachine::showConsoleWindow"/> can succeed.
5804
5805 The callee should give an answer appropriate to the current
5806 machine state in the @a canShow argument. This answer must
5807 remain valid at least until the next
5808 <link to="IConsole::state">machine state</link> change.
5809
5810 <note>
5811 This notification is not designed to be implemented by
5812 more than one callback at a time. If you have multiple
5813 IConsoleCallback instances registered on the given
5814 IConsole object, make sure you simply do nothing but
5815 return @c true and @c S_OK from all but one of them that
5816 actually manages console window activation.
5817 </note>
5818 </desc>
5819 <param name="canShow" type="boolean" dir="return">
5820 <desc>
5821 @c true if the console window can be shown and @c false otherwise.
5822 </desc>
5823 </param>
5824 </method>
5825
5826 <method name="onShowWindow">
5827 <desc>
5828 Notification when a call to
5829 <link to="IMachine::showConsoleWindow"/>
5830 requests the console window to be activated and brought to
5831 foreground on the desktop of the host PC.
5832
5833 This notification should cause the VM console process to
5834 perform the requested action as described above. If it is
5835 impossible to do it at a time of this notification, this
5836 method should return a failure.
5837
5838 Note that many modern window managers on many platforms
5839 implement some sort of focus stealing prevention logic, so
5840 that it may be impossible to activate a window without the
5841 help of the currently active application (which is supposedly
5842 an initiator of this notification). In this case, this method
5843 must return a non-zero identifier that represents the
5844 top-level window of the VM console process. The caller, if it
5845 represents a currently active process, is responsible to use
5846 this identifier (in a platform-dependent manner) to perform
5847 actual window activation.
5848
5849 This method must set @a winId to zero if it has performed all
5850 actions necessary to complete the request and the console
5851 window is now active and in foreground, to indicate that no
5852 further action is required on the caller's side.
5853
5854 <note>
5855 This notification is not designed to be implemented by
5856 more than one callback at a time. If you have multiple
5857 IConsoleCallback instances registered on the given
5858 IConsole object, make sure you simply do nothing but
5859 return @c S_OK from all but one of them that actually
5860 manages console window activation.
5861 </note>
5862 </desc>
5863 <param name="winId" type="unsigned long long" dir="return">
5864 <desc>
5865 Platform-dependent identifier of the top-level VM console
5866 window, or zero if this method has performed all actions
5867 necessary to implement the <i>show window</i> semantics for
5868 the given platform and/or this VirtualBox front-end.
5869 </desc>
5870 </param>
5871 </method>
5872
5873 </interface>
5874
5875 <interface
5876 name="IRemoteDisplayInfo" extends="$unknown"
5877 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5878 wsmap="struct"
5879 >
5880 <desc>
5881 Contains information about the remote display (VRDP) capabilities and status.
5882 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5883 </desc>
5884
5885 <attribute name="active" type="boolean" readonly="yes">
5886 <desc>
5887 Whether the remote display connection is active.
5888 </desc>
5889 </attribute>
5890
5891 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5892 <desc>
5893 How many times a client connected.
5894 </desc>
5895 </attribute>
5896
5897 <attribute name="beginTime" type="long long" readonly="yes">
5898 <desc>
5899 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5900 </desc>
5901 </attribute>
5902
5903 <attribute name="endTime" type="long long" readonly="yes">
5904 <desc>
5905 When the last connection was terminated or the current time, if
5906 connection is still active, in milliseconds since 1970-01-01 UTC.
5907 </desc>
5908 </attribute>
5909
5910 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5911 <desc>
5912 How many bytes were sent in last or current, if still active, connection.
5913 </desc>
5914 </attribute>
5915
5916 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5917 <desc>
5918 How many bytes were sent in all connections.
5919 </desc>
5920 </attribute>
5921
5922 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5923 <desc>
5924 How many bytes were received in last or current, if still active, connection.
5925 </desc>
5926 </attribute>
5927
5928 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5929 <desc>
5930 How many bytes were received in all connections.
5931 </desc>
5932 </attribute>
5933
5934 <attribute name="user" type="wstring" readonly="yes">
5935 <desc>
5936 Login user name supplied by the client.
5937 </desc>
5938 </attribute>
5939
5940 <attribute name="domain" type="wstring" readonly="yes">
5941 <desc>
5942 Login domain name supplied by the client.
5943 </desc>
5944 </attribute>
5945
5946 <attribute name="clientName" type="wstring" readonly="yes">
5947 <desc>
5948 The client name supplied by the client.
5949 </desc>
5950 </attribute>
5951
5952 <attribute name="clientIP" type="wstring" readonly="yes">
5953 <desc>
5954 The IP address of the client.
5955 </desc>
5956 </attribute>
5957
5958 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5959 <desc>
5960 The client software version number.
5961 </desc>
5962 </attribute>
5963
5964 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5965 <desc>
5966 Public key exchange method used when connection was established.
5967 Values: 0 - RDP4 public key exchange scheme.
5968 1 - X509 certificates were sent to client.
5969 </desc>
5970 </attribute>
5971
5972 </interface>
5973
5974 <interface
5975 name="IConsole" extends="$unknown"
5976 uuid="0a51994b-cbc6-4686-94eb-d4e4023280e2"
5977 wsmap="managed"
5978 >
5979 <desc>
5980 The IConsole interface represents an interface to control virtual
5981 machine execution.
5982
5983 The console object that implements the IConsole interface is obtained
5984 from a session object after the session for the given machine has been
5985 opened using one of <link to="IVirtualBox::openSession"/>,
5986 <link to="IVirtualBox::openRemoteSession"/> or
5987 <link to="IVirtualBox::openExistingSession"/> methods.
5988
5989 Methods of the IConsole interface allow the caller to query the current
5990 virtual machine execution state, pause the machine or power it down, save
5991 the machine state or take a snapshot, attach and detach removable media
5992 and so on.
5993
5994 <see>ISession</see>
5995 </desc>
5996
5997 <attribute name="machine" type="IMachine" readonly="yes">
5998 <desc>
5999 Machine object this console is sessioned with.
6000 <note>
6001 This is a convenience property, it has the same value as
6002 <link to="ISession::machine"/> of the corresponding session
6003 object.
6004 </note>
6005 </desc>
6006 </attribute>
6007
6008 <attribute name="state" type="MachineState" readonly="yes">
6009 <desc>
6010 Current execution state of the machine.
6011 <note>
6012 This property always returns the same value as the corresponding
6013 property of the IMachine object this console is sessioned with.
6014 For the process that owns (executes) the VM, this is the
6015 preferable way of querying the VM state, because no IPC
6016 calls are made.
6017 </note>
6018 </desc>
6019 </attribute>
6020
6021 <attribute name="guest" type="IGuest" readonly="yes">
6022 <desc>Guest object.</desc>
6023 </attribute>
6024
6025 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6026 <desc>
6027 Virtual keyboard object.
6028 <note>
6029 If the machine is not running, any attempt to use
6030 the returned object will result in an error.
6031 </note>
6032 </desc>
6033 </attribute>
6034
6035 <attribute name="mouse" type="IMouse" readonly="yes">
6036 <desc>
6037 Virtual mouse object.
6038 <note>
6039 If the machine is not running, any attempt to use
6040 the returned object will result in an error.
6041 </note>
6042 </desc>
6043 </attribute>
6044
6045 <attribute name="display" type="IDisplay" readonly="yes">
6046 <desc>Virtual display object.
6047 <note>
6048 If the machine is not running, any attempt to use
6049 the returned object will result in an error.
6050 </note>
6051 </desc>
6052 </attribute>
6053
6054 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6055 <desc>Debugging interface.</desc>
6056 </attribute>
6057
6058 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6059 <desc>
6060 Collection of USB devices currently attached to the virtual
6061 USB controller.
6062 <note>
6063 The collection is empty if the machine is not running.
6064 </note>
6065 </desc>
6066 </attribute>
6067
6068 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6069 <desc>
6070 List of USB devices currently attached to the remote VRDP client.
6071 Once a new device is physically attached to the remote host computer,
6072 it appears in this list and remains there until detached.
6073 </desc>
6074 </attribute>
6075
6076 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6077 <desc>
6078 Collection of shared folders for the current session. These folders
6079 are called transient shared folders because they are available to the
6080 guest OS running inside the associated virtual machine only for the
6081 duration of the session (as opposed to
6082 <link to="IMachine::sharedFolders"/> which represent permanent shared
6083 folders). When the session is closed (e.g. the machine is powered down),
6084 these folders are automatically discarded.
6085
6086 New shared folders are added to the collection using
6087 <link to="#createSharedFolder"/>. Existing shared folders can be
6088 removed using <link to="#removeSharedFolder"/>.
6089 </desc>
6090 </attribute>
6091
6092 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6093 <desc>
6094 Interface that provides information on Remote Display (VRDP) connection.
6095 </desc>
6096 </attribute>
6097
6098 <method name="powerUp">
6099 <desc>
6100 Starts the virtual machine execution using the current machine
6101 state (that is, its current execution state, current settings and
6102 current hard disks).
6103
6104 If the machine is powered off or aborted, the execution will
6105 start from the beginning (as if the real hardware were just
6106 powered on).
6107
6108 If the machine is in the <link to="MachineState_Saved"/> state,
6109 it will continue its execution the point where the state has
6110 been saved.
6111
6112 <note>
6113 Unless you are trying to write a new VirtualBox front-end that
6114 performs direct machine execution (like the VirtualBox or VBoxSDL
6115 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6116 session opened by <link to="IVirtualBox::openSession"/> and use this
6117 session only to change virtual machine settings. If you simply want to
6118 start virtual machine execution using one of the existing front-ends
6119 (for example the VirtualBox GUI or headless server), simply use
6120 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6121 power up the machine automatically for you.
6122 </note>
6123
6124 <see>#saveState</see>
6125 <result name="VBOX_E_INVALID_VM_STATE">
6126 Virtual machine already running.
6127 </result>
6128 <result name="VBOX_E_HOST_ERROR">
6129 Host interface does not exist or name not set.
6130 </result>
6131 <result name="VBOX_E_FILE_ERROR">
6132 Invalid saved state file.
6133 </result>
6134 </desc>
6135 <param name="progress" type="IProgress" dir="return">
6136 <desc>Progress object to track the operation completion.</desc>
6137 </param>
6138 </method>
6139
6140 <method name="powerUpPaused">
6141 <desc>
6142 Identical to powerUp except that the VM will enter the
6143 <link to="MachineState_Paused"/> state, instead of
6144 <link to="MachineState_Running"/>.
6145
6146 <see>#powerUp</see>
6147 <result name="VBOX_E_INVALID_VM_STATE">
6148 Virtual machine already running.
6149 </result>
6150 <result name="VBOX_E_HOST_ERROR">
6151 Host interface does not exist or name not set.
6152 </result>
6153 <result name="VBOX_E_FILE_ERROR">
6154 Invalid saved state file.
6155 </result>
6156 </desc>
6157 <param name="progress" type="IProgress" dir="return">
6158 <desc>Progress object to track the operation completion.</desc>
6159 </param>
6160 </method>
6161
6162 <method name="powerDown">
6163 <desc>
6164 Initiates the power down procedure to stop the virtual machine
6165 execution.
6166
6167 The completion of the power down procedure is tracked using the returned
6168 IProgress object. After the operation is complete, the machine will go
6169 to the PoweredOff state.
6170 <result name="VBOX_E_INVALID_VM_STATE">
6171 Virtual machine must be Running, Paused or Stuck to be powered down.
6172 </result>
6173 </desc>
6174 <param name="progress" type="IProgress" dir="return">
6175 <desc>Progress object to track the operation completion.</desc>
6176 </param>
6177 </method>
6178
6179 <method name="reset">
6180 <desc>Resets the virtual machine.
6181 <result name="VBOX_E_INVALID_VM_STATE">
6182 Virtual machine not in Running state.
6183 </result>
6184 <result name="VBOX_E_VM_ERROR">
6185 Virtual machine error in reset operation.
6186 </result>
6187 </desc>
6188 </method>
6189
6190 <method name="pause">
6191 <desc>Pauses the virtual machine execution.
6192 <result name="VBOX_E_INVALID_VM_STATE">
6193 Virtual machine not in Running state.
6194 </result>
6195 <result name="VBOX_E_VM_ERROR">
6196 Virtual machine error in suspend operation.
6197 </result>
6198 </desc>
6199 </method>
6200
6201 <method name="resume">
6202 <desc>Resumes the virtual machine execution.
6203 <result name="VBOX_E_INVALID_VM_STATE">
6204 Virtual machine not in Paused state.
6205 </result>
6206 <result name="VBOX_E_VM_ERROR">
6207 Virtual machine error in resume operation.
6208 </result>
6209 </desc>
6210 </method>
6211
6212 <method name="powerButton">
6213 <desc>Sends the ACPI power button event to the guest.
6214 <result name="VBOX_E_INVALID_VM_STATE">
6215 Virtual machine not in Running state.
6216 </result>
6217 <result name="VBOX_E_PDM_ERROR">
6218 Controlled power off failed.
6219 </result>
6220 </desc>
6221 </method>
6222
6223 <method name="sleepButton">
6224 <desc>Sends the ACPI sleep button event to the guest.
6225 <result name="VBOX_E_INVALID_VM_STATE">
6226 Virtual machine not in Running state.
6227 </result>
6228 <result name="VBOX_E_PDM_ERROR">
6229 Sending sleep button event failed.
6230 </result>
6231 </desc>
6232 </method>
6233
6234 <method name="getPowerButtonHandled">
6235 <desc>Checks if the last power button event was handled by guest.
6236 <result name="VBOX_E_PDM_ERROR">
6237 Checking if the event was handled by the guest OS failed.
6238 </result>
6239 </desc>
6240 <param name="handled" type="boolean" dir="return"/>
6241 </method>
6242
6243 <method name="getGuestEnteredACPIMode">
6244 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6245 G1 (sleeping). If this method returns @c false, the guest will
6246 most likely not respond to external ACPI events.
6247 <result name="VBOX_E_INVALID_VM_STATE">
6248 Virtual machine not in Running state.
6249 </result>
6250 </desc>
6251 <param name="entered" type="boolean" dir="return"/>
6252 </method>
6253
6254 <method name="saveState">
6255 <desc>
6256 Saves the current execution state of a running virtual machine
6257 and stops its execution.
6258
6259 After this operation completes, the machine will go to the
6260 Saved state. Next time it is powered up, this state will
6261 be restored and the machine will continue its execution from
6262 the place where it was saved.
6263
6264 This operation differs from taking a snapshot to the effect
6265 that it doesn't create new differencing hard disks. Also, once
6266 the machine is powered up from the state saved using this method,
6267 the saved state is deleted, so it will be impossible to return
6268 to this state later.
6269
6270 <note>
6271 On success, this method implicitly calls
6272 <link to="IMachine::saveSettings"/> to save all current machine
6273 settings (including runtime changes to the DVD drive, etc.).
6274 Together with the impossibility to change any VM settings when it is
6275 in the Saved state, this guarantees adequate hardware
6276 configuration of the machine when it is restored from the saved
6277 state file.
6278 </note>
6279
6280 <note>
6281 The machine must be in the Running or Paused state, otherwise
6282 the operation will fail.
6283 </note>
6284 <result name="VBOX_E_INVALID_VM_STATE">
6285 Virtual machine state neither Running nor Paused.
6286 </result>
6287 <result name="VBOX_E_FILE_ERROR">
6288 Failed to create directory for saved state file.
6289 </result>
6290
6291 <see><link to="#takeSnapshot"/></see>
6292 </desc>
6293 <param name="progress" type="IProgress" dir="return">
6294 <desc>Progress object to track the operation completion.</desc>
6295 </param>
6296 </method>
6297
6298 <method name="adoptSavedState">
6299 <desc>
6300 Associates the given saved state file to the virtual machine.
6301
6302 On success, the machine will go to the Saved state. Next time it is
6303 powered up, it will be restored from the adopted saved state and
6304 continue execution from the place where the saved state file was
6305 created.
6306
6307 The specified saved state file path may be absolute or relative to the
6308 folder the VM normally saves the state to (usually,
6309 <link to="IMachine::snapshotFolder"/>).
6310
6311 <note>
6312 It's a caller's responsibility to make sure the given saved state
6313 file is compatible with the settings of this virtual machine that
6314 represent its virtual hardware (memory size, hard disk configuration
6315 etc.). If there is a mismatch, the behavior of the virtual machine
6316 is undefined.
6317 </note>
6318 <result name="VBOX_E_INVALID_VM_STATE">
6319 Virtual machine state neither PoweredOff nor Aborted.
6320 </result>
6321 </desc>
6322 <param name="savedStateFile" type="wstring" dir="in">
6323 <desc>Path to the saved state file to adopt.</desc>
6324 </param>
6325 </method>
6326
6327 <method name="forgetSavedState">
6328 <desc>
6329 Forgets the saved state of the virtual machine previously created
6330 by <link to="#saveState"/>. Next time the machine is powered up, a
6331 clean boot will occur. If @a remove is @c true the saved state file
6332 is deleted.
6333 <note>
6334 This operation is equivalent to resetting or powering off
6335 the machine without doing a proper shutdown in the guest OS.
6336 </note>
6337 <result name="VBOX_E_INVALID_VM_STATE">
6338 Virtual machine not in state Saved.
6339 </result>
6340 </desc>
6341 <param name="remove" type="boolean" dir="in">
6342 <desc>If @c true remove the saved state file.</desc>
6343 </param>
6344 </method>
6345
6346 <method name="getDeviceActivity">
6347 <desc>
6348 Gets the current activity type of a given device or device group.
6349 <result name="E_INVALIDARG">
6350 Invalid device type.
6351 </result>
6352 </desc>
6353 <param name="type" type="DeviceType" dir="in"/>
6354 <param name="activity" type="DeviceActivity" dir="return"/>
6355 </method>
6356
6357 <method name="attachUSBDevice">
6358 <desc>
6359 Attaches a host USB device with the given UUID to the
6360 USB controller of the virtual machine.
6361
6362 The device needs to be in one of the following states:
6363 <link to="USBDeviceState_Busy"/>,
6364 <link to="USBDeviceState_Available"/> or
6365 <link to="USBDeviceState_Held"/>,
6366 otherwise an error is immediately returned.
6367
6368 When the device state is
6369 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6370 be returned if the host computer refuses to release it for some reason.
6371
6372 <see>IUSBController::deviceFilters, USBDeviceState</see>
6373 <result name="VBOX_E_INVALID_VM_STATE">
6374 Virtual machine state neither Running nor Paused.
6375 </result>
6376 <result name="VBOX_E_PDM_ERROR">
6377 Virtual machine does not have a USB controller.
6378 </result>
6379 </desc>
6380 <param name="id" type="wstring" dir="in">
6381 <desc>UUID of the host USB device to attach.</desc>
6382 </param>
6383 </method>
6384
6385 <method name="detachUSBDevice">
6386 <desc>
6387 Detaches an USB device with the given UUID from the USB controller
6388 of the virtual machine.
6389
6390 After this method succeeds, the VirtualBox server re-initiates
6391 all USB filters as if the device were just physically attached
6392 to the host, but filters of this machine are ignored to avoid
6393 a possible automatic re-attachment.
6394
6395 <see>IUSBController::deviceFilters, USBDeviceState</see>
6396
6397 <result name="VBOX_E_PDM_ERROR">
6398 Virtual machine does not have a USB controller.
6399 </result>
6400 <result name="E_INVALIDARG">
6401 USB device not attached to this virtual machine.
6402 </result>
6403 </desc>
6404 <param name="id" type="wstring" dir="in">
6405 <desc>UUID of the USB device to detach.</desc>
6406 </param>
6407 <param name="device" type="IUSBDevice" dir="return">
6408 <desc>Detached USB device.</desc>
6409 </param>
6410 </method>
6411
6412 <method name="findUSBDeviceByAddress">
6413 <desc>
6414 Searches for a USB device with the given host address.
6415
6416 <result name="VBOX_E_OBJECT_NOT_FOUND">
6417 Given @c name does not correspond to any USB device.
6418 </result>
6419
6420 <see>IUSBDevice::address</see>
6421 </desc>
6422 <param name="name" type="wstring" dir="in">
6423 <desc>
6424 Address of the USB device (as assigned by the host) to
6425 search for.
6426 </desc>
6427 </param>
6428 <param name="device" type="IUSBDevice" dir="return">
6429 <desc>Found USB device object.</desc>
6430 </param>
6431 </method>
6432
6433 <method name="findUSBDeviceById">
6434 <desc>
6435 Searches for a USB device with the given UUID.
6436
6437 <result name="VBOX_E_OBJECT_NOT_FOUND">
6438 Given @c id does not correspond to any USB device.
6439 </result>
6440
6441 <see>IUSBDevice::id</see>
6442 </desc>
6443 <param name="id" type="wstring" dir="in">
6444 <desc>UUID of the USB device to search for.</desc>
6445 </param>
6446 <param name="device" type="IUSBDevice" dir="return">
6447 <desc>Found USB device object.</desc>
6448 </param>
6449 </method>
6450
6451 <method name="createSharedFolder">
6452 <desc>
6453 Creates a transient new shared folder by associating the given logical
6454 name with the given host path, adds it to the collection of shared
6455 folders and starts sharing it. Refer to the description of
6456 <link to="ISharedFolder"/> to read more about logical names.
6457
6458 <result name="VBOX_E_INVALID_VM_STATE">
6459 Virtual machine in Saved state or currently changing state.
6460 </result>
6461 <result name="VBOX_E_FILE_ERROR">
6462 Shared folder already exists or not accessible.
6463 </result>
6464 </desc>
6465 <param name="name" type="wstring" dir="in">
6466 <desc>Unique logical name of the shared folder.</desc>
6467 </param>
6468 <param name="hostPath" type="wstring" dir="in">
6469 <desc>Full path to the shared folder in the host file system.</desc>
6470 </param>
6471 <param name="writable" type="boolean" dir="in">
6472 <desc>Whether the share is writable or readonly</desc>
6473 </param>
6474 </method>
6475
6476 <method name="removeSharedFolder">
6477 <desc>
6478 Removes a transient shared folder with the given name previously
6479 created by <link to="#createSharedFolder"/> from the collection of
6480 shared folders and stops sharing it.
6481 <result name="VBOX_E_INVALID_VM_STATE">
6482 Virtual machine in Saved state or currently changing state.
6483 </result>
6484 <result name="VBOX_E_FILE_ERROR">
6485 Shared folder does not exists.
6486 </result>
6487 </desc>
6488 <param name="name" type="wstring" dir="in">
6489 <desc>Logical name of the shared folder to remove.</desc>
6490 </param>
6491 </method>
6492
6493 <method name="takeSnapshot">
6494 <desc>
6495 Saves the current execution state and all settings of the
6496 machine and creates differencing images for all
6497 normal (non-independent) hard disks.
6498
6499 This method can be called for a PoweredOff, Saved, Running or
6500 Paused virtual machine. When the machine is PoweredOff, an
6501 offline <link to="ISnapshot">snapshot</link> is created,
6502 in all other cases -- an online snapshot.
6503
6504 The taken snapshot is always based on the
6505 <link to="IMachine::currentSnapshot">current
6506 snapshot</link> of the associated virtual machine and becomes
6507 a new current snapshot.
6508
6509 <note>
6510 This method implicitly calls <link to="IMachine::saveSettings"/> to
6511 save all current machine settings before taking an offline snapshot.
6512 </note>
6513
6514 <see>ISnapshot, <link to="#saveState"/></see>
6515 <result name="VBOX_E_INVALID_VM_STATE">
6516 Virtual machine currently changing state.
6517 </result>
6518 </desc>
6519 <param name="name" type="wstring" dir="in">
6520 <desc>Short name for the snapshot.</desc>
6521 </param>
6522 <param name="description" type="wstring" dir="in">
6523 <desc>Optional description of the snapshot.</desc>
6524 </param>
6525 <param name="progress" type="IProgress" dir="return">
6526 <desc>Progress object to track the operation completion.</desc>
6527 </param>
6528 </method>
6529
6530 <method name="discardSnapshot">
6531 <desc>
6532
6533 Starts discarding the specified snapshot. The execution state
6534 and settings of the associated machine stored in the snapshot
6535 will be deleted. The contents of all differencing hard disks of
6536 this snapshot will be merged with the contents of their
6537 dependent child hard disks to keep the, disks valid (in other
6538 words, all changes represented by hard disks being discarded
6539 will be propagated to their child hard disks). After that, this
6540 snapshot's differencing hard disks will be deleted. The parent
6541 of this snapshot will become a new parent for all its child
6542 snapshots.
6543
6544 If the discarded snapshot is the current one, its parent
6545 snapshot will become a new current snapshot. The current machine
6546 state is not directly affected in this case, except that
6547 currently attached differencing hard disks based on hard disks
6548 of the discarded snapshot will be also merged as described
6549 above.
6550
6551 If the discarded snapshot is the first one (the root snapshot)
6552 and it has exactly one child snapshot, this child snapshot will
6553 become the first snapshot after discarding. If there are no
6554 children at all (i.e. the first snapshot is the only snapshot of
6555 the machine), both the current and the first snapshot of the
6556 machine will be set to @c null. In all other cases, the first
6557 snapshot cannot be discarded.
6558
6559 You cannot discard the snapshot if it
6560 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6561 hard disks that have differencing hard disks based on them. Snapshots of
6562 such kind can be discarded only when every normal hard disk has either
6563 no children at all or exactly one child. In the former case, the normal
6564 hard disk simply becomes unused (i.e. not attached to any VM). In the
6565 latter case, it receives all the changes stored in the child hard disk,
6566 and then it replaces the child hard disk in the configuration of the
6567 corresponding snapshot or machine.
6568
6569 Also, you cannot discard the snapshot if it stores hard disks
6570 (of any type) having differencing child hard disks that belong
6571 to other machines. Such snapshots can be only discarded after
6572 you discard all snapshots of other machines containing "foreign"
6573 child disks, or detach these "foreign" child disks from machines
6574 they are attached to.
6575
6576 One particular example of the snapshot storing normal hard disks
6577 is the first snapshot of a virtual machine that had normal hard
6578 disks attached when taking the snapshot. Be careful when
6579 discarding such snapshots because this implicitly commits
6580 changes (made since the snapshot being discarded has been taken)
6581 to normal hard disks (as described above), which may be not what
6582 you want.
6583
6584 The virtual machine is put to
6585 the <link to="MachineState_Discarding">Discarding</link> state until
6586 the discard operation is completed.
6587
6588 <note>
6589 The machine must not be running, otherwise the operation
6590 will fail.
6591 </note>
6592
6593 <note>
6594 Child hard disks of all normal hard disks of the discarded snapshot
6595 must be accessible (see <link to="IMedium::state"/>) for this
6596 operation to succeed. In particular, this means that all virtual
6597 machines, whose hard disks are directly or indirectly based on the
6598 hard disks of discarded snapshot, must be powered off.
6599 </note>
6600 <note>
6601 Merging hard disk contents can be very time and disk space
6602 consuming, if these disks are big in size and have many
6603 children. However, if the snapshot being discarded is the last
6604 (head) snapshot on the branch, the operation will be rather
6605 quick.
6606 </note>
6607 <note>
6608 Note that discarding the current snapshot
6609 will implicitly call <link to="IMachine::saveSettings"/> to
6610 make all current machine settings permanent.
6611 </note>
6612 <result name="VBOX_E_INVALID_VM_STATE">
6613 Virtual machine is running.
6614 </result>
6615 </desc>
6616 <param name="id" type="wstring" dir="in">
6617 <desc>UUID of the snapshot to discard.</desc>
6618 </param>
6619 <param name="progress" type="IProgress" dir="return">
6620 <desc>Progress object to track the operation completion.</desc>
6621 </param>
6622 </method>
6623
6624 <method name="discardCurrentState">
6625 <desc>
6626 This operation is similar to <link to="IConsole::discardSnapshot"/> but
6627 affects the current machine state. This means that the state stored in
6628 the current snapshot will become a new current state, and all current
6629 settings of the machine and changes stored in differencing hard disks
6630 will be lost.
6631
6632 After this operation is successfully completed, new empty differencing
6633 hard disks are created for all normal hard disks of the machine.
6634
6635 If the current snapshot of the machine is an online snapshot, the
6636 machine will go to the <link to="MachineState_Saved"> saved
6637 state</link>, so that the next time it is powered on, the execution
6638 state will be restored from the current snapshot.
6639
6640 <note>
6641 The machine must not be running, otherwise the operation will fail.
6642 </note>
6643
6644 <note>
6645 If the machine state is <link to="MachineState_Saved">Saved</link>
6646 prior to this operation, the saved state file will be implicitly
6647 discarded (as if <link to="IConsole::forgetSavedState"/> were
6648 called).
6649 </note>
6650
6651 <result name="VBOX_E_INVALID_VM_STATE">
6652 Virtual machine is running.
6653 </result>
6654 </desc>
6655 <param name="progress" type="IProgress" dir="return">
6656 <desc>Progress object to track the operation completion.</desc>
6657 </param>
6658 </method>
6659
6660 <method name="discardCurrentSnapshotAndState">
6661 <desc>
6662
6663 This method is equivalent to
6664 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6665 (currentSnapshot.id(), progress) followed by
6666 <link to="IConsole::discardCurrentState"/>.
6667
6668 As a result, the machine will be fully restored from the
6669 snapshot preceding the current snapshot, while both the current
6670 snapshot and the current machine state will be discarded.
6671
6672 If the current snapshot is the first snapshot of the machine (i.e. it
6673 has the only snapshot), the current machine state will be
6674 discarded <b>before</b> discarding the snapshot. In other words, the
6675 machine will be restored from its last snapshot, before discarding
6676 it. This differs from performing a single
6677 <link to="IConsole::discardSnapshot"/> call (note that no
6678 <link to="IConsole::discardCurrentState"/> will be possible after it)
6679 to the effect that the latter will preserve the current state instead of
6680 discarding it.
6681
6682 Unless explicitly mentioned otherwise, all remarks and
6683 limitations of the above two methods also apply to this method.
6684
6685 <note>
6686 The machine must not be running, otherwise the operation
6687 will fail.
6688 </note>
6689
6690 <note>
6691 If the machine state is <link to="MachineState_Saved">Saved</link>
6692 prior to this operation, the saved state file will be implicitly
6693 discarded (as if <link to="#forgetSavedState"/> were
6694 called).
6695 </note>
6696
6697 <note>
6698 This method is more efficient than calling both of the above
6699 methods separately: it requires less IPC calls and provides
6700 a single progress object.
6701 </note>
6702
6703 <result name="VBOX_E_INVALID_VM_STATE">
6704 Virtual machine is running.
6705 </result>
6706 </desc>
6707 <param name="progress" type="IProgress" dir="return">
6708 <desc>Progress object to track the operation completion.</desc>
6709 </param>
6710 </method>
6711
6712 <method name="registerCallback">
6713 <desc>
6714 Registers a new console callback on this instance. The methods of the
6715 callback interface will be called by this instance when the appropriate
6716 event occurs.
6717 </desc>
6718 <param name="callback" type="IConsoleCallback" dir="in"/>
6719 </method>
6720
6721 <method name="unregisterCallback">
6722 <desc>
6723 Unregisters the console callback previously registered using
6724 <link to="#registerCallback"/>.
6725 <result name="E_INVALIDARG">
6726 Given @a callback handler is not registered.
6727 </result>
6728 </desc>
6729 <param name="callback" type="IConsoleCallback" dir="in"/>
6730 </method>
6731 </interface>
6732
6733 <!--
6734 // IHost
6735 /////////////////////////////////////////////////////////////////////////
6736 -->
6737
6738 <interface
6739 name="IHostDVDDrive" extends="$unknown"
6740 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6741 wsmap="managed"
6742 >
6743 <desc>
6744 The IHostDVDDrive interface represents the physical CD/DVD drive
6745 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6746 </desc>
6747
6748 <attribute name="name" type="wstring" readonly="yes">
6749 <desc>
6750 Returns the platform-specific device identifier.
6751 On DOS-like platforms, it is a drive name (e.g. R:).
6752 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6753 </desc>
6754 </attribute>
6755 <attribute name="description" type="wstring" readonly="yes">
6756 <desc>
6757 Returns a human readable description for the drive. This
6758 description usually contains the product and vendor name. An
6759 empty string is returned if the description is not available.
6760 </desc>
6761 </attribute>
6762 <attribute name="udi" type="wstring" readonly="yes">
6763 <desc>
6764 Returns the unique device identifier for the drive. This
6765 attribute is reserved for future use instead of
6766 <link to="#name"/>. Currently it is not used and may return
6767 an empty string on some platforms.
6768 </desc>
6769 </attribute>
6770
6771 </interface>
6772
6773 <interface
6774 name="IHostFloppyDrive" extends="$unknown"
6775 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6776 wsmap="managed"
6777 >
6778 <desc>
6779 The IHostFloppyDrive interface represents the physical floppy drive
6780 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6781 </desc>
6782 <attribute name="name" type="wstring" readonly="yes">
6783 <desc>
6784 Returns the platform-specific device identifier.
6785 On DOS-like platforms, it is a drive name (e.g. A:).
6786 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6787 </desc>
6788 </attribute>
6789 <attribute name="description" type="wstring" readonly="yes">
6790 <desc>
6791 Returns a human readable description for the drive. This
6792 description usually contains the product and vendor name. An
6793 empty string is returned if the description is not available.
6794 </desc>
6795 </attribute>
6796 <attribute name="udi" type="wstring" readonly="yes">
6797 <desc>
6798 Returns the unique device identifier for the drive. This
6799 attribute is reserved for future use instead of
6800 <link to="#name"/>. Currently it is not used and may return
6801 an empty string on some platforms.
6802 </desc>
6803 </attribute>
6804 </interface>
6805
6806 <enum
6807 name="HostNetworkInterfaceMediumType"
6808 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6809 >
6810 <desc>
6811 Type of encapsulation. Ethernet encapsulation includes both wired and
6812 wireless Ethernet connections.
6813 <see>IHostNetworkInterface</see>
6814 </desc>
6815
6816 <const name="Unknown" value="0">
6817 <desc>
6818 The type of interface cannot be determined.
6819 </desc>
6820 </const>
6821 <const name="Ethernet" value="1">
6822 <desc>
6823 Ethernet frame encapsulation.
6824 </desc>
6825 </const>
6826 <const name="PPP" value="2">
6827 <desc>
6828 Point-to-point protocol encapsulation.
6829 </desc>
6830 </const>
6831 <const name="SLIP" value="3">
6832 <desc>
6833 Serial line IP encapsulation.
6834 </desc>
6835 </const>
6836 </enum>
6837
6838 <enum
6839 name="HostNetworkInterfaceStatus"
6840 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6841 >
6842 <desc>
6843 Current status of the interface.
6844 <see>IHostNetworkInterface</see>
6845 </desc>
6846
6847 <const name="Unknown" value="0">
6848 <desc>
6849 The state of interface cannot be determined.
6850 </desc>
6851 </const>
6852 <const name="Up" value="1">
6853 <desc>
6854 The interface is fully operational.
6855 </desc>
6856 </const>
6857 <const name="Down" value="2">
6858 <desc>
6859 The interface is not functioning.
6860 </desc>
6861 </const>
6862 </enum>
6863
6864 <enum
6865 name="HostNetworkInterfaceType"
6866 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6867 >
6868 <desc>
6869 Network interface type.
6870 </desc>
6871 <const name="Bridged" value="1"/>
6872 <const name="HostOnly" value="2"/>
6873 </enum>
6874
6875 <interface
6876 name="IHostNetworkInterface" extends="$unknown"
6877 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6878 wsmap="managed"
6879 >
6880 <desc>
6881 Represents one of host's network interfaces. IP V6 address and network
6882 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6883 separated by colons.
6884 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6885 </desc>
6886 <attribute name="name" type="wstring" readonly="yes">
6887 <desc>Returns the host network interface name.</desc>
6888 </attribute>
6889
6890 <attribute name="id" type="wstring" readonly="yes">
6891 <desc>Returns the interface UUID.</desc>
6892 </attribute>
6893
6894 <attribute name="networkName" type="wstring" readonly="yes">
6895 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6896 </attribute>
6897
6898 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6899 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6900 </attribute>
6901
6902 <attribute name="IPAddress" type="wstring" readonly="yes">
6903 <desc>Returns the IP V4 address of the interface.</desc>
6904 </attribute>
6905
6906 <attribute name="networkMask" type="wstring" readonly="yes">
6907 <desc>Returns the network mask of the interface.</desc>
6908 </attribute>
6909
6910 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6911 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6912 </attribute>
6913
6914 <attribute name="IPV6Address" type="wstring" readonly="yes">
6915 <desc>Returns the IP V6 address of the interface.</desc>
6916 </attribute>
6917
6918 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6919 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6920 </attribute>
6921
6922 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6923 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6924 </attribute>
6925
6926 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6927 <desc>Type of protocol encapsulation used.</desc>
6928 </attribute>
6929
6930 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6931 <desc>Status of the interface.</desc>
6932 </attribute>
6933
6934 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6935 <desc>specifies the host interface type.</desc>
6936 </attribute>
6937
6938 <method name="enableStaticIpConfig">
6939 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6940 <param name="IPAddress" type="wstring" dir="in">
6941 <desc>
6942 IP address.
6943 </desc>
6944 </param>
6945 <param name="networkMask" type="wstring" dir="in">
6946 <desc>
6947 network mask.
6948 </desc>
6949 </param>
6950 </method>
6951
6952 <method name="enableStaticIpConfigV6">
6953 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6954 <param name="IPV6Address" type="wstring" dir="in">
6955 <desc>
6956 IP address.
6957 </desc>
6958 </param>
6959 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6960 <desc>
6961 network mask.
6962 </desc>
6963 </param>
6964 </method>
6965
6966 <method name="enableDynamicIpConfig">
6967 <desc>enables the dynamic IP configuration.</desc>
6968 </method>
6969
6970 <method name="dhcpRediscover">
6971 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6972 </method>
6973
6974 </interface>
6975
6976 <interface
6977 name="IHost" extends="$unknown"
6978 uuid="a13b5556-5c0b-4f80-9df6-6f804f3336a1"
6979 wsmap="managed"
6980 >
6981 <desc>
6982 The IHost interface represents the physical machine that this VirtualBox
6983 installation runs on.
6984
6985 An object implementing this interface is returned by the
6986 <link to="IVirtualBox::host" /> attribute. This interface contains
6987 read-only information about the host's physical hardware (such as what
6988 processors and disks are available, what the host operating system is,
6989 and so on) and also allows for manipulating some of the host's hardware,
6990 such as global USB device filters and host interface networking.
6991
6992 </desc>
6993 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6994 <desc>List of DVD drives available on the host.</desc>
6995 </attribute>
6996
6997 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6998 <desc>List of floppy drives available on the host.</desc>
6999 </attribute>
7000
7001 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7002 <desc>
7003 List of USB devices currently attached to the host.
7004 Once a new device is physically attached to the host computer,
7005 it appears in this list and remains there until detached.
7006
7007 <note>
7008 If USB functionality is not available in the given edition of
7009 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7010 </note>
7011 </desc>
7012 </attribute>
7013
7014 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7015 <desc>
7016 List of USB device filters in action.
7017 When a new device is physically attached to the host computer,
7018 filters from this list are applied to it (in order they are stored
7019 in the list). The first matched filter will determine the
7020 <link to="IHostUSBDeviceFilter::action">action</link>
7021 performed on the device.
7022
7023 Unless the device is ignored by these filters, filters of all
7024 currently running virtual machines
7025 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7026
7027 <note>
7028 If USB functionality is not available in the given edition of
7029 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7030 </note>
7031
7032 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7033 </desc>
7034 </attribute>
7035
7036 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7037 <desc>List of host network interfaces currently defined on the host.</desc>
7038 </attribute>
7039
7040 <attribute name="processorCount" type="unsigned long" readonly="yes">
7041 <desc>Number of (logical) CPUs installed in the host system.</desc>
7042 </attribute>
7043
7044 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7045 <desc>Number of (logical) CPUs online in the host system.</desc>
7046 </attribute>
7047
7048 <method name="getProcessorSpeed">
7049 <desc>Query the (approximate) maximum speed of a specified host CPU in
7050 Megahertz.
7051 </desc>
7052 <param name="cpuId" type="unsigned long" dir="in">
7053 <desc>
7054 Identifier of the CPU.
7055 </desc>
7056 </param>
7057 <param name="speed" type="unsigned long" dir="return">
7058 <desc>
7059 Speed value. 0 is returned if value is not known or @a cpuId is
7060 invalid.
7061 </desc>
7062 </param>
7063 </method>
7064
7065 <method name="getProcessorFeature">
7066 <desc>Query whether a CPU feature is supported or not.</desc>
7067 <param name="feature" type="ProcessorFeature" dir="in">
7068 <desc>
7069 CPU Feature identifier.
7070 </desc>
7071 </param>
7072 <param name="supported" type="boolean" dir="return">
7073 <desc>
7074 Feature is supported or not.
7075 </desc>
7076 </param>
7077 </method>
7078
7079 <method name="getProcessorDescription">
7080 <desc>Query the model string of a specified host CPU.
7081 <note>
7082 This function is not implemented in the current version of the
7083 product.
7084 </note>
7085 </desc>
7086 <param name="cpuId" type="unsigned long" dir="in">
7087 <desc>
7088 Identifier of the CPU.
7089 </desc>
7090 </param>
7091 <param name="description" type="wstring" dir="return">
7092 <desc>
7093 Model string. An empty string is returned if value is not known or
7094 @a cpuId is invalid.
7095 </desc>
7096 </param>
7097 </method>
7098
7099 <attribute name="memorySize" type="unsigned long" readonly="yes">
7100 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7101 </attribute>
7102
7103 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7104 <desc>Available system memory in the host system.</desc>
7105 </attribute>
7106
7107 <attribute name="operatingSystem" type="wstring" readonly="yes">
7108 <desc>Name of the host system's operating system.</desc>
7109 </attribute>
7110
7111 <attribute name="OSVersion" type="wstring" readonly="yes">
7112 <desc>Host operating system's version string.</desc>
7113 </attribute>
7114
7115 <attribute name="UTCTime" type="long long" readonly="yes">
7116 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7117 </attribute>
7118
7119 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7120 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7121 </attribute>
7122
7123 <method name="createHostOnlyNetworkInterface">
7124 <desc>
7125 Creates a new adapter for Host Only Networking.
7126 <result name="E_INVALIDARG">
7127 Host network interface @a name already exists.
7128 </result>
7129 </desc>
7130 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7131 <desc>
7132 Created host interface object.
7133 </desc>
7134 </param>
7135 <param name="progress" type="IProgress" dir="return">
7136 <desc>
7137 Progress object to track the operation completion.
7138 </desc>
7139 </param>
7140 </method>
7141
7142 <method name="removeHostOnlyNetworkInterface">
7143 <desc>
7144 Removes the given Host Only Networking interface.
7145 <result name="VBOX_E_OBJECT_NOT_FOUND">
7146 No host network interface matching @a id found.
7147 </result>
7148 </desc>
7149 <param name="id" type="wstring" dir="in">
7150 <desc>
7151 Adapter GUID.
7152 </desc>
7153 </param>
7154 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7155 <desc>
7156 Removed host interface object.
7157 </desc>
7158 </param>
7159 <param name="progress" type="IProgress" dir="return">
7160 <desc>
7161 Progress object to track the operation completion.
7162 </desc>
7163 </param>
7164 </method>
7165
7166 <method name="createUSBDeviceFilter">
7167 <desc>
7168 Creates a new USB device filter. All attributes except
7169 the filter name are set to empty (any match),
7170 <i>active</i> is @c false (the filter is not active).
7171
7172 The created filter can be added to the list of filters using
7173 <link to="#insertUSBDeviceFilter"/>.
7174
7175 <see>#USBDeviceFilters</see>
7176 </desc>
7177 <param name="name" type="wstring" dir="in">
7178 <desc>
7179 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7180 for more info.
7181 </desc>
7182 </param>
7183 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7184 <desc>Created filter object.</desc>
7185 </param>
7186 </method>
7187
7188 <method name="insertUSBDeviceFilter">
7189 <desc>
7190 Inserts the given USB device to the specified position
7191 in the list of filters.
7192
7193 Positions are numbered starting from @c 0. If the specified
7194 position is equal to or greater than the number of elements in
7195 the list, the filter is added at the end of the collection.
7196
7197 <note>
7198 Duplicates are not allowed, so an attempt to insert a
7199 filter already in the list is an error.
7200 </note>
7201 <note>
7202 If USB functionality is not available in the given edition of
7203 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7204 </note>
7205
7206 <see>#USBDeviceFilters</see>
7207
7208 <result name="VBOX_E_INVALID_OBJECT_STATE">
7209 USB device filter is not created within this VirtualBox instance.
7210 </result>
7211 <result name="E_INVALIDARG">
7212 USB device filter already in list.
7213 </result>
7214
7215 </desc>
7216 <param name="position" type="unsigned long" dir="in">
7217 <desc>Position to insert the filter to.</desc>
7218 </param>
7219 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7220 <desc>USB device filter to insert.</desc>
7221 </param>
7222 </method>
7223
7224 <method name="removeUSBDeviceFilter">
7225 <desc>
7226 Removes a USB device filter from the specified position in the
7227 list of filters.
7228
7229 Positions are numbered starting from @c 0. Specifying a
7230 position equal to or greater than the number of elements in
7231 the list will produce an error.
7232
7233 <note>
7234 If USB functionality is not available in the given edition of
7235 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7236 </note>
7237
7238 <see>#USBDeviceFilters</see>
7239
7240 <result name="E_INVALIDARG">
7241 USB device filter list empty or invalid @a position.
7242 </result>
7243
7244 </desc>
7245 <param name="position" type="unsigned long" dir="in">
7246 <desc>Position to remove the filter from.</desc>
7247 </param>
7248 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7249 <desc>Removed USB device filter.</desc>
7250 </param>
7251 </method>
7252
7253 <method name="findHostDVDDrive">
7254 <desc>
7255 Searches for a host DVD drive with the given @c name.
7256
7257 <result name="VBOX_E_OBJECT_NOT_FOUND">
7258 Given @c name does not correspond to any host drive.
7259 </result>
7260
7261 </desc>
7262 <param name="name" type="wstring" dir="in">
7263 <desc>Name of the host drive to search for</desc>
7264 </param>
7265 <param name="drive" type="IHostDVDDrive" dir="return">
7266 <desc>Found host drive object</desc>
7267 </param>
7268 </method>
7269
7270 <method name="findHostFloppyDrive">
7271 <desc>
7272 Searches for a host floppy drive with the given @c name.
7273
7274 <result name="VBOX_E_OBJECT_NOT_FOUND">
7275 Given @c name does not correspond to any host floppy drive.
7276 </result>
7277
7278 </desc>
7279 <param name="name" type="wstring" dir="in">
7280 <desc>Name of the host floppy drive to search for</desc>
7281 </param>
7282 <param name="drive" type="IHostFloppyDrive" dir="return">
7283 <desc>Found host floppy drive object</desc>
7284 </param>
7285 </method>
7286
7287 <method name="findHostNetworkInterfaceByName">
7288 <desc>
7289 Searches through all host network interfaces for an interface with
7290 the given @c name.
7291 <note>
7292 The method returns an error if the given @c name does not
7293 correspond to any host network interface.
7294 </note>
7295 </desc>
7296 <param name="name" type="wstring" dir="in">
7297 <desc>Name of the host network interface to search for.</desc>
7298 </param>
7299 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7300 <desc>Found host network interface object.</desc>
7301 </param>
7302 </method>
7303 <method name="findHostNetworkInterfaceById">
7304 <desc>
7305 Searches through all host network interfaces for an interface with
7306 the given GUID.
7307 <note>
7308 The method returns an error if the given GUID does not
7309 correspond to any host network interface.
7310 </note>
7311 </desc>
7312 <param name="id" type="wstring" dir="in">
7313 <desc>GUID of the host network interface to search for.</desc>
7314 </param>
7315 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7316 <desc>Found host network interface object.</desc>
7317 </param>
7318 </method>
7319 <method name="findHostNetworkInterfacesOfType">
7320 <desc>
7321 Searches through all host network interfaces and returns a list of interfaces of the specified type
7322 </desc>
7323 <param name="type" type="HostNetworkInterfaceType" dir="in">
7324 <desc>type of the host network interfaces to search for.</desc>
7325 </param>
7326 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7327 <desc>Found host network interface objects.</desc>
7328 </param>
7329 </method>
7330
7331 <method name="findUSBDeviceById">
7332 <desc>
7333 Searches for a USB device with the given UUID.
7334
7335 <result name="VBOX_E_OBJECT_NOT_FOUND">
7336 Given @c id does not correspond to any USB device.
7337 </result>
7338
7339 <see>IHostUSBDevice::id</see>
7340 </desc>
7341 <param name="id" type="wstring" dir="in">
7342 <desc>UUID of the USB device to search for.</desc>
7343 </param>
7344 <param name="device" type="IHostUSBDevice" dir="return">
7345 <desc>Found USB device object.</desc>
7346 </param>
7347 </method>
7348
7349 <method name="findUSBDeviceByAddress">
7350 <desc>
7351 Searches for a USB device with the given host address.
7352
7353 <result name="VBOX_E_OBJECT_NOT_FOUND">
7354 Given @c name does not correspond to any USB device.
7355 </result>
7356
7357 <see>IHostUSBDevice::address</see>
7358 </desc>
7359 <param name="name" type="wstring" dir="in">
7360 <desc>
7361 Address of the USB device (as assigned by the host) to
7362 search for.
7363 </desc>
7364 </param>
7365 <param name="device" type="IHostUSBDevice" dir="return">
7366 <desc>Found USB device object.</desc>
7367 </param>
7368 </method>
7369
7370 </interface>
7371
7372 <!--
7373 // ISystemProperties
7374 /////////////////////////////////////////////////////////////////////////
7375 -->
7376
7377 <interface
7378 name="ISystemProperties"
7379 extends="$unknown"
7380 uuid="9ca0f712-83f3-4631-b143-b75ef6568332"
7381 wsmap="managed"
7382 >
7383 <desc>
7384 The ISystemProperties interface represents global properties of the given
7385 VirtualBox installation.
7386
7387 These properties define limits and default values for various attributes
7388 and parameters. Most of the properties are read-only, but some can be
7389 changed by a user.
7390 </desc>
7391
7392 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7393 <desc>Minimum guest system memory in Megabytes.</desc>
7394 </attribute>
7395
7396 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7397 <desc>Maximum guest system memory in Megabytes.</desc>
7398 </attribute>
7399
7400 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7401 <desc>Minimum guest video memory in Megabytes.</desc>
7402 </attribute>
7403
7404 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7405 <desc>Maximum guest video memory in Megabytes.</desc>
7406 </attribute>
7407
7408 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7409 <desc>Minimum CPU count.</desc>
7410 </attribute>
7411
7412 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7413 <desc>Maximum CPU count.</desc>
7414 </attribute>
7415
7416 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7417 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7418 </attribute>
7419
7420 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7421 <desc>
7422 Number of network adapters associated with every
7423 <link to="IMachine"/> instance.
7424 </desc>
7425 </attribute>
7426
7427 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7428 <desc>
7429 Number of serial ports associated with every
7430 <link to="IMachine"/> instance.
7431 </desc>
7432 </attribute>
7433
7434 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7435 <desc>
7436 Number of parallel ports associated with every
7437 <link to="IMachine"/> instance.
7438 </desc>
7439 </attribute>
7440
7441 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7442 <desc>
7443 Maximum device position in the boot order. This value corresponds
7444 to the total number of devices a machine can boot from, to make it
7445 possible to include all possible devices to the boot list.
7446 <see><link to="IMachine::setBootOrder"/></see>
7447 </desc>
7448 </attribute>
7449
7450 <attribute name="defaultMachineFolder" type="wstring">
7451 <desc>
7452 Full path to the default directory used to create new or open
7453 existing machines when a settings file name contains no
7454 path.
7455
7456 The initial value of this property is
7457 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7458 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7459
7460 <note>
7461 Setting this property to @c null or an empty string will restore the
7462 initial value.
7463 </note>
7464 <note>
7465 When settings this property, the specified path can be
7466 absolute (full path) or relative
7467 to the <link to="IVirtualBox::homeFolder">
7468 VirtualBox home directory</link>.
7469 When reading this property, a full path is
7470 always returned.
7471 </note>
7472 <note>
7473 The specified path may not exist, it will be created
7474 when necessary.
7475 </note>
7476
7477 <see>
7478 <link to="IVirtualBox::createMachine"/>,
7479 <link to="IVirtualBox::openMachine"/>
7480 </see>
7481 </desc>
7482 </attribute>
7483
7484 <attribute name="defaultHardDiskFolder" type="wstring">
7485 <desc>
7486 Full path to the default directory used to create new or open existing
7487 virtual disks.
7488
7489 This path is used when the storage unit of a hard disk is a regular file
7490 in the host's file system and only a file name that contains no path is
7491 given.
7492
7493 The initial value of this property is
7494 <tt>&lt;</tt>
7495 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7496 <tt>&gt;/HardDisks</tt>.
7497
7498 <note>
7499 Setting this property to @c null or empty string will restore the
7500 initial value.
7501 </note>
7502 <note>
7503 When settings this property, the specified path can be relative
7504 to the
7505 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7506 absolute. When reading this property, a full path is
7507 always returned.
7508 </note>
7509 <note>
7510 The specified path may not exist, it will be created
7511 when necessary.
7512 </note>
7513
7514 <see>
7515 IHardDisk,
7516 <link to="IVirtualBox::createHardDisk"/>,
7517 <link to="IVirtualBox::openHardDisk"/>,
7518 <link to="IMedium::location"/>
7519 </see>
7520 </desc>
7521 </attribute>
7522
7523 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7524 <desc>
7525 List of all hard disk storage formats supported by this VirtualBox
7526 installation.
7527
7528 Keep in mind that the hard disk format identifier
7529 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7530 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7531 hard disk format is a case-insensitive string. This means that, for
7532 example, all of the following strings:
7533 <pre>
7534 "VDI"
7535 "vdi"
7536 "VdI"</pre>
7537 refer to the same hard disk format.
7538
7539 Note that the virtual hard disk framework is backend-based, therefore
7540 the list of supported formats depends on what backends are currently
7541 installed.
7542
7543 <see>
7544 <link to="IHardDiskFormat"/>,
7545 </see>
7546 </desc>
7547 </attribute>
7548
7549 <attribute name="defaultHardDiskFormat" type="wstring">
7550 <desc>
7551 Identifier of the default hard disk format used by VirtualBox.
7552
7553 The hard disk format set by this attribute is used by VirtualBox
7554 when the hard disk format was not specified explicitly. One example is
7555 <link to="IVirtualBox::createHardDisk"/> with the empty
7556 format argument. A more complex example is implicit creation of
7557 differencing hard disks when taking a snapshot of a virtual machine:
7558 this operation will try to use a format of the parent hard disk first
7559 and if this format does not support differencing hard disks the default
7560 format specified by this argument will be used.
7561
7562 The list of supported hard disk formats may be obtained by the
7563 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7564 format must have a capability to create differencing hard disks;
7565 otherwise opeartions that create hard disks implicitly may fail
7566 unexpectedly.
7567
7568 The initial value of this property is <tt>"VDI"</tt> in the current
7569 version of the VirtualBox product, but may change in the future.
7570
7571 <note>
7572 Setting this property to @c null or empty string will restore the
7573 initial value.
7574 </note>
7575
7576 <see>
7577 <link to="#hardDiskFormats"/>,
7578 <link to="IHardDiskFormat::id"/>,
7579 <link to="IVirtualBox::createHardDisk"/>
7580 </see>
7581 </desc>
7582 </attribute>
7583
7584 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7585 <desc>
7586 Library that provides authentication for VRDP clients. The library
7587 is used if a virtual machine's authentication type is set to "external"
7588 in the VM RemoteDisplay configuration.
7589
7590 The system library extension (".DLL" or ".so") must be omitted.
7591 A full path can be specified; if not, then the library must reside on the
7592 system's default library path.
7593
7594 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7595 of that name in one of the default VirtualBox library directories.
7596
7597 For details about VirtualBox authentication libraries and how to implement
7598 them, please refer to the VirtualBox manual.
7599
7600 <note>
7601 Setting this property to @c null or empty string will restore the
7602 initial value.
7603 </note>
7604 </desc>
7605 </attribute>
7606
7607 <attribute name="webServiceAuthLibrary" type="wstring">
7608 <desc>
7609 Library that provides authentication for webservice clients. The library
7610 is used if a virtual machine's authentication type is set to "external"
7611 in the VM RemoteDisplay configuration and will be called from
7612 within the <link to="IWebsessionManager::logon" /> implementation.
7613
7614 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7615 there is no per-VM setting for this, as the webservice is a global
7616 resource (if it is running). Only for this setting (for the webservice),
7617 setting this value to a literal <tt>"null"</tt> string disables authentication,
7618 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7619 no matter what user name and password are supplied.
7620
7621 The initial value of this property is <tt>"VRDPAuth"</tt>,
7622 meaning that the webservice will use the same authentication
7623 library that is used by default for VBoxVRDP (again, see
7624 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7625 The format and calling convention of authentication libraries
7626 is the same for the webservice as it is for VBoxVRDP.
7627
7628 <note>
7629 Setting this property to @c null or empty string will restore the
7630 initial value.
7631 </note>
7632 </desc>
7633 </attribute>
7634
7635 <attribute name="LogHistoryCount" type="unsigned long">
7636 <desc>
7637 This value specifies how many old release log files are kept.
7638 </desc>
7639 </attribute>
7640
7641 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7642 <desc>This value hold the default audio driver for the current
7643 system.</desc>
7644 </attribute>
7645 </interface>
7646
7647 <!--
7648 // IGuest
7649 /////////////////////////////////////////////////////////////////////////
7650 -->
7651
7652 <interface
7653 name="IGuestOSType" extends="$unknown"
7654 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7655 wsmap="struct"
7656 >
7657 <desc>
7658 </desc>
7659
7660 <attribute name="familyId" type="wstring" readonly="yes">
7661 <desc>Guest OS family identifier string.</desc>
7662 </attribute>
7663
7664 <attribute name="familyDescription" type="wstring" readonly="yes">
7665 <desc>Human readable description of the guest OS family.</desc>
7666 </attribute>
7667
7668 <attribute name="id" type="wstring" readonly="yes">
7669 <desc>Guest OS identifier string.</desc>
7670 </attribute>
7671
7672 <attribute name="description" type="wstring" readonly="yes">
7673 <desc>Human readable description of the guest OS.</desc>
7674 </attribute>
7675
7676 <attribute name="is64Bit" type="boolean" readonly="yes">
7677 <desc>Returns @c true if the given OS is 64-bit</desc>
7678 </attribute>
7679
7680 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7681 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7682 </attribute>
7683
7684 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7685 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7686 </attribute>
7687
7688 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7689 <desc>Recommended RAM size in Megabytes.</desc>
7690 </attribute>
7691
7692 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7693 <desc>Recommended video RAM size in Megabytes.</desc>
7694 </attribute>
7695
7696 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7697 <desc>Recommended hard disk size in Megabytes.</desc>
7698 </attribute>
7699
7700 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7701 <desc>Returns recommended network adapter for this OS type.</desc>
7702 </attribute>
7703 </interface>
7704
7705 <interface
7706 name="IGuest" extends="$unknown"
7707 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7708 wsmap="managed"
7709 >
7710 <desc>
7711 The IGuest interface represents information about the operating system
7712 running inside the virtual machine. Used in
7713 <link to="IConsole::guest"/>.
7714
7715 IGuest provides information about the guest operating system, whether
7716 Guest Additions are installed and other OS-specific virtual machine
7717 properties.
7718 </desc>
7719
7720 <attribute name="OSTypeId" type="wstring" readonly="yes">
7721 <desc>
7722 Identifier of the Guest OS type as reported by the Guest
7723 Additions.
7724 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7725 an IGuestOSType object representing details about the given
7726 Guest OS type.
7727 <note>
7728 If Guest Additions are not installed, this value will be
7729 the same as <link to="IMachine::OSTypeId"/>.
7730 </note>
7731 </desc>
7732 </attribute>
7733
7734 <attribute name="additionsActive" type="boolean" readonly="yes">
7735 <desc>
7736 Flag whether the Guest Additions are installed and active
7737 in which case their version will be returned by the
7738 <link to="#additionsVersion"/> property.
7739 </desc>
7740 </attribute>
7741
7742 <attribute name="additionsVersion" type="wstring" readonly="yes">
7743 <desc>
7744 Version of the Guest Additions (3 decimal numbers separated
7745 by dots) or empty when the Additions are not installed. The
7746 Additions may also report a version but yet not be active as
7747 the version might be refused by VirtualBox (incompatible) or
7748 other failures occurred.
7749 </desc>
7750 </attribute>
7751
7752 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7753 <desc>
7754 Flag whether seamless guest display rendering (seamless desktop
7755 integration) is supported.
7756 </desc>
7757 </attribute>
7758
7759 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7760 <desc>
7761 Flag whether the guest is in graphics mode. If it is not, then
7762 seamless rendering will not work, resize hints are not immediately
7763 acted on and guest display resizes are probably not initiated by
7764 the guest additions.
7765 </desc>
7766 </attribute>
7767
7768 <attribute name="memoryBalloonSize" type="unsigned long">
7769 <desc>Guest system memory balloon size in megabytes.</desc>
7770 </attribute>
7771
7772 <attribute name="statisticsUpdateInterval" type="unsigned long">
7773 <desc>Interval to update guest statistics in seconds.</desc>
7774 </attribute>
7775
7776 <method name="setCredentials">
7777 <desc>
7778 Store login credentials that can be queried by guest operating
7779 systems with Additions installed. The credentials are transient
7780 to the session and the guest may also choose to erase them. Note
7781 that the caller cannot determine whether the guest operating system
7782 has queried or made use of the credentials.
7783
7784 <result name="VBOX_E_VM_ERROR">
7785 VMM device is not available.
7786 </result>
7787
7788 </desc>
7789 <param name="userName" type="wstring" dir="in">
7790 <desc>User name string, can be empty</desc>
7791 </param>
7792 <param name="password" type="wstring" dir="in">
7793 <desc>Password string, can be empty</desc>
7794 </param>
7795 <param name="domain" type="wstring" dir="in">
7796 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7797 </param>
7798 <param name="allowInteractiveLogon" type="boolean" dir="in">
7799 <desc>
7800 Flag whether the guest should alternatively allow the user to
7801 interactively specify different credentials. This flag might
7802 not be supported by all versions of the Additions.
7803 </desc>
7804 </param>
7805 </method>
7806
7807 <method name="getStatistic">
7808 <desc>
7809 Query specified guest statistics as reported by the VirtualBox Additions.
7810 </desc>
7811 <param name="cpuId" type="unsigned long" dir="in">
7812 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7813 </param>
7814 <param name="statistic" type="GuestStatisticType" dir="in">
7815 <desc>Statistic type.</desc>
7816 </param>
7817 <param name="statVal" type="unsigned long" dir="return">
7818 <desc>Statistics value</desc>
7819 </param>
7820 </method>
7821
7822 </interface>
7823
7824
7825 <!--
7826 // IProgress
7827 /////////////////////////////////////////////////////////////////////////
7828 -->
7829
7830 <interface
7831 name="IProgress" extends="$unknown"
7832 uuid="6fcd0198-7fc5-4c53-8c37-653ac76854b5"
7833 wsmap="managed"
7834 >
7835 <desc>
7836 The IProgress interface is used to track and control
7837 asynchronous tasks within VirtualBox.
7838
7839 An instance of this is returned every time VirtualBox starts
7840 an asynchronous task (in other words, a separate thread) which
7841 continues to run after a method call returns. For example,
7842 <link to="IConsole::saveState" />, which saves the state of
7843 a running virtual machine, can take a long time to complete.
7844 To be able to display a progress bar, a user interface such as
7845 the VirtualBox graphical user interface can use the IProgress
7846 object returned by that method.
7847
7848 Note that IProgress is a "read-only" interface in the sense
7849 that only the VirtualBox internals behind the Main API can
7850 create and manipulate progress objects, whereas client code
7851 can only use the IProgress object to monitor a task's
7852 progress and, if <link to="#cancelable" /> is @c true,
7853 cancel the task by calling <link to="#cancel" />.
7854
7855 A task represented by IProgress consists of either one or
7856 several sub-operations that run sequentially, one by one (see
7857 <link to="#operation" /> and <link to="#operationCount" />).
7858 Every operation is identified by a number (starting from 0)
7859 and has a separate description.
7860
7861 You can find the individual percentage of completion of the current
7862 operation in <link to="#operationPercent" /> and the
7863 percentage of completion of the task as a whole
7864 in <link to="#percent" />.
7865
7866 Similarly, you can wait for the completion of a particular
7867 operation via <link to="#waitForOperationCompletion" /> or
7868 for the completion of the whole task via
7869 <link to="#waitForCompletion" />.
7870 </desc>
7871
7872 <attribute name="id" type="wstring" readonly="yes">
7873 <desc>ID of the task.</desc>
7874 </attribute>
7875
7876 <attribute name="description" type="wstring" readonly="yes">
7877 <desc>Description of the task.</desc>
7878 </attribute>
7879
7880 <attribute name="initiator" type="$unknown" readonly="yes">
7881 <desc>Initiator of the task.</desc>
7882 </attribute>
7883
7884 <attribute name="cancelable" type="boolean" readonly="yes">
7885 <desc>Whether the task can be interrupted.</desc>
7886 </attribute>
7887
7888 <attribute name="percent" type="unsigned long" readonly="yes">
7889 <desc>
7890 Current progress value of the task as a whole, in percent.
7891 This value depends on how many operations are already complete.
7892 Returns 100 if <link to="#completed" /> is @c true.
7893 </desc>
7894 </attribute>
7895
7896 <attribute name="timeRemaining" type="long" readonly="yes">
7897 <desc>
7898 Estimated remaining time until the task completes, in
7899 seconds. Returns 0 once the task has completed; returns -1
7900 if the remaining time cannot be computed, in particular if
7901 the current progress is 0.
7902
7903 Even if a value is returned, the estimate will be unreliable
7904 for low progress values. It will become more reliable as the
7905 task progresses; it is not recommended to display an ETA
7906 before at least 20% of a task have completed.
7907 </desc>
7908 </attribute>
7909
7910 <attribute name="completed" type="boolean" readonly="yes">
7911 <desc>Whether the task has been completed.</desc>
7912 </attribute>
7913
7914 <attribute name="canceled" type="boolean" readonly="yes">
7915 <desc>Whether the task has been canceled.</desc>
7916 </attribute>
7917
7918 <attribute name="resultCode" type="long" readonly="yes">
7919 <desc>
7920 Result code of the progress task.
7921 Valid only if <link to="#completed"/> is @c true.
7922 </desc>
7923 </attribute>
7924
7925 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7926 <desc>
7927 Extended information about the unsuccessful result of the
7928 progress operation. May be @c null if no extended information
7929 is available.
7930 Valid only if <link to="#completed"/> is @c true and
7931 <link to="#resultCode"/> indicates a failure.
7932 </desc>
7933 </attribute>
7934
7935 <attribute name="operationCount" type="unsigned long" readonly="yes">
7936 <desc>
7937 Number of sub-operations this task is divided into.
7938 Every task consists of at least one suboperation.
7939 </desc>
7940 </attribute>
7941
7942 <attribute name="operation" type="unsigned long" readonly="yes">
7943 <desc>Number of the sub-operation being currently executed.</desc>
7944 </attribute>
7945
7946 <attribute name="operationDescription" type="wstring" readonly="yes">
7947 <desc>
7948 Description of the sub-operation being currently executed.
7949 </desc>
7950 </attribute>
7951
7952 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7953 <desc>Progress value of the current sub-operation only, in percent.</desc>
7954 </attribute>
7955
7956 <method name="waitForCompletion">
7957 <desc>
7958 Waits until the task is done (including all sub-operations)
7959 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7960
7961 <result name="VBOX_E_IPRT_ERROR">
7962 Failed to wait for task completion.
7963 </result>
7964 </desc>
7965
7966 <param name="timeout" type="long" dir="in">
7967 <desc>
7968 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7969 </desc>
7970 </param>
7971 </method>
7972
7973 <method name="waitForOperationCompletion">
7974 <desc>
7975 Waits until the given operation is done with a given timeout in
7976 milliseconds; specify -1 for an indefinite wait.
7977
7978 <result name="VBOX_E_IPRT_ERROR">
7979 Failed to wait for operation completion.
7980 </result>
7981
7982 </desc>
7983 <param name="operation" type="unsigned long" dir="in">
7984 <desc>
7985 Number of the operation to wait for.
7986 Must be less than <link to="#operationCount"/>.
7987 </desc>
7988 </param>
7989 <param name="timeout" type="long" dir="in">
7990 <desc>
7991 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7992 </desc>
7993 </param>
7994 </method>
7995
7996 <method name="cancel">
7997 <desc>
7998 Cancels the task.
7999 <note>
8000 If <link to="#cancelable"/> is @c false, then this method will fail.
8001 </note>
8002
8003 <result name="VBOX_E_INVALID_OBJECT_STATE">
8004 Operation cannot be canceled.
8005 </result>
8006
8007 </desc>
8008 </method>
8009
8010 </interface>
8011
8012
8013 <!--
8014 // ISnapshot
8015 /////////////////////////////////////////////////////////////////////////
8016 -->
8017
8018 <interface
8019 name="ISnapshot" extends="$unknown"
8020 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8021 wsmap="managed"
8022 >
8023 <desc>
8024 The ISnapshot interface represents a snapshot of the virtual
8025 machine.
8026
8027 The <i>snapshot</i> stores all the information about a virtual
8028 machine necessary to bring it to exactly the same state as it was at
8029 the time of taking the snapshot. The snapshot includes:
8030
8031 <ul>
8032 <li>all settings of the virtual machine (i.e. its hardware
8033 configuration: RAM size, attached hard disks, etc.)
8034 </li>
8035 <li>the execution state of the virtual machine (memory contents,
8036 CPU state, etc.).
8037 </li>
8038 </ul>
8039
8040 Snapshots can be <i>offline</i> (taken when the VM is powered off)
8041 or <i>online</i> (taken when the VM is running). The execution
8042 state of the offline snapshot is called a <i>zero execution state</i>
8043 (it doesn't actually contain any information about memory contents
8044 or the CPU state, assuming that all hardware is just powered off).
8045
8046 <h3>Snapshot branches</h3>
8047
8048 Snapshots can be chained. Chained snapshots form a branch where
8049 every next snapshot is based on the previous one. This chaining is
8050 mostly related to hard disk branching (see <link to="IHardDisk"/>
8051 description). This means that every time a new snapshot is created,
8052 a new differencing hard disk is implicitly created for all normal
8053 hard disks attached to the given virtual machine. This allows to
8054 fully restore hard disk contents when the machine is later reverted
8055 to a particular snapshot.
8056
8057 In the current implementation, multiple snapshot branches within one
8058 virtual machine are not allowed. Every machine has a single branch,
8059 and <link to="IConsole::takeSnapshot"/> operation adds a new
8060 snapshot to the top of that branch.
8061
8062 Existing snapshots can be discarded using
8063 <link to="IConsole::discardSnapshot"/>.
8064
8065 <h3>Current snapshot</h3>
8066
8067 Every virtual machine has a current snapshot, identified by
8068 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
8069 a base for the <i>current machine state</i> (see below), to the effect
8070 that all normal hard disks of the machine and its execution
8071 state are based on this snapshot.
8072
8073 In the current implementation, the current snapshot is always the
8074 last taken snapshot (i.e. the head snapshot on the branch) and it
8075 cannot be changed.
8076
8077 The current snapshot is @c null if the machine doesn't have
8078 snapshots at all; in this case the current machine state is just
8079 current settings of this machine plus its current execution state.
8080
8081 <h3>Current machine state</h3>
8082
8083 The current machine state is what represented by IMachine instances got
8084 directly from IVirtualBox
8085 using <link
8086 to="IVirtualBox::getMachine">getMachine()</link>, <link
8087 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
8088 to instances returned by <link to="ISnapshot::machine"/>). This state
8089 is always used when the machine is <link to="IConsole::powerUp"> powered
8090 on</link>.
8091
8092 The current machine state also includes the current execution state.
8093 If the machine is being currently executed
8094 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
8095 and above), its execution state is just what's happening now.
8096 If it is powered off (<link to="MachineState_PoweredOff"/> or
8097 <link to="MachineState_Aborted"/>), it has a zero execution state.
8098 If the machine is saved (<link to="MachineState_Saved"/>), its
8099 execution state is what saved in the execution state file
8100 (<link to="IMachine::stateFilePath"/>).
8101
8102 If the machine is in the saved state, then, next time it is powered
8103 on, its execution state will be fully restored from the saved state
8104 file and the execution will continue from the point where the state
8105 was saved.
8106
8107 Similarly to snapshots, the current machine state can be discarded
8108 using <link to="IConsole::discardCurrentState"/>.
8109
8110 <h3>Taking and discarding snapshots</h3>
8111
8112 The table below briefly explains the meaning of every snapshot
8113 operation:
8114
8115 <table>
8116 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
8117
8118 <tr><td><link to="IConsole::takeSnapshot"/></td>
8119
8120 <td>Save the current state of the virtual machine, including all
8121 settings, contents of normal hard disks and the current modifications
8122 to immutable hard disks (for online snapshots)</td>
8123
8124 <td>The current state is not changed (the machine will continue
8125 execution if it is being executed when the snapshot is
8126 taken)</td></tr>
8127
8128 <tr><td><link to="IConsole::discardSnapshot"/></td>
8129
8130 <td>Forget the state of the virtual machine stored in the snapshot:
8131 dismiss all saved settings and delete the saved execution state (for
8132 online snapshots)</td>
8133
8134 <td>Other snapshots (including child snapshots, if any) and the
8135 current state are not directly affected</td></tr>
8136
8137 <tr><td><link to="IConsole::discardCurrentState"/></td>
8138
8139 <td>Restore the current state of the virtual machine from the state
8140 stored in the current snapshot, including all settings and hard disk
8141 contents</td>
8142
8143 <td>The current state of the machine existed prior to this operation
8144 is lost</td></tr>
8145
8146 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
8147
8148 <td>Completely revert the virtual machine to the state it was in
8149 before the current snapshot has been taken</td>
8150
8151 <td>The current state, as well as the current snapshot, are
8152 lost</td></tr>
8153
8154 </table>
8155
8156 </desc>
8157
8158 <attribute name="id" type="wstring" readonly="yes">
8159 <desc>UUID of the snapshot.</desc>
8160 </attribute>
8161
8162 <attribute name="name" type="wstring">
8163 <desc>Short name of the snapshot.</desc>
8164 </attribute>
8165
8166 <attribute name="description" type="wstring">
8167 <desc>Optional description of the snapshot.</desc>
8168 </attribute>
8169
8170 <attribute name="timeStamp" type="long long" readonly="yes">
8171 <desc>
8172 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8173 </desc>
8174 </attribute>
8175
8176 <attribute name="online" type="boolean" readonly="yes">
8177 <desc>
8178 @c true if this snapshot is an online snapshot and @c false otherwise.
8179
8180 <note>
8181 When this attribute is @c true, the
8182 <link to="IMachine::stateFilePath"/> attribute of the
8183 <link to="#machine"/> object associated with this snapshot
8184 will point to the saved state file. Otherwise, it will be
8185 an empty string.
8186 </note>
8187 </desc>
8188 </attribute>
8189
8190 <attribute name="machine" type="IMachine" readonly="yes">
8191 <desc>
8192 Virtual machine this snapshot is taken on. This object
8193 stores all settings the machine had when taking this snapshot.
8194 <note>
8195 The returned machine object is immutable, i.e. no
8196 any settings can be changed.
8197 </note>
8198 </desc>
8199 </attribute>
8200
8201 <attribute name="parent" type="ISnapshot" readonly="yes">
8202 <desc>
8203 Parent snapshot (a snapshot this one is based on).
8204 <note>
8205 It's not an error to read this attribute on a snapshot
8206 that doesn't have a parent -- a @c null object will be
8207 returned to indicate this.
8208 </note>
8209 </desc>
8210 </attribute>
8211
8212 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8213 <desc>
8214 Child snapshots (all snapshots having this one as a parent).
8215 <note>
8216 In the current implementation, there can be only one
8217 child snapshot, or no children at all, meaning this is the
8218 last (head) snapshot.
8219 </note>
8220 </desc>
8221 </attribute>
8222
8223 </interface>
8224
8225
8226 <!--
8227 // IMedia
8228 /////////////////////////////////////////////////////////////////////////
8229 -->
8230
8231 <enum
8232 name="MediaState"
8233 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8234 >
8235 <desc>
8236 Virtual media state.
8237 <see>IMedia</see>
8238 </desc>
8239
8240 <const name="NotCreated" value="0">
8241 <desc>
8242 Associated media storage does not exist (either was not created yet or
8243 was deleted).
8244 </desc>
8245 </const>
8246 <const name="Created" value="1">
8247 <desc>
8248 Associated storage exists and accessible.
8249 </desc>
8250 </const>
8251 <const name="LockedRead" value="2">
8252 <desc>
8253 Media is locked for reading, no data modification is possible.
8254 </desc>
8255 </const>
8256 <const name="LockedWrite" value="3">
8257 <desc>
8258 Media is locked for writing, no concurrent data reading or modification
8259 is possible.
8260 </desc>
8261 </const>
8262 <const name="Inaccessible" value="4">
8263 <desc>
8264 Associated media storage is not accessible.
8265 </desc>
8266 </const>
8267 <const name="Creating" value="5">
8268 <desc>
8269 Associated media storage is being created.
8270 </desc>
8271 </const>
8272 <const name="Deleting" value="6">
8273 <desc>
8274 Associated media storage is being deleted.
8275 </desc>
8276 </const>
8277 </enum>
8278
8279 <interface
8280 name="IMedium" extends="$unknown"
8281 uuid="f585787c-7728-40f6-853a-13705426e936"
8282 wsmap="managed"
8283 >
8284 <desc>
8285 The IMedium interface is a common interface for all objects representing
8286 virtual media such as hard disks, CD/DVD images and floppy images.
8287
8288 Each medium is associated with a storage unit (such as a file on the host
8289 computer or a network resource) that holds actual data. The location of
8290 the storage unit is represented by the #location attribute. The value of
8291 this attribute is media type dependent.
8292
8293 The exact media type may be determined by querying the appropriate
8294 interface such as:
8295 <ul>
8296 <li><link to="IHardDisk" /> (virtual hard disks)</li>
8297 <li><link to="IDVDImage" /> (standard CD/DVD ISO image files)</li>
8298 <li><link to="IFloppyImage" /> (raw floppy image files)</li>
8299 </ul>
8300
8301 Existing media are opened using the following methods, depending on the
8302 media type:
8303 <ul>
8304 <li><link to="IVirtualBox::openHardDisk"/></li>
8305 <li><link to="IVirtualBox::openDVDImage"/></li>
8306 <li><link to="IVirtualBox::openFloppyImage"/></li>
8307 </ul>
8308
8309 New hard disk media are created using the
8310 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8311 images are created outside VirtualBox, usually by storing a copy
8312 of the real medium of the corresponding type in a regular file.
8313
8314 <h3>Known Media</h3>
8315
8316 When an existing medium gets opened for the first time, it gets
8317 automatically remembered by the given VirtualBox installation or, in other
8318 words, becomes a <i>known medium</i>. Known media are stored in the media
8319 registry transparently maintained by VirtualBox and stored in settings
8320 files so that this registry is preserved when VirtualBox is not running.
8321
8322 Newly created virtual hard disks get remembered only when the associated
8323 storage unit is actually created (see IHardDisk for more details).
8324
8325 All known media can be enumerated using
8326 <link to="IVirtualBox::hardDisks"/>,
8327 <link to="IVirtualBox::DVDImages"/> and
8328 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8329 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8330 and similar methods or by location using
8331 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8332
8333 Only known media can be attached to virtual machines.
8334
8335 Removing known media from the media registry is performed when the given
8336 medium is closed using the <link to="#close"/> method or when its
8337 associated storage unit is deleted (only for hard disks).
8338
8339 <h3>Accessibility Checks</h3>
8340
8341 The given medium (with the created storage unit) is considered to be
8342 <i>accessible</i> when its storage unit can be read.
8343 Accessible media are indicated by the <link to="MediaState_Created"/>
8344 value of the <link to="#state"/> attribute. When the storage unit cannot
8345 be read (for example, because it is located on a disconnected network
8346 resource, or was accidentally deleted outside VirtualBox), the medium is
8347 considered to be <i>inaccessible</i> which is indicated by the
8348 <link to="MediaState_Inaccessible"/> state. The details about the reason
8349 of being inaccessible can be obtained using the
8350 <link to="#lastAccessError"/> attribute.
8351
8352 A new accessibility check is performed each time the <link to="#state"/>
8353 attribute is read. Please note that this check may take long time (several
8354 seconds or even minutes, depending on the storage unit location and
8355 format), and will block the calling thread until finished. For this
8356 reason, it is recommended to never read this attribute on the main UI
8357 thread to avoid making the UI unresponsive.
8358
8359 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8360 created for the first time), all known media are in the
8361 <link to="MediaState_Inaccessible"/> state but the value of the <link
8362 to="#lastAccessError"/> attribute is an empty string because no actual
8363 accessibility check is made on startup. This is done to make the
8364 VirtualBox object ready for serving requests as
8365 fast as possible and let the end-user application decide if it needs to
8366 check media accessibility right away or not.
8367 </desc>
8368
8369 <attribute name="id" type="wstring" readonly="yes">
8370 <desc>
8371 UUID of the medium. For a newly created medium, this value is a randomly
8372 generated UUID.
8373
8374 <note>
8375 For media in one of MediaState_NotCreated, MediaState_Creating or
8376 MediaState_Deleting states, the value of this property is undefined
8377 and will most likely be an empty UUID.
8378 </note>
8379 </desc>
8380 </attribute>
8381
8382 <attribute name="description" type="wstring">
8383 <desc>
8384 Optional description of the medium. For newly created media, the value
8385 of this attribute value is an empty string.
8386
8387 Media types that don't support this attribute will return E_NOTIMPL in
8388 attempt to get or set this attribute's value.
8389
8390 <note>
8391 For some storage types, reading this attribute may return an outdated
8392 (last known) value when <link to="#state"/> is <link
8393 to="MediaState_Inaccessible"/> or <link
8394 to="MediaState_LockedWrite"/> because the value of this attribute is
8395 stored within the storage unit itself. Also note that changing the
8396 attribute value is not possible in such case, as well as when the
8397 medium is the <link to="MediaState_LockedRead"/> state.
8398 </note>
8399 </desc>
8400 </attribute>
8401
8402 <attribute name="state" type="MediaState" readonly="yes">
8403 <desc>
8404 Current media state. Inspect <link to="MediaState"/> values for details.
8405
8406 Reading this attribute may take a long time because an accessibility
8407 check of the storage unit is performed each time the attribute is read.
8408 This check may cause a significant delay if the storage unit of the
8409 given medium is, for example, a file located on a network share which is
8410 not currently accessible due to connectivity problems -- the call will
8411 not return until a timeout interval defined by the host OS for this
8412 operation expires.
8413
8414 If the last known state of the medium is <link to="MediaState_Created"/>
8415 and the accessibility check fails then the state would be set to
8416 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8417 may be used to get more details about the failure. If the state of the
8418 medium is <link to="MediaState_LockedRead"/> or
8419 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8420 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8421 accessibility check in this case.
8422
8423 Note that not all media states are applicable to all media types.
8424 For example, states <link to="MediaState_NotCreated"/>,
8425 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8426 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8427 IFloppyImage media.
8428 </desc>
8429 </attribute>
8430
8431 <attribute name="location" type="wstring">
8432 <desc>
8433 Location of the storage unit holding media data.
8434
8435 The format of the location string is media type specific. For media
8436 types using regular files in a host's file system, the location
8437 string is the full file name.
8438
8439 Some media types may support changing the storage unit location by
8440 simply changing the value of this property. If this operation is not
8441 supported, the implementation will return E_NOTIMPL in attempt to set
8442 this attribute's value.
8443
8444 When setting a value of the location attribute which is a regular file
8445 in the host's file system, the given file name may be either relative to
8446 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8447 absolute. Note that if the given location specification does not contain
8448 the file extension part then a proper default extension will be
8449 automatically appended by the implementation depending on the media type.
8450 </desc>
8451 </attribute>
8452
8453 <attribute name="name" type="wstring" readonly="yes">
8454 <desc>
8455 Name of the storage unit holding media data.
8456
8457 The returned string is a short version of the <link to="#location"/>
8458 attribute that is suitable for representing the medium in situations
8459 where the full location specification is too long (such as lists
8460 and comboboxes in GUI frontends). This string is also used by frontends
8461 to sort the media list alphabetically when needed.
8462
8463 For example, for locations that are regular files in the host's file
8464 system, the value of this attribute is just the file name (+ extension),
8465 without the path specification.
8466
8467 Note that as opposed to the <link to="#location"/> attribute, the name
8468 attribute will not necessary be unique for a list of media of the
8469 given type and format.
8470 </desc>
8471 </attribute>
8472
8473 <attribute name="size" type="unsigned long long" readonly="yes">
8474 <desc>
8475 Physical size of the storage unit used to hold media data (in bytes).
8476
8477 <note>
8478 For media whose <link to="#state"/> is <link
8479 to="MediaState_Inaccessible"/>, the value of this property is the
8480 last known size. For <link to="MediaState_NotCreated"/> media,
8481 the returned value is zero.
8482 </note>
8483 </desc>
8484 </attribute>
8485
8486 <attribute name="lastAccessError" type="wstring" readonly="yes">
8487 <desc>
8488 Text message that represents the result of the last accessibility
8489 check.
8490
8491 Accessibility checks are performed each time the <link to="#state"/>
8492 attribute is read. An empty string is returned if the last
8493 accessibility check was successful. A non-empty string indicates a
8494 failure and should normally describe a reason of the failure (for
8495 example, a file read error).
8496 </desc>
8497 </attribute>
8498
8499 <attribute name="machineIds" type="wstring" safearray="yes" readonly="yes">
8500 <desc>
8501 Array of UUIDs of all machines this medium is attached to.
8502
8503 A @c null array is returned if this medium is not attached to any
8504 machine or to any machine's snapshot.
8505
8506 <note>
8507 The returned array will include a machine even if this medium is not
8508 attached to that machine in the current state but attached to it in
8509 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8510 details.
8511 </note>
8512 </desc>
8513 </attribute>
8514
8515 <method name="getSnapshotIds">
8516 <desc>
8517 Returns an array of UUIDs of all snapshots of the given machine where
8518 this medium is attached to.
8519
8520 If the medium is attached to the machine in the current state, then the
8521 first element in the array will always be the ID of the queried machine
8522 (i.e. the value equal to the @c machineId argument), followed by
8523 snapshot IDs (if any).
8524
8525 If the medium is not attached to the machine in the current state, then
8526 the array will contain only snapshot IDs.
8527
8528 The returned array may be @c null if this medium is not attached
8529 to the given machine at all, neither in the current state nor in one of
8530 the snapshots.
8531 </desc>
8532 <param name="machineId" type="wstring" dir="in">
8533 <desc>
8534 UUID of the machine to query.
8535 </desc>
8536 </param>
8537 <param name="snapshotIds" type="wstring" safearray="yes" dir="return">
8538 <desc>
8539 Array of snapshot UUIDs of the given machine using this medium.
8540 </desc>
8541 </param>
8542 </method>
8543
8544 <method name="lockRead">
8545 <desc>
8546 Locks this medium for reading.
8547
8548 The read lock is shared: many clients can simultaneously lock the
8549 same media for reading unless it is already locked for writing (see
8550 <link to="#lockWrite"/>) in which case an error is returned.
8551
8552 When the medium is locked for reading, it cannot be modified
8553 from within VirtualBox. This means that any method that changes
8554 the properties of this medium or contents of the storage unit
8555 will return an error (unless explicitly stated otherwise) and
8556 that an attempt to start a virtual machine that wants to modify
8557 the medium will also fail.
8558
8559 When the virtual machine is started up, it locks for reading all
8560 media it uses in read-only mode. If some media cannot be locked
8561 for reading, the startup procedure will fail.
8562
8563 The medium locked for reading must be unlocked using the <link
8564 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8565 can be nested and must be followed by the same number of paired
8566 <link to="#unlockRead"/> calls.
8567
8568 This method sets the media state to <link
8569 to="MediaState_LockedRead" /> on success. The state prior to
8570 this call must be <link to="MediaState_Created" />,
8571 <link to="MediaState_Inaccessible" /> or
8572 <link to="MediaState_LockedRead" />.
8573 As you can see, inaccessible media can be locked too. This is
8574 not an error; this method performs a logical lock that prevents
8575 modifications of this media through the VirtualBox API, not a
8576 physical lock of the underlying storage unit.
8577
8578 This method returns the current state of the medium
8579 <b>before</b> the operation.
8580
8581 <result name="VBOX_E_INVALID_OBJECT_STATE">
8582 Invalid media state (e.g. not created, locked, inaccessible,
8583 creating, deleting).
8584 </result>
8585
8586 </desc>
8587 <param name="state" type="MediaState" dir="return">
8588 <desc>
8589 State of the medium after the operation.
8590 </desc>
8591 </param>
8592 </method>
8593
8594 <method name="unlockRead">
8595 <desc>
8596 Cancels the read lock previously set by <link to="#lockRead"/>.
8597
8598 For both, success and failure, this method returns the current state
8599 of the medium <b>after</b> the operation.
8600
8601 See <link to="#lockRead"/> for more details.
8602
8603 <result name="VBOX_E_INVALID_OBJECT_STATE">
8604 Medium not locked for reading.
8605 </result>
8606
8607 </desc>
8608 <param name="state" type="MediaState" dir="return">
8609 <desc>
8610 State of the medium after the operation.
8611 </desc>
8612 </param>
8613 </method>
8614
8615 <method name="lockWrite">
8616 <desc>
8617 Locks this medium for writing.
8618
8619 The write lock, as opposed to <link to="#lockRead"/>, is
8620 exclusive: there may be only one client holding a write lock
8621 and there may be no read locks while the write lock is held.
8622
8623 When the medium is locked for writing, it cannot be modified
8624 from within VirtualBox and it is not guaranteed that the values
8625 of its properties are up-to-date. Any method that changes the
8626 properties of this medium or contents of the storage unit will
8627 return an error (unless explicitly stated otherwise) and an
8628 attempt to start a virtual machine wanting to modify or to
8629 read the medium will fail.
8630
8631 When the virtual machine is started up, it locks for writing all
8632 media it uses to write data to. If any medium could not be locked
8633 for writing, the startup procedure will fail.
8634
8635 The medium locked for writing must be unlocked using the <link
8636 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8637 can <b>not</b> be nested and must be followed by a<link
8638 to="#unlockWrite"/> call before the next lockWrite call.
8639
8640 This method sets the media state to <link to="MediaState_LockedWrite" />
8641 on success. The state prior to this call must be <link to="MediaState_Created"/>
8642 or <link to="MediaState_Inaccessible"/>. As you can see, inaccessible
8643 media can be locked too. This is not an error; this method
8644 performs a logical lock preventing modifications of this
8645 media through the VirtualBox API, not a physical lock of the
8646 underlying storage unit.
8647
8648 For both, success and failure, this method returns the current
8649 state of the medium <b>before</b> the operation.
8650
8651 <result name="VBOX_E_INVALID_OBJECT_STATE">
8652 Invalid media state (e.g. not created, locked, inaccessible,
8653 creating, deleting).
8654 </result>
8655
8656 </desc>
8657 <param name="state" type="MediaState" dir="return">
8658 <desc>
8659 State of the medium after the operation.
8660 </desc>
8661 </param>
8662 </method>
8663
8664 <method name="unlockWrite">
8665 <desc>
8666 Cancels the write lock previously set by <link to="#lockWrite"/>.
8667
8668 For both, success and failure, this method returns the current
8669 state of the medium <b>after</b> the operation.
8670
8671 See <link to="#lockWrite"/> for more details.
8672
8673 <result name="VBOX_E_INVALID_OBJECT_STATE">
8674 Medium not locked for writing.
8675 </result>
8676
8677 </desc>
8678 <param name="state" type="MediaState" dir="return">
8679 <desc>
8680 State of the medium after the operation.
8681 </desc>
8682 </param>
8683 </method>
8684
8685 <method name="close">
8686 <desc>
8687 Closes this medium.
8688
8689 The hard disk must not be attached to any known virtual machine
8690 and must not have any known child hard disks, otherwise the
8691 operation will fail.
8692
8693 When the hard disk is successfully closed, it gets removed from
8694 the list of remembered hard disks, but its storage unit is not
8695 deleted. In particular, this means that this hard disk can be
8696 later opened again using the <link
8697 to="IVirtualBox::openHardDisk"/> call.
8698
8699 Note that after this method successfully returns, the given hard
8700 disk object becomes uninitialized. This means that any attempt
8701 to call any of its methods or attributes will fail with the
8702 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8703
8704 <result name="VBOX_E_INVALID_OBJECT_STATE">
8705 Invalid media state (other than not created, created or
8706 inaccessible).
8707 </result>
8708 <result name="VBOX_E_OBJECT_IN_USE">
8709 Medium attached to virtual machine.
8710 </result>
8711 <result name="VBOX_E_FILE_ERROR">
8712 Settings file not accessible.
8713 </result>
8714 <result name="VBOX_E_XML_ERROR">
8715 Could not parse the settings file.
8716 </result>
8717
8718 </desc>
8719 </method>
8720
8721 </interface>
8722
8723
8724 <!--
8725 // IHardDisk
8726 /////////////////////////////////////////////////////////////////////////
8727 -->
8728
8729 <enum
8730 name="HardDiskType"
8731 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8732 >
8733 <desc>
8734 Virtual hard disk type.
8735 <see>IHardDisk</see>
8736 </desc>
8737
8738 <const name="Normal" value="0">
8739 <desc>
8740 Normal hard disk (attached directly or indirectly, preserved
8741 when taking snapshots).
8742 </desc>
8743 </const>
8744 <const name="Immutable" value="1">
8745 <desc>
8746 Immutable hard disk (attached indirectly, changes are wiped out
8747 after powering off the virtual machine).
8748 </desc>
8749 </const>
8750 <const name="Writethrough" value="2">
8751 <desc>
8752 Write through hard disk (attached directly, ignored when
8753 taking snapshots).
8754 </desc>
8755 </const>
8756 </enum>
8757
8758 <enum
8759 name="HardDiskVariant"
8760 uuid="eb7fc6b3-ae23-4c5d-a1f6-e3522dd1efb0"
8761 >
8762 <desc>
8763 Virtual hard disk image variant. More than one flag may be set.
8764 <see>IHardDisk</see>
8765 </desc>
8766
8767 <const name="Standard" value="0">
8768 <desc>
8769 No particular variant requested, results in using the backend default.
8770 </desc>
8771 </const>
8772 <const name="VmdkSplit2G" value="0x01">
8773 <desc>
8774 VMDK image split in chunks of less than 2GByte.
8775 </desc>
8776 </const>
8777 <const name="VmdkStreamOptimized" value="0x04">
8778 <desc>
8779 VMDK streamOptimized image. Special import/export format which is
8780 read-only/append-only.
8781 </desc>
8782 </const>
8783 <const name="VmdkESX" value="0x08">
8784 <desc>
8785 VMDK format variant used on ESX products.
8786 </desc>
8787 </const>
8788 <const name="Fixed" value="0x10000">
8789 <desc>
8790 Fixed image. Only allowed for base images.
8791 </desc>
8792 </const>
8793 <const name="Diff" value="0x20000">
8794 <desc>
8795 Fixed image. Only allowed for base images.
8796 </desc>
8797 </const>
8798 </enum>
8799
8800 <interface
8801 name="IHardDiskAttachment" extends="$unknown"
8802 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8803 wsmap="struct"
8804 >
8805 <desc>
8806 The IHardDiskAttachment interface represents a hard disk attachment of a
8807 virtual machine.
8808
8809 Every hard disk attachment specifies a slot of the virtual hard disk
8810 controller and a virtual hard disk attached to this slot.
8811
8812 The array of hard disk attachments is returned by
8813 <link to="IMachine::hardDiskAttachments"/>.
8814 </desc>
8815
8816 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8817 <desc>Hard disk object associated with this attachment.</desc>
8818 </attribute>
8819
8820 <attribute name="controller" type="wstring" readonly="yes">
8821 <desc>Interface bus of this attachment.</desc>
8822 </attribute>
8823
8824 <attribute name="port" type="long" readonly="yes">
8825 <desc>Port number of this attachment.</desc>
8826 </attribute>
8827
8828 <attribute name="device" type="long" readonly="yes">
8829 <desc>Device slot number of this attachment.</desc>
8830 </attribute>
8831
8832 </interface>
8833
8834 <interface
8835 name="IHardDisk" extends="IMedium"
8836 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8837 wsmap="managed"
8838 >
8839 <desc>
8840 The IHardDisk interface represents a virtual hard disk drive
8841 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8842
8843 <h3>Hard Disk Types</h3>
8844
8845 There are three types of hard disks:
8846 <link to="HardDiskType_Normal">Normal</link>,
8847 <link to="HardDiskType_Immutable">Immutable</link> and
8848 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8849 hard disk defines how the hard disk is attached to a virtual machine and
8850 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8851 machine with the attached hard disk is taken. The type of the hard disk is
8852 defined by the <link to="#type"/> attribute.
8853
8854 All hard disks can be also divided in two groups: <i>base</i> hard
8855 disks and <i>differencing</i> hard disks. A base hard disk contains all
8856 sectors of the hard disk data in its own storage and therefore can be
8857 used independently. On the contrary, a differencing hard disk is a
8858 "delta" to some other disk and contains only those sectors which differ
8859 from that other disk, which is then called a <i>parent</i>. The differencing
8860 hard disk is said to be <i>linked to</i> that parent.
8861 The parent may be itself a differencing image, thus forming a chain of
8862 linked hard disks. The last element in that chain (sometimes referred to as
8863 the root hard disk) must always be a base. Note that several differencing
8864 hard disks may be linked to the same parent hard disk.
8865
8866 Differencing hard disks can be distinguished from base hard disks by
8867 querying the <link to="#parent"/> attribute: base hard disks do not have
8868 parents they would depend on, so the value of this attribute is always
8869 @c null for them. Using this attribute, it is possible to walk up
8870 the hard disk tree (from the child hard disk to its parent). It is also
8871 possible to walk down the tree using the <link to="#children"/>
8872 attribute.
8873
8874 Note that the type of all differencing hard disks is
8875 <link to="HardDiskType_Normal" />; all other values are
8876 meaningless for them. Base hard disks may be of any type.
8877
8878 <h3>Creating Hard Disks</h3>
8879
8880 New base hard disks are created using
8881 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8882 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8883 disks are usually implicitly created by VirtualBox when needed but may
8884 also be created explicitly using <link to="#createDiffStorage"/>.
8885
8886 After the hard disk is successfully created (including the storage unit)
8887 or opened, it becomes a known hard disk (remembered in the internal media
8888 registry). Known hard disks can be attached to a virtual machine, accessed
8889 through <link to="IVirtualBox::getHardDisk"/> and
8890 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8891 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8892
8893 The following methods, besides <link to="IMedium::close"/>,
8894 automatically remove the hard disk from the media registry:
8895 <ul>
8896 <li><link to="#deleteStorage"/></li>
8897 <li><link to="#mergeTo"/></li>
8898 </ul>
8899
8900 If the storage unit of the hard disk is a regular file in the host's
8901 file system then the rules stated in the description of the
8902 <link to="IMedium::location"/> attribute apply when setting its value. In
8903 addition, a plain file name without any path may be given, in which case
8904 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8905 folder</link> will be prepended to it.
8906
8907 <h4>Automatic composition of the file name part</h4>
8908
8909 Another extension to the <link to="IMedium::location"/> attribute is that
8910 there is a possibility to cause VirtualBox to compose a unique value for
8911 the file name part of the location using the UUID of the hard disk. This
8912 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8913 e.g. before the storage unit is created, and works as follows. You set the
8914 value of the <link to="IMedium::location"/> attribute to a location
8915 specification which only contains the path specification but not the file
8916 name part and ends with either a forward slash or a backslash character.
8917 In response, VirtualBox will generate a new UUID for the hard disk and
8918 compose the file name using the following pattern:
8919 <pre>
8920 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8921 </pre>
8922 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8923 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8924 is the default extension for the storage format of this hard disk. After
8925 that, you may call any of the methods that create a new hard disk storage
8926 unit and they will use the generated UUID and file name.
8927
8928 <h3>Attaching Hard Disks</h3>
8929
8930 Hard disks are attached to virtual machines using the
8931 <link to="IMachine::attachHardDisk"/> method and detached using the
8932 <link to="IMachine::detachHardDisk"/> method. Depending on their
8933 <link to="#type"/>, hard disks are attached either
8934 <i>directly</i> or <i>indirectly</i>.
8935
8936 When a hard disk is being attached directly, it is associated with the
8937 virtual machine and used for hard disk operations when the machine is
8938 running. When a hard disk is being attached indirectly, a new differencing
8939 hard disk linked to it is implicitly created and this differencing hard
8940 disk is associated with the machine and used for hard disk operations.
8941 This also means that if <link to="IMachine::attachHardDisk"/> performs
8942 a direct attachment then the same hard disk will be returned in response
8943 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8944 an indirect attachment is performed then
8945 <link to="IMachine::getHardDisk"/> will return the implicitly created
8946 differencing hard disk, not the original one passed to <link
8947 to="IMachine::attachHardDisk"/>. The following table shows the
8948 dependency of the attachment type on the hard disk type:
8949
8950 <table>
8951 <tr>
8952 <th>Hard Disk Type</th>
8953 <th>Direct or Indirect?</th>
8954 </tr>
8955 <tr>
8956 <td>Normal (Base)</td>
8957 <td>
8958 Normal base hard disks that do not have children (i.e. differencing
8959 hard disks linked to them) and that are not already attached to
8960 virtual machines in snapshots are attached <b>directly</b>.
8961 Otherwise, they are attached <b>indirectly</b> because having
8962 dependent children or being part of the snapshot makes it impossible
8963 to modify hard disk contents without breaking the integrity of the
8964 dependent party. The <link to="#readOnly"/> attribute allows to
8965 quickly determine the kind of the attachment for the given hard
8966 disk. Note that if a normal base hard disk is to be indirectly
8967 attached to a virtual machine with snapshots then a special
8968 procedure called <i>smart attachment</i> is performed (see below).
8969 </td>
8970 </tr>
8971 <tr>
8972 <td>Normal (Differencing)</td>
8973 <td>
8974 Differencing hard disks are like normal base hard disks: attached
8975 <b>directly</b> if they do not have children and are not attached to
8976 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8977 that the smart attachment procedure is never performed for
8978 differencing hard disks.
8979 </td>
8980 </tr>
8981 <tr>
8982 <td>Immutable</td>
8983 <td>
8984 Immutable hard disks are always attached <b>indirectly</b> because
8985 they are designed to be non-writable. If an immutable hard disk is
8986 attached to a virtual machine with snapshots then a special
8987 procedure called smart attachment is performed (see below).
8988 </td>
8989 </tr>
8990 <tr>
8991 <td>Writethrough</td>
8992 <td>
8993 Writethrough hard disks are always attached <b>directly</b>, also as
8994 designed. This also means that writethrough hard disks cannot have
8995 other hard disks linked to them at all.
8996 </td>
8997 </tr>
8998 </table>
8999
9000 Note that the same hard disk, regardless of its type, may be attached to
9001 more than one virtual machine at a time. In this case, the machine that is
9002 started first gains exclusive access to the hard disk and attempts to
9003 start other machines having this hard disk attached will fail until the
9004 first machine is powered down.
9005
9006 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9007 that the given hard disk remains associated with the given machine after a
9008 successful <link to="IMachine::detachHardDisk"/> call until
9009 <link to="IMachine::saveSettings"/> is called to save all changes to
9010 machine settings to disk. This deferring is necessary to guarantee that
9011 the hard disk configuration may be restored at any time by a call to
9012 <link to="IMachine::discardSettings"/> before the settings
9013 are saved (committed).
9014
9015 Note that if <link to="IMachine::discardSettings"/> is called after
9016 indirectly attaching some hard disks to the machine but before a call to
9017 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9018 all differencing hard disks implicitly created by
9019 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
9020 Such implicitly created hard disks will also be immediately deleted when
9021 detached explicitly using the <link to="IMachine::detachHardDisk"/>
9022 call if it is made before <link to="IMachine::saveSettings"/>. This
9023 implicit deletion is safe because newly created differencing hard
9024 disks do not contain any user data.
9025
9026 However, keep in mind that detaching differencing hard disks that were
9027 implicitly created by <link to="IMachine::attachHardDisk"/>
9028 before the last <link to="IMachine::saveSettings"/> call will
9029 <b>not</b> implicitly delete them as they may already contain some data
9030 (for example, as a result of virtual machine execution). If these hard
9031 disks are no more necessary, the caller can always delete them explicitly
9032 using <link to="#deleteStorage"/> after they are actually de-associated
9033 from this machine by the <link to="IMachine::saveSettings"/> call.
9034
9035 <h3>Smart Attachment</h3>
9036
9037 When normal base or immutable hard disks are indirectly attached to a
9038 virtual machine then some additional steps are performed to make sure the
9039 virtual machine will have the most recent "view" of the hard disk being
9040 attached. These steps include walking through the machine's snapshots
9041 starting from the current one and going through ancestors up to the first
9042 snapshot. Hard disks attached to the virtual machine in all
9043 of the encountered snapshots are checked whether they are descendants of
9044 the given normal base or immutable hard disk. The first found child (which
9045 is the differencing hard disk) will be used instead of the normal base or
9046 immutable hard disk as a parent for creating a new differencing hard disk
9047 that will be actually attached to the machine. And only if no descendants
9048 are found or if the virtual machine does not have any snapshots then the
9049 normal base or immutable hard disk will be used itself as a parent for
9050 this differencing hard disk.
9051
9052 It is easier to explain what smart attachment does using the
9053 following example:
9054 <pre>
9055BEFORE attaching B.vdi: AFTER attaching B.vdi:
9056
9057Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9058 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9059 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9060 Snapshot 4 (none) Snapshot 4 (none)
9061 CurState (none) CurState (D3->D2.vdi)
9062
9063 NOT
9064 ...
9065 CurState (D3->B.vdi)
9066 </pre>
9067 The first column is the virtual machine configuration before the base hard
9068 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9069 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9070 mean that the hard disk that is actually attached to the machine is a
9071 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9072 another hard disk, <tt>B.vdi</tt>.
9073
9074 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9075 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9076 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9077 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9078 it cannot be attached directly and needs an indirect attachment (i.e.
9079 implicit creation of a new differencing hard disk). Due to the smart
9080 attachment procedure, the new differencing hard disk
9081 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9082 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9083 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9084 machine.
9085
9086 Note that if there is more than one descendant hard disk of the given base
9087 hard disk found in a snapshot, and there is an exact device, channel and
9088 bus match, then this exact match will be used. Otherwise, the youngest
9089 descendant will be picked up.
9090
9091 There is one more important aspect of the smart attachment procedure which
9092 is not related to snapshots at all. Before walking through the snapshots
9093 as described above, the backup copy of the current list of hard disk
9094 attachment is searched for descendants. This backup copy is created when
9095 the hard disk configuration is changed for the first time after the last
9096 <link to="IMachine::saveSettings"/> call and used by
9097 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9098 changes. When such a descendant is found in this backup copy, it will be
9099 simply re-attached back, without creating a new differencing hard disk for
9100 it. This optimization is necessary to make it possible to re-attach the
9101 base or immutable hard disk to a different bus, channel or device slot
9102 without losing the contents of the differencing hard disk actually
9103 attached to the machine in place of it.
9104 </desc>
9105
9106 <attribute name="format" type="wstring" readonly="yes">
9107 <desc>
9108 Storage format of this hard disk.
9109
9110 The value of this attribute is a string that specifies a backend used to
9111 store hard disk data. The storage format is defined when you create a
9112 new hard disk or automatically detected when you open an existing hard
9113 disk medium, and cannot be changed later.
9114
9115 The list of all storage formats supported by this VirtualBox
9116 installation can be obtained using
9117 <link to="ISystemProperties::hardDiskFormats"/>.
9118 </desc>
9119 </attribute>
9120
9121 <attribute name="type" type="HardDiskType">
9122 <desc>
9123 Type (role) of this hard disk.
9124
9125 The following constraints apply when changing the value of this
9126 attribute:
9127 <ul>
9128 <li>If a hard disk is attached to a virtual machine (either in the
9129 current state or in one of the snapshots), its type cannot be
9130 changed.
9131 </li>
9132 <li>As long as the hard disk has children, its type cannot be set
9133 to <link to="HardDiskType_Writethrough"/>.
9134 </li>
9135 <li>The type of all differencing hard disks is
9136 <link to="HardDiskType_Normal"/> and cannot be changed.
9137 </li>
9138 </ul>
9139
9140 The type of a newly created or opened hard disk is set to
9141 <link to="HardDiskType_Normal"/>.
9142 </desc>
9143 </attribute>
9144
9145 <attribute name="parent" type="IHardDisk" readonly="yes">
9146 <desc>
9147 Parent of this hard disk (a hard disk this hard disk is directly based
9148 on).
9149
9150 Only differencing hard disks have parents. For base (non-differencing)
9151 hard disks, @c null is returned.
9152 </desc>
9153 </attribute>
9154
9155 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9156 <desc>
9157 Children of this hard disk (all differencing hard disks directly based
9158 on this hard disk). A @c null array is returned if this hard disk
9159 does not have any children.
9160 </desc>
9161 </attribute>
9162
9163 <attribute name="root" type="IHardDisk" readonly="yes">
9164 <desc>
9165 Root hard disk of this hard disk.
9166
9167 If this is a differencing hard disk, its root hard disk is the base hard
9168 disk the given hard disk branch starts from. For all other types of hard
9169 disks, this property returns the hard disk object itself (i.e. the same
9170 object this property is read on).
9171 </desc>
9172 </attribute>
9173
9174 <attribute name="readOnly" type="boolean" readonly="yes">
9175 <desc>
9176 Returns @c true if this hard disk is read-only and @c false otherwise.
9177
9178 A hard disk is considered to be read-only when its contents cannot be
9179 modified without breaking the integrity of other parties that depend on
9180 this hard disk such as its child hard disks or snapshots of virtual
9181 machines where this hard disk is attached to these machines. If there
9182 are no children and no such snapshots then there is no dependency and
9183 the hard disk is not read-only.
9184
9185 The value of this attribute can be used to determine the kind of the
9186 attachment that will take place when attaching this hard disk to a
9187 virtual machine. If the value is @c false then the hard disk will
9188 be attached directly. If the value is @c true then the hard disk
9189 will be attached indirectly by creating a new differencing child hard
9190 disk for that. See the interface description for more information.
9191
9192 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9193 disks are always read-only while all
9194 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9195 always not.
9196
9197 <note>
9198 The read-only condition represented by this attribute is related to
9199 the hard disk type and usage, not to the current
9200 <link to="IMedium::state">media state</link> and not to the read-only
9201 state of the storage unit.
9202 </note>
9203 </desc>
9204 </attribute>
9205
9206 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9207 <desc>
9208 Logical size of this hard disk (in megabytes), as reported to the
9209 guest OS running inside the virtual machine this disk is
9210 attached to. The logical size is defined when the hard disk is created
9211 and cannot be changed later.
9212
9213 <note>
9214 Reading this property on a differencing hard disk will return the size
9215 of its <link to="#root"/> hard disk.
9216 </note>
9217 <note>
9218 For hard disks whose state is <link to="#state"/> is <link
9219 to="MediaState_Inaccessible"/>, the value of this property is the
9220 last known logical size. For <link to="MediaState_NotCreated"/> hard
9221 disks, the returned value is zero.
9222 </note>
9223 </desc>
9224 </attribute>
9225
9226 <attribute name="autoReset" type="boolean">
9227 <desc>
9228 Whether this differencing hard disk will be automatically reset each
9229 time a virtual machine it is attached to is powered up.
9230
9231 See <link to="#reset()"/> for more information about resetting
9232 differencing hard disks.
9233
9234 <note>
9235 Reading this property on a base (non-differencing) hard disk will
9236 always @c false. Changing the value of this property in this
9237 case is not supported.
9238 </note>
9239
9240 <result name="VBOX_E_NOT_SUPPORTED">
9241 This is not a differencing hard disk (when changing the attribute
9242 value).
9243 </result>
9244 </desc>
9245 </attribute>
9246
9247 <!-- storage methods -->
9248
9249 <method name="getProperty">
9250 <desc>
9251 Returns the value of the custom hard disk property with the given name.
9252
9253 The list of all properties supported by the given hard disk format can
9254 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9255
9256 Note that if this method returns an empty string in @a value, the
9257 requested property is supported but currently not assigned any value.
9258
9259 <result name="VBOX_E_OBJECT_NOT_FOUND">
9260 Requested property does not exist (not supported by the format).
9261 </result>
9262 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9263 </desc>
9264 <param name="name" type="wstring" dir="in">
9265 <desc>Name of the property to get.</desc>
9266 </param>
9267 <param name="value" type="wstring" dir="return">
9268 <desc>Current property value.</desc>
9269 </param>
9270 </method>
9271
9272 <method name="setProperty">
9273 <desc>
9274 Sets the value of the custom hard disk property with the given name.
9275
9276 The list of all properties supported by the given hard disk format can
9277 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9278
9279 Note that setting the property value to @c null or an empty string is
9280 equivalent to deleting the existing value. A default value (if it is
9281 defined for this property) will be used by the format backend in this
9282 case.
9283
9284 <result name="VBOX_E_OBJECT_NOT_FOUND">
9285 Requested property does not exist (not supported by the format).
9286 </result>
9287 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9288 </desc>
9289 <param name="name" type="wstring" dir="in">
9290 <desc>Name of the property to set.</desc>
9291 </param>
9292 <param name="value" type="wstring" dir="in">
9293 <desc>Property value to set.</desc>
9294 </param>
9295 </method>
9296
9297 <method name="getProperties">
9298 <desc>
9299 Returns values for a group of properties in one call.
9300
9301 The names of the properties to get are specified using the @a names
9302 argument which is a list of comma-separated property names or
9303 an empty string if all properties are to be returned. Note that currently
9304 the value of this argument is ignored and the method always returns all
9305 existing properties.
9306
9307 The list of all properties supported by the given hard disk format can
9308 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9309
9310 The method returns two arrays, the array of property names corresponding
9311 to the @a names argument and the current values of these properties.
9312 Both arrays have the same number of elements with each elemend at the
9313 given index in the first array corresponds to an element at the same
9314 index in the second array.
9315
9316 Note that for properties that do not have assigned values,
9317 an empty string is returned at the appropriate index in the
9318 @a returnValues array.
9319
9320 </desc>
9321 <param name="names" type="wstring" dir="in">
9322 <desc>
9323 Names of properties to get.
9324 </desc>
9325 </param>
9326 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9327 <desc>Names of returned properties.</desc>
9328 </param>
9329 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9330 <desc>Values of returned properties.</desc>
9331 </param>
9332 </method>
9333
9334 <method name="setProperties">
9335 <desc>
9336 Sets values for a group of properties in one call.
9337
9338 The names of the properties to set are passed in the @a names
9339 array along with the new values for them in the @a values array. Both
9340 arrays have the same number of elements with each elemend at the given
9341 index in the first array corresponding to an element at the same index
9342 in the second array.
9343
9344 If there is at least one property name in @a names that is not valid,
9345 the method will fail before changing the values of any other properties
9346 from the @a names array.
9347
9348 Using this method over <link to="#setProperty"/> is preferred if you
9349 need to set several properties at once since it will result into less
9350 IPC calls.
9351
9352 The list of all properties supported by the given hard disk format can
9353 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9354
9355 Note that setting the property value to @c null or an empty string is
9356 equivalent to deleting the existing value. A default value (if it is
9357 defined for this property) will be used by the format backend in this
9358 case.
9359 </desc>
9360 <param name="names" type="wstring" safearray="yes" dir="in">
9361 <desc>Names of properties to set.</desc>
9362 </param>
9363 <param name="values" type="wstring" safearray="yes" dir="in">
9364 <desc>Values of properties to set.</desc>
9365 </param>
9366 </method>
9367
9368 <!-- storage methods -->
9369
9370 <method name="createBaseStorage">
9371 <desc>
9372 Starts creating a hard disk storage unit (fixed/dynamic, according
9373 to the variant flags) in in the background. The previous storage unit
9374 created for this object, if any, must first be deleted using
9375 <link to="#deleteStorage"/>, otherwise the operation will fail.
9376
9377 Before the operation starts, the hard disk is placed in
9378 <link to="MediaState_Creating"/> state. If the create operation
9379 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9380 state.
9381
9382 After the returned progress object reports that the operation has
9383 successfully completed, the media state will be set to <link
9384 to="MediaState_Created"/>, the hard disk will be remembered by this
9385 VirtualBox installation and may be attached to virtual machines.
9386
9387 <result name="VBOX_E_NOT_SUPPORTED">
9388 The variant of storage creation operation is not supported. See <link
9389 to="IHardDiskFormat::capabilities"/>.
9390 </result>
9391 </desc>
9392 <param name="logicalSize" type="unsigned long long" dir="in">
9393 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9394 </param>
9395 <param name="variant" type="HardDiskVariant" dir="in">
9396 <desc>Exact image variant which should be created.</desc>
9397 </param>
9398 <param name="progress" type="IProgress" dir="return">
9399 <desc>Progress object to track the operation completion.</desc>
9400 </param>
9401 </method>
9402
9403 <method name="deleteStorage">
9404 <desc>
9405 Starts deleting the storage unit of this hard disk.
9406
9407 The hard disk must not be attached to any known virtual machine and must
9408 not have any known child hard disks, otherwise the operation will fail.
9409 It will also fail if there is no storage unit to delete or if deletion
9410 is already in progress, or if the hard disk is being in use (locked for
9411 read or for write) or inaccessible. Therefore, the only valid state for
9412 this operation to succeed is <link to="MediaState_Created"/>.
9413
9414 Before the operation starts, the hard disk is placed to
9415 <link to="MediaState_Deleting"/> state and gets removed from the list
9416 of remembered hard disks (media registry). If the delete operation
9417 fails, the media will be remembered again and placed back to
9418 <link to="MediaState_Created"/> state.
9419
9420 After the returned progress object reports that the operation is
9421 complete, the media state will be set to
9422 <link to="MediaState_NotCreated"/> and you will be able to use one of
9423 the storage creation methods to create it again.
9424
9425 <see>#close()</see>
9426
9427 <result name="VBOX_E_OBJECT_IN_USE">
9428 Hard disk is attached to a virtual machine.
9429 </result>
9430 <result name="VBOX_E_NOT_SUPPORTED">
9431 Storage deletion is not allowed because neither of storage creation
9432 operations are supported. See
9433 <link to="IHardDiskFormat::capabilities"/>.
9434 </result>
9435
9436 <note>
9437 If the deletion operation fails, it is not guaranteed that the storage
9438 unit still exists. You may check the <link to="IMedium::state"/> value
9439 to answer this question.
9440 </note>
9441 </desc>
9442 <param name="progress" type="IProgress" dir="return">
9443 <desc>Progress object to track the operation completion.</desc>
9444 </param>
9445 </method>
9446
9447 <!-- diff methods -->
9448
9449 <method name="createDiffStorage">
9450 <desc>
9451 Starts creating an empty differencing storage unit based on this hard
9452 disk in the format and at the location defined by the @a target
9453 argument.
9454
9455 The target hard disk must be in <link to="MediaState_NotCreated"/>
9456 state (i.e. must not have an existing storage unit). Upon successful
9457 completion, this operation will set the type of the target hard disk to
9458 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9459 represent the differencing hard disk data in the given format (according
9460 to the storage format of the target object).
9461
9462 After the returned progress object reports that the operation is
9463 successfully complete, the target hard disk gets remembered by this
9464 VirtualBox installation and may be attached to virtual machines.
9465
9466 <note>
9467 The hard disk will be set to <link to="MediaState_LockedRead"/>
9468 state for the duration of this operation.
9469 </note>
9470 <result name="VBOX_E_OBJECT_IN_USE">
9471 Hard disk not in @c NotCreated state.
9472 </result>
9473 </desc>
9474 <param name="target" type="IHardDisk" dir="in">
9475 <desc>Target hard disk.</desc>
9476 </param>
9477 <param name="variant" type="HardDiskVariant" dir="in">
9478 <desc>Exact image variant which should be created.</desc>
9479 </param>
9480 <param name="progress" type="IProgress" dir="return">
9481 <desc>Progress object to track the operation completion.</desc>
9482 </param>
9483 </method>
9484
9485 <method name="mergeTo">
9486 <desc>
9487 Starts merging the contents of this hard disk and all intermediate
9488 differencing hard disks in the chain to the given target hard disk.
9489
9490 The target hard disk must be either a descendant of this hard disk or
9491 its ancestor (otherwise this method will immediately return a failure).
9492 It follows that there are two logical directions of the merge operation:
9493 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9494 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9495 chain:
9496
9497 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9498
9499 Here, calling this method on the <tt>Base</tt> hard disk object with
9500 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9501 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9502 merge. Note that in both cases the contents of the resulting hard disk
9503 will be the same, the only difference is the hard disk object that takes
9504 the result of the merge operation. In case of the forward merge in the
9505 above example, the result will be written to <tt>Diff_2</tt>; in case of
9506 the backward merge, the result will be written to <tt>Base</tt>. In
9507 other words, the result of the operation is always stored in the target
9508 hard disk.
9509
9510 Upon successful operation completion, the storage units of all hard
9511 disks in the chain between this (source) hard disk and the target hard
9512 disk, including the source hard disk itself, will be automatically
9513 deleted and the relevant hard disk objects (including this hard disk)
9514 will become uninitialized. This means that any attempt to call any of
9515 their methods or attributes will fail with the
9516 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9517 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9518 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9519 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9520 disk itself since it will no longer be based on any other hard disk.
9521
9522 Considering the above, all of the following conditions must be met in
9523 order for the merge operation to succeed:
9524 <ul>
9525 <li>
9526 Neither this (source) hard disk nor any intermediate
9527 differencing hard disk in the chain between it and the target
9528 hard disk is attached to any virtual machine.
9529 </li>
9530 <li>
9531 Neither the source hard disk nor the target hard disk is an
9532 <link to="HardDiskType_Immutable"/> hard disk.
9533 </li>
9534 <li>
9535 The part of the hard disk tree from the source hard disk to the
9536 target hard disk is a linear chain, i.e. all hard disks in this
9537 chain have exactly one child which is the next hard disk in this
9538 chain. The only exception from this rule is the target hard disk in
9539 the forward merge operation; it is allowed to have any number of
9540 child hard disks because the merge operation will hot change its
9541 logical contents (as it is seen by the guest OS or by children).
9542 </li>
9543 <li>
9544 None of the involved hard disks are in
9545 <link to="MediaState_LockedRead"/> or
9546 <link to="MediaState_LockedWrite"/> state.
9547 </li>
9548 </ul>
9549
9550 <note>
9551 This (source) hard disk and all intermediates will be placed to <link
9552 to="MediaState_Deleting"/> state and the target hard disk will be
9553 placed to <link to="MediaState_LockedWrite"/> state and for the
9554 duration of this operation.
9555 </note>
9556 </desc>
9557 <param name="targetId" type="wstring" dir="in">
9558 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9559 </param>
9560 <param name="progress" type="IProgress" dir="return">
9561 <desc>Progress object to track the operation completion.</desc>
9562 </param>
9563 </method>
9564
9565 <!-- clone method -->
9566
9567 <method name="cloneTo">
9568 <desc>
9569 Starts creating a clone of this hard disk in the format and at the
9570 location defined by the @a target argument.
9571
9572 The target hard disk must be either in <link to="MediaState_NotCreated"/>
9573 state (i.e. must not have an existing storage unit) or in
9574 <link to="MediaState_Created"/> state (i.e. created and not locked, and
9575 big enough to hold the data or else the copy will be partial). Upon
9576 successful completion, the cloned hard disk will contain exactly the
9577 same sector data as the hard disk being cloned, except that in the
9578 first case a new UUID for the clone will be randomly generated, and in
9579 the second case the UUID will remain unchanged.
9580
9581 The @a parent argument defines which hard disk will be the parent
9582 of the clone. Passing a @c null reference indicates that the clone will
9583 be a base image, i.e. completely independent. It is possible to specify
9584 an arbitrary hard disk for this parameter, including the parent of the
9585 hard disk which is being cloned. Even cloning to a child of the source
9586 hard disk is possible. Note that when cloning to an existing image, the
9587 @a parent irgument is ignored.
9588
9589 After the returned progress object reports that the operation is
9590 successfully complete, the target hard disk gets remembered by this
9591 VirtualBox installation and may be attached to virtual machines.
9592
9593 <note>
9594 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9595 state for the duration of this operation.
9596 </note>
9597 <result name="E_NOTIMPL">
9598 The specified cloning variant is not supported at the moment.
9599 </result>
9600 </desc>
9601 <param name="target" type="IHardDisk" dir="in">
9602 <desc>Target hard disk.</desc>
9603 </param>
9604 <param name="variant" type="HardDiskVariant" dir="in">
9605 <desc>Exact image variant which should be created.</desc>
9606 </param>
9607 <param name="parent" type="IHardDisk" dir="in">
9608 <desc>Parent of the cloned hard disk.</desc>
9609 </param>
9610 <param name="progress" type="IProgress" dir="return">
9611 <desc>Progress object to track the operation completion.</desc>
9612 </param>
9613 </method>
9614
9615 <!-- other methods -->
9616
9617 <method name="compact">
9618 <desc>
9619 Starts compacting of this hard disk. This means that the disk is
9620 transformed into a possibly more compact storage representation.
9621 This potentially creates temporary images, which can require a
9622 substantial amount of additional disk space.
9623
9624 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9625 state and all its parent hard disks (if any) will be placed to
9626 <link to="MediaState_LockedRead"/> state for the duration of this
9627 operation.
9628
9629 Please note that the results can be either returned straight away,
9630 or later as the result of the background operation via the object
9631 returned via the @a progress parameter.
9632
9633 <result name="VBOX_E_NOT_SUPPORTED">
9634 Hard disk format does not support compacting (but potentially
9635 needs it).
9636 </result>
9637 </desc>
9638 <param name="progress" type="IProgress" dir="return">
9639 <desc>Progress object to track the operation completion.</desc>
9640 </param>
9641 </method>
9642
9643 <method name="reset">
9644 <desc>
9645 Starts erasing the contents of this differencing hard disk.
9646
9647 This operation will reset the differencing hard disk to its initial
9648 state when it does not contain any sector data and any read operation is
9649 redirected to its parent hard disk.
9650
9651 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9652 for the duration of this operation.
9653
9654 <result name="VBOX_E_NOT_SUPPORTED">
9655 This is not a differencing hard disk.
9656 </result>
9657 <result name="VBOX_E_INVALID_OBJECT_STATE">
9658 Hard disk is not in <link to="MediaState_Created"/> or
9659 <link to="MediaState_Inaccessible"/> state.
9660 </result>
9661 </desc>
9662 <param name="progress" type="IProgress" dir="return">
9663 <desc>Progress object to track the operation completion.</desc>
9664 </param>
9665 </method>
9666
9667 </interface>
9668
9669
9670 <!--
9671 // IHardDiskFormat
9672 /////////////////////////////////////////////////////////////////////////
9673 -->
9674
9675 <enum
9676 name="DataType"
9677 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9678 >
9679 <const name="Int32" value="0"/>
9680 <const name="Int8" value="1"/>
9681 <const name="String" value="2"/>
9682 </enum>
9683
9684 <enum
9685 name="DataFlags"
9686 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9687 >
9688 <const name="None" value="0x00"/>
9689 <const name="Mandatory" value="0x01"/>
9690 <const name="Expert" value="0x02"/>
9691 <const name="Array" value="0x04"/>
9692 <const name="FlagMask" value="0x07"/>
9693 </enum>
9694
9695 <enum
9696 name="HardDiskFormatCapabilities"
9697 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9698 >
9699 <desc>
9700 Hard disk format capability flags.
9701 </desc>
9702
9703 <const name="Uuid" value="0x01">
9704 <desc>
9705 Supports UUIDs as expected by VirtualBox code.
9706 </desc>
9707 </const>
9708
9709 <const name="CreateFixed" value="0x02">
9710 <desc>
9711 Supports creating fixed size images, allocating all space instantly.
9712 </desc>
9713 </const>
9714
9715 <const name="CreateDynamic" value="0x04">
9716 <desc>
9717 Supports creating dynamically growing images, allocating space on
9718 demand.
9719 </desc>
9720 </const>
9721
9722 <const name="CreateSplit2G" value="0x08">
9723 <desc>
9724 Supports creating images split in chunks of a bit less than 2 GBytes.
9725 </desc>
9726 </const>
9727
9728 <const name="Differencing" value="0x10">
9729 <desc>
9730 Supports being used as a format for differencing hard disks (see <link
9731 to="IHardDisk::createDiffStorage"/>).
9732 </desc>
9733 </const>
9734
9735 <const name="Asynchronous" value="0x20">
9736 <desc>
9737 Supports asynchronous I/O operations for at least some configurations.
9738 </desc>
9739 </const>
9740
9741 <const name="File" value="0x40">
9742 <desc>
9743 The format backend operates on files (the <link to="IMedium::location"/>
9744 attribute of the hard disk specifies a file used to store hard disk
9745 data; for a list of supported file extensions see
9746 <link to="IHardDiskFormat::fileExtensions"/>).
9747 </desc>
9748 </const>
9749
9750 <const name="Properties" value="0x80">
9751 <desc>
9752 The format backend uses the property interface to configure the storage
9753 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9754 method is used to get access to properties supported by the given hard
9755 disk format).
9756 </desc>
9757 </const>
9758
9759 <const name="CapabilityMask" value="0xFF"/>
9760 </enum>
9761
9762 <interface
9763 name="IHardDiskFormat" extends="$unknown"
9764 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9765 wsmap="managed"
9766 >
9767 <desc>
9768 The IHardDiskFormat interface represents a virtual hard disk format.
9769
9770 Each hard disk format has an associated backend which is used to handle
9771 hard disks stored in this format. This interface provides information
9772 about the properties of the associated backend.
9773
9774 Each hard disk format is identified by a string represented by the
9775 <link to="#id"/> attribute. This string is used in calls like
9776 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9777 format.
9778
9779 The list of all supported hard disk formats can be obtained using
9780 <link to="ISystemProperties::hardDiskFormats"/>.
9781
9782 <see>IHardDisk</see>
9783 </desc>
9784
9785 <attribute name="id" type="wstring" readonly="yes">
9786 <desc>
9787 Identifier of this format.
9788
9789 The format identifier is a non-@c null non-empty ASCII string. Note that
9790 this string is case-insensitive. This means that, for example, all of
9791 the following strings:
9792 <pre>
9793 "VDI"
9794 "vdi"
9795 "VdI"</pre>
9796 refer to the same hard disk format.
9797
9798 This string is used in methods of other interfaces where it is necessary
9799 to specify a hard disk format, such as
9800 <link to="IVirtualBox::createHardDisk"/>.
9801 </desc>
9802 </attribute>
9803
9804 <attribute name="name" type="wstring" readonly="yes">
9805 <desc>
9806 Human readable description of this format.
9807
9808 Mainly for use in file open dialogs.
9809 </desc>
9810 </attribute>
9811
9812 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9813 <desc>
9814 Array of strings containing the supported file extensions.
9815
9816 The first extension in the array is the extension preferred by the
9817 backend. It is recommended to use this extension when specifying a
9818 location of the storage unit for a new hard disk.
9819
9820 Note that some backends do not work on files, so this array may be
9821 empty.
9822
9823 <see>IHardDiskFormat::capabilities</see>
9824 </desc>
9825 </attribute>
9826
9827 <attribute name="capabilities" type="unsigned long" readonly="yes">
9828 <desc>
9829 Capabilities of the format as a set of bit flags.
9830
9831 For the meaning of individual capability flags see
9832 <link to="HardDiskFormatCapabilities"/>.
9833 </desc>
9834 </attribute>
9835
9836 <method name="describeProperties">
9837 <desc>
9838 Returns several arrays describing the properties supported by this
9839 format.
9840
9841 An element with the given index in each array describes one
9842 property. Thus, the number of elements in each returned array is the
9843 same and corresponds to the number of supported properties.
9844
9845 The returned arrays are filled in only if the
9846 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9847 All arguments must be non-@c null.
9848
9849 <see>DataType</see>
9850 <see>DataFlags</see>
9851 </desc>
9852
9853 <param name="names" type="wstring" safearray="yes" dir="out">
9854 <desc>Array of property names.</desc>
9855 </param>
9856 <param name="description" type="wstring" safearray="yes" dir="out">
9857 <desc>Array of property descriptions.</desc>
9858 </param>
9859 <param name="types" type="DataType" safearray="yes" dir="out">
9860 <desc>Array of property types.</desc>
9861 </param>
9862 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9863 <desc>Array of property flags.</desc>
9864 </param>
9865 <param name="defaults" type="wstring" safearray="yes" dir="out">
9866 <desc>Array of default property values.</desc>
9867 </param>
9868 </method>
9869
9870 </interface>
9871
9872
9873 <!--
9874 // IFloppyImage
9875 /////////////////////////////////////////////////////////////////////////
9876 -->
9877
9878 <interface
9879 name="IFloppyImage" extends="IMedium"
9880 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9881 wsmap="managed"
9882 >
9883 <desc>
9884 The IFloppyImage interface represents a medium containing the image
9885 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9886 </desc>
9887
9888 </interface>
9889
9890
9891 <!--
9892 // IDVDImage
9893 /////////////////////////////////////////////////////////////////////////
9894 -->
9895
9896 <interface
9897 name="IDVDImage" extends="IMedium"
9898 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9899 wsmap="managed"
9900 >
9901 <desc>
9902 The IDVDImage interface represents a medium containing the image
9903 of a CD or DVD disk in the ISO format.
9904
9905 This is a subclass of <link to="IMedium" />; see remarks there.
9906 </desc>
9907
9908 </interface>
9909
9910
9911 <!--
9912 // IDVDDrive
9913 /////////////////////////////////////////////////////////////////////////
9914 -->
9915
9916 <interface
9917 name="IDVDDrive" extends="$unknown"
9918 uuid="156944d1-4c6d-4812-8f12-ab3890767ab4"
9919 wsmap="managed"
9920 >
9921 <desc>
9922 The IDVDDrive interface represents the virtual CD/DVD drive of the
9923 virtual machine. An object of this type is returned by
9924 <link to="IMachine::DVDDrive"/>.
9925 </desc>
9926
9927 <attribute name="state" type="DriveState" readonly="yes">
9928 <desc>Current drive state.</desc>
9929 </attribute>
9930
9931 <attribute name="passthrough" type="boolean">
9932 <desc>
9933 When a host drive is mounted and passthrough is enabled
9934 the guest OS will be able to directly send SCSI commands to
9935 the host drive. This enables the guest OS to use CD/DVD writers
9936 but is potentially dangerous.
9937 </desc>
9938 </attribute>
9939
9940 <method name="mountImage">
9941 <desc>Mounts a CD/DVD image with the specified UUID.
9942
9943 <result name="VBOX_E_FILE_ERROR">
9944 Invalid image file location.
9945 </result>
9946 <result name="VBOX_E_OBJECT_NOT_FOUND">
9947 Could not find a CD/DVD image matching @a imageId.
9948 </result>
9949 <result name="VBOX_E_INVALID_OBJECT_STATE">
9950 Invalid media state.
9951 </result>
9952
9953 </desc>
9954 <param name="imageId" type="wstring" dir="in"/>
9955 </method>
9956
9957 <method name="captureHostDrive">
9958 <desc>Captures the specified host CD/DVD drive.</desc>
9959 <param name="drive" type="IHostDVDDrive" dir="in"/>
9960 </method>
9961
9962 <method name="unmount">
9963 <desc>Unmounts the currently mounted image or host drive.</desc>
9964 </method>
9965
9966 <method name="getImage">
9967 <desc>Returns the currently mounted CD/DVD image.</desc>
9968 <param name="image" type="IDVDImage" dir="return"/>
9969 </method>
9970
9971 <method name="getHostDrive">
9972 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9973 <param name="drive" type="IHostDVDDrive" dir="return"/>
9974 </method>
9975
9976 </interface>
9977
9978
9979 <!--
9980 // IFloppyDrive
9981 /////////////////////////////////////////////////////////////////////////
9982 -->
9983
9984 <interface
9985 name="IFloppyDrive" extends="$unknown"
9986 uuid="a8676d38-5cf0-4b53-85b1-aa693611ab86"
9987 wsmap="managed"
9988 >
9989 <desc>
9990 The IFloppyDrive interface represents the virtual floppy drive of the
9991 virtual machine. An object of this type is returned by
9992 <link to="IMachine::floppyDrive" />.
9993 </desc>
9994
9995 <attribute name="enabled" type="boolean">
9996 <desc>
9997 Flag whether the floppy drive is enabled. If it is disabled,
9998 the floppy drive will not be reported to the guest OS.
9999 </desc>
10000 </attribute>
10001
10002 <attribute name="state" type="DriveState" readonly="yes">
10003 <desc>Current drive state.</desc>
10004 </attribute>
10005
10006 <method name="mountImage">
10007 <desc>Mounts a floppy image with the specified UUID.
10008
10009 <result name="VBOX_E_FILE_ERROR">
10010 Invalid image file location.
10011 </result>
10012 <result name="VBOX_E_OBJECT_NOT_FOUND">
10013 Could not find a floppy image matching @a imageID.
10014 </result>
10015 <result name="VBOX_E_INVALID_OBJECT_STATE">
10016 Invalid media state.
10017 </result>
10018
10019 </desc>
10020 <param name="imageId" type="wstring" dir="in"/>
10021 </method>
10022
10023 <method name="captureHostDrive">
10024 <desc>Captures the specified host floppy drive.</desc>
10025 <param name="drive" type="IHostFloppyDrive" dir="in"/>
10026 </method>
10027
10028 <method name="unmount">
10029 <desc>Unmounts the currently mounted image or host drive.</desc>
10030 </method>
10031
10032 <method name="getImage">
10033 <desc>Returns the currently mounted floppy image.</desc>
10034 <param name="image" type="IFloppyImage" dir="return"/>
10035 </method>
10036
10037 <method name="getHostDrive">
10038 <desc>Returns the currently mounted host floppy drive.</desc>
10039 <param name="drive" type="IHostFloppyDrive" dir="return"/>
10040 </method>
10041
10042 </interface>
10043
10044
10045 <!--
10046 // IKeyboard
10047 /////////////////////////////////////////////////////////////////////////
10048 -->
10049
10050 <interface
10051 name="IKeyboard" extends="$unknown"
10052 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10053 wsmap="managed"
10054 >
10055 <desc>
10056 The IKeyboard interface represents the virtual machine's keyboard. Used
10057 in <link to="IConsole::keyboard"/>.
10058
10059 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10060 to the virtual machine.
10061
10062 </desc>
10063 <method name="putScancode">
10064 <desc>Sends a scancode to the keyboard.
10065
10066 <result name="VBOX_E_IPRT_ERROR">
10067 Could not send scan code to virtual keyboard.
10068 </result>
10069
10070 </desc>
10071 <param name="scancode" type="long" dir="in"/>
10072 </method>
10073
10074 <method name="putScancodes">
10075 <desc>Sends an array of scancodes to the keyboard.
10076
10077 <result name="VBOX_E_IPRT_ERROR">
10078 Could not send all scan codes to virtual keyboard.
10079 </result>
10080
10081 </desc>
10082 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10083 <param name="codesStored" type="unsigned long" dir="return"/>
10084 </method>
10085
10086 <method name="putCAD">
10087 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10088 function is nothing special, it is just a convenience function
10089 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10090
10091 <result name="VBOX_E_IPRT_ERROR">
10092 Could not send all scan codes to virtual keyboard.
10093 </result>
10094
10095 </desc>
10096 </method>
10097
10098 </interface>
10099
10100
10101 <!--
10102 // IMouse
10103 /////////////////////////////////////////////////////////////////////////
10104 -->
10105
10106 <enum
10107 name="MouseButtonState"
10108 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
10109 >
10110 <desc>
10111 Mouse button state.
10112 </desc>
10113
10114 <const name="LeftButton" value="0x01"/>
10115 <const name="RightButton" value="0x02"/>
10116 <const name="MiddleButton" value="0x04"/>
10117 <const name="WheelUp" value="0x08"/>
10118 <const name="WheelDown" value="0x10"/>
10119 <const name="MouseStateMask" value="0x1F"/>
10120 </enum>
10121
10122 <interface
10123 name="IMouse" extends="$unknown"
10124 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
10125 wsmap="managed"
10126 >
10127 <desc>
10128 The IMouse interface represents the virtual machine's mouse. Used in
10129 <link to="IConsole::mouse"/>.
10130
10131 Through this interface, the virtual machine's virtual mouse can be
10132 controlled.
10133 </desc>
10134
10135 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10136 <desc>
10137 Whether the guest OS supports absolute mouse pointer positioning
10138 or not.
10139 <note>
10140 VirtualBox Guest Tools need to be installed to the guest OS
10141 in order to enable absolute mouse positioning support.
10142 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10143 callback to be instantly informed about changes of this attribute
10144 during virtual machine execution.
10145 </note>
10146 <see><link to="#putMouseEventAbsolute"/></see>
10147 </desc>
10148 </attribute>
10149
10150 <method name="putMouseEvent">
10151 <desc>
10152 Initiates a mouse event using relative pointer movements
10153 along x and y axis.
10154
10155 <result name="E_ACCESSDENIED">
10156 Console not powered up.
10157 </result>
10158 <result name="VBOX_E_IPRT_ERROR">
10159 Could not send mouse event to virtual mouse.
10160 </result>
10161
10162 </desc>
10163
10164 <param name="dx" type="long" dir="in">
10165 <desc>
10166 Amount of pixels the mouse should move to the right.
10167 Negative values move the mouse to the left.
10168 </desc>
10169 </param>
10170 <param name="dy" type="long" dir="in">
10171 <desc>
10172 Amount of pixels the mouse should move downwards.
10173 Negative values move the mouse upwards.
10174 </desc>
10175 </param>
10176 <param name="dz" type="long" dir="in">
10177 <desc>
10178 Amount of mouse wheel moves.
10179 Positive values describe clockwise wheel rotations,
10180 negative values describe counterclockwise rotations.
10181 </desc>
10182 </param>
10183 <param name="buttonState" type="long" dir="in">
10184 <desc>
10185 The current state of mouse buttons. Every bit represents
10186 a mouse button as follows:
10187 <table>
10188 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10189 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10190 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10191 </table>
10192 A value of <tt>1</tt> means the corresponding button is pressed.
10193 otherwise it is released.
10194 </desc>
10195 </param>
10196 </method>
10197
10198 <method name="putMouseEventAbsolute">
10199 <desc>
10200 Positions the mouse pointer using absolute x and y coordinates.
10201 These coordinates are expressed in pixels and
10202 start from <tt>[1,1]</tt> which corresponds to the top left
10203 corner of the virtual display.
10204
10205 <result name="E_ACCESSDENIED">
10206 Console not powered up.
10207 </result>
10208 <result name="VBOX_E_IPRT_ERROR">
10209 Could not send mouse event to virtual mouse.
10210 </result>
10211
10212 <note>
10213 This method will have effect only if absolute mouse
10214 positioning is supported by the guest OS.
10215 </note>
10216
10217 <see><link to="#absoluteSupported"/></see>
10218 </desc>
10219
10220 <param name="x" type="long" dir="in">
10221 <desc>
10222 X coordinate of the pointer in pixels, starting from @c 1.
10223 </desc>
10224 </param>
10225 <param name="y" type="long" dir="in">
10226 <desc>
10227 Y coordinate of the pointer in pixels, starting from @c 1.
10228 </desc>
10229 </param>
10230 <param name="dz" type="long" dir="in">
10231 <desc>
10232 Amount of mouse wheel moves.
10233 Positive values describe clockwise wheel rotations,
10234 negative values describe counterclockwise rotations.
10235 </desc>
10236 </param>
10237 <param name="buttonState" type="long" dir="in">
10238 <desc>
10239 The current state of mouse buttons. Every bit represents
10240 a mouse button as follows:
10241 <table>
10242 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10243 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10244 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10245 </table>
10246 A value of @c 1 means the corresponding button is pressed.
10247 otherwise it is released.
10248 </desc>
10249 </param>
10250 </method>
10251
10252 </interface>
10253
10254 <!--
10255 // IDisplay
10256 /////////////////////////////////////////////////////////////////////////
10257 -->
10258
10259 <enum
10260 name="FramebufferPixelFormat"
10261 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10262 >
10263 <desc>
10264 Format of the video memory buffer. Constants represented by this enum can
10265 be used to test for particular values of <link
10266 to="IFramebuffer::pixelFormat"/>. See also <link
10267 to="IFramebuffer::requestResize"/>.
10268
10269 See also www.fourcc.org for more information about FOURCC pixel formats.
10270 </desc>
10271
10272 <const name="Opaque" value="0">
10273 <desc>
10274 Unknown buffer format (the user may not assume any particular format of
10275 the buffer).
10276 </desc>
10277 </const>
10278 <const name="FOURCC_RGB" value="0x32424752">
10279 <desc>
10280 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10281 bit layout).
10282 </desc>
10283 </const>
10284 </enum>
10285
10286 <interface
10287 name="IFramebuffer" extends="$unknown"
10288 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10289 wsmap="suppress"
10290 >
10291 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10292 <desc>Address of the start byte of the frame buffer.</desc>
10293 </attribute>
10294
10295 <attribute name="width" type="unsigned long" readonly="yes">
10296 <desc>Frame buffer width, in pixels.</desc>
10297 </attribute>
10298
10299 <attribute name="height" type="unsigned long" readonly="yes">
10300 <desc>Frame buffer height, in pixels.</desc>
10301 </attribute>
10302
10303 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10304 <desc>
10305 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10306 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10307 are: 8, 15, 16, 24 and 32.
10308 </desc>
10309 </attribute>
10310
10311 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10312 <desc>
10313 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10314 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10315 size of the scan line must be aligned to 32 bits.
10316 </desc>
10317 </attribute>
10318
10319 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10320 <desc>
10321 Frame buffer pixel format. It's either one of the values defined by <link
10322 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10323 <note>
10324 This attribute must never return <link
10325 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10326 <link to="#address"/> points to must be always known.
10327 </note>
10328 </desc>
10329 </attribute>
10330
10331 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10332 <desc>
10333 Defines whether this frame buffer uses the virtual video card's memory
10334 buffer (guest VRAM) directly or not. See <link
10335 to="IFramebuffer::requestResize"/> for more information.
10336 </desc>
10337 </attribute>
10338
10339 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10340 <desc>
10341 Hint from the frame buffer about how much of the standard
10342 screen height it wants to use for itself. This information is
10343 exposed to the guest through the VESA BIOS and VMMDev interface
10344 so that it can use it for determining its video mode table. It
10345 is not guaranteed that the guest respects the value.
10346 </desc>
10347 </attribute>
10348
10349 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10350 <desc>
10351 An alpha-blended overlay which is superposed over the frame buffer.
10352 The initial purpose is to allow the display of icons providing
10353 information about the VM state, including disk activity, in front
10354 ends which do not have other means of doing that. The overlay is
10355 designed to controlled exclusively by IDisplay. It has no locking
10356 of its own, and any changes made to it are not guaranteed to be
10357 visible until the affected portion of IFramebuffer is updated. The
10358 overlay can be created lazily the first time it is requested. This
10359 attribute can also return @c null to signal that the overlay is not
10360 implemented.
10361 </desc>
10362 </attribute>
10363
10364 <attribute name="winId" type="unsigned long long" readonly="yes">
10365 <desc>
10366 Platform-dependent identifier of the window where context of this
10367 frame buffer is drawn, or zero if there's no such window.
10368 </desc>
10369 </attribute>
10370
10371 <method name="lock">
10372 <desc>
10373 Locks the frame buffer.
10374 Gets called by the IDisplay object where this frame buffer is
10375 bound to.
10376 </desc>
10377 </method>
10378
10379 <method name="unlock">
10380 <desc>
10381 Unlocks the frame buffer.
10382 Gets called by the IDisplay object where this frame buffer is
10383 bound to.
10384 </desc>
10385 </method>
10386
10387 <method name="notifyUpdate">
10388 <desc>
10389 Informs about an update.
10390 Gets called by the display object where this buffer is
10391 registered.
10392 </desc>
10393 <param name="x" type="unsigned long" dir="in"/>
10394 <param name="y" type="unsigned long" dir="in"/>
10395 <param name="width" type="unsigned long" dir="in"/>
10396 <param name="height" type="unsigned long" dir="in"/>
10397 </method>
10398
10399 <method name="requestResize">
10400 <desc>
10401 Requests a size and pixel format change.
10402
10403 There are two modes of working with the video buffer of the virtual
10404 machine. The <i>indirect</i> mode implies that the IFramebuffer
10405 implementation allocates a memory buffer for the requested display mode
10406 and provides it to the virtual machine. In <i>direct</i> mode, the
10407 IFramebuffer implementation uses the memory buffer allocated and owned
10408 by the virtual machine. This buffer represents the video memory of the
10409 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10410 usually faster because the implementation gets a raw pointer to the
10411 guest VRAM buffer which it can directly use for visualizing the contents
10412 of the virtual display, as opposed to the indirect mode where the
10413 contents of guest VRAM are copied to the memory buffer provided by
10414 the implementation every time a display update occurs.
10415
10416 It is important to note that the direct mode is really fast only when
10417 the implementation uses the given guest VRAM buffer directly, for
10418 example, by blitting it to the window representing the virtual machine's
10419 display, which saves at least one copy operation comparing to the
10420 indirect mode. However, using the guest VRAM buffer directly is not
10421 always possible: the format and the color depth of this buffer may be
10422 not supported by the target window, or it may be unknown (opaque) as in
10423 case of text or non-linear multi-plane VGA video modes. In this case,
10424 the indirect mode (that is always available) should be used as a
10425 fallback: when the guest VRAM contents are copied to the
10426 implementation-provided memory buffer, color and format conversion is
10427 done automatically by the underlying code.
10428
10429 The @a pixelFormat parameter defines whether the direct mode is
10430 available or not. If @a pixelFormat is <link
10431 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10432 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10433 @a bytesPerLine parameters must be ignored and the implementation must use
10434 the indirect mode (where it provides its own buffer in one of the
10435 supported formats). In all other cases, @a pixelFormat together with
10436 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10437 buffer pointed to by the @a VRAM parameter and the implementation is
10438 free to choose which mode to use. To indicate that this frame buffer uses
10439 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10440 attribute must return @c true and <link to="#address"/> must
10441 return exactly the same address that is passed in the @a VRAM parameter
10442 of this method; otherwise it is assumed that the indirect strategy is
10443 chosen.
10444
10445 The @a width and @a height parameters represent the size of the
10446 requested display mode in both modes. In case of indirect mode, the
10447 provided memory buffer should be big enough to store data of the given
10448 display mode. In case of direct mode, it is guaranteed that the given
10449 @a VRAM buffer contains enough space to represent the display mode of the
10450 given size. Note that this frame buffer's <link to="#width"/> and <link
10451 to="#height"/> attributes must return exactly the same values as
10452 passed to this method after the resize is completed (see below).
10453
10454 The @a finished output parameter determines if the implementation has
10455 finished resizing the frame buffer or not. If, for some reason, the
10456 resize cannot be finished immediately during this call, @a finished
10457 must be set to @c false, and the implementation must call
10458 <link to="IDisplay::resizeCompleted"/> after it has returned from
10459 this method as soon as possible. If @a finished is @c false, the
10460 machine will not call any frame buffer methods until
10461 <link to="IDisplay::resizeCompleted"/> is called.
10462
10463 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10464 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10465 this frame buffer must return exactly the same values as specified in the
10466 parameters of this method, after the resize is completed. If the
10467 indirect mode is chosen, these attributes must return values describing
10468 the format of the implementation's own memory buffer <link
10469 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10470 value must always correlate with <link to="#pixelFormat"/>. Note that
10471 the <link to="#pixelFormat"/> attribute must never return <link
10472 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10473
10474 <note>
10475 This method is called by the IDisplay object under the
10476 <link to="#lock"/> provided by this IFramebuffer
10477 implementation. If this method returns @c false in @a finished, then
10478 this lock is not released until
10479 <link to="IDisplay::resizeCompleted"/> is called.
10480 </note>
10481 </desc>
10482 <param name="screenId" type="unsigned long" dir="in">
10483 <desc>
10484 Logical screen number. Must be used in the corresponding call to
10485 <link to="IDisplay::resizeCompleted"/> if this call is made.
10486 </desc>
10487 </param>
10488 <param name="pixelFormat" type="unsigned long" dir="in">
10489 <desc>
10490 Pixel format of the memory buffer pointed to by @a VRAM.
10491 See also <link to="FramebufferPixelFormat"/>.
10492 </desc>
10493 </param>
10494 <param name="VRAM" type="octet" mod="ptr" dir="in">
10495 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10496 </param>
10497 <param name="bitsPerPixel" type="unsigned long" dir="in">
10498 <desc>Color depth, bits per pixel.</desc>
10499 </param>
10500 <param name="bytesPerLine" type="unsigned long" dir="in">
10501 <desc>Size of one scan line, in bytes.</desc>
10502 </param>
10503 <param name="width" type="unsigned long" dir="in">
10504 <desc>Width of the guest display, in pixels.</desc>
10505 </param>
10506 <param name="height" type="unsigned long" dir="in">
10507 <desc>Height of the guest display, in pixels.</desc>
10508 </param>
10509 <param name="finished" type="boolean" dir="return">
10510 <desc>
10511 Can the VM start using the new frame buffer immediately
10512 after this method returns or it should wait for
10513 <link to="IDisplay::resizeCompleted"/>.
10514 </desc>
10515 </param>
10516 </method>
10517
10518 <method name="videoModeSupported">
10519 <desc>
10520 Returns whether the frame buffer implementation is willing to
10521 support a given video mode. In case it is not able to render
10522 the video mode (or for some reason not willing), it should
10523 return @c false. Usually this method is called when the guest
10524 asks the VMM device whether a given video mode is supported
10525 so the information returned is directly exposed to the guest.
10526 It is important that this method returns very quickly.
10527 </desc>
10528 <param name="width" type="unsigned long" dir="in"/>
10529 <param name="height" type="unsigned long" dir="in"/>
10530 <param name="bpp" type="unsigned long" dir="in"/>
10531 <param name="supported" type="boolean" dir="return"/>
10532 </method>
10533
10534 <method name="getVisibleRegion">
10535 <desc>
10536 Returns the visible region of this frame buffer.
10537
10538 If the @a rectangles parameter is @c null then the value of the
10539 @a count parameter is ignored and the number of elements necessary to
10540 describe the current visible region is returned in @a countCopied.
10541
10542 If @a rectangles is not @c null but @a count is less
10543 than the required number of elements to store region data, the method
10544 will report a failure. If @a count is equal or greater than the
10545 required number of elements, then the actual number of elements copied
10546 to the provided array will be returned in @a countCopied.
10547
10548 <note>
10549 The address of the provided array must be in the process space of
10550 this IFramebuffer object.
10551 </note>
10552 <note>
10553 Method not yet implemented.
10554 </note>
10555 </desc>
10556 <param name="rectangles" type="octet" mod="ptr" dir="in">
10557 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10558 </param>
10559 <param name="count" type="unsigned long" dir="in">
10560 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10561 </param>
10562 <param name="countCopied" type="unsigned long" dir="return">
10563 <desc>Number of elements copied to the @a rectangles array.</desc>
10564 </param>
10565 </method>
10566
10567 <method name="setVisibleRegion">
10568 <desc>
10569 Suggests a new visible region to this frame buffer. This region
10570 represents the area of the VM display which is a union of regions of
10571 all top-level windows of the guest operating system running inside the
10572 VM (if the Guest Additions for this system support this
10573 functionality). This information may be used by the frontends to
10574 implement the seamless desktop integration feature.
10575
10576 <note>
10577 The address of the provided array must be in the process space of
10578 this IFramebuffer object.
10579 </note>
10580 <note>
10581 The IFramebuffer implementation must make a copy of the provided
10582 array of rectangles.
10583 </note>
10584 <note>
10585 Method not yet implemented.
10586 </note>
10587 </desc>
10588 <param name="rectangles" type="octet" mod="ptr" dir="in">
10589 <desc>Pointer to the @c RTRECT array.</desc>
10590 </param>
10591 <param name="count" type="unsigned long" dir="in">
10592 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10593 </param>
10594 </method>
10595
10596 <method name="processVHWACommand">
10597 <desc>
10598 Posts a Video HW Acceleration Command to the frame buffer for processing.
10599 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10600 are posted from quest to the host to be processed by the host hardware.
10601
10602 <note>
10603 The address of the provided command must be in the process space of
10604 this IFramebuffer object.
10605 </note>
10606 </desc>
10607
10608 <param name="command" type="octet" mod="ptr" dir="in">
10609 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10610 </param>
10611 </method>
10612
10613 </interface>
10614
10615 <interface
10616 name="IFramebufferOverlay" extends="IFramebuffer"
10617 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10618 wsmap="suppress"
10619 >
10620 <desc>
10621 The IFramebufferOverlay interface represents an alpha blended overlay
10622 for displaying status icons above an IFramebuffer. It is always created
10623 not visible, so that it must be explicitly shown. It only covers a
10624 portion of the IFramebuffer, determined by its width, height and
10625 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10626 that order) format, and may be written to directly. Do re-read the
10627 width though, after setting it, as it may be adjusted (increased) to
10628 make it more suitable for the front end.
10629 </desc>
10630 <attribute name="x" type="unsigned long" readonly="yes">
10631 <desc>X position of the overlay, relative to the frame buffer.</desc>
10632 </attribute>
10633
10634 <attribute name="y" type="unsigned long" readonly="yes">
10635 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10636 </attribute>
10637
10638 <attribute name="visible" type="boolean" readonly="no">
10639 <desc>
10640 Whether the overlay is currently visible.
10641 </desc>
10642 </attribute>
10643
10644 <attribute name="alpha" type="unsigned long" readonly="no">
10645 <desc>
10646 The global alpha value for the overlay. This may or may not be
10647 supported by a given front end.
10648 </desc>
10649 </attribute>
10650
10651 <method name="move">
10652 <desc>
10653 Changes the overlay's position relative to the IFramebuffer.
10654 </desc>
10655 <param name="x" type="unsigned long" dir="in"/>
10656 <param name="y" type="unsigned long" dir="in"/>
10657 </method>
10658
10659 </interface>
10660
10661 <interface
10662 name="IDisplay" extends="$unknown"
10663 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10664 wsmap="managed"
10665 >
10666 <desc>
10667 The IDisplay interface represents the virtual machine's display.
10668
10669 The object implementing this interface is contained in each
10670 <link to="IConsole::display"/> attribute and represents the visual
10671 output of the virtual machine.
10672
10673 The virtual display supports pluggable output targets represented by the
10674 IFramebuffer interface. Examples of the output target are a window on
10675 the host computer or an RDP session's display on a remote computer.
10676 </desc>
10677 <attribute name="width" type="unsigned long" readonly="yes">
10678 <desc>Current display width.</desc>
10679 </attribute>
10680
10681 <attribute name="height" type="unsigned long" readonly="yes">
10682 <desc>Current display height.</desc>
10683 </attribute>
10684
10685 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10686 <desc>
10687 Current guest display color depth. Note that this may differ
10688 from <link to="IFramebuffer::bitsPerPixel"/>.
10689 </desc>
10690 </attribute>
10691
10692 <method name="setFramebuffer">
10693 <desc>
10694 Sets the framebuffer for given screen.
10695 </desc>
10696 <param name="screenId" type="unsigned long" dir="in"/>
10697 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10698 </method>
10699
10700 <method name="getFramebuffer">
10701 <desc>
10702 Queries the framebuffer for given screen.
10703 </desc>
10704 <param name="screenId" type="unsigned long" dir="in"/>
10705 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10706 <param name="xOrigin" type="long" dir="out"/>
10707 <param name="yOrigin" type="long" dir="out"/>
10708 </method>
10709
10710 <method name="setVideoModeHint">
10711 <desc>
10712 Asks VirtualBox to request the given video mode from
10713 the guest. This is just a hint and it cannot be guaranteed
10714 that the requested resolution will be used. Guest Additions
10715 are required for the request to be seen by guests. The caller
10716 should issue the request and wait for a resolution change and
10717 after a timeout retry.
10718
10719 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10720 parameters means that the corresponding values should be taken from the
10721 current video mode (i.e. left unchanged).
10722
10723 If the guest OS supports multi-monitor configuration then the @a display
10724 parameter specifies the number of the guest display to send the hint to:
10725 @c 0 is the primary display, @c 1 is the first secondary and
10726 so on. If the multi-monitor configuration is not supported, @a display
10727 must be @c 0.
10728
10729 <result name="E_INVALIDARG">
10730 The @a display is not associated with any monitor.
10731 </result>
10732
10733 </desc>
10734 <param name="width" type="unsigned long" dir="in"/>
10735 <param name="height" type="unsigned long" dir="in"/>
10736 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10737 <param name="display" type="unsigned long" dir="in"/>
10738 </method>
10739
10740 <method name="setSeamlessMode">
10741 <desc>
10742 Enables or disables seamless guest display rendering (seamless desktop
10743 integration) mode.
10744 <note>
10745 Calling this method has no effect if <link
10746 to="IGuest::supportsSeamless"/> returns @c false.
10747 </note>
10748 </desc>
10749 <param name="enabled" type="boolean" dir="in"/>
10750 </method>
10751
10752 <method name="takeScreenShot">
10753 <desc>
10754 Takes a screen shot of the requested size and copies it to the
10755 32-bpp buffer allocated by the caller and pointed to by @a address.
10756
10757 <note>This API can be used only by the COM/XPCOM C++ API as it
10758 requires pointer support. Use <link to="#takeScreenShotSlow" />
10759 with other language bindings.
10760 </note>
10761
10762 <result name="E_NOTIMPL">
10763 Feature not implemented.
10764 </result>
10765 <result name="VBOX_E_IPRT_ERROR">
10766 Could not take a screenshot.
10767 </result>
10768
10769 </desc>
10770 <param name="address" type="octet" mod="ptr" dir="in"/>
10771 <param name="width" type="unsigned long" dir="in"/>
10772 <param name="height" type="unsigned long" dir="in"/>
10773 </method>
10774
10775 <method name="takeScreenShotSlow">
10776 <desc>
10777 Takes a guest screen shot of the requested size and returns it as
10778 an array of bytes in uncompressed 32-bit ARGB format.
10779 This API is slow, but could be the only option to get guest screenshot
10780 for scriptable languages not allowed to manipulate with addresses
10781 directly.
10782
10783 <result name="E_NOTIMPL">
10784 Feature not implemented.
10785 </result>
10786 <result name="VBOX_E_IPRT_ERROR">
10787 Could not take a screenshot.
10788 </result>
10789 </desc>
10790 <param name="width" type="unsigned long" dir="in">
10791 <desc>
10792 Desired image width.
10793 </desc>
10794 </param>
10795 <param name="height" type="unsigned long" dir="in">
10796 <desc>
10797 Desired image height.
10798 </desc>
10799 </param>
10800 <param name="screenData" type="octet" dir="return" safearray="yes">
10801 <desc>
10802 Array with resulting screen data.
10803 </desc>
10804 </param>
10805 </method>
10806
10807 <method name="drawToScreen">
10808 <desc>
10809 Draws a 32-bpp image of the specified size from the given buffer
10810 to the given point on the VM display.
10811
10812 <result name="E_NOTIMPL">
10813 Feature not implemented.
10814 </result>
10815 <result name="VBOX_E_IPRT_ERROR">
10816 Could not draw to screen.
10817 </result>
10818
10819 </desc>
10820 <param name="address" type="octet" mod="ptr" dir="in"/>
10821 <param name="x" type="unsigned long" dir="in"/>
10822 <param name="y" type="unsigned long" dir="in"/>
10823 <param name="width" type="unsigned long" dir="in"/>
10824 <param name="height" type="unsigned long" dir="in"/>
10825 </method>
10826
10827 <method name="invalidateAndUpdate">
10828 <desc>
10829 Does a full invalidation of the VM display and instructs the VM
10830 to update it.
10831
10832 <result name="VBOX_E_IPRT_ERROR">
10833 Could not invalidate and update screen.
10834 </result>
10835
10836 </desc>
10837 </method>
10838
10839 <method name="resizeCompleted">
10840 <desc>
10841 Signals that a framebuffer has completed the resize operation.
10842
10843 <result name="VBOX_E_NOT_SUPPORTED">
10844 Operation only valid for external frame buffers.
10845 </result>
10846
10847 </desc>
10848 <param name="screenId" type="unsigned long" dir="in"/>
10849 </method>
10850
10851 <method name="updateCompleted">
10852 <desc>
10853 Signals that a framebuffer has completed the update operation.
10854
10855 <result name="VBOX_E_NOT_SUPPORTED">
10856 Operation only valid for external frame buffers.
10857 </result>
10858
10859 </desc>
10860 </method>
10861
10862 <method name="completeVHWACommand">
10863 <desc>
10864 Signals that the Video HW Acceleration command has completed.
10865 </desc>
10866
10867 <param name="command" type="octet" mod="ptr" dir="in">
10868 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10869 </param>
10870 </method>
10871
10872 </interface>
10873
10874 <!--
10875 // INetworkAdapter
10876 /////////////////////////////////////////////////////////////////////////
10877 -->
10878
10879 <enum
10880 name="NetworkAttachmentType"
10881 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10882 >
10883 <desc>
10884 Network attachment type.
10885 </desc>
10886
10887 <const name="Null" value="0">
10888 <desc>Null value, also means "not attached".</desc>
10889 </const>
10890 <const name="NAT" value="1"/>
10891 <const name="Bridged" value="2"/>
10892 <const name="Internal" value="3"/>
10893 <const name="HostOnly" value="4"/>
10894 </enum>
10895
10896 <enum
10897 name="NetworkAdapterType"
10898 uuid="50c3dfd8-07ac-4a31-baac-519c828fbf97"
10899 >
10900 <desc>
10901 Network adapter type.
10902 </desc>
10903
10904 <const name="Null" value="0">
10905 <desc>Null value (never used by the API).</desc>
10906 </const>
10907 <const name="Am79C970A" value="1">
10908 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10909 </const>
10910 <const name="Am79C973" value="2">
10911 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10912 </const>
10913 <const name="I82540EM" value="3">
10914 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10915 </const>
10916 <const name="I82543GC" value="4">
10917 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10918 </const>
10919 <const name="I82545EM" value="5">
10920 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10921 </const>
10922 </enum>
10923
10924 <interface
10925 name="INetworkAdapter" extends="$unknown"
10926 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10927 wsmap="managed"
10928 >
10929 <desc>
10930 Represents a virtual network adapter that is attached to a virtual machine.
10931 Each virtual machine has a fixed number of network adapter slots with one
10932 instance of this attached to each of them. Call
10933 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10934 is attached to a given slot in a given machine.
10935
10936 Each network adapter can be in one of five attachment modes, which are
10937 represented by the <link to="NetworkAttachmentType" /> enumeration;
10938 see the <link to="#attachmentType" /> attribute.
10939 </desc>
10940
10941 <attribute name="adapterType" type="NetworkAdapterType">
10942 <desc>
10943 Type of the virtual network adapter. Depending on this value,
10944 VirtualBox will provide a different virtual network hardware
10945 to the guest.
10946 </desc>
10947 </attribute>
10948
10949 <attribute name="slot" type="unsigned long" readonly="yes">
10950 <desc>
10951 Slot number this adapter is plugged into. Corresponds to
10952 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10953 to obtain this instance.
10954 </desc>
10955 </attribute>
10956
10957 <attribute name="enabled" type="boolean">
10958 <desc>
10959 Flag whether the network adapter is present in the
10960 guest system. If disabled, the virtual guest hardware will
10961 not contain this network adapter. Can only be changed when
10962 the VM is not running.
10963 </desc>
10964 </attribute>
10965
10966 <attribute name="MACAddress" type="wstring">
10967 <desc>
10968 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10969 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10970 </desc>
10971 </attribute>
10972
10973 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10974
10975 <attribute name="hostInterface" type="wstring">
10976 <desc>
10977 Name of the host network interface the VM is attached to.
10978 </desc>
10979 </attribute>
10980
10981 <attribute name="internalNetwork" type="wstring">
10982 <desc>
10983 Name of the internal network the VM is attached to.
10984 </desc>
10985 </attribute>
10986
10987 <attribute name="NATNetwork" type="wstring">
10988 <desc>
10989 Name of the NAT network the VM is attached to.
10990 </desc>
10991 </attribute>
10992
10993 <attribute name="cableConnected" type="boolean">
10994 <desc>
10995 Flag whether the adapter reports the cable as connected or not.
10996 It can be used to report offline situations to a VM.
10997 </desc>
10998 </attribute>
10999
11000 <attribute name="lineSpeed" type="unsigned long">
11001 <desc>
11002 Line speed reported by custom drivers, in units of 1 kbps.
11003 </desc>
11004 </attribute>
11005
11006 <attribute name="traceEnabled" type="boolean">
11007 <desc>
11008 Flag whether network traffic from/to the network card should be traced.
11009 Can only be toggled when the VM is turned off.
11010 </desc>
11011 </attribute>
11012
11013 <attribute name="traceFile" type="wstring">
11014 <desc>
11015 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11016 will be used.
11017 </desc>
11018 </attribute>
11019
11020 <method name="attachToNAT">
11021 <desc>
11022 Attach the network adapter to the Network Address Translation (NAT) interface.
11023 </desc>
11024 </method>
11025
11026 <method name="attachToBridgedInterface">
11027 <desc>
11028 Attach the network adapter to a bridged host interface.
11029 </desc>
11030 </method>
11031
11032 <method name="attachToInternalNetwork">
11033 <desc>
11034 Attach the network adapter to an internal network.
11035 </desc>
11036 </method>
11037
11038 <method name="attachToHostOnlyInterface">
11039 <desc>
11040 Attach the network adapter to the host-only network.
11041 </desc>
11042 </method>
11043
11044 <method name="detach">
11045 <desc>
11046 Detach the network adapter
11047 </desc>
11048 </method>
11049 </interface>
11050
11051
11052 <!--
11053 // ISerialPort
11054 /////////////////////////////////////////////////////////////////////////
11055 -->
11056
11057 <enum
11058 name="PortMode"
11059 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11060 >
11061 <desc>
11062 The PortMode enumeration represents possible communication modes for
11063 the virtual serial port device.
11064 </desc>
11065
11066 <const name="Disconnected" value="0">
11067 <desc>Virtual device is not attached to any real host device.</desc>
11068 </const>
11069 <const name="HostPipe" value="1">
11070 <desc>Virtual device is attached to a host pipe.</desc>
11071 </const>
11072 <const name="HostDevice" value="2">
11073 <desc>Virtual device is attached to a host device.</desc>
11074 </const>
11075 <const name="RawFile" value="3">
11076 <desc>Virtual device is attached to a raw file.</desc>
11077 </const>
11078 </enum>
11079
11080 <interface
11081 name="ISerialPort" extends="$unknown"
11082 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11083 wsmap="managed"
11084 >
11085
11086 <desc>
11087 The ISerialPort interface represents the virtual serial port device.
11088
11089 The virtual serial port device acts like an ordinary serial port
11090 inside the virtual machine. This device communicates to the real
11091 serial port hardware in one of two modes: host pipe or host device.
11092
11093 In host pipe mode, the #path attribute specifies the path to the pipe on
11094 the host computer that represents a serial port. The #server attribute
11095 determines if this pipe is created by the virtual machine process at
11096 machine startup or it must already exist before starting machine
11097 execution.
11098
11099 In host device mode, the #path attribute specifies the name of the
11100 serial port device on the host computer.
11101
11102 There is also a third communication mode: the disconnected mode. In this
11103 mode, the guest OS running inside the virtual machine will be able to
11104 detect the serial port, but all port write operations will be discarded
11105 and all port read operations will return no data.
11106
11107 <see>IMachine::getSerialPort</see>
11108 </desc>
11109
11110 <attribute name="slot" type="unsigned long" readonly="yes">
11111 <desc>
11112 Slot number this serial port is plugged into. Corresponds to
11113 the value you pass to <link to="IMachine::getSerialPort"/>
11114 to obtain this instance.
11115 </desc>
11116 </attribute>
11117
11118 <attribute name="enabled" type="boolean">
11119 <desc>
11120 Flag whether the serial port is enabled. If disabled,
11121 the serial port will not be reported to the guest OS.
11122 </desc>
11123 </attribute>
11124
11125 <attribute name="IOBase" type="unsigned long">
11126 <desc>Base I/O address of the serial port.</desc>
11127 </attribute>
11128
11129 <attribute name="IRQ" type="unsigned long">
11130 <desc>IRQ number of the serial port.</desc>
11131 </attribute>
11132
11133 <attribute name="hostMode" type="PortMode">
11134 <desc>
11135 How is this port connected to the host.
11136 <note>
11137 Changing this attribute may fail if the conditions for
11138 <link to="#path"/> are not met.
11139 </note>
11140 </desc>
11141 </attribute>
11142
11143 <attribute name="server" type="boolean">
11144 <desc>
11145 Flag whether this serial port acts as a server (creates a new pipe on
11146 the host) or as a client (uses the existing pipe). This attribute is
11147 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11148 </desc>
11149 </attribute>
11150
11151 <attribute name="path" type="wstring">
11152 <desc>
11153 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11154 PortMode_HostPipe, or the host serial device name when
11155 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11156 cases, setting a @c null or empty string as the attribute's value
11157 is an error. Otherwise, the value of this property is ignored.
11158 </desc>
11159 </attribute>
11160
11161 </interface>
11162
11163 <!--
11164 // IParallelPort
11165 /////////////////////////////////////////////////////////////////////////
11166 -->
11167
11168 <interface
11169 name="IParallelPort" extends="$unknown"
11170 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11171 wsmap="managed"
11172 >
11173
11174 <desc>
11175 The IParallelPort interface represents the virtual parallel port device.
11176
11177 The virtual parallel port device acts like an ordinary parallel port
11178 inside the virtual machine. This device communicates to the real
11179 parallel port hardware using the name of the parallel device on the host
11180 computer specified in the #path attribute.
11181
11182 Each virtual parallel port device is assigned a base I/O address and an
11183 IRQ number that will be reported to the guest operating system and used
11184 to operate the given parallel port from within the virtual machine.
11185
11186 <see>IMachine::getParallelPort</see>
11187 </desc>
11188
11189 <attribute name="slot" type="unsigned long" readonly="yes">
11190 <desc>
11191 Slot number this parallel port is plugged into. Corresponds to
11192 the value you pass to <link to="IMachine::getParallelPort"/>
11193 to obtain this instance.
11194 </desc>
11195 </attribute>
11196
11197 <attribute name="enabled" type="boolean">
11198 <desc>
11199 Flag whether the parallel port is enabled. If disabled,
11200 the parallel port will not be reported to the guest OS.
11201 </desc>
11202 </attribute>
11203
11204 <attribute name="IOBase" type="unsigned long">
11205 <desc>Base I/O address of the parallel port.</desc>
11206 </attribute>
11207
11208 <attribute name="IRQ" type="unsigned long">
11209 <desc>IRQ number of the parallel port.</desc>
11210 </attribute>
11211
11212 <attribute name="path" type="wstring">
11213 <desc>
11214 Host parallel device name. If this parallel port is enabled, setting a
11215 @c null or an empty string as this attribute's value will result into
11216 an error.
11217 </desc>
11218 </attribute>
11219
11220 </interface>
11221
11222
11223 <!--
11224 // IMachineDebugger
11225 /////////////////////////////////////////////////////////////////////////
11226 -->
11227
11228 <interface
11229 name="IMachineDebugger" extends="$unknown"
11230 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11231 wsmap="suppress"
11232 >
11233 <method name="resetStats">
11234 <desc>
11235 Reset VM statistics.
11236 </desc>
11237 <param name="pattern" type="wstring" dir="in">
11238 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11239 </param>
11240 </method>
11241
11242 <method name="dumpStats">
11243 <desc>
11244 Dumps VM statistics.
11245 </desc>
11246 <param name="pattern" type="wstring" dir="in">
11247 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11248 </param>
11249 </method>
11250
11251 <method name="getStats">
11252 <desc>
11253 Get the VM statistics in a XMLish format.
11254 </desc>
11255 <param name="pattern" type="wstring" dir="in">
11256 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11257 </param>
11258 <param name="withDescriptions" type="boolean" dir="in">
11259 <desc>Whether to include the descriptions.</desc>
11260 </param>
11261 <param name="stats" type="wstring" dir="out">
11262 <desc>The XML document containing the statistics.</desc>
11263 </param>
11264 </method>
11265
11266 <method name="injectNMI">
11267 <desc>
11268 Inject an NMI into a running VT-x/AMD-V VM.
11269 </desc>
11270 </method>
11271
11272 <attribute name="singlestep" type="boolean">
11273 <desc>Switch for enabling singlestepping.</desc>
11274 </attribute>
11275
11276 <attribute name="recompileUser" type="boolean">
11277 <desc>Switch for forcing code recompilation for user mode code.</desc>
11278 </attribute>
11279
11280 <attribute name="recompileSupervisor" type="boolean">
11281 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11282 </attribute>
11283
11284 <attribute name="PATMEnabled" type="boolean">
11285 <desc>Switch for enabling and disabling the PATM component.</desc>
11286 </attribute>
11287
11288 <attribute name="CSAMEnabled" type="boolean">
11289 <desc>Switch for enabling and disabling the CSAM component.</desc>
11290 </attribute>
11291
11292 <attribute name="logEnabled" type="boolean">
11293 <desc>Switch for enabling and disabling logging.</desc>
11294 </attribute>
11295
11296 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11297 <desc>
11298 Flag indicating whether the VM is currently making use of CPU hardware
11299 virtualization extensions.
11300 </desc>
11301 </attribute>
11302
11303 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11304 <desc>
11305 Flag indicating whether the VM is currently making use of the nested paging
11306 CPU hardware virtualization extension.
11307 </desc>
11308 </attribute>
11309
11310 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11311 <desc>
11312 Flag indicating whether the VM is currently making use of the VPID
11313 VT-x extension.
11314 </desc>
11315 </attribute>
11316
11317 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11318 <desc>
11319 Flag indicating whether the VM is currently making use of the Physical
11320 Address Extension CPU feature.
11321 </desc>
11322 </attribute>
11323
11324 <attribute name="virtualTimeRate" type="unsigned long">
11325 <desc>
11326 The rate at which the virtual time runs expressed as a percentage.
11327 The accepted range is 2% to 20000%.
11328 </desc>
11329 </attribute>
11330
11331 <!-- @todo method for setting log flags, groups and destination! -->
11332
11333 <attribute name="VM" type="unsigned long long" readonly="yes">
11334 <desc>
11335 Gets the VM handle. This is only for internal use while
11336 we carve the details of this interface.
11337 </desc>
11338 </attribute>
11339
11340 </interface>
11341
11342 <!--
11343 // IUSBController
11344 /////////////////////////////////////////////////////////////////////////
11345 -->
11346
11347 <interface
11348 name="IUSBController" extends="$unknown"
11349 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11350 wsmap="managed"
11351 >
11352 <attribute name="enabled" type="boolean">
11353 <desc>
11354 Flag whether the USB controller is present in the
11355 guest system. If disabled, the virtual guest hardware will
11356 not contain any USB controller. Can only be changed when
11357 the VM is powered off.
11358 </desc>
11359 </attribute>
11360
11361 <attribute name="enabledEhci" type="boolean">
11362 <desc>
11363 Flag whether the USB EHCI controller is present in the
11364 guest system. If disabled, the virtual guest hardware will
11365 not contain a USB EHCI controller. Can only be changed when
11366 the VM is powered off.
11367 </desc>
11368 </attribute>
11369
11370 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11371 <desc>
11372 USB standard version which the controller implements.
11373 This is a BCD which means that the major version is in the
11374 high byte and minor version is in the low byte.
11375 </desc>
11376 </attribute>
11377
11378 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11379 <desc>
11380 List of USB device filters associated with the machine.
11381
11382 If the machine is currently running, these filters are activated
11383 every time a new (supported) USB device is attached to the host
11384 computer that was not ignored by global filters
11385 (<link to="IHost::USBDeviceFilters"/>).
11386
11387 These filters are also activated when the machine is powered up.
11388 They are run against a list of all currently available USB
11389 devices (in states
11390 <link to="USBDeviceState_Available"/>,
11391 <link to="USBDeviceState_Busy"/>,
11392 <link to="USBDeviceState_Held"/>) that were not previously
11393 ignored by global filters.
11394
11395 If at least one filter matches the USB device in question, this
11396 device is automatically captured (attached to) the virtual USB
11397 controller of this machine.
11398
11399 <see>IUSBDeviceFilter, ::IUSBController</see>
11400 </desc>
11401 </attribute>
11402
11403 <method name="createDeviceFilter">
11404 <desc>
11405 Creates a new USB device filter. All attributes except
11406 the filter name are set to empty (any match),
11407 <i>active</i> is @c false (the filter is not active).
11408
11409 The created filter can then be added to the list of filters using
11410 <link to="#insertDeviceFilter"/>.
11411
11412 <result name="VBOX_E_INVALID_VM_STATE">
11413 The virtual machine is not mutable.
11414 </result>
11415
11416 <see>#deviceFilters</see>
11417 </desc>
11418 <param name="name" type="wstring" dir="in">
11419 <desc>
11420 Filter name. See <link to="IUSBDeviceFilter::name"/>
11421 for more info.
11422 </desc>
11423 </param>
11424 <param name="filter" type="IUSBDeviceFilter" dir="return">
11425 <desc>Created filter object.</desc>
11426 </param>
11427 </method>
11428
11429 <method name="insertDeviceFilter">
11430 <desc>
11431 Inserts the given USB device to the specified position
11432 in the list of filters.
11433
11434 Positions are numbered starting from <tt>0</tt>. If the specified
11435 position is equal to or greater than the number of elements in
11436 the list, the filter is added to the end of the collection.
11437
11438 <note>
11439 Duplicates are not allowed, so an attempt to insert a
11440 filter that is already in the collection, will return an
11441 error.
11442 </note>
11443
11444 <result name="VBOX_E_INVALID_VM_STATE">
11445 Virtual machine is not mutable.
11446 </result>
11447 <result name="E_INVALIDARG">
11448 USB device filter not created within this VirtualBox instance.
11449 </result>
11450 <result name="VBOX_E_INVALID_OBJECT_STATE">
11451 USB device filter already in list.
11452 </result>
11453
11454 <see>#deviceFilters</see>
11455 </desc>
11456 <param name="position" type="unsigned long" dir="in">
11457 <desc>Position to insert the filter to.</desc>
11458 </param>
11459 <param name="filter" type="IUSBDeviceFilter" dir="in">
11460 <desc>USB device filter to insert.</desc>
11461 </param>
11462 </method>
11463
11464 <method name="removeDeviceFilter">
11465 <desc>
11466 Removes a USB device filter from the specified position in the
11467 list of filters.
11468
11469 Positions are numbered starting from <tt>0</tt>. Specifying a
11470 position equal to or greater than the number of elements in
11471 the list will produce an error.
11472
11473 <see>#deviceFilters</see>
11474
11475 <result name="VBOX_E_INVALID_VM_STATE">
11476 Virtual machine is not mutable.
11477 </result>
11478 <result name="E_INVALIDARG">
11479 USB device filter list empty or invalid @a position.
11480 </result>
11481
11482 </desc>
11483 <param name="position" type="unsigned long" dir="in">
11484 <desc>Position to remove the filter from.</desc>
11485 </param>
11486 <param name="filter" type="IUSBDeviceFilter" dir="return">
11487 <desc>Removed USB device filter.</desc>
11488 </param>
11489 </method>
11490
11491 </interface>
11492
11493
11494 <!--
11495 // IUSBDevice
11496 /////////////////////////////////////////////////////////////////////////
11497 -->
11498
11499 <interface
11500 name="IUSBDevice" extends="$unknown"
11501 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11502 wsmap="managed"
11503 >
11504 <desc>
11505 The IUSBDevice interface represents a virtual USB device attached to the
11506 virtual machine.
11507
11508 A collection of objects implementing this interface is stored in the
11509 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11510 attached to a running virtual machine's USB controller.
11511 </desc>
11512
11513 <attribute name="id" type="wstring" readonly="yes">
11514 <desc>
11515 Unique USB device ID. This ID is built from #vendorId,
11516 #productId, #revision and #serialNumber.
11517 </desc>
11518 </attribute>
11519
11520 <attribute name="vendorId" type="unsigned short" readonly="yes">
11521 <desc>Vendor ID.</desc>
11522 </attribute>
11523
11524 <attribute name="productId" type="unsigned short" readonly="yes">
11525 <desc>Product ID.</desc>
11526 </attribute>
11527
11528 <attribute name="revision" type="unsigned short" readonly="yes">
11529 <desc>
11530 Product revision number. This is a packed BCD represented as
11531 unsigned short. The high byte is the integer part and the low
11532 byte is the decimal.
11533 </desc>
11534 </attribute>
11535
11536 <attribute name="manufacturer" type="wstring" readonly="yes">
11537 <desc>Manufacturer string.</desc>
11538 </attribute>
11539
11540 <attribute name="product" type="wstring" readonly="yes">
11541 <desc>Product string.</desc>
11542 </attribute>
11543
11544 <attribute name="serialNumber" type="wstring" readonly="yes">
11545 <desc>Serial number string.</desc>
11546 </attribute>
11547
11548 <attribute name="address" type="wstring" readonly="yes">
11549 <desc>Host specific address of the device.</desc>
11550 </attribute>
11551
11552 <attribute name="port" type="unsigned short" readonly="yes">
11553 <desc>
11554 Host USB port number the device is physically
11555 connected to.
11556 </desc>
11557 </attribute>
11558
11559 <attribute name="version" type="unsigned short" readonly="yes">
11560 <desc>
11561 The major USB version of the device - 1 or 2.
11562 </desc>
11563 </attribute>
11564
11565 <attribute name="portVersion" type="unsigned short" readonly="yes">
11566 <desc>
11567 The major USB version of the host USB port the device is
11568 physically connected to - 1 or 2. For devices not connected to
11569 anything this will have the same value as the version attribute.
11570 </desc>
11571 </attribute>
11572
11573 <attribute name="remote" type="boolean" readonly="yes">
11574 <desc>
11575 Whether the device is physically connected to a remote VRDP
11576 client or to a local host machine.
11577 </desc>
11578 </attribute>
11579
11580 </interface>
11581
11582
11583 <!--
11584 // IUSBDeviceFilter
11585 /////////////////////////////////////////////////////////////////////////
11586 -->
11587
11588 <interface
11589 name="IUSBDeviceFilter" extends="$unknown"
11590 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11591 wsmap="managed"
11592 >
11593 <desc>
11594 The IUSBDeviceFilter interface represents an USB device filter used
11595 to perform actions on a group of USB devices.
11596
11597 This type of filters is used by running virtual machines to
11598 automatically capture selected USB devices once they are physically
11599 attached to the host computer.
11600
11601 A USB device is matched to the given device filter if and only if all
11602 attributes of the device match the corresponding attributes of the
11603 filter (that is, attributes are joined together using the logical AND
11604 operation). On the other hand, all together, filters in the list of
11605 filters carry the semantics of the logical OR operation. So if it is
11606 desirable to create a match like "this vendor id OR this product id",
11607 one needs to create two filters and specify "any match" (see below)
11608 for unused attributes.
11609
11610 All filter attributes used for matching are strings. Each string
11611 is an expression representing a set of values of the corresponding
11612 device attribute, that will match the given filter. Currently, the
11613 following filtering expressions are supported:
11614
11615 <ul>
11616 <li><i>Interval filters</i>. Used to specify valid intervals for
11617 integer device attributes (Vendor ID, Product ID and Revision).
11618 The format of the string is:
11619
11620 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11621
11622 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11623 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11624 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11625 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11626 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11627 possible integer is assumed.
11628 </li>
11629 <li><i>Boolean filters</i>. Used to specify acceptable values for
11630 boolean device attributes. The format of the string is:
11631
11632 <tt>true|false|yes|no|0|1</tt>
11633
11634 </li>
11635 <li><i>Exact match</i>. Used to specify a single value for the given
11636 device attribute. Any string that doesn't start with <tt>int:</tt>
11637 represents the exact match. String device attributes are compared to
11638 this string including case of symbols. Integer attributes are first
11639 converted to a string (see individual filter attributes) and then
11640 compared ignoring case.
11641
11642 </li>
11643 <li><i>Any match</i>. Any value of the corresponding device attribute
11644 will match the given filter. An empty or @c null string is
11645 used to construct this type of filtering expressions.
11646
11647 </li>
11648 </ul>
11649
11650 <note>
11651 On the Windows host platform, interval filters are not currently
11652 available. Also all string filter attributes
11653 (<link to="#manufacturer"/>, <link to="#product"/>,
11654 <link to="#serialNumber"/>) are ignored, so they behave as
11655 <i>any match</i> no matter what string expression is specified.
11656 </note>
11657
11658 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11659 </desc>
11660
11661 <attribute name="name" type="wstring">
11662 <desc>
11663 Visible name for this filter.
11664 This name is used to visually distinguish one filter from another,
11665 so it can neither be @c null nor an empty string.
11666 </desc>
11667 </attribute>
11668
11669 <attribute name="active" type="boolean">
11670 <desc>Whether this filter active or has been temporarily disabled.</desc>
11671 </attribute>
11672
11673 <attribute name="vendorId" type="wstring">
11674 <desc>
11675 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11676 The string representation for the <i>exact matching</i>
11677 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11678 (including leading zeroes).
11679 </desc>
11680 </attribute>
11681
11682 <attribute name="productId" type="wstring">
11683 <desc>
11684 <link to="IUSBDevice::productId">Product ID</link> filter.
11685 The string representation for the <i>exact matching</i>
11686 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11687 (including leading zeroes).
11688 </desc>
11689 </attribute>
11690
11691 <attribute name="revision" type="wstring">
11692 <desc>
11693 <link to="IUSBDevice::productId">Product revision number</link>
11694 filter. The string representation for the <i>exact matching</i>
11695 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11696 of the integer part of the revision, and <tt>F</tt> is the
11697 decimal digit of its fractional part (including leading and
11698 trailing zeros).
11699 Note that for interval filters, it's best to use the hexadecimal
11700 form, because the revision is stored as a 16 bit packed BCD value;
11701 so the expression <tt>int:0x0100-0x0199</tt> will match any
11702 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11703 </desc>
11704 </attribute>
11705
11706 <attribute name="manufacturer" type="wstring">
11707 <desc>
11708 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11709 </desc>
11710 </attribute>
11711
11712 <attribute name="product" type="wstring">
11713 <desc>
11714 <link to="IUSBDevice::product">Product</link> filter.
11715 </desc>
11716 </attribute>
11717
11718 <attribute name="serialNumber" type="wstring">
11719 <desc>
11720 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11721 </desc>
11722 </attribute>
11723
11724 <attribute name="port" type="wstring">
11725 <desc>
11726 <link to="IUSBDevice::port">Host USB port</link> filter.
11727 </desc>
11728 </attribute>
11729
11730 <attribute name="remote" type="wstring">
11731 <desc>
11732 <link to="IUSBDevice::remote">Remote state</link> filter.
11733 <note>
11734 This filter makes sense only for machine USB filters,
11735 i.e. it is ignored by IHostUSBDeviceFilter objects.
11736 </note>
11737 </desc>
11738 </attribute>
11739
11740 <attribute name="maskedInterfaces" type="unsigned long">
11741 <desc>
11742 This is an advanced option for hiding one or more USB interfaces
11743 from the guest. The value is a bit mask where the bits that are set
11744 means the corresponding USB interface should be hidden, masked off
11745 if you like.
11746 This feature only works on Linux hosts.
11747 </desc>
11748 </attribute>
11749
11750 </interface>
11751
11752
11753 <!--
11754 // IHostUSBDevice
11755 /////////////////////////////////////////////////////////////////////////
11756 -->
11757
11758 <enum
11759 name="USBDeviceState"
11760 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11761 >
11762 <desc>
11763 USB device state. This enumeration represents all possible states
11764 of the USB device physically attached to the host computer regarding
11765 its state on the host computer and availability to guest computers
11766 (all currently running virtual machines).
11767
11768 Once a supported USB device is attached to the host, global USB
11769 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11770 either ignore the device, or put it to USBDeviceState_Held state, or do
11771 nothing. Unless the device is ignored by global filters, filters of all
11772 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11773 activated that can put it to USBDeviceState_Captured state.
11774
11775 If the device was ignored by global filters, or didn't match
11776 any filters at all (including guest ones), it is handled by the host
11777 in a normal way. In this case, the device state is determined by
11778 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11779 or USBDeviceState_Available, depending on the current device usage.
11780
11781 Besides auto-capturing based on filters, the device can be manually
11782 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11783 state is USBDeviceState_Busy, USBDeviceState_Available or
11784 USBDeviceState_Held.
11785
11786 <note>
11787 Due to differences in USB stack implementations in Linux and Win32,
11788 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11789 only to the Linux version of the product. This also means that (<link
11790 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11791 device state is USBDeviceState_Held.
11792 </note>
11793
11794 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11795 </desc>
11796
11797 <const name="NotSupported" value="0">
11798 <desc>
11799 Not supported by the VirtualBox server, not available to guests.
11800 </desc>
11801 </const>
11802 <const name="Unavailable" value="1">
11803 <desc>
11804 Being used by the host computer exclusively,
11805 not available to guests.
11806 </desc>
11807 </const>
11808 <const name="Busy" value="2">
11809 <desc>
11810 Being used by the host computer, potentially available to guests.
11811 </desc>
11812 </const>
11813 <const name="Available" value="3">
11814 <desc>
11815 Not used by the host computer, available to guests (the host computer
11816 can also start using the device at any time).
11817 </desc>
11818 </const>
11819 <const name="Held" value="4">
11820 <desc>
11821 Held by the VirtualBox server (ignored by the host computer),
11822 available to guests.
11823 </desc>
11824 </const>
11825 <const name="Captured" value="5">
11826 <desc>
11827 Captured by one of the guest computers, not available
11828 to anybody else.
11829 </desc>
11830 </const>
11831 </enum>
11832
11833 <interface
11834 name="IHostUSBDevice" extends="IUSBDevice"
11835 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11836 wsmap="managed"
11837 >
11838 <desc>
11839 The IHostUSBDevice interface represents a physical USB device attached
11840 to the host computer.
11841
11842 Besides properties inherited from IUSBDevice, this interface adds the
11843 <link to="#state"/> property that holds the current state of the USB
11844 device.
11845
11846 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11847 </desc>
11848
11849 <attribute name="state" type="USBDeviceState" readonly="yes">
11850 <desc>
11851 Current state of the device.
11852 </desc>
11853 </attribute>
11854
11855 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11856
11857 </interface>
11858
11859
11860 <!--
11861 // IHostUSBDeviceFilter
11862 /////////////////////////////////////////////////////////////////////////
11863 -->
11864
11865 <enum
11866 name="USBDeviceFilterAction"
11867 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11868 >
11869 <desc>
11870 Actions for host USB device filters.
11871 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11872 </desc>
11873
11874 <const name="Null" value="0">
11875 <desc>Null value (never used by the API).</desc>
11876 </const>
11877 <const name="Ignore" value="1">
11878 <desc>Ignore the matched USB device.</desc>
11879 </const>
11880 <const name="Hold" value="2">
11881 <desc>Hold the matched USB device.</desc>
11882 </const>
11883 </enum>
11884
11885 <interface
11886 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11887 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11888 wsmap="managed"
11889 >
11890 <desc>
11891 The IHostUSBDeviceFilter interface represents a global filter for a
11892 physical USB device used by the host computer. Used indirectly in
11893 <link to="IHost::USBDeviceFilters"/>.
11894
11895 Using filters of this type, the host computer determines the initial
11896 state of the USB device after it is physically attached to the
11897 host's USB controller.
11898
11899 <note>
11900 The <link to="#remote"/> attribute is ignored by this type of
11901 filters, because it makes sense only for
11902 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11903 </note>
11904
11905 <see>IHost::USBDeviceFilters</see>
11906 </desc>
11907
11908 <attribute name="action" type="USBDeviceFilterAction">
11909 <desc>
11910 Action performed by the host when an attached USB device
11911 matches this filter.
11912 </desc>
11913 </attribute>
11914
11915 </interface>
11916
11917 <!--
11918 // IAudioAdapter
11919 /////////////////////////////////////////////////////////////////////////
11920 -->
11921
11922 <enum
11923 name="AudioDriverType"
11924 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11925 >
11926 <desc>
11927 Host audio driver type.
11928 </desc>
11929
11930 <const name="Null" value="0">
11931 <desc>Null value, also means "dummy audio driver".</desc>
11932 </const>
11933 <const name="WinMM" value="1"/>
11934 <const name="OSS" value="2"/>
11935 <const name="ALSA" value="3"/>
11936 <const name="DirectSound" value="4"/>
11937 <const name="CoreAudio" value="5"/>
11938 <const name="MMPM" value="6"/>
11939 <const name="Pulse" value="7"/>
11940 <const name="SolAudio" value="8"/>
11941 </enum>
11942
11943 <enum
11944 name="AudioControllerType"
11945 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11946 >
11947 <desc>
11948 Virtual audio controller type.
11949 </desc>
11950
11951 <const name="AC97" value="0"/>
11952 <const name="SB16" value="1"/>
11953 </enum>
11954
11955 <interface
11956 name="IAudioAdapter" extends="$unknown"
11957 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11958 wsmap="managed"
11959 >
11960 <desc>
11961 The IAudioAdapter interface represents the virtual audio adapter of
11962 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11963 </desc>
11964 <attribute name="enabled" type="boolean">
11965 <desc>
11966 Flag whether the audio adapter is present in the
11967 guest system. If disabled, the virtual guest hardware will
11968 not contain any audio adapter. Can only be changed when
11969 the VM is not running.
11970 </desc>
11971 </attribute>
11972 <attribute name="audioController" type="AudioControllerType">
11973 <desc>
11974 The audio hardware we emulate.
11975 </desc>
11976 </attribute>
11977 <attribute name="audioDriver" type="AudioDriverType">
11978 <desc>
11979 Audio driver the adapter is connected to. This setting
11980 can only be changed when the VM is not running.
11981 </desc>
11982 </attribute>
11983 </interface>
11984
11985 <!--
11986 // IVRDPServer
11987 /////////////////////////////////////////////////////////////////////////
11988 -->
11989
11990 <enum
11991 name="VRDPAuthType"
11992 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11993 >
11994 <desc>
11995 VRDP authentication type.
11996 </desc>
11997
11998 <const name="Null" value="0">
11999 <desc>Null value, also means "no authentication".</desc>
12000 </const>
12001 <const name="External" value="1"/>
12002 <const name="Guest" value="2"/>
12003 </enum>
12004
12005 <interface
12006 name="IVRDPServer" extends="$unknown"
12007 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
12008 wsmap="managed"
12009 >
12010 <attribute name="enabled" type="boolean">
12011 <desc>VRDP server status.</desc>
12012 </attribute>
12013
12014 <attribute name="port" type="unsigned long">
12015 <desc>
12016 VRDP server port number.
12017 <note>
12018 Setting the value of this property to <tt>0</tt> will reset the port
12019 number to the default value which is
12020 currently <tt>3389</tt>. Reading this property will always return a
12021 real port number, even after it has been set to <tt>0</tt> (in which
12022 case the default port is returned).
12023 </note>
12024 </desc>
12025 </attribute>
12026
12027 <attribute name="netAddress" type="wstring">
12028 <desc>VRDP server address.</desc>
12029 </attribute>
12030
12031 <attribute name="authType" type="VRDPAuthType">
12032 <desc>VRDP authentication method.</desc>
12033 </attribute>
12034
12035 <attribute name="authTimeout" type="unsigned long">
12036 <desc>Timeout for guest authentication. Milliseconds.</desc>
12037 </attribute>
12038
12039 <attribute name="allowMultiConnection" type="boolean">
12040 <desc>
12041 Flag whether multiple simultaneous connections to the VM are permitted.
12042 Note that this will be replaced by a more powerful mechanism in the future.
12043 </desc>
12044 </attribute>
12045
12046 <attribute name="reuseSingleConnection" type="boolean">
12047 <desc>
12048 Flag whether the existing connection must be dropped and a new connection
12049 must be established by the VRDP server, when a new client connects in single
12050 connection mode.
12051 </desc>
12052 </attribute>
12053
12054 </interface>
12055
12056
12057 <!--
12058 // ISharedFolder
12059 /////////////////////////////////////////////////////////////////////////
12060 -->
12061
12062 <interface
12063 name="ISharedFolder" extends="$unknown"
12064 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12065 wsmap="struct"
12066 >
12067 <desc>
12068 The ISharedFolder interface represents a folder in the host computer's
12069 file system accessible from the guest OS running inside a virtual
12070 machine using an associated logical name.
12071
12072 There are three types of shared folders:
12073 <ul>
12074 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12075 folders available to all virtual machines.</li>
12076 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12077 VM-specific shared folders available to the given virtual machine at
12078 startup.</li>
12079 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12080 VM-specific shared folders created in the session context (for
12081 example, when the virtual machine is running) and automatically
12082 discarded when the session is closed (the VM is powered off).</li>
12083 </ul>
12084
12085 Logical names of shared folders must be unique within the given scope
12086 (global, permanent or transient). However, they do not need to be unique
12087 across scopes. In this case, the definition of the shared folder in a
12088 more specific scope takes precedence over definitions in all other
12089 scopes. The order of precedence is (more specific to more general):
12090 <ol>
12091 <li>Transient definitions</li>
12092 <li>Permanent definitions</li>
12093 <li>Global definitions</li>
12094 </ol>
12095
12096 For example, if MyMachine has a shared folder named
12097 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12098 transient shared folder named <tt>C_DRIVE</tt> (that points
12099 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12100 of <tt>C_DRIVE</tt> in the guest OS so
12101 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12102 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12103 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12104 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12105 to <tt>C:\\</tt> if it still exists.
12106
12107 Note that permanent and transient shared folders of different machines
12108 are in different name spaces, so they don't overlap and don't need to
12109 have unique logical names.
12110
12111 <note>
12112 Global shared folders are not implemented in the current version of the
12113 product.
12114 </note>
12115 </desc>
12116
12117 <attribute name="name" type="wstring" readonly="yes">
12118 <desc>Logical name of the shared folder.</desc>
12119 </attribute>
12120
12121 <attribute name="hostPath" type="wstring" readonly="yes">
12122 <desc>Full path to the shared folder in the host file system.</desc>
12123 </attribute>
12124
12125 <attribute name="accessible" type="boolean" readonly="yes">
12126 <desc>
12127 Whether the folder defined by the host path is currently
12128 accessible or not.
12129 For example, the folder can be unaccessible if it is placed
12130 on the network share that is not available by the time
12131 this property is read.
12132 </desc>
12133 </attribute>
12134
12135 <attribute name="writable" type="boolean" readonly="yes">
12136 <desc>
12137 Whether the folder defined by the host path is writable or
12138 not.
12139 </desc>
12140 </attribute>
12141
12142 <attribute name="lastAccessError" type="wstring" readonly="yes">
12143 <desc>
12144 Text message that represents the result of the last accessibility
12145 check.
12146
12147 Accessibility checks are performed each time the <link to="#accessible"/>
12148 attribute is read. An empty string is returned if the last
12149 accessibility check was successful. A non-empty string indicates a
12150 failure and should normally describe a reason of the failure (for
12151 example, a file read error).
12152 </desc>
12153 </attribute>
12154
12155 </interface>
12156
12157 <!--
12158 // ISession
12159 /////////////////////////////////////////////////////////////////////////
12160 -->
12161
12162 <interface
12163 name="IInternalSessionControl" extends="$unknown"
12164 uuid="b26552e7-9534-4f47-b766-98eac648a90d"
12165 internal="yes"
12166 wsmap="suppress"
12167 >
12168 <method name="getPID">
12169 <desc>PID of the process that has created this Session object.
12170 </desc>
12171 <param name="pid" type="unsigned long" dir="return"/>
12172 </method>
12173
12174 <method name="getRemoteConsole">
12175 <desc>
12176 Returns the console object suitable for remote control.
12177
12178 <result name="VBOX_E_INVALID_VM_STATE">
12179 Session state prevents operation.
12180 </result>
12181 <result name="VBOX_E_INVALID_OBJECT_STATE">
12182 Session type prevents operation.
12183 </result>
12184
12185 </desc>
12186 <param name="console" type="IConsole" dir="return"/>
12187 </method>
12188
12189 <method name="assignMachine">
12190 <desc>
12191 Assigns the machine object associated with this direct-type
12192 session or informs the session that it will be a remote one
12193 (if @a machine == @c null).
12194
12195 <result name="VBOX_E_INVALID_VM_STATE">
12196 Session state prevents operation.
12197 </result>
12198 <result name="VBOX_E_INVALID_OBJECT_STATE">
12199 Session type prevents operation.
12200 </result>
12201
12202 </desc>
12203 <param name="machine" type="IMachine" dir="in"/>
12204 </method>
12205
12206 <method name="assignRemoteMachine">
12207 <desc>
12208 Assigns the machine and the (remote) console object associated with
12209 this remote-type session.
12210
12211 <result name="VBOX_E_INVALID_VM_STATE">
12212 Session state prevents operation.
12213 </result>
12214
12215 </desc>
12216 <param name="machine" type="IMachine" dir="in"/>
12217 <param name="console" type="IConsole" dir="in"/>
12218 </method>
12219
12220 <method name="updateMachineState">
12221 <desc>
12222 Updates the machine state in the VM process.
12223 Must be called only in certain cases
12224 (see the method implementation).
12225
12226 <result name="VBOX_E_INVALID_VM_STATE">
12227 Session state prevents operation.
12228 </result>
12229 <result name="VBOX_E_INVALID_OBJECT_STATE">
12230 Session type prevents operation.
12231 </result>
12232
12233 </desc>
12234 <param name="aMachineState" type="MachineState" dir="in"/>
12235 </method>
12236
12237 <method name="uninitialize">
12238 <desc>
12239 Uninitializes (closes) this session. Used by VirtualBox to close
12240 the corresponding remote session when the direct session dies
12241 or gets closed.
12242
12243 <result name="VBOX_E_INVALID_VM_STATE">
12244 Session state prevents operation.
12245 </result>
12246
12247 </desc>
12248 </method>
12249
12250 <method name="onDVDDriveChange">
12251 <desc>
12252 Triggered when settings of the DVD drive object of the
12253 associated virtual machine have changed.
12254
12255 <result name="VBOX_E_INVALID_VM_STATE">
12256 Session state prevents operation.
12257 </result>
12258 <result name="VBOX_E_INVALID_OBJECT_STATE">
12259 Session type prevents operation.
12260 </result>
12261
12262 </desc>
12263 </method>
12264
12265 <method name="onFloppyDriveChange">
12266 <desc>
12267 Triggered when settings of the floppy drive object of the
12268 associated virtual machine have changed.
12269
12270 <result name="VBOX_E_INVALID_VM_STATE">
12271 Session state prevents operation.
12272 </result>
12273 <result name="VBOX_E_INVALID_OBJECT_STATE">
12274 Session type prevents operation.
12275 </result>
12276
12277 </desc>
12278 </method>
12279
12280 <method name="onNetworkAdapterChange">
12281 <desc>
12282 Triggered when settings of a network adapter of the
12283 associated virtual machine have changed.
12284
12285 <result name="VBOX_E_INVALID_VM_STATE">
12286 Session state prevents operation.
12287 </result>
12288 <result name="VBOX_E_INVALID_OBJECT_STATE">
12289 Session type prevents operation.
12290 </result>
12291
12292 </desc>
12293 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12294 </method>
12295
12296 <method name="onSerialPortChange">
12297 <desc>
12298 Triggered when settings of a serial port of the
12299 associated virtual machine have changed.
12300
12301 <result name="VBOX_E_INVALID_VM_STATE">
12302 Session state prevents operation.
12303 </result>
12304 <result name="VBOX_E_INVALID_OBJECT_STATE">
12305 Session type prevents operation.
12306 </result>
12307
12308 </desc>
12309 <param name="serialPort" type="ISerialPort" dir="in"/>
12310 </method>
12311
12312 <method name="onParallelPortChange">
12313 <desc>
12314 Triggered when settings of a parallel port of the
12315 associated virtual machine have changed.
12316
12317 <result name="VBOX_E_INVALID_VM_STATE">
12318 Session state prevents operation.
12319 </result>
12320 <result name="VBOX_E_INVALID_OBJECT_STATE">
12321 Session type prevents operation.
12322 </result>
12323
12324 </desc>
12325 <param name="parallelPort" type="IParallelPort" dir="in"/>
12326 </method>
12327
12328 <method name="onStorageControllerChange">
12329 <desc>
12330 Triggered when settings of a storage controller of the
12331 associated virtual machine have changed.
12332
12333 <result name="VBOX_E_INVALID_VM_STATE">
12334 Session state prevents operation.
12335 </result>
12336 <result name="VBOX_E_INVALID_OBJECT_STATE">
12337 Session type prevents operation.
12338 </result>
12339
12340 </desc>
12341 </method>
12342
12343 <method name="onVRDPServerChange">
12344 <desc>
12345 Triggered when settings of the VRDP server object of the
12346 associated virtual machine have changed.
12347
12348 <result name="VBOX_E_INVALID_VM_STATE">
12349 Session state prevents operation.
12350 </result>
12351 <result name="VBOX_E_INVALID_OBJECT_STATE">
12352 Session type prevents operation.
12353 </result>
12354
12355 </desc>
12356 </method>
12357
12358 <method name="onUSBControllerChange">
12359 <desc>
12360 Triggered when settings of the USB controller object of the
12361 associated virtual machine have changed.
12362
12363 <result name="VBOX_E_INVALID_VM_STATE">
12364 Session state prevents operation.
12365 </result>
12366 <result name="VBOX_E_INVALID_OBJECT_STATE">
12367 Session type prevents operation.
12368 </result>
12369
12370 </desc>
12371 </method>
12372
12373 <method name="onSharedFolderChange">
12374 <desc>
12375 Triggered when a permanent (global or machine) shared folder has been
12376 created or removed.
12377 <note>
12378 We don't pass shared folder parameters in this notification because
12379 the order in which parallel notifications are delivered is not defined,
12380 therefore it could happen that these parameters were outdated by the
12381 time of processing this notification.
12382 </note>
12383
12384 <result name="VBOX_E_INVALID_VM_STATE">
12385 Session state prevents operation.
12386 </result>
12387 <result name="VBOX_E_INVALID_OBJECT_STATE">
12388 Session type prevents operation.
12389 </result>
12390
12391 </desc>
12392 <param name="global" type="boolean" dir="in"/>
12393 </method>
12394
12395 <method name="onUSBDeviceAttach">
12396 <desc>
12397 Triggered when a request to capture a USB device (as a result
12398 of matched USB filters or direct call to
12399 <link to="IConsole::attachUSBDevice"/>) has completed.
12400 A @c null @a error object means success, otherwise it
12401 describes a failure.
12402
12403 <result name="VBOX_E_INVALID_VM_STATE">
12404 Session state prevents operation.
12405 </result>
12406 <result name="VBOX_E_INVALID_OBJECT_STATE">
12407 Session type prevents operation.
12408 </result>
12409
12410 </desc>
12411 <param name="device" type="IUSBDevice" dir="in"/>
12412 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12413 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12414 </method>
12415
12416 <method name="onUSBDeviceDetach">
12417 <desc>
12418 Triggered when a request to release the USB device (as a result
12419 of machine termination or direct call to
12420 <link to="IConsole::detachUSBDevice"/>) has completed.
12421 A @c null @a error object means success, otherwise it
12422 describes a failure.
12423
12424 <result name="VBOX_E_INVALID_VM_STATE">
12425 Session state prevents operation.
12426 </result>
12427 <result name="VBOX_E_INVALID_OBJECT_STATE">
12428 Session type prevents operation.
12429 </result>
12430
12431 </desc>
12432 <param name="id" type="wstring" dir="in"/>
12433 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12434 </method>
12435
12436 <method name="onShowWindow">
12437 <desc>
12438 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12439 <link to="IMachine::showConsoleWindow"/> in order to notify
12440 console callbacks
12441 <link to="IConsoleCallback::onCanShowWindow"/>
12442 and <link to="IConsoleCallback::onShowWindow"/>.
12443
12444 <result name="VBOX_E_INVALID_OBJECT_STATE">
12445 Session type prevents operation.
12446 </result>
12447
12448 </desc>
12449 <param name="check" type="boolean" dir="in"/>
12450 <param name="canShow" type="boolean" dir="out"/>
12451 <param name="winId" type="unsigned long long" dir="out"/>
12452 </method>
12453
12454 <method name="accessGuestProperty">
12455 <desc>
12456 Called by <link to="IMachine::getGuestProperty"/> and by
12457 <link to="IMachine::setGuestProperty"/> in order to read and
12458 modify guest properties.
12459
12460 <result name="VBOX_E_INVALID_VM_STATE">
12461 Machine session is not open.
12462 </result>
12463 <result name="VBOX_E_INVALID_OBJECT_STATE">
12464 Session type is not direct.
12465 </result>
12466
12467 </desc>
12468 <param name="name" type="wstring" dir="in"/>
12469 <param name="value" type="wstring" dir="in"/>
12470 <param name="flags" type="wstring" dir="in"/>
12471 <param name="isSetter" type="boolean" dir="in"/>
12472 <param name="retValue" type="wstring" dir="out"/>
12473 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12474 <param name="retFlags" type="wstring" dir="out"/>
12475 </method>
12476
12477 <method name="enumerateGuestProperties">
12478 <desc>
12479 Return a list of the guest properties matching a set of patterns along
12480 with their values, time stamps and flags.
12481
12482 <result name="VBOX_E_INVALID_VM_STATE">
12483 Machine session is not open.
12484 </result>
12485 <result name="VBOX_E_INVALID_OBJECT_STATE">
12486 Session type is not direct.
12487 </result>
12488
12489 </desc>
12490 <param name="patterns" type="wstring" dir="in">
12491 <desc>
12492 The patterns to match the properties against as a comma-separated
12493 string. If this is empty, all properties currently set will be
12494 returned.
12495 </desc>
12496 </param>
12497 <param name="key" type="wstring" dir="out" safearray="yes">
12498 <desc>
12499 The key names of the properties returned.
12500 </desc>
12501 </param>
12502 <param name="value" type="wstring" dir="out" safearray="yes">
12503 <desc>
12504 The values of the properties returned. The array entries match the
12505 corresponding entries in the @a key array.
12506 </desc>
12507 </param>
12508 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12509 <desc>
12510 The time stamps of the properties returned. The array entries match
12511 the corresponding entries in the @a key array.
12512 </desc>
12513 </param>
12514 <param name="flags" type="wstring" dir="out" safearray="yes">
12515 <desc>
12516 The flags of the properties returned. The array entries match the
12517 corresponding entries in the @a key array.
12518 </desc>
12519 </param>
12520 </method>
12521
12522 </interface>
12523
12524 <interface
12525 name="ISession" extends="$dispatched"
12526 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12527 wsmap="managed"
12528 >
12529 <desc>
12530 The ISession interface represents a serialization primitive for virtual
12531 machines.
12532
12533 With VirtualBox, every time one wishes to manipulate a virtual machine
12534 (e.g. change its settings or start execution), a session object is
12535 required. Such an object must be passed to one of the session methods
12536 that open the given session, which then initiates the machine manipulation.
12537
12538 A session serves several purposes: it identifies to the inter-process VirtualBox
12539 code which process is currently working with the virtual machine, and it ensures
12540 that there are no incompatible requests from several processes for the
12541 same virtual machine. Session objects can therefore be thought of as mutex
12542 semaphores that lock virtual machines to prevent conflicting accesses from
12543 several processes.
12544
12545 How sessions objects are used depends on whether you use the Main API
12546 via COM or via the webservice:
12547
12548 <ul>
12549 <li>When using the COM API directly, an object of the Session class from the
12550 VirtualBox type library needs to be created. In regular COM C++ client code,
12551 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12552 This object will then act as a local session object in further calls to open
12553 a session.
12554 </li>
12555
12556 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12557 one session object automatically when <link to="IWebsessionManager::logon" />
12558 is called. A managed object reference to that session object can be retrieved by
12559 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12560 reference can then be used to open sessions.
12561 </li>
12562 </ul>
12563
12564 Sessions are mainly used in two variations:
12565
12566 <ul>
12567 <li>
12568 To start a virtual machine in a separate process, one would call
12569 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12570 object as its first parameter. This session then identifies the caller
12571 and lets him control the started machine (for example, pause machine
12572 execution or power it down) as well as be notified about machine
12573 execution state changes.
12574 </li>
12575
12576 <li>To alter machine settings, or to start machine execution within the
12577 current process, one needs to open a direct session for the machine first by
12578 calling <link to="IVirtualBox::openSession"/>. While a direct session
12579 is open within one process, no any other process may open another direct
12580 session for the same machine. This prevents the machine from being changed
12581 by other processes while it is running or while the machine is being configured.
12582 </li>
12583 </ul>
12584
12585 One also can attach to an existing direct session already opened by
12586 another process (for example, in order to send a control request to the
12587 virtual machine such as the pause or the reset request). This is done by
12588 calling <link to="IVirtualBox::openExistingSession"/>.
12589
12590 <note>
12591 Unless you are trying to write a new VirtualBox front-end that
12592 performs direct machine execution (like the VirtualBox or VBoxSDL
12593 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12594 session opened by <link to="IVirtualBox::openSession"/> and use this
12595 session only to change virtual machine settings. If you simply want to
12596 start virtual machine execution using one of the existing front-ends
12597 (for example the VirtualBox GUI or headless server), simply use
12598 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12599 will power up the machine automatically for you.
12600 </note>
12601 </desc>
12602
12603 <attribute name="state" type="SessionState" readonly="yes">
12604 <desc>Current state of this session.</desc>
12605 </attribute>
12606
12607 <attribute name="type" type="SessionType" readonly="yes">
12608 <desc>
12609 Type of this session. The value of this attribute is valid only
12610 if the session is currently open (i.e. its #state is
12611 SessionType_SessionOpen), otherwise an error will be returned.
12612 </desc>
12613 </attribute>
12614
12615 <attribute name="machine" type="IMachine" readonly="yes">
12616 <desc>Machine object associated with this session.</desc>
12617 </attribute>
12618
12619 <attribute name="console" type="IConsole" readonly="yes">
12620 <desc>Console object associated with this session.</desc>
12621 </attribute>
12622
12623 <method name="close">
12624 <desc>
12625 Closes a session that was previously opened.
12626
12627 It is recommended that every time an "open session" method (such as
12628 <link to="IVirtualBox::openRemoteSession" /> or
12629 <link to="IVirtualBox::openSession" />) has been called to
12630 manipulate a virtual machine, the caller invoke
12631 ISession::close() when it's done doing so. Since sessions are
12632 serialization primitives much like ordinary mutexes, they are
12633 best used the same way: for each "open" call, there should be
12634 a matching "close" call, even when errors occur.
12635
12636 Otherwise, if a direct session for a machine opened with
12637 <link to="IVirtualBox::openSession"/> is not explicitly closed
12638 when the application terminates, the state of the machine will
12639 be set to <link to="MachineState_Aborted" /> on the server.
12640
12641 Generally, it is recommended to close all open sessions explicitly
12642 before terminating the application (regardless of the reason for
12643 the termination).
12644
12645 <note>
12646 Do not expect the session state (<link to="ISession::state" />
12647 to return to "Closed" immediately after you invoke
12648 ISession::close(), particularly if you have started a remote
12649 session to execute the VM in a new process. The session state will
12650 automatically return to "Closed" once the VM is no longer executing,
12651 which can of course take a very long time.
12652 </note>
12653
12654 <result name="E_UNEXPECTED">
12655 Session is not open.
12656 </result>
12657
12658 </desc>
12659 </method>
12660
12661 </interface>
12662
12663 <!--
12664 // IStorageController
12665 /////////////////////////////////////////////////////////////////////////
12666 -->
12667
12668 <enum
12669 name="StorageBus"
12670 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12671 >
12672 <desc>
12673 The connection type of the storage controller.
12674 </desc>
12675 <const name="Null" value="0">
12676 <desc>@c null value. Never used by the API.</desc>
12677 </const>
12678 <const name="IDE" value="1"/>
12679 <const name="SATA" value="2"/>
12680 <const name="SCSI" value="3"/>
12681 </enum>
12682
12683 <enum
12684 name="StorageControllerType"
12685 uuid="685387db-a837-4320-a258-08f46a22f62a"
12686 >
12687 <desc>
12688 Storage controller type.
12689 </desc>
12690
12691 <const name="Null" value="0">
12692 <desc>@c null value. Never used by the API.</desc>
12693 </const>
12694 <const name="LsiLogic" value="1"/>
12695 <const name="BusLogic" value="2"/>
12696 <const name="IntelAhci" value="3"/>
12697 <const name="PIIX3" value="4"/>
12698 <const name="PIIX4" value="5"/>
12699 <const name="ICH6" value="6"/>
12700 </enum>
12701
12702 <interface
12703 name="IStorageController" extends="$unknown"
12704 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12705 wsmap="managed"
12706 >
12707 <desc>
12708 Represents a storage controller that is attached to a virtual machine
12709 (<link to="IMachine" />). Just as hard disks are attached to storage
12710 controllers in a real computer, virtual hard disks (represented by
12711 <link to="IHardDisk" />) are attached to virtual storage controllers,
12712 represented by this interface.
12713
12714 VirtualBox supports three types of virtual storage controller hardware:
12715 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12716 these three is used, certain sub-types are available and can be
12717 selected in <link to="#controllerType" />.
12718 </desc>
12719
12720 <attribute name="name" type="wstring" readonly="yes">
12721 <desc>
12722 Name of the storage controller, as originally specified with
12723 <link to="IMachine::addStorageController" />. This then uniquely
12724 identifies this controller with other method calls such as
12725 <link to="IMachine::attachHardDisk" />.
12726 </desc>
12727 </attribute>
12728
12729 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12730 <desc>
12731 Maximum number of devices which can be attached to one port.
12732 </desc>
12733 </attribute>
12734
12735 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12736 <desc>
12737 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12738 </desc>
12739 </attribute>
12740
12741 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12742 <desc>
12743 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12744 </desc>
12745 </attribute>
12746
12747 <attribute name="instance" type="unsigned long">
12748 <desc>
12749 The instance number of the device in the running VM.
12750 </desc>
12751 </attribute>
12752
12753 <attribute name="portCount" type="unsigned long">
12754 <desc>
12755 The number of currently usable ports on the controller.
12756 The minimum and maximum number of ports for one controller are
12757 stored in <link to="IStorageController::minPortCount"/>
12758 and <link to="IStorageController::maxPortCount"/>.
12759 </desc>
12760 </attribute>
12761
12762 <attribute name="bus" type="StorageBus" readonly="yes">
12763 <desc>
12764 The connection type of the storage controller.
12765 </desc>
12766 </attribute>
12767
12768 <attribute name="controllerType" type="StorageControllerType">
12769 <desc>
12770 Type of the virtual storage controller. Depending on this value,
12771 VirtualBox will provide a different virtual storage controller hardware
12772 to the guest.
12773
12774 For SCSI controllers, the default type is LsiLogic.
12775 </desc>
12776 </attribute>
12777
12778 <method name="GetIDEEmulationPort">
12779 <desc>
12780 Gets the corresponding port number which is emulated as an IDE device.
12781
12782 <result name="E_INVALIDARG">
12783 The @a devicePosition is not in the range 0 to 3.
12784 </result>
12785 <result name="E_NOTIMPL">
12786 The storage controller type is not SATAIntelAhci.
12787 </result>
12788
12789 </desc>
12790 <param name="devicePosition" type="long" dir="in"/>
12791 <param name="portNumber" type="long" dir="return"/>
12792 </method>
12793
12794 <method name="SetIDEEmulationPort">
12795 <desc>
12796 Sets the port number which is emulated as an IDE device.
12797
12798 <result name="E_INVALIDARG">
12799 The @a devicePosition is not in the range 0 to 3 or the
12800 @a portNumber is not in the range 0 to 29.
12801 </result>
12802 <result name="E_NOTIMPL">
12803 The storage controller type is not SATAIntelAhci.
12804 </result>
12805
12806 </desc>
12807 <param name="devicePosition" type="long" dir="in"/>
12808 <param name="portNumber" type="long" dir="in"/>
12809 </method>
12810
12811 </interface>
12812
12813<if target="wsdl">
12814
12815 <!--
12816 // IManagedObjectRef
12817 /////////////////////////////////////////////////////////////////////////
12818 -->
12819
12820 <interface
12821 name="IManagedObjectRef" extends="$unknown"
12822 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12823 internal="yes"
12824 wsmap="managed"
12825 wscpp="hardcoded"
12826 >
12827 <desc>
12828 Managed object reference.
12829
12830 Only within the webservice, a managed object reference (which is really
12831 an opaque number) allows a webservice client to address an object
12832 that lives in the address space of the webservice server.
12833
12834 Behind each managed object reference, there is a COM object that lives
12835 in the webservice server's address space. The COM object is not freed
12836 until the managed object reference is released, either by an explicit
12837 call to <link to="IManagedObjectRef::release" /> or by logging off from
12838 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12839 all objects created during the webservice session.
12840
12841 Whenever a method call of the VirtualBox API returns a COM object, the
12842 webservice representation of that method will instead return a
12843 managed object reference, which can then be used to invoke methods
12844 on that object.
12845 </desc>
12846
12847 <method name="getInterfaceName">
12848 <desc>
12849 Returns the name of the interface that this managed object represents,
12850 for example, "IMachine", as a string.
12851 </desc>
12852 <param name="return" type="wstring" dir="return"/>
12853 </method>
12854
12855 <method name="release">
12856 <desc>
12857 Releases this managed object reference and frees the resources that
12858 were allocated for it in the webservice server process. After calling
12859 this method, the identifier of the reference can no longer be used.
12860 </desc>
12861 </method>
12862
12863 </interface>
12864
12865 <!--
12866 // IWebsessionManager
12867 /////////////////////////////////////////////////////////////////////////
12868 -->
12869
12870 <interface
12871 name="IWebsessionManager" extends="$unknown"
12872 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12873 internal="yes"
12874 wsmap="global"
12875 wscpp="hardcoded"
12876 >
12877 <desc>
12878 Websession manager. This provides essential services
12879 to webservice clients.
12880 </desc>
12881 <method name="logon">
12882 <desc>
12883 Logs a new client onto the webservice and returns a managed object reference to
12884 the IVirtualBox instance, which the client can then use as a basis to further
12885 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12886 interface, in one way or the other.
12887 </desc>
12888 <param name="username" type="wstring" dir="in"/>
12889 <param name="password" type="wstring" dir="in"/>
12890 <param name="return" type="IVirtualBox" dir="return"/>
12891 </method>
12892
12893 <method name="getSessionObject">
12894 <desc>
12895 Returns a managed object reference to the internal ISession object that was created
12896 for this web service session when the client logged on.
12897
12898 <see>ISession</see>
12899 </desc>
12900 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12901 <param name="return" type="ISession" dir="return"/>
12902 </method>
12903
12904 <method name="logoff">
12905 <desc>
12906 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12907 and destroys all resources associated with the session (most importantly, all
12908 managed objects created in the server while the session was active).
12909 </desc>
12910 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12911 </method>
12912
12913 </interface>
12914
12915</if>
12916
12917 <!--
12918 // IPerformanceCollector & friends
12919 /////////////////////////////////////////////////////////////////////////
12920 -->
12921
12922 <interface
12923 name="IPerformanceMetric" extends="$unknown"
12924 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12925 >
12926 <desc>
12927 The IPerformanceMetric interface represents parameters of the given
12928 performance metric.
12929 </desc>
12930
12931 <attribute name="metricName" type="wstring" readonly="yes">
12932 <desc>
12933 Name of the metric.
12934 </desc>
12935 </attribute>
12936
12937 <attribute name="object" type="$unknown" readonly="yes">
12938 <desc>
12939 Object this metric belongs to.
12940 </desc>
12941 </attribute>
12942
12943 <attribute name="description" type="wstring" readonly="yes">
12944 <desc>
12945 Textual description of the metric.
12946 </desc>
12947 </attribute>
12948
12949 <attribute name="period" type="unsigned long" readonly="yes">
12950 <desc>
12951 Time interval between samples, measured in seconds.
12952 </desc>
12953 </attribute>
12954
12955 <attribute name="count" type="unsigned long" readonly="yes">
12956 <desc>
12957 Number of recent samples retained by the performance collector for this
12958 metric.
12959
12960 When the collected sample count exceeds this number, older samples
12961 are discarded.
12962 </desc>
12963 </attribute>
12964
12965 <attribute name="unit" type="wstring" readonly="yes">
12966 <desc>
12967 Unit of measurement.
12968 </desc>
12969 </attribute>
12970
12971 <attribute name="minimumValue" type="long" readonly="yes">
12972 <desc>
12973 Minimum possible value of this metric.
12974 </desc>
12975 </attribute>
12976
12977 <attribute name="maximumValue" type="long" readonly="yes">
12978 <desc>
12979 Maximum possible value of this metric.
12980 </desc>
12981 </attribute>
12982 </interface>
12983
12984 <interface
12985 name="IPerformanceCollector" extends="$unknown"
12986 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12987 wsmap="managed"
12988 >
12989 <desc>
12990 The IPerformanceCollector interface represents a service that collects and
12991 stores performance metrics data.
12992
12993 Performance metrics are associated with objects of interfaces like IHost and
12994 IMachine. Each object has a distinct set of performance metrics.
12995 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12996
12997 Metric data is collected at the specified intervals and is retained
12998 internally. The interval and the number of retained samples can be set
12999 with <link to="IPerformanceCollector::setupMetrics" />.
13000
13001 Metrics are organized hierarchically, with each level separated by a
13002 slash (/) character. Generally, the scheme for metric names is like this:
13003
13004 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13005
13006 "Category/Metric" together form the base metric name. A base metric is the
13007 smallest unit for which a sampling interval and the number of retained
13008 samples can be set. Only base metrics can be enabled and disabled. All
13009 sub-metrics are collected when their base metric is collected.
13010 Collected values for any set of sub-metrics can be queried with
13011 <link to="IPerformanceCollector::queryMetricsData" />.
13012
13013 For example "CPU/Load/User:avg"
13014 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13015 "average" aggregate. An aggregate function is computed over all retained
13016 data. Valid aggregate functions are:
13017
13018 <ul>
13019 <li>avg -- average</li>
13020 <li>min -- minimum</li>
13021 <li>max -- maximum</li>
13022 </ul>
13023
13024 When setting up
13025 metric parameters, querying metric data, enabling or disabling metrics
13026 wildcards can be used in metric names to specify a subset of metrics. For
13027 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13028 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13029 values without aggregates <tt>*:</tt> can be used.
13030
13031 The valid names for base metrics are:
13032
13033 <ul>
13034 <li>CPU/Load</li>
13035 <li>CPU/MHz</li>
13036 <li>RAM/Usage</li>
13037 </ul>
13038
13039 The general sequence for collecting and retrieving the metrics is:
13040 <ul>
13041 <li>
13042 Obtain an instance of IPerformanceCollector with
13043 <link to="IVirtualBox::performanceCollector" />
13044 </li>
13045 <li>
13046 Allocate and populate an array with references to objects the metrics
13047 will be collected for. Use references to IHost and IMachine objects.
13048 </li>
13049 <li>
13050 Allocate and populate an array with base metric names the data will be
13051 collected for.
13052 </li>
13053 <li>
13054 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13055 metric data will be collected and stored.
13056 </li>
13057 <li>
13058 Wait for the data to get collected.
13059 </li>
13060 <li>
13061 Allocate and populate an array with references to objects the metric
13062 values will be queried for. You can re-use the object array used for
13063 setting base metrics.
13064 </li>
13065 <li>
13066 Allocate and populate an array with metric names the data will be
13067 collected for. Note that metric names differ from base metric names.
13068 </li>
13069 <li>
13070 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13071 have been collected so far are returned. Note that the values are still
13072 retained internally and data collection continues.
13073 </li>
13074 </ul>
13075
13076 For an example of usage refer to the following files in VirtualBox SDK:
13077 <ul>
13078 <li>
13079 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13080 </li>
13081 <li>
13082 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13083 </li>
13084 </ul>
13085 </desc>
13086
13087 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13088 <desc>
13089 Array of unique names of metrics.
13090
13091 This array represents all metrics supported by the performance
13092 collector. Individual objects do not necessarily support all of them.
13093 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13094 list of supported metrics for a particular object.
13095 </desc>
13096 </attribute>
13097
13098 <method name="getMetrics">
13099 <desc>
13100 Returns parameters of specified metrics for a set of objects.
13101 <note>
13102 @c Null metrics array means all metrics. @c Null object array means
13103 all existing objects.
13104 </note>
13105 </desc>
13106 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13107 <desc>
13108 Metric name filter. Currently, only a comma-separated list of metrics
13109 is supported.
13110 </desc>
13111 </param>
13112 <param name="objects" type="$unknown" dir="in" safearray="yes">
13113 <desc>
13114 Set of objects to return metric parameters for.
13115 </desc>
13116 </param>
13117 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13118 <desc>
13119 Array of returned metric parameters.
13120 </desc>
13121 </param>
13122 </method>
13123
13124 <method name="setupMetrics">
13125 <desc>
13126 Sets parameters of specified base metrics for a set of objects. Returns
13127 an array of <link to="IPerformanceMetric" /> describing the metrics have
13128 been affected.
13129 <note>
13130 @c Null or empty metric name array means all metrics. @c Null or empty
13131 object array means all existing objects. If metric name array contains
13132 a single element and object array contains many, the single metric
13133 name array element is applied to each object array element to form
13134 metric/object pairs.
13135 </note>
13136 </desc>
13137 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13138 <desc>
13139 Metric name filter. Comma-separated list of metrics with wildcard
13140 support.
13141 </desc>
13142 </param>
13143 <param name="objects" type="$unknown" dir="in" safearray="yes">
13144 <desc>
13145 Set of objects to setup metric parameters for.
13146 </desc>
13147 </param>
13148 <param name="period" type="unsigned long" dir="in">
13149 <desc>
13150 Time interval in seconds between two consecutive samples of performance
13151 data.
13152 </desc>
13153 </param>
13154 <param name="count" type="unsigned long" dir="in">
13155 <desc>
13156 Number of samples to retain in performance data history. Older samples
13157 get discarded.
13158 </desc>
13159 </param>
13160 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13161 <desc>
13162 Array of metrics that have been modified by the call to this method.
13163 </desc>
13164 </param>
13165 </method>
13166
13167 <method name="enableMetrics">
13168 <desc>
13169 Turns on collecting specified base metrics. Returns an array of
13170 <link to="IPerformanceMetric" /> describing the metrics have been
13171 affected.
13172 <note>
13173 @c Null or empty metric name array means all metrics. @c Null or empty
13174 object array means all existing objects. If metric name array contains
13175 a single element and object array contains many, the single metric
13176 name array element is applied to each object array element to form
13177 metric/object pairs.
13178 </note>
13179 </desc>
13180 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13181 <desc>
13182 Metric name filter. Comma-separated list of metrics with wildcard
13183 support.
13184 </desc>
13185 </param>
13186 <param name="objects" type="$unknown" dir="in" safearray="yes">
13187 <desc>
13188 Set of objects to enable metrics for.
13189 </desc>
13190 </param>
13191 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13192 <desc>
13193 Array of metrics that have been modified by the call to this method.
13194 </desc>
13195 </param>
13196 </method>
13197
13198 <method name="disableMetrics">
13199 <desc>
13200 Turns off collecting specified base metrics. Returns an array of
13201 <link to="IPerformanceMetric" /> describing the metrics have been
13202 affected.
13203 <note>
13204 @c Null or empty metric name array means all metrics. @c Null or empty
13205 object array means all existing objects. If metric name array contains
13206 a single element and object array contains many, the single metric
13207 name array element is applied to each object array element to form
13208 metric/object pairs.
13209 </note>
13210 </desc>
13211 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13212 <desc>
13213 Metric name filter. Comma-separated list of metrics with wildcard
13214 support.
13215 </desc>
13216 </param>
13217 <param name="objects" type="$unknown" dir="in" safearray="yes">
13218 <desc>
13219 Set of objects to disable metrics for.
13220 </desc>
13221 </param>
13222 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13223 <desc>
13224 Array of metrics that have been modified by the call to this method.
13225 </desc>
13226 </param>
13227 </method>
13228
13229 <method name="queryMetricsData">
13230 <desc>
13231 Queries collected metrics data for a set of objects.
13232
13233 The data itself and related metric information are returned in seven
13234 parallel and one flattened array of arrays. Elements of
13235 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13236 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13237 the same index describe one set of values corresponding to a single
13238 metric.
13239
13240 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13241 start and length of a sub-array is indicated by
13242 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13243 value for metric <tt>metricNames[i]</tt> is at
13244 <tt>returnData[returnIndices[i]]</tt>.
13245
13246 <note>
13247 @c Null or empty metric name array means all metrics. @c Null or empty
13248 object array means all existing objects. If metric name array contains
13249 a single element and object array contains many, the single metric
13250 name array element is applied to each object array element to form
13251 metric/object pairs.
13252 </note>
13253 <note>
13254 Data collection continues behind the scenes after call to
13255 @c queryMetricsData. The return data can be seen as the snapshot of
13256 the current state at the time of @c queryMetricsData call. The
13257 internally kept metric values are not cleared by the call. This makes
13258 possible querying different subsets of metrics or aggregates with
13259 subsequent calls. If periodic querying is needed it is highly
13260 suggested to query the values with @c interval*count period to avoid
13261 confusion. This way a completely new set of data values will be
13262 provided by each query.
13263 </note>
13264 </desc>
13265 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13266 <desc>
13267 Metric name filter. Comma-separated list of metrics with wildcard
13268 support.
13269 </desc>
13270 </param>
13271 <param name="objects" type="$unknown" dir="in" safearray="yes">
13272 <desc>
13273 Set of objects to query metrics for.
13274 </desc>
13275 </param>
13276 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13277 <desc>
13278 Names of metrics returned in @c returnData.
13279 </desc>
13280 </param>
13281 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13282 <desc>
13283 Objects associated with metrics returned in @c returnData.
13284 </desc>
13285 </param>
13286 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13287 <desc>
13288 Units of measurement for each returned metric.
13289 </desc>
13290 </param>
13291 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13292 <desc>
13293 Divisor that should be applied to return values in order to get
13294 floating point values. For example:
13295 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13296 will retrieve the floating point value of i-th sample of the first
13297 metric.
13298 </desc>
13299 </param>
13300 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13301 <desc>
13302 Sequence numbers of the first elements of value sequences of particular metrics
13303 returned in @c returnData. For aggregate metrics it is the sequence number of
13304 the sample the aggregate started calculation from.
13305 </desc>
13306 </param>
13307 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13308 <desc>
13309 Indices of the first elements of value sequences of particular metrics
13310 returned in @c returnData.
13311 </desc>
13312 </param>
13313 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13314 <desc>
13315 Lengths of value sequences of particular metrics.
13316 </desc>
13317 </param>
13318 <param name="returnData" type="long" dir="return" safearray="yes">
13319 <desc>
13320 Flattened array of all metric data containing sequences of values for
13321 each metric.
13322 </desc>
13323 </param>
13324 </method>
13325
13326 </interface>
13327
13328 <module name="VBoxSVC" context="LocalServer">
13329 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13330 namespace="virtualbox.org">
13331 <interface name="IVirtualBox" default="yes"/>
13332 </class>
13333 </module>
13334
13335 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13336 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13337 namespace="virtualbox.org">
13338 <interface name="ISession" default="yes"/>
13339 </class>
13340 </module>
13341
13342</library>
13343
13344</idl>
13345
13346<!-- 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