VirtualBox

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

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

Main: rewrite snapshot documentation

  • Property svn:eol-style set to native
File size: 487.4 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="managed"
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="wstring" 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, except for the
943 data type.
944 In XPCOM, there is no equivalent.
945 </note>
946 </desc>
947 </attribute>
948
949 <attribute name="component" type="wstring" readonly="yes">
950 <desc>
951 Name of the component that generated the error.
952 <note>
953 In MS COM, it is the same as IErrorInfo::GetSource.
954 In XPCOM, there is no equivalent.
955 </note>
956 </desc>
957 </attribute>
958
959 <attribute name="text" type="wstring" readonly="yes">
960 <desc>
961 Text description of the error.
962 <note>
963 In MS COM, it is the same as IErrorInfo::GetDescription.
964 In XPCOM, it is the same as nsIException::message.
965 </note>
966 </desc>
967 </attribute>
968
969 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
970 <desc>
971 Next error object if there is any, or @c null otherwise.
972 <note>
973 In MS COM, there is no equivalent.
974 In XPCOM, it is the same as nsIException::inner.
975 </note>
976 </desc>
977 </attribute>
978
979 </interface>
980
981
982 <!--
983 // IVirtualBox
984 /////////////////////////////////////////////////////////////////////////
985 -->
986
987 <interface
988 name="IVirtualBoxCallback" extends="$unknown"
989 uuid="2990059f-5bc8-4635-8415-658917cd3186"
990 wsmap="suppress"
991 >
992 <method name="onMachineStateChange">
993 <desc>
994 The execution state of the given machine has changed.
995 <see>IMachine::state</see>
996 </desc>
997 <param name="machineId" type="wstring" dir="in">
998 <desc>ID of the machine this event relates to.</desc>
999 </param>
1000 <param name="state" type="MachineState" dir="in">
1001 <desc>New execution state.</desc>
1002 </param>
1003 </method>
1004
1005 <method name="onMachineDataChange">
1006 <desc>
1007 Any of the settings of the given machine has changed.
1008 </desc>
1009 <param name="machineId" type="wstring" dir="in">
1010 <desc>ID of the machine this event relates to.</desc>
1011 </param>
1012 </method>
1013
1014 <method name="onExtraDataCanChange">
1015 <desc>
1016 Notification when someone tries to change extra data for
1017 either the given machine or (if @c null) global extra data.
1018 This gives the chance to veto against changes.
1019 </desc>
1020 <param name="machineId" type="wstring" dir="in">
1021 <desc>
1022 ID of the machine this event relates to
1023 (@c null ID for global extra data change requests).
1024 </desc>
1025 </param>
1026 <param name="key" type="wstring" dir="in">
1027 <desc>
1028 Extra data key for the attempted write.
1029 </desc>
1030 </param>
1031 <param name="value" type="wstring" dir="in">
1032 <desc>
1033 Extra data value for the given key.
1034 </desc>
1035 </param>
1036 <param name="error" type="wstring" dir="out">
1037 <desc>
1038 Optional error message describing the reason of the
1039 veto (ignored if this notification returns @c true).
1040 </desc>
1041 </param>
1042 <param name="allowChange" type="boolean" dir="return">
1043 <desc>
1044 Flag to indicate whether the callee agrees (@c true)
1045 or vetoes against the change (@c false).
1046 </desc>
1047 </param>
1048 </method>
1049
1050 <method name="onExtraDataChange">
1051 <desc>
1052 Notification when machine specific or global extra data
1053 has changed.
1054 </desc>
1055 <param name="machineId" type="wstring" dir="in">
1056 <desc>
1057 ID of the machine this event relates to.
1058 Null for global extra data changes.
1059 </desc>
1060 </param>
1061 <param name="key" type="wstring" dir="in">
1062 <desc>
1063 Extra data key that has changed.
1064 </desc>
1065 </param>
1066 <param name="value" type="wstring" dir="in">
1067 <desc>
1068 Extra data value for the given key.
1069 </desc>
1070 </param>
1071 </method>
1072
1073 <method name="onMediaRegistered">
1074 <desc>
1075 The given media was registered or unregistered
1076 within this VirtualBox installation.
1077
1078 The @a mediaType parameter describes what type of
1079 media the specified @a mediaId refers to. Possible
1080 values are:
1081
1082 <ul>
1083 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1084 that, if registered, can be obtained using the
1085 <link to="IVirtualBox::getHardDisk"/> call.</li>
1086 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1087 that, if registered, can be obtained using the
1088 <link to="IVirtualBox::getDVDImage"/> call.</li>
1089 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1090 that, if registered, can be obtained using the
1091 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1092 </ul>
1093
1094 Note that if this is a deregistration notification,
1095 there is no way to access the object representing the
1096 unregistered media. It is supposed that the
1097 application will do required cleanup based on the
1098 @a mediaId value.
1099 </desc>
1100 <param name="mediaId" type="wstring" dir="in">
1101 <desc>ID of the media this event relates to.</desc>
1102 </param>
1103 <param name="mediaType" type="DeviceType" dir="in">
1104 <desc>Type of the media this event relates to.</desc>
1105 </param>
1106 <param name="registered" type="boolean" dir="in">
1107 <desc>
1108 If @c true, the media was registered, otherwise it was
1109 unregistered.
1110 </desc>
1111 </param>
1112 </method>
1113
1114 <method name="onMachineRegistered">
1115 <desc>
1116 The given machine was registered or unregistered
1117 within this VirtualBox installation.
1118 </desc>
1119 <param name="machineId" type="wstring" dir="in">
1120 <desc>ID of the machine this event relates to.</desc>
1121 </param>
1122 <param name="registered" type="boolean" dir="in">
1123 <desc>
1124 If @c true, the machine was registered, otherwise it was
1125 unregistered.
1126 </desc>
1127 </param>
1128 </method>
1129
1130 <method name="onSessionStateChange">
1131 <desc>
1132 The state of the session for the given machine was changed.
1133 <see>IMachine::sessionState</see>
1134 </desc>
1135 <param name="machineId" type="wstring" dir="in">
1136 <desc>ID of the machine this event relates to.</desc>
1137 </param>
1138 <param name="state" type="SessionState" dir="in">
1139 <desc>New session state.</desc>
1140 </param>
1141 </method>
1142
1143 <method name="onSnapshotTaken">
1144 <desc>
1145 A new snapshot of the machine has been taken.
1146 <see>ISnapshot</see>
1147 </desc>
1148 <param name="machineId" type="wstring" dir="in">
1149 <desc>ID of the machine this event relates to.</desc>
1150 </param>
1151 <param name="snapshotId" type="wstring" dir="in">
1152 <desc>ID of the new snapshot.</desc>
1153 </param>
1154 </method>
1155
1156 <method name="onSnapshotDiscarded">
1157 <desc>
1158 Snapshot of the given machine has been discarded.
1159
1160 <note>
1161 This notification is delivered <b>after</b> the snapshot
1162 object has been uninitialized on the server (so that any
1163 attempt to call its methods will return an error).
1164 </note>
1165
1166 <see>ISnapshot</see>
1167 </desc>
1168 <param name="machineId" type="wstring" dir="in">
1169 <desc>ID of the machine this event relates to.</desc>
1170 </param>
1171 <param name="snapshotId" type="wstring" dir="in">
1172 <desc>
1173 ID of the discarded snapshot. @c null means the current machine
1174 state has been discarded (restored from the current snapshot).
1175 </desc>
1176 </param>
1177 </method>
1178
1179 <method name="onSnapshotChange">
1180 <desc>
1181 Snapshot properties (name and/or description) have been changed.
1182 <see>ISnapshot</see>
1183 </desc>
1184 <param name="machineId" type="wstring" dir="in">
1185 <desc>ID of the machine this event relates to.</desc>
1186 </param>
1187 <param name="snapshotId" type="wstring" dir="in">
1188 <desc>ID of the changed snapshot.</desc>
1189 </param>
1190 </method>
1191
1192 <method name="onGuestPropertyChange">
1193 <desc>
1194 Notification when a guest property has changed.
1195 </desc>
1196 <param name="machineId" type="wstring" dir="in">
1197 <desc>
1198 ID of the machine this event relates to.
1199 </desc>
1200 </param>
1201 <param name="name" type="wstring" dir="in">
1202 <desc>
1203 The name of the property that has changed.
1204 </desc>
1205 </param>
1206 <param name="value" type="wstring" dir="in">
1207 <desc>
1208 The new property value.
1209 </desc>
1210 </param>
1211 <param name="flags" type="wstring" dir="in">
1212 <desc>
1213 The new property flags.
1214 </desc>
1215 </param>
1216 </method>
1217
1218 </interface>
1219
1220 <interface
1221 name="IDHCPServer" extends="$unknown"
1222 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1223 wsmap="managed"
1224 >
1225 <desc>
1226 The IDHCPServer interface represents the vbox dhcp server configuration.
1227
1228 To enumerate all the dhcp servers on the host, use the
1229 <link to="IVirtualBox::DHCPServers"/> attribute.
1230 </desc>
1231
1232 <attribute name="enabled" type="boolean">
1233 <desc>
1234 specifies if the dhcp server is enabled
1235 </desc>
1236 </attribute>
1237
1238 <attribute name="IPAddress" type="wstring" readonly="yes">
1239 <desc>
1240 specifies server IP
1241 </desc>
1242 </attribute>
1243
1244 <attribute name="networkMask" type="wstring" readonly="yes">
1245 <desc>
1246 specifies server network mask
1247 </desc>
1248 </attribute>
1249
1250 <attribute name="networkName" type="wstring" readonly="yes">
1251 <desc>
1252 specifies internal network name the server is used for
1253 </desc>
1254 </attribute>
1255
1256 <attribute name="lowerIP" type="wstring" readonly="yes">
1257 <desc>
1258 specifies from IP adrres in server address range
1259 </desc>
1260 </attribute>
1261
1262 <attribute name="upperIP" type="wstring" readonly="yes">
1263 <desc>
1264 specifies to IP adrres in server address range
1265 </desc>
1266 </attribute>
1267
1268 <method name="setConfiguration">
1269 <desc>
1270 configures the server
1271 <result name="E_INVALIDARG">
1272 invalid configuration supplied
1273 </result>
1274 </desc>
1275 <param name="IPAddress" type="wstring" dir="in">
1276 <desc>
1277 server IP address
1278 </desc>
1279 </param>
1280 <param name="networkMask" type="wstring" dir="in">
1281 <desc>
1282 server network mask
1283 </desc>
1284 </param>
1285 <param name="FromIPAddress" type="wstring" dir="in">
1286 <desc>
1287 server From IP address for address range
1288 </desc>
1289 </param>
1290 <param name="ToIPAddress" type="wstring" dir="in">
1291 <desc>
1292 server To IP address for address range
1293 </desc>
1294 </param>
1295 </method>
1296
1297 <method name="start">
1298 <desc>
1299 Starts DHCP server process.
1300 <result name="E_FAIL">
1301 Failed to start the process.
1302 </result>
1303 </desc>
1304 <param name="networkName" type="wstring" dir="in">
1305 <desc>
1306 Name of internal network DHCP server should attach to.
1307 </desc>
1308 </param>
1309 <param name="trunkName" type="wstring" dir="in">
1310 <desc>
1311 Name of internal network trunk.
1312 </desc>
1313 </param>
1314 <param name="trunkType" type="wstring" dir="in">
1315 <desc>
1316 Type of internal network trunk.
1317 </desc>
1318 </param>
1319 </method>
1320
1321 <method name="stop">
1322 <desc>
1323 Stops DHCP server process.
1324 <result name="E_FAIL">
1325 Failed to stop the process.
1326 </result>
1327 </desc>
1328 </method>
1329 </interface>
1330
1331 <interface
1332 name="IVirtualBox" extends="$dispatched"
1333 uuid="3f4ab53a-199b-4526-a91a-93ff62e456b8"
1334 wsmap="managed"
1335 >
1336 <desc>
1337 The IVirtualBox interface represents the main interface exposed by the
1338 product that provides virtual machine management.
1339
1340 An instance of IVirtualBox is required for the product to do anything
1341 useful. Even though the interface does not expose this, internally,
1342 IVirtualBox is implemented as a singleton and actually lives in the
1343 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1344 IVirtualBox can track the state of all virtual machines on a particular
1345 host, regardless of which frontend started them.
1346
1347 To enumerate all the virtual machines on the host, use the
1348 <link to="IVirtualBox::machines"/> attribute.
1349 </desc>
1350
1351 <attribute name="version" type="wstring" readonly="yes">
1352 <desc>
1353 A string representing the version number of the product. The
1354 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1355 last number represents the build number and will frequently change.
1356 </desc>
1357 </attribute>
1358
1359 <attribute name="revision" type="unsigned long" readonly="yes">
1360 <desc>
1361 The internal build revision number of the product.
1362 </desc>
1363 </attribute>
1364
1365 <attribute name="packageType" type="wstring" readonly="yes">
1366 <desc>
1367 A string representing the package type of this product. The
1368 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1369 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1370 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1371 this.
1372 </desc>
1373 </attribute>
1374
1375 <attribute name="homeFolder" type="wstring" readonly="yes">
1376 <desc>
1377 Full path to the directory where the global settings file,
1378 <tt>VirtualBox.xml</tt>, is stored.
1379
1380 In this version of VirtualBox, the value of this property is
1381 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1382 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1383 as determined by the host OS), and cannot be changed.
1384
1385 This path is also used as the base to resolve relative paths in
1386 places where relative paths are allowed (unless otherwise
1387 expressly indicated).
1388 </desc>
1389 </attribute>
1390
1391 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1392 <desc>
1393 Full name of the global settings file.
1394 The value of this property corresponds to the value of
1395 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1396 </desc>
1397 </attribute>
1398
1399 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1400 <desc>
1401 Current version of the format of the global VirtualBox settings file
1402 (<tt>VirtualBox.xml</tt>).
1403
1404 The version string has the following format:
1405 <pre>
1406 x.y-platform
1407 </pre>
1408 where @c x and @c y are the major and the minor format
1409 versions, and @c platform is the platform identifier.
1410
1411 The current version usually matches the value of the
1412 <link to="#settingsFormatVersion"/> attribute unless the
1413 settings file was created by an older version of VirtualBox and there
1414 was a change of the settings file format since then.
1415
1416 Note that VirtualBox automatically converts settings files from older
1417 versions to the most recent version when reading them (usually at
1418 VirtualBox startup) but it doesn't save the changes back until
1419 you call a method that implicitly saves settings (such as
1420 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1421 explicitly. Therefore, if the value of this attribute differs from the
1422 value of <link to="#settingsFormatVersion"/>, then it
1423 means that the settings file was converted but the result of the
1424 conversion is not yet saved to disk.
1425
1426 The above feature may be used by interactive front-ends to inform users
1427 about the settings file format change and offer them to explicitly save
1428 all converted settings files (the global and VM-specific ones),
1429 optionally create backup copies of the old settings files before saving,
1430 etc.
1431
1432 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1433 </desc>
1434 </attribute>
1435
1436 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1437 <desc>
1438 Most recent version of the settings file format.
1439
1440 The version string has the following format:
1441 <pre>
1442 x.y-platform
1443 </pre>
1444 where @c x and @c y are the major and the minor format
1445 versions, and @c platform is the platform identifier.
1446
1447 VirtualBox uses this version of the format when saving settings files
1448 (either as a result of method calls that require to save settings or as
1449 a result of an explicit call to <link to="#saveSettings"/>).
1450
1451 <see>settingsFileVersion</see>
1452 </desc>
1453 </attribute>
1454
1455 <attribute name="host" type="IHost" readonly="yes">
1456 <desc>Associated host object.</desc>
1457 </attribute>
1458
1459 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1460 <desc>Associated system information object.</desc>
1461 </attribute>
1462
1463 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1464 <desc>
1465 Array of machine objects registered within this VirtualBox instance.
1466 </desc>
1467 </attribute>
1468
1469 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1470 <desc>
1471 Array of hard disk objects known to this VirtualBox installation.
1472
1473 This array contains only base (root) hard disks. All differencing
1474 hard disks of the given base hard disk can be enumerated using
1475 <link to="IHardDisk::children"/>.
1476 </desc>
1477 </attribute>
1478
1479 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1480 <desc>
1481 Array of CD/DVD image objects registered with this VirtualBox instance.
1482 </desc>
1483 </attribute>
1484
1485 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1486 <desc>
1487 Array of floppy image objects registered with this VirtualBox instance.
1488 </desc>
1489 </attribute>
1490
1491 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1492
1493 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1494
1495 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1496 <desc>
1497 Collection of global shared folders. Global shared folders are
1498 available to all virtual machines.
1499
1500 New shared folders are added to the collection using
1501 <link to="#createSharedFolder"/>. Existing shared folders can be
1502 removed using <link to="#removeSharedFolder"/>.
1503
1504 <note>
1505 In the current version of the product, global shared folders are not
1506 implemented and therefore this collection is always empty.
1507 </note>
1508 </desc>
1509 </attribute>
1510
1511 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1512 <desc>
1513 Associated performance collector object.
1514 </desc>
1515 </attribute>
1516
1517 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1518 <desc>
1519 dhcp server settings.
1520 </desc>
1521 </attribute>
1522
1523 <method name="createMachine">
1524 <desc>
1525 Creates a new virtual machine.
1526
1527 The new machine is created unregistered, with the initial configuration
1528 set according to the specified guest OS type. A typical sequence of
1529 actions to create a new virtual machine is as follows:
1530
1531 <ol>
1532 <li>
1533 Call this method to have a new machine created. The returned machine
1534 object will be "mutable" allowing to change any machine property.
1535 </li>
1536
1537 <li>
1538 Configure the machine using the appropriate attributes and methods.
1539 </li>
1540
1541 <li>
1542 Call <link to="IMachine::saveSettings" /> to write the settings
1543 to the machine's XML settings file. The configuration of the newly
1544 created machine will not be saved to disk until this method is
1545 called.
1546 </li>
1547
1548 <li>
1549 Call <link to="#registerMachine" /> to add the machine to the list
1550 of machines known to VirtualBox.
1551 </li>
1552 </ol>
1553
1554 You should specify valid name for the newly created machine when calling
1555 this method. See the <link to="IMachine::name"/> attribute description
1556 for more details about the machine name.
1557
1558 The specified guest OS type identifier must match an ID of one of known
1559 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1560 array.
1561
1562 Every machine has a <i>settings file</i> that is used to store
1563 the machine configuration. This file is stored in a directory called the
1564 <i>machine settings subfolder</i>. Both the settings subfolder and file
1565 will have a name that corresponds to the name of the virtual machine.
1566 You can specify where to create the machine setting subfolder using the
1567 @a baseFolder argument. The base folder can be absolute (full path) or
1568 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1569 directory</link>.
1570
1571 If @a baseFolder is a @c null or empty string (which is recommended), the
1572 <link to="ISystemProperties::defaultMachineFolder">default machine
1573 settings folder</link> will be used as a base folder for the created
1574 machine. Otherwise the given base folder will be used. In either case,
1575 the full path to the resulting settings file has the following
1576 structure:
1577 <pre>
1578 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1579 </pre>
1580
1581 Note that if the resulting settings file already exists, this method
1582 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1583
1584 Optionally, you may specify an UUID of to assign to the created machine.
1585 However, this is not recommended and you should normally pass an empty
1586 (@c null) UUID to this method so that a new UUID will be automatically
1587 generated for every created machine. You can use UUID
1588 00000000-0000-0000-0000-000000000000 as @c null value.
1589
1590 <note>
1591 There is no way to change the name of the settings file or
1592 subfolder of the created machine directly.
1593 </note>
1594
1595 <result name="VBOX_E_OBJECT_NOT_FOUND">
1596 @a osTypeId is invalid.
1597 </result>
1598 <result name="VBOX_E_FILE_ERROR">
1599 Resulting settings file name is invalid or the settings file already
1600 exists or could not be created due to an I/O error.
1601 </result>
1602 <result name="E_INVALIDARG">
1603 @a name is empty or @c null.
1604 </result>
1605 </desc>
1606
1607 <param name="name" type="wstring" dir="in">
1608 <desc>Machine name.</desc>
1609 </param>
1610 <param name="osTypeId" type="wstring" dir="in">
1611 <desc>Guest OS Type ID.</desc>
1612 </param>
1613 <param name="baseFolder" type="wstring" dir="in">
1614 <desc>Base machine folder (optional).</desc>
1615 </param>
1616 <param name="id" type="wstring" dir="in">
1617 <desc>Machine UUID (optional).</desc>
1618 </param>
1619 <param name="machine" type="IMachine" dir="return">
1620 <desc>Created machine object.</desc>
1621 </param>
1622 </method>
1623
1624 <method name="createLegacyMachine">
1625 <desc>
1626 Creates a new virtual machine in "legacy" mode, using the specified
1627 settings file to store machine settings.
1628
1629 As opposed to machines created by <link to="#createMachine"/>,
1630 the settings file of the machine created in "legacy" mode is not
1631 automatically renamed when the machine name is changed -- it will always
1632 remain the same as specified in this method call.
1633
1634 The specified settings file name can be absolute (full path) or relative
1635 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1636 directory</link>. If the file name doesn't contain an extension, the
1637 default extension (.xml) will be appended.
1638
1639 Note that the configuration of the newly created machine is not
1640 saved to disk (and therefore no settings file is created)
1641 until <link to="IMachine::saveSettings"/> is called. If the
1642 specified settings file already exists, this method
1643 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1644
1645 See <link to="#createMachine"/> for more information.
1646
1647 @deprecated This method may be removed later. Use <link
1648 to="IVirtualBox::createMachine"/> instead.
1649
1650 <note>
1651 There is no way to change the name of the settings file
1652 of the machine created in "legacy" mode.
1653 </note>
1654
1655 <result name="VBOX_E_OBJECT_NOT_FOUND">
1656 @a osTypeId is invalid.
1657 </result>
1658 <result name="VBOX_E_FILE_ERROR">
1659 @a settingsFile is invalid or the settings file already exists or
1660 could not be created due to an I/O error.
1661 </result>
1662 <result name="E_INVALIDARG">
1663 @a name or @a settingsFile is empty or @c null.
1664 </result>
1665 </desc>
1666
1667 <param name="name" type="wstring" dir="in">
1668 <desc>Machine name.</desc>
1669 </param>
1670 <param name="osTypeId" type="wstring" dir="in">
1671 <desc>Machine OS Type ID.</desc>
1672 </param>
1673 <param name="settingsFile" type="wstring" dir="in">
1674 <desc>Name of the machine settings file.</desc>
1675 </param>
1676 <param name="id" type="wstring" dir="in">
1677 <desc>Machine UUID (optional).</desc>
1678 </param>
1679 <param name="machine" type="IMachine" dir="return">
1680 <desc>Created machine object.</desc>
1681 </param>
1682 </method>
1683
1684 <method name="openMachine">
1685 <desc>
1686 Opens a virtual machine from the existing settings file.
1687 The opened machine remains unregistered until you call
1688 <link to="#registerMachine"/>.
1689
1690 The specified settings file name can be absolute
1691 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1692 VirtualBox home directory</link>. This file must exist
1693 and must be a valid machine settings file whose contents
1694 will be used to construct the machine object.
1695
1696 @deprecated Will be removed soon.
1697 <result name="VBOX_E_FILE_ERROR">
1698 Settings file name invalid, not found or sharing violation.
1699 </result>
1700 </desc>
1701 <param name="settingsFile" type="wstring" dir="in">
1702 <desc>
1703 Name of the machine settings file.
1704 </desc>
1705 </param>
1706 <param name="machine" type="IMachine" dir="return">
1707 <desc>Opened machine object.</desc>
1708 </param>
1709 <note>
1710 <link to="IMachine::settingsModified"/> will return
1711 @c false for the created machine, until any of machine settings
1712 are changed.
1713 </note>
1714 </method>
1715
1716 <method name="registerMachine">
1717 <desc>
1718
1719 Registers the machine previously created using
1720 <link to="#createMachine"/> or opened using
1721 <link to="#openMachine"/> within this VirtualBox installation. After
1722 successful method invocation, the
1723 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1724 to all registered callbacks.
1725
1726 <note>
1727 This method implicitly calls <link to="IMachine::saveSettings"/>
1728 to save all current machine settings before registering it.
1729 </note>
1730
1731 <result name="VBOX_E_OBJECT_NOT_FOUND">
1732 No matching virtual machine found.
1733 </result>
1734 <result name="VBOX_E_INVALID_OBJECT_STATE">
1735 Virtual machine was not created within this VirtualBox instance.
1736 </result>
1737
1738 </desc>
1739 <param name="machine" type="IMachine" dir="in"/>
1740 </method>
1741
1742 <method name="getMachine">
1743 <desc>
1744 Attempts to find a virtual machine given its UUID.
1745 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1746 instead.
1747
1748 <result name="VBOX_E_OBJECT_NOT_FOUND">
1749 Could not find registered machine matching @a id.
1750 </result>
1751
1752 </desc>
1753 <param name="id" type="wstring" dir="in"/>
1754 <param name="machine" type="IMachine" dir="return"/>
1755 </method>
1756
1757 <method name="findMachine">
1758 <desc>
1759 Attempts to find a virtual machine given its name.
1760 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1761 instead.
1762
1763 <result name="VBOX_E_OBJECT_NOT_FOUND">
1764 Could not find registered machine matching @a name.
1765 </result>
1766
1767 </desc>
1768 <param name="name" type="wstring" dir="in"/>
1769 <param name="machine" type="IMachine" dir="return"/>
1770 </method>
1771
1772 <method name="unregisterMachine">
1773 <desc>
1774
1775 Unregisters the machine previously registered using
1776 <link to="#registerMachine"/>. After successful method invocation, the
1777 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1778 to all registered callbacks.
1779
1780 <note>
1781 The specified machine must not be in the Saved state, have an open
1782 (or a spawning) direct session associated with it, have snapshots or
1783 have hard disks attached.
1784 </note>
1785
1786 <note>
1787 This method implicitly calls <link to="IMachine::saveSettings"/> to
1788 save all current machine settings before unregistering it.
1789 </note>
1790
1791 <note>
1792 If the given machine is inaccessible (see
1793 <link to="IMachine::accessible"/>), it will be unregistered and
1794 fully uninitialized right afterwards. As a result, the returned
1795 machine object will be unusable and an attempt to call
1796 <b>any</b> method will return the "Object not ready" error.
1797 </note>
1798
1799 <result name="VBOX_E_OBJECT_NOT_FOUND">
1800 Could not find registered machine matching @a id.
1801 </result>
1802 <result name="VBOX_E_INVALID_VM_STATE">
1803 Machine is in Saved state.
1804 </result>
1805 <result name="VBOX_E_INVALID_OBJECT_STATE">
1806 Machine has snapshot or open session or hard disk attached.
1807 </result>
1808
1809 </desc>
1810 <param name="id" type="wstring" dir="in">
1811 <desc>UUID of the machine to unregister.</desc>
1812 </param>
1813 <param name="machine" type="IMachine" dir="return">
1814 <desc>Unregistered machine object.</desc>
1815 </param>
1816 </method>
1817
1818 <method name="createAppliance">
1819 <desc>
1820 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1821 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1822 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1823 </desc>
1824 <param name="appliance" type="IAppliance" dir="return">
1825 <desc>New appliance.</desc>
1826 </param>
1827 </method>
1828
1829 <method name="createHardDisk">
1830 <desc>
1831 Creates a new base hard disk object that will use the given storage
1832 format and location for hard disk data.
1833
1834 Note that the actual storage unit is not created by this method. In
1835 order to do it, and before you are able to attach the created hard disk
1836 to virtual machines, you must call one of the following methods to
1837 allocate a format-specific storage unit at the specified location:
1838 <ul>
1839 <li><link to="IHardDisk::createBaseStorage"/></li>
1840 <li><link to="IHardDisk::createDiffStorage"/></li>
1841 </ul>
1842
1843 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1844 remain uninitialized until the hard disk storage unit is successfully
1845 created by one of the above methods.
1846
1847 After the storage unit is successfully created, the hard disk gets
1848 remembered by this VirtualBox installation and will be accessible
1849 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1850 methods. Remembered root (base) hard disks are also returned as part of
1851 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1852
1853 The list of all storage formats supported by this VirtualBox
1854 installation can be obtained using
1855 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1856 attribute is empty or @c null then the default storage format
1857 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1858 be used for creating a storage unit of the hard disk.
1859
1860 Note that the format of the location string is storage format specific.
1861 See <link to="IMedium::location"/>, IHardDisk and
1862 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1863
1864 <result name="VBOX_E_OBJECT_NOT_FOUND">
1865 @a format identifier is invalid. See
1866 <link to="ISystemProperties::hardDiskFormats"/>.
1867 </result>
1868 <result name="VBOX_E_FILE_ERROR">
1869 @a location is a not valid file name (for file-based formats only).
1870 </result>
1871 </desc>
1872 <param name="format" type="wstring" dir="in">
1873 <desc>
1874 Identifier of the storage format to use for the new hard disk.
1875 </desc>
1876 </param>
1877 <param name="location" type="wstring" dir="in">
1878 <desc>
1879 Location of the storage unit for the new hard disk.
1880 </desc>
1881 </param>
1882 <param name="hardDisk" type="IHardDisk" dir="return">
1883 <desc>Created hard disk object.</desc>
1884 </param>
1885 </method>
1886
1887 <method name="openHardDisk">
1888 <desc>
1889 Opens a hard disk from an existing location, optionally replacing
1890 the image UUID and/or parent UUID.
1891
1892 After the hard disk is successfully opened by this method, it gets
1893 remembered by (known to) this VirtualBox installation and will be
1894 accessible through <link to="#getHardDisk"/> and
1895 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1896 are also returned as part of the <link to="#hardDisks"/> array and can
1897 be attached to virtual machines. See IHardDisk for more details.
1898
1899 If a differencing hard disk is to be opened by this method, the
1900 operation will succeed only if its parent hard disk and all ancestors,
1901 if any, are already known to this VirtualBox installation (for example,
1902 were opened by this method before).
1903
1904 This method tries to guess the storage format of the specified hard disk
1905 by reading hard disk data at the specified location.
1906
1907 If @a write is ReadWrite (which it should be), the image is opened for
1908 read/write access and must have according permissions, as VirtualBox
1909 may actually write status information into the disk's metadata sections.
1910
1911 Note that write access is required for all typical image usage in VirtualBox,
1912 since VirtualBox may need to write metadata such as a UUID into the image.
1913 The only exception is opening a source image temporarily for copying and
1914 cloning when the image will quickly be closed again.
1915
1916 Note that the format of the location string is storage format specific.
1917 See <link to="IMedium::location"/>, IHardDisk and
1918 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1919
1920 <result name="VBOX_E_FILE_ERROR">
1921 Invalid hard disk storage file location or could not find the hard
1922 disk at the specified location.
1923 </result>
1924 <result name="VBOX_E_IPRT_ERROR">
1925 Could not get hard disk storage format.
1926 </result>
1927 <result name="E_INVALIDARG">
1928 Invalid hard disk storage format.
1929 </result>
1930
1931 </desc>
1932 <param name="location" type="wstring" dir="in">
1933 <desc>
1934 Location of the storage unit that contains hard disk data in one of
1935 the supported storage formats.
1936 </desc>
1937 </param>
1938 <param name="accessMode" type="AccessMode" dir="in">
1939 <desc>
1940 Determines whether to open the image in read/write or read-only mode.
1941 </desc>
1942 </param>
1943 <param name="setImageId" type="boolean" dir="in">
1944 <desc>
1945 Select whether a new image UUID is set or not.
1946 </desc>
1947 </param>
1948 <param name="imageId" type="wstring" dir="in">
1949 <desc>
1950 New UUID for the image. If an empty string is passed, then a new
1951 UUID is automatically created. Specifying a zero UUIDs is not valid.
1952 </desc>
1953 </param>
1954 <param name="setParentId" type="boolean" dir="in">
1955 <desc>
1956 Select whether a new parent UUID is set or not.
1957 </desc>
1958 </param>
1959 <param name="parentId" type="wstring" dir="in">
1960 <desc>
1961 New parent UUID for the image. If an empty string is passed, then a
1962 new UUID is automatically created, provided @a setParentId is
1963 @c true. A zero UUID is valid.
1964 </desc>
1965 </param>
1966 <param name="hardDisk" type="IHardDisk" dir="return">
1967 <desc>Opened hard disk object.</desc>
1968 </param>
1969 </method>
1970
1971 <method name="getHardDisk" const="yes">
1972 <desc>
1973 Returns a hard disk with the given UUID.
1974
1975 The hard disk with the given UUID must be known to this VirtualBox
1976 installation, i.e. it must be previously created by
1977 <link to="#createHardDisk"/> or opened by <link
1978 to="#openHardDisk"/>, or attached to some known virtual machine.
1979
1980 <result name="VBOX_E_OBJECT_NOT_FOUND">
1981 No hard disk object matching @a id found.
1982 </result>
1983
1984 </desc>
1985 <param name="id" type="wstring" dir="in">
1986 <desc>UUID of the hard disk to look for.</desc>
1987 </param>
1988 <param name="hardDisk" type="IHardDisk" dir="return">
1989 <desc>Found hard disk object.</desc>
1990 </param>
1991 </method>
1992
1993 <method name="findHardDisk">
1994 <desc>
1995 Returns a hard disk that uses the given location to store hard
1996 disk data.
1997
1998 The given hard disk must be known to this VirtualBox installation, i.e.
1999 it must be previously created by
2000 <link to="#createHardDisk"/> or opened by <link
2001 to="#openHardDisk"/>, or attached to some known virtual machine.
2002
2003 The search is done by comparing the value of the @a location argument to
2004 the <link to="IHardDisk::location"/> attribute of each known hard
2005 disk.
2006
2007 For locations represented by file names in the host's file system, the
2008 requested location can be a path relative to the
2009 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2010 only a file name without any path is given, the
2011 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2012 folder</link> will be prepended to the file name before searching. Note
2013 that on case sensitive file systems, a case sensitive comparison is
2014 performed, otherwise the case of symbols in the file path is ignored.
2015
2016 <result name="VBOX_E_OBJECT_NOT_FOUND">
2017 No hard disk object matching @a location found.
2018 </result>
2019
2020 </desc>
2021 <param name="location" type="wstring" dir="in">
2022 <desc>Location string to search for.</desc>
2023 </param>
2024 <param name="hardDisk" type="IHardDisk" dir="return">
2025 <desc>Found hard disk object.</desc>
2026 </param>
2027 </method>
2028
2029 <method name="openDVDImage">
2030 <desc>
2031 Opens a CD/DVD image contained in the specified file of the supported
2032 format and assigns it the given UUID.
2033
2034 After the image is successfully opened by this method, it gets
2035 remembered by (known to) this VirtualBox installation and will be
2036 accessible through <link to="#getDVDImage"/> and
2037 <link to="#findDVDImage"/> methods. Remembered images are also
2038 returned as part of the <link to="#DVDImages"/> array and can be mounted
2039 to virtual machines. See IMedium for more details.
2040
2041 See <link to="IMedium::location"/> to get more details about the format
2042 of the location string.
2043
2044 <note>
2045 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2046 </note>
2047
2048 <result name="VBOX_E_FILE_ERROR">
2049 Invalid CD/DVD image file location or could not find the CD/DVD
2050 image at the specified location.
2051 </result>
2052 <result name="VBOX_E_INVALID_OBJECT_STATE">
2053 CD/DVD image already exists in the media registry.
2054 </result>
2055
2056 </desc>
2057 <param name="location" type="wstring" dir="in">
2058 <desc>
2059 Full path to the file that contains a valid CD/DVD image.
2060 </desc>
2061 </param>
2062 <param name="id" type="wstring" dir="in">
2063 <desc>
2064 UUID to assign to the given image within this VirtualBox installation.
2065 If an empty (@c null) UUID is specified, the system will randomly
2066 generate a new UUID.
2067 </desc>
2068 </param>
2069 <param name="image" type="IDVDImage" dir="return">
2070 <desc>Opened CD/DVD image object.</desc>
2071 </param>
2072 </method>
2073
2074 <method name="getDVDImage">
2075 <desc>
2076 Returns a CD/DVD image with the given UUID.
2077
2078 The image with the given UUID must be known to this VirtualBox
2079 installation, i.e. it must be previously opened by <link
2080 to="#openDVDImage"/>, or mounted to some known virtual machine.
2081
2082 <result name="VBOX_E_OBJECT_NOT_FOUND">
2083 No matching DVD image found in the media registry.
2084 </result>
2085
2086 </desc>
2087 <param name="id" type="wstring" dir="in">
2088 <desc>UUID of the image to look for.</desc>
2089 </param>
2090 <param name="image" type="IDVDImage" dir="return">
2091 <desc>Found CD/DVD image object.</desc>
2092 </param>
2093 </method>
2094
2095 <method name="findDVDImage">
2096 <desc>
2097 Returns a CD/DVD image with the given image location.
2098
2099 The image with the given UUID must be known to this VirtualBox
2100 installation, i.e. it must be previously opened by <link
2101 to="#openDVDImage"/>, or mounted to some known virtual machine.
2102
2103 The search is done by comparing the value of the @a location argument to
2104 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2105
2106 The requested location can be a path relative to the
2107 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2108 only a file name without any path is given, the
2109 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2110 folder</link> will be prepended to the file name before searching. Note
2111 that on case sensitive file systems, a case sensitive comparison is
2112 performed, otherwise the case in the file path is ignored.
2113
2114 <result name="VBOX_E_FILE_ERROR">
2115 Invalid image file location.
2116 </result>
2117 <result name="VBOX_E_OBJECT_NOT_FOUND">
2118 No matching DVD image found in the media registry.
2119 </result>
2120
2121 </desc>
2122 <param name="location" type="wstring" dir="in">
2123 <desc>CD/DVD image file path to look for.</desc>
2124 </param>
2125 <param name="image" type="IDVDImage" dir="return">
2126 <desc>Found CD/DVD image object.</desc>
2127 </param>
2128 </method>
2129
2130 <method name="openFloppyImage">
2131 <desc>
2132 Opens a floppy image contained in the specified file of the supported
2133 format and assigns it the given UUID.
2134
2135 After the image is successfully opened by this method, it gets
2136 remembered by (known to) this VirtualBox installation and will be
2137 accessible through <link to="#getFloppyImage"/> and
2138 <link to="#findFloppyImage"/> methods. Remembered images are also
2139 returned as part of the <link to="#floppyImages"/> array and can be
2140 mounted to virtual machines. See IMedium for more details.
2141
2142 See <link to="IMedium::location"/> to get more details about the format
2143 of the location string.
2144
2145 <result name="VBOX_E_FILE_ERROR">
2146 Invalid floppy image file location or could not find the floppy
2147 image at the specified location.
2148 </result>
2149 <result name="VBOX_E_INVALID_OBJECT_STATE">
2150 Floppy image already exists in the media registry.
2151 </result>
2152
2153 <note>
2154 Currently, only raw floppy images are supported by VirtualBox.
2155 </note>
2156 </desc>
2157 <param name="location" type="wstring" dir="in">
2158 <desc>
2159 Full path to the file that contains a valid floppy image.
2160 </desc>
2161 </param>
2162 <param name="id" type="wstring" dir="in">
2163 <desc>
2164 UUID to assign to the given image file within this VirtualBox
2165 installation. If an empty (@c null) UUID is specified, the system will
2166 randomly generate a new UUID.
2167 </desc>
2168 </param>
2169 <param name="image" type="IFloppyImage" dir="return">
2170 <desc>Opened floppy image object.</desc>
2171 </param>
2172 </method>
2173
2174 <method name="getFloppyImage">
2175 <desc>
2176 Returns a floppy image with the given UUID.
2177
2178 The image with the given UUID must be known to this VirtualBox
2179 installation, i.e. it must be previously opened by <link
2180 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2181
2182 <result name="VBOX_E_OBJECT_NOT_FOUND">
2183 No matching floppy image found in the media registry.
2184 </result>
2185
2186 </desc>
2187 <param name="id" type="wstring" dir="in">
2188 <desc>UUID of the image to look for.</desc>
2189 </param>
2190 <param name="image" type="IFloppyImage" dir="return">
2191 <desc>Found floppy image object.</desc>
2192 </param>
2193 </method>
2194
2195 <method name="findFloppyImage">
2196 <desc>
2197 Returns a floppy image with the given image location.
2198
2199 The image with the given UUID must be known to this VirtualBox
2200 installation, i.e. it must be previously opened by <link
2201 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2202
2203 The search is done by comparing the value of the @a location argument to
2204 the <link to="IMedium::location"/> attribute of each known floppy image.
2205
2206 The requested location can be a path relative to the
2207 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2208 only a file name without any path is given, the
2209 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2210 folder</link> will be prepended to the file name before searching. Note
2211 that on case sensitive file systems, a case sensitive comparison is
2212 performed, otherwise the case of symbols in the file path is ignored.
2213
2214 <result name="VBOX_E_FILE_ERROR">
2215 Invalid image file location.
2216 </result>
2217 <result name="VBOX_E_OBJECT_NOT_FOUND">
2218 No matching floppy image found in the media registry.
2219 </result>
2220
2221 </desc>
2222 <param name="location" type="wstring" dir="in">
2223 <desc>Floppy image file path to look for.</desc>
2224 </param>
2225 <param name="image" type="IFloppyImage" dir="return">
2226 <desc>Found floppy image object.</desc>
2227 </param>
2228 </method>
2229
2230 <method name="getGuestOSType">
2231 <desc>
2232 Returns an object describing the specified guest OS type.
2233
2234 The requested guest OS type is specified using a string which is a
2235 mnemonic identifier of the guest operating system, such as
2236 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2237 particular virtual machine can be read or set using the
2238 <link to="IMachine::OSTypeId"/> attribute.
2239
2240 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2241 available guest OS type objects. Each object has an
2242 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2243 the guest OS this object describes.
2244
2245 <result name="E_INVALIDARG">
2246 @a id is not a valid Guest OS type.
2247 </result>
2248
2249 </desc>
2250 <param name="id" type="wstring" dir="in">
2251 <desc>Guest OS type ID string.</desc>
2252 </param>
2253 <param name="type" type="IGuestOSType" dir="return">
2254 <desc>Guest OS type object.</desc>
2255 </param>
2256 </method>
2257
2258 <method name="createSharedFolder">
2259 <desc>
2260 Creates a new global shared folder by associating the given logical
2261 name with the given host path, adds it to the collection of shared
2262 folders and starts sharing it. Refer to the description of
2263 <link to="ISharedFolder"/> to read more about logical names.
2264 <note>
2265 In the current implementation, this operation is not
2266 implemented.
2267 </note>
2268 </desc>
2269 <param name="name" type="wstring" dir="in">
2270 <desc>Unique logical name of the shared folder.</desc>
2271 </param>
2272 <param name="hostPath" type="wstring" dir="in">
2273 <desc>Full path to the shared folder in the host file system.</desc>
2274 </param>
2275 <param name="writable" type="boolean" dir="in">
2276 <desc>Whether the share is writable or readonly</desc>
2277 </param>
2278 </method>
2279
2280 <method name="removeSharedFolder">
2281 <desc>
2282 Removes the global shared folder with the given name previously
2283 created by <link to="#createSharedFolder"/> from the collection of
2284 shared folders and stops sharing it.
2285 <note>
2286 In the current implementation, this operation is not
2287 implemented.
2288 </note>
2289 </desc>
2290 <param name="name" type="wstring" dir="in">
2291 <desc>Logical name of the shared folder to remove.</desc>
2292 </param>
2293 </method>
2294
2295 <method name="getNextExtraDataKey">
2296 <desc>
2297 Returns the global extra data key name following the supplied key.
2298
2299 An error is returned if the supplied @a key does not exist. An empty
2300 string is returned in @a nextKey if the supplied key is the last key. When
2301 supplying @c null or an empty string for the @a key, the first key item
2302 is returned in @a nextKey (if there is any). @a nextValue is an optional
2303 parameter and if supplied, the next key's value is returned in it.
2304
2305 <result name="VBOX_E_OBJECT_NOT_FOUND">
2306 Extra data @a key not found.
2307 </result>
2308
2309 </desc>
2310 <param name="key" type="wstring" dir="in">
2311 <desc>Name of the data key to follow.</desc>
2312 </param>
2313 <param name="nextKey" type="wstring" dir="out">
2314 <desc>Name of the next data key.</desc>
2315 </param>
2316 <param name="nextValue" type="wstring" dir="out">
2317 <desc>Value of the next data key.</desc>
2318 </param>
2319 </method>
2320
2321 <method name="getExtraData">
2322 <desc>
2323 Returns associated global extra data.
2324
2325 If the requested data @a key does not exist, this function will
2326 succeed and return an empty string in the @a value argument.
2327
2328 <result name="VBOX_E_FILE_ERROR">
2329 Settings file not accessible.
2330 </result>
2331 <result name="VBOX_E_XML_ERROR">
2332 Could not parse the settings file.
2333 </result>
2334
2335 </desc>
2336 <param name="key" type="wstring" dir="in">
2337 <desc>Name of the data key to get.</desc>
2338 </param>
2339 <param name="value" type="wstring" dir="return">
2340 <desc>Value of the requested data key.</desc>
2341 </param>
2342 </method>
2343
2344 <method name="setExtraData">
2345 <desc>
2346 Sets associated global extra data.
2347
2348 If you pass @c null or empty string as a key @a value, the given @a key
2349 will be deleted.
2350
2351 <note>
2352 Before performing the actual data change, this method will ask all
2353 registered callbacks using the
2354 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2355 notification for a permission. If one of the callbacks refuses the
2356 new value, the change will not be performed.
2357 </note>
2358 <note>
2359 On success, the
2360 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2361 is called to inform all registered callbacks about a successful data
2362 change.
2363 </note>
2364
2365 <result name="VBOX_E_FILE_ERROR">
2366 Settings file not accessible.
2367 </result>
2368 <result name="VBOX_E_XML_ERROR">
2369 Could not parse the settings file.
2370 </result>
2371 <result name="E_ACCESSDENIED">
2372 Modification request refused.
2373 </result>
2374
2375 </desc>
2376 <param name="key" type="wstring" dir="in">
2377 <desc>Name of the data key to set.</desc>
2378 </param>
2379 <param name="value" type="wstring" dir="in">
2380 <desc>Value to assign to the key.</desc>
2381 </param>
2382 </method>
2383
2384 <method name="openSession">
2385 <desc>
2386 Opens a new direct session with the given virtual machine.
2387
2388 A direct session acts as a local lock on the given VM.
2389 There can be only one direct session open at a time for every
2390 virtual machine, protecting the VM from being manipulated by
2391 conflicting actions from different processes. Only after a
2392 direct session has been opened, one can change all VM settings
2393 and execute the VM in the process space of the session object.
2394
2395 Sessions therefore can be compared to mutex semaphores that
2396 lock a given VM for modification and execution.
2397 See <link to="ISession">ISession</link> for details.
2398
2399 <note>Unless you are writing a new VM frontend, you will not
2400 want to execute a VM in the current process. To spawn a new
2401 process that executes a VM, use
2402 <link to="IVirtualBox::openRemoteSession" />
2403 instead.</note>
2404
2405 Upon successful return, the session object can be used to
2406 get access to the machine and to the VM console.
2407
2408 In VirtualBox terminology, the machine becomes "mutable" after
2409 a session has been opened. Note that the "mutable" machine
2410 object, on which you may invoke IMachine methods to change its
2411 settings, will be a different object from the immutable IMachine
2412 objects returned by various IVirtualBox methods. To obtain a
2413 mutable IMachine object (upon which you can invoke settings methods),
2414 use the <link to="ISession::machine" /> attribute.
2415
2416 One must always call <link to="ISession::close" /> to release the
2417 lock on the machine, or the machine's state will eventually be
2418 set to "Aborted".
2419
2420 In other words, to change settings on a machine, the following
2421 sequence is typically performed:
2422
2423 <ol>
2424 <li>Call this method (openSession) to have a machine locked for
2425 the current session.</li>
2426
2427 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2428
2429 <li>Change the settings of the machine.</li>
2430
2431 <li>Call <link to="IMachine::saveSettings" />.</li>
2432
2433 <li>Close the session by calling <link to="ISession::close"/>.</li>
2434 </ol>
2435
2436 <result name="E_UNEXPECTED">
2437 Virtual machine not registered.
2438 </result>
2439 <result name="E_ACCESSDENIED">
2440 Process not started by OpenRemoteSession.
2441 </result>
2442 <result name="VBOX_E_OBJECT_NOT_FOUND">
2443 No matching virtual machine found.
2444 </result>
2445 <result name="VBOX_E_INVALID_OBJECT_STATE">
2446 Session already open or being opened.
2447 </result>
2448 <result name="VBOX_E_VM_ERROR">
2449 Failed to assign machine to session.
2450 </result>
2451
2452 </desc>
2453 <param name="session" type="ISession" dir="in">
2454 <desc>
2455 Session object that will represent the opened session after
2456 successful method invocation. This object must not represent
2457 the already open session.
2458 <note>
2459 This session will be automatically closed if the
2460 VirtualBox server is terminated for some reason.
2461 </note>
2462 </desc>
2463 </param>
2464 <param name="machineId" type="wstring" dir="in">
2465 <desc>ID of the virtual machine to open a session with.</desc>
2466 </param>
2467 </method>
2468
2469 <method name="openRemoteSession">
2470 <desc>
2471 Spawns a new process that executes a virtual machine (called a
2472 "remote session").
2473
2474 Opening a remote session causes the VirtualBox server to start a new
2475 process that opens a direct session with the given VM. As a result, the
2476 VM is locked by that direct session in the new process, preventing
2477 conflicting changes from other processes. Since sessions act as locks
2478 that prevent conflicting changes, one cannot open a remote session
2479 for a VM that already has another open session (direct or remote), or
2480 is currently in the process of opening one (see <link
2481 to="IMachine::sessionState"/>).
2482
2483 While the remote session still provides some level of control over the
2484 VM execution to the caller (using the <link to="IConsole" /> interface),
2485 not all VM settings are available for modification within the remote
2486 session context.
2487
2488 This operation can take some time (a new VM is started in a new process,
2489 for which memory and other resources need to be set up). Because of this,
2490 an <link to="IProgress" /> is returned to allow the caller to wait for this
2491 asynchronous operation to be completed. Until then, the remote session
2492 object remains in the closed state, and accessing the machine or its
2493 console through it is invalid. It is recommended to use
2494 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2495 completion.
2496
2497 As with all <link to="ISession" /> objects, it is recommended to call
2498 <link to="ISession::close" /> on the local session object once openRemoteSession()
2499 has been called. However, the session's state (see <link to="ISession::state" />)
2500 will not return to "Closed" until the remote session has also closed (i.e.
2501 until the VM is no longer running). In that case, however, the state of
2502 the session will automatically change back to "Closed".
2503
2504 Currently supported session types (values of the @a type
2505 argument) are:
2506 <ul>
2507 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2508 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2509 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2510 </ul>
2511
2512 The @a environment argument is a string containing definitions of
2513 environment variables in the following format:
2514 @code
2515 NAME[=VALUE]\n
2516 NAME[=VALUE]\n
2517 ...
2518 @endcode
2519 where <tt>\\n</tt> is the new line character. These environment
2520 variables will be appended to the environment of the VirtualBox server
2521 process. If an environment variable exists both in the server process
2522 and in this list, the value from this list takes precedence over the
2523 server's variable. If the value of the environment variable is
2524 omitted, this variable will be removed from the resulting environment.
2525 If the environment string is @c null or empty, the server environment
2526 is inherited by the started process as is.
2527
2528 <see>openExistingSession</see>
2529
2530 <result name="E_UNEXPECTED">
2531 Virtual machine not registered.
2532 </result>
2533 <result name="E_INVALIDARG">
2534 Invalid session type @a type.
2535 </result>
2536 <result name="VBOX_E_OBJECT_NOT_FOUND">
2537 No machine matching @a machineId found.
2538 </result>
2539 <result name="VBOX_E_INVALID_OBJECT_STATE">
2540 Session already open or being opened.
2541 </result>
2542 <result name="VBOX_E_IPRT_ERROR">
2543 Launching process for machine failed.
2544 </result>
2545 <result name="VBOX_E_VM_ERROR">
2546 Failed to assign machine to session.
2547 </result>
2548
2549 </desc>
2550 <param name="session" type="ISession" dir="in">
2551 <desc>
2552 Session object that will represent the opened remote session
2553 after successful method invocation (this object must not
2554 represent an already open session).
2555 </desc>
2556 </param>
2557 <param name="machineId" type="wstring" dir="in">
2558 <desc>ID of the virtual machine to open a session with.</desc>
2559 </param>
2560 <param name="type" type="wstring" dir="in">
2561 <desc>
2562 Type of the remote session (case sensitive).
2563 </desc>
2564 </param>
2565 <param name="environment" type="wstring" dir="in">
2566 <desc>
2567 Environment to pass to the opened session.
2568 </desc>
2569 </param>
2570 <param name="progress" type="IProgress" dir="return">
2571 <desc>Progress object to track the operation completion.</desc>
2572 </param>
2573 </method>
2574
2575 <method name="openExistingSession">
2576 <desc>
2577 Opens a new remote session with the virtual machine for
2578 which a direct session is already open.
2579
2580 The remote session provides some level of control over the VM
2581 execution (using the IConsole interface) to the caller; however,
2582 within the remote session context, not all VM settings are available
2583 for modification.
2584
2585 As opposed to <link to="#openRemoteSession"/>, the number of
2586 remote sessions opened this way is not limited by the API
2587
2588 <note>
2589 It is an error to open a remote session with the machine that
2590 doesn't have an open direct session.
2591 </note>
2592
2593 <result name="E_UNEXPECTED">
2594 Virtual machine not registered.
2595 </result>
2596 <result name="VBOX_E_OBJECT_NOT_FOUND">
2597 No machine matching @a machineId found.
2598 </result>
2599 <result name="VBOX_E_INVALID_OBJECT_STATE">
2600 Session already open or being opened.
2601 </result>
2602 <result name="VBOX_E_INVALID_SESSION_STATE">
2603 Direct session state not Open.
2604 </result>
2605 <result name="VBOX_E_VM_ERROR">
2606 Failed to get console object from direct session or assign
2607 machine to session.
2608 </result>
2609
2610 <see>openRemoteSession</see>
2611 </desc>
2612 <param name="session" type="ISession" dir="in">
2613 <desc>
2614 Session object that will represent the open remote session
2615 after successful method invocation. This object must not
2616 represent an already open session.
2617 <note>
2618 This session will be automatically closed when the peer
2619 (direct) session dies or gets closed.
2620 </note>
2621 </desc>
2622 </param>
2623 <param name="machineId" type="wstring" dir="in">
2624 <desc>ID of the virtual machine to open a session with.</desc>
2625 </param>
2626 </method>
2627
2628 <method name="registerCallback">
2629 <desc>
2630 Registers a new global VirtualBox callback. The methods of the given
2631 callback object will be called by VirtualBox when an appropriate
2632 event occurs.
2633
2634 <result name="E_INVALIDARG">
2635 A @c null callback cannot be registered.
2636 </result>
2637
2638 </desc>
2639 <param name="callback" type="IVirtualBoxCallback" dir="in">
2640 <desc>Callback object to register.</desc>
2641 </param>
2642 </method>
2643
2644 <method name="unregisterCallback">
2645 <desc>
2646 Unregisters the previously registered global VirtualBox callback.
2647
2648 <result name="E_INVALIDARG">
2649 Specified @a callback not registered.
2650 </result>
2651
2652 </desc>
2653 <param name="callback" type="IVirtualBoxCallback" dir="in">
2654 <desc>Callback object to unregister.</desc>
2655 </param>
2656 </method>
2657
2658 <method name="waitForPropertyChange">
2659 <desc>
2660 Blocks the caller until any of the properties represented by the
2661 @a what argument changes the value or until the given timeout interval
2662 expires.
2663
2664 The @a what argument is a comma separated list of property masks that
2665 describe properties the caller is interested in. The property mask is
2666 a string in the following format:
2667
2668 <pre>
2669 [[group.]subgroup.]name
2670 </pre>
2671
2672 where @c name is the property name and @c group, @c subgroup are zero
2673 or more property group specifiers. Each element (group or name) in
2674 the property mask may be either a Latin string or an asterisk symbol
2675 (@c "*") which is used to match any string for the given element. A
2676 property mask that doesn't contain asterisk symbols represents a
2677 single fully qualified property name.
2678
2679 Groups in the fully qualified property name go from more generic (the
2680 left-most part) to more specific (the right-most part). The first
2681 element is usually a name of the object the property belongs to. The
2682 second element may be either a property name, or a child object name,
2683 or an index if the preceding element names an object which is one of
2684 many objects of the same type. This way, property names form a
2685 hierarchy of properties. Here are some examples of property names:
2686
2687 <table>
2688 <tr>
2689 <td><tt>VirtualBox.version</tt></td>
2690 <td><link to="IVirtualBox::version"/> property</td>
2691 </tr>
2692 <tr>
2693 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2694 <td><link to="IMachine::name"/> property of the machine with the
2695 given UUID</td>
2696 </tr>
2697 </table>
2698
2699 Most property names directly correspond to the properties of objects
2700 (components) provided by the VirtualBox library and may be used to
2701 track changes to these properties. However, there may be
2702 pseudo-property names that don't correspond to any existing object's
2703 property directly, as well as there may be object properties that
2704 don't have a corresponding property name that is understood by this
2705 method, and therefore changes to such properties cannot be
2706 tracked. See individual object's property descriptions to get a
2707 fully qualified property name that can be used with this method (if
2708 any).
2709
2710 There is a special property mask @c "*" (i.e. a string consisting of a
2711 single asterisk symbol) that can be used to match all properties.
2712 Below are more examples of property masks:
2713
2714 <table>
2715 <tr>
2716 <td><tt>VirtualBox.*</tt></td>
2717 <td>Track all properties of the VirtualBox object</td>
2718 </tr>
2719 <tr>
2720 <td><tt>Machine.*.name</tt></td>
2721 <td>Track changes to the <link to="IMachine::name"/> property of
2722 all registered virtual machines</td>
2723 </tr>
2724 </table>
2725
2726 <note>
2727 This function is not implemented in the current version of the
2728 product.
2729 </note>
2730 </desc>
2731 <param name="what" type="wstring" dir="in">
2732 <desc>Comma separated list of property masks.</desc>
2733 </param>
2734 <param name="timeout" type="unsigned long" dir="in">
2735 <desc>
2736 Wait timeout in milliseconds.
2737 Specify -1 for an indefinite wait.
2738 </desc>
2739 </param>
2740 <param name="changed" type="wstring" dir="out">
2741 <desc>
2742 Comma separated list of properties that have been changed and caused
2743 this method to return to the caller.
2744 </desc>
2745 </param>
2746 <param name="values" type="wstring" dir="out">
2747 <desc>Reserved, not currently used.</desc>
2748 </param>
2749 </method>
2750
2751 <method name="saveSettings">
2752 <desc>
2753 Saves the global settings to the global settings file
2754 (<link to="#settingsFilePath"/>).
2755
2756 This method is only useful for explicitly saving the global settings
2757 file after it has been auto-converted from the old format to the most
2758 recent format (see <link to="#settingsFileVersion"/> for details).
2759 Normally, the global settings file is implicitly saved when a global
2760 setting is changed.
2761
2762 <result name="VBOX_E_FILE_ERROR">
2763 Settings file not accessible.
2764 </result>
2765 <result name="VBOX_E_XML_ERROR">
2766 Could not parse the settings file.
2767 </result>
2768
2769 </desc>
2770 </method>
2771
2772 <method name="saveSettingsWithBackup">
2773 <desc>
2774 Creates a backup copy of the global settings file
2775 (<link to="IVirtualBox::settingsFilePath"/>) in case of auto-conversion,
2776 and then calls <link to="IVirtualBox::saveSettings"/>.
2777
2778 Note that the backup copy is created <b>only</b> if the settings file
2779 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2780 details). Otherwise, this call is fully equivalent to
2781 <link to="IVirtualBox::saveSettings"/> and no backup copying is done.
2782
2783 The backup copy is created in the same directory where the original
2784 settings file is located. It is given the following file name:
2785 <pre>
2786 original.xml.x.y-platform.bak
2787 </pre>
2788 where <tt>original.xml</tt> is the original settings file name
2789 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2790 format of the settings file (before auto-conversion).
2791
2792 If the given backup file already exists, this method will try to add the
2793 <tt>.N</tt> suffix to the backup file name (where @c N counts from
2794 0 to 9) and copy it again until it succeeds. If all suffixes are
2795 occupied, or if any other copy error occurs, this method will return a
2796 failure.
2797
2798 If the copy operation succeeds, the @a bakFileName return argument will
2799 receive a full path to the created backup file (for informational
2800 purposes). Note that this will happen even if the subsequent
2801 <link to="#saveSettings"/> call performed by this method after the
2802 copy operation, fails.
2803
2804 <note>
2805 The VirtualBox API never calls this method. It is intended purely for
2806 the purposes of creating backup copies of the settings files by
2807 front-ends before saving the results of the automatically performed
2808 settings conversion to disk.
2809 </note>
2810
2811 <see>settingsFileVersion</see>
2812
2813 <result name="VBOX_E_FILE_ERROR">
2814 Settings file not accessible.
2815 </result>
2816 <result name="VBOX_E_XML_ERROR">
2817 Could not parse the settings file.
2818 </result>
2819 <result name="VBOX_E_IPRT_ERROR">
2820 Could not copy the settings file.
2821 </result>
2822
2823 </desc>
2824 <param name="bakFileName" type="wstring" dir="return">
2825 <desc>Full path to the created backup copy.</desc>
2826 </param>
2827 </method>
2828
2829 <!--method name="createDHCPServerForInterface">
2830 <desc>
2831 Creates a dhcp server settings to be used for the given interface
2832 <result name="E_INVALIDARG">
2833 Host network interface @a name already exists.
2834 </result>
2835 </desc>
2836 <param name="interface" type="IHostNetworkInterface" dir="in">
2837 <desc>Network Interface</desc>
2838 </param>
2839 <param name="server" type="IDHCPServer" dir="out">
2840 <desc>Dhcp server settings</desc>
2841 </param>
2842 </method-->
2843
2844 <method name="createDHCPServer">
2845 <desc>
2846 Creates a dhcp server settings to be used for the given internal network name
2847 <result name="E_INVALIDARG">
2848 Host network interface @a name already exists.
2849 </result>
2850 </desc>
2851 <param name="name" type="wstring" dir="in">
2852 <desc>server name</desc>
2853 </param>
2854 <param name="server" type="IDHCPServer" dir="return">
2855 <desc>Dhcp server settings</desc>
2856 </param>
2857 </method>
2858
2859 <method name="findDHCPServerByNetworkName">
2860 <desc>
2861 Searches a dhcp server settings to be used for the given internal network name
2862 <result name="E_INVALIDARG">
2863 Host network interface @a name already exists.
2864 </result>
2865
2866 </desc>
2867 <param name="name" type="wstring" dir="in">
2868 <desc>server name</desc>
2869 </param>
2870 <param name="server" type="IDHCPServer" dir="return">
2871 <desc>Dhcp server settings</desc>
2872 </param>
2873 </method>
2874
2875 <!--method name="findDHCPServerForInterface">
2876 <desc>
2877 Searches a dhcp server settings to be used for the given interface
2878 <result name="E_INVALIDARG">
2879 Host network interface @a name already exists.
2880 </result>
2881 </desc>
2882 <param name="interface" type="IHostNetworkInterface" dir="in">
2883 <desc>Network Interface</desc>
2884 </param>
2885 <param name="server" type="IDHCPServer" dir="out">
2886 <desc>Dhcp server settings</desc>
2887 </param>
2888 </method-->
2889
2890 <method name="removeDHCPServer">
2891 <desc>
2892 Removes the dhcp server settings
2893 <result name="E_INVALIDARG">
2894 Host network interface @a name already exists.
2895 </result>
2896 </desc>
2897 <param name="server" type="IDHCPServer" dir="in">
2898 <desc>Dhcp server settings to be removed</desc>
2899 </param>
2900 </method>
2901
2902 </interface>
2903
2904 <!--
2905 // IVFSExplorer
2906 /////////////////////////////////////////////////////////////////////////
2907 -->
2908
2909 <enum
2910 name="VFSType"
2911 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2912 >
2913 <desc>
2914 Virtual file systems supported by VFSExplorer.
2915 </desc>
2916
2917 <const name="File" value="1" />
2918 <const name="Cloud" value="2" />
2919 <const name="S3" value="3" />
2920 <const name="WebDav" value="4" />
2921 </enum>
2922
2923 <enum
2924 name="VFSFileType"
2925 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2926 >
2927 <desc>
2928 File types known by VFSExplorer.
2929 </desc>
2930
2931 <const name="Unknown" value="1" />
2932 <const name="Fifo" value="2" />
2933 <const name="DevChar" value="3" />
2934 <const name="Directory" value="4" />
2935 <const name="DevBlock" value="5" />
2936 <const name="File" value="6" />
2937 <const name="SymLink" value="7" />
2938 <const name="Socket" value="8" />
2939 <const name="WhiteOut" value="9" />
2940 </enum>
2941
2942 <interface
2943 name="IVFSExplorer" extends="$unknown"
2944 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2945 wsmap="managed"
2946 >
2947 <desc>
2948 The VFSExplorer interface unifies access to different file system
2949 types. This includes local file systems as well remote file systems like
2950 S3. For a list of supported types see <link to="VFSType" />.
2951 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2952 </desc>
2953
2954 <attribute name="path" type="wstring" readonly="yes">
2955 <desc>Returns the current path in the virtual file system.</desc>
2956 </attribute>
2957
2958 <attribute name="type" type="VFSType" readonly="yes">
2959 <desc>Returns the file system type which is currently in use.</desc>
2960 </attribute>
2961
2962 <method name="update">
2963 <desc>Updates the internal list of files/directories from the
2964 current directory level. Use <link to="#entryList" /> to get the full list
2965 after a call to this method.</desc>
2966
2967 <param name="aProgress" type="IProgress" dir="return">
2968 <desc>Progress object to track the operation completion.</desc>
2969 </param>
2970 </method>
2971
2972 <method name="cd">
2973 <desc>Change the current directory level.</desc>
2974
2975 <param name="aDir" type="wstring" dir="in">
2976 <desc>The name of the directory to go in.</desc>
2977 </param>
2978
2979 <param name="aProgress" type="IProgress" dir="return">
2980 <desc>Progress object to track the operation completion.</desc>
2981 </param>
2982 </method>
2983
2984 <method name="cdUp">
2985 <desc>Go one directory upwards from the current directory level.</desc>
2986
2987 <param name="aProgress" type="IProgress" dir="return">
2988 <desc>Progress object to track the operation completion.</desc>
2989 </param>
2990 </method>
2991
2992 <method name="entryList">
2993 <desc>Returns a list of files/directories after a call to <link
2994 to="#update" />. The user is responsible for keeping this internal
2995 list up do date.</desc>
2996
2997 <param name="aNames" type="wstring" safearray="yes" dir="out">
2998 <desc>The list of names for the entries.</desc>
2999 </param>
3000
3001 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3002 <desc>The list of types for the entries.</desc>
3003 </param>
3004 </method>
3005
3006 <method name="exists">
3007 <desc>Checks if the given file list exists in the current directory
3008 level.</desc>
3009
3010 <param name="aNames" type="wstring" safearray="yes" dir="in">
3011 <desc>The names to check.</desc>
3012 </param>
3013
3014 <param name="aExists" type="wstring" safearray="yes" dir="return">
3015 <desc>The names which exist.</desc>
3016 </param>
3017 </method>
3018
3019 <method name="remove">
3020 <desc>Deletes the given files in the current directory level.</desc>
3021
3022 <param name="aNames" type="wstring" safearray="yes" dir="in">
3023 <desc>The names to remove.</desc>
3024 </param>
3025
3026 <param name="aProgress" type="IProgress" dir="return">
3027 <desc>Progress object to track the operation completion.</desc>
3028 </param>
3029 </method>
3030
3031 </interface>
3032
3033 <!--
3034 // IAppliance
3035 /////////////////////////////////////////////////////////////////////////
3036 -->
3037
3038 <interface
3039 name="IAppliance" extends="$unknown"
3040 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3041 wsmap="managed"
3042 >
3043 <desc>
3044 Represents a platform-independent appliance in OVF format. An instance of this is returned
3045 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3046 appliances with VirtualBox.
3047
3048 The OVF standard suggests two different physical file formats:
3049
3050 <ol>
3051 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3052 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3053 this descriptor file references other files, as OVF appliances distributed as a set of
3054 files most likely do, those files must be in the same directory as the descriptor file.</li>
3055
3056 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3057 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3058 files and optionally other files.
3059
3060 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3061 be added with a later version.</li>
3062 </ol>
3063
3064 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3065 <link to="IMachine" /> involves the following sequence of API calls:
3066
3067 <ol>
3068 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3069 </li>
3070
3071 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3072 would like to import. So long as this file is syntactically valid, this will succeed
3073 and return an instance of IAppliance that contains the parsed data from the OVF file.
3074 </li>
3075
3076 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3077 contents of the IAppliance attributes accordingly. These can be inspected by a
3078 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3079 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3080 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3081 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3082 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3083 The GUI can then give the user the option to confirm and/or change these suggestions.
3084 </li>
3085
3086 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3087 virtual system to override the suggestions made by the interpret() routine.
3088 </li>
3089
3090 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3091 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3092 virtual system descriptions.
3093 </li>
3094 </ol>
3095
3096 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3097
3098 <ol>
3099 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3100 an empty IAppliance object.
3101 </li>
3102
3103 <li>For each machine you would like to export, call <link to="IMachine::export" />
3104 with the IAppliance object you just created. This creates an instance of
3105 <link to="IVirtualSystemDescription" /> inside the appliance.
3106 </li>
3107
3108 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3109 virtual system to override the suggestions made by the export() routine.
3110 </li>
3111
3112 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3113 file written.</li>
3114 </ol>
3115
3116 </desc>
3117
3118 <attribute name="path" type="wstring" readonly="yes">
3119 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3120 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3121 <link to="#write" /> (for export).
3122 This attribute is empty until one of these methods has been called.
3123 </desc>
3124 </attribute>
3125
3126 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3127 <desc>
3128 Array of virtual disk definitions. One such description exists for each
3129 disk definition in the OVF; each string array item represents one such piece of
3130 disk information, with the information fields separated by tab (\\t) characters.
3131
3132 The caller should be prepared for additional fields being appended to
3133 this string in future versions of VirtualBox and therefore check for
3134 the number of tabs in the strings returned.
3135
3136 In the current version, the following eight fields are returned per string
3137 in the array:
3138
3139 <ol>
3140 <li>Disk ID (unique string identifier given to disk)</li>
3141
3142 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3143
3144 <li>Populated size (optional unsigned integer indicating the current size of the
3145 disk; can be approximate; -1 if unspecified)</li>
3146
3147 <li>Format (string identifying the disk format, typically
3148 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3149
3150 <li>Reference (where to find the disk image, typically a file name; if empty,
3151 then the disk should be created on import)</li>
3152
3153 <li>Image size (optional unsigned integer indicating the size of the image,
3154 which need not necessarily be the same as the values specified above, since
3155 the image may be compressed or sparse; -1 if not specified)</li>
3156
3157 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3158 presently unsupported and always -1)</li>
3159
3160 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3161 </ol>
3162 </desc>
3163 </attribute>
3164
3165 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3166 <desc> Array of virtual system descriptions. One such description is created
3167 for each virtual system found in the OVF.
3168 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3169 (for export) has been called.
3170 </desc>
3171 </attribute>
3172
3173 <method name="read">
3174 <desc>
3175 Reads an OVF file into the appliance object.
3176
3177 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3178 mere fact that this method returns successfully does not mean that VirtualBox supports all
3179 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3180 </desc>
3181 <param name="file" type="wstring" dir="in">
3182 <desc>
3183 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3184 on whether the appliance is distributed as a set of files or as a single file, respectively).
3185 </desc>
3186 </param>
3187 <param name="aProgress" type="IProgress" dir="return">
3188 <desc></desc>
3189 </param>
3190 </method>
3191
3192 <method name="interpret">
3193 <desc>
3194 Interprets the OVF data that was read when the appliance was constructed. After
3195 calling this method, one can inspect the
3196 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3197 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3198 the appliance.
3199
3200 Calling this method is the second step of importing an appliance into VirtualBox;
3201 see <link to="IAppliance" /> for an overview.
3202
3203 After calling this method, one should call <link to="#getWarnings" /> to find out
3204 if problems were encountered during the processing which might later lead to
3205 errors.
3206 </desc>
3207 </method>
3208
3209 <method name="importMachines">
3210 <desc>
3211 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3212 and other interfaces that match the information contained in the appliance as
3213 closely as possible, as represented by the import instructions in the
3214 <link to="#virtualSystemDescriptions" /> array.
3215
3216 Calling this method is the final step of importing an appliance into VirtualBox;
3217 see <link to="IAppliance" /> for an overview.
3218
3219 Since importing the appliance will most probably involve copying and converting
3220 disk images, which can take a long time, this method operates asynchronously and
3221 returns an IProgress object to allow the caller to monitor the progress.
3222 </desc>
3223
3224 <param name="aProgress" type="IProgress" dir="return">
3225 <desc></desc>
3226 </param>
3227 </method>
3228
3229 <method name="createVFSExplorer">
3230 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3231
3232 <param name="aUri" type="wstring" dir="in">
3233 <desc>The URI describing the file system to use.</desc>
3234 </param>
3235
3236 <param name="aExplorer" type="IVFSExplorer" dir="return">
3237 <desc></desc>
3238 </param>
3239 </method>
3240
3241 <method name="write">
3242 <desc>
3243 Writes the contents of the appliance exports into a new OVF file.
3244
3245 Calling this method is the final step of exporting an appliance from VirtualBox;
3246 see <link to="IAppliance" /> for an overview.
3247
3248 Since exporting the appliance will most probably involve copying and converting
3249 disk images, which can take a long time, this method operates asynchronously and
3250 returns an IProgress object to allow the caller to monitor the progress.
3251 </desc>
3252 <param name="format" type="wstring" dir="in">
3253 <desc>
3254 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3255 future versions of VirtualBox may support additional formats.
3256 </desc>
3257 </param>
3258 <param name="path" type="wstring" dir="in">
3259 <desc>
3260 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3261 on whether the appliance is distributed as a set of files or as a single file, respectively).
3262 </desc>
3263 </param>
3264 <param name="aProgress" type="IProgress" dir="return">
3265 <desc>Progress object to track the operation completion.</desc>
3266 </param>
3267 </method>
3268
3269 <method name="getWarnings">
3270 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3271
3272 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3273 <desc></desc>
3274 </param>
3275 </method>
3276
3277 </interface>
3278
3279 <enum
3280 name="VirtualSystemDescriptionType"
3281 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3282 >
3283 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3284 a configuration value.</desc>
3285
3286 <const name="Ignore" value="1" />
3287 <const name="OS" value="2" />
3288 <const name="Name" value="3" />
3289 <const name="Product" value="4" />
3290 <const name="Vendor" value="5" />
3291 <const name="Version" value="6" />
3292 <const name="ProductUrl" value="7" />
3293 <const name="VendorUrl" value="8" />
3294 <const name="Description" value="9" />
3295 <const name="License" value="10" />
3296 <const name="Miscellaneous" value="11" />
3297 <const name="CPU" value="12" />
3298 <const name="Memory" value="13" />
3299 <const name="HardDiskControllerIDE" value="14" />
3300 <const name="HardDiskControllerSATA" value="15" />
3301 <const name="HardDiskControllerSCSI" value="16" />
3302 <const name="HardDiskImage" value="17" />
3303 <const name="Floppy" value="18" />
3304 <const name="CDROM" value="19" />
3305 <const name="NetworkAdapter" value="20" />
3306 <const name="USBController" value="21" />
3307 <const name="SoundCard" value="22" />
3308
3309 </enum>
3310
3311 <enum
3312 name="VirtualSystemDescriptionValueType"
3313 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3314 >
3315 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3316 type to fetch.</desc>
3317
3318 <const name="Reference" value="1" />
3319 <const name="Original" value="2" />
3320 <const name="Auto" value="3" />
3321 <const name="ExtraConfig" value="4" />
3322
3323 </enum>
3324
3325 <interface
3326 name="IVirtualSystemDescription" extends="$unknown"
3327 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3328 wsmap="managed"
3329 >
3330
3331 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3332 After <link to="IAppliance::interpret" /> has been called, that array contains
3333 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3334 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3335 into VirtualBox.
3336 </desc>
3337
3338 <attribute name="count" type="unsigned long" readonly="yes">
3339 <desc>Return the number of virtual system description entries.</desc>
3340 </attribute>
3341
3342 <method name="getDescription">
3343 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3344 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3345
3346 The list below identifies the value sets that are possible depending on the
3347 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3348 the array item with the same index in aOvfValues[] will contain the original value as contained
3349 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3350 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3351 the aExtraConfigValues[] array item may also be used.
3352
3353 <ul>
3354 <li>
3355 "OS": the guest operating system type. There must be exactly one such array item on import. The
3356 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3357 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3358 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3359 </li>
3360 <li>
3361 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3362 if none is present on import, then an automatic name will be created from the operating system
3363 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3364 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3365 <link to="IMachine" /> name that does not exist yet.
3366 </li>
3367 <li>
3368 "Description": an arbitrary description.
3369 </li>
3370 <li>
3371 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3372 code to display such a license for agreement; the Main API does not enforce any such policy.
3373 </li>
3374 <li>
3375 Miscellaneous: reserved for future use.
3376 </li>
3377 <li>
3378 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3379 </li>
3380 <li>
3381 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3382 is present on import, then VirtualBox will set a meaningful default based on the operating system
3383 type.
3384 </li>
3385 <li>
3386 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3387 has no value in aOvfValues[] or aVBoxValues[].
3388 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3389 type can use to specify which hard disk controller a virtual disk should be connected to.
3390 </li>
3391 <li>
3392 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3393 has no value in aOvfValues[] or aVBoxValues[].
3394 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3395 </li>
3396 <li>
3397 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3398 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3399 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3400 </li>
3401 <li>
3402 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3403 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3404
3405 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3406 a path since the image file should be in the same location as the OVF file itself), whereas the
3407 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3408 hard disk image. This means that on import the image will be copied and converted from the
3409 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3410 On import, the target image will also be registered with VirtualBox.
3411
3412 The matching item in the aExtraConfigValues[] array must contain a string of the following
3413 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3414 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3415 the image to. That number must be the index of an array item with one of the hard disk controller
3416 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3417 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3418 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3419 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3420 SCSI conrollers, the channel can range from 0-29.
3421 </li>
3422 <li>
3423 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3424 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3425 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3426 </li>
3427 <li>
3428 "USBController": a USB controller. There can be at most one such item. If and only if such an
3429 item ispresent, USB support will be enabled for the new virtual machine.
3430 </li>
3431 <li>
3432 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3433 present, sound support will be enabled for the new virtual machine. Note that the virtual
3434 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3435 may be different from the virtual soundcard expected by the appliance.
3436 </li>
3437 </ul>
3438
3439 </desc>
3440
3441 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3442 <desc></desc>
3443 </param>
3444
3445 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3446 <desc></desc>
3447 </param>
3448
3449 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3450 <desc></desc>
3451 </param>
3452
3453 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3454 <desc></desc>
3455 </param>
3456
3457 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3458 <desc></desc>
3459 </param>
3460
3461 </method>
3462
3463 <method name="getDescriptionByType">
3464 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3465 should be returned.</desc>
3466
3467 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3468 <desc></desc>
3469 </param>
3470
3471 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3472 <desc></desc>
3473 </param>
3474
3475 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3476 <desc></desc>
3477 </param>
3478
3479 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3480 <desc></desc>
3481 </param>
3482
3483 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3484 <desc></desc>
3485 </param>
3486
3487 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3488 <desc></desc>
3489 </param>
3490
3491 </method>
3492
3493 <method name="getValuesByType">
3494 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3495 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3496 values.</desc>
3497
3498 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3499 <desc></desc>
3500 </param>
3501
3502 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3503 <desc></desc>
3504 </param>
3505
3506 <param name="aValues" type="wstring" dir="return" safearray="yes">
3507 <desc></desc>
3508 </param>
3509
3510 </method>
3511
3512 <method name="setFinalValues">
3513 <desc>
3514 This method allows the appliance's user to change the configuration for the virtual
3515 system descriptions. For each array item returned from <link to="#getDescription" />,
3516 you must pass in one boolean value and one configuration value.
3517
3518 Each item in the boolean array determines whether the particular configuration item
3519 should be enabled.
3520 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3521 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3522 and SoundCard.
3523
3524 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3525 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3526 the configuration remains unchanged. Please see the documentation for getDescription()
3527 for valid configuration values for the individual array item types. If the
3528 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3529 </desc>
3530
3531 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3532 <desc></desc>
3533 </param>
3534
3535 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3536 <desc></desc>
3537 </param>
3538
3539 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3540 <desc></desc>
3541 </param>
3542 </method>
3543
3544 <method name="addDescription">
3545 <desc>
3546 This method adds an additional description entry to the stack of already
3547 available descriptions for this virtual system. This is handy for writing
3548 values which aren't directly supported by VirtualBox. One example would
3549 be the License type of <link to="VirtualSystemDescriptionType" />.
3550 </desc>
3551
3552 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3553 <desc></desc>
3554 </param>
3555
3556 <param name="aVBoxValue" type="wstring" dir="in">
3557 <desc></desc>
3558 </param>
3559
3560 <param name="aExtraConfigValue" type="wstring" dir="in">
3561 <desc></desc>
3562 </param>
3563 </method>
3564 </interface>
3565
3566
3567 <!--
3568 // IMachine
3569 /////////////////////////////////////////////////////////////////////////
3570 -->
3571
3572 <interface
3573 name="IInternalMachineControl" extends="$unknown"
3574 uuid="ce8087d7-de92-4bbb-8140-a22fb07f37ba"
3575 internal="yes"
3576 wsmap="suppress"
3577 >
3578 <method name="setRemoveSavedState">
3579 <desc>
3580 Updates the flag whether saved state is removed on a machine state
3581 change from Saved to PoweredOff.
3582 </desc>
3583 <param name="aRemove" type="boolean" dir="in"/>
3584 </method>
3585
3586 <method name="updateState">
3587 <desc>
3588 Updates the VM state.
3589 <note>
3590 This operation will also update the settings file with
3591 the correct information about the saved state file
3592 and delete this file from disk when appropriate.
3593 </note>
3594 </desc>
3595 <param name="state" type="MachineState" dir="in"/>
3596 </method>
3597
3598 <method name="getIPCId">
3599 <param name="id" type="wstring" dir="return"/>
3600 </method>
3601
3602 <method name="runUSBDeviceFilters">
3603 <desc>
3604 Asks the server to run USB devices filters of the associated
3605 machine against the given USB device and tell if there is
3606 a match.
3607 <note>
3608 Intended to be used only for remote USB devices. Local
3609 ones don't require to call this method (this is done
3610 implicitly by the Host and USBProxyService).
3611 </note>
3612 </desc>
3613 <param name="device" type="IUSBDevice" dir="in"/>
3614 <param name="matched" type="boolean" dir="out"/>
3615 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3616 </method>
3617
3618 <method name="captureUSBDevice">
3619 <desc>
3620 Requests a capture of the given host USB device.
3621 When the request is completed, the VM process will
3622 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3623 notification.
3624 </desc>
3625 <param name="id" type="wstring" dir="in"/>
3626 </method>
3627
3628 <method name="detachUSBDevice">
3629 <desc>
3630 Notification that a VM is going to detach (@a done = @c false) or has
3631 already detached (@a done = @c true) the given USB device.
3632 When the @a done = @c true request is completed, the VM process will
3633 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3634 notification.
3635 <note>
3636 In the @a done = @c true case, the server must run its own filters
3637 and filters of all VMs but this one on the detached device
3638 as if it were just attached to the host computer.
3639 </note>
3640 </desc>
3641 <param name="id" type="wstring" dir="in"/>
3642 <param name="done" type="boolean" dir="in"/>
3643 </method>
3644
3645 <method name="autoCaptureUSBDevices">
3646 <desc>
3647 Requests a capture all matching USB devices attached to the host.
3648 When the request is completed, the VM process will
3649 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3650 notification per every captured device.
3651 </desc>
3652 </method>
3653
3654 <method name="detachAllUSBDevices">
3655 <desc>
3656 Notification that a VM that is being powered down. The done
3657 parameter indicates whether which stage of the power down
3658 we're at. When @a done = @c false the VM is announcing its
3659 intentions, while when @a done = @c true the VM is reporting
3660 what it has done.
3661 <note>
3662 In the @a done = @c true case, the server must run its own filters
3663 and filters of all VMs but this one on all detach devices as
3664 if they were just attached to the host computer.
3665 </note>
3666 </desc>
3667 <param name="done" type="boolean" dir="in"/>
3668 </method>
3669
3670 <method name="onSessionEnd">
3671 <desc>
3672 Triggered by the given session object when the session is about
3673 to close normally.
3674 </desc>
3675 <param name="session" type="ISession" dir="in">
3676 <desc>Session that is being closed</desc>
3677 </param>
3678 <param name="progress" type="IProgress" dir="return">
3679 <desc>
3680 Used to wait until the corresponding machine is actually
3681 dissociated from the given session on the server.
3682 Returned only when this session is a direct one.
3683 </desc>
3684 </param>
3685 </method>
3686
3687 <method name="beginSavingState">
3688 <desc>
3689 Called by the VM process to inform the server it wants to
3690 save the current state and stop the VM execution.
3691 </desc>
3692 <param name="progress" type="IProgress" dir="in">
3693 <desc>
3694 Progress object created by the VM process to wait until
3695 the state is saved.
3696 </desc>
3697 </param>
3698 <param name="stateFilePath" type="wstring" dir="out">
3699 <desc>
3700 File path the VM process must save the execution state to.
3701 </desc>
3702 </param>
3703 </method>
3704
3705 <method name="endSavingState">
3706 <desc>
3707 Called by the VM process to inform the server that saving
3708 the state previously requested by #beginSavingState is either
3709 successfully finished or there was a failure.
3710
3711 <result name="VBOX_E_FILE_ERROR">
3712 Settings file not accessible.
3713 </result>
3714 <result name="VBOX_E_XML_ERROR">
3715 Could not parse the settings file.
3716 </result>
3717
3718 </desc>
3719
3720 <param name="success" type="boolean" dir="in">
3721 <desc>@c true to indicate success and @c false otherwise.
3722 </desc>
3723 </param>
3724 </method>
3725
3726 <method name="adoptSavedState">
3727 <desc>
3728 Gets called by IConsole::adoptSavedState.
3729 <result name="VBOX_E_FILE_ERROR">
3730 Invalid saved state file path.
3731 </result>
3732 </desc>
3733 <param name="savedStateFile" type="wstring" dir="in">
3734 <desc>Path to the saved state file to adopt.</desc>
3735 </param>
3736 </method>
3737
3738 <method name="beginTakingSnapshot">
3739 <desc>
3740 Called by the VM process to inform the server it wants to
3741 take a snapshot.
3742
3743 <result name="VBOX_E_FILE_ERROR">
3744 Settings file not accessible.
3745 </result>
3746 <result name="VBOX_E_XML_ERROR">
3747 Could not parse the settings file.
3748 </result>
3749 </desc>
3750 <param name="initiator" type="IConsole" dir="in">
3751 <desc>The console object that initiated this call.</desc>
3752 </param>
3753 <param name="name" type="wstring" dir="in">
3754 <desc>Snapshot name.</desc>
3755 </param>
3756 <param name="description" type="wstring" dir="in">
3757 <desc>Snapshot description.</desc>
3758 </param>
3759 <param name="progress" type="IProgress" dir="in">
3760 <desc>
3761 Progress object created by the VM process to wait until
3762 the state is saved (only for online snapshots).
3763 </desc>
3764 </param>
3765 <param name="stateFilePath" type="wstring" dir="out">
3766 <desc>
3767 File path the VM process must save the execution state to.
3768 </desc>
3769 </param>
3770 <param name="serverProgress" type="IProgress" dir="out">
3771 <desc>
3772 Progress object created by the server process to wait until
3773 the snapshot is taken (VDI diff creation, etc.).
3774 </desc>
3775 </param>
3776 </method>
3777
3778 <method name="endTakingSnapshot">
3779 <desc>
3780 Called by the VM process to inform the server that the snapshot
3781 previously requested by #beginTakingSnapshot is either
3782 successfully taken or there was a failure.
3783 </desc>
3784
3785 <param name="success" type="boolean" dir="in">
3786 <desc>@c true to indicate success and @c false otherwise</desc>
3787 </param>
3788 </method>
3789
3790 <method name="discardSnapshot">
3791 <desc>
3792 Gets called by IConsole::discardSnapshot.
3793 <result name="VBOX_E_INVALID_OBJECT_STATE">
3794 Snapshot has more than one child snapshot.
3795 </result>
3796 </desc>
3797 <param name="initiator" type="IConsole" dir="in">
3798 <desc>The console object that initiated this call.</desc>
3799 </param>
3800 <param name="id" type="wstring" dir="in">
3801 <desc>UUID of the snapshot to discard.</desc>
3802 </param>
3803 <param name="machineState" type="MachineState" dir="out">
3804 <desc>New machine state after this operation is started.</desc>
3805 </param>
3806 <param name="progress" type="IProgress" dir="return">
3807 <desc>Progress object to track the operation completion.</desc>
3808 </param>
3809 </method>
3810
3811 <method name="discardCurrentState">
3812 <desc>
3813 Gets called by IConsole::discardCurrentState.
3814 <result name="VBOX_E_INVALID_OBJECT_STATE">
3815 Virtual machine does not have any snapshot.
3816 </result>
3817 </desc>
3818 <param name="initiator" type="IConsole" dir="in">
3819 <desc>The console object that initiated this call.</desc>
3820 </param>
3821 <param name="machineState" type="MachineState" dir="out">
3822 <desc>New machine state after this operation is started.</desc>
3823 </param>
3824 <param name="progress" type="IProgress" dir="return">
3825 <desc>Progress object to track the operation completion.</desc>
3826 </param>
3827 </method>
3828
3829 <method name="discardCurrentSnapshotAndState">
3830 <desc>
3831 Gets called by IConsole::discardCurrentSnapshotAndState.
3832 <result name="VBOX_E_INVALID_OBJECT_STATE">
3833 Virtual machine does not have any snapshot.
3834 </result>
3835 </desc>
3836 <param name="initiator" type="IConsole" dir="in">
3837 <desc>The console object that initiated this call.</desc>
3838 </param>
3839 <param name="machineState" type="MachineState" dir="out">
3840 <desc>New machine state after this operation is started.</desc>
3841 </param>
3842 <param name="progress" type="IProgress" dir="return">
3843 <desc>Progress object to track the operation completion.</desc>
3844 </param>
3845 </method>
3846
3847 <method name="pullGuestProperties">
3848 <desc>
3849 Get the list of the guest properties matching a set of patterns along
3850 with their values, time stamps and flags and give responsibility for
3851 managing properties to the console.
3852 </desc>
3853 <param name="name" type="wstring" dir="out" safearray="yes">
3854 <desc>
3855 The names of the properties returned.
3856 </desc>
3857 </param>
3858 <param name="value" type="wstring" dir="out" safearray="yes">
3859 <desc>
3860 The values of the properties returned. The array entries match the
3861 corresponding entries in the @a name array.
3862 </desc>
3863 </param>
3864 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3865 <desc>
3866 The time stamps of the properties returned. The array entries match
3867 the corresponding entries in the @a name array.
3868 </desc>
3869 </param>
3870 <param name="flags" type="wstring" dir="out" safearray="yes">
3871 <desc>
3872 The flags of the properties returned. The array entries match the
3873 corresponding entries in the @a name array.
3874 </desc>
3875 </param>
3876 </method>
3877
3878 <method name="pushGuestProperties">
3879 <desc>
3880 Set the list of the guest properties matching a set of patterns along
3881 with their values, time stamps and flags and return responsibility for
3882 managing properties to IMachine.
3883 </desc>
3884 <param name="name" type="wstring" dir="in" safearray="yes">
3885 <desc>
3886 The names of the properties.
3887 </desc>
3888 </param>
3889 <param name="value" type="wstring" dir="in" safearray="yes">
3890 <desc>
3891 The values of the properties. The array entries match the
3892 corresponding entries in the @a name array.
3893 </desc>
3894 </param>
3895 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3896 <desc>
3897 The time stamps of the properties. The array entries match
3898 the corresponding entries in the @a name array.
3899 </desc>
3900 </param>
3901 <param name="flags" type="wstring" dir="in" safearray="yes">
3902 <desc>
3903 The flags of the properties. The array entries match the
3904 corresponding entries in the @a name array.
3905 </desc>
3906 </param>
3907 </method>
3908 <method name="pushGuestProperty">
3909 <desc>
3910 Update a single guest property in IMachine.
3911 </desc>
3912 <param name="name" type="wstring" dir="in">
3913 <desc>
3914 The name of the property to be updated.
3915 </desc>
3916 </param>
3917 <param name="value" type="wstring" dir="in">
3918 <desc>
3919 The value of the property.
3920 </desc>
3921 </param>
3922 <param name="timestamp" type="unsigned long long" dir="in">
3923 <desc>
3924 The timestamp of the property.
3925 </desc>
3926 </param>
3927 <param name="flags" type="wstring" dir="in">
3928 <desc>
3929 The flags of the property.
3930 </desc>
3931 </param>
3932 </method>
3933
3934 <method name="lockMedia">
3935 <desc>
3936 Locks all media attached to the machine for writing and parents of
3937 attahced different hard disks (if any) for reading. This operation is
3938 atomic so that if it fails no media is actually locked.
3939
3940 This method is intended to be called when the machine is in Starting or
3941 Restoring state. The locked media will be automatically unlocked when
3942 the machine is powered off or crashed.
3943 </desc>
3944 </method>
3945 </interface>
3946
3947 <interface
3948 name="IBIOSSettings" extends="$unknown"
3949 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3950 wsmap="managed"
3951 >
3952 <desc>
3953 The IBIOSSettings interface represents BIOS settings of the virtual
3954 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3955 </desc>
3956 <attribute name="logoFadeIn" type="boolean">
3957 <desc>Fade in flag for BIOS logo animation.</desc>
3958 </attribute>
3959
3960 <attribute name="logoFadeOut" type="boolean">
3961 <desc>Fade out flag for BIOS logo animation.</desc>
3962 </attribute>
3963
3964 <attribute name="logoDisplayTime" type="unsigned long">
3965 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3966 </attribute>
3967
3968 <attribute name="logoImagePath" type="wstring">
3969 <desc>Local file system path for external BIOS image.</desc>
3970 </attribute>
3971
3972 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3973 <desc>Mode of the BIOS boot device menu.</desc>
3974 </attribute>
3975
3976 <attribute name="ACPIEnabled" type="boolean">
3977 <desc>ACPI support flag.</desc>
3978 </attribute>
3979
3980 <attribute name="IOAPICEnabled" type="boolean">
3981 <desc>
3982 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3983 and support IRQs above 15.
3984 </desc>
3985 </attribute>
3986
3987 <attribute name="timeOffset" type="long long">
3988 <desc>
3989 Offset in milliseconds from the host system time. This allows for
3990 guests running with a different system date/time than the host.
3991 It is equivalent to setting the system date/time in the BIOS except
3992 it is not an absolute value but a relative one. Guest Additions
3993 time synchronization honors this offset.
3994 </desc>
3995 </attribute>
3996
3997 <attribute name="PXEDebugEnabled" type="boolean">
3998 <desc>
3999 PXE debug logging flag. If set, VirtualBox will write extensive
4000 PXE trace information to the release log.
4001 </desc>
4002 </attribute>
4003
4004 </interface>
4005
4006 <interface
4007 name="IMachine" extends="$unknown"
4008 uuid="540dcfda-3df2-49c6-88fa-033a28c2ff85"
4009 wsmap="managed"
4010 >
4011 <desc>
4012 The IMachine interface represents a virtual machine, or guest, created
4013 in VirtualBox.
4014
4015 This interface is used in two contexts. First of all, a collection of
4016 objects implementing this interface is stored in the
4017 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4018 machines that are currently registered with this VirtualBox
4019 installation. Also, once a session has been opened for the given virtual
4020 machine (e.g. the virtual machine is running), the machine object
4021 associated with the open session can be queried from the session object;
4022 see <link to="ISession"/> for details.
4023
4024 The main role of this interface is to expose the settings of the virtual
4025 machine and provide methods to change various aspects of the virtual
4026 machine's configuration. For machine objects stored in the
4027 <link to="IVirtualBox::machines"/> collection, all attributes are
4028 read-only unless explicitly stated otherwise in individual attribute
4029 and method descriptions. In order to change a machine setting, a session
4030 for this machine must be opened using one of
4031 <link to="IVirtualBox::openSession"/>,
4032 <link to="IVirtualBox::openRemoteSession"/> or
4033 <link to="IVirtualBox::openExistingSession"/> methods. After the
4034 session has been successfully opened, a mutable machine object needs to
4035 be queried from the session object and then the desired settings changes
4036 can be applied to the returned object using IMachine attributes and
4037 methods. See the ISession interface description for more information
4038 about sessions.
4039
4040 Note that the IMachine interface does not provide methods to control
4041 virtual machine execution (such as start the machine, or power it
4042 down) -- these methods are grouped in a separate IConsole
4043 interface. Refer to the IConsole interface description to get more
4044 information about this topic.
4045
4046 <see>ISession, IConsole</see>
4047 </desc>
4048
4049 <attribute name="parent" type="IVirtualBox" readonly="yes">
4050 <desc>Associated parent object.</desc>
4051 </attribute>
4052
4053 <attribute name="accessible" type="boolean" readonly="yes">
4054 <desc>
4055 Whether this virtual machine is currently accessible or not.
4056
4057 The machine is considered to be inaccessible when:
4058 <ul>
4059 <li>It is a registered virtual machine, and
4060 </li>
4061 <li>Its settings file is inaccessible (for example, it is
4062 located on a network share that is not accessible during
4063 VirtualBox startup, or becomes inaccessible later, or if
4064 the settings file can be read but is invalid).
4065 </li>
4066 </ul>
4067
4068 Otherwise, the value of this property is always @c true.
4069
4070 Every time this property is read, the accessibility state of
4071 this machine is re-evaluated. If the returned value is @c false,
4072 the <link to="#accessError"/> property may be used to get the
4073 detailed error information describing the reason of
4074 inaccessibility.
4075
4076 When the machine is inaccessible, only the following properties
4077 can be used on it:
4078 <ul>
4079 <li><link to="#parent"/></li>
4080 <li><link to="#id"/></li>
4081 <li><link to="#settingsFilePath"/></li>
4082 <li><link to="#accessible"/></li>
4083 <li><link to="#accessError"/></li>
4084 </ul>
4085
4086 An attempt to access any other property or method will return
4087 an error.
4088
4089 The only possible action you can perform on an inaccessible
4090 machine is to unregister it using the
4091 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4092 for the accessibility state once more by querying this
4093 property).
4094
4095 <note>
4096 In the current implementation, once this property returns
4097 @c true, the machine will never become inaccessible
4098 later, even if its settings file cannot be successfully
4099 read/written any more (at least, until the VirtualBox
4100 server is restarted). This limitation may be removed in
4101 future releases.
4102 </note>
4103 </desc>
4104 </attribute>
4105
4106 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4107 <desc>
4108 Error information describing the reason of machine
4109 inaccessibility.
4110
4111 Reading this property is only valid after the last call to
4112 <link to="#accessible"/> returned @c false (i.e. the
4113 machine is currently unaccessible). Otherwise, a @c null
4114 IVirtualBoxErrorInfo object will be returned.
4115 </desc>
4116 </attribute>
4117
4118 <attribute name="name" type="wstring">
4119 <desc>
4120 Name of the virtual machine.
4121
4122 Besides being used for human-readable identification purposes
4123 everywhere in VirtualBox, the virtual machine name is also used
4124 as a name of the machine's settings file and as a name of the
4125 subdirectory this settings file resides in. Thus, every time you
4126 change the value of this property, the settings file will be
4127 renamed once you call <link to="#saveSettings"/> to confirm the
4128 change. The containing subdirectory will be also renamed, but
4129 only if it has exactly the same name as the settings file
4130 itself prior to changing this property (for backward compatibility
4131 with previous API releases). The above implies the following
4132 limitations:
4133 <ul>
4134 <li>The machine name cannot be empty.</li>
4135 <li>The machine name can contain only characters that are valid
4136 file name characters according to the rules of the file
4137 system used to store VirtualBox configuration.</li>
4138 <li>You cannot have two or more machines with the same name
4139 if they use the same subdirectory for storing the machine
4140 settings files.</li>
4141 <li>You cannot change the name of the machine if it is running,
4142 or if any file in the directory containing the settings file
4143 is being used by another running machine or by any other
4144 process in the host operating system at a time when
4145 <link to="#saveSettings"/> is called.
4146 </li>
4147 </ul>
4148 If any of the above limitations are hit, <link to="#saveSettings"/>
4149 will return an appropriate error message explaining the exact
4150 reason and the changes you made to this machine will not be
4151 saved.
4152 <note>
4153 For "legacy" machines created using the
4154 <link to="IVirtualBox::createLegacyMachine"/> call,
4155 the above naming limitations do not apply because the
4156 machine name does not affect the settings file name.
4157 The settings file name remains the same as it was specified
4158 during machine creation and never changes.
4159 </note>
4160 </desc>
4161 </attribute>
4162
4163 <attribute name="description" type="wstring">
4164 <desc>
4165 Description of the virtual machine.
4166
4167 The description attribute can contain any text and is
4168 typically used to describe the hardware and software
4169 configuration of the virtual machine in detail (i.e. network
4170 settings, versions of the installed software and so on).
4171 </desc>
4172 </attribute>
4173
4174 <attribute name="id" type="wstring" readonly="yes">
4175 <desc>UUID of the virtual machine.</desc>
4176 </attribute>
4177
4178 <attribute name="OSTypeId" type="wstring">
4179 <desc>
4180 User-defined identifier of the Guest OS type.
4181 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4182 an IGuestOSType object representing details about the given
4183 Guest OS type.
4184 <note>
4185 This value may differ from the value returned by
4186 <link to="IGuest::OSTypeId"/> if Guest Additions are
4187 installed to the guest OS.
4188 </note>
4189 </desc>
4190 </attribute>
4191
4192 <attribute name="HardwareVersion" type="wstring">
4193 <desc>Hardware version identifier. Internal use only for now.</desc>
4194 </attribute>
4195
4196 <attribute name="CPUCount" type="unsigned long">
4197 <desc>Number of virtual CPUs in the VM.</desc>
4198 </attribute>
4199
4200 <attribute name="memorySize" type="unsigned long">
4201 <desc>System memory size in megabytes.</desc>
4202 </attribute>
4203
4204 <attribute name="memoryBalloonSize" type="unsigned long">
4205 <desc>Initial memory balloon size in megabytes.</desc>
4206 </attribute>
4207
4208 <attribute name="statisticsUpdateInterval" type="unsigned long">
4209 <desc>Initial interval to update guest statistics in seconds.</desc>
4210 </attribute>
4211
4212 <attribute name="VRAMSize" type="unsigned long">
4213 <desc>Video memory size in megabytes.</desc>
4214 </attribute>
4215
4216 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4217 <desc>
4218 This setting determines whether VirtualBox allows guests to make use
4219 of the 3D graphics support available on the host. Currently limited
4220 to OpenGL only. </desc>
4221 </attribute>
4222
4223 <attribute name="monitorCount" type="unsigned long">
4224 <desc>
4225 Number of virtual monitors.
4226 <note>
4227 Only effective on Windows XP and later guests with
4228 Guest Additions installed.
4229 </note>
4230 </desc>
4231 </attribute>
4232
4233 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4234 <desc>Object containing all BIOS settings.</desc>
4235 </attribute>
4236
4237 <attribute name="HWVirtExEnabled" type="boolean">
4238 <desc>
4239 This setting determines whether VirtualBox will try to make use of
4240 the host CPU's hardware virtualization extensions such as Intel VT-x
4241 and AMD-V. Note that in case such extensions are not available,
4242 they will not be used.
4243 </desc>
4244 </attribute>
4245
4246 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4247 <desc>
4248 This setting determines whether VirtualBox will try to make use of
4249 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4250 such extensions are not available, they will not be used.
4251 </desc>
4252 </attribute>
4253
4254 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4255 <desc>
4256 This setting determines whether VirtualBox will try to make use of
4257 the VPID extension of Intel VT-x. Note that in case such extensions are
4258 not available, they will not be used.
4259 </desc>
4260 </attribute>
4261
4262 <attribute name="PAEEnabled" type="boolean" default="false">
4263 <desc>
4264 This setting determines whether VirtualBox will expose the Physical Address
4265 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4266 is not available, it will not be reported.
4267 </desc>
4268 </attribute>
4269
4270 <attribute name="snapshotFolder" type="wstring">
4271 <desc>
4272 Full path to the directory used to store snapshot data
4273 (differencing hard disks and saved state files) of this machine.
4274
4275 The initial value of this property is
4276 <tt>&lt;</tt><link to="#settingsFilePath">
4277 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4278 <link to="#id">machine_uuid</link>
4279 <tt>&gt;</tt>.
4280
4281 Currently, it is an error to try to change this property on
4282 a machine that has snapshots (because this would require to
4283 move possibly large files to a different location).
4284 A separate method will be available for this purpose later.
4285
4286 <note>
4287 Setting this property to @c null or to an empty string will restore
4288 the initial value.
4289 </note>
4290 <note>
4291 When setting this property, the specified path can be
4292 absolute (full path) or relative to the directory where the
4293 <link to="#settingsFilePath">machine settings file</link>
4294 is located. When reading this property, a full path is
4295 always returned.
4296 </note>
4297 <note>
4298 The specified path may not exist, it will be created
4299 when necessary.
4300 </note>
4301 </desc>
4302 </attribute>
4303
4304 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4305 <desc>VRDP server object.</desc>
4306 </attribute>
4307
4308 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4309 <desc>Array of hard disks attached to this machine.</desc>
4310 </attribute>
4311
4312 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4313 <desc>Associated DVD drive object.</desc>
4314 </attribute>
4315
4316 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4317 <desc>Associated floppy drive object.</desc>
4318 </attribute>
4319
4320 <attribute name="USBController" type="IUSBController" readonly="yes">
4321 <desc>
4322 Associated USB controller object.
4323
4324 <note>
4325 If USB functionality is not available in the given edition of
4326 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4327 </note>
4328 </desc>
4329 </attribute>
4330
4331 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4332 <desc>Associated audio adapter, always present.</desc>
4333 </attribute>
4334
4335 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4336 <desc>Array of storage controllers attached to this machine.</desc>
4337 </attribute>
4338
4339 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4340 <desc>
4341 Full name of the file containing machine settings data.
4342 </desc>
4343 </attribute>
4344
4345 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4346 <desc>
4347 Current version of the format of the settings file of this machine
4348 (<link to="IMachine::settingsFilePath"/>).
4349
4350 The version string has the following format:
4351 <pre>
4352 x.y-platform
4353 </pre>
4354 where @c x and @c y are the major and the minor format
4355 versions, and @c platform is the platform identifier.
4356
4357 The current version usually matches the value of the
4358 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4359 settings file was created by an older version of VirtualBox and there
4360 was a change of the settings file format since then.
4361
4362 Note that VirtualBox automatically converts settings files from older
4363 versions to the most recent version when reading them (usually at
4364 VirtualBox startup) but it doesn't save the changes back until
4365 you call a method that implicitly saves settings (such as
4366 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4367 explicitly. Therefore, if the value of this attribute differs from the
4368 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4369 means that the settings file was converted but the result of the
4370 conversion is not yet saved to disk.
4371
4372 The above feature may be used by interactive front-ends to inform users
4373 about the settings file format change and offer them to explicitly save
4374 all converted settings files (the global and VM-specific ones),
4375 optionally create backup copies of the old settings files before saving,
4376 etc.
4377
4378 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4379 </desc>
4380 </attribute>
4381
4382 <attribute name="settingsModified" type="boolean" readonly="yes">
4383 <desc>
4384 Whether the settings of this machine have been modified
4385 (but neither yet saved nor discarded).
4386 <note>
4387 Reading this property is only valid on instances returned
4388 by <link to="ISession::machine"/> and on new machines
4389 created by <link to="IVirtualBox::createMachine"/> or opened
4390 by <link to="IVirtualBox::openMachine"/> but not
4391 yet registered, or on unregistered machines after calling
4392 <link to="IVirtualBox::unregisterMachine"/>. For all other
4393 cases, the settings can never be modified.
4394 </note>
4395 <note>
4396 For newly created unregistered machines, the value of this
4397 property is always @c true until <link to="#saveSettings"/>
4398 is called (no matter if any machine settings have been
4399 changed after the creation or not). For opened machines
4400 the value is set to @c false (and then follows to normal rules).
4401 </note>
4402 </desc>
4403 </attribute>
4404
4405 <attribute name="sessionState" type="SessionState" readonly="yes">
4406 <desc>Current session state for this machine.</desc>
4407 </attribute>
4408
4409 <attribute name="sessionType" type="wstring" readonly="yes">
4410 <desc>
4411 Type of the session. If <link to="#sessionState"/> is
4412 SessionSpawning or SessionOpen, this attribute contains the
4413 same value as passed to the
4414 <link to="IVirtualBox::openRemoteSession"/> method in the
4415 @a type parameter. If the session was opened directly using
4416 <link to="IVirtualBox::openSession"/>, or if
4417 <link to="#sessionState"/> is SessionClosed, the value of this
4418 attribute is an empty string.
4419 </desc>
4420 </attribute>
4421
4422 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4423 <desc>
4424 Identifier of the session process. This attribute contains the
4425 platform-dependent identifier of the process that has opened a
4426 direct session for this machine using the
4427 <link to="IVirtualBox::openSession"/> call. The returned value
4428 is only valid if <link to="#sessionState"/> is SessionOpen or
4429 SessionClosing (i.e. a session is currently open or being
4430 closed) by the time this property is read.
4431 </desc>
4432 </attribute>
4433
4434 <attribute name="state" type="MachineState" readonly="yes">
4435 <desc>Current execution state of this machine.</desc>
4436 </attribute>
4437
4438 <attribute name="lastStateChange" type="long long" readonly="yes">
4439 <desc>
4440 Time stamp of the last execution state change,
4441 in milliseconds since 1970-01-01 UTC.
4442 </desc>
4443 </attribute>
4444
4445 <attribute name="stateFilePath" type="wstring" readonly="yes">
4446 <desc>
4447 Full path to the file that stores the execution state of
4448 the machine when it is in the <link to="MachineState_Saved"/> state.
4449 <note>
4450 When the machine is not in the Saved state, this attribute is
4451 an empty string.
4452 </note>
4453 </desc>
4454 </attribute>
4455
4456 <attribute name="logFolder" type="wstring" readonly="yes">
4457 <desc>
4458 Full path to the folder that stores a set of rotated log files
4459 recorded during machine execution. The most recent log file is
4460 named <tt>VBox.log</tt>, the previous log file is
4461 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4462 in the current version).
4463 </desc>
4464 </attribute>
4465
4466 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4467 <desc>
4468 Current snapshot of this machine. This is @c null if the machine
4469 currently has no snapshots. Otherwise, this is always the last snapshot
4470 in the current implementation; see <link to="ISnapshot"/> for details.
4471 </desc>
4472 </attribute>
4473
4474 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4475 <desc>
4476 Number of snapshots taken on this machine. Zero means the
4477 machine doesn't have any snapshots.
4478 </desc>
4479 </attribute>
4480
4481 <attribute name="currentStateModified" type="boolean" readonly="yes">
4482 <desc>
4483 Returns @c true if the current state of the machine is not
4484 identical to the state stored in the current snapshot.
4485
4486 The current state is identical to the current snapshot right
4487 after one of the following calls are made:
4488 <ul>
4489 <li><link to="IConsole::discardCurrentState"/> or
4490 <link to="IConsole::discardCurrentSnapshotAndState"/>
4491 </li>
4492 <li><link to="IConsole::takeSnapshot"/> (issued on a
4493 powered off or saved machine, for which
4494 <link to="#settingsModified"/> returns @c false)
4495 </li>
4496 <li><link to="IMachine::setCurrentSnapshot"/>
4497 </li>
4498 </ul>
4499
4500 The current state remains identical until one of the following
4501 happens:
4502 <ul>
4503 <li>settings of the machine are changed</li>
4504 <li>the saved state is discarded</li>
4505 <li>the current snapshot is discarded</li>
4506 <li>an attempt to execute the machine is made</li>
4507 </ul>
4508
4509 <note>
4510 For machines that don't have snapshots, this property is
4511 always @c false.
4512 </note>
4513 </desc>
4514 </attribute>
4515
4516 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4517 <desc>
4518 Collection of shared folders for this machine (permanent shared
4519 folders). These folders are shared automatically at machine startup
4520 and available only to the guest OS installed within this machine.
4521
4522 New shared folders are added to the collection using
4523 <link to="#createSharedFolder"/>. Existing shared folders can be
4524 removed using <link to="#removeSharedFolder"/>.
4525 </desc>
4526 </attribute>
4527
4528 <attribute name="clipboardMode" type="ClipboardMode">
4529 <desc>
4530 Synchronization mode between the host OS clipboard
4531 and the guest OS clipboard.
4532 </desc>
4533 </attribute>
4534
4535 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4536 <desc>
4537 A comma-separated list of simple glob patterns. Changes to guest
4538 properties whose name matches one of the patterns will generate an
4539 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4540 </desc>
4541 </attribute>
4542
4543 <method name="setBootOrder">
4544 <desc>
4545 Puts the given device to the specified position in
4546 the boot order.
4547
4548 To indicate that no device is associated with the given position,
4549 <link to="DeviceType_Null"/> should be used.
4550
4551 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4552
4553 <result name="E_INVALIDARG">
4554 Boot @a position out of range.
4555 </result>
4556 <result name="E_NOTIMPL">
4557 Booting from USB @a device currently not supported.
4558 </result>
4559
4560 </desc>
4561 <param name="position" type="unsigned long" dir="in">
4562 <desc>
4563 Position in the boot order (@c 1 to the total number of
4564 devices the machine can boot from, as returned by
4565 <link to="ISystemProperties::maxBootPosition"/>).
4566 </desc>
4567 </param>
4568 <param name="device" type="DeviceType" dir="in">
4569 <desc>
4570 The type of the device used to boot at the given position.
4571 </desc>
4572 </param>
4573 </method>
4574
4575 <method name="getBootOrder" const="yes">
4576 <desc>
4577 Returns the device type that occupies the specified
4578 position in the boot order.
4579
4580 @todo [remove?]
4581 If the machine can have more than one device of the returned type
4582 (such as hard disks), then a separate method should be used to
4583 retrieve the individual device that occupies the given position.
4584
4585 If here are no devices at the given position, then
4586 <link to="DeviceType_Null"/> is returned.
4587
4588 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4589
4590 <result name="E_INVALIDARG">
4591 Boot @a position out of range.
4592 </result>
4593
4594 </desc>
4595 <param name="position" type="unsigned long" dir="in">
4596 <desc>
4597 Position in the boot order (@c 1 to the total number of
4598 devices the machine can boot from, as returned by
4599 <link to="ISystemProperties::maxBootPosition"/>).
4600 </desc>
4601 </param>
4602 <param name="device" type="DeviceType" dir="return">
4603 <desc>
4604 Device at the given position.
4605 </desc>
4606 </param>
4607 </method>
4608
4609 <method name="attachHardDisk">
4610 <desc>
4611 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4612 by the given UUID @a id) to the given hard disk controller
4613 (<link to="IStorageController" />, identified by @a name),
4614 at the indicated port and device.
4615
4616 For the IDE bus, the @a controllerPort parameter can be either
4617 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4618 respectively. For the primary controller of the IDE bus,
4619 @a device can be either @c 0 or @c 1, to specify the master or the
4620 slave device, respectively. For the secondary IDE controller, the
4621 device number must be @c 1 because VirtualBox reserves the
4622 secondary master for the CD-ROM drive.
4623
4624 For an SATA controller, @a controllerPort must be a number ranging
4625 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4626 be a number ranging from @c 0 to @c 15.
4627
4628 For both SCSI and SATA, the @a device parameter is unused and must
4629 be @c 0.
4630
4631 The specified device slot must not have another disk attached to it, or
4632 this method will fail.
4633
4634 See <link to="IHardDisk"/> for more detailed information about
4635 attaching hard disks.
4636
4637 <note>
4638 You cannot attach a hard disk to a running machine. Also, you cannot
4639 attach a hard disk to a newly created machine until this machine's
4640 settings are saved to disk using <link to="#saveSettings"/>.
4641 </note>
4642 <note>
4643 If the hard disk is being attached indirectly, a new differencing hard
4644 disk will implicitly be created for it and attached instead. If the
4645 changes made to the machine settings (including this indirect
4646 attachment) are later cancelled using <link to="#discardSettings"/>,
4647 this implicitly created differencing hard disk will implicitly
4648 be deleted.
4649 </note>
4650
4651 <result name="E_INVALIDARG">
4652 SATA device, SATA port, IDE port or IDE slot out of range.
4653 </result>
4654 <result name="VBOX_E_INVALID_OBJECT_STATE">
4655 Attempt to attach hard disk to an unregistered virtual machine.
4656 </result>
4657 <result name="VBOX_E_INVALID_VM_STATE">
4658 Invalid machine state.
4659 </result>
4660 <result name="VBOX_E_OBJECT_IN_USE">
4661 Hard disk already attached to this or another virtual machine.
4662 </result>
4663
4664 </desc>
4665 <param name="id" type="wstring" dir="in">
4666 <desc>UUID of the hard disk to attach.</desc>
4667 </param>
4668 <param name="name" type="wstring" dir="in">
4669 <desc>Name of the storage controller to attach the hard disk to.</desc>
4670 </param>
4671 <param name="controllerPort" type="long" dir="in">
4672 <desc>Port to attach the hard disk to.</desc>
4673 </param>
4674 <param name="device" type="long" dir="in">
4675 <desc>
4676 Device slot in the given port to attach the hard disk to.
4677 </desc>
4678 </param>
4679 </method>
4680
4681 <method name="getHardDisk" const="yes">
4682 <desc>
4683 Returns the virtual hard disk attached to a device slot of the specified
4684 bus.
4685
4686 Note that if the hard disk was indirectly attached by
4687 <link to="#attachHardDisk"/> to the given device slot then this
4688 method will return not the same object as passed to the
4689 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4690 more detailed information about attaching hard disks.
4691
4692 <result name="VBOX_E_OBJECT_NOT_FOUND">
4693 No hard disk attached to given slot/bus.
4694 </result>
4695
4696 </desc>
4697 <param name="name" type="wstring" dir="in">
4698 <desc>Name of the storage controller the hard disk is attached to.</desc>
4699 </param>
4700 <param name="controllerPort" type="long" dir="in">
4701 <desc>Port to query.</desc>
4702 </param>
4703 <param name="device" type="long" dir="in">
4704 <desc>Device slot in the given port to query.</desc>
4705 </param>
4706 <param name="hardDisk" type="IHardDisk" dir="return">
4707 <desc>Attached hard disk object.</desc>
4708 </param>
4709 </method>
4710
4711 <method name="detachHardDisk">
4712 <desc>
4713 Detaches the virtual hard disk attached to a device slot of the
4714 specified bus.
4715
4716 Detaching the hard disk from the virtual machine is deferred. This means
4717 that the hard disk remains associated with the machine when this method
4718 returns and gets actually de-associated only after a successful
4719 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4720 for more detailed information about attaching hard disks.
4721
4722 <note>
4723 You cannot detach the hard disk from a running machine.
4724 </note>
4725 <note>
4726 Detaching differencing hard disks implicitly created by <link
4727 to="#attachHardDisk"/> for the indirect attachment using this
4728 method will <b>not</b> implicitly delete them. The
4729 <link to="IHardDisk::deleteStorage"/> operation should be
4730 explicitly performed by the caller after the hard disk is successfully
4731 detached and the settings are saved with
4732 <link to="#saveSettings"/>, if it is the desired action.
4733 </note>
4734
4735 <result name="VBOX_E_INVALID_VM_STATE">
4736 Attempt to detach hard disk from a running virtual machine.
4737 </result>
4738 <result name="VBOX_E_OBJECT_NOT_FOUND">
4739 No hard disk attached to given slot/bus.
4740 </result>
4741 <result name="VBOX_E_NOT_SUPPORTED">
4742 Hard disk format does not support storage deletion.
4743 </result>
4744
4745 </desc>
4746 <param name="name" type="wstring" dir="in">
4747 <desc>name of the storage controller to detach the hard disk from.</desc>
4748 </param>
4749 <param name="controllerPort" type="long" dir="in">
4750 <desc>Port number to detach the hard disk from.</desc>
4751 </param>
4752 <param name="device" type="long" dir="in">
4753 <desc>Device slot number to detach the hard disk from.</desc>
4754 </param>
4755 </method>
4756
4757 <method name="getHardDiskAttachmentsOfController" const="yes">
4758 <desc>
4759 Returns an array of hard disk attachments which are attached to the
4760 the controller with the given name.
4761
4762 <result name="VBOX_E_OBJECT_NOT_FOUND">
4763 A storage controller with given name doesn't exist.
4764 </result>
4765 </desc>
4766 <param name="name" type="wstring" dir="in"/>
4767 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4768 </method>
4769
4770 <method name="getNetworkAdapter" const="yes">
4771 <desc>
4772 Returns the network adapter associated with the given slot.
4773 Slots are numbered sequentially, starting with zero. The total
4774 number of adapters per machine is defined by the
4775 <link to="ISystemProperties::networkAdapterCount"/> property,
4776 so the maximum slot number is one less than that property's value.
4777
4778 <result name="E_INVALIDARG">
4779 Invalid @a slot number.
4780 </result>
4781
4782 </desc>
4783 <param name="slot" type="unsigned long" dir="in"/>
4784 <param name="adapter" type="INetworkAdapter" dir="return"/>
4785 </method>
4786
4787 <method name="addStorageController">
4788 <desc>
4789 Adds a new storage controller (SCSI or SATA controller) to the
4790 machine and returns it as an instance of
4791 <link to="IStorageController" />.
4792
4793 @a name identifies the controller for subsequent calls such as
4794 <link to="#getStorageControllerByName" /> or
4795 <link to="#removeStorageController" /> or
4796 <link to="#attachHardDisk" />.
4797
4798 After the controller has been added, you can set its exact
4799 type by setting the <link to="IStorageController::controllerType" />.
4800
4801 <result name="VBOX_E_OBJECT_IN_USE">
4802 A storage controller with given name exists already.
4803 </result>
4804 <result name="E_INVALIDARG">
4805 Invalid @a controllerType.
4806 </result>
4807 </desc>
4808 <param name="name" type="wstring" dir="in"/>
4809 <param name="connectionType" type="StorageBus" dir="in"/>
4810 <param name="controller" type="IStorageController" dir="return"/>
4811 </method>
4812
4813 <method name="getStorageControllerByName" const="yes">
4814 <desc>
4815 Returns a storage controller with the given name.
4816
4817 <result name="VBOX_E_OBJECT_NOT_FOUND">
4818 A storage controller with given name doesn't exist.
4819 </result>
4820 </desc>
4821 <param name="name" type="wstring" dir="in"/>
4822 <param name="storageController" type="IStorageController" dir="return"/>
4823 </method>
4824
4825 <method name="removeStorageController">
4826 <desc>
4827 Removes a storage controller from the machine.
4828
4829 <result name="VBOX_E_OBJECT_NOT_FOUND">
4830 A storage controller with given name doesn't exist.
4831 </result>
4832 </desc>
4833 <param name="name" type="wstring" dir="in"/>
4834 </method>
4835
4836 <method name="getSerialPort" const="yes">
4837 <desc>
4838 Returns the serial port associated with the given slot.
4839 Slots are numbered sequentially, starting with zero. The total
4840 number of serial ports per machine is defined by the
4841 <link to="ISystemProperties::serialPortCount"/> property,
4842 so the maximum slot number is one less than that property's value.
4843
4844 <result name="E_INVALIDARG">
4845 Invalid @a slot number.
4846 </result>
4847
4848 </desc>
4849 <param name="slot" type="unsigned long" dir="in"/>
4850 <param name="port" type="ISerialPort" dir="return"/>
4851 </method>
4852
4853 <method name="getParallelPort" const="yes">
4854 <desc>
4855 Returns the parallel port associated with the given slot.
4856 Slots are numbered sequentially, starting with zero. The total
4857 number of parallel ports per machine is defined by the
4858 <link to="ISystemProperties::parallelPortCount"/> property,
4859 so the maximum slot number is one less than that property's value.
4860
4861 <result name="E_INVALIDARG">
4862 Invalid @a slot number.
4863 </result>
4864
4865 </desc>
4866 <param name="slot" type="unsigned long" dir="in"/>
4867 <param name="port" type="IParallelPort" dir="return"/>
4868 </method>
4869
4870 <method name="getNextExtraDataKey">
4871 <desc>
4872 Returns the machine-specific extra data key name following the
4873 supplied key.
4874
4875 An error is returned if the supplied @a key does not exist. An empty
4876 string is returned in @a nextKey if the supplied key is the last key.
4877 When supplying @c null or an empty string for the @a key, the first key
4878 item is returned in @a nextKey (if there is any). @a nextValue is an
4879 optional parameter and if supplied, the next key's value is returned in
4880 it.
4881
4882 <result name="VBOX_E_OBJECT_NOT_FOUND">
4883 Extra data @a key not found.
4884 </result>
4885
4886 </desc>
4887 <param name="key" type="wstring" dir="in">
4888 <desc>Name of the data key to follow.</desc>
4889 </param>
4890 <param name="nextKey" type="wstring" dir="out">
4891 <desc>Name of the next data key.</desc>
4892 </param>
4893 <param name="nextValue" type="wstring" dir="out">
4894 <desc>Value of the next data key.</desc>
4895 </param>
4896 </method>
4897
4898 <method name="getExtraData">
4899 <desc>
4900 Returns associated machine-specific extra data.
4901
4902 If the requested data @a key does not exist, this function will
4903 succeed and return an empty string in the @a value argument.
4904
4905 <result name="VBOX_E_FILE_ERROR">
4906 Settings file not accessible.
4907 </result>
4908 <result name="VBOX_E_XML_ERROR">
4909 Could not parse the settings file.
4910 </result>
4911
4912 </desc>
4913 <param name="key" type="wstring" dir="in">
4914 <desc>Name of the data key to get.</desc>
4915 </param>
4916 <param name="value" type="wstring" dir="return">
4917 <desc>Value of the requested data key.</desc>
4918 </param>
4919 </method>
4920
4921 <method name="setExtraData">
4922 <desc>
4923 Sets associated machine-specific extra data.
4924
4925 If you pass @c null or an empty string as a key @a value, the given
4926 @a key will be deleted.
4927
4928 <note>
4929 Before performing the actual data change, this method will ask all
4930 registered callbacks using the
4931 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4932 notification for a permission. If one of the callbacks refuses the
4933 new value, the change will not be performed.
4934 </note>
4935 <note>
4936 On success, the
4937 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4938 is called to inform all registered callbacks about a successful data
4939 change.
4940 </note>
4941 <note>
4942 This method can be called outside the machine session and therefore
4943 it's a caller's responsibility to handle possible race conditions
4944 when several clients change the same key at the same time.
4945 </note>
4946
4947 <result name="VBOX_E_FILE_ERROR">
4948 Settings file not accessible.
4949 </result>
4950 <result name="VBOX_E_XML_ERROR">
4951 Could not parse the settings file.
4952 </result>
4953
4954 </desc>
4955 <param name="key" type="wstring" dir="in">
4956 <desc>Name of the data key to set.</desc>
4957 </param>
4958 <param name="value" type="wstring" dir="in">
4959 <desc>Value to assign to the key.</desc>
4960 </param>
4961 </method>
4962
4963 <method name="saveSettings">
4964 <desc>
4965 Saves any changes to machine settings made since the session
4966 has been opened or a new machine has been created, or since the
4967 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4968 For registered machines, new settings become visible to all
4969 other VirtualBox clients after successful invocation of this
4970 method.
4971 <note>
4972 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4973 notification event after the configuration has been successfully
4974 saved (only for registered machines).
4975 </note>
4976 <note>
4977 Calling this method is only valid on instances returned
4978 by <link to="ISession::machine"/> and on new machines
4979 created by <link to="IVirtualBox::createMachine"/> but not
4980 yet registered, or on unregistered machines after calling
4981 <link to="IVirtualBox::unregisterMachine"/>.
4982 </note>
4983
4984 <result name="VBOX_E_FILE_ERROR">
4985 Settings file not accessible.
4986 </result>
4987 <result name="VBOX_E_XML_ERROR">
4988 Could not parse the settings file.
4989 </result>
4990 <result name="E_ACCESSDENIED">
4991 Modification request refused.
4992 </result>
4993
4994 </desc>
4995 </method>
4996
4997 <method name="saveSettingsWithBackup">
4998 <desc>
4999 Creates a backup copy of the machine settings file (<link
5000 to="IMachine::settingsFilePath"/>) in case of auto-conversion, and then calls
5001 <link to="IMachine::saveSettings"/>.
5002
5003 Note that the backup copy is created <b>only</b> if the settings file
5004 auto-conversion took place (see <link to="#settingsFileVersion"/> for
5005 details). Otherwise, this call is fully equivalent to
5006 <link to="IMachine::saveSettings"/> and no backup copying is done.
5007
5008 The backup copy is created in the same directory where the original
5009 settings file is located. It is given the following file name:
5010 <pre>
5011 original.xml.x.y-platform.bak
5012 </pre>
5013 where <tt>original.xml</tt> is the original settings file name
5014 (excluding path), and <tt>x.y-platform</tt> is the version of the old
5015 format of the settings file (before auto-conversion).
5016
5017 If the given backup file already exists, this method will try to add the
5018 <tt>.N</tt> suffix to the backup file name (where @c N counts from
5019 0 to 9) and copy it again until it succeeds. If all suffixes are
5020 occupied, or if any other copy error occurs, this method will return a
5021 failure.
5022
5023 If the copy operation succeeds, the @a bakFileName return argument will
5024 receive a full path to the created backup file (for informational
5025 purposes). Note that this will happen even if the subsequent
5026 <link to="#saveSettings"/> call performed by this method after the
5027 copy operation, fails.
5028
5029 <note>
5030 The VirtualBox API never calls this method. It is intended purely for
5031 the purposes of creating backup copies of the settings files by
5032 front-ends before saving the results of the automatically performed
5033 settings conversion to disk.
5034 </note>
5035
5036 <see>settingsFileVersion</see>
5037
5038 <result name="VBOX_E_FILE_ERROR">
5039 Settings file not accessible.
5040 </result>
5041 <result name="VBOX_E_XML_ERROR">
5042 Could not parse the settings file.
5043 </result>
5044 <result name="VBOX_E_INVALID_VM_STATE">
5045 Virtual machine is not mutable.
5046 </result>
5047 <result name="E_ACCESSDENIED">
5048 Modification request refused.
5049 </result>
5050
5051 </desc>
5052 <param name="bakFileName" type="wstring" dir="return">
5053 <desc>Full path to the created backup copy.</desc>
5054 </param>
5055 </method>
5056
5057 <method name="discardSettings">
5058 <desc>
5059 Discards any changes to the machine settings made since the session
5060 has been opened or since the last call to <link to="#saveSettings"/>
5061 or <link to="#discardSettings"/>.
5062 <note>
5063 Calling this method is only valid on instances returned
5064 by <link to="ISession::machine"/> and on new machines
5065 created by <link to="IVirtualBox::createMachine"/> or
5066 opened by <link to="IVirtualBox::openMachine"/> but not
5067 yet registered, or on unregistered machines after calling
5068 <link to="IVirtualBox::unregisterMachine"/>.
5069 </note>
5070
5071 <result name="VBOX_E_INVALID_VM_STATE">
5072 Virtual machine is not mutable.
5073 </result>
5074
5075 </desc>
5076 </method>
5077
5078 <method name="deleteSettings">
5079 <desc>
5080 Deletes the settings file of this machine from disk.
5081 The machine must not be registered in order for this operation
5082 to succeed.
5083 <note>
5084 <link to="#settingsModified"/> will return @c true after this
5085 method successfully returns.
5086 </note>
5087 <note>
5088 Calling this method is only valid on instances returned
5089 by <link to="ISession::machine"/> and on new machines
5090 created by <link to="IVirtualBox::createMachine"/> or
5091 opened by <link to="IVirtualBox::openMachine"/> but not
5092 yet registered, or on unregistered machines after calling
5093 <link to="IVirtualBox::unregisterMachine"/>.
5094 </note>
5095 <note>
5096 The deleted machine settings file can be restored (saved again)
5097 by calling <link to="#saveSettings"/>.
5098 </note>
5099
5100 <result name="VBOX_E_INVALID_VM_STATE">
5101 Cannot delete settings of a registered machine or
5102 machine not mutable.
5103 </result>
5104 <result name="VBOX_E_IPRT_ERROR">
5105 Could not delete the settings file.
5106 </result>
5107
5108 </desc>
5109 </method>
5110
5111 <method name="export">
5112 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5113 steps required to export VirtualBox machines to OVF.
5114 </desc>
5115
5116 <param name="aAppliance" type="IAppliance" dir="in">
5117 <desc>Appliance to export this machine to.</desc>
5118 </param>
5119 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5120 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5121 </param>
5122 </method >
5123
5124 <method name="getSnapshot">
5125 <desc>
5126 Returns a snapshot of this machine with the given UUID.
5127 A @c null UUID can be used to obtain the first snapshot
5128 taken on this machine. This is useful if you want to traverse
5129 the whole tree of snapshots starting from the root.
5130
5131 <result name="VBOX_E_OBJECT_NOT_FOUND">
5132 Virtual machine has no snapshots or snapshot not found.
5133 </result>
5134
5135 </desc>
5136 <param name="id" type="wstring" dir="in">
5137 <desc>UUID of the snapshot to get</desc>
5138 </param>
5139 <param name="snapshot" type="ISnapshot" dir="return">
5140 <desc>Snapshot object with the given UUID.</desc>
5141 </param>
5142 </method>
5143
5144 <method name="findSnapshot">
5145 <desc>
5146 Returns a snapshot of this machine with the given name.
5147
5148 <result name="VBOX_E_OBJECT_NOT_FOUND">
5149 Virtual machine has no snapshots or snapshot not found.
5150 </result>
5151
5152 </desc>
5153 <param name="name" type="wstring" dir="in">
5154 <desc>Name of the snapshot to find</desc>
5155 </param>
5156 <param name="snapshot" type="ISnapshot" dir="return">
5157 <desc>Snapshot object with the given name.</desc>
5158 </param>
5159 </method>
5160
5161 <method name="setCurrentSnapshot">
5162 <desc>
5163 Sets the current snapshot of this machine.
5164 <note>
5165 In the current implementation, this operation is not
5166 implemented.
5167 </note>
5168 </desc>
5169 <param name="id" type="wstring" dir="in">
5170 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5171 </param>
5172 </method>
5173
5174 <method name="createSharedFolder">
5175 <desc>
5176 Creates a new permanent shared folder by associating the given logical
5177 name with the given host path, adds it to the collection of shared
5178 folders and starts sharing it. Refer to the description of
5179 <link to="ISharedFolder"/> to read more about logical names.
5180
5181 <result name="VBOX_E_OBJECT_IN_USE">
5182 Shared folder already exists.
5183 </result>
5184 <result name="VBOX_E_FILE_ERROR">
5185 Shared folder @a hostPath not accessible.
5186 </result>
5187
5188 </desc>
5189 <param name="name" type="wstring" dir="in">
5190 <desc>Unique logical name of the shared folder.</desc>
5191 </param>
5192 <param name="hostPath" type="wstring" dir="in">
5193 <desc>Full path to the shared folder in the host file system.</desc>
5194 </param>
5195 <param name="writable" type="boolean" dir="in">
5196 <desc>Whether the share is writable or readonly</desc>
5197 </param>
5198 </method>
5199
5200 <method name="removeSharedFolder">
5201 <desc>
5202 Removes the permanent shared folder with the given name previously
5203 created by <link to="#createSharedFolder"/> from the collection of
5204 shared folders and stops sharing it.
5205
5206 <result name="VBOX_E_INVALID_VM_STATE">
5207 Virtual machine is not mutable.
5208 </result>
5209 <result name="VBOX_E_OBJECT_NOT_FOUND">
5210 Shared folder @a name does not exist.
5211 </result>
5212
5213 </desc>
5214 <param name="name" type="wstring" dir="in">
5215 <desc>Logical name of the shared folder to remove.</desc>
5216 </param>
5217 </method>
5218
5219 <method name="canShowConsoleWindow">
5220 <desc>
5221 Returns @c true if the VM console process can activate the
5222 console window and bring it to foreground on the desktop of
5223 the host PC.
5224 <note>
5225 This method will fail if a session for this machine is not
5226 currently open.
5227 </note>
5228
5229 <result name="VBOX_E_INVALID_VM_STATE">
5230 Machine session is not open.
5231 </result>
5232
5233 </desc>
5234 <param name="canShow" type="boolean" dir="return">
5235 <desc>
5236 @c true if the console window can be shown and @c false otherwise.
5237 </desc>
5238 </param>
5239 </method>
5240
5241 <method name="showConsoleWindow">
5242 <desc>
5243 Activates the console window and brings it to foreground on
5244 the desktop of the host PC. Many modern window managers on
5245 many platforms implement some sort of focus stealing
5246 prevention logic, so that it may be impossible to activate
5247 a window without the help of the currently active
5248 application. In this case, this method will return a non-zero
5249 identifier that represents the top-level window of the VM
5250 console process. The caller, if it represents a currently
5251 active process, is responsible to use this identifier (in a
5252 platform-dependent manner) to perform actual window
5253 activation.
5254 <note>
5255 This method will fail if a session for this machine is not
5256 currently open.
5257 </note>
5258
5259 <result name="VBOX_E_INVALID_VM_STATE">
5260 Machine session is not open.
5261 </result>
5262
5263 </desc>
5264 <param name="winId" type="unsigned long long" dir="return">
5265 <desc>
5266 Platform-dependent identifier of the top-level VM console
5267 window, or zero if this method has performed all actions
5268 necessary to implement the <i>show window</i> semantics for
5269 the given platform and/or VirtualBox front-end.
5270 </desc>
5271 </param>
5272 </method>
5273
5274 <method name="getGuestProperty">
5275 <desc>
5276 Reads an entry from the machine's guest property store.
5277
5278 <result name="VBOX_E_INVALID_VM_STATE">
5279 Machine session is not open.
5280 </result>
5281
5282 </desc>
5283 <param name="name" type="wstring" dir="in">
5284 <desc>
5285 The name of the property to read.
5286 </desc>
5287 </param>
5288 <param name="value" type="wstring" dir="out">
5289 <desc>
5290 The value of the property. If the property does not exist then this
5291 will be empty.
5292 </desc>
5293 </param>
5294 <param name="timestamp" type="unsigned long long" dir="out">
5295 <desc>
5296 The time at which the property was last modified, as seen by the
5297 server process.
5298 </desc>
5299 </param>
5300 <param name="flags" type="wstring" dir="out">
5301 <desc>
5302 Additional property parameters, passed as a comma-separated list of
5303 "name=value" type entries.
5304 </desc>
5305 </param>
5306 </method>
5307
5308 <method name="getGuestPropertyValue">
5309 <desc>
5310 Reads a value from the machine's guest property store.
5311
5312 <result name="VBOX_E_INVALID_VM_STATE">
5313 Machine session is not open.
5314 </result>
5315
5316 </desc>
5317 <param name="property" type="wstring" dir="in">
5318 <desc>
5319 The name of the property to read.
5320 </desc>
5321 </param>
5322 <param name="value" type="wstring" dir="return">
5323 <desc>
5324 The value of the property. If the property does not exist then this
5325 will be empty.
5326 </desc>
5327 </param>
5328 </method>
5329
5330 <method name="getGuestPropertyTimestamp">
5331 <desc>
5332 Reads a property timestamp from the machine's guest property store.
5333
5334 <result name="VBOX_E_INVALID_VM_STATE">
5335 Machine session is not open.
5336 </result>
5337
5338 </desc>
5339 <param name="property" type="wstring" dir="in">
5340 <desc>
5341 The name of the property to read.
5342 </desc>
5343 </param>
5344 <param name="value" type="unsigned long long" dir="return">
5345 <desc>
5346 The timestamp. If the property does not exist then this will be
5347 empty.
5348 </desc>
5349 </param>
5350 </method>
5351
5352 <method name="setGuestProperty">
5353 <desc>
5354 Sets, changes or deletes an entry in the machine's guest property
5355 store.
5356
5357 <result name="E_ACCESSDENIED">
5358 Property cannot be changed.
5359 </result>
5360 <result name="E_INVALIDARG">
5361 Invalid @a flags.
5362 </result>
5363 <result name="VBOX_E_INVALID_VM_STATE">
5364 Virtual machine is not mutable or session not open.
5365 </result>
5366 <result name="VBOX_E_INVALID_OBJECT_STATE">
5367 Cannot set transient property when machine not running.
5368 </result>
5369
5370 </desc>
5371 <param name="property" type="wstring" dir="in">
5372 <desc>
5373 The name of the property to set, change or delete.
5374 </desc>
5375 </param>
5376 <param name="value" type="wstring" dir="in">
5377 <desc>
5378 The new value of the property to set, change or delete. If the
5379 property does not yet exist and value is non-empty, it will be
5380 created. If the value is @c null or empty, the property will be
5381 deleted if it exists.
5382 </desc>
5383 </param>
5384 <param name="flags" type="wstring" dir="in">
5385 <desc>
5386 Additional property parameters, passed as a comma-separated list of
5387 "name=value" type entries.
5388 </desc>
5389 </param>
5390 </method>
5391
5392 <method name="setGuestPropertyValue">
5393 <desc>
5394 Sets, changes or deletes a value in the machine's guest property
5395 store. The flags field will be left unchanged or created empty for a
5396 new property.
5397
5398 <result name="E_ACCESSDENIED">
5399 Property cannot be changed.
5400 </result>
5401 <result name="VBOX_E_INVALID_VM_STATE">
5402 Virtual machine is not mutable or session not open.
5403 </result>
5404 <result name="VBOX_E_INVALID_OBJECT_STATE">
5405 Cannot set transient property when machine not running.
5406 </result>
5407 </desc>
5408
5409 <param name="property" type="wstring" dir="in">
5410 <desc>
5411 The name of the property to set, change or delete.
5412 </desc>
5413 </param>
5414 <param name="value" type="wstring" dir="in">
5415 <desc>
5416 The new value of the property to set, change or delete. If the
5417 property does not yet exist and value is non-empty, it will be
5418 created. If the value is @c null or empty, the property will be
5419 deleted if it exists.
5420 </desc>
5421 </param>
5422 </method>
5423
5424 <method name="enumerateGuestProperties">
5425 <desc>
5426 Return a list of the guest properties matching a set of patterns along
5427 with their values, time stamps and flags.
5428 </desc>
5429 <param name="patterns" type="wstring" dir="in">
5430 <desc>
5431 The patterns to match the properties against, separated by '|'
5432 characters. If this is empty or @c null, all properties will match.
5433 </desc>
5434 </param>
5435 <param name="name" type="wstring" dir="out" safearray="yes">
5436 <desc>
5437 The names of the properties returned.
5438 </desc>
5439 </param>
5440 <param name="value" type="wstring" dir="out" safearray="yes">
5441 <desc>
5442 The values of the properties returned. The array entries match the
5443 corresponding entries in the @a name array.
5444 </desc>
5445 </param>
5446 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5447 <desc>
5448 The time stamps of the properties returned. The array entries match
5449 the corresponding entries in the @a name array.
5450 </desc>
5451 </param>
5452 <param name="flags" type="wstring" dir="out" safearray="yes">
5453 <desc>
5454 The flags of the properties returned. The array entries match the
5455 corresponding entries in the @a name array.
5456 </desc>
5457 </param>
5458 </method>
5459</interface>
5460
5461 <!--
5462 // IConsole
5463 /////////////////////////////////////////////////////////////////////////
5464 -->
5465
5466 <interface
5467 name="IConsoleCallback" extends="$unknown"
5468 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5469 wsmap="suppress"
5470 >
5471
5472 <desc>
5473 This interface is used by a client of the Main API that need to
5474 be notified of events. For example, a graphical user interface
5475 can use this to learn about machine state changes so they can
5476 update the list of virtual machines without having to rely
5477 on polling.
5478
5479 Whenever relevant events occur in VirtualBox, the callbacks in
5480 objects of this interface are called. In order for this to be
5481 useful, a client needs to create its own subclass that implements
5482 this interface in which the methods for the relevant callbacks
5483 are overridden. An instance of this subclass interface can then
5484 be passed to <link to="IConsole::registerCallback" />.
5485 </desc>
5486
5487 <method name="onMousePointerShapeChange">
5488 <desc>
5489 Notification when the guest mouse pointer shape has
5490 changed. The new shape data is given.
5491 </desc>
5492 <param name="visible" type="boolean" dir="in">
5493 <desc>
5494 Flag whether the pointer is visible.
5495 </desc>
5496 </param>
5497 <param name="alpha" type="boolean" dir="in">
5498 <desc>
5499 Flag whether the pointer has an alpha channel.
5500 </desc>
5501 </param>
5502 <param name="xHot" type="unsigned long" dir="in">
5503 <desc>
5504 The pointer hot spot x coordinate.
5505 </desc>
5506 </param>
5507 <param name="yHot" type="unsigned long" dir="in">
5508 <desc>
5509 The pointer hot spot y coordinate.
5510 </desc>
5511 </param>
5512 <param name="width" type="unsigned long" dir="in">
5513 <desc>
5514 Width of the pointer shape in pixels.
5515 </desc>
5516 </param>
5517 <param name="height" type="unsigned long" dir="in">
5518 <desc>
5519 Height of the pointer shape in pixels.
5520 </desc>
5521 </param>
5522 <param name="shape" type="octet" mod="ptr" dir="in">
5523 <desc>
5524 Address of the shape buffer.
5525
5526 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5527 followed by a 32-bpp XOR (color) mask.
5528
5529 For pointers without alpha channel the XOR mask pixels are 32
5530 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5531 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5532
5533 An AND mask is used for pointers with alpha channel, so if the
5534 callback does not support alpha, the pointer could be
5535 displayed as a normal color pointer.
5536
5537 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5538 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5539 height</tt>. The padding bits at the end of each scanline are
5540 undefined.
5541
5542 The XOR mask follows the AND mask on the next 4-byte aligned
5543 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5544 Bytes in the gap between the AND and the XOR mask are undefined.
5545 The XOR mask scanlines have no gap between them and the size of
5546 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5547
5548 <note>
5549 If @a shape is 0, only the pointer visibility is changed.
5550 </note>
5551 </desc>
5552 </param>
5553 </method>
5554
5555 <method name="onMouseCapabilityChange">
5556 <desc>
5557 Notification when the mouse capabilities reported by the
5558 guest have changed. The new capabilities are passed.
5559 </desc>
5560 <param name="supportsAbsolute" type="boolean" dir="in"/>
5561 <param name="needsHostCursor" type="boolean" dir="in"/>
5562 </method>
5563
5564 <method name="onKeyboardLedsChange">
5565 <desc>
5566 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5567 to alter the state of the keyboard LEDs.
5568 </desc>
5569 <param name="numLock" type="boolean" dir="in"/>
5570 <param name="capsLock" type="boolean" dir="in"/>
5571 <param name="scrollLock" type="boolean" dir="in"/>
5572 </method>
5573
5574 <method name="onStateChange">
5575 <desc>
5576 Notification when the execution state of the machine has changed.
5577 The new state will be given.
5578 </desc>
5579 <param name="state" type="MachineState" dir="in"/>
5580 </method>
5581
5582 <method name="onAdditionsStateChange">
5583 <desc>
5584 Notification when a Guest Additions property changes.
5585 Interested callees should query IGuest attributes to
5586 find out what has changed.
5587 </desc>
5588 </method>
5589
5590 <method name="onDVDDriveChange">
5591 <desc>
5592 Notification when a property of the
5593 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5594 Interested callees should use IDVDDrive methods to find out what has
5595 changed.
5596 </desc>
5597 </method>
5598
5599 <method name="onFloppyDriveChange">
5600 <desc>
5601 Notification when a property of the
5602 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5603 Interested callees should use IFloppyDrive methods to find out what
5604 has changed.
5605 </desc>
5606 </method>
5607
5608 <method name="onNetworkAdapterChange">
5609 <desc>
5610 Notification when a property of one of the
5611 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5612 changes. Interested callees should use INetworkAdapter methods and
5613 attributes to find out what has changed.
5614 </desc>
5615 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5616 <desc>Network adapter that is subject to change.</desc>
5617 </param>
5618 </method>
5619
5620 <method name="onSerialPortChange">
5621 <desc>
5622 Notification when a property of one of the
5623 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5624 Interested callees should use ISerialPort methods and attributes
5625 to find out what has changed.
5626 </desc>
5627 <param name="serialPort" type="ISerialPort" dir="in">
5628 <desc>Serial port that is subject to change.</desc>
5629 </param>
5630 </method>
5631
5632 <method name="onParallelPortChange">
5633 <desc>
5634 Notification when a property of one of the
5635 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5636 changes. Interested callees should use ISerialPort methods and
5637 attributes to find out what has changed.
5638 </desc>
5639 <param name="parallelPort" type="IParallelPort" dir="in">
5640 <desc>Parallel port that is subject to change.</desc>
5641 </param>
5642 </method>
5643
5644 <method name="onStorageControllerChange">
5645 <desc>
5646 Notification when a property of one of the
5647 virtual <link to="IMachine::storageControllers">storage controllers</link>
5648 changes. Interested callees should query the corresponding collections
5649 to find out what has changed.
5650 </desc>
5651 </method>
5652
5653 <method name="onVRDPServerChange">
5654 <desc>
5655 Notification when a property of the
5656 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5657 Interested callees should use IVRDPServer methods and attributes to
5658 find out what has changed.
5659 </desc>
5660 </method>
5661
5662 <method name="onUSBControllerChange">
5663 <desc>
5664 Notification when a property of the virtual
5665 <link to="IMachine::USBController">USB controller</link> changes.
5666 Interested callees should use IUSBController methods and attributes to
5667 find out what has changed.
5668 </desc>
5669 </method>
5670
5671 <method name="onUSBDeviceStateChange">
5672 <desc>
5673 Notification when a USB device is attached to or detached from
5674 the virtual USB controller.
5675
5676 This notification is sent as a result of the indirect
5677 request to attach the device because it matches one of the
5678 machine USB filters, or as a result of the direct request
5679 issued by <link to="IConsole::attachUSBDevice"/> or
5680 <link to="IConsole::detachUSBDevice"/>.
5681
5682 This notification is sent in case of both a succeeded and a
5683 failed request completion. When the request succeeds, the
5684 @a error parameter is @c null, and the given device has been
5685 already added to (when @a attached is @c true) or removed from
5686 (when @a attached is @c false) the collection represented by
5687 <link to="IConsole::USBDevices"/>. On failure, the collection
5688 doesn't change and the @a error parameter represents the error
5689 message describing the failure.
5690
5691 </desc>
5692 <param name="device" type="IUSBDevice" dir="in">
5693 <desc>Device that is subject to state change.</desc>
5694 </param>
5695 <param name="attached" type="boolean" dir="in">
5696 <desc>
5697 @c true if the device was attached and @c false otherwise.
5698 </desc>
5699 </param>
5700 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5701 <desc>
5702 @c null on success or an error message object on failure.
5703 </desc>
5704 </param>
5705 </method>
5706
5707 <method name="onSharedFolderChange">
5708 <desc>
5709 Notification when a shared folder is added or removed.
5710 The @a scope argument defines one of three scopes:
5711 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5712 (<link to="Scope_Global">Global</link>),
5713 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5714 the machine (<link to="Scope_Machine">Machine</link>) or <link
5715 to="IConsole::sharedFolders">transient shared folders</link> of the
5716 machine (<link to="Scope_Session">Session</link>). Interested callees
5717 should use query the corresponding collections to find out what has
5718 changed.
5719 </desc>
5720 <param name="scope" type="Scope" dir="in">
5721 <desc>Scope of the notification.</desc>
5722 </param>
5723 </method>
5724
5725 <method name="onRuntimeError">
5726 <desc>
5727 Notification when an error happens during the virtual
5728 machine execution.
5729
5730 There are three kinds of runtime errors:
5731 <ul>
5732 <li><i>fatal</i></li>
5733 <li><i>non-fatal with retry</i></li>
5734 <li><i>non-fatal warnings</i></li>
5735 </ul>
5736
5737 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5738 to @c true. In case of fatal errors, the virtual machine
5739 execution is always paused before calling this notification, and
5740 the notification handler is supposed either to immediately save
5741 the virtual machine state using <link to="IConsole::saveState"/>
5742 or power it off using <link to="IConsole::powerDown"/>.
5743 Resuming the execution can lead to unpredictable results.
5744
5745 <b>Non-fatal</b> errors and warnings are indicated by the
5746 @a fatal parameter set to @c false. If the virtual machine
5747 is in the Paused state by the time the error notification is
5748 received, it means that the user can <i>try to resume</i> the machine
5749 execution after attempting to solve the problem that caused the
5750 error. In this case, the notification handler is supposed
5751 to show an appropriate message to the user (depending on the
5752 value of the @a id parameter) that offers several actions such
5753 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5754 wants to retry, the notification handler should continue
5755 the machine execution using the <link to="IConsole::resume"/>
5756 call. If the machine execution is not Paused during this
5757 notification, then it means this notification is a <i>warning</i>
5758 (for example, about a fatal condition that can happen very soon);
5759 no immediate action is required from the user, the machine
5760 continues its normal execution.
5761
5762 Note that in either case the notification handler
5763 <b>must not</b> perform any action directly on a thread
5764 where this notification is called. Everything it is allowed to
5765 do is to post a message to another thread that will then talk
5766 to the user and take the corresponding action.
5767
5768 Currently, the following error identifiers are known:
5769 <ul>
5770 <li><tt>"HostMemoryLow"</tt></li>
5771 <li><tt>"HostAudioNotResponding"</tt></li>
5772 <li><tt>"VDIStorageFull"</tt></li>
5773 </ul>
5774
5775 <note>
5776 This notification is not designed to be implemented by
5777 more than one callback at a time. If you have multiple
5778 IConsoleCallback instances registered on the given
5779 IConsole object, make sure you simply do nothing but
5780 return @c S_OK from all but one of them that does actual
5781 user notification and performs necessary actions.
5782 </note>
5783
5784 </desc>
5785 <param name="fatal" type="boolean" dir="in">
5786 <desc>Whether the error is fatal or not</desc>
5787 </param>
5788 <param name="id" type="wstring" dir="in">
5789 <desc>Error identifier</desc>
5790 </param>
5791 <param name="message" type="wstring" dir="in">
5792 <desc>Optional error message</desc>
5793 </param>
5794 </method>
5795
5796 <method name="onCanShowWindow">
5797 <desc>
5798 Notification when a call to
5799 <link to="IMachine::canShowConsoleWindow"/> is made by a
5800 front-end to check if a subsequent call to
5801 <link to="IMachine::showConsoleWindow"/> can succeed.
5802
5803 The callee should give an answer appropriate to the current
5804 machine state in the @a canShow argument. This answer must
5805 remain valid at least until the next
5806 <link to="IConsole::state">machine state</link> change.
5807
5808 <note>
5809 This notification is not designed to be implemented by
5810 more than one callback at a time. If you have multiple
5811 IConsoleCallback instances registered on the given
5812 IConsole object, make sure you simply do nothing but
5813 return @c true and @c S_OK from all but one of them that
5814 actually manages console window activation.
5815 </note>
5816 </desc>
5817 <param name="canShow" type="boolean" dir="return">
5818 <desc>
5819 @c true if the console window can be shown and @c false otherwise.
5820 </desc>
5821 </param>
5822 </method>
5823
5824 <method name="onShowWindow">
5825 <desc>
5826 Notification when a call to
5827 <link to="IMachine::showConsoleWindow"/>
5828 requests the console window to be activated and brought to
5829 foreground on the desktop of the host PC.
5830
5831 This notification should cause the VM console process to
5832 perform the requested action as described above. If it is
5833 impossible to do it at a time of this notification, this
5834 method should return a failure.
5835
5836 Note that many modern window managers on many platforms
5837 implement some sort of focus stealing prevention logic, so
5838 that it may be impossible to activate a window without the
5839 help of the currently active application (which is supposedly
5840 an initiator of this notification). In this case, this method
5841 must return a non-zero identifier that represents the
5842 top-level window of the VM console process. The caller, if it
5843 represents a currently active process, is responsible to use
5844 this identifier (in a platform-dependent manner) to perform
5845 actual window activation.
5846
5847 This method must set @a winId to zero if it has performed all
5848 actions necessary to complete the request and the console
5849 window is now active and in foreground, to indicate that no
5850 further action is required on the caller's side.
5851
5852 <note>
5853 This notification is not designed to be implemented by
5854 more than one callback at a time. If you have multiple
5855 IConsoleCallback instances registered on the given
5856 IConsole object, make sure you simply do nothing but
5857 return @c S_OK from all but one of them that actually
5858 manages console window activation.
5859 </note>
5860 </desc>
5861 <param name="winId" type="unsigned long long" dir="return">
5862 <desc>
5863 Platform-dependent identifier of the top-level VM console
5864 window, or zero if this method has performed all actions
5865 necessary to implement the <i>show window</i> semantics for
5866 the given platform and/or this VirtualBox front-end.
5867 </desc>
5868 </param>
5869 </method>
5870
5871 </interface>
5872
5873 <interface
5874 name="IRemoteDisplayInfo" extends="$unknown"
5875 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5876 wsmap="struct"
5877 >
5878 <desc>
5879 Contains information about the remote display (VRDP) capabilities and status.
5880 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5881 </desc>
5882
5883 <attribute name="active" type="boolean" readonly="yes">
5884 <desc>
5885 Whether the remote display connection is active.
5886 </desc>
5887 </attribute>
5888
5889 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5890 <desc>
5891 How many times a client connected.
5892 </desc>
5893 </attribute>
5894
5895 <attribute name="beginTime" type="long long" readonly="yes">
5896 <desc>
5897 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5898 </desc>
5899 </attribute>
5900
5901 <attribute name="endTime" type="long long" readonly="yes">
5902 <desc>
5903 When the last connection was terminated or the current time, if
5904 connection is still active, in milliseconds since 1970-01-01 UTC.
5905 </desc>
5906 </attribute>
5907
5908 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5909 <desc>
5910 How many bytes were sent in last or current, if still active, connection.
5911 </desc>
5912 </attribute>
5913
5914 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5915 <desc>
5916 How many bytes were sent in all connections.
5917 </desc>
5918 </attribute>
5919
5920 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5921 <desc>
5922 How many bytes were received in last or current, if still active, connection.
5923 </desc>
5924 </attribute>
5925
5926 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5927 <desc>
5928 How many bytes were received in all connections.
5929 </desc>
5930 </attribute>
5931
5932 <attribute name="user" type="wstring" readonly="yes">
5933 <desc>
5934 Login user name supplied by the client.
5935 </desc>
5936 </attribute>
5937
5938 <attribute name="domain" type="wstring" readonly="yes">
5939 <desc>
5940 Login domain name supplied by the client.
5941 </desc>
5942 </attribute>
5943
5944 <attribute name="clientName" type="wstring" readonly="yes">
5945 <desc>
5946 The client name supplied by the client.
5947 </desc>
5948 </attribute>
5949
5950 <attribute name="clientIP" type="wstring" readonly="yes">
5951 <desc>
5952 The IP address of the client.
5953 </desc>
5954 </attribute>
5955
5956 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5957 <desc>
5958 The client software version number.
5959 </desc>
5960 </attribute>
5961
5962 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5963 <desc>
5964 Public key exchange method used when connection was established.
5965 Values: 0 - RDP4 public key exchange scheme.
5966 1 - X509 certificates were sent to client.
5967 </desc>
5968 </attribute>
5969
5970 </interface>
5971
5972 <interface
5973 name="IConsole" extends="$unknown"
5974 uuid="0a51994b-cbc6-4686-94eb-d4e4023280e2"
5975 wsmap="managed"
5976 >
5977 <desc>
5978 The IConsole interface represents an interface to control virtual
5979 machine execution.
5980
5981 The console object that implements the IConsole interface is obtained
5982 from a session object after the session for the given machine has been
5983 opened using one of <link to="IVirtualBox::openSession"/>,
5984 <link to="IVirtualBox::openRemoteSession"/> or
5985 <link to="IVirtualBox::openExistingSession"/> methods.
5986
5987 Methods of the IConsole interface allow the caller to query the current
5988 virtual machine execution state, pause the machine or power it down, save
5989 the machine state or take a snapshot, attach and detach removable media
5990 and so on.
5991
5992 <see>ISession</see>
5993 </desc>
5994
5995 <attribute name="machine" type="IMachine" readonly="yes">
5996 <desc>
5997 Machine object this console is sessioned with.
5998 <note>
5999 This is a convenience property, it has the same value as
6000 <link to="ISession::machine"/> of the corresponding session
6001 object.
6002 </note>
6003 </desc>
6004 </attribute>
6005
6006 <attribute name="state" type="MachineState" readonly="yes">
6007 <desc>
6008 Current execution state of the machine.
6009 <note>
6010 This property always returns the same value as the corresponding
6011 property of the IMachine object this console is sessioned with.
6012 For the process that owns (executes) the VM, this is the
6013 preferable way of querying the VM state, because no IPC
6014 calls are made.
6015 </note>
6016 </desc>
6017 </attribute>
6018
6019 <attribute name="guest" type="IGuest" readonly="yes">
6020 <desc>Guest object.</desc>
6021 </attribute>
6022
6023 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6024 <desc>
6025 Virtual keyboard object.
6026 <note>
6027 If the machine is not running, any attempt to use
6028 the returned object will result in an error.
6029 </note>
6030 </desc>
6031 </attribute>
6032
6033 <attribute name="mouse" type="IMouse" readonly="yes">
6034 <desc>
6035 Virtual mouse object.
6036 <note>
6037 If the machine is not running, any attempt to use
6038 the returned object will result in an error.
6039 </note>
6040 </desc>
6041 </attribute>
6042
6043 <attribute name="display" type="IDisplay" readonly="yes">
6044 <desc>Virtual display object.
6045 <note>
6046 If the machine is not running, any attempt to use
6047 the returned object will result in an error.
6048 </note>
6049 </desc>
6050 </attribute>
6051
6052 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6053 <desc>Debugging interface.</desc>
6054 </attribute>
6055
6056 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6057 <desc>
6058 Collection of USB devices currently attached to the virtual
6059 USB controller.
6060 <note>
6061 The collection is empty if the machine is not running.
6062 </note>
6063 </desc>
6064 </attribute>
6065
6066 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6067 <desc>
6068 List of USB devices currently attached to the remote VRDP client.
6069 Once a new device is physically attached to the remote host computer,
6070 it appears in this list and remains there until detached.
6071 </desc>
6072 </attribute>
6073
6074 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6075 <desc>
6076 Collection of shared folders for the current session. These folders
6077 are called transient shared folders because they are available to the
6078 guest OS running inside the associated virtual machine only for the
6079 duration of the session (as opposed to
6080 <link to="IMachine::sharedFolders"/> which represent permanent shared
6081 folders). When the session is closed (e.g. the machine is powered down),
6082 these folders are automatically discarded.
6083
6084 New shared folders are added to the collection using
6085 <link to="#createSharedFolder"/>. Existing shared folders can be
6086 removed using <link to="#removeSharedFolder"/>.
6087 </desc>
6088 </attribute>
6089
6090 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6091 <desc>
6092 Interface that provides information on Remote Display (VRDP) connection.
6093 </desc>
6094 </attribute>
6095
6096 <method name="powerUp">
6097 <desc>
6098 Starts the virtual machine execution using the current machine
6099 state (that is, its current execution state, current settings and
6100 current hard disks).
6101
6102 If the machine is powered off or aborted, the execution will
6103 start from the beginning (as if the real hardware were just
6104 powered on).
6105
6106 If the machine is in the <link to="MachineState_Saved"/> state,
6107 it will continue its execution the point where the state has
6108 been saved.
6109
6110 <note>
6111 Unless you are trying to write a new VirtualBox front-end that
6112 performs direct machine execution (like the VirtualBox or VBoxSDL
6113 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6114 session opened by <link to="IVirtualBox::openSession"/> and use this
6115 session only to change virtual machine settings. If you simply want to
6116 start virtual machine execution using one of the existing front-ends
6117 (for example the VirtualBox GUI or headless server), simply use
6118 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6119 power up the machine automatically for you.
6120 </note>
6121
6122 <see>#saveState</see>
6123 <result name="VBOX_E_INVALID_VM_STATE">
6124 Virtual machine already running.
6125 </result>
6126 <result name="VBOX_E_HOST_ERROR">
6127 Host interface does not exist or name not set.
6128 </result>
6129 <result name="VBOX_E_FILE_ERROR">
6130 Invalid saved state file.
6131 </result>
6132 </desc>
6133 <param name="progress" type="IProgress" dir="return">
6134 <desc>Progress object to track the operation completion.</desc>
6135 </param>
6136 </method>
6137
6138 <method name="powerUpPaused">
6139 <desc>
6140 Identical to powerUp except that the VM will enter the
6141 <link to="MachineState_Paused"/> state, instead of
6142 <link to="MachineState_Running"/>.
6143
6144 <see>#powerUp</see>
6145 <result name="VBOX_E_INVALID_VM_STATE">
6146 Virtual machine already running.
6147 </result>
6148 <result name="VBOX_E_HOST_ERROR">
6149 Host interface does not exist or name not set.
6150 </result>
6151 <result name="VBOX_E_FILE_ERROR">
6152 Invalid saved state file.
6153 </result>
6154 </desc>
6155 <param name="progress" type="IProgress" dir="return">
6156 <desc>Progress object to track the operation completion.</desc>
6157 </param>
6158 </method>
6159
6160 <method name="powerDown">
6161 <desc>
6162 Initiates the power down procedure to stop the virtual machine
6163 execution.
6164
6165 The completion of the power down procedure is tracked using the returned
6166 IProgress object. After the operation is complete, the machine will go
6167 to the PoweredOff state.
6168 <result name="VBOX_E_INVALID_VM_STATE">
6169 Virtual machine must be Running, Paused or Stuck to be powered down.
6170 </result>
6171 </desc>
6172 <param name="progress" type="IProgress" dir="return">
6173 <desc>Progress object to track the operation completion.</desc>
6174 </param>
6175 </method>
6176
6177 <method name="reset">
6178 <desc>Resets the virtual machine.
6179 <result name="VBOX_E_INVALID_VM_STATE">
6180 Virtual machine not in Running state.
6181 </result>
6182 <result name="VBOX_E_VM_ERROR">
6183 Virtual machine error in reset operation.
6184 </result>
6185 </desc>
6186 </method>
6187
6188 <method name="pause">
6189 <desc>Pauses the virtual machine execution.
6190 <result name="VBOX_E_INVALID_VM_STATE">
6191 Virtual machine not in Running state.
6192 </result>
6193 <result name="VBOX_E_VM_ERROR">
6194 Virtual machine error in suspend operation.
6195 </result>
6196 </desc>
6197 </method>
6198
6199 <method name="resume">
6200 <desc>Resumes the virtual machine execution.
6201 <result name="VBOX_E_INVALID_VM_STATE">
6202 Virtual machine not in Paused state.
6203 </result>
6204 <result name="VBOX_E_VM_ERROR">
6205 Virtual machine error in resume operation.
6206 </result>
6207 </desc>
6208 </method>
6209
6210 <method name="powerButton">
6211 <desc>Sends the ACPI power button event to the guest.
6212 <result name="VBOX_E_INVALID_VM_STATE">
6213 Virtual machine not in Running state.
6214 </result>
6215 <result name="VBOX_E_PDM_ERROR">
6216 Controlled power off failed.
6217 </result>
6218 </desc>
6219 </method>
6220
6221 <method name="sleepButton">
6222 <desc>Sends the ACPI sleep button event to the guest.
6223 <result name="VBOX_E_INVALID_VM_STATE">
6224 Virtual machine not in Running state.
6225 </result>
6226 <result name="VBOX_E_PDM_ERROR">
6227 Sending sleep button event failed.
6228 </result>
6229 </desc>
6230 </method>
6231
6232 <method name="getPowerButtonHandled">
6233 <desc>Checks if the last power button event was handled by guest.
6234 <result name="VBOX_E_PDM_ERROR">
6235 Checking if the event was handled by the guest OS failed.
6236 </result>
6237 </desc>
6238 <param name="handled" type="boolean" dir="return"/>
6239 </method>
6240
6241 <method name="getGuestEnteredACPIMode">
6242 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6243 G1 (sleeping). If this method returns @c false, the guest will
6244 most likely not respond to external ACPI events.
6245 <result name="VBOX_E_INVALID_VM_STATE">
6246 Virtual machine not in Running state.
6247 </result>
6248 </desc>
6249 <param name="entered" type="boolean" dir="return"/>
6250 </method>
6251
6252 <method name="saveState">
6253 <desc>
6254 Saves the current execution state of a running virtual machine
6255 and stops its execution.
6256
6257 After this operation completes, the machine will go to the
6258 Saved state. Next time it is powered up, this state will
6259 be restored and the machine will continue its execution from
6260 the place where it was saved.
6261
6262 This operation differs from taking a snapshot to the effect
6263 that it doesn't create new differencing hard disks. Also, once
6264 the machine is powered up from the state saved using this method,
6265 the saved state is deleted, so it will be impossible to return
6266 to this state later.
6267
6268 <note>
6269 On success, this method implicitly calls
6270 <link to="IMachine::saveSettings"/> to save all current machine
6271 settings (including runtime changes to the DVD drive, etc.).
6272 Together with the impossibility to change any VM settings when it is
6273 in the Saved state, this guarantees adequate hardware
6274 configuration of the machine when it is restored from the saved
6275 state file.
6276 </note>
6277
6278 <note>
6279 The machine must be in the Running or Paused state, otherwise
6280 the operation will fail.
6281 </note>
6282 <result name="VBOX_E_INVALID_VM_STATE">
6283 Virtual machine state neither Running nor Paused.
6284 </result>
6285 <result name="VBOX_E_FILE_ERROR">
6286 Failed to create directory for saved state file.
6287 </result>
6288
6289 <see><link to="#takeSnapshot"/></see>
6290 </desc>
6291 <param name="progress" type="IProgress" dir="return">
6292 <desc>Progress object to track the operation completion.</desc>
6293 </param>
6294 </method>
6295
6296 <method name="adoptSavedState">
6297 <desc>
6298 Associates the given saved state file to the virtual machine.
6299
6300 On success, the machine will go to the Saved state. Next time it is
6301 powered up, it will be restored from the adopted saved state and
6302 continue execution from the place where the saved state file was
6303 created.
6304
6305 The specified saved state file path may be absolute or relative to the
6306 folder the VM normally saves the state to (usually,
6307 <link to="IMachine::snapshotFolder"/>).
6308
6309 <note>
6310 It's a caller's responsibility to make sure the given saved state
6311 file is compatible with the settings of this virtual machine that
6312 represent its virtual hardware (memory size, hard disk configuration
6313 etc.). If there is a mismatch, the behavior of the virtual machine
6314 is undefined.
6315 </note>
6316 <result name="VBOX_E_INVALID_VM_STATE">
6317 Virtual machine state neither PoweredOff nor Aborted.
6318 </result>
6319 </desc>
6320 <param name="savedStateFile" type="wstring" dir="in">
6321 <desc>Path to the saved state file to adopt.</desc>
6322 </param>
6323 </method>
6324
6325 <method name="forgetSavedState">
6326 <desc>
6327 Forgets the saved state of the virtual machine previously created
6328 by <link to="#saveState"/>. Next time the machine is powered up, a
6329 clean boot will occur. If @a remove is @c true the saved state file
6330 is deleted.
6331 <note>
6332 This operation is equivalent to resetting or powering off
6333 the machine without doing a proper shutdown in the guest OS.
6334 </note>
6335 <result name="VBOX_E_INVALID_VM_STATE">
6336 Virtual machine not in state Saved.
6337 </result>
6338 </desc>
6339 <param name="remove" type="boolean" dir="in">
6340 <desc>If @c true remove the saved state file.</desc>
6341 </param>
6342 </method>
6343
6344 <method name="getDeviceActivity">
6345 <desc>
6346 Gets the current activity type of a given device or device group.
6347 <result name="E_INVALIDARG">
6348 Invalid device type.
6349 </result>
6350 </desc>
6351 <param name="type" type="DeviceType" dir="in"/>
6352 <param name="activity" type="DeviceActivity" dir="return"/>
6353 </method>
6354
6355 <method name="attachUSBDevice">
6356 <desc>
6357 Attaches a host USB device with the given UUID to the
6358 USB controller of the virtual machine.
6359
6360 The device needs to be in one of the following states:
6361 <link to="USBDeviceState_Busy"/>,
6362 <link to="USBDeviceState_Available"/> or
6363 <link to="USBDeviceState_Held"/>,
6364 otherwise an error is immediately returned.
6365
6366 When the device state is
6367 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6368 be returned if the host computer refuses to release it for some reason.
6369
6370 <see>IUSBController::deviceFilters, USBDeviceState</see>
6371 <result name="VBOX_E_INVALID_VM_STATE">
6372 Virtual machine state neither Running nor Paused.
6373 </result>
6374 <result name="VBOX_E_PDM_ERROR">
6375 Virtual machine does not have a USB controller.
6376 </result>
6377 </desc>
6378 <param name="id" type="wstring" dir="in">
6379 <desc>UUID of the host USB device to attach.</desc>
6380 </param>
6381 </method>
6382
6383 <method name="detachUSBDevice">
6384 <desc>
6385 Detaches an USB device with the given UUID from the USB controller
6386 of the virtual machine.
6387
6388 After this method succeeds, the VirtualBox server re-initiates
6389 all USB filters as if the device were just physically attached
6390 to the host, but filters of this machine are ignored to avoid
6391 a possible automatic re-attachment.
6392
6393 <see>IUSBController::deviceFilters, USBDeviceState</see>
6394
6395 <result name="VBOX_E_PDM_ERROR">
6396 Virtual machine does not have a USB controller.
6397 </result>
6398 <result name="E_INVALIDARG">
6399 USB device not attached to this virtual machine.
6400 </result>
6401 </desc>
6402 <param name="id" type="wstring" dir="in">
6403 <desc>UUID of the USB device to detach.</desc>
6404 </param>
6405 <param name="device" type="IUSBDevice" dir="return">
6406 <desc>Detached USB device.</desc>
6407 </param>
6408 </method>
6409
6410 <method name="findUSBDeviceByAddress">
6411 <desc>
6412 Searches for a USB device with the given host address.
6413
6414 <result name="VBOX_E_OBJECT_NOT_FOUND">
6415 Given @c name does not correspond to any USB device.
6416 </result>
6417
6418 <see>IUSBDevice::address</see>
6419 </desc>
6420 <param name="name" type="wstring" dir="in">
6421 <desc>
6422 Address of the USB device (as assigned by the host) to
6423 search for.
6424 </desc>
6425 </param>
6426 <param name="device" type="IUSBDevice" dir="return">
6427 <desc>Found USB device object.</desc>
6428 </param>
6429 </method>
6430
6431 <method name="findUSBDeviceById">
6432 <desc>
6433 Searches for a USB device with the given UUID.
6434
6435 <result name="VBOX_E_OBJECT_NOT_FOUND">
6436 Given @c id does not correspond to any USB device.
6437 </result>
6438
6439 <see>IUSBDevice::id</see>
6440 </desc>
6441 <param name="id" type="wstring" dir="in">
6442 <desc>UUID of the USB device to search for.</desc>
6443 </param>
6444 <param name="device" type="IUSBDevice" dir="return">
6445 <desc>Found USB device object.</desc>
6446 </param>
6447 </method>
6448
6449 <method name="createSharedFolder">
6450 <desc>
6451 Creates a transient new shared folder by associating the given logical
6452 name with the given host path, adds it to the collection of shared
6453 folders and starts sharing it. Refer to the description of
6454 <link to="ISharedFolder"/> to read more about logical names.
6455
6456 <result name="VBOX_E_INVALID_VM_STATE">
6457 Virtual machine in Saved state or currently changing state.
6458 </result>
6459 <result name="VBOX_E_FILE_ERROR">
6460 Shared folder already exists or not accessible.
6461 </result>
6462 </desc>
6463 <param name="name" type="wstring" dir="in">
6464 <desc>Unique logical name of the shared folder.</desc>
6465 </param>
6466 <param name="hostPath" type="wstring" dir="in">
6467 <desc>Full path to the shared folder in the host file system.</desc>
6468 </param>
6469 <param name="writable" type="boolean" dir="in">
6470 <desc>Whether the share is writable or readonly</desc>
6471 </param>
6472 </method>
6473
6474 <method name="removeSharedFolder">
6475 <desc>
6476 Removes a transient shared folder with the given name previously
6477 created by <link to="#createSharedFolder"/> from the collection of
6478 shared folders and stops sharing it.
6479 <result name="VBOX_E_INVALID_VM_STATE">
6480 Virtual machine in Saved state or currently changing state.
6481 </result>
6482 <result name="VBOX_E_FILE_ERROR">
6483 Shared folder does not exists.
6484 </result>
6485 </desc>
6486 <param name="name" type="wstring" dir="in">
6487 <desc>Logical name of the shared folder to remove.</desc>
6488 </param>
6489 </method>
6490
6491 <method name="takeSnapshot">
6492 <desc>
6493 Saves the current execution state and all settings of the
6494 machine and creates differencing images for all
6495 normal (non-independent) hard disks.
6496
6497 This method can be called for a PoweredOff, Saved, Running or
6498 Paused virtual machine. When the machine is PoweredOff, an
6499 offline <link to="ISnapshot">snapshot</link> is created,
6500 in all other cases -- an online snapshot.
6501
6502 The taken snapshot is always based on the
6503 <link to="IMachine::currentSnapshot">current snapshot</link>
6504 of the associated virtual machine and becomes a new current snapshot.
6505
6506 <note>
6507 This method implicitly calls <link to="IMachine::saveSettings"/> to
6508 save all current machine settings before taking an offline snapshot.
6509 </note>
6510
6511 <see>ISnapshot, <link to="#saveState"/></see>
6512 <result name="VBOX_E_INVALID_VM_STATE">
6513 Virtual machine currently changing state.
6514 </result>
6515 </desc>
6516 <param name="name" type="wstring" dir="in">
6517 <desc>Short name for the snapshot.</desc>
6518 </param>
6519 <param name="description" type="wstring" dir="in">
6520 <desc>Optional description of the snapshot.</desc>
6521 </param>
6522 <param name="progress" type="IProgress" dir="return">
6523 <desc>Progress object to track the operation completion.</desc>
6524 </param>
6525 </method>
6526
6527 <method name="discardSnapshot">
6528 <desc>
6529
6530 Starts discarding the specified snapshot. The execution state
6531 and settings of the associated machine stored in the snapshot
6532 will be deleted. The contents of all differencing hard disks of
6533 this snapshot will be merged with the contents of their
6534 dependent child hard disks to keep the, disks valid (in other
6535 words, all changes represented by hard disks being discarded
6536 will be propagated to their child hard disks). After that, this
6537 snapshot's differencing hard disks will be deleted. The parent
6538 of this snapshot will become a new parent for all its child
6539 snapshots.
6540
6541 If the discarded snapshot is the current one, its parent
6542 snapshot will become a new current snapshot. The current machine
6543 state is not directly affected in this case, except that
6544 currently attached differencing hard disks based on hard disks
6545 of the discarded snapshot will be also merged as described
6546 above.
6547
6548 If the discarded snapshot is the first one (the root snapshot)
6549 and it has exactly one child snapshot, this child snapshot will
6550 become the first snapshot after discarding. If there are no
6551 children at all (i.e. the first snapshot is the only snapshot of
6552 the machine), both the current and the first snapshot of the
6553 machine will be set to @c null. In all other cases, the first
6554 snapshot cannot be discarded.
6555
6556 You cannot discard the snapshot if it
6557 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6558 hard disks that have differencing hard disks based on them. Snapshots of
6559 such kind can be discarded only when every normal hard disk has either
6560 no children at all or exactly one child. In the former case, the normal
6561 hard disk simply becomes unused (i.e. not attached to any VM). In the
6562 latter case, it receives all the changes stored in the child hard disk,
6563 and then it replaces the child hard disk in the configuration of the
6564 corresponding snapshot or machine.
6565
6566 Also, you cannot discard the snapshot if it stores hard disks
6567 (of any type) having differencing child hard disks that belong
6568 to other machines. Such snapshots can be only discarded after
6569 you discard all snapshots of other machines containing "foreign"
6570 child disks, or detach these "foreign" child disks from machines
6571 they are attached to.
6572
6573 One particular example of the snapshot storing normal hard disks
6574 is the first snapshot of a virtual machine that had normal hard
6575 disks attached when taking the snapshot. Be careful when
6576 discarding such snapshots because this implicitly commits
6577 changes (made since the snapshot being discarded has been taken)
6578 to normal hard disks (as described above), which may be not what
6579 you want.
6580
6581 The virtual machine is put to
6582 the <link to="MachineState_Discarding">Discarding</link> state until
6583 the discard operation is completed.
6584
6585 <note>
6586 The machine must not be running, otherwise the operation
6587 will fail.
6588 </note>
6589
6590 <note>
6591 Child hard disks of all normal hard disks of the discarded snapshot
6592 must be accessible (see <link to="IMedium::state"/>) for this
6593 operation to succeed. In particular, this means that all virtual
6594 machines, whose hard disks are directly or indirectly based on the
6595 hard disks of discarded snapshot, must be powered off.
6596 </note>
6597 <note>
6598 Merging hard disk contents can be very time and disk space
6599 consuming, if these disks are big in size and have many
6600 children. However, if the snapshot being discarded is the last
6601 (head) snapshot on the branch, the operation will be rather
6602 quick.
6603 </note>
6604 <note>
6605 Note that discarding the current snapshot
6606 will implicitly call <link to="IMachine::saveSettings"/> to
6607 make all current machine settings permanent.
6608 </note>
6609 <result name="VBOX_E_INVALID_VM_STATE">
6610 Virtual machine is running.
6611 </result>
6612 </desc>
6613 <param name="id" type="wstring" dir="in">
6614 <desc>UUID of the snapshot to discard.</desc>
6615 </param>
6616 <param name="progress" type="IProgress" dir="return">
6617 <desc>Progress object to track the operation completion.</desc>
6618 </param>
6619 </method>
6620
6621 <method name="discardCurrentState">
6622 <desc>
6623 This operation is similar to <link to="IConsole::discardSnapshot"/> but
6624 affects the current machine state. This means that the state stored in
6625 the current snapshot will become a new current state, and all current
6626 settings of the machine and changes stored in differencing hard disks
6627 will be lost.
6628
6629 After this operation is successfully completed, new empty differencing
6630 hard disks are created for all normal hard disks of the machine.
6631
6632 If the current snapshot of the machine is an online snapshot, the
6633 machine will go to the <link to="MachineState_Saved"> saved
6634 state</link>, so that the next time it is powered on, the execution
6635 state will be restored from the current snapshot.
6636
6637 <note>
6638 The machine must not be running, otherwise the operation will fail.
6639 </note>
6640
6641 <note>
6642 If the machine state is <link to="MachineState_Saved">Saved</link>
6643 prior to this operation, the saved state file will be implicitly
6644 discarded (as if <link to="IConsole::forgetSavedState"/> were
6645 called).
6646 </note>
6647
6648 <result name="VBOX_E_INVALID_VM_STATE">
6649 Virtual machine is running.
6650 </result>
6651 </desc>
6652 <param name="progress" type="IProgress" dir="return">
6653 <desc>Progress object to track the operation completion.</desc>
6654 </param>
6655 </method>
6656
6657 <method name="discardCurrentSnapshotAndState">
6658 <desc>
6659
6660 This method is equivalent to
6661 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6662 (currentSnapshot.id(), progress) followed by
6663 <link to="IConsole::discardCurrentState"/>.
6664
6665 As a result, the machine will be fully restored from the
6666 snapshot preceding the current snapshot, while both the current
6667 snapshot and the current machine state will be discarded.
6668
6669 If the current snapshot is the first snapshot of the machine (i.e. it
6670 has the only snapshot), the current machine state will be
6671 discarded <b>before</b> discarding the snapshot. In other words, the
6672 machine will be restored from its last snapshot, before discarding
6673 it. This differs from performing a single
6674 <link to="IConsole::discardSnapshot"/> call (note that no
6675 <link to="IConsole::discardCurrentState"/> will be possible after it)
6676 to the effect that the latter will preserve the current state instead of
6677 discarding it.
6678
6679 Unless explicitly mentioned otherwise, all remarks and
6680 limitations of the above two methods also apply to this method.
6681
6682 <note>
6683 The machine must not be running, otherwise the operation
6684 will fail.
6685 </note>
6686
6687 <note>
6688 If the machine state is <link to="MachineState_Saved">Saved</link>
6689 prior to this operation, the saved state file will be implicitly
6690 discarded (as if <link to="#forgetSavedState"/> were
6691 called).
6692 </note>
6693
6694 <note>
6695 This method is more efficient than calling both of the above
6696 methods separately: it requires less IPC calls and provides
6697 a single progress object.
6698 </note>
6699
6700 <result name="VBOX_E_INVALID_VM_STATE">
6701 Virtual machine is running.
6702 </result>
6703 </desc>
6704 <param name="progress" type="IProgress" dir="return">
6705 <desc>Progress object to track the operation completion.</desc>
6706 </param>
6707 </method>
6708
6709 <method name="registerCallback">
6710 <desc>
6711 Registers a new console callback on this instance. The methods of the
6712 callback interface will be called by this instance when the appropriate
6713 event occurs.
6714 </desc>
6715 <param name="callback" type="IConsoleCallback" dir="in"/>
6716 </method>
6717
6718 <method name="unregisterCallback">
6719 <desc>
6720 Unregisters the console callback previously registered using
6721 <link to="#registerCallback"/>.
6722 <result name="E_INVALIDARG">
6723 Given @a callback handler is not registered.
6724 </result>
6725 </desc>
6726 <param name="callback" type="IConsoleCallback" dir="in"/>
6727 </method>
6728 </interface>
6729
6730 <!--
6731 // IHost
6732 /////////////////////////////////////////////////////////////////////////
6733 -->
6734
6735 <interface
6736 name="IHostDVDDrive" extends="$unknown"
6737 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6738 wsmap="managed"
6739 >
6740 <desc>
6741 The IHostDVDDrive interface represents the physical CD/DVD drive
6742 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6743 </desc>
6744
6745 <attribute name="name" type="wstring" readonly="yes">
6746 <desc>
6747 Returns the platform-specific device identifier.
6748 On DOS-like platforms, it is a drive name (e.g. R:).
6749 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6750 </desc>
6751 </attribute>
6752 <attribute name="description" type="wstring" readonly="yes">
6753 <desc>
6754 Returns a human readable description for the drive. This
6755 description usually contains the product and vendor name. An
6756 empty string is returned if the description is not available.
6757 </desc>
6758 </attribute>
6759 <attribute name="udi" type="wstring" readonly="yes">
6760 <desc>
6761 Returns the unique device identifier for the drive. This
6762 attribute is reserved for future use instead of
6763 <link to="#name"/>. Currently it is not used and may return
6764 an empty string on some platforms.
6765 </desc>
6766 </attribute>
6767
6768 </interface>
6769
6770 <interface
6771 name="IHostFloppyDrive" extends="$unknown"
6772 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6773 wsmap="managed"
6774 >
6775 <desc>
6776 The IHostFloppyDrive interface represents the physical floppy drive
6777 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6778 </desc>
6779 <attribute name="name" type="wstring" readonly="yes">
6780 <desc>
6781 Returns the platform-specific device identifier.
6782 On DOS-like platforms, it is a drive name (e.g. A:).
6783 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6784 </desc>
6785 </attribute>
6786 <attribute name="description" type="wstring" readonly="yes">
6787 <desc>
6788 Returns a human readable description for the drive. This
6789 description usually contains the product and vendor name. An
6790 empty string is returned if the description is not available.
6791 </desc>
6792 </attribute>
6793 <attribute name="udi" type="wstring" readonly="yes">
6794 <desc>
6795 Returns the unique device identifier for the drive. This
6796 attribute is reserved for future use instead of
6797 <link to="#name"/>. Currently it is not used and may return
6798 an empty string on some platforms.
6799 </desc>
6800 </attribute>
6801 </interface>
6802
6803 <enum
6804 name="HostNetworkInterfaceMediumType"
6805 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6806 >
6807 <desc>
6808 Type of encapsulation. Ethernet encapsulation includes both wired and
6809 wireless Ethernet connections.
6810 <see>IHostNetworkInterface</see>
6811 </desc>
6812
6813 <const name="Unknown" value="0">
6814 <desc>
6815 The type of interface cannot be determined.
6816 </desc>
6817 </const>
6818 <const name="Ethernet" value="1">
6819 <desc>
6820 Ethernet frame encapsulation.
6821 </desc>
6822 </const>
6823 <const name="PPP" value="2">
6824 <desc>
6825 Point-to-point protocol encapsulation.
6826 </desc>
6827 </const>
6828 <const name="SLIP" value="3">
6829 <desc>
6830 Serial line IP encapsulation.
6831 </desc>
6832 </const>
6833 </enum>
6834
6835 <enum
6836 name="HostNetworkInterfaceStatus"
6837 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6838 >
6839 <desc>
6840 Current status of the interface.
6841 <see>IHostNetworkInterface</see>
6842 </desc>
6843
6844 <const name="Unknown" value="0">
6845 <desc>
6846 The state of interface cannot be determined.
6847 </desc>
6848 </const>
6849 <const name="Up" value="1">
6850 <desc>
6851 The interface is fully operational.
6852 </desc>
6853 </const>
6854 <const name="Down" value="2">
6855 <desc>
6856 The interface is not functioning.
6857 </desc>
6858 </const>
6859 </enum>
6860
6861 <enum
6862 name="HostNetworkInterfaceType"
6863 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6864 >
6865 <desc>
6866 Network interface type.
6867 </desc>
6868 <const name="Bridged" value="1"/>
6869 <const name="HostOnly" value="2"/>
6870 </enum>
6871
6872 <interface
6873 name="IHostNetworkInterface" extends="$unknown"
6874 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6875 wsmap="managed"
6876 >
6877 <desc>
6878 Represents one of host's network interfaces. IP V6 address and network
6879 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6880 separated by colons.
6881 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6882 </desc>
6883 <attribute name="name" type="wstring" readonly="yes">
6884 <desc>Returns the host network interface name.</desc>
6885 </attribute>
6886
6887 <attribute name="id" type="wstring" readonly="yes">
6888 <desc>Returns the interface UUID.</desc>
6889 </attribute>
6890
6891 <attribute name="networkName" type="wstring" readonly="yes">
6892 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6893 </attribute>
6894
6895 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6896 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6897 </attribute>
6898
6899 <attribute name="IPAddress" type="wstring" readonly="yes">
6900 <desc>Returns the IP V4 address of the interface.</desc>
6901 </attribute>
6902
6903 <attribute name="networkMask" type="wstring" readonly="yes">
6904 <desc>Returns the network mask of the interface.</desc>
6905 </attribute>
6906
6907 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6908 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6909 </attribute>
6910
6911 <attribute name="IPV6Address" type="wstring" readonly="yes">
6912 <desc>Returns the IP V6 address of the interface.</desc>
6913 </attribute>
6914
6915 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6916 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6917 </attribute>
6918
6919 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6920 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6921 </attribute>
6922
6923 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6924 <desc>Type of protocol encapsulation used.</desc>
6925 </attribute>
6926
6927 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6928 <desc>Status of the interface.</desc>
6929 </attribute>
6930
6931 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6932 <desc>specifies the host interface type.</desc>
6933 </attribute>
6934
6935 <method name="enableStaticIpConfig">
6936 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6937 <param name="IPAddress" type="wstring" dir="in">
6938 <desc>
6939 IP address.
6940 </desc>
6941 </param>
6942 <param name="networkMask" type="wstring" dir="in">
6943 <desc>
6944 network mask.
6945 </desc>
6946 </param>
6947 </method>
6948
6949 <method name="enableStaticIpConfigV6">
6950 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6951 <param name="IPV6Address" type="wstring" dir="in">
6952 <desc>
6953 IP address.
6954 </desc>
6955 </param>
6956 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6957 <desc>
6958 network mask.
6959 </desc>
6960 </param>
6961 </method>
6962
6963 <method name="enableDynamicIpConfig">
6964 <desc>enables the dynamic IP configuration.</desc>
6965 </method>
6966
6967 <method name="dhcpRediscover">
6968 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6969 </method>
6970
6971 </interface>
6972
6973 <interface
6974 name="IHost" extends="$unknown"
6975 uuid="a13b5556-5c0b-4f80-9df6-6f804f3336a1"
6976 wsmap="managed"
6977 >
6978 <desc>
6979 The IHost interface represents the physical machine that this VirtualBox
6980 installation runs on.
6981
6982 An object implementing this interface is returned by the
6983 <link to="IVirtualBox::host" /> attribute. This interface contains
6984 read-only information about the host's physical hardware (such as what
6985 processors and disks are available, what the host operating system is,
6986 and so on) and also allows for manipulating some of the host's hardware,
6987 such as global USB device filters and host interface networking.
6988
6989 </desc>
6990 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6991 <desc>List of DVD drives available on the host.</desc>
6992 </attribute>
6993
6994 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6995 <desc>List of floppy drives available on the host.</desc>
6996 </attribute>
6997
6998 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6999 <desc>
7000 List of USB devices currently attached to the host.
7001 Once a new device is physically attached to the host computer,
7002 it appears in this list and remains there until detached.
7003
7004 <note>
7005 If USB functionality is not available in the given edition of
7006 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7007 </note>
7008 </desc>
7009 </attribute>
7010
7011 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7012 <desc>
7013 List of USB device filters in action.
7014 When a new device is physically attached to the host computer,
7015 filters from this list are applied to it (in order they are stored
7016 in the list). The first matched filter will determine the
7017 <link to="IHostUSBDeviceFilter::action">action</link>
7018 performed on the device.
7019
7020 Unless the device is ignored by these filters, filters of all
7021 currently running virtual machines
7022 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7023
7024 <note>
7025 If USB functionality is not available in the given edition of
7026 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7027 </note>
7028
7029 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7030 </desc>
7031 </attribute>
7032
7033 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7034 <desc>List of host network interfaces currently defined on the host.</desc>
7035 </attribute>
7036
7037 <attribute name="processorCount" type="unsigned long" readonly="yes">
7038 <desc>Number of (logical) CPUs installed in the host system.</desc>
7039 </attribute>
7040
7041 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7042 <desc>Number of (logical) CPUs online in the host system.</desc>
7043 </attribute>
7044
7045 <method name="getProcessorSpeed">
7046 <desc>Query the (approximate) maximum speed of a specified host CPU in
7047 Megahertz.
7048 </desc>
7049 <param name="cpuId" type="unsigned long" dir="in">
7050 <desc>
7051 Identifier of the CPU.
7052 </desc>
7053 </param>
7054 <param name="speed" type="unsigned long" dir="return">
7055 <desc>
7056 Speed value. 0 is returned if value is not known or @a cpuId is
7057 invalid.
7058 </desc>
7059 </param>
7060 </method>
7061
7062 <method name="getProcessorFeature">
7063 <desc>Query whether a CPU feature is supported or not.</desc>
7064 <param name="feature" type="ProcessorFeature" dir="in">
7065 <desc>
7066 CPU Feature identifier.
7067 </desc>
7068 </param>
7069 <param name="supported" type="boolean" dir="return">
7070 <desc>
7071 Feature is supported or not.
7072 </desc>
7073 </param>
7074 </method>
7075
7076 <method name="getProcessorDescription">
7077 <desc>Query the model string of a specified host CPU.
7078 </desc>
7079 <param name="cpuId" type="unsigned long" dir="in">
7080 <desc>
7081 Identifier of the CPU.
7082 </desc>
7083 </param>
7084 <param name="description" type="wstring" dir="return">
7085 <desc>
7086 Model string. An empty string is returned if value is not known or
7087 @a cpuId is invalid.
7088 </desc>
7089 </param>
7090 </method>
7091
7092 <attribute name="memorySize" type="unsigned long" readonly="yes">
7093 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7094 </attribute>
7095
7096 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7097 <desc>Available system memory in the host system.</desc>
7098 </attribute>
7099
7100 <attribute name="operatingSystem" type="wstring" readonly="yes">
7101 <desc>Name of the host system's operating system.</desc>
7102 </attribute>
7103
7104 <attribute name="OSVersion" type="wstring" readonly="yes">
7105 <desc>Host operating system's version string.</desc>
7106 </attribute>
7107
7108 <attribute name="UTCTime" type="long long" readonly="yes">
7109 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7110 </attribute>
7111
7112 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7113 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7114 </attribute>
7115
7116 <method name="createHostOnlyNetworkInterface">
7117 <desc>
7118 Creates a new adapter for Host Only Networking.
7119 <result name="E_INVALIDARG">
7120 Host network interface @a name already exists.
7121 </result>
7122 </desc>
7123 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7124 <desc>
7125 Created host interface object.
7126 </desc>
7127 </param>
7128 <param name="progress" type="IProgress" dir="return">
7129 <desc>
7130 Progress object to track the operation completion.
7131 </desc>
7132 </param>
7133 </method>
7134
7135 <method name="removeHostOnlyNetworkInterface">
7136 <desc>
7137 Removes the given Host Only Networking interface.
7138 <result name="VBOX_E_OBJECT_NOT_FOUND">
7139 No host network interface matching @a id found.
7140 </result>
7141 </desc>
7142 <param name="id" type="wstring" dir="in">
7143 <desc>
7144 Adapter GUID.
7145 </desc>
7146 </param>
7147 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7148 <desc>
7149 Removed host interface object.
7150 </desc>
7151 </param>
7152 <param name="progress" type="IProgress" dir="return">
7153 <desc>
7154 Progress object to track the operation completion.
7155 </desc>
7156 </param>
7157 </method>
7158
7159 <method name="createUSBDeviceFilter">
7160 <desc>
7161 Creates a new USB device filter. All attributes except
7162 the filter name are set to empty (any match),
7163 <i>active</i> is @c false (the filter is not active).
7164
7165 The created filter can be added to the list of filters using
7166 <link to="#insertUSBDeviceFilter"/>.
7167
7168 <see>#USBDeviceFilters</see>
7169 </desc>
7170 <param name="name" type="wstring" dir="in">
7171 <desc>
7172 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7173 for more info.
7174 </desc>
7175 </param>
7176 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7177 <desc>Created filter object.</desc>
7178 </param>
7179 </method>
7180
7181 <method name="insertUSBDeviceFilter">
7182 <desc>
7183 Inserts the given USB device to the specified position
7184 in the list of filters.
7185
7186 Positions are numbered starting from @c 0. If the specified
7187 position is equal to or greater than the number of elements in
7188 the list, the filter is added at the end of the collection.
7189
7190 <note>
7191 Duplicates are not allowed, so an attempt to insert a
7192 filter already in the list is an error.
7193 </note>
7194 <note>
7195 If USB functionality is not available in the given edition of
7196 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7197 </note>
7198
7199 <see>#USBDeviceFilters</see>
7200
7201 <result name="VBOX_E_INVALID_OBJECT_STATE">
7202 USB device filter is not created within this VirtualBox instance.
7203 </result>
7204 <result name="E_INVALIDARG">
7205 USB device filter already in list.
7206 </result>
7207
7208 </desc>
7209 <param name="position" type="unsigned long" dir="in">
7210 <desc>Position to insert the filter to.</desc>
7211 </param>
7212 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7213 <desc>USB device filter to insert.</desc>
7214 </param>
7215 </method>
7216
7217 <method name="removeUSBDeviceFilter">
7218 <desc>
7219 Removes a USB device filter from the specified position in the
7220 list of filters.
7221
7222 Positions are numbered starting from @c 0. Specifying a
7223 position equal to or greater than the number of elements in
7224 the list will produce an error.
7225
7226 <note>
7227 If USB functionality is not available in the given edition of
7228 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7229 </note>
7230
7231 <see>#USBDeviceFilters</see>
7232
7233 <result name="E_INVALIDARG">
7234 USB device filter list empty or invalid @a position.
7235 </result>
7236
7237 </desc>
7238 <param name="position" type="unsigned long" dir="in">
7239 <desc>Position to remove the filter from.</desc>
7240 </param>
7241 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7242 <desc>Removed USB device filter.</desc>
7243 </param>
7244 </method>
7245
7246 <method name="findHostDVDDrive">
7247 <desc>
7248 Searches for a host DVD drive with the given @c name.
7249
7250 <result name="VBOX_E_OBJECT_NOT_FOUND">
7251 Given @c name does not correspond to any host drive.
7252 </result>
7253
7254 </desc>
7255 <param name="name" type="wstring" dir="in">
7256 <desc>Name of the host drive to search for</desc>
7257 </param>
7258 <param name="drive" type="IHostDVDDrive" dir="return">
7259 <desc>Found host drive object</desc>
7260 </param>
7261 </method>
7262
7263 <method name="findHostFloppyDrive">
7264 <desc>
7265 Searches for a host floppy drive with the given @c name.
7266
7267 <result name="VBOX_E_OBJECT_NOT_FOUND">
7268 Given @c name does not correspond to any host floppy drive.
7269 </result>
7270
7271 </desc>
7272 <param name="name" type="wstring" dir="in">
7273 <desc>Name of the host floppy drive to search for</desc>
7274 </param>
7275 <param name="drive" type="IHostFloppyDrive" dir="return">
7276 <desc>Found host floppy drive object</desc>
7277 </param>
7278 </method>
7279
7280 <method name="findHostNetworkInterfaceByName">
7281 <desc>
7282 Searches through all host network interfaces for an interface with
7283 the given @c name.
7284 <note>
7285 The method returns an error if the given @c name does not
7286 correspond to any host network interface.
7287 </note>
7288 </desc>
7289 <param name="name" type="wstring" dir="in">
7290 <desc>Name of the host network interface to search for.</desc>
7291 </param>
7292 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7293 <desc>Found host network interface object.</desc>
7294 </param>
7295 </method>
7296 <method name="findHostNetworkInterfaceById">
7297 <desc>
7298 Searches through all host network interfaces for an interface with
7299 the given GUID.
7300 <note>
7301 The method returns an error if the given GUID does not
7302 correspond to any host network interface.
7303 </note>
7304 </desc>
7305 <param name="id" type="wstring" dir="in">
7306 <desc>GUID of the host network interface to search for.</desc>
7307 </param>
7308 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7309 <desc>Found host network interface object.</desc>
7310 </param>
7311 </method>
7312 <method name="findHostNetworkInterfacesOfType">
7313 <desc>
7314 Searches through all host network interfaces and returns a list of interfaces of the specified type
7315 </desc>
7316 <param name="type" type="HostNetworkInterfaceType" dir="in">
7317 <desc>type of the host network interfaces to search for.</desc>
7318 </param>
7319 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7320 <desc>Found host network interface objects.</desc>
7321 </param>
7322 </method>
7323
7324 <method name="findUSBDeviceById">
7325 <desc>
7326 Searches for a USB device with the given UUID.
7327
7328 <result name="VBOX_E_OBJECT_NOT_FOUND">
7329 Given @c id does not correspond to any USB device.
7330 </result>
7331
7332 <see>IHostUSBDevice::id</see>
7333 </desc>
7334 <param name="id" type="wstring" dir="in">
7335 <desc>UUID of the USB device to search for.</desc>
7336 </param>
7337 <param name="device" type="IHostUSBDevice" dir="return">
7338 <desc>Found USB device object.</desc>
7339 </param>
7340 </method>
7341
7342 <method name="findUSBDeviceByAddress">
7343 <desc>
7344 Searches for a USB device with the given host address.
7345
7346 <result name="VBOX_E_OBJECT_NOT_FOUND">
7347 Given @c name does not correspond to any USB device.
7348 </result>
7349
7350 <see>IHostUSBDevice::address</see>
7351 </desc>
7352 <param name="name" type="wstring" dir="in">
7353 <desc>
7354 Address of the USB device (as assigned by the host) to
7355 search for.
7356 </desc>
7357 </param>
7358 <param name="device" type="IHostUSBDevice" dir="return">
7359 <desc>Found USB device object.</desc>
7360 </param>
7361 </method>
7362
7363 </interface>
7364
7365 <!--
7366 // ISystemProperties
7367 /////////////////////////////////////////////////////////////////////////
7368 -->
7369
7370 <interface
7371 name="ISystemProperties"
7372 extends="$unknown"
7373 uuid="9ca0f712-83f3-4631-b143-b75ef6568332"
7374 wsmap="managed"
7375 >
7376 <desc>
7377 The ISystemProperties interface represents global properties of the given
7378 VirtualBox installation.
7379
7380 These properties define limits and default values for various attributes
7381 and parameters. Most of the properties are read-only, but some can be
7382 changed by a user.
7383 </desc>
7384
7385 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7386 <desc>Minimum guest system memory in Megabytes.</desc>
7387 </attribute>
7388
7389 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7390 <desc>Maximum guest system memory in Megabytes.</desc>
7391 </attribute>
7392
7393 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7394 <desc>Minimum guest video memory in Megabytes.</desc>
7395 </attribute>
7396
7397 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7398 <desc>Maximum guest video memory in Megabytes.</desc>
7399 </attribute>
7400
7401 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7402 <desc>Minimum CPU count.</desc>
7403 </attribute>
7404
7405 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7406 <desc>Maximum CPU count.</desc>
7407 </attribute>
7408
7409 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7410 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7411 </attribute>
7412
7413 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7414 <desc>
7415 Number of network adapters associated with every
7416 <link to="IMachine"/> instance.
7417 </desc>
7418 </attribute>
7419
7420 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7421 <desc>
7422 Number of serial ports associated with every
7423 <link to="IMachine"/> instance.
7424 </desc>
7425 </attribute>
7426
7427 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7428 <desc>
7429 Number of parallel ports associated with every
7430 <link to="IMachine"/> instance.
7431 </desc>
7432 </attribute>
7433
7434 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7435 <desc>
7436 Maximum device position in the boot order. This value corresponds
7437 to the total number of devices a machine can boot from, to make it
7438 possible to include all possible devices to the boot list.
7439 <see><link to="IMachine::setBootOrder"/></see>
7440 </desc>
7441 </attribute>
7442
7443 <attribute name="defaultMachineFolder" type="wstring">
7444 <desc>
7445 Full path to the default directory used to create new or open
7446 existing machines when a settings file name contains no
7447 path.
7448
7449 The initial value of this property is
7450 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7451 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7452
7453 <note>
7454 Setting this property to @c null or an empty string will restore the
7455 initial value.
7456 </note>
7457 <note>
7458 When settings this property, the specified path can be
7459 absolute (full path) or relative
7460 to the <link to="IVirtualBox::homeFolder">
7461 VirtualBox home directory</link>.
7462 When reading this property, a full path is
7463 always returned.
7464 </note>
7465 <note>
7466 The specified path may not exist, it will be created
7467 when necessary.
7468 </note>
7469
7470 <see>
7471 <link to="IVirtualBox::createMachine"/>,
7472 <link to="IVirtualBox::openMachine"/>
7473 </see>
7474 </desc>
7475 </attribute>
7476
7477 <attribute name="defaultHardDiskFolder" type="wstring">
7478 <desc>
7479 Full path to the default directory used to create new or open existing
7480 virtual disks.
7481
7482 This path is used when the storage unit of a hard disk is a regular file
7483 in the host's file system and only a file name that contains no path is
7484 given.
7485
7486 The initial value of this property is
7487 <tt>&lt;</tt>
7488 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7489 <tt>&gt;/HardDisks</tt>.
7490
7491 <note>
7492 Setting this property to @c null or empty string will restore the
7493 initial value.
7494 </note>
7495 <note>
7496 When settings this property, the specified path can be relative
7497 to the
7498 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7499 absolute. When reading this property, a full path is
7500 always returned.
7501 </note>
7502 <note>
7503 The specified path may not exist, it will be created
7504 when necessary.
7505 </note>
7506
7507 <see>
7508 IHardDisk,
7509 <link to="IVirtualBox::createHardDisk"/>,
7510 <link to="IVirtualBox::openHardDisk"/>,
7511 <link to="IMedium::location"/>
7512 </see>
7513 </desc>
7514 </attribute>
7515
7516 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7517 <desc>
7518 List of all hard disk storage formats supported by this VirtualBox
7519 installation.
7520
7521 Keep in mind that the hard disk format identifier
7522 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7523 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7524 hard disk format is a case-insensitive string. This means that, for
7525 example, all of the following strings:
7526 <pre>
7527 "VDI"
7528 "vdi"
7529 "VdI"</pre>
7530 refer to the same hard disk format.
7531
7532 Note that the virtual hard disk framework is backend-based, therefore
7533 the list of supported formats depends on what backends are currently
7534 installed.
7535
7536 <see>
7537 <link to="IHardDiskFormat"/>,
7538 </see>
7539 </desc>
7540 </attribute>
7541
7542 <attribute name="defaultHardDiskFormat" type="wstring">
7543 <desc>
7544 Identifier of the default hard disk format used by VirtualBox.
7545
7546 The hard disk format set by this attribute is used by VirtualBox
7547 when the hard disk format was not specified explicitly. One example is
7548 <link to="IVirtualBox::createHardDisk"/> with the empty
7549 format argument. A more complex example is implicit creation of
7550 differencing hard disks when taking a snapshot of a virtual machine:
7551 this operation will try to use a format of the parent hard disk first
7552 and if this format does not support differencing hard disks the default
7553 format specified by this argument will be used.
7554
7555 The list of supported hard disk formats may be obtained by the
7556 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7557 format must have a capability to create differencing hard disks;
7558 otherwise opeartions that create hard disks implicitly may fail
7559 unexpectedly.
7560
7561 The initial value of this property is <tt>"VDI"</tt> in the current
7562 version of the VirtualBox product, but may change in the future.
7563
7564 <note>
7565 Setting this property to @c null or empty string will restore the
7566 initial value.
7567 </note>
7568
7569 <see>
7570 <link to="#hardDiskFormats"/>,
7571 <link to="IHardDiskFormat::id"/>,
7572 <link to="IVirtualBox::createHardDisk"/>
7573 </see>
7574 </desc>
7575 </attribute>
7576
7577 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7578 <desc>
7579 Library that provides authentication for VRDP clients. The library
7580 is used if a virtual machine's authentication type is set to "external"
7581 in the VM RemoteDisplay configuration.
7582
7583 The system library extension (".DLL" or ".so") must be omitted.
7584 A full path can be specified; if not, then the library must reside on the
7585 system's default library path.
7586
7587 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7588 of that name in one of the default VirtualBox library directories.
7589
7590 For details about VirtualBox authentication libraries and how to implement
7591 them, please refer to the VirtualBox manual.
7592
7593 <note>
7594 Setting this property to @c null or empty string will restore the
7595 initial value.
7596 </note>
7597 </desc>
7598 </attribute>
7599
7600 <attribute name="webServiceAuthLibrary" type="wstring">
7601 <desc>
7602 Library that provides authentication for webservice clients. The library
7603 is used if a virtual machine's authentication type is set to "external"
7604 in the VM RemoteDisplay configuration and will be called from
7605 within the <link to="IWebsessionManager::logon" /> implementation.
7606
7607 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7608 there is no per-VM setting for this, as the webservice is a global
7609 resource (if it is running). Only for this setting (for the webservice),
7610 setting this value to a literal <tt>"null"</tt> string disables authentication,
7611 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7612 no matter what user name and password are supplied.
7613
7614 The initial value of this property is <tt>"VRDPAuth"</tt>,
7615 meaning that the webservice will use the same authentication
7616 library that is used by default for VBoxVRDP (again, see
7617 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7618 The format and calling convention of authentication libraries
7619 is the same for the webservice as it is for VBoxVRDP.
7620
7621 <note>
7622 Setting this property to @c null or empty string will restore the
7623 initial value.
7624 </note>
7625 </desc>
7626 </attribute>
7627
7628 <attribute name="LogHistoryCount" type="unsigned long">
7629 <desc>
7630 This value specifies how many old release log files are kept.
7631 </desc>
7632 </attribute>
7633
7634 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7635 <desc>This value hold the default audio driver for the current
7636 system.</desc>
7637 </attribute>
7638 </interface>
7639
7640 <!--
7641 // IGuest
7642 /////////////////////////////////////////////////////////////////////////
7643 -->
7644
7645 <interface
7646 name="IGuestOSType" extends="$unknown"
7647 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7648 wsmap="struct"
7649 >
7650 <desc>
7651 </desc>
7652
7653 <attribute name="familyId" type="wstring" readonly="yes">
7654 <desc>Guest OS family identifier string.</desc>
7655 </attribute>
7656
7657 <attribute name="familyDescription" type="wstring" readonly="yes">
7658 <desc>Human readable description of the guest OS family.</desc>
7659 </attribute>
7660
7661 <attribute name="id" type="wstring" readonly="yes">
7662 <desc>Guest OS identifier string.</desc>
7663 </attribute>
7664
7665 <attribute name="description" type="wstring" readonly="yes">
7666 <desc>Human readable description of the guest OS.</desc>
7667 </attribute>
7668
7669 <attribute name="is64Bit" type="boolean" readonly="yes">
7670 <desc>Returns @c true if the given OS is 64-bit</desc>
7671 </attribute>
7672
7673 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7674 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7675 </attribute>
7676
7677 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7678 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7679 </attribute>
7680
7681 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7682 <desc>Recommended RAM size in Megabytes.</desc>
7683 </attribute>
7684
7685 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7686 <desc>Recommended video RAM size in Megabytes.</desc>
7687 </attribute>
7688
7689 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7690 <desc>Recommended hard disk size in Megabytes.</desc>
7691 </attribute>
7692
7693 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7694 <desc>Returns recommended network adapter for this OS type.</desc>
7695 </attribute>
7696 </interface>
7697
7698 <interface
7699 name="IGuest" extends="$unknown"
7700 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7701 wsmap="managed"
7702 >
7703 <desc>
7704 The IGuest interface represents information about the operating system
7705 running inside the virtual machine. Used in
7706 <link to="IConsole::guest"/>.
7707
7708 IGuest provides information about the guest operating system, whether
7709 Guest Additions are installed and other OS-specific virtual machine
7710 properties.
7711 </desc>
7712
7713 <attribute name="OSTypeId" type="wstring" readonly="yes">
7714 <desc>
7715 Identifier of the Guest OS type as reported by the Guest
7716 Additions.
7717 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7718 an IGuestOSType object representing details about the given
7719 Guest OS type.
7720 <note>
7721 If Guest Additions are not installed, this value will be
7722 the same as <link to="IMachine::OSTypeId"/>.
7723 </note>
7724 </desc>
7725 </attribute>
7726
7727 <attribute name="additionsActive" type="boolean" readonly="yes">
7728 <desc>
7729 Flag whether the Guest Additions are installed and active
7730 in which case their version will be returned by the
7731 <link to="#additionsVersion"/> property.
7732 </desc>
7733 </attribute>
7734
7735 <attribute name="additionsVersion" type="wstring" readonly="yes">
7736 <desc>
7737 Version of the Guest Additions (3 decimal numbers separated
7738 by dots) or empty when the Additions are not installed. The
7739 Additions may also report a version but yet not be active as
7740 the version might be refused by VirtualBox (incompatible) or
7741 other failures occurred.
7742 </desc>
7743 </attribute>
7744
7745 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7746 <desc>
7747 Flag whether seamless guest display rendering (seamless desktop
7748 integration) is supported.
7749 </desc>
7750 </attribute>
7751
7752 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7753 <desc>
7754 Flag whether the guest is in graphics mode. If it is not, then
7755 seamless rendering will not work, resize hints are not immediately
7756 acted on and guest display resizes are probably not initiated by
7757 the guest additions.
7758 </desc>
7759 </attribute>
7760
7761 <attribute name="memoryBalloonSize" type="unsigned long">
7762 <desc>Guest system memory balloon size in megabytes.</desc>
7763 </attribute>
7764
7765 <attribute name="statisticsUpdateInterval" type="unsigned long">
7766 <desc>Interval to update guest statistics in seconds.</desc>
7767 </attribute>
7768
7769 <method name="setCredentials">
7770 <desc>
7771 Store login credentials that can be queried by guest operating
7772 systems with Additions installed. The credentials are transient
7773 to the session and the guest may also choose to erase them. Note
7774 that the caller cannot determine whether the guest operating system
7775 has queried or made use of the credentials.
7776
7777 <result name="VBOX_E_VM_ERROR">
7778 VMM device is not available.
7779 </result>
7780
7781 </desc>
7782 <param name="userName" type="wstring" dir="in">
7783 <desc>User name string, can be empty</desc>
7784 </param>
7785 <param name="password" type="wstring" dir="in">
7786 <desc>Password string, can be empty</desc>
7787 </param>
7788 <param name="domain" type="wstring" dir="in">
7789 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7790 </param>
7791 <param name="allowInteractiveLogon" type="boolean" dir="in">
7792 <desc>
7793 Flag whether the guest should alternatively allow the user to
7794 interactively specify different credentials. This flag might
7795 not be supported by all versions of the Additions.
7796 </desc>
7797 </param>
7798 </method>
7799
7800 <method name="getStatistic">
7801 <desc>
7802 Query specified guest statistics as reported by the VirtualBox Additions.
7803 </desc>
7804 <param name="cpuId" type="unsigned long" dir="in">
7805 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7806 </param>
7807 <param name="statistic" type="GuestStatisticType" dir="in">
7808 <desc>Statistic type.</desc>
7809 </param>
7810 <param name="statVal" type="unsigned long" dir="return">
7811 <desc>Statistics value</desc>
7812 </param>
7813 </method>
7814
7815 </interface>
7816
7817
7818 <!--
7819 // IProgress
7820 /////////////////////////////////////////////////////////////////////////
7821 -->
7822
7823 <interface
7824 name="IProgress" extends="$unknown"
7825 uuid="6fcd0198-7fc5-4c53-8c37-653ac76854b5"
7826 wsmap="managed"
7827 >
7828 <desc>
7829 The IProgress interface is used to track and control
7830 asynchronous tasks within VirtualBox.
7831
7832 An instance of this is returned every time VirtualBox starts
7833 an asynchronous task (in other words, a separate thread) which
7834 continues to run after a method call returns. For example,
7835 <link to="IConsole::saveState" />, which saves the state of
7836 a running virtual machine, can take a long time to complete.
7837 To be able to display a progress bar, a user interface such as
7838 the VirtualBox graphical user interface can use the IProgress
7839 object returned by that method.
7840
7841 Note that IProgress is a "read-only" interface in the sense
7842 that only the VirtualBox internals behind the Main API can
7843 create and manipulate progress objects, whereas client code
7844 can only use the IProgress object to monitor a task's
7845 progress and, if <link to="#cancelable" /> is @c true,
7846 cancel the task by calling <link to="#cancel" />.
7847
7848 A task represented by IProgress consists of either one or
7849 several sub-operations that run sequentially, one by one (see
7850 <link to="#operation" /> and <link to="#operationCount" />).
7851 Every operation is identified by a number (starting from 0)
7852 and has a separate description.
7853
7854 You can find the individual percentage of completion of the current
7855 operation in <link to="#operationPercent" /> and the
7856 percentage of completion of the task as a whole
7857 in <link to="#percent" />.
7858
7859 Similarly, you can wait for the completion of a particular
7860 operation via <link to="#waitForOperationCompletion" /> or
7861 for the completion of the whole task via
7862 <link to="#waitForCompletion" />.
7863 </desc>
7864
7865 <attribute name="id" type="wstring" readonly="yes">
7866 <desc>ID of the task.</desc>
7867 </attribute>
7868
7869 <attribute name="description" type="wstring" readonly="yes">
7870 <desc>Description of the task.</desc>
7871 </attribute>
7872
7873 <attribute name="initiator" type="$unknown" readonly="yes">
7874 <desc>Initiator of the task.</desc>
7875 </attribute>
7876
7877 <attribute name="cancelable" type="boolean" readonly="yes">
7878 <desc>Whether the task can be interrupted.</desc>
7879 </attribute>
7880
7881 <attribute name="percent" type="unsigned long" readonly="yes">
7882 <desc>
7883 Current progress value of the task as a whole, in percent.
7884 This value depends on how many operations are already complete.
7885 Returns 100 if <link to="#completed" /> is @c true.
7886 </desc>
7887 </attribute>
7888
7889 <attribute name="timeRemaining" type="long" readonly="yes">
7890 <desc>
7891 Estimated remaining time until the task completes, in
7892 seconds. Returns 0 once the task has completed; returns -1
7893 if the remaining time cannot be computed, in particular if
7894 the current progress is 0.
7895
7896 Even if a value is returned, the estimate will be unreliable
7897 for low progress values. It will become more reliable as the
7898 task progresses; it is not recommended to display an ETA
7899 before at least 20% of a task have completed.
7900 </desc>
7901 </attribute>
7902
7903 <attribute name="completed" type="boolean" readonly="yes">
7904 <desc>Whether the task has been completed.</desc>
7905 </attribute>
7906
7907 <attribute name="canceled" type="boolean" readonly="yes">
7908 <desc>Whether the task has been canceled.</desc>
7909 </attribute>
7910
7911 <attribute name="resultCode" type="long" readonly="yes">
7912 <desc>
7913 Result code of the progress task.
7914 Valid only if <link to="#completed"/> is @c true.
7915 </desc>
7916 </attribute>
7917
7918 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7919 <desc>
7920 Extended information about the unsuccessful result of the
7921 progress operation. May be @c null if no extended information
7922 is available.
7923 Valid only if <link to="#completed"/> is @c true and
7924 <link to="#resultCode"/> indicates a failure.
7925 </desc>
7926 </attribute>
7927
7928 <attribute name="operationCount" type="unsigned long" readonly="yes">
7929 <desc>
7930 Number of sub-operations this task is divided into.
7931 Every task consists of at least one suboperation.
7932 </desc>
7933 </attribute>
7934
7935 <attribute name="operation" type="unsigned long" readonly="yes">
7936 <desc>Number of the sub-operation being currently executed.</desc>
7937 </attribute>
7938
7939 <attribute name="operationDescription" type="wstring" readonly="yes">
7940 <desc>
7941 Description of the sub-operation being currently executed.
7942 </desc>
7943 </attribute>
7944
7945 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7946 <desc>Progress value of the current sub-operation only, in percent.</desc>
7947 </attribute>
7948
7949 <method name="waitForCompletion">
7950 <desc>
7951 Waits until the task is done (including all sub-operations)
7952 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7953
7954 <result name="VBOX_E_IPRT_ERROR">
7955 Failed to wait for task completion.
7956 </result>
7957 </desc>
7958
7959 <param name="timeout" type="long" dir="in">
7960 <desc>
7961 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7962 </desc>
7963 </param>
7964 </method>
7965
7966 <method name="waitForOperationCompletion">
7967 <desc>
7968 Waits until the given operation is done with a given timeout in
7969 milliseconds; specify -1 for an indefinite wait.
7970
7971 <result name="VBOX_E_IPRT_ERROR">
7972 Failed to wait for operation completion.
7973 </result>
7974
7975 </desc>
7976 <param name="operation" type="unsigned long" dir="in">
7977 <desc>
7978 Number of the operation to wait for.
7979 Must be less than <link to="#operationCount"/>.
7980 </desc>
7981 </param>
7982 <param name="timeout" type="long" dir="in">
7983 <desc>
7984 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7985 </desc>
7986 </param>
7987 </method>
7988
7989 <method name="cancel">
7990 <desc>
7991 Cancels the task.
7992 <note>
7993 If <link to="#cancelable"/> is @c false, then this method will fail.
7994 </note>
7995
7996 <result name="VBOX_E_INVALID_OBJECT_STATE">
7997 Operation cannot be canceled.
7998 </result>
7999
8000 </desc>
8001 </method>
8002
8003 </interface>
8004
8005
8006 <!--
8007 // ISnapshot
8008 /////////////////////////////////////////////////////////////////////////
8009 -->
8010
8011 <interface
8012 name="ISnapshot" extends="$unknown"
8013 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8014 wsmap="managed"
8015 >
8016 <desc>
8017 The ISnapshot interface represents a snapshot of the virtual
8018 machine.
8019
8020 Together with the differencing hard disks that are created
8021 when a snapshot is taken, a machine can be brought back to
8022 the exact state it was in when the snapshot was taken.
8023
8024 The ISnapshot interface has no methods, only attributes; snapshots
8025 are controlled through methods of the <link to="IConsole" /> interface
8026 which also manage the hard disk images associated with the snapshot.
8027 The following operations exist:
8028
8029 <ul>
8030 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8031 by creating new, empty differencing images for the machine's
8032 hard disks and saving the VM settings and (if the VM is running)
8033 the current VM state in the snapshot.
8034
8035 The differencing images will then receive all data written to
8036 the machine's hard disks, while their parent (base) images
8037 remain unmodified after the snapshot has been taken (see
8038 <link to="IHardDisk" /> for details about differencing images).
8039 This simplifies restoring a machine to the state of a snapshot:
8040 only the differencing images need to be deleted.
8041
8042 The current machine state is not changed by taking a snapshot.
8043 If the machine is running, it will resume execution after the
8044 snapshot has been taken.
8045 </li>
8046
8047 <li><link to="IConsole::discardCurrentState"/>: this goes back to
8048 a previous snapshot. This resets the machine's state to that of
8049 the previous snapshot by deleting the differencing image of each
8050 of the machine's hard disks and setting the machine's settings
8051 and state to the state that was saved in the snapshot (if any).
8052
8053 This destroys the machine's current state.
8054 </li>
8055
8056 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
8057 without affecting the current machine state.
8058
8059 This does not change the machine, but instead frees the resources
8060 allocated when the snapshot was taken: the settings and machine state
8061 is deleted (if any), and the snapshot's differencing image for each
8062 of the machine's hard disks gets merged with its parent image.
8063
8064 Neither the current machine state nor other snapshots are affected
8065 by this operation, except that parent disk images will be modified
8066 to contain the disk data associated with the snapshot being deleted.
8067 </li>
8068
8069 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
8070 this completely reverts the virtual machine to the state it was in
8071 before the current snapshot has been taken. Effectively, this goes
8072 back to the state before the current snapshot, which might be
8073 an earlier snapshot.
8074
8075 The current state, as well as the current snapshot, are lost.
8076 </li>
8077 </ul>
8078
8079 Each snapshot contains the settings of the virtual machine (hardware
8080 configuration etc.). In addition, if the machine was running when the
8081 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8082 the current VM state is saved in the snapshot (similarly to what happens
8083 when a VM's state is saved). The snapshot is then said to
8084 be <i>online</i> because when restoring it, the VM will be running.
8085
8086 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8087 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8088
8089 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8090 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8091 it then contains a so-called "zero execution state", representing a
8092 machine that is powered off.
8093
8094 <h3>Snapshot branches and the "current" snapshot</h3>
8095
8096 Snapshots can be chained, whereby every next snapshot is based on the
8097 previous one. This chaining is related to hard disk branching
8098 (see the <link to="IHardDisk"/> description) in that every time
8099 a new snapshot is created, a new differencing hard disk is implicitly
8100 created for all normal hard disks attached to the machine.
8101
8102 Each virtual machine has a "current snapshot", identified by
8103 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8104 to the last snapshot in the chain. In a future version of VirtualBox,
8105 it will be possible to reset a machine's current state to that of an
8106 earlier snapshot without discarding the current state so that it will be
8107 possible to create alternative snapshot paths in a snapshot tree.
8108
8109 In the current implementation, multiple snapshot branches within one
8110 virtual machine are not allowed. Every machine has a single branch,
8111 and <link to="IConsole::takeSnapshot"/> operation adds a new
8112 snapshot to the top of that branch.
8113 </desc>
8114
8115 <attribute name="id" type="wstring" readonly="yes">
8116 <desc>UUID of the snapshot.</desc>
8117 </attribute>
8118
8119 <attribute name="name" type="wstring">
8120 <desc>Short name of the snapshot.</desc>
8121 </attribute>
8122
8123 <attribute name="description" type="wstring">
8124 <desc>Optional description of the snapshot.</desc>
8125 </attribute>
8126
8127 <attribute name="timeStamp" type="long long" readonly="yes">
8128 <desc>
8129 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8130 </desc>
8131 </attribute>
8132
8133 <attribute name="online" type="boolean" readonly="yes">
8134 <desc>
8135 @c true if this snapshot is an online snapshot and @c false otherwise.
8136
8137 <note>
8138 When this attribute is @c true, the
8139 <link to="IMachine::stateFilePath"/> attribute of the
8140 <link to="#machine"/> object associated with this snapshot
8141 will point to the saved state file. Otherwise, it will be
8142 an empty string.
8143 </note>
8144 </desc>
8145 </attribute>
8146
8147 <attribute name="machine" type="IMachine" readonly="yes">
8148 <desc>
8149 Virtual machine this snapshot is taken on. This object
8150 stores all settings the machine had when taking this snapshot.
8151 <note>
8152 The returned machine object is immutable, i.e. no
8153 any settings can be changed.
8154 </note>
8155 </desc>
8156 </attribute>
8157
8158 <attribute name="parent" type="ISnapshot" readonly="yes">
8159 <desc>
8160 Parent snapshot (a snapshot this one is based on).
8161 <note>
8162 It's not an error to read this attribute on a snapshot
8163 that doesn't have a parent -- a @c null object will be
8164 returned to indicate this.
8165 </note>
8166 </desc>
8167 </attribute>
8168
8169 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8170 <desc>
8171 Child snapshots (all snapshots having this one as a parent).
8172 <note>
8173 In the current implementation, there can be only one
8174 child snapshot, or no children at all, meaning this is the
8175 last (head) snapshot.
8176 </note>
8177 </desc>
8178 </attribute>
8179
8180 </interface>
8181
8182
8183 <!--
8184 // IMedia
8185 /////////////////////////////////////////////////////////////////////////
8186 -->
8187
8188 <enum
8189 name="MediaState"
8190 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8191 >
8192 <desc>
8193 Virtual media state.
8194 <see>IMedia</see>
8195 </desc>
8196
8197 <const name="NotCreated" value="0">
8198 <desc>
8199 Associated media storage does not exist (either was not created yet or
8200 was deleted).
8201 </desc>
8202 </const>
8203 <const name="Created" value="1">
8204 <desc>
8205 Associated storage exists and accessible.
8206 </desc>
8207 </const>
8208 <const name="LockedRead" value="2">
8209 <desc>
8210 Media is locked for reading, no data modification is possible.
8211 </desc>
8212 </const>
8213 <const name="LockedWrite" value="3">
8214 <desc>
8215 Media is locked for writing, no concurrent data reading or modification
8216 is possible.
8217 </desc>
8218 </const>
8219 <const name="Inaccessible" value="4">
8220 <desc>
8221 Associated media storage is not accessible.
8222 </desc>
8223 </const>
8224 <const name="Creating" value="5">
8225 <desc>
8226 Associated media storage is being created.
8227 </desc>
8228 </const>
8229 <const name="Deleting" value="6">
8230 <desc>
8231 Associated media storage is being deleted.
8232 </desc>
8233 </const>
8234 </enum>
8235
8236 <interface
8237 name="IMedium" extends="$unknown"
8238 uuid="f585787c-7728-40f6-853a-13705426e936"
8239 wsmap="managed"
8240 >
8241 <desc>
8242 The IMedium interface is a common interface for all objects representing
8243 virtual media such as hard disks, CD/DVD images and floppy images.
8244
8245 Each medium is associated with a storage unit (such as a file on the host
8246 computer or a network resource) that holds actual data. The location of
8247 the storage unit is represented by the #location attribute. The value of
8248 this attribute is media type dependent.
8249
8250 The exact media type may be determined by querying the appropriate
8251 interface such as:
8252 <ul>
8253 <li><link to="IHardDisk" /> (virtual hard disks)</li>
8254 <li><link to="IDVDImage" /> (standard CD/DVD ISO image files)</li>
8255 <li><link to="IFloppyImage" /> (raw floppy image files)</li>
8256 </ul>
8257
8258 Existing media are opened using the following methods, depending on the
8259 media type:
8260 <ul>
8261 <li><link to="IVirtualBox::openHardDisk"/></li>
8262 <li><link to="IVirtualBox::openDVDImage"/></li>
8263 <li><link to="IVirtualBox::openFloppyImage"/></li>
8264 </ul>
8265
8266 New hard disk media are created using the
8267 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8268 images are created outside VirtualBox, usually by storing a copy
8269 of the real medium of the corresponding type in a regular file.
8270
8271 <h3>Known Media</h3>
8272
8273 When an existing medium gets opened for the first time, it gets
8274 automatically remembered by the given VirtualBox installation or, in other
8275 words, becomes a <i>known medium</i>. Known media are stored in the media
8276 registry transparently maintained by VirtualBox and stored in settings
8277 files so that this registry is preserved when VirtualBox is not running.
8278
8279 Newly created virtual hard disks get remembered only when the associated
8280 storage unit is actually created (see IHardDisk for more details).
8281
8282 All known media can be enumerated using
8283 <link to="IVirtualBox::hardDisks"/>,
8284 <link to="IVirtualBox::DVDImages"/> and
8285 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8286 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8287 and similar methods or by location using
8288 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8289
8290 Only known media can be attached to virtual machines.
8291
8292 Removing known media from the media registry is performed when the given
8293 medium is closed using the <link to="#close"/> method or when its
8294 associated storage unit is deleted (only for hard disks).
8295
8296 <h3>Accessibility Checks</h3>
8297
8298 The given medium (with the created storage unit) is considered to be
8299 <i>accessible</i> when its storage unit can be read.
8300 Accessible media are indicated by the <link to="MediaState_Created"/>
8301 value of the <link to="#state"/> attribute. When the storage unit cannot
8302 be read (for example, because it is located on a disconnected network
8303 resource, or was accidentally deleted outside VirtualBox), the medium is
8304 considered to be <i>inaccessible</i> which is indicated by the
8305 <link to="MediaState_Inaccessible"/> state. The details about the reason
8306 of being inaccessible can be obtained using the
8307 <link to="#lastAccessError"/> attribute.
8308
8309 A new accessibility check is performed each time the <link to="#state"/>
8310 attribute is read. Please note that this check may take long time (several
8311 seconds or even minutes, depending on the storage unit location and
8312 format), and will block the calling thread until finished. For this
8313 reason, it is recommended to never read this attribute on the main UI
8314 thread to avoid making the UI unresponsive.
8315
8316 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8317 created for the first time), all known media are in the
8318 <link to="MediaState_Inaccessible"/> state but the value of the <link
8319 to="#lastAccessError"/> attribute is an empty string because no actual
8320 accessibility check is made on startup. This is done to make the
8321 VirtualBox object ready for serving requests as
8322 fast as possible and let the end-user application decide if it needs to
8323 check media accessibility right away or not.
8324 </desc>
8325
8326 <attribute name="id" type="wstring" readonly="yes">
8327 <desc>
8328 UUID of the medium. For a newly created medium, this value is a randomly
8329 generated UUID.
8330
8331 <note>
8332 For media in one of MediaState_NotCreated, MediaState_Creating or
8333 MediaState_Deleting states, the value of this property is undefined
8334 and will most likely be an empty UUID.
8335 </note>
8336 </desc>
8337 </attribute>
8338
8339 <attribute name="description" type="wstring">
8340 <desc>
8341 Optional description of the medium. For newly created media, the value
8342 of this attribute value is an empty string.
8343
8344 Media types that don't support this attribute will return E_NOTIMPL in
8345 attempt to get or set this attribute's value.
8346
8347 <note>
8348 For some storage types, reading this attribute may return an outdated
8349 (last known) value when <link to="#state"/> is <link
8350 to="MediaState_Inaccessible"/> or <link
8351 to="MediaState_LockedWrite"/> because the value of this attribute is
8352 stored within the storage unit itself. Also note that changing the
8353 attribute value is not possible in such case, as well as when the
8354 medium is the <link to="MediaState_LockedRead"/> state.
8355 </note>
8356 </desc>
8357 </attribute>
8358
8359 <attribute name="state" type="MediaState" readonly="yes">
8360 <desc>
8361 Current media state. Inspect <link to="MediaState"/> values for details.
8362
8363 Reading this attribute may take a long time because an accessibility
8364 check of the storage unit is performed each time the attribute is read.
8365 This check may cause a significant delay if the storage unit of the
8366 given medium is, for example, a file located on a network share which is
8367 not currently accessible due to connectivity problems -- the call will
8368 not return until a timeout interval defined by the host OS for this
8369 operation expires.
8370
8371 If the last known state of the medium is <link to="MediaState_Created"/>
8372 and the accessibility check fails then the state would be set to
8373 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8374 may be used to get more details about the failure. If the state of the
8375 medium is <link to="MediaState_LockedRead"/> or
8376 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8377 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8378 accessibility check in this case.
8379
8380 Note that not all media states are applicable to all media types.
8381 For example, states <link to="MediaState_NotCreated"/>,
8382 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8383 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8384 IFloppyImage media.
8385 </desc>
8386 </attribute>
8387
8388 <attribute name="location" type="wstring">
8389 <desc>
8390 Location of the storage unit holding media data.
8391
8392 The format of the location string is media type specific. For media
8393 types using regular files in a host's file system, the location
8394 string is the full file name.
8395
8396 Some media types may support changing the storage unit location by
8397 simply changing the value of this property. If this operation is not
8398 supported, the implementation will return E_NOTIMPL in attempt to set
8399 this attribute's value.
8400
8401 When setting a value of the location attribute which is a regular file
8402 in the host's file system, the given file name may be either relative to
8403 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8404 absolute. Note that if the given location specification does not contain
8405 the file extension part then a proper default extension will be
8406 automatically appended by the implementation depending on the media type.
8407 </desc>
8408 </attribute>
8409
8410 <attribute name="name" type="wstring" readonly="yes">
8411 <desc>
8412 Name of the storage unit holding media data.
8413
8414 The returned string is a short version of the <link to="#location"/>
8415 attribute that is suitable for representing the medium in situations
8416 where the full location specification is too long (such as lists
8417 and comboboxes in GUI frontends). This string is also used by frontends
8418 to sort the media list alphabetically when needed.
8419
8420 For example, for locations that are regular files in the host's file
8421 system, the value of this attribute is just the file name (+ extension),
8422 without the path specification.
8423
8424 Note that as opposed to the <link to="#location"/> attribute, the name
8425 attribute will not necessary be unique for a list of media of the
8426 given type and format.
8427 </desc>
8428 </attribute>
8429
8430 <attribute name="size" type="unsigned long long" readonly="yes">
8431 <desc>
8432 Physical size of the storage unit used to hold media data (in bytes).
8433
8434 <note>
8435 For media whose <link to="#state"/> is <link
8436 to="MediaState_Inaccessible"/>, the value of this property is the
8437 last known size. For <link to="MediaState_NotCreated"/> media,
8438 the returned value is zero.
8439 </note>
8440 </desc>
8441 </attribute>
8442
8443 <attribute name="lastAccessError" type="wstring" readonly="yes">
8444 <desc>
8445 Text message that represents the result of the last accessibility
8446 check.
8447
8448 Accessibility checks are performed each time the <link to="#state"/>
8449 attribute is read. An empty string is returned if the last
8450 accessibility check was successful. A non-empty string indicates a
8451 failure and should normally describe a reason of the failure (for
8452 example, a file read error).
8453 </desc>
8454 </attribute>
8455
8456 <attribute name="machineIds" type="wstring" safearray="yes" readonly="yes">
8457 <desc>
8458 Array of UUIDs of all machines this medium is attached to.
8459
8460 A @c null array is returned if this medium is not attached to any
8461 machine or to any machine's snapshot.
8462
8463 <note>
8464 The returned array will include a machine even if this medium is not
8465 attached to that machine in the current state but attached to it in
8466 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8467 details.
8468 </note>
8469 </desc>
8470 </attribute>
8471
8472 <method name="getSnapshotIds">
8473 <desc>
8474 Returns an array of UUIDs of all snapshots of the given machine where
8475 this medium is attached to.
8476
8477 If the medium is attached to the machine in the current state, then the
8478 first element in the array will always be the ID of the queried machine
8479 (i.e. the value equal to the @c machineId argument), followed by
8480 snapshot IDs (if any).
8481
8482 If the medium is not attached to the machine in the current state, then
8483 the array will contain only snapshot IDs.
8484
8485 The returned array may be @c null if this medium is not attached
8486 to the given machine at all, neither in the current state nor in one of
8487 the snapshots.
8488 </desc>
8489 <param name="machineId" type="wstring" dir="in">
8490 <desc>
8491 UUID of the machine to query.
8492 </desc>
8493 </param>
8494 <param name="snapshotIds" type="wstring" safearray="yes" dir="return">
8495 <desc>
8496 Array of snapshot UUIDs of the given machine using this medium.
8497 </desc>
8498 </param>
8499 </method>
8500
8501 <method name="lockRead">
8502 <desc>
8503 Locks this medium for reading.
8504
8505 The read lock is shared: many clients can simultaneously lock the
8506 same media for reading unless it is already locked for writing (see
8507 <link to="#lockWrite"/>) in which case an error is returned.
8508
8509 When the medium is locked for reading, it cannot be modified
8510 from within VirtualBox. This means that any method that changes
8511 the properties of this medium or contents of the storage unit
8512 will return an error (unless explicitly stated otherwise) and
8513 that an attempt to start a virtual machine that wants to modify
8514 the medium will also fail.
8515
8516 When the virtual machine is started up, it locks for reading all
8517 media it uses in read-only mode. If some media cannot be locked
8518 for reading, the startup procedure will fail.
8519
8520 The medium locked for reading must be unlocked using the <link
8521 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8522 can be nested and must be followed by the same number of paired
8523 <link to="#unlockRead"/> calls.
8524
8525 This method sets the media state to <link
8526 to="MediaState_LockedRead" /> on success. The state prior to
8527 this call must be <link to="MediaState_Created" />,
8528 <link to="MediaState_Inaccessible" /> or
8529 <link to="MediaState_LockedRead" />.
8530 As you can see, inaccessible media can be locked too. This is
8531 not an error; this method performs a logical lock that prevents
8532 modifications of this media through the VirtualBox API, not a
8533 physical lock of the underlying storage unit.
8534
8535 This method returns the current state of the medium
8536 <b>before</b> the operation.
8537
8538 <result name="VBOX_E_INVALID_OBJECT_STATE">
8539 Invalid media state (e.g. not created, locked, inaccessible,
8540 creating, deleting).
8541 </result>
8542
8543 </desc>
8544 <param name="state" type="MediaState" dir="return">
8545 <desc>
8546 State of the medium after the operation.
8547 </desc>
8548 </param>
8549 </method>
8550
8551 <method name="unlockRead">
8552 <desc>
8553 Cancels the read lock previously set by <link to="#lockRead"/>.
8554
8555 For both, success and failure, this method returns the current state
8556 of the medium <b>after</b> the operation.
8557
8558 See <link to="#lockRead"/> for more details.
8559
8560 <result name="VBOX_E_INVALID_OBJECT_STATE">
8561 Medium not locked for reading.
8562 </result>
8563
8564 </desc>
8565 <param name="state" type="MediaState" dir="return">
8566 <desc>
8567 State of the medium after the operation.
8568 </desc>
8569 </param>
8570 </method>
8571
8572 <method name="lockWrite">
8573 <desc>
8574 Locks this medium for writing.
8575
8576 The write lock, as opposed to <link to="#lockRead"/>, is
8577 exclusive: there may be only one client holding a write lock
8578 and there may be no read locks while the write lock is held.
8579
8580 When the medium is locked for writing, it cannot be modified
8581 from within VirtualBox and it is not guaranteed that the values
8582 of its properties are up-to-date. Any method that changes the
8583 properties of this medium or contents of the storage unit will
8584 return an error (unless explicitly stated otherwise) and an
8585 attempt to start a virtual machine wanting to modify or to
8586 read the medium will fail.
8587
8588 When the virtual machine is started up, it locks for writing all
8589 media it uses to write data to. If any medium could not be locked
8590 for writing, the startup procedure will fail.
8591
8592 The medium locked for writing must be unlocked using the <link
8593 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8594 can <b>not</b> be nested and must be followed by a<link
8595 to="#unlockWrite"/> call before the next lockWrite call.
8596
8597 This method sets the media state to <link to="MediaState_LockedWrite" />
8598 on success. The state prior to this call must be <link to="MediaState_Created"/>
8599 or <link to="MediaState_Inaccessible"/>. As you can see, inaccessible
8600 media can be locked too. This is not an error; this method
8601 performs a logical lock preventing modifications of this
8602 media through the VirtualBox API, not a physical lock of the
8603 underlying storage unit.
8604
8605 For both, success and failure, this method returns the current
8606 state of the medium <b>before</b> the operation.
8607
8608 <result name="VBOX_E_INVALID_OBJECT_STATE">
8609 Invalid media state (e.g. not created, locked, inaccessible,
8610 creating, deleting).
8611 </result>
8612
8613 </desc>
8614 <param name="state" type="MediaState" dir="return">
8615 <desc>
8616 State of the medium after the operation.
8617 </desc>
8618 </param>
8619 </method>
8620
8621 <method name="unlockWrite">
8622 <desc>
8623 Cancels the write lock previously set by <link to="#lockWrite"/>.
8624
8625 For both, success and failure, this method returns the current
8626 state of the medium <b>after</b> the operation.
8627
8628 See <link to="#lockWrite"/> for more details.
8629
8630 <result name="VBOX_E_INVALID_OBJECT_STATE">
8631 Medium not locked for writing.
8632 </result>
8633
8634 </desc>
8635 <param name="state" type="MediaState" dir="return">
8636 <desc>
8637 State of the medium after the operation.
8638 </desc>
8639 </param>
8640 </method>
8641
8642 <method name="close">
8643 <desc>
8644 Closes this medium.
8645
8646 The hard disk must not be attached to any known virtual machine
8647 and must not have any known child hard disks, otherwise the
8648 operation will fail.
8649
8650 When the hard disk is successfully closed, it gets removed from
8651 the list of remembered hard disks, but its storage unit is not
8652 deleted. In particular, this means that this hard disk can be
8653 later opened again using the <link
8654 to="IVirtualBox::openHardDisk"/> call.
8655
8656 Note that after this method successfully returns, the given hard
8657 disk object becomes uninitialized. This means that any attempt
8658 to call any of its methods or attributes will fail with the
8659 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8660
8661 <result name="VBOX_E_INVALID_OBJECT_STATE">
8662 Invalid media state (other than not created, created or
8663 inaccessible).
8664 </result>
8665 <result name="VBOX_E_OBJECT_IN_USE">
8666 Medium attached to virtual machine.
8667 </result>
8668 <result name="VBOX_E_FILE_ERROR">
8669 Settings file not accessible.
8670 </result>
8671 <result name="VBOX_E_XML_ERROR">
8672 Could not parse the settings file.
8673 </result>
8674
8675 </desc>
8676 </method>
8677
8678 </interface>
8679
8680
8681 <!--
8682 // IHardDisk
8683 /////////////////////////////////////////////////////////////////////////
8684 -->
8685
8686 <enum
8687 name="HardDiskType"
8688 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8689 >
8690 <desc>
8691 Virtual hard disk type.
8692 <see>IHardDisk</see>
8693 </desc>
8694
8695 <const name="Normal" value="0">
8696 <desc>
8697 Normal hard disk (attached directly or indirectly, preserved
8698 when taking snapshots).
8699 </desc>
8700 </const>
8701 <const name="Immutable" value="1">
8702 <desc>
8703 Immutable hard disk (attached indirectly, changes are wiped out
8704 after powering off the virtual machine).
8705 </desc>
8706 </const>
8707 <const name="Writethrough" value="2">
8708 <desc>
8709 Write through hard disk (attached directly, ignored when
8710 taking snapshots).
8711 </desc>
8712 </const>
8713 </enum>
8714
8715 <enum
8716 name="HardDiskVariant"
8717 uuid="eb7fc6b3-ae23-4c5d-a1f6-e3522dd1efb0"
8718 >
8719 <desc>
8720 Virtual hard disk image variant. More than one flag may be set.
8721 <see>IHardDisk</see>
8722 </desc>
8723
8724 <const name="Standard" value="0">
8725 <desc>
8726 No particular variant requested, results in using the backend default.
8727 </desc>
8728 </const>
8729 <const name="VmdkSplit2G" value="0x01">
8730 <desc>
8731 VMDK image split in chunks of less than 2GByte.
8732 </desc>
8733 </const>
8734 <const name="VmdkStreamOptimized" value="0x04">
8735 <desc>
8736 VMDK streamOptimized image. Special import/export format which is
8737 read-only/append-only.
8738 </desc>
8739 </const>
8740 <const name="VmdkESX" value="0x08">
8741 <desc>
8742 VMDK format variant used on ESX products.
8743 </desc>
8744 </const>
8745 <const name="Fixed" value="0x10000">
8746 <desc>
8747 Fixed image. Only allowed for base images.
8748 </desc>
8749 </const>
8750 <const name="Diff" value="0x20000">
8751 <desc>
8752 Fixed image. Only allowed for base images.
8753 </desc>
8754 </const>
8755 </enum>
8756
8757 <interface
8758 name="IHardDiskAttachment" extends="$unknown"
8759 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8760 wsmap="struct"
8761 >
8762 <desc>
8763 The IHardDiskAttachment interface represents a hard disk attachment of a
8764 virtual machine.
8765
8766 Every hard disk attachment specifies a slot of the virtual hard disk
8767 controller and a virtual hard disk attached to this slot.
8768
8769 The array of hard disk attachments is returned by
8770 <link to="IMachine::hardDiskAttachments"/>.
8771 </desc>
8772
8773 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8774 <desc>Hard disk object associated with this attachment.</desc>
8775 </attribute>
8776
8777 <attribute name="controller" type="wstring" readonly="yes">
8778 <desc>Interface bus of this attachment.</desc>
8779 </attribute>
8780
8781 <attribute name="port" type="long" readonly="yes">
8782 <desc>Port number of this attachment.</desc>
8783 </attribute>
8784
8785 <attribute name="device" type="long" readonly="yes">
8786 <desc>Device slot number of this attachment.</desc>
8787 </attribute>
8788
8789 </interface>
8790
8791 <interface
8792 name="IHardDisk" extends="IMedium"
8793 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8794 wsmap="managed"
8795 >
8796 <desc>
8797 The IHardDisk interface represents a virtual hard disk drive
8798 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8799
8800 <h3>Hard Disk Types</h3>
8801
8802 There are three types of hard disks:
8803 <link to="HardDiskType_Normal">Normal</link>,
8804 <link to="HardDiskType_Immutable">Immutable</link> and
8805 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8806 hard disk defines how the hard disk is attached to a virtual machine and
8807 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8808 machine with the attached hard disk is taken. The type of the hard disk is
8809 defined by the <link to="#type"/> attribute.
8810
8811 All hard disks can be also divided in two groups: <i>base</i> hard
8812 disks and <i>differencing</i> hard disks. A base hard disk contains all
8813 sectors of the hard disk data in its own storage and therefore can be
8814 used independently. On the contrary, a differencing hard disk is a
8815 "delta" to some other disk and contains only those sectors which differ
8816 from that other disk, which is then called a <i>parent</i>. The differencing
8817 hard disk is said to be <i>linked to</i> that parent.
8818 The parent may be itself a differencing image, thus forming a chain of
8819 linked hard disks. The last element in that chain (sometimes referred to as
8820 the root hard disk) must always be a base. Note that several differencing
8821 hard disks may be linked to the same parent hard disk.
8822
8823 Differencing hard disks can be distinguished from base hard disks by
8824 querying the <link to="#parent"/> attribute: base hard disks do not have
8825 parents they would depend on, so the value of this attribute is always
8826 @c null for them. Using this attribute, it is possible to walk up
8827 the hard disk tree (from the child hard disk to its parent). It is also
8828 possible to walk down the tree using the <link to="#children"/>
8829 attribute.
8830
8831 Note that the type of all differencing hard disks is
8832 <link to="HardDiskType_Normal" />; all other values are
8833 meaningless for them. Base hard disks may be of any type.
8834
8835 <h3>Creating Hard Disks</h3>
8836
8837 New base hard disks are created using
8838 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8839 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8840 disks are usually implicitly created by VirtualBox when needed but may
8841 also be created explicitly using <link to="#createDiffStorage"/>.
8842
8843 After the hard disk is successfully created (including the storage unit)
8844 or opened, it becomes a known hard disk (remembered in the internal media
8845 registry). Known hard disks can be attached to a virtual machine, accessed
8846 through <link to="IVirtualBox::getHardDisk"/> and
8847 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8848 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8849
8850 The following methods, besides <link to="IMedium::close"/>,
8851 automatically remove the hard disk from the media registry:
8852 <ul>
8853 <li><link to="#deleteStorage"/></li>
8854 <li><link to="#mergeTo"/></li>
8855 </ul>
8856
8857 If the storage unit of the hard disk is a regular file in the host's
8858 file system then the rules stated in the description of the
8859 <link to="IMedium::location"/> attribute apply when setting its value. In
8860 addition, a plain file name without any path may be given, in which case
8861 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8862 folder</link> will be prepended to it.
8863
8864 <h4>Automatic composition of the file name part</h4>
8865
8866 Another extension to the <link to="IMedium::location"/> attribute is that
8867 there is a possibility to cause VirtualBox to compose a unique value for
8868 the file name part of the location using the UUID of the hard disk. This
8869 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8870 e.g. before the storage unit is created, and works as follows. You set the
8871 value of the <link to="IMedium::location"/> attribute to a location
8872 specification which only contains the path specification but not the file
8873 name part and ends with either a forward slash or a backslash character.
8874 In response, VirtualBox will generate a new UUID for the hard disk and
8875 compose the file name using the following pattern:
8876 <pre>
8877 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8878 </pre>
8879 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8880 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8881 is the default extension for the storage format of this hard disk. After
8882 that, you may call any of the methods that create a new hard disk storage
8883 unit and they will use the generated UUID and file name.
8884
8885 <h3>Attaching Hard Disks</h3>
8886
8887 Hard disks are attached to virtual machines using the
8888 <link to="IMachine::attachHardDisk"/> method and detached using the
8889 <link to="IMachine::detachHardDisk"/> method. Depending on their
8890 <link to="#type"/>, hard disks are attached either
8891 <i>directly</i> or <i>indirectly</i>.
8892
8893 When a hard disk is being attached directly, it is associated with the
8894 virtual machine and used for hard disk operations when the machine is
8895 running. When a hard disk is being attached indirectly, a new differencing
8896 hard disk linked to it is implicitly created and this differencing hard
8897 disk is associated with the machine and used for hard disk operations.
8898 This also means that if <link to="IMachine::attachHardDisk"/> performs
8899 a direct attachment then the same hard disk will be returned in response
8900 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8901 an indirect attachment is performed then
8902 <link to="IMachine::getHardDisk"/> will return the implicitly created
8903 differencing hard disk, not the original one passed to <link
8904 to="IMachine::attachHardDisk"/>. The following table shows the
8905 dependency of the attachment type on the hard disk type:
8906
8907 <table>
8908 <tr>
8909 <th>Hard Disk Type</th>
8910 <th>Direct or Indirect?</th>
8911 </tr>
8912 <tr>
8913 <td>Normal (Base)</td>
8914 <td>
8915 Normal base hard disks that do not have children (i.e. differencing
8916 hard disks linked to them) and that are not already attached to
8917 virtual machines in snapshots are attached <b>directly</b>.
8918 Otherwise, they are attached <b>indirectly</b> because having
8919 dependent children or being part of the snapshot makes it impossible
8920 to modify hard disk contents without breaking the integrity of the
8921 dependent party. The <link to="#readOnly"/> attribute allows to
8922 quickly determine the kind of the attachment for the given hard
8923 disk. Note that if a normal base hard disk is to be indirectly
8924 attached to a virtual machine with snapshots then a special
8925 procedure called <i>smart attachment</i> is performed (see below).
8926 </td>
8927 </tr>
8928 <tr>
8929 <td>Normal (Differencing)</td>
8930 <td>
8931 Differencing hard disks are like normal base hard disks: attached
8932 <b>directly</b> if they do not have children and are not attached to
8933 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8934 that the smart attachment procedure is never performed for
8935 differencing hard disks.
8936 </td>
8937 </tr>
8938 <tr>
8939 <td>Immutable</td>
8940 <td>
8941 Immutable hard disks are always attached <b>indirectly</b> because
8942 they are designed to be non-writable. If an immutable hard disk is
8943 attached to a virtual machine with snapshots then a special
8944 procedure called smart attachment is performed (see below).
8945 </td>
8946 </tr>
8947 <tr>
8948 <td>Writethrough</td>
8949 <td>
8950 Writethrough hard disks are always attached <b>directly</b>, also as
8951 designed. This also means that writethrough hard disks cannot have
8952 other hard disks linked to them at all.
8953 </td>
8954 </tr>
8955 </table>
8956
8957 Note that the same hard disk, regardless of its type, may be attached to
8958 more than one virtual machine at a time. In this case, the machine that is
8959 started first gains exclusive access to the hard disk and attempts to
8960 start other machines having this hard disk attached will fail until the
8961 first machine is powered down.
8962
8963 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8964 that the given hard disk remains associated with the given machine after a
8965 successful <link to="IMachine::detachHardDisk"/> call until
8966 <link to="IMachine::saveSettings"/> is called to save all changes to
8967 machine settings to disk. This deferring is necessary to guarantee that
8968 the hard disk configuration may be restored at any time by a call to
8969 <link to="IMachine::discardSettings"/> before the settings
8970 are saved (committed).
8971
8972 Note that if <link to="IMachine::discardSettings"/> is called after
8973 indirectly attaching some hard disks to the machine but before a call to
8974 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8975 all differencing hard disks implicitly created by
8976 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8977 Such implicitly created hard disks will also be immediately deleted when
8978 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8979 call if it is made before <link to="IMachine::saveSettings"/>. This
8980 implicit deletion is safe because newly created differencing hard
8981 disks do not contain any user data.
8982
8983 However, keep in mind that detaching differencing hard disks that were
8984 implicitly created by <link to="IMachine::attachHardDisk"/>
8985 before the last <link to="IMachine::saveSettings"/> call will
8986 <b>not</b> implicitly delete them as they may already contain some data
8987 (for example, as a result of virtual machine execution). If these hard
8988 disks are no more necessary, the caller can always delete them explicitly
8989 using <link to="#deleteStorage"/> after they are actually de-associated
8990 from this machine by the <link to="IMachine::saveSettings"/> call.
8991
8992 <h3>Smart Attachment</h3>
8993
8994 When normal base or immutable hard disks are indirectly attached to a
8995 virtual machine then some additional steps are performed to make sure the
8996 virtual machine will have the most recent "view" of the hard disk being
8997 attached. These steps include walking through the machine's snapshots
8998 starting from the current one and going through ancestors up to the first
8999 snapshot. Hard disks attached to the virtual machine in all
9000 of the encountered snapshots are checked whether they are descendants of
9001 the given normal base or immutable hard disk. The first found child (which
9002 is the differencing hard disk) will be used instead of the normal base or
9003 immutable hard disk as a parent for creating a new differencing hard disk
9004 that will be actually attached to the machine. And only if no descendants
9005 are found or if the virtual machine does not have any snapshots then the
9006 normal base or immutable hard disk will be used itself as a parent for
9007 this differencing hard disk.
9008
9009 It is easier to explain what smart attachment does using the
9010 following example:
9011 <pre>
9012BEFORE attaching B.vdi: AFTER attaching B.vdi:
9013
9014Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9015 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9016 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9017 Snapshot 4 (none) Snapshot 4 (none)
9018 CurState (none) CurState (D3->D2.vdi)
9019
9020 NOT
9021 ...
9022 CurState (D3->B.vdi)
9023 </pre>
9024 The first column is the virtual machine configuration before the base hard
9025 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9026 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9027 mean that the hard disk that is actually attached to the machine is a
9028 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9029 another hard disk, <tt>B.vdi</tt>.
9030
9031 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9032 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9033 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9034 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9035 it cannot be attached directly and needs an indirect attachment (i.e.
9036 implicit creation of a new differencing hard disk). Due to the smart
9037 attachment procedure, the new differencing hard disk
9038 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9039 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9040 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9041 machine.
9042
9043 Note that if there is more than one descendant hard disk of the given base
9044 hard disk found in a snapshot, and there is an exact device, channel and
9045 bus match, then this exact match will be used. Otherwise, the youngest
9046 descendant will be picked up.
9047
9048 There is one more important aspect of the smart attachment procedure which
9049 is not related to snapshots at all. Before walking through the snapshots
9050 as described above, the backup copy of the current list of hard disk
9051 attachment is searched for descendants. This backup copy is created when
9052 the hard disk configuration is changed for the first time after the last
9053 <link to="IMachine::saveSettings"/> call and used by
9054 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9055 changes. When such a descendant is found in this backup copy, it will be
9056 simply re-attached back, without creating a new differencing hard disk for
9057 it. This optimization is necessary to make it possible to re-attach the
9058 base or immutable hard disk to a different bus, channel or device slot
9059 without losing the contents of the differencing hard disk actually
9060 attached to the machine in place of it.
9061 </desc>
9062
9063 <attribute name="format" type="wstring" readonly="yes">
9064 <desc>
9065 Storage format of this hard disk.
9066
9067 The value of this attribute is a string that specifies a backend used to
9068 store hard disk data. The storage format is defined when you create a
9069 new hard disk or automatically detected when you open an existing hard
9070 disk medium, and cannot be changed later.
9071
9072 The list of all storage formats supported by this VirtualBox
9073 installation can be obtained using
9074 <link to="ISystemProperties::hardDiskFormats"/>.
9075 </desc>
9076 </attribute>
9077
9078 <attribute name="type" type="HardDiskType">
9079 <desc>
9080 Type (role) of this hard disk.
9081
9082 The following constraints apply when changing the value of this
9083 attribute:
9084 <ul>
9085 <li>If a hard disk is attached to a virtual machine (either in the
9086 current state or in one of the snapshots), its type cannot be
9087 changed.
9088 </li>
9089 <li>As long as the hard disk has children, its type cannot be set
9090 to <link to="HardDiskType_Writethrough"/>.
9091 </li>
9092 <li>The type of all differencing hard disks is
9093 <link to="HardDiskType_Normal"/> and cannot be changed.
9094 </li>
9095 </ul>
9096
9097 The type of a newly created or opened hard disk is set to
9098 <link to="HardDiskType_Normal"/>.
9099 </desc>
9100 </attribute>
9101
9102 <attribute name="parent" type="IHardDisk" readonly="yes">
9103 <desc>
9104 Parent of this hard disk (a hard disk this hard disk is directly based
9105 on).
9106
9107 Only differencing hard disks have parents. For base (non-differencing)
9108 hard disks, @c null is returned.
9109 </desc>
9110 </attribute>
9111
9112 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9113 <desc>
9114 Children of this hard disk (all differencing hard disks directly based
9115 on this hard disk). A @c null array is returned if this hard disk
9116 does not have any children.
9117 </desc>
9118 </attribute>
9119
9120 <attribute name="root" type="IHardDisk" readonly="yes">
9121 <desc>
9122 Root hard disk of this hard disk.
9123
9124 If this is a differencing hard disk, its root hard disk is the base hard
9125 disk the given hard disk branch starts from. For all other types of hard
9126 disks, this property returns the hard disk object itself (i.e. the same
9127 object this property is read on).
9128 </desc>
9129 </attribute>
9130
9131 <attribute name="readOnly" type="boolean" readonly="yes">
9132 <desc>
9133 Returns @c true if this hard disk is read-only and @c false otherwise.
9134
9135 A hard disk is considered to be read-only when its contents cannot be
9136 modified without breaking the integrity of other parties that depend on
9137 this hard disk such as its child hard disks or snapshots of virtual
9138 machines where this hard disk is attached to these machines. If there
9139 are no children and no such snapshots then there is no dependency and
9140 the hard disk is not read-only.
9141
9142 The value of this attribute can be used to determine the kind of the
9143 attachment that will take place when attaching this hard disk to a
9144 virtual machine. If the value is @c false then the hard disk will
9145 be attached directly. If the value is @c true then the hard disk
9146 will be attached indirectly by creating a new differencing child hard
9147 disk for that. See the interface description for more information.
9148
9149 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9150 disks are always read-only while all
9151 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9152 always not.
9153
9154 <note>
9155 The read-only condition represented by this attribute is related to
9156 the hard disk type and usage, not to the current
9157 <link to="IMedium::state">media state</link> and not to the read-only
9158 state of the storage unit.
9159 </note>
9160 </desc>
9161 </attribute>
9162
9163 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9164 <desc>
9165 Logical size of this hard disk (in megabytes), as reported to the
9166 guest OS running inside the virtual machine this disk is
9167 attached to. The logical size is defined when the hard disk is created
9168 and cannot be changed later.
9169
9170 <note>
9171 Reading this property on a differencing hard disk will return the size
9172 of its <link to="#root"/> hard disk.
9173 </note>
9174 <note>
9175 For hard disks whose state is <link to="#state"/> is <link
9176 to="MediaState_Inaccessible"/>, the value of this property is the
9177 last known logical size. For <link to="MediaState_NotCreated"/> hard
9178 disks, the returned value is zero.
9179 </note>
9180 </desc>
9181 </attribute>
9182
9183 <attribute name="autoReset" type="boolean">
9184 <desc>
9185 Whether this differencing hard disk will be automatically reset each
9186 time a virtual machine it is attached to is powered up.
9187
9188 See <link to="#reset()"/> for more information about resetting
9189 differencing hard disks.
9190
9191 <note>
9192 Reading this property on a base (non-differencing) hard disk will
9193 always @c false. Changing the value of this property in this
9194 case is not supported.
9195 </note>
9196
9197 <result name="VBOX_E_NOT_SUPPORTED">
9198 This is not a differencing hard disk (when changing the attribute
9199 value).
9200 </result>
9201 </desc>
9202 </attribute>
9203
9204 <!-- storage methods -->
9205
9206 <method name="getProperty">
9207 <desc>
9208 Returns the value of the custom hard disk property with the given name.
9209
9210 The list of all properties supported by the given hard disk format can
9211 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9212
9213 Note that if this method returns an empty string in @a value, the
9214 requested property is supported but currently not assigned any value.
9215
9216 <result name="VBOX_E_OBJECT_NOT_FOUND">
9217 Requested property does not exist (not supported by the format).
9218 </result>
9219 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9220 </desc>
9221 <param name="name" type="wstring" dir="in">
9222 <desc>Name of the property to get.</desc>
9223 </param>
9224 <param name="value" type="wstring" dir="return">
9225 <desc>Current property value.</desc>
9226 </param>
9227 </method>
9228
9229 <method name="setProperty">
9230 <desc>
9231 Sets the value of the custom hard disk property with the given name.
9232
9233 The list of all properties supported by the given hard disk format can
9234 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9235
9236 Note that setting the property value to @c null or an empty string is
9237 equivalent to deleting the existing value. A default value (if it is
9238 defined for this property) will be used by the format backend in this
9239 case.
9240
9241 <result name="VBOX_E_OBJECT_NOT_FOUND">
9242 Requested property does not exist (not supported by the format).
9243 </result>
9244 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9245 </desc>
9246 <param name="name" type="wstring" dir="in">
9247 <desc>Name of the property to set.</desc>
9248 </param>
9249 <param name="value" type="wstring" dir="in">
9250 <desc>Property value to set.</desc>
9251 </param>
9252 </method>
9253
9254 <method name="getProperties">
9255 <desc>
9256 Returns values for a group of properties in one call.
9257
9258 The names of the properties to get are specified using the @a names
9259 argument which is a list of comma-separated property names or
9260 an empty string if all properties are to be returned. Note that currently
9261 the value of this argument is ignored and the method always returns all
9262 existing properties.
9263
9264 The list of all properties supported by the given hard disk format can
9265 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9266
9267 The method returns two arrays, the array of property names corresponding
9268 to the @a names argument and the current values of these properties.
9269 Both arrays have the same number of elements with each elemend at the
9270 given index in the first array corresponds to an element at the same
9271 index in the second array.
9272
9273 Note that for properties that do not have assigned values,
9274 an empty string is returned at the appropriate index in the
9275 @a returnValues array.
9276
9277 </desc>
9278 <param name="names" type="wstring" dir="in">
9279 <desc>
9280 Names of properties to get.
9281 </desc>
9282 </param>
9283 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9284 <desc>Names of returned properties.</desc>
9285 </param>
9286 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9287 <desc>Values of returned properties.</desc>
9288 </param>
9289 </method>
9290
9291 <method name="setProperties">
9292 <desc>
9293 Sets values for a group of properties in one call.
9294
9295 The names of the properties to set are passed in the @a names
9296 array along with the new values for them in the @a values array. Both
9297 arrays have the same number of elements with each elemend at the given
9298 index in the first array corresponding to an element at the same index
9299 in the second array.
9300
9301 If there is at least one property name in @a names that is not valid,
9302 the method will fail before changing the values of any other properties
9303 from the @a names array.
9304
9305 Using this method over <link to="#setProperty"/> is preferred if you
9306 need to set several properties at once since it will result into less
9307 IPC calls.
9308
9309 The list of all properties supported by the given hard disk format can
9310 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9311
9312 Note that setting the property value to @c null or an empty string is
9313 equivalent to deleting the existing value. A default value (if it is
9314 defined for this property) will be used by the format backend in this
9315 case.
9316 </desc>
9317 <param name="names" type="wstring" safearray="yes" dir="in">
9318 <desc>Names of properties to set.</desc>
9319 </param>
9320 <param name="values" type="wstring" safearray="yes" dir="in">
9321 <desc>Values of properties to set.</desc>
9322 </param>
9323 </method>
9324
9325 <!-- storage methods -->
9326
9327 <method name="createBaseStorage">
9328 <desc>
9329 Starts creating a hard disk storage unit (fixed/dynamic, according
9330 to the variant flags) in in the background. The previous storage unit
9331 created for this object, if any, must first be deleted using
9332 <link to="#deleteStorage"/>, otherwise the operation will fail.
9333
9334 Before the operation starts, the hard disk is placed in
9335 <link to="MediaState_Creating"/> state. If the create operation
9336 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9337 state.
9338
9339 After the returned progress object reports that the operation has
9340 successfully completed, the media state will be set to <link
9341 to="MediaState_Created"/>, the hard disk will be remembered by this
9342 VirtualBox installation and may be attached to virtual machines.
9343
9344 <result name="VBOX_E_NOT_SUPPORTED">
9345 The variant of storage creation operation is not supported. See <link
9346 to="IHardDiskFormat::capabilities"/>.
9347 </result>
9348 </desc>
9349 <param name="logicalSize" type="unsigned long long" dir="in">
9350 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9351 </param>
9352 <param name="variant" type="HardDiskVariant" dir="in">
9353 <desc>Exact image variant which should be created.</desc>
9354 </param>
9355 <param name="progress" type="IProgress" dir="return">
9356 <desc>Progress object to track the operation completion.</desc>
9357 </param>
9358 </method>
9359
9360 <method name="deleteStorage">
9361 <desc>
9362 Starts deleting the storage unit of this hard disk.
9363
9364 The hard disk must not be attached to any known virtual machine and must
9365 not have any known child hard disks, otherwise the operation will fail.
9366 It will also fail if there is no storage unit to delete or if deletion
9367 is already in progress, or if the hard disk is being in use (locked for
9368 read or for write) or inaccessible. Therefore, the only valid state for
9369 this operation to succeed is <link to="MediaState_Created"/>.
9370
9371 Before the operation starts, the hard disk is placed to
9372 <link to="MediaState_Deleting"/> state and gets removed from the list
9373 of remembered hard disks (media registry). If the delete operation
9374 fails, the media will be remembered again and placed back to
9375 <link to="MediaState_Created"/> state.
9376
9377 After the returned progress object reports that the operation is
9378 complete, the media state will be set to
9379 <link to="MediaState_NotCreated"/> and you will be able to use one of
9380 the storage creation methods to create it again.
9381
9382 <see>#close()</see>
9383
9384 <result name="VBOX_E_OBJECT_IN_USE">
9385 Hard disk is attached to a virtual machine.
9386 </result>
9387 <result name="VBOX_E_NOT_SUPPORTED">
9388 Storage deletion is not allowed because neither of storage creation
9389 operations are supported. See
9390 <link to="IHardDiskFormat::capabilities"/>.
9391 </result>
9392
9393 <note>
9394 If the deletion operation fails, it is not guaranteed that the storage
9395 unit still exists. You may check the <link to="IMedium::state"/> value
9396 to answer this question.
9397 </note>
9398 </desc>
9399 <param name="progress" type="IProgress" dir="return">
9400 <desc>Progress object to track the operation completion.</desc>
9401 </param>
9402 </method>
9403
9404 <!-- diff methods -->
9405
9406 <method name="createDiffStorage">
9407 <desc>
9408 Starts creating an empty differencing storage unit based on this hard
9409 disk in the format and at the location defined by the @a target
9410 argument.
9411
9412 The target hard disk must be in <link to="MediaState_NotCreated"/>
9413 state (i.e. must not have an existing storage unit). Upon successful
9414 completion, this operation will set the type of the target hard disk to
9415 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9416 represent the differencing hard disk data in the given format (according
9417 to the storage format of the target object).
9418
9419 After the returned progress object reports that the operation is
9420 successfully complete, the target hard disk gets remembered by this
9421 VirtualBox installation and may be attached to virtual machines.
9422
9423 <note>
9424 The hard disk will be set to <link to="MediaState_LockedRead"/>
9425 state for the duration of this operation.
9426 </note>
9427 <result name="VBOX_E_OBJECT_IN_USE">
9428 Hard disk not in @c NotCreated state.
9429 </result>
9430 </desc>
9431 <param name="target" type="IHardDisk" dir="in">
9432 <desc>Target hard disk.</desc>
9433 </param>
9434 <param name="variant" type="HardDiskVariant" dir="in">
9435 <desc>Exact image variant which should be created.</desc>
9436 </param>
9437 <param name="progress" type="IProgress" dir="return">
9438 <desc>Progress object to track the operation completion.</desc>
9439 </param>
9440 </method>
9441
9442 <method name="mergeTo">
9443 <desc>
9444 Starts merging the contents of this hard disk and all intermediate
9445 differencing hard disks in the chain to the given target hard disk.
9446
9447 The target hard disk must be either a descendant of this hard disk or
9448 its ancestor (otherwise this method will immediately return a failure).
9449 It follows that there are two logical directions of the merge operation:
9450 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9451 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9452 chain:
9453
9454 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9455
9456 Here, calling this method on the <tt>Base</tt> hard disk object with
9457 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9458 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9459 merge. Note that in both cases the contents of the resulting hard disk
9460 will be the same, the only difference is the hard disk object that takes
9461 the result of the merge operation. In case of the forward merge in the
9462 above example, the result will be written to <tt>Diff_2</tt>; in case of
9463 the backward merge, the result will be written to <tt>Base</tt>. In
9464 other words, the result of the operation is always stored in the target
9465 hard disk.
9466
9467 Upon successful operation completion, the storage units of all hard
9468 disks in the chain between this (source) hard disk and the target hard
9469 disk, including the source hard disk itself, will be automatically
9470 deleted and the relevant hard disk objects (including this hard disk)
9471 will become uninitialized. This means that any attempt to call any of
9472 their methods or attributes will fail with the
9473 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9474 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9475 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9476 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9477 disk itself since it will no longer be based on any other hard disk.
9478
9479 Considering the above, all of the following conditions must be met in
9480 order for the merge operation to succeed:
9481 <ul>
9482 <li>
9483 Neither this (source) hard disk nor any intermediate
9484 differencing hard disk in the chain between it and the target
9485 hard disk is attached to any virtual machine.
9486 </li>
9487 <li>
9488 Neither the source hard disk nor the target hard disk is an
9489 <link to="HardDiskType_Immutable"/> hard disk.
9490 </li>
9491 <li>
9492 The part of the hard disk tree from the source hard disk to the
9493 target hard disk is a linear chain, i.e. all hard disks in this
9494 chain have exactly one child which is the next hard disk in this
9495 chain. The only exception from this rule is the target hard disk in
9496 the forward merge operation; it is allowed to have any number of
9497 child hard disks because the merge operation will hot change its
9498 logical contents (as it is seen by the guest OS or by children).
9499 </li>
9500 <li>
9501 None of the involved hard disks are in
9502 <link to="MediaState_LockedRead"/> or
9503 <link to="MediaState_LockedWrite"/> state.
9504 </li>
9505 </ul>
9506
9507 <note>
9508 This (source) hard disk and all intermediates will be placed to <link
9509 to="MediaState_Deleting"/> state and the target hard disk will be
9510 placed to <link to="MediaState_LockedWrite"/> state and for the
9511 duration of this operation.
9512 </note>
9513 </desc>
9514 <param name="targetId" type="wstring" dir="in">
9515 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9516 </param>
9517 <param name="progress" type="IProgress" dir="return">
9518 <desc>Progress object to track the operation completion.</desc>
9519 </param>
9520 </method>
9521
9522 <!-- clone method -->
9523
9524 <method name="cloneTo">
9525 <desc>
9526 Starts creating a clone of this hard disk in the format and at the
9527 location defined by the @a target argument.
9528
9529 The target hard disk must be either in <link to="MediaState_NotCreated"/>
9530 state (i.e. must not have an existing storage unit) or in
9531 <link to="MediaState_Created"/> state (i.e. created and not locked, and
9532 big enough to hold the data or else the copy will be partial). Upon
9533 successful completion, the cloned hard disk will contain exactly the
9534 same sector data as the hard disk being cloned, except that in the
9535 first case a new UUID for the clone will be randomly generated, and in
9536 the second case the UUID will remain unchanged.
9537
9538 The @a parent argument defines which hard disk will be the parent
9539 of the clone. Passing a @c null reference indicates that the clone will
9540 be a base image, i.e. completely independent. It is possible to specify
9541 an arbitrary hard disk for this parameter, including the parent of the
9542 hard disk which is being cloned. Even cloning to a child of the source
9543 hard disk is possible. Note that when cloning to an existing image, the
9544 @a parent irgument is ignored.
9545
9546 After the returned progress object reports that the operation is
9547 successfully complete, the target hard disk gets remembered by this
9548 VirtualBox installation and may be attached to virtual machines.
9549
9550 <note>
9551 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9552 state for the duration of this operation.
9553 </note>
9554 <result name="E_NOTIMPL">
9555 The specified cloning variant is not supported at the moment.
9556 </result>
9557 </desc>
9558 <param name="target" type="IHardDisk" dir="in">
9559 <desc>Target hard disk.</desc>
9560 </param>
9561 <param name="variant" type="HardDiskVariant" dir="in">
9562 <desc>Exact image variant which should be created.</desc>
9563 </param>
9564 <param name="parent" type="IHardDisk" dir="in">
9565 <desc>Parent of the cloned hard disk.</desc>
9566 </param>
9567 <param name="progress" type="IProgress" dir="return">
9568 <desc>Progress object to track the operation completion.</desc>
9569 </param>
9570 </method>
9571
9572 <!-- other methods -->
9573
9574 <method name="compact">
9575 <desc>
9576 Starts compacting of this hard disk. This means that the disk is
9577 transformed into a possibly more compact storage representation.
9578 This potentially creates temporary images, which can require a
9579 substantial amount of additional disk space.
9580
9581 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9582 state and all its parent hard disks (if any) will be placed to
9583 <link to="MediaState_LockedRead"/> state for the duration of this
9584 operation.
9585
9586 Please note that the results can be either returned straight away,
9587 or later as the result of the background operation via the object
9588 returned via the @a progress parameter.
9589
9590 <result name="VBOX_E_NOT_SUPPORTED">
9591 Hard disk format does not support compacting (but potentially
9592 needs it).
9593 </result>
9594 </desc>
9595 <param name="progress" type="IProgress" dir="return">
9596 <desc>Progress object to track the operation completion.</desc>
9597 </param>
9598 </method>
9599
9600 <method name="reset">
9601 <desc>
9602 Starts erasing the contents of this differencing hard disk.
9603
9604 This operation will reset the differencing hard disk to its initial
9605 state when it does not contain any sector data and any read operation is
9606 redirected to its parent hard disk.
9607
9608 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9609 for the duration of this operation.
9610
9611 <result name="VBOX_E_NOT_SUPPORTED">
9612 This is not a differencing hard disk.
9613 </result>
9614 <result name="VBOX_E_INVALID_OBJECT_STATE">
9615 Hard disk is not in <link to="MediaState_Created"/> or
9616 <link to="MediaState_Inaccessible"/> state.
9617 </result>
9618 </desc>
9619 <param name="progress" type="IProgress" dir="return">
9620 <desc>Progress object to track the operation completion.</desc>
9621 </param>
9622 </method>
9623
9624 </interface>
9625
9626
9627 <!--
9628 // IHardDiskFormat
9629 /////////////////////////////////////////////////////////////////////////
9630 -->
9631
9632 <enum
9633 name="DataType"
9634 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9635 >
9636 <const name="Int32" value="0"/>
9637 <const name="Int8" value="1"/>
9638 <const name="String" value="2"/>
9639 </enum>
9640
9641 <enum
9642 name="DataFlags"
9643 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9644 >
9645 <const name="None" value="0x00"/>
9646 <const name="Mandatory" value="0x01"/>
9647 <const name="Expert" value="0x02"/>
9648 <const name="Array" value="0x04"/>
9649 <const name="FlagMask" value="0x07"/>
9650 </enum>
9651
9652 <enum
9653 name="HardDiskFormatCapabilities"
9654 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9655 >
9656 <desc>
9657 Hard disk format capability flags.
9658 </desc>
9659
9660 <const name="Uuid" value="0x01">
9661 <desc>
9662 Supports UUIDs as expected by VirtualBox code.
9663 </desc>
9664 </const>
9665
9666 <const name="CreateFixed" value="0x02">
9667 <desc>
9668 Supports creating fixed size images, allocating all space instantly.
9669 </desc>
9670 </const>
9671
9672 <const name="CreateDynamic" value="0x04">
9673 <desc>
9674 Supports creating dynamically growing images, allocating space on
9675 demand.
9676 </desc>
9677 </const>
9678
9679 <const name="CreateSplit2G" value="0x08">
9680 <desc>
9681 Supports creating images split in chunks of a bit less than 2 GBytes.
9682 </desc>
9683 </const>
9684
9685 <const name="Differencing" value="0x10">
9686 <desc>
9687 Supports being used as a format for differencing hard disks (see <link
9688 to="IHardDisk::createDiffStorage"/>).
9689 </desc>
9690 </const>
9691
9692 <const name="Asynchronous" value="0x20">
9693 <desc>
9694 Supports asynchronous I/O operations for at least some configurations.
9695 </desc>
9696 </const>
9697
9698 <const name="File" value="0x40">
9699 <desc>
9700 The format backend operates on files (the <link to="IMedium::location"/>
9701 attribute of the hard disk specifies a file used to store hard disk
9702 data; for a list of supported file extensions see
9703 <link to="IHardDiskFormat::fileExtensions"/>).
9704 </desc>
9705 </const>
9706
9707 <const name="Properties" value="0x80">
9708 <desc>
9709 The format backend uses the property interface to configure the storage
9710 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9711 method is used to get access to properties supported by the given hard
9712 disk format).
9713 </desc>
9714 </const>
9715
9716 <const name="CapabilityMask" value="0xFF"/>
9717 </enum>
9718
9719 <interface
9720 name="IHardDiskFormat" extends="$unknown"
9721 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9722 wsmap="managed"
9723 >
9724 <desc>
9725 The IHardDiskFormat interface represents a virtual hard disk format.
9726
9727 Each hard disk format has an associated backend which is used to handle
9728 hard disks stored in this format. This interface provides information
9729 about the properties of the associated backend.
9730
9731 Each hard disk format is identified by a string represented by the
9732 <link to="#id"/> attribute. This string is used in calls like
9733 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9734 format.
9735
9736 The list of all supported hard disk formats can be obtained using
9737 <link to="ISystemProperties::hardDiskFormats"/>.
9738
9739 <see>IHardDisk</see>
9740 </desc>
9741
9742 <attribute name="id" type="wstring" readonly="yes">
9743 <desc>
9744 Identifier of this format.
9745
9746 The format identifier is a non-@c null non-empty ASCII string. Note that
9747 this string is case-insensitive. This means that, for example, all of
9748 the following strings:
9749 <pre>
9750 "VDI"
9751 "vdi"
9752 "VdI"</pre>
9753 refer to the same hard disk format.
9754
9755 This string is used in methods of other interfaces where it is necessary
9756 to specify a hard disk format, such as
9757 <link to="IVirtualBox::createHardDisk"/>.
9758 </desc>
9759 </attribute>
9760
9761 <attribute name="name" type="wstring" readonly="yes">
9762 <desc>
9763 Human readable description of this format.
9764
9765 Mainly for use in file open dialogs.
9766 </desc>
9767 </attribute>
9768
9769 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9770 <desc>
9771 Array of strings containing the supported file extensions.
9772
9773 The first extension in the array is the extension preferred by the
9774 backend. It is recommended to use this extension when specifying a
9775 location of the storage unit for a new hard disk.
9776
9777 Note that some backends do not work on files, so this array may be
9778 empty.
9779
9780 <see>IHardDiskFormat::capabilities</see>
9781 </desc>
9782 </attribute>
9783
9784 <attribute name="capabilities" type="unsigned long" readonly="yes">
9785 <desc>
9786 Capabilities of the format as a set of bit flags.
9787
9788 For the meaning of individual capability flags see
9789 <link to="HardDiskFormatCapabilities"/>.
9790 </desc>
9791 </attribute>
9792
9793 <method name="describeProperties">
9794 <desc>
9795 Returns several arrays describing the properties supported by this
9796 format.
9797
9798 An element with the given index in each array describes one
9799 property. Thus, the number of elements in each returned array is the
9800 same and corresponds to the number of supported properties.
9801
9802 The returned arrays are filled in only if the
9803 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9804 All arguments must be non-@c null.
9805
9806 <see>DataType</see>
9807 <see>DataFlags</see>
9808 </desc>
9809
9810 <param name="names" type="wstring" safearray="yes" dir="out">
9811 <desc>Array of property names.</desc>
9812 </param>
9813 <param name="description" type="wstring" safearray="yes" dir="out">
9814 <desc>Array of property descriptions.</desc>
9815 </param>
9816 <param name="types" type="DataType" safearray="yes" dir="out">
9817 <desc>Array of property types.</desc>
9818 </param>
9819 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9820 <desc>Array of property flags.</desc>
9821 </param>
9822 <param name="defaults" type="wstring" safearray="yes" dir="out">
9823 <desc>Array of default property values.</desc>
9824 </param>
9825 </method>
9826
9827 </interface>
9828
9829
9830 <!--
9831 // IFloppyImage
9832 /////////////////////////////////////////////////////////////////////////
9833 -->
9834
9835 <interface
9836 name="IFloppyImage" extends="IMedium"
9837 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9838 wsmap="managed"
9839 >
9840 <desc>
9841 The IFloppyImage interface represents a medium containing the image
9842 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9843 </desc>
9844
9845 </interface>
9846
9847
9848 <!--
9849 // IDVDImage
9850 /////////////////////////////////////////////////////////////////////////
9851 -->
9852
9853 <interface
9854 name="IDVDImage" extends="IMedium"
9855 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9856 wsmap="managed"
9857 >
9858 <desc>
9859 The IDVDImage interface represents a medium containing the image
9860 of a CD or DVD disk in the ISO format.
9861
9862 This is a subclass of <link to="IMedium" />; see remarks there.
9863 </desc>
9864
9865 </interface>
9866
9867
9868 <!--
9869 // IDVDDrive
9870 /////////////////////////////////////////////////////////////////////////
9871 -->
9872
9873 <interface
9874 name="IDVDDrive" extends="$unknown"
9875 uuid="156944d1-4c6d-4812-8f12-ab3890767ab4"
9876 wsmap="managed"
9877 >
9878 <desc>
9879 The IDVDDrive interface represents the virtual CD/DVD drive of the
9880 virtual machine. An object of this type is returned by
9881 <link to="IMachine::DVDDrive"/>.
9882 </desc>
9883
9884 <attribute name="state" type="DriveState" readonly="yes">
9885 <desc>Current drive state.</desc>
9886 </attribute>
9887
9888 <attribute name="passthrough" type="boolean">
9889 <desc>
9890 When a host drive is mounted and passthrough is enabled
9891 the guest OS will be able to directly send SCSI commands to
9892 the host drive. This enables the guest OS to use CD/DVD writers
9893 but is potentially dangerous.
9894 </desc>
9895 </attribute>
9896
9897 <method name="mountImage">
9898 <desc>Mounts a CD/DVD image with the specified UUID.
9899
9900 <result name="VBOX_E_FILE_ERROR">
9901 Invalid image file location.
9902 </result>
9903 <result name="VBOX_E_OBJECT_NOT_FOUND">
9904 Could not find a CD/DVD image matching @a imageId.
9905 </result>
9906 <result name="VBOX_E_INVALID_OBJECT_STATE">
9907 Invalid media state.
9908 </result>
9909
9910 </desc>
9911 <param name="imageId" type="wstring" dir="in"/>
9912 </method>
9913
9914 <method name="captureHostDrive">
9915 <desc>Captures the specified host CD/DVD drive.</desc>
9916 <param name="drive" type="IHostDVDDrive" dir="in"/>
9917 </method>
9918
9919 <method name="unmount">
9920 <desc>Unmounts the currently mounted image or host drive.</desc>
9921 </method>
9922
9923 <method name="getImage">
9924 <desc>Returns the currently mounted CD/DVD image.</desc>
9925 <param name="image" type="IDVDImage" dir="return"/>
9926 </method>
9927
9928 <method name="getHostDrive">
9929 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9930 <param name="drive" type="IHostDVDDrive" dir="return"/>
9931 </method>
9932
9933 </interface>
9934
9935
9936 <!--
9937 // IFloppyDrive
9938 /////////////////////////////////////////////////////////////////////////
9939 -->
9940
9941 <interface
9942 name="IFloppyDrive" extends="$unknown"
9943 uuid="a8676d38-5cf0-4b53-85b1-aa693611ab86"
9944 wsmap="managed"
9945 >
9946 <desc>
9947 The IFloppyDrive interface represents the virtual floppy drive of the
9948 virtual machine. An object of this type is returned by
9949 <link to="IMachine::floppyDrive" />.
9950 </desc>
9951
9952 <attribute name="enabled" type="boolean">
9953 <desc>
9954 Flag whether the floppy drive is enabled. If it is disabled,
9955 the floppy drive will not be reported to the guest OS.
9956 </desc>
9957 </attribute>
9958
9959 <attribute name="state" type="DriveState" readonly="yes">
9960 <desc>Current drive state.</desc>
9961 </attribute>
9962
9963 <method name="mountImage">
9964 <desc>Mounts a floppy image with the specified UUID.
9965
9966 <result name="VBOX_E_FILE_ERROR">
9967 Invalid image file location.
9968 </result>
9969 <result name="VBOX_E_OBJECT_NOT_FOUND">
9970 Could not find a floppy image matching @a imageID.
9971 </result>
9972 <result name="VBOX_E_INVALID_OBJECT_STATE">
9973 Invalid media state.
9974 </result>
9975
9976 </desc>
9977 <param name="imageId" type="wstring" dir="in"/>
9978 </method>
9979
9980 <method name="captureHostDrive">
9981 <desc>Captures the specified host floppy drive.</desc>
9982 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9983 </method>
9984
9985 <method name="unmount">
9986 <desc>Unmounts the currently mounted image or host drive.</desc>
9987 </method>
9988
9989 <method name="getImage">
9990 <desc>Returns the currently mounted floppy image.</desc>
9991 <param name="image" type="IFloppyImage" dir="return"/>
9992 </method>
9993
9994 <method name="getHostDrive">
9995 <desc>Returns the currently mounted host floppy drive.</desc>
9996 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9997 </method>
9998
9999 </interface>
10000
10001
10002 <!--
10003 // IKeyboard
10004 /////////////////////////////////////////////////////////////////////////
10005 -->
10006
10007 <interface
10008 name="IKeyboard" extends="$unknown"
10009 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10010 wsmap="managed"
10011 >
10012 <desc>
10013 The IKeyboard interface represents the virtual machine's keyboard. Used
10014 in <link to="IConsole::keyboard"/>.
10015
10016 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10017 to the virtual machine.
10018
10019 </desc>
10020 <method name="putScancode">
10021 <desc>Sends a scancode to the keyboard.
10022
10023 <result name="VBOX_E_IPRT_ERROR">
10024 Could not send scan code to virtual keyboard.
10025 </result>
10026
10027 </desc>
10028 <param name="scancode" type="long" dir="in"/>
10029 </method>
10030
10031 <method name="putScancodes">
10032 <desc>Sends an array of scancodes to the keyboard.
10033
10034 <result name="VBOX_E_IPRT_ERROR">
10035 Could not send all scan codes to virtual keyboard.
10036 </result>
10037
10038 </desc>
10039 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10040 <param name="codesStored" type="unsigned long" dir="return"/>
10041 </method>
10042
10043 <method name="putCAD">
10044 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10045 function is nothing special, it is just a convenience function
10046 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10047
10048 <result name="VBOX_E_IPRT_ERROR">
10049 Could not send all scan codes to virtual keyboard.
10050 </result>
10051
10052 </desc>
10053 </method>
10054
10055 </interface>
10056
10057
10058 <!--
10059 // IMouse
10060 /////////////////////////////////////////////////////////////////////////
10061 -->
10062
10063 <enum
10064 name="MouseButtonState"
10065 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
10066 >
10067 <desc>
10068 Mouse button state.
10069 </desc>
10070
10071 <const name="LeftButton" value="0x01"/>
10072 <const name="RightButton" value="0x02"/>
10073 <const name="MiddleButton" value="0x04"/>
10074 <const name="WheelUp" value="0x08"/>
10075 <const name="WheelDown" value="0x10"/>
10076 <const name="MouseStateMask" value="0x1F"/>
10077 </enum>
10078
10079 <interface
10080 name="IMouse" extends="$unknown"
10081 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
10082 wsmap="managed"
10083 >
10084 <desc>
10085 The IMouse interface represents the virtual machine's mouse. Used in
10086 <link to="IConsole::mouse"/>.
10087
10088 Through this interface, the virtual machine's virtual mouse can be
10089 controlled.
10090 </desc>
10091
10092 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10093 <desc>
10094 Whether the guest OS supports absolute mouse pointer positioning
10095 or not.
10096 <note>
10097 VirtualBox Guest Tools need to be installed to the guest OS
10098 in order to enable absolute mouse positioning support.
10099 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10100 callback to be instantly informed about changes of this attribute
10101 during virtual machine execution.
10102 </note>
10103 <see><link to="#putMouseEventAbsolute"/></see>
10104 </desc>
10105 </attribute>
10106
10107 <method name="putMouseEvent">
10108 <desc>
10109 Initiates a mouse event using relative pointer movements
10110 along x and y axis.
10111
10112 <result name="E_ACCESSDENIED">
10113 Console not powered up.
10114 </result>
10115 <result name="VBOX_E_IPRT_ERROR">
10116 Could not send mouse event to virtual mouse.
10117 </result>
10118
10119 </desc>
10120
10121 <param name="dx" type="long" dir="in">
10122 <desc>
10123 Amount of pixels the mouse should move to the right.
10124 Negative values move the mouse to the left.
10125 </desc>
10126 </param>
10127 <param name="dy" type="long" dir="in">
10128 <desc>
10129 Amount of pixels the mouse should move downwards.
10130 Negative values move the mouse upwards.
10131 </desc>
10132 </param>
10133 <param name="dz" type="long" dir="in">
10134 <desc>
10135 Amount of mouse wheel moves.
10136 Positive values describe clockwise wheel rotations,
10137 negative values describe counterclockwise rotations.
10138 </desc>
10139 </param>
10140 <param name="buttonState" type="long" dir="in">
10141 <desc>
10142 The current state of mouse buttons. Every bit represents
10143 a mouse button as follows:
10144 <table>
10145 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10146 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10147 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10148 </table>
10149 A value of <tt>1</tt> means the corresponding button is pressed.
10150 otherwise it is released.
10151 </desc>
10152 </param>
10153 </method>
10154
10155 <method name="putMouseEventAbsolute">
10156 <desc>
10157 Positions the mouse pointer using absolute x and y coordinates.
10158 These coordinates are expressed in pixels and
10159 start from <tt>[1,1]</tt> which corresponds to the top left
10160 corner of the virtual display.
10161
10162 <result name="E_ACCESSDENIED">
10163 Console not powered up.
10164 </result>
10165 <result name="VBOX_E_IPRT_ERROR">
10166 Could not send mouse event to virtual mouse.
10167 </result>
10168
10169 <note>
10170 This method will have effect only if absolute mouse
10171 positioning is supported by the guest OS.
10172 </note>
10173
10174 <see><link to="#absoluteSupported"/></see>
10175 </desc>
10176
10177 <param name="x" type="long" dir="in">
10178 <desc>
10179 X coordinate of the pointer in pixels, starting from @c 1.
10180 </desc>
10181 </param>
10182 <param name="y" type="long" dir="in">
10183 <desc>
10184 Y coordinate of the pointer in pixels, starting from @c 1.
10185 </desc>
10186 </param>
10187 <param name="dz" type="long" dir="in">
10188 <desc>
10189 Amount of mouse wheel moves.
10190 Positive values describe clockwise wheel rotations,
10191 negative values describe counterclockwise rotations.
10192 </desc>
10193 </param>
10194 <param name="buttonState" type="long" dir="in">
10195 <desc>
10196 The current state of mouse buttons. Every bit represents
10197 a mouse button as follows:
10198 <table>
10199 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10200 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10201 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10202 </table>
10203 A value of @c 1 means the corresponding button is pressed.
10204 otherwise it is released.
10205 </desc>
10206 </param>
10207 </method>
10208
10209 </interface>
10210
10211 <!--
10212 // IDisplay
10213 /////////////////////////////////////////////////////////////////////////
10214 -->
10215
10216 <enum
10217 name="FramebufferPixelFormat"
10218 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10219 >
10220 <desc>
10221 Format of the video memory buffer. Constants represented by this enum can
10222 be used to test for particular values of <link
10223 to="IFramebuffer::pixelFormat"/>. See also <link
10224 to="IFramebuffer::requestResize"/>.
10225
10226 See also www.fourcc.org for more information about FOURCC pixel formats.
10227 </desc>
10228
10229 <const name="Opaque" value="0">
10230 <desc>
10231 Unknown buffer format (the user may not assume any particular format of
10232 the buffer).
10233 </desc>
10234 </const>
10235 <const name="FOURCC_RGB" value="0x32424752">
10236 <desc>
10237 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10238 bit layout).
10239 </desc>
10240 </const>
10241 </enum>
10242
10243 <interface
10244 name="IFramebuffer" extends="$unknown"
10245 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10246 wsmap="suppress"
10247 >
10248 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10249 <desc>Address of the start byte of the frame buffer.</desc>
10250 </attribute>
10251
10252 <attribute name="width" type="unsigned long" readonly="yes">
10253 <desc>Frame buffer width, in pixels.</desc>
10254 </attribute>
10255
10256 <attribute name="height" type="unsigned long" readonly="yes">
10257 <desc>Frame buffer height, in pixels.</desc>
10258 </attribute>
10259
10260 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10261 <desc>
10262 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10263 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10264 are: 8, 15, 16, 24 and 32.
10265 </desc>
10266 </attribute>
10267
10268 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10269 <desc>
10270 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10271 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10272 size of the scan line must be aligned to 32 bits.
10273 </desc>
10274 </attribute>
10275
10276 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10277 <desc>
10278 Frame buffer pixel format. It's either one of the values defined by <link
10279 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10280 <note>
10281 This attribute must never return <link
10282 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10283 <link to="#address"/> points to must be always known.
10284 </note>
10285 </desc>
10286 </attribute>
10287
10288 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10289 <desc>
10290 Defines whether this frame buffer uses the virtual video card's memory
10291 buffer (guest VRAM) directly or not. See <link
10292 to="IFramebuffer::requestResize"/> for more information.
10293 </desc>
10294 </attribute>
10295
10296 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10297 <desc>
10298 Hint from the frame buffer about how much of the standard
10299 screen height it wants to use for itself. This information is
10300 exposed to the guest through the VESA BIOS and VMMDev interface
10301 so that it can use it for determining its video mode table. It
10302 is not guaranteed that the guest respects the value.
10303 </desc>
10304 </attribute>
10305
10306 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10307 <desc>
10308 An alpha-blended overlay which is superposed over the frame buffer.
10309 The initial purpose is to allow the display of icons providing
10310 information about the VM state, including disk activity, in front
10311 ends which do not have other means of doing that. The overlay is
10312 designed to controlled exclusively by IDisplay. It has no locking
10313 of its own, and any changes made to it are not guaranteed to be
10314 visible until the affected portion of IFramebuffer is updated. The
10315 overlay can be created lazily the first time it is requested. This
10316 attribute can also return @c null to signal that the overlay is not
10317 implemented.
10318 </desc>
10319 </attribute>
10320
10321 <attribute name="winId" type="unsigned long long" readonly="yes">
10322 <desc>
10323 Platform-dependent identifier of the window where context of this
10324 frame buffer is drawn, or zero if there's no such window.
10325 </desc>
10326 </attribute>
10327
10328 <method name="lock">
10329 <desc>
10330 Locks the frame buffer.
10331 Gets called by the IDisplay object where this frame buffer is
10332 bound to.
10333 </desc>
10334 </method>
10335
10336 <method name="unlock">
10337 <desc>
10338 Unlocks the frame buffer.
10339 Gets called by the IDisplay object where this frame buffer is
10340 bound to.
10341 </desc>
10342 </method>
10343
10344 <method name="notifyUpdate">
10345 <desc>
10346 Informs about an update.
10347 Gets called by the display object where this buffer is
10348 registered.
10349 </desc>
10350 <param name="x" type="unsigned long" dir="in"/>
10351 <param name="y" type="unsigned long" dir="in"/>
10352 <param name="width" type="unsigned long" dir="in"/>
10353 <param name="height" type="unsigned long" dir="in"/>
10354 </method>
10355
10356 <method name="requestResize">
10357 <desc>
10358 Requests a size and pixel format change.
10359
10360 There are two modes of working with the video buffer of the virtual
10361 machine. The <i>indirect</i> mode implies that the IFramebuffer
10362 implementation allocates a memory buffer for the requested display mode
10363 and provides it to the virtual machine. In <i>direct</i> mode, the
10364 IFramebuffer implementation uses the memory buffer allocated and owned
10365 by the virtual machine. This buffer represents the video memory of the
10366 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10367 usually faster because the implementation gets a raw pointer to the
10368 guest VRAM buffer which it can directly use for visualizing the contents
10369 of the virtual display, as opposed to the indirect mode where the
10370 contents of guest VRAM are copied to the memory buffer provided by
10371 the implementation every time a display update occurs.
10372
10373 It is important to note that the direct mode is really fast only when
10374 the implementation uses the given guest VRAM buffer directly, for
10375 example, by blitting it to the window representing the virtual machine's
10376 display, which saves at least one copy operation comparing to the
10377 indirect mode. However, using the guest VRAM buffer directly is not
10378 always possible: the format and the color depth of this buffer may be
10379 not supported by the target window, or it may be unknown (opaque) as in
10380 case of text or non-linear multi-plane VGA video modes. In this case,
10381 the indirect mode (that is always available) should be used as a
10382 fallback: when the guest VRAM contents are copied to the
10383 implementation-provided memory buffer, color and format conversion is
10384 done automatically by the underlying code.
10385
10386 The @a pixelFormat parameter defines whether the direct mode is
10387 available or not. If @a pixelFormat is <link
10388 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10389 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10390 @a bytesPerLine parameters must be ignored and the implementation must use
10391 the indirect mode (where it provides its own buffer in one of the
10392 supported formats). In all other cases, @a pixelFormat together with
10393 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10394 buffer pointed to by the @a VRAM parameter and the implementation is
10395 free to choose which mode to use. To indicate that this frame buffer uses
10396 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10397 attribute must return @c true and <link to="#address"/> must
10398 return exactly the same address that is passed in the @a VRAM parameter
10399 of this method; otherwise it is assumed that the indirect strategy is
10400 chosen.
10401
10402 The @a width and @a height parameters represent the size of the
10403 requested display mode in both modes. In case of indirect mode, the
10404 provided memory buffer should be big enough to store data of the given
10405 display mode. In case of direct mode, it is guaranteed that the given
10406 @a VRAM buffer contains enough space to represent the display mode of the
10407 given size. Note that this frame buffer's <link to="#width"/> and <link
10408 to="#height"/> attributes must return exactly the same values as
10409 passed to this method after the resize is completed (see below).
10410
10411 The @a finished output parameter determines if the implementation has
10412 finished resizing the frame buffer or not. If, for some reason, the
10413 resize cannot be finished immediately during this call, @a finished
10414 must be set to @c false, and the implementation must call
10415 <link to="IDisplay::resizeCompleted"/> after it has returned from
10416 this method as soon as possible. If @a finished is @c false, the
10417 machine will not call any frame buffer methods until
10418 <link to="IDisplay::resizeCompleted"/> is called.
10419
10420 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10421 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10422 this frame buffer must return exactly the same values as specified in the
10423 parameters of this method, after the resize is completed. If the
10424 indirect mode is chosen, these attributes must return values describing
10425 the format of the implementation's own memory buffer <link
10426 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10427 value must always correlate with <link to="#pixelFormat"/>. Note that
10428 the <link to="#pixelFormat"/> attribute must never return <link
10429 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10430
10431 <note>
10432 This method is called by the IDisplay object under the
10433 <link to="#lock"/> provided by this IFramebuffer
10434 implementation. If this method returns @c false in @a finished, then
10435 this lock is not released until
10436 <link to="IDisplay::resizeCompleted"/> is called.
10437 </note>
10438 </desc>
10439 <param name="screenId" type="unsigned long" dir="in">
10440 <desc>
10441 Logical screen number. Must be used in the corresponding call to
10442 <link to="IDisplay::resizeCompleted"/> if this call is made.
10443 </desc>
10444 </param>
10445 <param name="pixelFormat" type="unsigned long" dir="in">
10446 <desc>
10447 Pixel format of the memory buffer pointed to by @a VRAM.
10448 See also <link to="FramebufferPixelFormat"/>.
10449 </desc>
10450 </param>
10451 <param name="VRAM" type="octet" mod="ptr" dir="in">
10452 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10453 </param>
10454 <param name="bitsPerPixel" type="unsigned long" dir="in">
10455 <desc>Color depth, bits per pixel.</desc>
10456 </param>
10457 <param name="bytesPerLine" type="unsigned long" dir="in">
10458 <desc>Size of one scan line, in bytes.</desc>
10459 </param>
10460 <param name="width" type="unsigned long" dir="in">
10461 <desc>Width of the guest display, in pixels.</desc>
10462 </param>
10463 <param name="height" type="unsigned long" dir="in">
10464 <desc>Height of the guest display, in pixels.</desc>
10465 </param>
10466 <param name="finished" type="boolean" dir="return">
10467 <desc>
10468 Can the VM start using the new frame buffer immediately
10469 after this method returns or it should wait for
10470 <link to="IDisplay::resizeCompleted"/>.
10471 </desc>
10472 </param>
10473 </method>
10474
10475 <method name="videoModeSupported">
10476 <desc>
10477 Returns whether the frame buffer implementation is willing to
10478 support a given video mode. In case it is not able to render
10479 the video mode (or for some reason not willing), it should
10480 return @c false. Usually this method is called when the guest
10481 asks the VMM device whether a given video mode is supported
10482 so the information returned is directly exposed to the guest.
10483 It is important that this method returns very quickly.
10484 </desc>
10485 <param name="width" type="unsigned long" dir="in"/>
10486 <param name="height" type="unsigned long" dir="in"/>
10487 <param name="bpp" type="unsigned long" dir="in"/>
10488 <param name="supported" type="boolean" dir="return"/>
10489 </method>
10490
10491 <method name="getVisibleRegion">
10492 <desc>
10493 Returns the visible region of this frame buffer.
10494
10495 If the @a rectangles parameter is @c null then the value of the
10496 @a count parameter is ignored and the number of elements necessary to
10497 describe the current visible region is returned in @a countCopied.
10498
10499 If @a rectangles is not @c null but @a count is less
10500 than the required number of elements to store region data, the method
10501 will report a failure. If @a count is equal or greater than the
10502 required number of elements, then the actual number of elements copied
10503 to the provided array will be returned in @a countCopied.
10504
10505 <note>
10506 The address of the provided array must be in the process space of
10507 this IFramebuffer object.
10508 </note>
10509 <note>
10510 Method not yet implemented.
10511 </note>
10512 </desc>
10513 <param name="rectangles" type="octet" mod="ptr" dir="in">
10514 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10515 </param>
10516 <param name="count" type="unsigned long" dir="in">
10517 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10518 </param>
10519 <param name="countCopied" type="unsigned long" dir="return">
10520 <desc>Number of elements copied to the @a rectangles array.</desc>
10521 </param>
10522 </method>
10523
10524 <method name="setVisibleRegion">
10525 <desc>
10526 Suggests a new visible region to this frame buffer. This region
10527 represents the area of the VM display which is a union of regions of
10528 all top-level windows of the guest operating system running inside the
10529 VM (if the Guest Additions for this system support this
10530 functionality). This information may be used by the frontends to
10531 implement the seamless desktop integration feature.
10532
10533 <note>
10534 The address of the provided array must be in the process space of
10535 this IFramebuffer object.
10536 </note>
10537 <note>
10538 The IFramebuffer implementation must make a copy of the provided
10539 array of rectangles.
10540 </note>
10541 <note>
10542 Method not yet implemented.
10543 </note>
10544 </desc>
10545 <param name="rectangles" type="octet" mod="ptr" dir="in">
10546 <desc>Pointer to the @c RTRECT array.</desc>
10547 </param>
10548 <param name="count" type="unsigned long" dir="in">
10549 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10550 </param>
10551 </method>
10552
10553 <method name="processVHWACommand">
10554 <desc>
10555 Posts a Video HW Acceleration Command to the frame buffer for processing.
10556 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10557 are posted from quest to the host to be processed by the host hardware.
10558
10559 <note>
10560 The address of the provided command must be in the process space of
10561 this IFramebuffer object.
10562 </note>
10563 </desc>
10564
10565 <param name="command" type="octet" mod="ptr" dir="in">
10566 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10567 </param>
10568 </method>
10569
10570 </interface>
10571
10572 <interface
10573 name="IFramebufferOverlay" extends="IFramebuffer"
10574 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10575 wsmap="suppress"
10576 >
10577 <desc>
10578 The IFramebufferOverlay interface represents an alpha blended overlay
10579 for displaying status icons above an IFramebuffer. It is always created
10580 not visible, so that it must be explicitly shown. It only covers a
10581 portion of the IFramebuffer, determined by its width, height and
10582 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10583 that order) format, and may be written to directly. Do re-read the
10584 width though, after setting it, as it may be adjusted (increased) to
10585 make it more suitable for the front end.
10586 </desc>
10587 <attribute name="x" type="unsigned long" readonly="yes">
10588 <desc>X position of the overlay, relative to the frame buffer.</desc>
10589 </attribute>
10590
10591 <attribute name="y" type="unsigned long" readonly="yes">
10592 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10593 </attribute>
10594
10595 <attribute name="visible" type="boolean" readonly="no">
10596 <desc>
10597 Whether the overlay is currently visible.
10598 </desc>
10599 </attribute>
10600
10601 <attribute name="alpha" type="unsigned long" readonly="no">
10602 <desc>
10603 The global alpha value for the overlay. This may or may not be
10604 supported by a given front end.
10605 </desc>
10606 </attribute>
10607
10608 <method name="move">
10609 <desc>
10610 Changes the overlay's position relative to the IFramebuffer.
10611 </desc>
10612 <param name="x" type="unsigned long" dir="in"/>
10613 <param name="y" type="unsigned long" dir="in"/>
10614 </method>
10615
10616 </interface>
10617
10618 <interface
10619 name="IDisplay" extends="$unknown"
10620 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10621 wsmap="managed"
10622 >
10623 <desc>
10624 The IDisplay interface represents the virtual machine's display.
10625
10626 The object implementing this interface is contained in each
10627 <link to="IConsole::display"/> attribute and represents the visual
10628 output of the virtual machine.
10629
10630 The virtual display supports pluggable output targets represented by the
10631 IFramebuffer interface. Examples of the output target are a window on
10632 the host computer or an RDP session's display on a remote computer.
10633 </desc>
10634 <attribute name="width" type="unsigned long" readonly="yes">
10635 <desc>Current display width.</desc>
10636 </attribute>
10637
10638 <attribute name="height" type="unsigned long" readonly="yes">
10639 <desc>Current display height.</desc>
10640 </attribute>
10641
10642 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10643 <desc>
10644 Current guest display color depth. Note that this may differ
10645 from <link to="IFramebuffer::bitsPerPixel"/>.
10646 </desc>
10647 </attribute>
10648
10649 <method name="setFramebuffer">
10650 <desc>
10651 Sets the framebuffer for given screen.
10652 </desc>
10653 <param name="screenId" type="unsigned long" dir="in"/>
10654 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10655 </method>
10656
10657 <method name="getFramebuffer">
10658 <desc>
10659 Queries the framebuffer for given screen.
10660 </desc>
10661 <param name="screenId" type="unsigned long" dir="in"/>
10662 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10663 <param name="xOrigin" type="long" dir="out"/>
10664 <param name="yOrigin" type="long" dir="out"/>
10665 </method>
10666
10667 <method name="setVideoModeHint">
10668 <desc>
10669 Asks VirtualBox to request the given video mode from
10670 the guest. This is just a hint and it cannot be guaranteed
10671 that the requested resolution will be used. Guest Additions
10672 are required for the request to be seen by guests. The caller
10673 should issue the request and wait for a resolution change and
10674 after a timeout retry.
10675
10676 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10677 parameters means that the corresponding values should be taken from the
10678 current video mode (i.e. left unchanged).
10679
10680 If the guest OS supports multi-monitor configuration then the @a display
10681 parameter specifies the number of the guest display to send the hint to:
10682 @c 0 is the primary display, @c 1 is the first secondary and
10683 so on. If the multi-monitor configuration is not supported, @a display
10684 must be @c 0.
10685
10686 <result name="E_INVALIDARG">
10687 The @a display is not associated with any monitor.
10688 </result>
10689
10690 </desc>
10691 <param name="width" type="unsigned long" dir="in"/>
10692 <param name="height" type="unsigned long" dir="in"/>
10693 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10694 <param name="display" type="unsigned long" dir="in"/>
10695 </method>
10696
10697 <method name="setSeamlessMode">
10698 <desc>
10699 Enables or disables seamless guest display rendering (seamless desktop
10700 integration) mode.
10701 <note>
10702 Calling this method has no effect if <link
10703 to="IGuest::supportsSeamless"/> returns @c false.
10704 </note>
10705 </desc>
10706 <param name="enabled" type="boolean" dir="in"/>
10707 </method>
10708
10709 <method name="takeScreenShot">
10710 <desc>
10711 Takes a screen shot of the requested size and copies it to the
10712 32-bpp buffer allocated by the caller and pointed to by @a address.
10713
10714 <note>This API can be used only by the COM/XPCOM C++ API as it
10715 requires pointer support. Use <link to="#takeScreenShotSlow" />
10716 with other language bindings.
10717 </note>
10718
10719 <result name="E_NOTIMPL">
10720 Feature not implemented.
10721 </result>
10722 <result name="VBOX_E_IPRT_ERROR">
10723 Could not take a screenshot.
10724 </result>
10725
10726 </desc>
10727 <param name="address" type="octet" mod="ptr" dir="in"/>
10728 <param name="width" type="unsigned long" dir="in"/>
10729 <param name="height" type="unsigned long" dir="in"/>
10730 </method>
10731
10732 <method name="takeScreenShotSlow">
10733 <desc>
10734 Takes a guest screen shot of the requested size and returns it as
10735 an array of bytes in uncompressed 32-bit ARGB format.
10736 This API is slow, but could be the only option to get guest screenshot
10737 for scriptable languages not allowed to manipulate with addresses
10738 directly.
10739
10740 <result name="E_NOTIMPL">
10741 Feature not implemented.
10742 </result>
10743 <result name="VBOX_E_IPRT_ERROR">
10744 Could not take a screenshot.
10745 </result>
10746 </desc>
10747 <param name="width" type="unsigned long" dir="in">
10748 <desc>
10749 Desired image width.
10750 </desc>
10751 </param>
10752 <param name="height" type="unsigned long" dir="in">
10753 <desc>
10754 Desired image height.
10755 </desc>
10756 </param>
10757 <param name="screenData" type="octet" dir="return" safearray="yes">
10758 <desc>
10759 Array with resulting screen data.
10760 </desc>
10761 </param>
10762 </method>
10763
10764 <method name="drawToScreen">
10765 <desc>
10766 Draws a 32-bpp image of the specified size from the given buffer
10767 to the given point on the VM display.
10768
10769 <result name="E_NOTIMPL">
10770 Feature not implemented.
10771 </result>
10772 <result name="VBOX_E_IPRT_ERROR">
10773 Could not draw to screen.
10774 </result>
10775
10776 </desc>
10777 <param name="address" type="octet" mod="ptr" dir="in"/>
10778 <param name="x" type="unsigned long" dir="in"/>
10779 <param name="y" type="unsigned long" dir="in"/>
10780 <param name="width" type="unsigned long" dir="in"/>
10781 <param name="height" type="unsigned long" dir="in"/>
10782 </method>
10783
10784 <method name="invalidateAndUpdate">
10785 <desc>
10786 Does a full invalidation of the VM display and instructs the VM
10787 to update it.
10788
10789 <result name="VBOX_E_IPRT_ERROR">
10790 Could not invalidate and update screen.
10791 </result>
10792
10793 </desc>
10794 </method>
10795
10796 <method name="resizeCompleted">
10797 <desc>
10798 Signals that a framebuffer has completed the resize operation.
10799
10800 <result name="VBOX_E_NOT_SUPPORTED">
10801 Operation only valid for external frame buffers.
10802 </result>
10803
10804 </desc>
10805 <param name="screenId" type="unsigned long" dir="in"/>
10806 </method>
10807
10808 <method name="updateCompleted">
10809 <desc>
10810 Signals that a framebuffer has completed the update operation.
10811
10812 <result name="VBOX_E_NOT_SUPPORTED">
10813 Operation only valid for external frame buffers.
10814 </result>
10815
10816 </desc>
10817 </method>
10818
10819 <method name="completeVHWACommand">
10820 <desc>
10821 Signals that the Video HW Acceleration command has completed.
10822 </desc>
10823
10824 <param name="command" type="octet" mod="ptr" dir="in">
10825 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10826 </param>
10827 </method>
10828
10829 </interface>
10830
10831 <!--
10832 // INetworkAdapter
10833 /////////////////////////////////////////////////////////////////////////
10834 -->
10835
10836 <enum
10837 name="NetworkAttachmentType"
10838 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10839 >
10840 <desc>
10841 Network attachment type.
10842 </desc>
10843
10844 <const name="Null" value="0">
10845 <desc>Null value, also means "not attached".</desc>
10846 </const>
10847 <const name="NAT" value="1"/>
10848 <const name="Bridged" value="2"/>
10849 <const name="Internal" value="3"/>
10850 <const name="HostOnly" value="4"/>
10851 </enum>
10852
10853 <enum
10854 name="NetworkAdapterType"
10855 uuid="50c3dfd8-07ac-4a31-baac-519c828fbf97"
10856 >
10857 <desc>
10858 Network adapter type.
10859 </desc>
10860
10861 <const name="Null" value="0">
10862 <desc>Null value (never used by the API).</desc>
10863 </const>
10864 <const name="Am79C970A" value="1">
10865 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10866 </const>
10867 <const name="Am79C973" value="2">
10868 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10869 </const>
10870 <const name="I82540EM" value="3">
10871 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10872 </const>
10873 <const name="I82543GC" value="4">
10874 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10875 </const>
10876 <const name="I82545EM" value="5">
10877 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10878 </const>
10879 </enum>
10880
10881 <interface
10882 name="INetworkAdapter" extends="$unknown"
10883 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10884 wsmap="managed"
10885 >
10886 <desc>
10887 Represents a virtual network adapter that is attached to a virtual machine.
10888 Each virtual machine has a fixed number of network adapter slots with one
10889 instance of this attached to each of them. Call
10890 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10891 is attached to a given slot in a given machine.
10892
10893 Each network adapter can be in one of five attachment modes, which are
10894 represented by the <link to="NetworkAttachmentType" /> enumeration;
10895 see the <link to="#attachmentType" /> attribute.
10896 </desc>
10897
10898 <attribute name="adapterType" type="NetworkAdapterType">
10899 <desc>
10900 Type of the virtual network adapter. Depending on this value,
10901 VirtualBox will provide a different virtual network hardware
10902 to the guest.
10903 </desc>
10904 </attribute>
10905
10906 <attribute name="slot" type="unsigned long" readonly="yes">
10907 <desc>
10908 Slot number this adapter is plugged into. Corresponds to
10909 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10910 to obtain this instance.
10911 </desc>
10912 </attribute>
10913
10914 <attribute name="enabled" type="boolean">
10915 <desc>
10916 Flag whether the network adapter is present in the
10917 guest system. If disabled, the virtual guest hardware will
10918 not contain this network adapter. Can only be changed when
10919 the VM is not running.
10920 </desc>
10921 </attribute>
10922
10923 <attribute name="MACAddress" type="wstring">
10924 <desc>
10925 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10926 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10927 </desc>
10928 </attribute>
10929
10930 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10931
10932 <attribute name="hostInterface" type="wstring">
10933 <desc>
10934 Name of the host network interface the VM is attached to.
10935 </desc>
10936 </attribute>
10937
10938 <attribute name="internalNetwork" type="wstring">
10939 <desc>
10940 Name of the internal network the VM is attached to.
10941 </desc>
10942 </attribute>
10943
10944 <attribute name="NATNetwork" type="wstring">
10945 <desc>
10946 Name of the NAT network the VM is attached to.
10947 </desc>
10948 </attribute>
10949
10950 <attribute name="cableConnected" type="boolean">
10951 <desc>
10952 Flag whether the adapter reports the cable as connected or not.
10953 It can be used to report offline situations to a VM.
10954 </desc>
10955 </attribute>
10956
10957 <attribute name="lineSpeed" type="unsigned long">
10958 <desc>
10959 Line speed reported by custom drivers, in units of 1 kbps.
10960 </desc>
10961 </attribute>
10962
10963 <attribute name="traceEnabled" type="boolean">
10964 <desc>
10965 Flag whether network traffic from/to the network card should be traced.
10966 Can only be toggled when the VM is turned off.
10967 </desc>
10968 </attribute>
10969
10970 <attribute name="traceFile" type="wstring">
10971 <desc>
10972 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10973 will be used.
10974 </desc>
10975 </attribute>
10976
10977 <method name="attachToNAT">
10978 <desc>
10979 Attach the network adapter to the Network Address Translation (NAT) interface.
10980 </desc>
10981 </method>
10982
10983 <method name="attachToBridgedInterface">
10984 <desc>
10985 Attach the network adapter to a bridged host interface.
10986 </desc>
10987 </method>
10988
10989 <method name="attachToInternalNetwork">
10990 <desc>
10991 Attach the network adapter to an internal network.
10992 </desc>
10993 </method>
10994
10995 <method name="attachToHostOnlyInterface">
10996 <desc>
10997 Attach the network adapter to the host-only network.
10998 </desc>
10999 </method>
11000
11001 <method name="detach">
11002 <desc>
11003 Detach the network adapter
11004 </desc>
11005 </method>
11006 </interface>
11007
11008
11009 <!--
11010 // ISerialPort
11011 /////////////////////////////////////////////////////////////////////////
11012 -->
11013
11014 <enum
11015 name="PortMode"
11016 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11017 >
11018 <desc>
11019 The PortMode enumeration represents possible communication modes for
11020 the virtual serial port device.
11021 </desc>
11022
11023 <const name="Disconnected" value="0">
11024 <desc>Virtual device is not attached to any real host device.</desc>
11025 </const>
11026 <const name="HostPipe" value="1">
11027 <desc>Virtual device is attached to a host pipe.</desc>
11028 </const>
11029 <const name="HostDevice" value="2">
11030 <desc>Virtual device is attached to a host device.</desc>
11031 </const>
11032 <const name="RawFile" value="3">
11033 <desc>Virtual device is attached to a raw file.</desc>
11034 </const>
11035 </enum>
11036
11037 <interface
11038 name="ISerialPort" extends="$unknown"
11039 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11040 wsmap="managed"
11041 >
11042
11043 <desc>
11044 The ISerialPort interface represents the virtual serial port device.
11045
11046 The virtual serial port device acts like an ordinary serial port
11047 inside the virtual machine. This device communicates to the real
11048 serial port hardware in one of two modes: host pipe or host device.
11049
11050 In host pipe mode, the #path attribute specifies the path to the pipe on
11051 the host computer that represents a serial port. The #server attribute
11052 determines if this pipe is created by the virtual machine process at
11053 machine startup or it must already exist before starting machine
11054 execution.
11055
11056 In host device mode, the #path attribute specifies the name of the
11057 serial port device on the host computer.
11058
11059 There is also a third communication mode: the disconnected mode. In this
11060 mode, the guest OS running inside the virtual machine will be able to
11061 detect the serial port, but all port write operations will be discarded
11062 and all port read operations will return no data.
11063
11064 <see>IMachine::getSerialPort</see>
11065 </desc>
11066
11067 <attribute name="slot" type="unsigned long" readonly="yes">
11068 <desc>
11069 Slot number this serial port is plugged into. Corresponds to
11070 the value you pass to <link to="IMachine::getSerialPort"/>
11071 to obtain this instance.
11072 </desc>
11073 </attribute>
11074
11075 <attribute name="enabled" type="boolean">
11076 <desc>
11077 Flag whether the serial port is enabled. If disabled,
11078 the serial port will not be reported to the guest OS.
11079 </desc>
11080 </attribute>
11081
11082 <attribute name="IOBase" type="unsigned long">
11083 <desc>Base I/O address of the serial port.</desc>
11084 </attribute>
11085
11086 <attribute name="IRQ" type="unsigned long">
11087 <desc>IRQ number of the serial port.</desc>
11088 </attribute>
11089
11090 <attribute name="hostMode" type="PortMode">
11091 <desc>
11092 How is this port connected to the host.
11093 <note>
11094 Changing this attribute may fail if the conditions for
11095 <link to="#path"/> are not met.
11096 </note>
11097 </desc>
11098 </attribute>
11099
11100 <attribute name="server" type="boolean">
11101 <desc>
11102 Flag whether this serial port acts as a server (creates a new pipe on
11103 the host) or as a client (uses the existing pipe). This attribute is
11104 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11105 </desc>
11106 </attribute>
11107
11108 <attribute name="path" type="wstring">
11109 <desc>
11110 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11111 PortMode_HostPipe, or the host serial device name when
11112 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11113 cases, setting a @c null or empty string as the attribute's value
11114 is an error. Otherwise, the value of this property is ignored.
11115 </desc>
11116 </attribute>
11117
11118 </interface>
11119
11120 <!--
11121 // IParallelPort
11122 /////////////////////////////////////////////////////////////////////////
11123 -->
11124
11125 <interface
11126 name="IParallelPort" extends="$unknown"
11127 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11128 wsmap="managed"
11129 >
11130
11131 <desc>
11132 The IParallelPort interface represents the virtual parallel port device.
11133
11134 The virtual parallel port device acts like an ordinary parallel port
11135 inside the virtual machine. This device communicates to the real
11136 parallel port hardware using the name of the parallel device on the host
11137 computer specified in the #path attribute.
11138
11139 Each virtual parallel port device is assigned a base I/O address and an
11140 IRQ number that will be reported to the guest operating system and used
11141 to operate the given parallel port from within the virtual machine.
11142
11143 <see>IMachine::getParallelPort</see>
11144 </desc>
11145
11146 <attribute name="slot" type="unsigned long" readonly="yes">
11147 <desc>
11148 Slot number this parallel port is plugged into. Corresponds to
11149 the value you pass to <link to="IMachine::getParallelPort"/>
11150 to obtain this instance.
11151 </desc>
11152 </attribute>
11153
11154 <attribute name="enabled" type="boolean">
11155 <desc>
11156 Flag whether the parallel port is enabled. If disabled,
11157 the parallel port will not be reported to the guest OS.
11158 </desc>
11159 </attribute>
11160
11161 <attribute name="IOBase" type="unsigned long">
11162 <desc>Base I/O address of the parallel port.</desc>
11163 </attribute>
11164
11165 <attribute name="IRQ" type="unsigned long">
11166 <desc>IRQ number of the parallel port.</desc>
11167 </attribute>
11168
11169 <attribute name="path" type="wstring">
11170 <desc>
11171 Host parallel device name. If this parallel port is enabled, setting a
11172 @c null or an empty string as this attribute's value will result into
11173 an error.
11174 </desc>
11175 </attribute>
11176
11177 </interface>
11178
11179
11180 <!--
11181 // IMachineDebugger
11182 /////////////////////////////////////////////////////////////////////////
11183 -->
11184
11185 <interface
11186 name="IMachineDebugger" extends="$unknown"
11187 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11188 wsmap="suppress"
11189 >
11190 <method name="resetStats">
11191 <desc>
11192 Reset VM statistics.
11193 </desc>
11194 <param name="pattern" type="wstring" dir="in">
11195 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11196 </param>
11197 </method>
11198
11199 <method name="dumpStats">
11200 <desc>
11201 Dumps VM statistics.
11202 </desc>
11203 <param name="pattern" type="wstring" dir="in">
11204 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11205 </param>
11206 </method>
11207
11208 <method name="getStats">
11209 <desc>
11210 Get the VM statistics in a XMLish format.
11211 </desc>
11212 <param name="pattern" type="wstring" dir="in">
11213 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11214 </param>
11215 <param name="withDescriptions" type="boolean" dir="in">
11216 <desc>Whether to include the descriptions.</desc>
11217 </param>
11218 <param name="stats" type="wstring" dir="out">
11219 <desc>The XML document containing the statistics.</desc>
11220 </param>
11221 </method>
11222
11223 <method name="injectNMI">
11224 <desc>
11225 Inject an NMI into a running VT-x/AMD-V VM.
11226 </desc>
11227 </method>
11228
11229 <attribute name="singlestep" type="boolean">
11230 <desc>Switch for enabling singlestepping.</desc>
11231 </attribute>
11232
11233 <attribute name="recompileUser" type="boolean">
11234 <desc>Switch for forcing code recompilation for user mode code.</desc>
11235 </attribute>
11236
11237 <attribute name="recompileSupervisor" type="boolean">
11238 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11239 </attribute>
11240
11241 <attribute name="PATMEnabled" type="boolean">
11242 <desc>Switch for enabling and disabling the PATM component.</desc>
11243 </attribute>
11244
11245 <attribute name="CSAMEnabled" type="boolean">
11246 <desc>Switch for enabling and disabling the CSAM component.</desc>
11247 </attribute>
11248
11249 <attribute name="logEnabled" type="boolean">
11250 <desc>Switch for enabling and disabling logging.</desc>
11251 </attribute>
11252
11253 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11254 <desc>
11255 Flag indicating whether the VM is currently making use of CPU hardware
11256 virtualization extensions.
11257 </desc>
11258 </attribute>
11259
11260 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11261 <desc>
11262 Flag indicating whether the VM is currently making use of the nested paging
11263 CPU hardware virtualization extension.
11264 </desc>
11265 </attribute>
11266
11267 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11268 <desc>
11269 Flag indicating whether the VM is currently making use of the VPID
11270 VT-x extension.
11271 </desc>
11272 </attribute>
11273
11274 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11275 <desc>
11276 Flag indicating whether the VM is currently making use of the Physical
11277 Address Extension CPU feature.
11278 </desc>
11279 </attribute>
11280
11281 <attribute name="virtualTimeRate" type="unsigned long">
11282 <desc>
11283 The rate at which the virtual time runs expressed as a percentage.
11284 The accepted range is 2% to 20000%.
11285 </desc>
11286 </attribute>
11287
11288 <!-- @todo method for setting log flags, groups and destination! -->
11289
11290 <attribute name="VM" type="unsigned long long" readonly="yes">
11291 <desc>
11292 Gets the VM handle. This is only for internal use while
11293 we carve the details of this interface.
11294 </desc>
11295 </attribute>
11296
11297 </interface>
11298
11299 <!--
11300 // IUSBController
11301 /////////////////////////////////////////////////////////////////////////
11302 -->
11303
11304 <interface
11305 name="IUSBController" extends="$unknown"
11306 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11307 wsmap="managed"
11308 >
11309 <attribute name="enabled" type="boolean">
11310 <desc>
11311 Flag whether the USB controller is present in the
11312 guest system. If disabled, the virtual guest hardware will
11313 not contain any USB controller. Can only be changed when
11314 the VM is powered off.
11315 </desc>
11316 </attribute>
11317
11318 <attribute name="enabledEhci" type="boolean">
11319 <desc>
11320 Flag whether the USB EHCI controller is present in the
11321 guest system. If disabled, the virtual guest hardware will
11322 not contain a USB EHCI controller. Can only be changed when
11323 the VM is powered off.
11324 </desc>
11325 </attribute>
11326
11327 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11328 <desc>
11329 USB standard version which the controller implements.
11330 This is a BCD which means that the major version is in the
11331 high byte and minor version is in the low byte.
11332 </desc>
11333 </attribute>
11334
11335 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11336 <desc>
11337 List of USB device filters associated with the machine.
11338
11339 If the machine is currently running, these filters are activated
11340 every time a new (supported) USB device is attached to the host
11341 computer that was not ignored by global filters
11342 (<link to="IHost::USBDeviceFilters"/>).
11343
11344 These filters are also activated when the machine is powered up.
11345 They are run against a list of all currently available USB
11346 devices (in states
11347 <link to="USBDeviceState_Available"/>,
11348 <link to="USBDeviceState_Busy"/>,
11349 <link to="USBDeviceState_Held"/>) that were not previously
11350 ignored by global filters.
11351
11352 If at least one filter matches the USB device in question, this
11353 device is automatically captured (attached to) the virtual USB
11354 controller of this machine.
11355
11356 <see>IUSBDeviceFilter, ::IUSBController</see>
11357 </desc>
11358 </attribute>
11359
11360 <method name="createDeviceFilter">
11361 <desc>
11362 Creates a new USB device filter. All attributes except
11363 the filter name are set to empty (any match),
11364 <i>active</i> is @c false (the filter is not active).
11365
11366 The created filter can then be added to the list of filters using
11367 <link to="#insertDeviceFilter"/>.
11368
11369 <result name="VBOX_E_INVALID_VM_STATE">
11370 The virtual machine is not mutable.
11371 </result>
11372
11373 <see>#deviceFilters</see>
11374 </desc>
11375 <param name="name" type="wstring" dir="in">
11376 <desc>
11377 Filter name. See <link to="IUSBDeviceFilter::name"/>
11378 for more info.
11379 </desc>
11380 </param>
11381 <param name="filter" type="IUSBDeviceFilter" dir="return">
11382 <desc>Created filter object.</desc>
11383 </param>
11384 </method>
11385
11386 <method name="insertDeviceFilter">
11387 <desc>
11388 Inserts the given USB device to the specified position
11389 in the list of filters.
11390
11391 Positions are numbered starting from <tt>0</tt>. If the specified
11392 position is equal to or greater than the number of elements in
11393 the list, the filter is added to the end of the collection.
11394
11395 <note>
11396 Duplicates are not allowed, so an attempt to insert a
11397 filter that is already in the collection, will return an
11398 error.
11399 </note>
11400
11401 <result name="VBOX_E_INVALID_VM_STATE">
11402 Virtual machine is not mutable.
11403 </result>
11404 <result name="E_INVALIDARG">
11405 USB device filter not created within this VirtualBox instance.
11406 </result>
11407 <result name="VBOX_E_INVALID_OBJECT_STATE">
11408 USB device filter already in list.
11409 </result>
11410
11411 <see>#deviceFilters</see>
11412 </desc>
11413 <param name="position" type="unsigned long" dir="in">
11414 <desc>Position to insert the filter to.</desc>
11415 </param>
11416 <param name="filter" type="IUSBDeviceFilter" dir="in">
11417 <desc>USB device filter to insert.</desc>
11418 </param>
11419 </method>
11420
11421 <method name="removeDeviceFilter">
11422 <desc>
11423 Removes a USB device filter from the specified position in the
11424 list of filters.
11425
11426 Positions are numbered starting from <tt>0</tt>. Specifying a
11427 position equal to or greater than the number of elements in
11428 the list will produce an error.
11429
11430 <see>#deviceFilters</see>
11431
11432 <result name="VBOX_E_INVALID_VM_STATE">
11433 Virtual machine is not mutable.
11434 </result>
11435 <result name="E_INVALIDARG">
11436 USB device filter list empty or invalid @a position.
11437 </result>
11438
11439 </desc>
11440 <param name="position" type="unsigned long" dir="in">
11441 <desc>Position to remove the filter from.</desc>
11442 </param>
11443 <param name="filter" type="IUSBDeviceFilter" dir="return">
11444 <desc>Removed USB device filter.</desc>
11445 </param>
11446 </method>
11447
11448 </interface>
11449
11450
11451 <!--
11452 // IUSBDevice
11453 /////////////////////////////////////////////////////////////////////////
11454 -->
11455
11456 <interface
11457 name="IUSBDevice" extends="$unknown"
11458 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11459 wsmap="managed"
11460 >
11461 <desc>
11462 The IUSBDevice interface represents a virtual USB device attached to the
11463 virtual machine.
11464
11465 A collection of objects implementing this interface is stored in the
11466 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11467 attached to a running virtual machine's USB controller.
11468 </desc>
11469
11470 <attribute name="id" type="wstring" readonly="yes">
11471 <desc>
11472 Unique USB device ID. This ID is built from #vendorId,
11473 #productId, #revision and #serialNumber.
11474 </desc>
11475 </attribute>
11476
11477 <attribute name="vendorId" type="unsigned short" readonly="yes">
11478 <desc>Vendor ID.</desc>
11479 </attribute>
11480
11481 <attribute name="productId" type="unsigned short" readonly="yes">
11482 <desc>Product ID.</desc>
11483 </attribute>
11484
11485 <attribute name="revision" type="unsigned short" readonly="yes">
11486 <desc>
11487 Product revision number. This is a packed BCD represented as
11488 unsigned short. The high byte is the integer part and the low
11489 byte is the decimal.
11490 </desc>
11491 </attribute>
11492
11493 <attribute name="manufacturer" type="wstring" readonly="yes">
11494 <desc>Manufacturer string.</desc>
11495 </attribute>
11496
11497 <attribute name="product" type="wstring" readonly="yes">
11498 <desc>Product string.</desc>
11499 </attribute>
11500
11501 <attribute name="serialNumber" type="wstring" readonly="yes">
11502 <desc>Serial number string.</desc>
11503 </attribute>
11504
11505 <attribute name="address" type="wstring" readonly="yes">
11506 <desc>Host specific address of the device.</desc>
11507 </attribute>
11508
11509 <attribute name="port" type="unsigned short" readonly="yes">
11510 <desc>
11511 Host USB port number the device is physically
11512 connected to.
11513 </desc>
11514 </attribute>
11515
11516 <attribute name="version" type="unsigned short" readonly="yes">
11517 <desc>
11518 The major USB version of the device - 1 or 2.
11519 </desc>
11520 </attribute>
11521
11522 <attribute name="portVersion" type="unsigned short" readonly="yes">
11523 <desc>
11524 The major USB version of the host USB port the device is
11525 physically connected to - 1 or 2. For devices not connected to
11526 anything this will have the same value as the version attribute.
11527 </desc>
11528 </attribute>
11529
11530 <attribute name="remote" type="boolean" readonly="yes">
11531 <desc>
11532 Whether the device is physically connected to a remote VRDP
11533 client or to a local host machine.
11534 </desc>
11535 </attribute>
11536
11537 </interface>
11538
11539
11540 <!--
11541 // IUSBDeviceFilter
11542 /////////////////////////////////////////////////////////////////////////
11543 -->
11544
11545 <interface
11546 name="IUSBDeviceFilter" extends="$unknown"
11547 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11548 wsmap="managed"
11549 >
11550 <desc>
11551 The IUSBDeviceFilter interface represents an USB device filter used
11552 to perform actions on a group of USB devices.
11553
11554 This type of filters is used by running virtual machines to
11555 automatically capture selected USB devices once they are physically
11556 attached to the host computer.
11557
11558 A USB device is matched to the given device filter if and only if all
11559 attributes of the device match the corresponding attributes of the
11560 filter (that is, attributes are joined together using the logical AND
11561 operation). On the other hand, all together, filters in the list of
11562 filters carry the semantics of the logical OR operation. So if it is
11563 desirable to create a match like "this vendor id OR this product id",
11564 one needs to create two filters and specify "any match" (see below)
11565 for unused attributes.
11566
11567 All filter attributes used for matching are strings. Each string
11568 is an expression representing a set of values of the corresponding
11569 device attribute, that will match the given filter. Currently, the
11570 following filtering expressions are supported:
11571
11572 <ul>
11573 <li><i>Interval filters</i>. Used to specify valid intervals for
11574 integer device attributes (Vendor ID, Product ID and Revision).
11575 The format of the string is:
11576
11577 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11578
11579 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11580 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11581 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11582 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11583 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11584 possible integer is assumed.
11585 </li>
11586 <li><i>Boolean filters</i>. Used to specify acceptable values for
11587 boolean device attributes. The format of the string is:
11588
11589 <tt>true|false|yes|no|0|1</tt>
11590
11591 </li>
11592 <li><i>Exact match</i>. Used to specify a single value for the given
11593 device attribute. Any string that doesn't start with <tt>int:</tt>
11594 represents the exact match. String device attributes are compared to
11595 this string including case of symbols. Integer attributes are first
11596 converted to a string (see individual filter attributes) and then
11597 compared ignoring case.
11598
11599 </li>
11600 <li><i>Any match</i>. Any value of the corresponding device attribute
11601 will match the given filter. An empty or @c null string is
11602 used to construct this type of filtering expressions.
11603
11604 </li>
11605 </ul>
11606
11607 <note>
11608 On the Windows host platform, interval filters are not currently
11609 available. Also all string filter attributes
11610 (<link to="#manufacturer"/>, <link to="#product"/>,
11611 <link to="#serialNumber"/>) are ignored, so they behave as
11612 <i>any match</i> no matter what string expression is specified.
11613 </note>
11614
11615 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11616 </desc>
11617
11618 <attribute name="name" type="wstring">
11619 <desc>
11620 Visible name for this filter.
11621 This name is used to visually distinguish one filter from another,
11622 so it can neither be @c null nor an empty string.
11623 </desc>
11624 </attribute>
11625
11626 <attribute name="active" type="boolean">
11627 <desc>Whether this filter active or has been temporarily disabled.</desc>
11628 </attribute>
11629
11630 <attribute name="vendorId" type="wstring">
11631 <desc>
11632 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11633 The string representation for the <i>exact matching</i>
11634 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11635 (including leading zeroes).
11636 </desc>
11637 </attribute>
11638
11639 <attribute name="productId" type="wstring">
11640 <desc>
11641 <link to="IUSBDevice::productId">Product ID</link> filter.
11642 The string representation for the <i>exact matching</i>
11643 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11644 (including leading zeroes).
11645 </desc>
11646 </attribute>
11647
11648 <attribute name="revision" type="wstring">
11649 <desc>
11650 <link to="IUSBDevice::productId">Product revision number</link>
11651 filter. The string representation for the <i>exact matching</i>
11652 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11653 of the integer part of the revision, and <tt>F</tt> is the
11654 decimal digit of its fractional part (including leading and
11655 trailing zeros).
11656 Note that for interval filters, it's best to use the hexadecimal
11657 form, because the revision is stored as a 16 bit packed BCD value;
11658 so the expression <tt>int:0x0100-0x0199</tt> will match any
11659 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11660 </desc>
11661 </attribute>
11662
11663 <attribute name="manufacturer" type="wstring">
11664 <desc>
11665 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11666 </desc>
11667 </attribute>
11668
11669 <attribute name="product" type="wstring">
11670 <desc>
11671 <link to="IUSBDevice::product">Product</link> filter.
11672 </desc>
11673 </attribute>
11674
11675 <attribute name="serialNumber" type="wstring">
11676 <desc>
11677 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11678 </desc>
11679 </attribute>
11680
11681 <attribute name="port" type="wstring">
11682 <desc>
11683 <link to="IUSBDevice::port">Host USB port</link> filter.
11684 </desc>
11685 </attribute>
11686
11687 <attribute name="remote" type="wstring">
11688 <desc>
11689 <link to="IUSBDevice::remote">Remote state</link> filter.
11690 <note>
11691 This filter makes sense only for machine USB filters,
11692 i.e. it is ignored by IHostUSBDeviceFilter objects.
11693 </note>
11694 </desc>
11695 </attribute>
11696
11697 <attribute name="maskedInterfaces" type="unsigned long">
11698 <desc>
11699 This is an advanced option for hiding one or more USB interfaces
11700 from the guest. The value is a bit mask where the bits that are set
11701 means the corresponding USB interface should be hidden, masked off
11702 if you like.
11703 This feature only works on Linux hosts.
11704 </desc>
11705 </attribute>
11706
11707 </interface>
11708
11709
11710 <!--
11711 // IHostUSBDevice
11712 /////////////////////////////////////////////////////////////////////////
11713 -->
11714
11715 <enum
11716 name="USBDeviceState"
11717 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11718 >
11719 <desc>
11720 USB device state. This enumeration represents all possible states
11721 of the USB device physically attached to the host computer regarding
11722 its state on the host computer and availability to guest computers
11723 (all currently running virtual machines).
11724
11725 Once a supported USB device is attached to the host, global USB
11726 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11727 either ignore the device, or put it to USBDeviceState_Held state, or do
11728 nothing. Unless the device is ignored by global filters, filters of all
11729 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11730 activated that can put it to USBDeviceState_Captured state.
11731
11732 If the device was ignored by global filters, or didn't match
11733 any filters at all (including guest ones), it is handled by the host
11734 in a normal way. In this case, the device state is determined by
11735 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11736 or USBDeviceState_Available, depending on the current device usage.
11737
11738 Besides auto-capturing based on filters, the device can be manually
11739 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11740 state is USBDeviceState_Busy, USBDeviceState_Available or
11741 USBDeviceState_Held.
11742
11743 <note>
11744 Due to differences in USB stack implementations in Linux and Win32,
11745 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11746 only to the Linux version of the product. This also means that (<link
11747 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11748 device state is USBDeviceState_Held.
11749 </note>
11750
11751 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11752 </desc>
11753
11754 <const name="NotSupported" value="0">
11755 <desc>
11756 Not supported by the VirtualBox server, not available to guests.
11757 </desc>
11758 </const>
11759 <const name="Unavailable" value="1">
11760 <desc>
11761 Being used by the host computer exclusively,
11762 not available to guests.
11763 </desc>
11764 </const>
11765 <const name="Busy" value="2">
11766 <desc>
11767 Being used by the host computer, potentially available to guests.
11768 </desc>
11769 </const>
11770 <const name="Available" value="3">
11771 <desc>
11772 Not used by the host computer, available to guests (the host computer
11773 can also start using the device at any time).
11774 </desc>
11775 </const>
11776 <const name="Held" value="4">
11777 <desc>
11778 Held by the VirtualBox server (ignored by the host computer),
11779 available to guests.
11780 </desc>
11781 </const>
11782 <const name="Captured" value="5">
11783 <desc>
11784 Captured by one of the guest computers, not available
11785 to anybody else.
11786 </desc>
11787 </const>
11788 </enum>
11789
11790 <interface
11791 name="IHostUSBDevice" extends="IUSBDevice"
11792 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11793 wsmap="managed"
11794 >
11795 <desc>
11796 The IHostUSBDevice interface represents a physical USB device attached
11797 to the host computer.
11798
11799 Besides properties inherited from IUSBDevice, this interface adds the
11800 <link to="#state"/> property that holds the current state of the USB
11801 device.
11802
11803 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11804 </desc>
11805
11806 <attribute name="state" type="USBDeviceState" readonly="yes">
11807 <desc>
11808 Current state of the device.
11809 </desc>
11810 </attribute>
11811
11812 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11813
11814 </interface>
11815
11816
11817 <!--
11818 // IHostUSBDeviceFilter
11819 /////////////////////////////////////////////////////////////////////////
11820 -->
11821
11822 <enum
11823 name="USBDeviceFilterAction"
11824 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11825 >
11826 <desc>
11827 Actions for host USB device filters.
11828 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11829 </desc>
11830
11831 <const name="Null" value="0">
11832 <desc>Null value (never used by the API).</desc>
11833 </const>
11834 <const name="Ignore" value="1">
11835 <desc>Ignore the matched USB device.</desc>
11836 </const>
11837 <const name="Hold" value="2">
11838 <desc>Hold the matched USB device.</desc>
11839 </const>
11840 </enum>
11841
11842 <interface
11843 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11844 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11845 wsmap="managed"
11846 >
11847 <desc>
11848 The IHostUSBDeviceFilter interface represents a global filter for a
11849 physical USB device used by the host computer. Used indirectly in
11850 <link to="IHost::USBDeviceFilters"/>.
11851
11852 Using filters of this type, the host computer determines the initial
11853 state of the USB device after it is physically attached to the
11854 host's USB controller.
11855
11856 <note>
11857 The <link to="#remote"/> attribute is ignored by this type of
11858 filters, because it makes sense only for
11859 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11860 </note>
11861
11862 <see>IHost::USBDeviceFilters</see>
11863 </desc>
11864
11865 <attribute name="action" type="USBDeviceFilterAction">
11866 <desc>
11867 Action performed by the host when an attached USB device
11868 matches this filter.
11869 </desc>
11870 </attribute>
11871
11872 </interface>
11873
11874 <!--
11875 // IAudioAdapter
11876 /////////////////////////////////////////////////////////////////////////
11877 -->
11878
11879 <enum
11880 name="AudioDriverType"
11881 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11882 >
11883 <desc>
11884 Host audio driver type.
11885 </desc>
11886
11887 <const name="Null" value="0">
11888 <desc>Null value, also means "dummy audio driver".</desc>
11889 </const>
11890 <const name="WinMM" value="1"/>
11891 <const name="OSS" value="2"/>
11892 <const name="ALSA" value="3"/>
11893 <const name="DirectSound" value="4"/>
11894 <const name="CoreAudio" value="5"/>
11895 <const name="MMPM" value="6"/>
11896 <const name="Pulse" value="7"/>
11897 <const name="SolAudio" value="8"/>
11898 </enum>
11899
11900 <enum
11901 name="AudioControllerType"
11902 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11903 >
11904 <desc>
11905 Virtual audio controller type.
11906 </desc>
11907
11908 <const name="AC97" value="0"/>
11909 <const name="SB16" value="1"/>
11910 </enum>
11911
11912 <interface
11913 name="IAudioAdapter" extends="$unknown"
11914 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11915 wsmap="managed"
11916 >
11917 <desc>
11918 The IAudioAdapter interface represents the virtual audio adapter of
11919 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11920 </desc>
11921 <attribute name="enabled" type="boolean">
11922 <desc>
11923 Flag whether the audio adapter is present in the
11924 guest system. If disabled, the virtual guest hardware will
11925 not contain any audio adapter. Can only be changed when
11926 the VM is not running.
11927 </desc>
11928 </attribute>
11929 <attribute name="audioController" type="AudioControllerType">
11930 <desc>
11931 The audio hardware we emulate.
11932 </desc>
11933 </attribute>
11934 <attribute name="audioDriver" type="AudioDriverType">
11935 <desc>
11936 Audio driver the adapter is connected to. This setting
11937 can only be changed when the VM is not running.
11938 </desc>
11939 </attribute>
11940 </interface>
11941
11942 <!--
11943 // IVRDPServer
11944 /////////////////////////////////////////////////////////////////////////
11945 -->
11946
11947 <enum
11948 name="VRDPAuthType"
11949 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11950 >
11951 <desc>
11952 VRDP authentication type.
11953 </desc>
11954
11955 <const name="Null" value="0">
11956 <desc>Null value, also means "no authentication".</desc>
11957 </const>
11958 <const name="External" value="1"/>
11959 <const name="Guest" value="2"/>
11960 </enum>
11961
11962 <interface
11963 name="IVRDPServer" extends="$unknown"
11964 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11965 wsmap="managed"
11966 >
11967 <attribute name="enabled" type="boolean">
11968 <desc>VRDP server status.</desc>
11969 </attribute>
11970
11971 <attribute name="port" type="unsigned long">
11972 <desc>
11973 VRDP server port number.
11974 <note>
11975 Setting the value of this property to <tt>0</tt> will reset the port
11976 number to the default value which is
11977 currently <tt>3389</tt>. Reading this property will always return a
11978 real port number, even after it has been set to <tt>0</tt> (in which
11979 case the default port is returned).
11980 </note>
11981 </desc>
11982 </attribute>
11983
11984 <attribute name="netAddress" type="wstring">
11985 <desc>VRDP server address.</desc>
11986 </attribute>
11987
11988 <attribute name="authType" type="VRDPAuthType">
11989 <desc>VRDP authentication method.</desc>
11990 </attribute>
11991
11992 <attribute name="authTimeout" type="unsigned long">
11993 <desc>Timeout for guest authentication. Milliseconds.</desc>
11994 </attribute>
11995
11996 <attribute name="allowMultiConnection" type="boolean">
11997 <desc>
11998 Flag whether multiple simultaneous connections to the VM are permitted.
11999 Note that this will be replaced by a more powerful mechanism in the future.
12000 </desc>
12001 </attribute>
12002
12003 <attribute name="reuseSingleConnection" type="boolean">
12004 <desc>
12005 Flag whether the existing connection must be dropped and a new connection
12006 must be established by the VRDP server, when a new client connects in single
12007 connection mode.
12008 </desc>
12009 </attribute>
12010
12011 </interface>
12012
12013
12014 <!--
12015 // ISharedFolder
12016 /////////////////////////////////////////////////////////////////////////
12017 -->
12018
12019 <interface
12020 name="ISharedFolder" extends="$unknown"
12021 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12022 wsmap="struct"
12023 >
12024 <desc>
12025 The ISharedFolder interface represents a folder in the host computer's
12026 file system accessible from the guest OS running inside a virtual
12027 machine using an associated logical name.
12028
12029 There are three types of shared folders:
12030 <ul>
12031 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12032 folders available to all virtual machines.</li>
12033 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12034 VM-specific shared folders available to the given virtual machine at
12035 startup.</li>
12036 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12037 VM-specific shared folders created in the session context (for
12038 example, when the virtual machine is running) and automatically
12039 discarded when the session is closed (the VM is powered off).</li>
12040 </ul>
12041
12042 Logical names of shared folders must be unique within the given scope
12043 (global, permanent or transient). However, they do not need to be unique
12044 across scopes. In this case, the definition of the shared folder in a
12045 more specific scope takes precedence over definitions in all other
12046 scopes. The order of precedence is (more specific to more general):
12047 <ol>
12048 <li>Transient definitions</li>
12049 <li>Permanent definitions</li>
12050 <li>Global definitions</li>
12051 </ol>
12052
12053 For example, if MyMachine has a shared folder named
12054 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12055 transient shared folder named <tt>C_DRIVE</tt> (that points
12056 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12057 of <tt>C_DRIVE</tt> in the guest OS so
12058 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12059 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12060 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12061 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12062 to <tt>C:\\</tt> if it still exists.
12063
12064 Note that permanent and transient shared folders of different machines
12065 are in different name spaces, so they don't overlap and don't need to
12066 have unique logical names.
12067
12068 <note>
12069 Global shared folders are not implemented in the current version of the
12070 product.
12071 </note>
12072 </desc>
12073
12074 <attribute name="name" type="wstring" readonly="yes">
12075 <desc>Logical name of the shared folder.</desc>
12076 </attribute>
12077
12078 <attribute name="hostPath" type="wstring" readonly="yes">
12079 <desc>Full path to the shared folder in the host file system.</desc>
12080 </attribute>
12081
12082 <attribute name="accessible" type="boolean" readonly="yes">
12083 <desc>
12084 Whether the folder defined by the host path is currently
12085 accessible or not.
12086 For example, the folder can be unaccessible if it is placed
12087 on the network share that is not available by the time
12088 this property is read.
12089 </desc>
12090 </attribute>
12091
12092 <attribute name="writable" type="boolean" readonly="yes">
12093 <desc>
12094 Whether the folder defined by the host path is writable or
12095 not.
12096 </desc>
12097 </attribute>
12098
12099 <attribute name="lastAccessError" type="wstring" readonly="yes">
12100 <desc>
12101 Text message that represents the result of the last accessibility
12102 check.
12103
12104 Accessibility checks are performed each time the <link to="#accessible"/>
12105 attribute is read. An empty string is returned if the last
12106 accessibility check was successful. A non-empty string indicates a
12107 failure and should normally describe a reason of the failure (for
12108 example, a file read error).
12109 </desc>
12110 </attribute>
12111
12112 </interface>
12113
12114 <!--
12115 // ISession
12116 /////////////////////////////////////////////////////////////////////////
12117 -->
12118
12119 <interface
12120 name="IInternalSessionControl" extends="$unknown"
12121 uuid="b26552e7-9534-4f47-b766-98eac648a90d"
12122 internal="yes"
12123 wsmap="suppress"
12124 >
12125 <method name="getPID">
12126 <desc>PID of the process that has created this Session object.
12127 </desc>
12128 <param name="pid" type="unsigned long" dir="return"/>
12129 </method>
12130
12131 <method name="getRemoteConsole">
12132 <desc>
12133 Returns the console object suitable for remote control.
12134
12135 <result name="VBOX_E_INVALID_VM_STATE">
12136 Session state prevents operation.
12137 </result>
12138 <result name="VBOX_E_INVALID_OBJECT_STATE">
12139 Session type prevents operation.
12140 </result>
12141
12142 </desc>
12143 <param name="console" type="IConsole" dir="return"/>
12144 </method>
12145
12146 <method name="assignMachine">
12147 <desc>
12148 Assigns the machine object associated with this direct-type
12149 session or informs the session that it will be a remote one
12150 (if @a machine == @c null).
12151
12152 <result name="VBOX_E_INVALID_VM_STATE">
12153 Session state prevents operation.
12154 </result>
12155 <result name="VBOX_E_INVALID_OBJECT_STATE">
12156 Session type prevents operation.
12157 </result>
12158
12159 </desc>
12160 <param name="machine" type="IMachine" dir="in"/>
12161 </method>
12162
12163 <method name="assignRemoteMachine">
12164 <desc>
12165 Assigns the machine and the (remote) console object associated with
12166 this remote-type session.
12167
12168 <result name="VBOX_E_INVALID_VM_STATE">
12169 Session state prevents operation.
12170 </result>
12171
12172 </desc>
12173 <param name="machine" type="IMachine" dir="in"/>
12174 <param name="console" type="IConsole" dir="in"/>
12175 </method>
12176
12177 <method name="updateMachineState">
12178 <desc>
12179 Updates the machine state in the VM process.
12180 Must be called only in certain cases
12181 (see the method implementation).
12182
12183 <result name="VBOX_E_INVALID_VM_STATE">
12184 Session state prevents operation.
12185 </result>
12186 <result name="VBOX_E_INVALID_OBJECT_STATE">
12187 Session type prevents operation.
12188 </result>
12189
12190 </desc>
12191 <param name="aMachineState" type="MachineState" dir="in"/>
12192 </method>
12193
12194 <method name="uninitialize">
12195 <desc>
12196 Uninitializes (closes) this session. Used by VirtualBox to close
12197 the corresponding remote session when the direct session dies
12198 or gets closed.
12199
12200 <result name="VBOX_E_INVALID_VM_STATE">
12201 Session state prevents operation.
12202 </result>
12203
12204 </desc>
12205 </method>
12206
12207 <method name="onDVDDriveChange">
12208 <desc>
12209 Triggered when settings of the DVD drive object of the
12210 associated virtual machine have changed.
12211
12212 <result name="VBOX_E_INVALID_VM_STATE">
12213 Session state prevents operation.
12214 </result>
12215 <result name="VBOX_E_INVALID_OBJECT_STATE">
12216 Session type prevents operation.
12217 </result>
12218
12219 </desc>
12220 </method>
12221
12222 <method name="onFloppyDriveChange">
12223 <desc>
12224 Triggered when settings of the floppy drive object of the
12225 associated virtual machine have changed.
12226
12227 <result name="VBOX_E_INVALID_VM_STATE">
12228 Session state prevents operation.
12229 </result>
12230 <result name="VBOX_E_INVALID_OBJECT_STATE">
12231 Session type prevents operation.
12232 </result>
12233
12234 </desc>
12235 </method>
12236
12237 <method name="onNetworkAdapterChange">
12238 <desc>
12239 Triggered when settings of a network adapter of the
12240 associated virtual machine have changed.
12241
12242 <result name="VBOX_E_INVALID_VM_STATE">
12243 Session state prevents operation.
12244 </result>
12245 <result name="VBOX_E_INVALID_OBJECT_STATE">
12246 Session type prevents operation.
12247 </result>
12248
12249 </desc>
12250 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12251 </method>
12252
12253 <method name="onSerialPortChange">
12254 <desc>
12255 Triggered when settings of a serial port of the
12256 associated virtual machine have changed.
12257
12258 <result name="VBOX_E_INVALID_VM_STATE">
12259 Session state prevents operation.
12260 </result>
12261 <result name="VBOX_E_INVALID_OBJECT_STATE">
12262 Session type prevents operation.
12263 </result>
12264
12265 </desc>
12266 <param name="serialPort" type="ISerialPort" dir="in"/>
12267 </method>
12268
12269 <method name="onParallelPortChange">
12270 <desc>
12271 Triggered when settings of a parallel port of the
12272 associated virtual machine have changed.
12273
12274 <result name="VBOX_E_INVALID_VM_STATE">
12275 Session state prevents operation.
12276 </result>
12277 <result name="VBOX_E_INVALID_OBJECT_STATE">
12278 Session type prevents operation.
12279 </result>
12280
12281 </desc>
12282 <param name="parallelPort" type="IParallelPort" dir="in"/>
12283 </method>
12284
12285 <method name="onStorageControllerChange">
12286 <desc>
12287 Triggered when settings of a storage controller of the
12288 associated virtual machine have changed.
12289
12290 <result name="VBOX_E_INVALID_VM_STATE">
12291 Session state prevents operation.
12292 </result>
12293 <result name="VBOX_E_INVALID_OBJECT_STATE">
12294 Session type prevents operation.
12295 </result>
12296
12297 </desc>
12298 </method>
12299
12300 <method name="onVRDPServerChange">
12301 <desc>
12302 Triggered when settings of the VRDP server object of the
12303 associated virtual machine have changed.
12304
12305 <result name="VBOX_E_INVALID_VM_STATE">
12306 Session state prevents operation.
12307 </result>
12308 <result name="VBOX_E_INVALID_OBJECT_STATE">
12309 Session type prevents operation.
12310 </result>
12311
12312 </desc>
12313 </method>
12314
12315 <method name="onUSBControllerChange">
12316 <desc>
12317 Triggered when settings of the USB controller object of the
12318 associated virtual machine have changed.
12319
12320 <result name="VBOX_E_INVALID_VM_STATE">
12321 Session state prevents operation.
12322 </result>
12323 <result name="VBOX_E_INVALID_OBJECT_STATE">
12324 Session type prevents operation.
12325 </result>
12326
12327 </desc>
12328 </method>
12329
12330 <method name="onSharedFolderChange">
12331 <desc>
12332 Triggered when a permanent (global or machine) shared folder has been
12333 created or removed.
12334 <note>
12335 We don't pass shared folder parameters in this notification because
12336 the order in which parallel notifications are delivered is not defined,
12337 therefore it could happen that these parameters were outdated by the
12338 time of processing this notification.
12339 </note>
12340
12341 <result name="VBOX_E_INVALID_VM_STATE">
12342 Session state prevents operation.
12343 </result>
12344 <result name="VBOX_E_INVALID_OBJECT_STATE">
12345 Session type prevents operation.
12346 </result>
12347
12348 </desc>
12349 <param name="global" type="boolean" dir="in"/>
12350 </method>
12351
12352 <method name="onUSBDeviceAttach">
12353 <desc>
12354 Triggered when a request to capture a USB device (as a result
12355 of matched USB filters or direct call to
12356 <link to="IConsole::attachUSBDevice"/>) has completed.
12357 A @c null @a error object means success, otherwise it
12358 describes a failure.
12359
12360 <result name="VBOX_E_INVALID_VM_STATE">
12361 Session state prevents operation.
12362 </result>
12363 <result name="VBOX_E_INVALID_OBJECT_STATE">
12364 Session type prevents operation.
12365 </result>
12366
12367 </desc>
12368 <param name="device" type="IUSBDevice" dir="in"/>
12369 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12370 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12371 </method>
12372
12373 <method name="onUSBDeviceDetach">
12374 <desc>
12375 Triggered when a request to release the USB device (as a result
12376 of machine termination or direct call to
12377 <link to="IConsole::detachUSBDevice"/>) has completed.
12378 A @c null @a error object means success, otherwise it
12379 describes a failure.
12380
12381 <result name="VBOX_E_INVALID_VM_STATE">
12382 Session state prevents operation.
12383 </result>
12384 <result name="VBOX_E_INVALID_OBJECT_STATE">
12385 Session type prevents operation.
12386 </result>
12387
12388 </desc>
12389 <param name="id" type="wstring" dir="in"/>
12390 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12391 </method>
12392
12393 <method name="onShowWindow">
12394 <desc>
12395 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12396 <link to="IMachine::showConsoleWindow"/> in order to notify
12397 console callbacks
12398 <link to="IConsoleCallback::onCanShowWindow"/>
12399 and <link to="IConsoleCallback::onShowWindow"/>.
12400
12401 <result name="VBOX_E_INVALID_OBJECT_STATE">
12402 Session type prevents operation.
12403 </result>
12404
12405 </desc>
12406 <param name="check" type="boolean" dir="in"/>
12407 <param name="canShow" type="boolean" dir="out"/>
12408 <param name="winId" type="unsigned long long" dir="out"/>
12409 </method>
12410
12411 <method name="accessGuestProperty">
12412 <desc>
12413 Called by <link to="IMachine::getGuestProperty"/> and by
12414 <link to="IMachine::setGuestProperty"/> in order to read and
12415 modify guest properties.
12416
12417 <result name="VBOX_E_INVALID_VM_STATE">
12418 Machine session is not open.
12419 </result>
12420 <result name="VBOX_E_INVALID_OBJECT_STATE">
12421 Session type is not direct.
12422 </result>
12423
12424 </desc>
12425 <param name="name" type="wstring" dir="in"/>
12426 <param name="value" type="wstring" dir="in"/>
12427 <param name="flags" type="wstring" dir="in"/>
12428 <param name="isSetter" type="boolean" dir="in"/>
12429 <param name="retValue" type="wstring" dir="out"/>
12430 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12431 <param name="retFlags" type="wstring" dir="out"/>
12432 </method>
12433
12434 <method name="enumerateGuestProperties">
12435 <desc>
12436 Return a list of the guest properties matching a set of patterns along
12437 with their values, time stamps and flags.
12438
12439 <result name="VBOX_E_INVALID_VM_STATE">
12440 Machine session is not open.
12441 </result>
12442 <result name="VBOX_E_INVALID_OBJECT_STATE">
12443 Session type is not direct.
12444 </result>
12445
12446 </desc>
12447 <param name="patterns" type="wstring" dir="in">
12448 <desc>
12449 The patterns to match the properties against as a comma-separated
12450 string. If this is empty, all properties currently set will be
12451 returned.
12452 </desc>
12453 </param>
12454 <param name="key" type="wstring" dir="out" safearray="yes">
12455 <desc>
12456 The key names of the properties returned.
12457 </desc>
12458 </param>
12459 <param name="value" type="wstring" dir="out" safearray="yes">
12460 <desc>
12461 The values of the properties returned. The array entries match the
12462 corresponding entries in the @a key array.
12463 </desc>
12464 </param>
12465 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12466 <desc>
12467 The time stamps of the properties returned. The array entries match
12468 the corresponding entries in the @a key array.
12469 </desc>
12470 </param>
12471 <param name="flags" type="wstring" dir="out" safearray="yes">
12472 <desc>
12473 The flags of the properties returned. The array entries match the
12474 corresponding entries in the @a key array.
12475 </desc>
12476 </param>
12477 </method>
12478
12479 </interface>
12480
12481 <interface
12482 name="ISession" extends="$dispatched"
12483 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12484 wsmap="managed"
12485 >
12486 <desc>
12487 The ISession interface represents a serialization primitive for virtual
12488 machines.
12489
12490 With VirtualBox, every time one wishes to manipulate a virtual machine
12491 (e.g. change its settings or start execution), a session object is
12492 required. Such an object must be passed to one of the session methods
12493 that open the given session, which then initiates the machine manipulation.
12494
12495 A session serves several purposes: it identifies to the inter-process VirtualBox
12496 code which process is currently working with the virtual machine, and it ensures
12497 that there are no incompatible requests from several processes for the
12498 same virtual machine. Session objects can therefore be thought of as mutex
12499 semaphores that lock virtual machines to prevent conflicting accesses from
12500 several processes.
12501
12502 How sessions objects are used depends on whether you use the Main API
12503 via COM or via the webservice:
12504
12505 <ul>
12506 <li>When using the COM API directly, an object of the Session class from the
12507 VirtualBox type library needs to be created. In regular COM C++ client code,
12508 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12509 This object will then act as a local session object in further calls to open
12510 a session.
12511 </li>
12512
12513 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12514 one session object automatically when <link to="IWebsessionManager::logon" />
12515 is called. A managed object reference to that session object can be retrieved by
12516 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12517 reference can then be used to open sessions.
12518 </li>
12519 </ul>
12520
12521 Sessions are mainly used in two variations:
12522
12523 <ul>
12524 <li>
12525 To start a virtual machine in a separate process, one would call
12526 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12527 object as its first parameter. This session then identifies the caller
12528 and lets him control the started machine (for example, pause machine
12529 execution or power it down) as well as be notified about machine
12530 execution state changes.
12531 </li>
12532
12533 <li>To alter machine settings, or to start machine execution within the
12534 current process, one needs to open a direct session for the machine first by
12535 calling <link to="IVirtualBox::openSession"/>. While a direct session
12536 is open within one process, no any other process may open another direct
12537 session for the same machine. This prevents the machine from being changed
12538 by other processes while it is running or while the machine is being configured.
12539 </li>
12540 </ul>
12541
12542 One also can attach to an existing direct session already opened by
12543 another process (for example, in order to send a control request to the
12544 virtual machine such as the pause or the reset request). This is done by
12545 calling <link to="IVirtualBox::openExistingSession"/>.
12546
12547 <note>
12548 Unless you are trying to write a new VirtualBox front-end that
12549 performs direct machine execution (like the VirtualBox or VBoxSDL
12550 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12551 session opened by <link to="IVirtualBox::openSession"/> and use this
12552 session only to change virtual machine settings. If you simply want to
12553 start virtual machine execution using one of the existing front-ends
12554 (for example the VirtualBox GUI or headless server), simply use
12555 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12556 will power up the machine automatically for you.
12557 </note>
12558 </desc>
12559
12560 <attribute name="state" type="SessionState" readonly="yes">
12561 <desc>Current state of this session.</desc>
12562 </attribute>
12563
12564 <attribute name="type" type="SessionType" readonly="yes">
12565 <desc>
12566 Type of this session. The value of this attribute is valid only
12567 if the session is currently open (i.e. its #state is
12568 SessionType_SessionOpen), otherwise an error will be returned.
12569 </desc>
12570 </attribute>
12571
12572 <attribute name="machine" type="IMachine" readonly="yes">
12573 <desc>Machine object associated with this session.</desc>
12574 </attribute>
12575
12576 <attribute name="console" type="IConsole" readonly="yes">
12577 <desc>Console object associated with this session.</desc>
12578 </attribute>
12579
12580 <method name="close">
12581 <desc>
12582 Closes a session that was previously opened.
12583
12584 It is recommended that every time an "open session" method (such as
12585 <link to="IVirtualBox::openRemoteSession" /> or
12586 <link to="IVirtualBox::openSession" />) has been called to
12587 manipulate a virtual machine, the caller invoke
12588 ISession::close() when it's done doing so. Since sessions are
12589 serialization primitives much like ordinary mutexes, they are
12590 best used the same way: for each "open" call, there should be
12591 a matching "close" call, even when errors occur.
12592
12593 Otherwise, if a direct session for a machine opened with
12594 <link to="IVirtualBox::openSession"/> is not explicitly closed
12595 when the application terminates, the state of the machine will
12596 be set to <link to="MachineState_Aborted" /> on the server.
12597
12598 Generally, it is recommended to close all open sessions explicitly
12599 before terminating the application (regardless of the reason for
12600 the termination).
12601
12602 <note>
12603 Do not expect the session state (<link to="ISession::state" />
12604 to return to "Closed" immediately after you invoke
12605 ISession::close(), particularly if you have started a remote
12606 session to execute the VM in a new process. The session state will
12607 automatically return to "Closed" once the VM is no longer executing,
12608 which can of course take a very long time.
12609 </note>
12610
12611 <result name="E_UNEXPECTED">
12612 Session is not open.
12613 </result>
12614
12615 </desc>
12616 </method>
12617
12618 </interface>
12619
12620 <!--
12621 // IStorageController
12622 /////////////////////////////////////////////////////////////////////////
12623 -->
12624
12625 <enum
12626 name="StorageBus"
12627 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12628 >
12629 <desc>
12630 The connection type of the storage controller.
12631 </desc>
12632 <const name="Null" value="0">
12633 <desc>@c null value. Never used by the API.</desc>
12634 </const>
12635 <const name="IDE" value="1"/>
12636 <const name="SATA" value="2"/>
12637 <const name="SCSI" value="3"/>
12638 </enum>
12639
12640 <enum
12641 name="StorageControllerType"
12642 uuid="685387db-a837-4320-a258-08f46a22f62a"
12643 >
12644 <desc>
12645 Storage controller type.
12646 </desc>
12647
12648 <const name="Null" value="0">
12649 <desc>@c null value. Never used by the API.</desc>
12650 </const>
12651 <const name="LsiLogic" value="1"/>
12652 <const name="BusLogic" value="2"/>
12653 <const name="IntelAhci" value="3"/>
12654 <const name="PIIX3" value="4"/>
12655 <const name="PIIX4" value="5"/>
12656 <const name="ICH6" value="6"/>
12657 </enum>
12658
12659 <interface
12660 name="IStorageController" extends="$unknown"
12661 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12662 wsmap="managed"
12663 >
12664 <desc>
12665 Represents a storage controller that is attached to a virtual machine
12666 (<link to="IMachine" />). Just as hard disks are attached to storage
12667 controllers in a real computer, virtual hard disks (represented by
12668 <link to="IHardDisk" />) are attached to virtual storage controllers,
12669 represented by this interface.
12670
12671 VirtualBox supports three types of virtual storage controller hardware:
12672 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12673 these three is used, certain sub-types are available and can be
12674 selected in <link to="#controllerType" />.
12675 </desc>
12676
12677 <attribute name="name" type="wstring" readonly="yes">
12678 <desc>
12679 Name of the storage controller, as originally specified with
12680 <link to="IMachine::addStorageController" />. This then uniquely
12681 identifies this controller with other method calls such as
12682 <link to="IMachine::attachHardDisk" />.
12683 </desc>
12684 </attribute>
12685
12686 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12687 <desc>
12688 Maximum number of devices which can be attached to one port.
12689 </desc>
12690 </attribute>
12691
12692 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12693 <desc>
12694 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12695 </desc>
12696 </attribute>
12697
12698 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12699 <desc>
12700 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12701 </desc>
12702 </attribute>
12703
12704 <attribute name="instance" type="unsigned long">
12705 <desc>
12706 The instance number of the device in the running VM.
12707 </desc>
12708 </attribute>
12709
12710 <attribute name="portCount" type="unsigned long">
12711 <desc>
12712 The number of currently usable ports on the controller.
12713 The minimum and maximum number of ports for one controller are
12714 stored in <link to="IStorageController::minPortCount"/>
12715 and <link to="IStorageController::maxPortCount"/>.
12716 </desc>
12717 </attribute>
12718
12719 <attribute name="bus" type="StorageBus" readonly="yes">
12720 <desc>
12721 The connection type of the storage controller.
12722 </desc>
12723 </attribute>
12724
12725 <attribute name="controllerType" type="StorageControllerType">
12726 <desc>
12727 Type of the virtual storage controller. Depending on this value,
12728 VirtualBox will provide a different virtual storage controller hardware
12729 to the guest.
12730
12731 For SCSI controllers, the default type is LsiLogic.
12732 </desc>
12733 </attribute>
12734
12735 <method name="GetIDEEmulationPort">
12736 <desc>
12737 Gets the corresponding port number which is emulated as an IDE device.
12738
12739 <result name="E_INVALIDARG">
12740 The @a devicePosition is not in the range 0 to 3.
12741 </result>
12742 <result name="E_NOTIMPL">
12743 The storage controller type is not SATAIntelAhci.
12744 </result>
12745
12746 </desc>
12747 <param name="devicePosition" type="long" dir="in"/>
12748 <param name="portNumber" type="long" dir="return"/>
12749 </method>
12750
12751 <method name="SetIDEEmulationPort">
12752 <desc>
12753 Sets the port number which is emulated as an IDE device.
12754
12755 <result name="E_INVALIDARG">
12756 The @a devicePosition is not in the range 0 to 3 or the
12757 @a portNumber is not in the range 0 to 29.
12758 </result>
12759 <result name="E_NOTIMPL">
12760 The storage controller type is not SATAIntelAhci.
12761 </result>
12762
12763 </desc>
12764 <param name="devicePosition" type="long" dir="in"/>
12765 <param name="portNumber" type="long" dir="in"/>
12766 </method>
12767
12768 </interface>
12769
12770<if target="wsdl">
12771
12772 <!--
12773 // IManagedObjectRef
12774 /////////////////////////////////////////////////////////////////////////
12775 -->
12776
12777 <interface
12778 name="IManagedObjectRef" extends="$unknown"
12779 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12780 internal="yes"
12781 wsmap="managed"
12782 wscpp="hardcoded"
12783 >
12784 <desc>
12785 Managed object reference.
12786
12787 Only within the webservice, a managed object reference (which is really
12788 an opaque number) allows a webservice client to address an object
12789 that lives in the address space of the webservice server.
12790
12791 Behind each managed object reference, there is a COM object that lives
12792 in the webservice server's address space. The COM object is not freed
12793 until the managed object reference is released, either by an explicit
12794 call to <link to="IManagedObjectRef::release" /> or by logging off from
12795 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12796 all objects created during the webservice session.
12797
12798 Whenever a method call of the VirtualBox API returns a COM object, the
12799 webservice representation of that method will instead return a
12800 managed object reference, which can then be used to invoke methods
12801 on that object.
12802 </desc>
12803
12804 <method name="getInterfaceName">
12805 <desc>
12806 Returns the name of the interface that this managed object represents,
12807 for example, "IMachine", as a string.
12808 </desc>
12809 <param name="return" type="wstring" dir="return"/>
12810 </method>
12811
12812 <method name="release">
12813 <desc>
12814 Releases this managed object reference and frees the resources that
12815 were allocated for it in the webservice server process. After calling
12816 this method, the identifier of the reference can no longer be used.
12817 </desc>
12818 </method>
12819
12820 </interface>
12821
12822 <!--
12823 // IWebsessionManager
12824 /////////////////////////////////////////////////////////////////////////
12825 -->
12826
12827 <interface
12828 name="IWebsessionManager" extends="$unknown"
12829 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12830 internal="yes"
12831 wsmap="global"
12832 wscpp="hardcoded"
12833 >
12834 <desc>
12835 Websession manager. This provides essential services
12836 to webservice clients.
12837 </desc>
12838 <method name="logon">
12839 <desc>
12840 Logs a new client onto the webservice and returns a managed object reference to
12841 the IVirtualBox instance, which the client can then use as a basis to further
12842 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12843 interface, in one way or the other.
12844 </desc>
12845 <param name="username" type="wstring" dir="in"/>
12846 <param name="password" type="wstring" dir="in"/>
12847 <param name="return" type="IVirtualBox" dir="return"/>
12848 </method>
12849
12850 <method name="getSessionObject">
12851 <desc>
12852 Returns a managed object reference to the internal ISession object that was created
12853 for this web service session when the client logged on.
12854
12855 <see>ISession</see>
12856 </desc>
12857 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12858 <param name="return" type="ISession" dir="return"/>
12859 </method>
12860
12861 <method name="logoff">
12862 <desc>
12863 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12864 and destroys all resources associated with the session (most importantly, all
12865 managed objects created in the server while the session was active).
12866 </desc>
12867 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12868 </method>
12869
12870 </interface>
12871
12872</if>
12873
12874 <!--
12875 // IPerformanceCollector & friends
12876 /////////////////////////////////////////////////////////////////////////
12877 -->
12878
12879 <interface
12880 name="IPerformanceMetric" extends="$unknown"
12881 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12882 >
12883 <desc>
12884 The IPerformanceMetric interface represents parameters of the given
12885 performance metric.
12886 </desc>
12887
12888 <attribute name="metricName" type="wstring" readonly="yes">
12889 <desc>
12890 Name of the metric.
12891 </desc>
12892 </attribute>
12893
12894 <attribute name="object" type="$unknown" readonly="yes">
12895 <desc>
12896 Object this metric belongs to.
12897 </desc>
12898 </attribute>
12899
12900 <attribute name="description" type="wstring" readonly="yes">
12901 <desc>
12902 Textual description of the metric.
12903 </desc>
12904 </attribute>
12905
12906 <attribute name="period" type="unsigned long" readonly="yes">
12907 <desc>
12908 Time interval between samples, measured in seconds.
12909 </desc>
12910 </attribute>
12911
12912 <attribute name="count" type="unsigned long" readonly="yes">
12913 <desc>
12914 Number of recent samples retained by the performance collector for this
12915 metric.
12916
12917 When the collected sample count exceeds this number, older samples
12918 are discarded.
12919 </desc>
12920 </attribute>
12921
12922 <attribute name="unit" type="wstring" readonly="yes">
12923 <desc>
12924 Unit of measurement.
12925 </desc>
12926 </attribute>
12927
12928 <attribute name="minimumValue" type="long" readonly="yes">
12929 <desc>
12930 Minimum possible value of this metric.
12931 </desc>
12932 </attribute>
12933
12934 <attribute name="maximumValue" type="long" readonly="yes">
12935 <desc>
12936 Maximum possible value of this metric.
12937 </desc>
12938 </attribute>
12939 </interface>
12940
12941 <interface
12942 name="IPerformanceCollector" extends="$unknown"
12943 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12944 wsmap="managed"
12945 >
12946 <desc>
12947 The IPerformanceCollector interface represents a service that collects and
12948 stores performance metrics data.
12949
12950 Performance metrics are associated with objects of interfaces like IHost and
12951 IMachine. Each object has a distinct set of performance metrics.
12952 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12953
12954 Metric data is collected at the specified intervals and is retained
12955 internally. The interval and the number of retained samples can be set
12956 with <link to="IPerformanceCollector::setupMetrics" />.
12957
12958 Metrics are organized hierarchically, with each level separated by a
12959 slash (/) character. Generally, the scheme for metric names is like this:
12960
12961 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12962
12963 "Category/Metric" together form the base metric name. A base metric is the
12964 smallest unit for which a sampling interval and the number of retained
12965 samples can be set. Only base metrics can be enabled and disabled. All
12966 sub-metrics are collected when their base metric is collected.
12967 Collected values for any set of sub-metrics can be queried with
12968 <link to="IPerformanceCollector::queryMetricsData" />.
12969
12970 For example "CPU/Load/User:avg"
12971 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12972 "average" aggregate. An aggregate function is computed over all retained
12973 data. Valid aggregate functions are:
12974
12975 <ul>
12976 <li>avg -- average</li>
12977 <li>min -- minimum</li>
12978 <li>max -- maximum</li>
12979 </ul>
12980
12981 When setting up
12982 metric parameters, querying metric data, enabling or disabling metrics
12983 wildcards can be used in metric names to specify a subset of metrics. For
12984 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12985 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12986 values without aggregates <tt>*:</tt> can be used.
12987
12988 The valid names for base metrics are:
12989
12990 <ul>
12991 <li>CPU/Load</li>
12992 <li>CPU/MHz</li>
12993 <li>RAM/Usage</li>
12994 </ul>
12995
12996 The general sequence for collecting and retrieving the metrics is:
12997 <ul>
12998 <li>
12999 Obtain an instance of IPerformanceCollector with
13000 <link to="IVirtualBox::performanceCollector" />
13001 </li>
13002 <li>
13003 Allocate and populate an array with references to objects the metrics
13004 will be collected for. Use references to IHost and IMachine objects.
13005 </li>
13006 <li>
13007 Allocate and populate an array with base metric names the data will be
13008 collected for.
13009 </li>
13010 <li>
13011 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13012 metric data will be collected and stored.
13013 </li>
13014 <li>
13015 Wait for the data to get collected.
13016 </li>
13017 <li>
13018 Allocate and populate an array with references to objects the metric
13019 values will be queried for. You can re-use the object array used for
13020 setting base metrics.
13021 </li>
13022 <li>
13023 Allocate and populate an array with metric names the data will be
13024 collected for. Note that metric names differ from base metric names.
13025 </li>
13026 <li>
13027 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13028 have been collected so far are returned. Note that the values are still
13029 retained internally and data collection continues.
13030 </li>
13031 </ul>
13032
13033 For an example of usage refer to the following files in VirtualBox SDK:
13034 <ul>
13035 <li>
13036 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13037 </li>
13038 <li>
13039 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13040 </li>
13041 </ul>
13042 </desc>
13043
13044 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13045 <desc>
13046 Array of unique names of metrics.
13047
13048 This array represents all metrics supported by the performance
13049 collector. Individual objects do not necessarily support all of them.
13050 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13051 list of supported metrics for a particular object.
13052 </desc>
13053 </attribute>
13054
13055 <method name="getMetrics">
13056 <desc>
13057 Returns parameters of specified metrics for a set of objects.
13058 <note>
13059 @c Null metrics array means all metrics. @c Null object array means
13060 all existing objects.
13061 </note>
13062 </desc>
13063 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13064 <desc>
13065 Metric name filter. Currently, only a comma-separated list of metrics
13066 is supported.
13067 </desc>
13068 </param>
13069 <param name="objects" type="$unknown" dir="in" safearray="yes">
13070 <desc>
13071 Set of objects to return metric parameters for.
13072 </desc>
13073 </param>
13074 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13075 <desc>
13076 Array of returned metric parameters.
13077 </desc>
13078 </param>
13079 </method>
13080
13081 <method name="setupMetrics">
13082 <desc>
13083 Sets parameters of specified base metrics for a set of objects. Returns
13084 an array of <link to="IPerformanceMetric" /> describing the metrics have
13085 been affected.
13086 <note>
13087 @c Null or empty metric name array means all metrics. @c Null or empty
13088 object array means all existing objects. If metric name array contains
13089 a single element and object array contains many, the single metric
13090 name array element is applied to each object array element to form
13091 metric/object pairs.
13092 </note>
13093 </desc>
13094 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13095 <desc>
13096 Metric name filter. Comma-separated list of metrics with wildcard
13097 support.
13098 </desc>
13099 </param>
13100 <param name="objects" type="$unknown" dir="in" safearray="yes">
13101 <desc>
13102 Set of objects to setup metric parameters for.
13103 </desc>
13104 </param>
13105 <param name="period" type="unsigned long" dir="in">
13106 <desc>
13107 Time interval in seconds between two consecutive samples of performance
13108 data.
13109 </desc>
13110 </param>
13111 <param name="count" type="unsigned long" dir="in">
13112 <desc>
13113 Number of samples to retain in performance data history. Older samples
13114 get discarded.
13115 </desc>
13116 </param>
13117 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13118 <desc>
13119 Array of metrics that have been modified by the call to this method.
13120 </desc>
13121 </param>
13122 </method>
13123
13124 <method name="enableMetrics">
13125 <desc>
13126 Turns on collecting specified base metrics. Returns an array of
13127 <link to="IPerformanceMetric" /> describing the metrics have been
13128 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 enable metrics for.
13146 </desc>
13147 </param>
13148 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13149 <desc>
13150 Array of metrics that have been modified by the call to this method.
13151 </desc>
13152 </param>
13153 </method>
13154
13155 <method name="disableMetrics">
13156 <desc>
13157 Turns off collecting specified base metrics. Returns an array of
13158 <link to="IPerformanceMetric" /> describing the metrics have been
13159 affected.
13160 <note>
13161 @c Null or empty metric name array means all metrics. @c Null or empty
13162 object array means all existing objects. If metric name array contains
13163 a single element and object array contains many, the single metric
13164 name array element is applied to each object array element to form
13165 metric/object pairs.
13166 </note>
13167 </desc>
13168 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13169 <desc>
13170 Metric name filter. Comma-separated list of metrics with wildcard
13171 support.
13172 </desc>
13173 </param>
13174 <param name="objects" type="$unknown" dir="in" safearray="yes">
13175 <desc>
13176 Set of objects to disable metrics for.
13177 </desc>
13178 </param>
13179 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13180 <desc>
13181 Array of metrics that have been modified by the call to this method.
13182 </desc>
13183 </param>
13184 </method>
13185
13186 <method name="queryMetricsData">
13187 <desc>
13188 Queries collected metrics data for a set of objects.
13189
13190 The data itself and related metric information are returned in seven
13191 parallel and one flattened array of arrays. Elements of
13192 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13193 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13194 the same index describe one set of values corresponding to a single
13195 metric.
13196
13197 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13198 start and length of a sub-array is indicated by
13199 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13200 value for metric <tt>metricNames[i]</tt> is at
13201 <tt>returnData[returnIndices[i]]</tt>.
13202
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 <note>
13211 Data collection continues behind the scenes after call to
13212 @c queryMetricsData. The return data can be seen as the snapshot of
13213 the current state at the time of @c queryMetricsData call. The
13214 internally kept metric values are not cleared by the call. This makes
13215 possible querying different subsets of metrics or aggregates with
13216 subsequent calls. If periodic querying is needed it is highly
13217 suggested to query the values with @c interval*count period to avoid
13218 confusion. This way a completely new set of data values will be
13219 provided by each query.
13220 </note>
13221 </desc>
13222 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13223 <desc>
13224 Metric name filter. Comma-separated list of metrics with wildcard
13225 support.
13226 </desc>
13227 </param>
13228 <param name="objects" type="$unknown" dir="in" safearray="yes">
13229 <desc>
13230 Set of objects to query metrics for.
13231 </desc>
13232 </param>
13233 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13234 <desc>
13235 Names of metrics returned in @c returnData.
13236 </desc>
13237 </param>
13238 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13239 <desc>
13240 Objects associated with metrics returned in @c returnData.
13241 </desc>
13242 </param>
13243 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13244 <desc>
13245 Units of measurement for each returned metric.
13246 </desc>
13247 </param>
13248 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13249 <desc>
13250 Divisor that should be applied to return values in order to get
13251 floating point values. For example:
13252 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13253 will retrieve the floating point value of i-th sample of the first
13254 metric.
13255 </desc>
13256 </param>
13257 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13258 <desc>
13259 Sequence numbers of the first elements of value sequences of particular metrics
13260 returned in @c returnData. For aggregate metrics it is the sequence number of
13261 the sample the aggregate started calculation from.
13262 </desc>
13263 </param>
13264 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13265 <desc>
13266 Indices of the first elements of value sequences of particular metrics
13267 returned in @c returnData.
13268 </desc>
13269 </param>
13270 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13271 <desc>
13272 Lengths of value sequences of particular metrics.
13273 </desc>
13274 </param>
13275 <param name="returnData" type="long" dir="return" safearray="yes">
13276 <desc>
13277 Flattened array of all metric data containing sequences of values for
13278 each metric.
13279 </desc>
13280 </param>
13281 </method>
13282
13283 </interface>
13284
13285 <module name="VBoxSVC" context="LocalServer">
13286 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13287 namespace="virtualbox.org">
13288 <interface name="IVirtualBox" default="yes"/>
13289 </class>
13290 </module>
13291
13292 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13293 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13294 namespace="virtualbox.org">
13295 <interface name="ISession" default="yes"/>
13296 </class>
13297 </module>
13298
13299</library>
13300
13301</idl>
13302
13303<!-- 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