VirtualBox

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

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

Main: rewrite snapshot documentation

  • Property svn:eol-style set to native
File size: 487.3 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 When this attribute is @c true, the
8138 <link to="IMachine::stateFilePath"/> attribute of the
8139 <link to="#machine"/> object associated with this snapshot
8140 will point to the saved state file. Otherwise, it will be
8141 an empty string.
8142 </desc>
8143 </attribute>
8144
8145 <attribute name="machine" type="IMachine" readonly="yes">
8146 <desc>
8147 Virtual machine this snapshot is taken on. This object
8148 stores all settings the machine had when taking this snapshot.
8149 <note>
8150 The returned machine object is immutable, i.e. no
8151 any settings can be changed.
8152 </note>
8153 </desc>
8154 </attribute>
8155
8156 <attribute name="parent" type="ISnapshot" readonly="yes">
8157 <desc>
8158 Parent snapshot (a snapshot this one is based on), or
8159 @c null if the snapshot has no parent.
8160 </desc>
8161 </attribute>
8162
8163 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8164 <desc>
8165 Child snapshots (all snapshots having this one as a parent).
8166 <note>
8167 In the current implementation, there can be only one
8168 child snapshot, or no children at all, meaning this is the
8169 last (head) snapshot.
8170 </note>
8171 </desc>
8172 </attribute>
8173
8174 </interface>
8175
8176
8177 <!--
8178 // IMedia
8179 /////////////////////////////////////////////////////////////////////////
8180 -->
8181
8182 <enum
8183 name="MediaState"
8184 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8185 >
8186 <desc>
8187 Virtual media state.
8188 <see>IMedia</see>
8189 </desc>
8190
8191 <const name="NotCreated" value="0">
8192 <desc>
8193 Associated media storage does not exist (either was not created yet or
8194 was deleted).
8195 </desc>
8196 </const>
8197 <const name="Created" value="1">
8198 <desc>
8199 Associated storage exists and accessible.
8200 </desc>
8201 </const>
8202 <const name="LockedRead" value="2">
8203 <desc>
8204 Media is locked for reading, no data modification is possible.
8205 </desc>
8206 </const>
8207 <const name="LockedWrite" value="3">
8208 <desc>
8209 Media is locked for writing, no concurrent data reading or modification
8210 is possible.
8211 </desc>
8212 </const>
8213 <const name="Inaccessible" value="4">
8214 <desc>
8215 Associated media storage is not accessible.
8216 </desc>
8217 </const>
8218 <const name="Creating" value="5">
8219 <desc>
8220 Associated media storage is being created.
8221 </desc>
8222 </const>
8223 <const name="Deleting" value="6">
8224 <desc>
8225 Associated media storage is being deleted.
8226 </desc>
8227 </const>
8228 </enum>
8229
8230 <interface
8231 name="IMedium" extends="$unknown"
8232 uuid="f585787c-7728-40f6-853a-13705426e936"
8233 wsmap="managed"
8234 >
8235 <desc>
8236 The IMedium interface is a common interface for all objects representing
8237 virtual media such as hard disks, CD/DVD images and floppy images.
8238
8239 Each medium is associated with a storage unit (such as a file on the host
8240 computer or a network resource) that holds actual data. The location of
8241 the storage unit is represented by the #location attribute. The value of
8242 this attribute is media type dependent.
8243
8244 The exact media type may be determined by querying the appropriate
8245 interface such as:
8246 <ul>
8247 <li><link to="IHardDisk" /> (virtual hard disks)</li>
8248 <li><link to="IDVDImage" /> (standard CD/DVD ISO image files)</li>
8249 <li><link to="IFloppyImage" /> (raw floppy image files)</li>
8250 </ul>
8251
8252 Existing media are opened using the following methods, depending on the
8253 media type:
8254 <ul>
8255 <li><link to="IVirtualBox::openHardDisk"/></li>
8256 <li><link to="IVirtualBox::openDVDImage"/></li>
8257 <li><link to="IVirtualBox::openFloppyImage"/></li>
8258 </ul>
8259
8260 New hard disk media are created using the
8261 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8262 images are created outside VirtualBox, usually by storing a copy
8263 of the real medium of the corresponding type in a regular file.
8264
8265 <h3>Known Media</h3>
8266
8267 When an existing medium gets opened for the first time, it gets
8268 automatically remembered by the given VirtualBox installation or, in other
8269 words, becomes a <i>known medium</i>. Known media are stored in the media
8270 registry transparently maintained by VirtualBox and stored in settings
8271 files so that this registry is preserved when VirtualBox is not running.
8272
8273 Newly created virtual hard disks get remembered only when the associated
8274 storage unit is actually created (see IHardDisk for more details).
8275
8276 All known media can be enumerated using
8277 <link to="IVirtualBox::hardDisks"/>,
8278 <link to="IVirtualBox::DVDImages"/> and
8279 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8280 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8281 and similar methods or by location using
8282 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8283
8284 Only known media can be attached to virtual machines.
8285
8286 Removing known media from the media registry is performed when the given
8287 medium is closed using the <link to="#close"/> method or when its
8288 associated storage unit is deleted (only for hard disks).
8289
8290 <h3>Accessibility Checks</h3>
8291
8292 The given medium (with the created storage unit) is considered to be
8293 <i>accessible</i> when its storage unit can be read.
8294 Accessible media are indicated by the <link to="MediaState_Created"/>
8295 value of the <link to="#state"/> attribute. When the storage unit cannot
8296 be read (for example, because it is located on a disconnected network
8297 resource, or was accidentally deleted outside VirtualBox), the medium is
8298 considered to be <i>inaccessible</i> which is indicated by the
8299 <link to="MediaState_Inaccessible"/> state. The details about the reason
8300 of being inaccessible can be obtained using the
8301 <link to="#lastAccessError"/> attribute.
8302
8303 A new accessibility check is performed each time the <link to="#state"/>
8304 attribute is read. Please note that this check may take long time (several
8305 seconds or even minutes, depending on the storage unit location and
8306 format), and will block the calling thread until finished. For this
8307 reason, it is recommended to never read this attribute on the main UI
8308 thread to avoid making the UI unresponsive.
8309
8310 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8311 created for the first time), all known media are in the
8312 <link to="MediaState_Inaccessible"/> state but the value of the <link
8313 to="#lastAccessError"/> attribute is an empty string because no actual
8314 accessibility check is made on startup. This is done to make the
8315 VirtualBox object ready for serving requests as
8316 fast as possible and let the end-user application decide if it needs to
8317 check media accessibility right away or not.
8318 </desc>
8319
8320 <attribute name="id" type="wstring" readonly="yes">
8321 <desc>
8322 UUID of the medium. For a newly created medium, this value is a randomly
8323 generated UUID.
8324
8325 <note>
8326 For media in one of MediaState_NotCreated, MediaState_Creating or
8327 MediaState_Deleting states, the value of this property is undefined
8328 and will most likely be an empty UUID.
8329 </note>
8330 </desc>
8331 </attribute>
8332
8333 <attribute name="description" type="wstring">
8334 <desc>
8335 Optional description of the medium. For newly created media, the value
8336 of this attribute value is an empty string.
8337
8338 Media types that don't support this attribute will return E_NOTIMPL in
8339 attempt to get or set this attribute's value.
8340
8341 <note>
8342 For some storage types, reading this attribute may return an outdated
8343 (last known) value when <link to="#state"/> is <link
8344 to="MediaState_Inaccessible"/> or <link
8345 to="MediaState_LockedWrite"/> because the value of this attribute is
8346 stored within the storage unit itself. Also note that changing the
8347 attribute value is not possible in such case, as well as when the
8348 medium is the <link to="MediaState_LockedRead"/> state.
8349 </note>
8350 </desc>
8351 </attribute>
8352
8353 <attribute name="state" type="MediaState" readonly="yes">
8354 <desc>
8355 Current media state. Inspect <link to="MediaState"/> values for details.
8356
8357 Reading this attribute may take a long time because an accessibility
8358 check of the storage unit is performed each time the attribute is read.
8359 This check may cause a significant delay if the storage unit of the
8360 given medium is, for example, a file located on a network share which is
8361 not currently accessible due to connectivity problems -- the call will
8362 not return until a timeout interval defined by the host OS for this
8363 operation expires.
8364
8365 If the last known state of the medium is <link to="MediaState_Created"/>
8366 and the accessibility check fails then the state would be set to
8367 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8368 may be used to get more details about the failure. If the state of the
8369 medium is <link to="MediaState_LockedRead"/> or
8370 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8371 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8372 accessibility check in this case.
8373
8374 Note that not all media states are applicable to all media types.
8375 For example, states <link to="MediaState_NotCreated"/>,
8376 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8377 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8378 IFloppyImage media.
8379 </desc>
8380 </attribute>
8381
8382 <attribute name="location" type="wstring">
8383 <desc>
8384 Location of the storage unit holding media data.
8385
8386 The format of the location string is media type specific. For media
8387 types using regular files in a host's file system, the location
8388 string is the full file name.
8389
8390 Some media types may support changing the storage unit location by
8391 simply changing the value of this property. If this operation is not
8392 supported, the implementation will return E_NOTIMPL in attempt to set
8393 this attribute's value.
8394
8395 When setting a value of the location attribute which is a regular file
8396 in the host's file system, the given file name may be either relative to
8397 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8398 absolute. Note that if the given location specification does not contain
8399 the file extension part then a proper default extension will be
8400 automatically appended by the implementation depending on the media type.
8401 </desc>
8402 </attribute>
8403
8404 <attribute name="name" type="wstring" readonly="yes">
8405 <desc>
8406 Name of the storage unit holding media data.
8407
8408 The returned string is a short version of the <link to="#location"/>
8409 attribute that is suitable for representing the medium in situations
8410 where the full location specification is too long (such as lists
8411 and comboboxes in GUI frontends). This string is also used by frontends
8412 to sort the media list alphabetically when needed.
8413
8414 For example, for locations that are regular files in the host's file
8415 system, the value of this attribute is just the file name (+ extension),
8416 without the path specification.
8417
8418 Note that as opposed to the <link to="#location"/> attribute, the name
8419 attribute will not necessary be unique for a list of media of the
8420 given type and format.
8421 </desc>
8422 </attribute>
8423
8424 <attribute name="size" type="unsigned long long" readonly="yes">
8425 <desc>
8426 Physical size of the storage unit used to hold media data (in bytes).
8427
8428 <note>
8429 For media whose <link to="#state"/> is <link
8430 to="MediaState_Inaccessible"/>, the value of this property is the
8431 last known size. For <link to="MediaState_NotCreated"/> media,
8432 the returned value is zero.
8433 </note>
8434 </desc>
8435 </attribute>
8436
8437 <attribute name="lastAccessError" type="wstring" readonly="yes">
8438 <desc>
8439 Text message that represents the result of the last accessibility
8440 check.
8441
8442 Accessibility checks are performed each time the <link to="#state"/>
8443 attribute is read. An empty string is returned if the last
8444 accessibility check was successful. A non-empty string indicates a
8445 failure and should normally describe a reason of the failure (for
8446 example, a file read error).
8447 </desc>
8448 </attribute>
8449
8450 <attribute name="machineIds" type="wstring" safearray="yes" readonly="yes">
8451 <desc>
8452 Array of UUIDs of all machines this medium is attached to.
8453
8454 A @c null array is returned if this medium is not attached to any
8455 machine or to any machine's snapshot.
8456
8457 <note>
8458 The returned array will include a machine even if this medium is not
8459 attached to that machine in the current state but attached to it in
8460 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8461 details.
8462 </note>
8463 </desc>
8464 </attribute>
8465
8466 <method name="getSnapshotIds">
8467 <desc>
8468 Returns an array of UUIDs of all snapshots of the given machine where
8469 this medium is attached to.
8470
8471 If the medium is attached to the machine in the current state, then the
8472 first element in the array will always be the ID of the queried machine
8473 (i.e. the value equal to the @c machineId argument), followed by
8474 snapshot IDs (if any).
8475
8476 If the medium is not attached to the machine in the current state, then
8477 the array will contain only snapshot IDs.
8478
8479 The returned array may be @c null if this medium is not attached
8480 to the given machine at all, neither in the current state nor in one of
8481 the snapshots.
8482 </desc>
8483 <param name="machineId" type="wstring" dir="in">
8484 <desc>
8485 UUID of the machine to query.
8486 </desc>
8487 </param>
8488 <param name="snapshotIds" type="wstring" safearray="yes" dir="return">
8489 <desc>
8490 Array of snapshot UUIDs of the given machine using this medium.
8491 </desc>
8492 </param>
8493 </method>
8494
8495 <method name="lockRead">
8496 <desc>
8497 Locks this medium for reading.
8498
8499 The read lock is shared: many clients can simultaneously lock the
8500 same media for reading unless it is already locked for writing (see
8501 <link to="#lockWrite"/>) in which case an error is returned.
8502
8503 When the medium is locked for reading, it cannot be modified
8504 from within VirtualBox. This means that any method that changes
8505 the properties of this medium or contents of the storage unit
8506 will return an error (unless explicitly stated otherwise) and
8507 that an attempt to start a virtual machine that wants to modify
8508 the medium will also fail.
8509
8510 When the virtual machine is started up, it locks for reading all
8511 media it uses in read-only mode. If some media cannot be locked
8512 for reading, the startup procedure will fail.
8513
8514 The medium locked for reading must be unlocked using the <link
8515 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8516 can be nested and must be followed by the same number of paired
8517 <link to="#unlockRead"/> calls.
8518
8519 This method sets the media state to <link
8520 to="MediaState_LockedRead" /> on success. The state prior to
8521 this call must be <link to="MediaState_Created" />,
8522 <link to="MediaState_Inaccessible" /> or
8523 <link to="MediaState_LockedRead" />.
8524 As you can see, inaccessible media can be locked too. This is
8525 not an error; this method performs a logical lock that prevents
8526 modifications of this media through the VirtualBox API, not a
8527 physical lock of the underlying storage unit.
8528
8529 This method returns the current state of the medium
8530 <b>before</b> the operation.
8531
8532 <result name="VBOX_E_INVALID_OBJECT_STATE">
8533 Invalid media state (e.g. not created, locked, inaccessible,
8534 creating, deleting).
8535 </result>
8536
8537 </desc>
8538 <param name="state" type="MediaState" dir="return">
8539 <desc>
8540 State of the medium after the operation.
8541 </desc>
8542 </param>
8543 </method>
8544
8545 <method name="unlockRead">
8546 <desc>
8547 Cancels the read lock previously set by <link to="#lockRead"/>.
8548
8549 For both, success and failure, this method returns the current state
8550 of the medium <b>after</b> the operation.
8551
8552 See <link to="#lockRead"/> for more details.
8553
8554 <result name="VBOX_E_INVALID_OBJECT_STATE">
8555 Medium not locked for reading.
8556 </result>
8557
8558 </desc>
8559 <param name="state" type="MediaState" dir="return">
8560 <desc>
8561 State of the medium after the operation.
8562 </desc>
8563 </param>
8564 </method>
8565
8566 <method name="lockWrite">
8567 <desc>
8568 Locks this medium for writing.
8569
8570 The write lock, as opposed to <link to="#lockRead"/>, is
8571 exclusive: there may be only one client holding a write lock
8572 and there may be no read locks while the write lock is held.
8573
8574 When the medium is locked for writing, it cannot be modified
8575 from within VirtualBox and it is not guaranteed that the values
8576 of its properties are up-to-date. Any method that changes the
8577 properties of this medium or contents of the storage unit will
8578 return an error (unless explicitly stated otherwise) and an
8579 attempt to start a virtual machine wanting to modify or to
8580 read the medium will fail.
8581
8582 When the virtual machine is started up, it locks for writing all
8583 media it uses to write data to. If any medium could not be locked
8584 for writing, the startup procedure will fail.
8585
8586 The medium locked for writing must be unlocked using the <link
8587 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8588 can <b>not</b> be nested and must be followed by a<link
8589 to="#unlockWrite"/> call before the next lockWrite call.
8590
8591 This method sets the media state to <link to="MediaState_LockedWrite" />
8592 on success. The state prior to this call must be <link to="MediaState_Created"/>
8593 or <link to="MediaState_Inaccessible"/>. As you can see, inaccessible
8594 media can be locked too. This is not an error; this method
8595 performs a logical lock preventing modifications of this
8596 media through the VirtualBox API, not a physical lock of the
8597 underlying storage unit.
8598
8599 For both, success and failure, this method returns the current
8600 state of the medium <b>before</b> the operation.
8601
8602 <result name="VBOX_E_INVALID_OBJECT_STATE">
8603 Invalid media state (e.g. not created, locked, inaccessible,
8604 creating, deleting).
8605 </result>
8606
8607 </desc>
8608 <param name="state" type="MediaState" dir="return">
8609 <desc>
8610 State of the medium after the operation.
8611 </desc>
8612 </param>
8613 </method>
8614
8615 <method name="unlockWrite">
8616 <desc>
8617 Cancels the write lock previously set by <link to="#lockWrite"/>.
8618
8619 For both, success and failure, this method returns the current
8620 state of the medium <b>after</b> the operation.
8621
8622 See <link to="#lockWrite"/> for more details.
8623
8624 <result name="VBOX_E_INVALID_OBJECT_STATE">
8625 Medium not locked for writing.
8626 </result>
8627
8628 </desc>
8629 <param name="state" type="MediaState" dir="return">
8630 <desc>
8631 State of the medium after the operation.
8632 </desc>
8633 </param>
8634 </method>
8635
8636 <method name="close">
8637 <desc>
8638 Closes this medium.
8639
8640 The hard disk must not be attached to any known virtual machine
8641 and must not have any known child hard disks, otherwise the
8642 operation will fail.
8643
8644 When the hard disk is successfully closed, it gets removed from
8645 the list of remembered hard disks, but its storage unit is not
8646 deleted. In particular, this means that this hard disk can be
8647 later opened again using the <link
8648 to="IVirtualBox::openHardDisk"/> call.
8649
8650 Note that after this method successfully returns, the given hard
8651 disk object becomes uninitialized. This means that any attempt
8652 to call any of its methods or attributes will fail with the
8653 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8654
8655 <result name="VBOX_E_INVALID_OBJECT_STATE">
8656 Invalid media state (other than not created, created or
8657 inaccessible).
8658 </result>
8659 <result name="VBOX_E_OBJECT_IN_USE">
8660 Medium attached to virtual machine.
8661 </result>
8662 <result name="VBOX_E_FILE_ERROR">
8663 Settings file not accessible.
8664 </result>
8665 <result name="VBOX_E_XML_ERROR">
8666 Could not parse the settings file.
8667 </result>
8668
8669 </desc>
8670 </method>
8671
8672 </interface>
8673
8674
8675 <!--
8676 // IHardDisk
8677 /////////////////////////////////////////////////////////////////////////
8678 -->
8679
8680 <enum
8681 name="HardDiskType"
8682 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8683 >
8684 <desc>
8685 Virtual hard disk type.
8686 <see>IHardDisk</see>
8687 </desc>
8688
8689 <const name="Normal" value="0">
8690 <desc>
8691 Normal hard disk (attached directly or indirectly, preserved
8692 when taking snapshots).
8693 </desc>
8694 </const>
8695 <const name="Immutable" value="1">
8696 <desc>
8697 Immutable hard disk (attached indirectly, changes are wiped out
8698 after powering off the virtual machine).
8699 </desc>
8700 </const>
8701 <const name="Writethrough" value="2">
8702 <desc>
8703 Write through hard disk (attached directly, ignored when
8704 taking snapshots).
8705 </desc>
8706 </const>
8707 </enum>
8708
8709 <enum
8710 name="HardDiskVariant"
8711 uuid="eb7fc6b3-ae23-4c5d-a1f6-e3522dd1efb0"
8712 >
8713 <desc>
8714 Virtual hard disk image variant. More than one flag may be set.
8715 <see>IHardDisk</see>
8716 </desc>
8717
8718 <const name="Standard" value="0">
8719 <desc>
8720 No particular variant requested, results in using the backend default.
8721 </desc>
8722 </const>
8723 <const name="VmdkSplit2G" value="0x01">
8724 <desc>
8725 VMDK image split in chunks of less than 2GByte.
8726 </desc>
8727 </const>
8728 <const name="VmdkStreamOptimized" value="0x04">
8729 <desc>
8730 VMDK streamOptimized image. Special import/export format which is
8731 read-only/append-only.
8732 </desc>
8733 </const>
8734 <const name="VmdkESX" value="0x08">
8735 <desc>
8736 VMDK format variant used on ESX products.
8737 </desc>
8738 </const>
8739 <const name="Fixed" value="0x10000">
8740 <desc>
8741 Fixed image. Only allowed for base images.
8742 </desc>
8743 </const>
8744 <const name="Diff" value="0x20000">
8745 <desc>
8746 Fixed image. Only allowed for base images.
8747 </desc>
8748 </const>
8749 </enum>
8750
8751 <interface
8752 name="IHardDiskAttachment" extends="$unknown"
8753 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8754 wsmap="struct"
8755 >
8756 <desc>
8757 The IHardDiskAttachment interface represents a hard disk attachment of a
8758 virtual machine.
8759
8760 Every hard disk attachment specifies a slot of the virtual hard disk
8761 controller and a virtual hard disk attached to this slot.
8762
8763 The array of hard disk attachments is returned by
8764 <link to="IMachine::hardDiskAttachments"/>.
8765 </desc>
8766
8767 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8768 <desc>Hard disk object associated with this attachment.</desc>
8769 </attribute>
8770
8771 <attribute name="controller" type="wstring" readonly="yes">
8772 <desc>Interface bus of this attachment.</desc>
8773 </attribute>
8774
8775 <attribute name="port" type="long" readonly="yes">
8776 <desc>Port number of this attachment.</desc>
8777 </attribute>
8778
8779 <attribute name="device" type="long" readonly="yes">
8780 <desc>Device slot number of this attachment.</desc>
8781 </attribute>
8782
8783 </interface>
8784
8785 <interface
8786 name="IHardDisk" extends="IMedium"
8787 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8788 wsmap="managed"
8789 >
8790 <desc>
8791 The IHardDisk interface represents a virtual hard disk drive
8792 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8793
8794 <h3>Hard Disk Types</h3>
8795
8796 There are three types of hard disks:
8797 <link to="HardDiskType_Normal">Normal</link>,
8798 <link to="HardDiskType_Immutable">Immutable</link> and
8799 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8800 hard disk defines how the hard disk is attached to a virtual machine and
8801 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8802 machine with the attached hard disk is taken. The type of the hard disk is
8803 defined by the <link to="#type"/> attribute.
8804
8805 All hard disks can be also divided in two groups: <i>base</i> hard
8806 disks and <i>differencing</i> hard disks. A base hard disk contains all
8807 sectors of the hard disk data in its own storage and therefore can be
8808 used independently. On the contrary, a differencing hard disk is a
8809 "delta" to some other disk and contains only those sectors which differ
8810 from that other disk, which is then called a <i>parent</i>. The differencing
8811 hard disk is said to be <i>linked to</i> that parent.
8812 The parent may be itself a differencing image, thus forming a chain of
8813 linked hard disks. The last element in that chain (sometimes referred to as
8814 the root hard disk) must always be a base. Note that several differencing
8815 hard disks may be linked to the same parent hard disk.
8816
8817 Differencing hard disks can be distinguished from base hard disks by
8818 querying the <link to="#parent"/> attribute: base hard disks do not have
8819 parents they would depend on, so the value of this attribute is always
8820 @c null for them. Using this attribute, it is possible to walk up
8821 the hard disk tree (from the child hard disk to its parent). It is also
8822 possible to walk down the tree using the <link to="#children"/>
8823 attribute.
8824
8825 Note that the type of all differencing hard disks is
8826 <link to="HardDiskType_Normal" />; all other values are
8827 meaningless for them. Base hard disks may be of any type.
8828
8829 <h3>Creating Hard Disks</h3>
8830
8831 New base hard disks are created using
8832 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8833 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8834 disks are usually implicitly created by VirtualBox when needed but may
8835 also be created explicitly using <link to="#createDiffStorage"/>.
8836
8837 After the hard disk is successfully created (including the storage unit)
8838 or opened, it becomes a known hard disk (remembered in the internal media
8839 registry). Known hard disks can be attached to a virtual machine, accessed
8840 through <link to="IVirtualBox::getHardDisk"/> and
8841 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8842 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8843
8844 The following methods, besides <link to="IMedium::close"/>,
8845 automatically remove the hard disk from the media registry:
8846 <ul>
8847 <li><link to="#deleteStorage"/></li>
8848 <li><link to="#mergeTo"/></li>
8849 </ul>
8850
8851 If the storage unit of the hard disk is a regular file in the host's
8852 file system then the rules stated in the description of the
8853 <link to="IMedium::location"/> attribute apply when setting its value. In
8854 addition, a plain file name without any path may be given, in which case
8855 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8856 folder</link> will be prepended to it.
8857
8858 <h4>Automatic composition of the file name part</h4>
8859
8860 Another extension to the <link to="IMedium::location"/> attribute is that
8861 there is a possibility to cause VirtualBox to compose a unique value for
8862 the file name part of the location using the UUID of the hard disk. This
8863 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8864 e.g. before the storage unit is created, and works as follows. You set the
8865 value of the <link to="IMedium::location"/> attribute to a location
8866 specification which only contains the path specification but not the file
8867 name part and ends with either a forward slash or a backslash character.
8868 In response, VirtualBox will generate a new UUID for the hard disk and
8869 compose the file name using the following pattern:
8870 <pre>
8871 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8872 </pre>
8873 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8874 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8875 is the default extension for the storage format of this hard disk. After
8876 that, you may call any of the methods that create a new hard disk storage
8877 unit and they will use the generated UUID and file name.
8878
8879 <h3>Attaching Hard Disks</h3>
8880
8881 Hard disks are attached to virtual machines using the
8882 <link to="IMachine::attachHardDisk"/> method and detached using the
8883 <link to="IMachine::detachHardDisk"/> method. Depending on their
8884 <link to="#type"/>, hard disks are attached either
8885 <i>directly</i> or <i>indirectly</i>.
8886
8887 When a hard disk is being attached directly, it is associated with the
8888 virtual machine and used for hard disk operations when the machine is
8889 running. When a hard disk is being attached indirectly, a new differencing
8890 hard disk linked to it is implicitly created and this differencing hard
8891 disk is associated with the machine and used for hard disk operations.
8892 This also means that if <link to="IMachine::attachHardDisk"/> performs
8893 a direct attachment then the same hard disk will be returned in response
8894 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8895 an indirect attachment is performed then
8896 <link to="IMachine::getHardDisk"/> will return the implicitly created
8897 differencing hard disk, not the original one passed to <link
8898 to="IMachine::attachHardDisk"/>. The following table shows the
8899 dependency of the attachment type on the hard disk type:
8900
8901 <table>
8902 <tr>
8903 <th>Hard Disk Type</th>
8904 <th>Direct or Indirect?</th>
8905 </tr>
8906 <tr>
8907 <td>Normal (Base)</td>
8908 <td>
8909 Normal base hard disks that do not have children (i.e. differencing
8910 hard disks linked to them) and that are not already attached to
8911 virtual machines in snapshots are attached <b>directly</b>.
8912 Otherwise, they are attached <b>indirectly</b> because having
8913 dependent children or being part of the snapshot makes it impossible
8914 to modify hard disk contents without breaking the integrity of the
8915 dependent party. The <link to="#readOnly"/> attribute allows to
8916 quickly determine the kind of the attachment for the given hard
8917 disk. Note that if a normal base hard disk is to be indirectly
8918 attached to a virtual machine with snapshots then a special
8919 procedure called <i>smart attachment</i> is performed (see below).
8920 </td>
8921 </tr>
8922 <tr>
8923 <td>Normal (Differencing)</td>
8924 <td>
8925 Differencing hard disks are like normal base hard disks: attached
8926 <b>directly</b> if they do not have children and are not attached to
8927 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8928 that the smart attachment procedure is never performed for
8929 differencing hard disks.
8930 </td>
8931 </tr>
8932 <tr>
8933 <td>Immutable</td>
8934 <td>
8935 Immutable hard disks are always attached <b>indirectly</b> because
8936 they are designed to be non-writable. If an immutable hard disk is
8937 attached to a virtual machine with snapshots then a special
8938 procedure called smart attachment is performed (see below).
8939 </td>
8940 </tr>
8941 <tr>
8942 <td>Writethrough</td>
8943 <td>
8944 Writethrough hard disks are always attached <b>directly</b>, also as
8945 designed. This also means that writethrough hard disks cannot have
8946 other hard disks linked to them at all.
8947 </td>
8948 </tr>
8949 </table>
8950
8951 Note that the same hard disk, regardless of its type, may be attached to
8952 more than one virtual machine at a time. In this case, the machine that is
8953 started first gains exclusive access to the hard disk and attempts to
8954 start other machines having this hard disk attached will fail until the
8955 first machine is powered down.
8956
8957 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8958 that the given hard disk remains associated with the given machine after a
8959 successful <link to="IMachine::detachHardDisk"/> call until
8960 <link to="IMachine::saveSettings"/> is called to save all changes to
8961 machine settings to disk. This deferring is necessary to guarantee that
8962 the hard disk configuration may be restored at any time by a call to
8963 <link to="IMachine::discardSettings"/> before the settings
8964 are saved (committed).
8965
8966 Note that if <link to="IMachine::discardSettings"/> is called after
8967 indirectly attaching some hard disks to the machine but before a call to
8968 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8969 all differencing hard disks implicitly created by
8970 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8971 Such implicitly created hard disks will also be immediately deleted when
8972 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8973 call if it is made before <link to="IMachine::saveSettings"/>. This
8974 implicit deletion is safe because newly created differencing hard
8975 disks do not contain any user data.
8976
8977 However, keep in mind that detaching differencing hard disks that were
8978 implicitly created by <link to="IMachine::attachHardDisk"/>
8979 before the last <link to="IMachine::saveSettings"/> call will
8980 <b>not</b> implicitly delete them as they may already contain some data
8981 (for example, as a result of virtual machine execution). If these hard
8982 disks are no more necessary, the caller can always delete them explicitly
8983 using <link to="#deleteStorage"/> after they are actually de-associated
8984 from this machine by the <link to="IMachine::saveSettings"/> call.
8985
8986 <h3>Smart Attachment</h3>
8987
8988 When normal base or immutable hard disks are indirectly attached to a
8989 virtual machine then some additional steps are performed to make sure the
8990 virtual machine will have the most recent "view" of the hard disk being
8991 attached. These steps include walking through the machine's snapshots
8992 starting from the current one and going through ancestors up to the first
8993 snapshot. Hard disks attached to the virtual machine in all
8994 of the encountered snapshots are checked whether they are descendants of
8995 the given normal base or immutable hard disk. The first found child (which
8996 is the differencing hard disk) will be used instead of the normal base or
8997 immutable hard disk as a parent for creating a new differencing hard disk
8998 that will be actually attached to the machine. And only if no descendants
8999 are found or if the virtual machine does not have any snapshots then the
9000 normal base or immutable hard disk will be used itself as a parent for
9001 this differencing hard disk.
9002
9003 It is easier to explain what smart attachment does using the
9004 following example:
9005 <pre>
9006BEFORE attaching B.vdi: AFTER attaching B.vdi:
9007
9008Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9009 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9010 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9011 Snapshot 4 (none) Snapshot 4 (none)
9012 CurState (none) CurState (D3->D2.vdi)
9013
9014 NOT
9015 ...
9016 CurState (D3->B.vdi)
9017 </pre>
9018 The first column is the virtual machine configuration before the base hard
9019 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9020 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9021 mean that the hard disk that is actually attached to the machine is a
9022 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9023 another hard disk, <tt>B.vdi</tt>.
9024
9025 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9026 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9027 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9028 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9029 it cannot be attached directly and needs an indirect attachment (i.e.
9030 implicit creation of a new differencing hard disk). Due to the smart
9031 attachment procedure, the new differencing hard disk
9032 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9033 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9034 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9035 machine.
9036
9037 Note that if there is more than one descendant hard disk of the given base
9038 hard disk found in a snapshot, and there is an exact device, channel and
9039 bus match, then this exact match will be used. Otherwise, the youngest
9040 descendant will be picked up.
9041
9042 There is one more important aspect of the smart attachment procedure which
9043 is not related to snapshots at all. Before walking through the snapshots
9044 as described above, the backup copy of the current list of hard disk
9045 attachment is searched for descendants. This backup copy is created when
9046 the hard disk configuration is changed for the first time after the last
9047 <link to="IMachine::saveSettings"/> call and used by
9048 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9049 changes. When such a descendant is found in this backup copy, it will be
9050 simply re-attached back, without creating a new differencing hard disk for
9051 it. This optimization is necessary to make it possible to re-attach the
9052 base or immutable hard disk to a different bus, channel or device slot
9053 without losing the contents of the differencing hard disk actually
9054 attached to the machine in place of it.
9055 </desc>
9056
9057 <attribute name="format" type="wstring" readonly="yes">
9058 <desc>
9059 Storage format of this hard disk.
9060
9061 The value of this attribute is a string that specifies a backend used to
9062 store hard disk data. The storage format is defined when you create a
9063 new hard disk or automatically detected when you open an existing hard
9064 disk medium, and cannot be changed later.
9065
9066 The list of all storage formats supported by this VirtualBox
9067 installation can be obtained using
9068 <link to="ISystemProperties::hardDiskFormats"/>.
9069 </desc>
9070 </attribute>
9071
9072 <attribute name="type" type="HardDiskType">
9073 <desc>
9074 Type (role) of this hard disk.
9075
9076 The following constraints apply when changing the value of this
9077 attribute:
9078 <ul>
9079 <li>If a hard disk is attached to a virtual machine (either in the
9080 current state or in one of the snapshots), its type cannot be
9081 changed.
9082 </li>
9083 <li>As long as the hard disk has children, its type cannot be set
9084 to <link to="HardDiskType_Writethrough"/>.
9085 </li>
9086 <li>The type of all differencing hard disks is
9087 <link to="HardDiskType_Normal"/> and cannot be changed.
9088 </li>
9089 </ul>
9090
9091 The type of a newly created or opened hard disk is set to
9092 <link to="HardDiskType_Normal"/>.
9093 </desc>
9094 </attribute>
9095
9096 <attribute name="parent" type="IHardDisk" readonly="yes">
9097 <desc>
9098 Parent of this hard disk (a hard disk this hard disk is directly based
9099 on).
9100
9101 Only differencing hard disks have parents. For base (non-differencing)
9102 hard disks, @c null is returned.
9103 </desc>
9104 </attribute>
9105
9106 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9107 <desc>
9108 Children of this hard disk (all differencing hard disks directly based
9109 on this hard disk). A @c null array is returned if this hard disk
9110 does not have any children.
9111 </desc>
9112 </attribute>
9113
9114 <attribute name="root" type="IHardDisk" readonly="yes">
9115 <desc>
9116 Root hard disk of this hard disk.
9117
9118 If this is a differencing hard disk, its root hard disk is the base hard
9119 disk the given hard disk branch starts from. For all other types of hard
9120 disks, this property returns the hard disk object itself (i.e. the same
9121 object this property is read on).
9122 </desc>
9123 </attribute>
9124
9125 <attribute name="readOnly" type="boolean" readonly="yes">
9126 <desc>
9127 Returns @c true if this hard disk is read-only and @c false otherwise.
9128
9129 A hard disk is considered to be read-only when its contents cannot be
9130 modified without breaking the integrity of other parties that depend on
9131 this hard disk such as its child hard disks or snapshots of virtual
9132 machines where this hard disk is attached to these machines. If there
9133 are no children and no such snapshots then there is no dependency and
9134 the hard disk is not read-only.
9135
9136 The value of this attribute can be used to determine the kind of the
9137 attachment that will take place when attaching this hard disk to a
9138 virtual machine. If the value is @c false then the hard disk will
9139 be attached directly. If the value is @c true then the hard disk
9140 will be attached indirectly by creating a new differencing child hard
9141 disk for that. See the interface description for more information.
9142
9143 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9144 disks are always read-only while all
9145 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9146 always not.
9147
9148 <note>
9149 The read-only condition represented by this attribute is related to
9150 the hard disk type and usage, not to the current
9151 <link to="IMedium::state">media state</link> and not to the read-only
9152 state of the storage unit.
9153 </note>
9154 </desc>
9155 </attribute>
9156
9157 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9158 <desc>
9159 Logical size of this hard disk (in megabytes), as reported to the
9160 guest OS running inside the virtual machine this disk is
9161 attached to. The logical size is defined when the hard disk is created
9162 and cannot be changed later.
9163
9164 <note>
9165 Reading this property on a differencing hard disk will return the size
9166 of its <link to="#root"/> hard disk.
9167 </note>
9168 <note>
9169 For hard disks whose state is <link to="#state"/> is <link
9170 to="MediaState_Inaccessible"/>, the value of this property is the
9171 last known logical size. For <link to="MediaState_NotCreated"/> hard
9172 disks, the returned value is zero.
9173 </note>
9174 </desc>
9175 </attribute>
9176
9177 <attribute name="autoReset" type="boolean">
9178 <desc>
9179 Whether this differencing hard disk will be automatically reset each
9180 time a virtual machine it is attached to is powered up.
9181
9182 See <link to="#reset()"/> for more information about resetting
9183 differencing hard disks.
9184
9185 <note>
9186 Reading this property on a base (non-differencing) hard disk will
9187 always @c false. Changing the value of this property in this
9188 case is not supported.
9189 </note>
9190
9191 <result name="VBOX_E_NOT_SUPPORTED">
9192 This is not a differencing hard disk (when changing the attribute
9193 value).
9194 </result>
9195 </desc>
9196 </attribute>
9197
9198 <!-- storage methods -->
9199
9200 <method name="getProperty">
9201 <desc>
9202 Returns the value of the custom hard disk property with the given name.
9203
9204 The list of all properties supported by the given hard disk format can
9205 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9206
9207 Note that if this method returns an empty string in @a value, the
9208 requested property is supported but currently not assigned any value.
9209
9210 <result name="VBOX_E_OBJECT_NOT_FOUND">
9211 Requested property does not exist (not supported by the format).
9212 </result>
9213 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9214 </desc>
9215 <param name="name" type="wstring" dir="in">
9216 <desc>Name of the property to get.</desc>
9217 </param>
9218 <param name="value" type="wstring" dir="return">
9219 <desc>Current property value.</desc>
9220 </param>
9221 </method>
9222
9223 <method name="setProperty">
9224 <desc>
9225 Sets the value of the custom hard disk property with the given name.
9226
9227 The list of all properties supported by the given hard disk format can
9228 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9229
9230 Note that setting the property value to @c null or an empty string is
9231 equivalent to deleting the existing value. A default value (if it is
9232 defined for this property) will be used by the format backend in this
9233 case.
9234
9235 <result name="VBOX_E_OBJECT_NOT_FOUND">
9236 Requested property does not exist (not supported by the format).
9237 </result>
9238 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9239 </desc>
9240 <param name="name" type="wstring" dir="in">
9241 <desc>Name of the property to set.</desc>
9242 </param>
9243 <param name="value" type="wstring" dir="in">
9244 <desc>Property value to set.</desc>
9245 </param>
9246 </method>
9247
9248 <method name="getProperties">
9249 <desc>
9250 Returns values for a group of properties in one call.
9251
9252 The names of the properties to get are specified using the @a names
9253 argument which is a list of comma-separated property names or
9254 an empty string if all properties are to be returned. Note that currently
9255 the value of this argument is ignored and the method always returns all
9256 existing properties.
9257
9258 The list of all properties supported by the given hard disk format can
9259 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9260
9261 The method returns two arrays, the array of property names corresponding
9262 to the @a names argument and the current values of these properties.
9263 Both arrays have the same number of elements with each elemend at the
9264 given index in the first array corresponds to an element at the same
9265 index in the second array.
9266
9267 Note that for properties that do not have assigned values,
9268 an empty string is returned at the appropriate index in the
9269 @a returnValues array.
9270
9271 </desc>
9272 <param name="names" type="wstring" dir="in">
9273 <desc>
9274 Names of properties to get.
9275 </desc>
9276 </param>
9277 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9278 <desc>Names of returned properties.</desc>
9279 </param>
9280 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9281 <desc>Values of returned properties.</desc>
9282 </param>
9283 </method>
9284
9285 <method name="setProperties">
9286 <desc>
9287 Sets values for a group of properties in one call.
9288
9289 The names of the properties to set are passed in the @a names
9290 array along with the new values for them in the @a values array. Both
9291 arrays have the same number of elements with each elemend at the given
9292 index in the first array corresponding to an element at the same index
9293 in the second array.
9294
9295 If there is at least one property name in @a names that is not valid,
9296 the method will fail before changing the values of any other properties
9297 from the @a names array.
9298
9299 Using this method over <link to="#setProperty"/> is preferred if you
9300 need to set several properties at once since it will result into less
9301 IPC calls.
9302
9303 The list of all properties supported by the given hard disk format can
9304 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9305
9306 Note that setting the property value to @c null or an empty string is
9307 equivalent to deleting the existing value. A default value (if it is
9308 defined for this property) will be used by the format backend in this
9309 case.
9310 </desc>
9311 <param name="names" type="wstring" safearray="yes" dir="in">
9312 <desc>Names of properties to set.</desc>
9313 </param>
9314 <param name="values" type="wstring" safearray="yes" dir="in">
9315 <desc>Values of properties to set.</desc>
9316 </param>
9317 </method>
9318
9319 <!-- storage methods -->
9320
9321 <method name="createBaseStorage">
9322 <desc>
9323 Starts creating a hard disk storage unit (fixed/dynamic, according
9324 to the variant flags) in in the background. The previous storage unit
9325 created for this object, if any, must first be deleted using
9326 <link to="#deleteStorage"/>, otherwise the operation will fail.
9327
9328 Before the operation starts, the hard disk is placed in
9329 <link to="MediaState_Creating"/> state. If the create operation
9330 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9331 state.
9332
9333 After the returned progress object reports that the operation has
9334 successfully completed, the media state will be set to <link
9335 to="MediaState_Created"/>, the hard disk will be remembered by this
9336 VirtualBox installation and may be attached to virtual machines.
9337
9338 <result name="VBOX_E_NOT_SUPPORTED">
9339 The variant of storage creation operation is not supported. See <link
9340 to="IHardDiskFormat::capabilities"/>.
9341 </result>
9342 </desc>
9343 <param name="logicalSize" type="unsigned long long" dir="in">
9344 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9345 </param>
9346 <param name="variant" type="HardDiskVariant" dir="in">
9347 <desc>Exact image variant which should be created.</desc>
9348 </param>
9349 <param name="progress" type="IProgress" dir="return">
9350 <desc>Progress object to track the operation completion.</desc>
9351 </param>
9352 </method>
9353
9354 <method name="deleteStorage">
9355 <desc>
9356 Starts deleting the storage unit of this hard disk.
9357
9358 The hard disk must not be attached to any known virtual machine and must
9359 not have any known child hard disks, otherwise the operation will fail.
9360 It will also fail if there is no storage unit to delete or if deletion
9361 is already in progress, or if the hard disk is being in use (locked for
9362 read or for write) or inaccessible. Therefore, the only valid state for
9363 this operation to succeed is <link to="MediaState_Created"/>.
9364
9365 Before the operation starts, the hard disk is placed to
9366 <link to="MediaState_Deleting"/> state and gets removed from the list
9367 of remembered hard disks (media registry). If the delete operation
9368 fails, the media will be remembered again and placed back to
9369 <link to="MediaState_Created"/> state.
9370
9371 After the returned progress object reports that the operation is
9372 complete, the media state will be set to
9373 <link to="MediaState_NotCreated"/> and you will be able to use one of
9374 the storage creation methods to create it again.
9375
9376 <see>#close()</see>
9377
9378 <result name="VBOX_E_OBJECT_IN_USE">
9379 Hard disk is attached to a virtual machine.
9380 </result>
9381 <result name="VBOX_E_NOT_SUPPORTED">
9382 Storage deletion is not allowed because neither of storage creation
9383 operations are supported. See
9384 <link to="IHardDiskFormat::capabilities"/>.
9385 </result>
9386
9387 <note>
9388 If the deletion operation fails, it is not guaranteed that the storage
9389 unit still exists. You may check the <link to="IMedium::state"/> value
9390 to answer this question.
9391 </note>
9392 </desc>
9393 <param name="progress" type="IProgress" dir="return">
9394 <desc>Progress object to track the operation completion.</desc>
9395 </param>
9396 </method>
9397
9398 <!-- diff methods -->
9399
9400 <method name="createDiffStorage">
9401 <desc>
9402 Starts creating an empty differencing storage unit based on this hard
9403 disk in the format and at the location defined by the @a target
9404 argument.
9405
9406 The target hard disk must be in <link to="MediaState_NotCreated"/>
9407 state (i.e. must not have an existing storage unit). Upon successful
9408 completion, this operation will set the type of the target hard disk to
9409 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9410 represent the differencing hard disk data in the given format (according
9411 to the storage format of the target object).
9412
9413 After the returned progress object reports that the operation is
9414 successfully complete, the target hard disk gets remembered by this
9415 VirtualBox installation and may be attached to virtual machines.
9416
9417 <note>
9418 The hard disk will be set to <link to="MediaState_LockedRead"/>
9419 state for the duration of this operation.
9420 </note>
9421 <result name="VBOX_E_OBJECT_IN_USE">
9422 Hard disk not in @c NotCreated state.
9423 </result>
9424 </desc>
9425 <param name="target" type="IHardDisk" dir="in">
9426 <desc>Target hard disk.</desc>
9427 </param>
9428 <param name="variant" type="HardDiskVariant" dir="in">
9429 <desc>Exact image variant which should be created.</desc>
9430 </param>
9431 <param name="progress" type="IProgress" dir="return">
9432 <desc>Progress object to track the operation completion.</desc>
9433 </param>
9434 </method>
9435
9436 <method name="mergeTo">
9437 <desc>
9438 Starts merging the contents of this hard disk and all intermediate
9439 differencing hard disks in the chain to the given target hard disk.
9440
9441 The target hard disk must be either a descendant of this hard disk or
9442 its ancestor (otherwise this method will immediately return a failure).
9443 It follows that there are two logical directions of the merge operation:
9444 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9445 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9446 chain:
9447
9448 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9449
9450 Here, calling this method on the <tt>Base</tt> hard disk object with
9451 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9452 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9453 merge. Note that in both cases the contents of the resulting hard disk
9454 will be the same, the only difference is the hard disk object that takes
9455 the result of the merge operation. In case of the forward merge in the
9456 above example, the result will be written to <tt>Diff_2</tt>; in case of
9457 the backward merge, the result will be written to <tt>Base</tt>. In
9458 other words, the result of the operation is always stored in the target
9459 hard disk.
9460
9461 Upon successful operation completion, the storage units of all hard
9462 disks in the chain between this (source) hard disk and the target hard
9463 disk, including the source hard disk itself, will be automatically
9464 deleted and the relevant hard disk objects (including this hard disk)
9465 will become uninitialized. This means that any attempt to call any of
9466 their methods or attributes will fail with the
9467 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9468 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9469 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9470 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9471 disk itself since it will no longer be based on any other hard disk.
9472
9473 Considering the above, all of the following conditions must be met in
9474 order for the merge operation to succeed:
9475 <ul>
9476 <li>
9477 Neither this (source) hard disk nor any intermediate
9478 differencing hard disk in the chain between it and the target
9479 hard disk is attached to any virtual machine.
9480 </li>
9481 <li>
9482 Neither the source hard disk nor the target hard disk is an
9483 <link to="HardDiskType_Immutable"/> hard disk.
9484 </li>
9485 <li>
9486 The part of the hard disk tree from the source hard disk to the
9487 target hard disk is a linear chain, i.e. all hard disks in this
9488 chain have exactly one child which is the next hard disk in this
9489 chain. The only exception from this rule is the target hard disk in
9490 the forward merge operation; it is allowed to have any number of
9491 child hard disks because the merge operation will hot change its
9492 logical contents (as it is seen by the guest OS or by children).
9493 </li>
9494 <li>
9495 None of the involved hard disks are in
9496 <link to="MediaState_LockedRead"/> or
9497 <link to="MediaState_LockedWrite"/> state.
9498 </li>
9499 </ul>
9500
9501 <note>
9502 This (source) hard disk and all intermediates will be placed to <link
9503 to="MediaState_Deleting"/> state and the target hard disk will be
9504 placed to <link to="MediaState_LockedWrite"/> state and for the
9505 duration of this operation.
9506 </note>
9507 </desc>
9508 <param name="targetId" type="wstring" dir="in">
9509 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9510 </param>
9511 <param name="progress" type="IProgress" dir="return">
9512 <desc>Progress object to track the operation completion.</desc>
9513 </param>
9514 </method>
9515
9516 <!-- clone method -->
9517
9518 <method name="cloneTo">
9519 <desc>
9520 Starts creating a clone of this hard disk in the format and at the
9521 location defined by the @a target argument.
9522
9523 The target hard disk must be either in <link to="MediaState_NotCreated"/>
9524 state (i.e. must not have an existing storage unit) or in
9525 <link to="MediaState_Created"/> state (i.e. created and not locked, and
9526 big enough to hold the data or else the copy will be partial). Upon
9527 successful completion, the cloned hard disk will contain exactly the
9528 same sector data as the hard disk being cloned, except that in the
9529 first case a new UUID for the clone will be randomly generated, and in
9530 the second case the UUID will remain unchanged.
9531
9532 The @a parent argument defines which hard disk will be the parent
9533 of the clone. Passing a @c null reference indicates that the clone will
9534 be a base image, i.e. completely independent. It is possible to specify
9535 an arbitrary hard disk for this parameter, including the parent of the
9536 hard disk which is being cloned. Even cloning to a child of the source
9537 hard disk is possible. Note that when cloning to an existing image, the
9538 @a parent irgument is ignored.
9539
9540 After the returned progress object reports that the operation is
9541 successfully complete, the target hard disk gets remembered by this
9542 VirtualBox installation and may be attached to virtual machines.
9543
9544 <note>
9545 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9546 state for the duration of this operation.
9547 </note>
9548 <result name="E_NOTIMPL">
9549 The specified cloning variant is not supported at the moment.
9550 </result>
9551 </desc>
9552 <param name="target" type="IHardDisk" dir="in">
9553 <desc>Target hard disk.</desc>
9554 </param>
9555 <param name="variant" type="HardDiskVariant" dir="in">
9556 <desc>Exact image variant which should be created.</desc>
9557 </param>
9558 <param name="parent" type="IHardDisk" dir="in">
9559 <desc>Parent of the cloned hard disk.</desc>
9560 </param>
9561 <param name="progress" type="IProgress" dir="return">
9562 <desc>Progress object to track the operation completion.</desc>
9563 </param>
9564 </method>
9565
9566 <!-- other methods -->
9567
9568 <method name="compact">
9569 <desc>
9570 Starts compacting of this hard disk. This means that the disk is
9571 transformed into a possibly more compact storage representation.
9572 This potentially creates temporary images, which can require a
9573 substantial amount of additional disk space.
9574
9575 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9576 state and all its parent hard disks (if any) will be placed to
9577 <link to="MediaState_LockedRead"/> state for the duration of this
9578 operation.
9579
9580 Please note that the results can be either returned straight away,
9581 or later as the result of the background operation via the object
9582 returned via the @a progress parameter.
9583
9584 <result name="VBOX_E_NOT_SUPPORTED">
9585 Hard disk format does not support compacting (but potentially
9586 needs it).
9587 </result>
9588 </desc>
9589 <param name="progress" type="IProgress" dir="return">
9590 <desc>Progress object to track the operation completion.</desc>
9591 </param>
9592 </method>
9593
9594 <method name="reset">
9595 <desc>
9596 Starts erasing the contents of this differencing hard disk.
9597
9598 This operation will reset the differencing hard disk to its initial
9599 state when it does not contain any sector data and any read operation is
9600 redirected to its parent hard disk.
9601
9602 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9603 for the duration of this operation.
9604
9605 <result name="VBOX_E_NOT_SUPPORTED">
9606 This is not a differencing hard disk.
9607 </result>
9608 <result name="VBOX_E_INVALID_OBJECT_STATE">
9609 Hard disk is not in <link to="MediaState_Created"/> or
9610 <link to="MediaState_Inaccessible"/> state.
9611 </result>
9612 </desc>
9613 <param name="progress" type="IProgress" dir="return">
9614 <desc>Progress object to track the operation completion.</desc>
9615 </param>
9616 </method>
9617
9618 </interface>
9619
9620
9621 <!--
9622 // IHardDiskFormat
9623 /////////////////////////////////////////////////////////////////////////
9624 -->
9625
9626 <enum
9627 name="DataType"
9628 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9629 >
9630 <const name="Int32" value="0"/>
9631 <const name="Int8" value="1"/>
9632 <const name="String" value="2"/>
9633 </enum>
9634
9635 <enum
9636 name="DataFlags"
9637 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9638 >
9639 <const name="None" value="0x00"/>
9640 <const name="Mandatory" value="0x01"/>
9641 <const name="Expert" value="0x02"/>
9642 <const name="Array" value="0x04"/>
9643 <const name="FlagMask" value="0x07"/>
9644 </enum>
9645
9646 <enum
9647 name="HardDiskFormatCapabilities"
9648 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9649 >
9650 <desc>
9651 Hard disk format capability flags.
9652 </desc>
9653
9654 <const name="Uuid" value="0x01">
9655 <desc>
9656 Supports UUIDs as expected by VirtualBox code.
9657 </desc>
9658 </const>
9659
9660 <const name="CreateFixed" value="0x02">
9661 <desc>
9662 Supports creating fixed size images, allocating all space instantly.
9663 </desc>
9664 </const>
9665
9666 <const name="CreateDynamic" value="0x04">
9667 <desc>
9668 Supports creating dynamically growing images, allocating space on
9669 demand.
9670 </desc>
9671 </const>
9672
9673 <const name="CreateSplit2G" value="0x08">
9674 <desc>
9675 Supports creating images split in chunks of a bit less than 2 GBytes.
9676 </desc>
9677 </const>
9678
9679 <const name="Differencing" value="0x10">
9680 <desc>
9681 Supports being used as a format for differencing hard disks (see <link
9682 to="IHardDisk::createDiffStorage"/>).
9683 </desc>
9684 </const>
9685
9686 <const name="Asynchronous" value="0x20">
9687 <desc>
9688 Supports asynchronous I/O operations for at least some configurations.
9689 </desc>
9690 </const>
9691
9692 <const name="File" value="0x40">
9693 <desc>
9694 The format backend operates on files (the <link to="IMedium::location"/>
9695 attribute of the hard disk specifies a file used to store hard disk
9696 data; for a list of supported file extensions see
9697 <link to="IHardDiskFormat::fileExtensions"/>).
9698 </desc>
9699 </const>
9700
9701 <const name="Properties" value="0x80">
9702 <desc>
9703 The format backend uses the property interface to configure the storage
9704 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9705 method is used to get access to properties supported by the given hard
9706 disk format).
9707 </desc>
9708 </const>
9709
9710 <const name="CapabilityMask" value="0xFF"/>
9711 </enum>
9712
9713 <interface
9714 name="IHardDiskFormat" extends="$unknown"
9715 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9716 wsmap="managed"
9717 >
9718 <desc>
9719 The IHardDiskFormat interface represents a virtual hard disk format.
9720
9721 Each hard disk format has an associated backend which is used to handle
9722 hard disks stored in this format. This interface provides information
9723 about the properties of the associated backend.
9724
9725 Each hard disk format is identified by a string represented by the
9726 <link to="#id"/> attribute. This string is used in calls like
9727 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9728 format.
9729
9730 The list of all supported hard disk formats can be obtained using
9731 <link to="ISystemProperties::hardDiskFormats"/>.
9732
9733 <see>IHardDisk</see>
9734 </desc>
9735
9736 <attribute name="id" type="wstring" readonly="yes">
9737 <desc>
9738 Identifier of this format.
9739
9740 The format identifier is a non-@c null non-empty ASCII string. Note that
9741 this string is case-insensitive. This means that, for example, all of
9742 the following strings:
9743 <pre>
9744 "VDI"
9745 "vdi"
9746 "VdI"</pre>
9747 refer to the same hard disk format.
9748
9749 This string is used in methods of other interfaces where it is necessary
9750 to specify a hard disk format, such as
9751 <link to="IVirtualBox::createHardDisk"/>.
9752 </desc>
9753 </attribute>
9754
9755 <attribute name="name" type="wstring" readonly="yes">
9756 <desc>
9757 Human readable description of this format.
9758
9759 Mainly for use in file open dialogs.
9760 </desc>
9761 </attribute>
9762
9763 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9764 <desc>
9765 Array of strings containing the supported file extensions.
9766
9767 The first extension in the array is the extension preferred by the
9768 backend. It is recommended to use this extension when specifying a
9769 location of the storage unit for a new hard disk.
9770
9771 Note that some backends do not work on files, so this array may be
9772 empty.
9773
9774 <see>IHardDiskFormat::capabilities</see>
9775 </desc>
9776 </attribute>
9777
9778 <attribute name="capabilities" type="unsigned long" readonly="yes">
9779 <desc>
9780 Capabilities of the format as a set of bit flags.
9781
9782 For the meaning of individual capability flags see
9783 <link to="HardDiskFormatCapabilities"/>.
9784 </desc>
9785 </attribute>
9786
9787 <method name="describeProperties">
9788 <desc>
9789 Returns several arrays describing the properties supported by this
9790 format.
9791
9792 An element with the given index in each array describes one
9793 property. Thus, the number of elements in each returned array is the
9794 same and corresponds to the number of supported properties.
9795
9796 The returned arrays are filled in only if the
9797 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9798 All arguments must be non-@c null.
9799
9800 <see>DataType</see>
9801 <see>DataFlags</see>
9802 </desc>
9803
9804 <param name="names" type="wstring" safearray="yes" dir="out">
9805 <desc>Array of property names.</desc>
9806 </param>
9807 <param name="description" type="wstring" safearray="yes" dir="out">
9808 <desc>Array of property descriptions.</desc>
9809 </param>
9810 <param name="types" type="DataType" safearray="yes" dir="out">
9811 <desc>Array of property types.</desc>
9812 </param>
9813 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9814 <desc>Array of property flags.</desc>
9815 </param>
9816 <param name="defaults" type="wstring" safearray="yes" dir="out">
9817 <desc>Array of default property values.</desc>
9818 </param>
9819 </method>
9820
9821 </interface>
9822
9823
9824 <!--
9825 // IFloppyImage
9826 /////////////////////////////////////////////////////////////////////////
9827 -->
9828
9829 <interface
9830 name="IFloppyImage" extends="IMedium"
9831 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9832 wsmap="managed"
9833 >
9834 <desc>
9835 The IFloppyImage interface represents a medium containing the image
9836 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9837 </desc>
9838
9839 </interface>
9840
9841
9842 <!--
9843 // IDVDImage
9844 /////////////////////////////////////////////////////////////////////////
9845 -->
9846
9847 <interface
9848 name="IDVDImage" extends="IMedium"
9849 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9850 wsmap="managed"
9851 >
9852 <desc>
9853 The IDVDImage interface represents a medium containing the image
9854 of a CD or DVD disk in the ISO format.
9855
9856 This is a subclass of <link to="IMedium" />; see remarks there.
9857 </desc>
9858
9859 </interface>
9860
9861
9862 <!--
9863 // IDVDDrive
9864 /////////////////////////////////////////////////////////////////////////
9865 -->
9866
9867 <interface
9868 name="IDVDDrive" extends="$unknown"
9869 uuid="156944d1-4c6d-4812-8f12-ab3890767ab4"
9870 wsmap="managed"
9871 >
9872 <desc>
9873 The IDVDDrive interface represents the virtual CD/DVD drive of the
9874 virtual machine. An object of this type is returned by
9875 <link to="IMachine::DVDDrive"/>.
9876 </desc>
9877
9878 <attribute name="state" type="DriveState" readonly="yes">
9879 <desc>Current drive state.</desc>
9880 </attribute>
9881
9882 <attribute name="passthrough" type="boolean">
9883 <desc>
9884 When a host drive is mounted and passthrough is enabled
9885 the guest OS will be able to directly send SCSI commands to
9886 the host drive. This enables the guest OS to use CD/DVD writers
9887 but is potentially dangerous.
9888 </desc>
9889 </attribute>
9890
9891 <method name="mountImage">
9892 <desc>Mounts a CD/DVD image with the specified UUID.
9893
9894 <result name="VBOX_E_FILE_ERROR">
9895 Invalid image file location.
9896 </result>
9897 <result name="VBOX_E_OBJECT_NOT_FOUND">
9898 Could not find a CD/DVD image matching @a imageId.
9899 </result>
9900 <result name="VBOX_E_INVALID_OBJECT_STATE">
9901 Invalid media state.
9902 </result>
9903
9904 </desc>
9905 <param name="imageId" type="wstring" dir="in"/>
9906 </method>
9907
9908 <method name="captureHostDrive">
9909 <desc>Captures the specified host CD/DVD drive.</desc>
9910 <param name="drive" type="IHostDVDDrive" dir="in"/>
9911 </method>
9912
9913 <method name="unmount">
9914 <desc>Unmounts the currently mounted image or host drive.</desc>
9915 </method>
9916
9917 <method name="getImage">
9918 <desc>Returns the currently mounted CD/DVD image.</desc>
9919 <param name="image" type="IDVDImage" dir="return"/>
9920 </method>
9921
9922 <method name="getHostDrive">
9923 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9924 <param name="drive" type="IHostDVDDrive" dir="return"/>
9925 </method>
9926
9927 </interface>
9928
9929
9930 <!--
9931 // IFloppyDrive
9932 /////////////////////////////////////////////////////////////////////////
9933 -->
9934
9935 <interface
9936 name="IFloppyDrive" extends="$unknown"
9937 uuid="a8676d38-5cf0-4b53-85b1-aa693611ab86"
9938 wsmap="managed"
9939 >
9940 <desc>
9941 The IFloppyDrive interface represents the virtual floppy drive of the
9942 virtual machine. An object of this type is returned by
9943 <link to="IMachine::floppyDrive" />.
9944 </desc>
9945
9946 <attribute name="enabled" type="boolean">
9947 <desc>
9948 Flag whether the floppy drive is enabled. If it is disabled,
9949 the floppy drive will not be reported to the guest OS.
9950 </desc>
9951 </attribute>
9952
9953 <attribute name="state" type="DriveState" readonly="yes">
9954 <desc>Current drive state.</desc>
9955 </attribute>
9956
9957 <method name="mountImage">
9958 <desc>Mounts a floppy image with the specified UUID.
9959
9960 <result name="VBOX_E_FILE_ERROR">
9961 Invalid image file location.
9962 </result>
9963 <result name="VBOX_E_OBJECT_NOT_FOUND">
9964 Could not find a floppy image matching @a imageID.
9965 </result>
9966 <result name="VBOX_E_INVALID_OBJECT_STATE">
9967 Invalid media state.
9968 </result>
9969
9970 </desc>
9971 <param name="imageId" type="wstring" dir="in"/>
9972 </method>
9973
9974 <method name="captureHostDrive">
9975 <desc>Captures the specified host floppy drive.</desc>
9976 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9977 </method>
9978
9979 <method name="unmount">
9980 <desc>Unmounts the currently mounted image or host drive.</desc>
9981 </method>
9982
9983 <method name="getImage">
9984 <desc>Returns the currently mounted floppy image.</desc>
9985 <param name="image" type="IFloppyImage" dir="return"/>
9986 </method>
9987
9988 <method name="getHostDrive">
9989 <desc>Returns the currently mounted host floppy drive.</desc>
9990 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9991 </method>
9992
9993 </interface>
9994
9995
9996 <!--
9997 // IKeyboard
9998 /////////////////////////////////////////////////////////////////////////
9999 -->
10000
10001 <interface
10002 name="IKeyboard" extends="$unknown"
10003 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10004 wsmap="managed"
10005 >
10006 <desc>
10007 The IKeyboard interface represents the virtual machine's keyboard. Used
10008 in <link to="IConsole::keyboard"/>.
10009
10010 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10011 to the virtual machine.
10012
10013 </desc>
10014 <method name="putScancode">
10015 <desc>Sends a scancode to the keyboard.
10016
10017 <result name="VBOX_E_IPRT_ERROR">
10018 Could not send scan code to virtual keyboard.
10019 </result>
10020
10021 </desc>
10022 <param name="scancode" type="long" dir="in"/>
10023 </method>
10024
10025 <method name="putScancodes">
10026 <desc>Sends an array of scancodes to the keyboard.
10027
10028 <result name="VBOX_E_IPRT_ERROR">
10029 Could not send all scan codes to virtual keyboard.
10030 </result>
10031
10032 </desc>
10033 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10034 <param name="codesStored" type="unsigned long" dir="return"/>
10035 </method>
10036
10037 <method name="putCAD">
10038 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10039 function is nothing special, it is just a convenience function
10040 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10041
10042 <result name="VBOX_E_IPRT_ERROR">
10043 Could not send all scan codes to virtual keyboard.
10044 </result>
10045
10046 </desc>
10047 </method>
10048
10049 </interface>
10050
10051
10052 <!--
10053 // IMouse
10054 /////////////////////////////////////////////////////////////////////////
10055 -->
10056
10057 <enum
10058 name="MouseButtonState"
10059 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
10060 >
10061 <desc>
10062 Mouse button state.
10063 </desc>
10064
10065 <const name="LeftButton" value="0x01"/>
10066 <const name="RightButton" value="0x02"/>
10067 <const name="MiddleButton" value="0x04"/>
10068 <const name="WheelUp" value="0x08"/>
10069 <const name="WheelDown" value="0x10"/>
10070 <const name="MouseStateMask" value="0x1F"/>
10071 </enum>
10072
10073 <interface
10074 name="IMouse" extends="$unknown"
10075 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
10076 wsmap="managed"
10077 >
10078 <desc>
10079 The IMouse interface represents the virtual machine's mouse. Used in
10080 <link to="IConsole::mouse"/>.
10081
10082 Through this interface, the virtual machine's virtual mouse can be
10083 controlled.
10084 </desc>
10085
10086 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10087 <desc>
10088 Whether the guest OS supports absolute mouse pointer positioning
10089 or not.
10090 <note>
10091 VirtualBox Guest Tools need to be installed to the guest OS
10092 in order to enable absolute mouse positioning support.
10093 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10094 callback to be instantly informed about changes of this attribute
10095 during virtual machine execution.
10096 </note>
10097 <see><link to="#putMouseEventAbsolute"/></see>
10098 </desc>
10099 </attribute>
10100
10101 <method name="putMouseEvent">
10102 <desc>
10103 Initiates a mouse event using relative pointer movements
10104 along x and y axis.
10105
10106 <result name="E_ACCESSDENIED">
10107 Console not powered up.
10108 </result>
10109 <result name="VBOX_E_IPRT_ERROR">
10110 Could not send mouse event to virtual mouse.
10111 </result>
10112
10113 </desc>
10114
10115 <param name="dx" type="long" dir="in">
10116 <desc>
10117 Amount of pixels the mouse should move to the right.
10118 Negative values move the mouse to the left.
10119 </desc>
10120 </param>
10121 <param name="dy" type="long" dir="in">
10122 <desc>
10123 Amount of pixels the mouse should move downwards.
10124 Negative values move the mouse upwards.
10125 </desc>
10126 </param>
10127 <param name="dz" type="long" dir="in">
10128 <desc>
10129 Amount of mouse wheel moves.
10130 Positive values describe clockwise wheel rotations,
10131 negative values describe counterclockwise rotations.
10132 </desc>
10133 </param>
10134 <param name="buttonState" type="long" dir="in">
10135 <desc>
10136 The current state of mouse buttons. Every bit represents
10137 a mouse button as follows:
10138 <table>
10139 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10140 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10141 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10142 </table>
10143 A value of <tt>1</tt> means the corresponding button is pressed.
10144 otherwise it is released.
10145 </desc>
10146 </param>
10147 </method>
10148
10149 <method name="putMouseEventAbsolute">
10150 <desc>
10151 Positions the mouse pointer using absolute x and y coordinates.
10152 These coordinates are expressed in pixels and
10153 start from <tt>[1,1]</tt> which corresponds to the top left
10154 corner of the virtual display.
10155
10156 <result name="E_ACCESSDENIED">
10157 Console not powered up.
10158 </result>
10159 <result name="VBOX_E_IPRT_ERROR">
10160 Could not send mouse event to virtual mouse.
10161 </result>
10162
10163 <note>
10164 This method will have effect only if absolute mouse
10165 positioning is supported by the guest OS.
10166 </note>
10167
10168 <see><link to="#absoluteSupported"/></see>
10169 </desc>
10170
10171 <param name="x" type="long" dir="in">
10172 <desc>
10173 X coordinate of the pointer in pixels, starting from @c 1.
10174 </desc>
10175 </param>
10176 <param name="y" type="long" dir="in">
10177 <desc>
10178 Y coordinate of the pointer in pixels, starting from @c 1.
10179 </desc>
10180 </param>
10181 <param name="dz" type="long" dir="in">
10182 <desc>
10183 Amount of mouse wheel moves.
10184 Positive values describe clockwise wheel rotations,
10185 negative values describe counterclockwise rotations.
10186 </desc>
10187 </param>
10188 <param name="buttonState" type="long" dir="in">
10189 <desc>
10190 The current state of mouse buttons. Every bit represents
10191 a mouse button as follows:
10192 <table>
10193 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10194 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10195 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10196 </table>
10197 A value of @c 1 means the corresponding button is pressed.
10198 otherwise it is released.
10199 </desc>
10200 </param>
10201 </method>
10202
10203 </interface>
10204
10205 <!--
10206 // IDisplay
10207 /////////////////////////////////////////////////////////////////////////
10208 -->
10209
10210 <enum
10211 name="FramebufferPixelFormat"
10212 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10213 >
10214 <desc>
10215 Format of the video memory buffer. Constants represented by this enum can
10216 be used to test for particular values of <link
10217 to="IFramebuffer::pixelFormat"/>. See also <link
10218 to="IFramebuffer::requestResize"/>.
10219
10220 See also www.fourcc.org for more information about FOURCC pixel formats.
10221 </desc>
10222
10223 <const name="Opaque" value="0">
10224 <desc>
10225 Unknown buffer format (the user may not assume any particular format of
10226 the buffer).
10227 </desc>
10228 </const>
10229 <const name="FOURCC_RGB" value="0x32424752">
10230 <desc>
10231 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10232 bit layout).
10233 </desc>
10234 </const>
10235 </enum>
10236
10237 <interface
10238 name="IFramebuffer" extends="$unknown"
10239 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10240 wsmap="suppress"
10241 >
10242 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10243 <desc>Address of the start byte of the frame buffer.</desc>
10244 </attribute>
10245
10246 <attribute name="width" type="unsigned long" readonly="yes">
10247 <desc>Frame buffer width, in pixels.</desc>
10248 </attribute>
10249
10250 <attribute name="height" type="unsigned long" readonly="yes">
10251 <desc>Frame buffer height, in pixels.</desc>
10252 </attribute>
10253
10254 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10255 <desc>
10256 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10257 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10258 are: 8, 15, 16, 24 and 32.
10259 </desc>
10260 </attribute>
10261
10262 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10263 <desc>
10264 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10265 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10266 size of the scan line must be aligned to 32 bits.
10267 </desc>
10268 </attribute>
10269
10270 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10271 <desc>
10272 Frame buffer pixel format. It's either one of the values defined by <link
10273 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10274 <note>
10275 This attribute must never return <link
10276 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10277 <link to="#address"/> points to must be always known.
10278 </note>
10279 </desc>
10280 </attribute>
10281
10282 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10283 <desc>
10284 Defines whether this frame buffer uses the virtual video card's memory
10285 buffer (guest VRAM) directly or not. See <link
10286 to="IFramebuffer::requestResize"/> for more information.
10287 </desc>
10288 </attribute>
10289
10290 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10291 <desc>
10292 Hint from the frame buffer about how much of the standard
10293 screen height it wants to use for itself. This information is
10294 exposed to the guest through the VESA BIOS and VMMDev interface
10295 so that it can use it for determining its video mode table. It
10296 is not guaranteed that the guest respects the value.
10297 </desc>
10298 </attribute>
10299
10300 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10301 <desc>
10302 An alpha-blended overlay which is superposed over the frame buffer.
10303 The initial purpose is to allow the display of icons providing
10304 information about the VM state, including disk activity, in front
10305 ends which do not have other means of doing that. The overlay is
10306 designed to controlled exclusively by IDisplay. It has no locking
10307 of its own, and any changes made to it are not guaranteed to be
10308 visible until the affected portion of IFramebuffer is updated. The
10309 overlay can be created lazily the first time it is requested. This
10310 attribute can also return @c null to signal that the overlay is not
10311 implemented.
10312 </desc>
10313 </attribute>
10314
10315 <attribute name="winId" type="unsigned long long" readonly="yes">
10316 <desc>
10317 Platform-dependent identifier of the window where context of this
10318 frame buffer is drawn, or zero if there's no such window.
10319 </desc>
10320 </attribute>
10321
10322 <method name="lock">
10323 <desc>
10324 Locks the frame buffer.
10325 Gets called by the IDisplay object where this frame buffer is
10326 bound to.
10327 </desc>
10328 </method>
10329
10330 <method name="unlock">
10331 <desc>
10332 Unlocks the frame buffer.
10333 Gets called by the IDisplay object where this frame buffer is
10334 bound to.
10335 </desc>
10336 </method>
10337
10338 <method name="notifyUpdate">
10339 <desc>
10340 Informs about an update.
10341 Gets called by the display object where this buffer is
10342 registered.
10343 </desc>
10344 <param name="x" type="unsigned long" dir="in"/>
10345 <param name="y" type="unsigned long" dir="in"/>
10346 <param name="width" type="unsigned long" dir="in"/>
10347 <param name="height" type="unsigned long" dir="in"/>
10348 </method>
10349
10350 <method name="requestResize">
10351 <desc>
10352 Requests a size and pixel format change.
10353
10354 There are two modes of working with the video buffer of the virtual
10355 machine. The <i>indirect</i> mode implies that the IFramebuffer
10356 implementation allocates a memory buffer for the requested display mode
10357 and provides it to the virtual machine. In <i>direct</i> mode, the
10358 IFramebuffer implementation uses the memory buffer allocated and owned
10359 by the virtual machine. This buffer represents the video memory of the
10360 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10361 usually faster because the implementation gets a raw pointer to the
10362 guest VRAM buffer which it can directly use for visualizing the contents
10363 of the virtual display, as opposed to the indirect mode where the
10364 contents of guest VRAM are copied to the memory buffer provided by
10365 the implementation every time a display update occurs.
10366
10367 It is important to note that the direct mode is really fast only when
10368 the implementation uses the given guest VRAM buffer directly, for
10369 example, by blitting it to the window representing the virtual machine's
10370 display, which saves at least one copy operation comparing to the
10371 indirect mode. However, using the guest VRAM buffer directly is not
10372 always possible: the format and the color depth of this buffer may be
10373 not supported by the target window, or it may be unknown (opaque) as in
10374 case of text or non-linear multi-plane VGA video modes. In this case,
10375 the indirect mode (that is always available) should be used as a
10376 fallback: when the guest VRAM contents are copied to the
10377 implementation-provided memory buffer, color and format conversion is
10378 done automatically by the underlying code.
10379
10380 The @a pixelFormat parameter defines whether the direct mode is
10381 available or not. If @a pixelFormat is <link
10382 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10383 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10384 @a bytesPerLine parameters must be ignored and the implementation must use
10385 the indirect mode (where it provides its own buffer in one of the
10386 supported formats). In all other cases, @a pixelFormat together with
10387 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10388 buffer pointed to by the @a VRAM parameter and the implementation is
10389 free to choose which mode to use. To indicate that this frame buffer uses
10390 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10391 attribute must return @c true and <link to="#address"/> must
10392 return exactly the same address that is passed in the @a VRAM parameter
10393 of this method; otherwise it is assumed that the indirect strategy is
10394 chosen.
10395
10396 The @a width and @a height parameters represent the size of the
10397 requested display mode in both modes. In case of indirect mode, the
10398 provided memory buffer should be big enough to store data of the given
10399 display mode. In case of direct mode, it is guaranteed that the given
10400 @a VRAM buffer contains enough space to represent the display mode of the
10401 given size. Note that this frame buffer's <link to="#width"/> and <link
10402 to="#height"/> attributes must return exactly the same values as
10403 passed to this method after the resize is completed (see below).
10404
10405 The @a finished output parameter determines if the implementation has
10406 finished resizing the frame buffer or not. If, for some reason, the
10407 resize cannot be finished immediately during this call, @a finished
10408 must be set to @c false, and the implementation must call
10409 <link to="IDisplay::resizeCompleted"/> after it has returned from
10410 this method as soon as possible. If @a finished is @c false, the
10411 machine will not call any frame buffer methods until
10412 <link to="IDisplay::resizeCompleted"/> is called.
10413
10414 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10415 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10416 this frame buffer must return exactly the same values as specified in the
10417 parameters of this method, after the resize is completed. If the
10418 indirect mode is chosen, these attributes must return values describing
10419 the format of the implementation's own memory buffer <link
10420 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10421 value must always correlate with <link to="#pixelFormat"/>. Note that
10422 the <link to="#pixelFormat"/> attribute must never return <link
10423 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10424
10425 <note>
10426 This method is called by the IDisplay object under the
10427 <link to="#lock"/> provided by this IFramebuffer
10428 implementation. If this method returns @c false in @a finished, then
10429 this lock is not released until
10430 <link to="IDisplay::resizeCompleted"/> is called.
10431 </note>
10432 </desc>
10433 <param name="screenId" type="unsigned long" dir="in">
10434 <desc>
10435 Logical screen number. Must be used in the corresponding call to
10436 <link to="IDisplay::resizeCompleted"/> if this call is made.
10437 </desc>
10438 </param>
10439 <param name="pixelFormat" type="unsigned long" dir="in">
10440 <desc>
10441 Pixel format of the memory buffer pointed to by @a VRAM.
10442 See also <link to="FramebufferPixelFormat"/>.
10443 </desc>
10444 </param>
10445 <param name="VRAM" type="octet" mod="ptr" dir="in">
10446 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10447 </param>
10448 <param name="bitsPerPixel" type="unsigned long" dir="in">
10449 <desc>Color depth, bits per pixel.</desc>
10450 </param>
10451 <param name="bytesPerLine" type="unsigned long" dir="in">
10452 <desc>Size of one scan line, in bytes.</desc>
10453 </param>
10454 <param name="width" type="unsigned long" dir="in">
10455 <desc>Width of the guest display, in pixels.</desc>
10456 </param>
10457 <param name="height" type="unsigned long" dir="in">
10458 <desc>Height of the guest display, in pixels.</desc>
10459 </param>
10460 <param name="finished" type="boolean" dir="return">
10461 <desc>
10462 Can the VM start using the new frame buffer immediately
10463 after this method returns or it should wait for
10464 <link to="IDisplay::resizeCompleted"/>.
10465 </desc>
10466 </param>
10467 </method>
10468
10469 <method name="videoModeSupported">
10470 <desc>
10471 Returns whether the frame buffer implementation is willing to
10472 support a given video mode. In case it is not able to render
10473 the video mode (or for some reason not willing), it should
10474 return @c false. Usually this method is called when the guest
10475 asks the VMM device whether a given video mode is supported
10476 so the information returned is directly exposed to the guest.
10477 It is important that this method returns very quickly.
10478 </desc>
10479 <param name="width" type="unsigned long" dir="in"/>
10480 <param name="height" type="unsigned long" dir="in"/>
10481 <param name="bpp" type="unsigned long" dir="in"/>
10482 <param name="supported" type="boolean" dir="return"/>
10483 </method>
10484
10485 <method name="getVisibleRegion">
10486 <desc>
10487 Returns the visible region of this frame buffer.
10488
10489 If the @a rectangles parameter is @c null then the value of the
10490 @a count parameter is ignored and the number of elements necessary to
10491 describe the current visible region is returned in @a countCopied.
10492
10493 If @a rectangles is not @c null but @a count is less
10494 than the required number of elements to store region data, the method
10495 will report a failure. If @a count is equal or greater than the
10496 required number of elements, then the actual number of elements copied
10497 to the provided array will be returned in @a countCopied.
10498
10499 <note>
10500 The address of the provided array must be in the process space of
10501 this IFramebuffer object.
10502 </note>
10503 <note>
10504 Method not yet implemented.
10505 </note>
10506 </desc>
10507 <param name="rectangles" type="octet" mod="ptr" dir="in">
10508 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10509 </param>
10510 <param name="count" type="unsigned long" dir="in">
10511 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10512 </param>
10513 <param name="countCopied" type="unsigned long" dir="return">
10514 <desc>Number of elements copied to the @a rectangles array.</desc>
10515 </param>
10516 </method>
10517
10518 <method name="setVisibleRegion">
10519 <desc>
10520 Suggests a new visible region to this frame buffer. This region
10521 represents the area of the VM display which is a union of regions of
10522 all top-level windows of the guest operating system running inside the
10523 VM (if the Guest Additions for this system support this
10524 functionality). This information may be used by the frontends to
10525 implement the seamless desktop integration feature.
10526
10527 <note>
10528 The address of the provided array must be in the process space of
10529 this IFramebuffer object.
10530 </note>
10531 <note>
10532 The IFramebuffer implementation must make a copy of the provided
10533 array of rectangles.
10534 </note>
10535 <note>
10536 Method not yet implemented.
10537 </note>
10538 </desc>
10539 <param name="rectangles" type="octet" mod="ptr" dir="in">
10540 <desc>Pointer to the @c RTRECT array.</desc>
10541 </param>
10542 <param name="count" type="unsigned long" dir="in">
10543 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10544 </param>
10545 </method>
10546
10547 <method name="processVHWACommand">
10548 <desc>
10549 Posts a Video HW Acceleration Command to the frame buffer for processing.
10550 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10551 are posted from quest to the host to be processed by the host hardware.
10552
10553 <note>
10554 The address of the provided command must be in the process space of
10555 this IFramebuffer object.
10556 </note>
10557 </desc>
10558
10559 <param name="command" type="octet" mod="ptr" dir="in">
10560 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10561 </param>
10562 </method>
10563
10564 </interface>
10565
10566 <interface
10567 name="IFramebufferOverlay" extends="IFramebuffer"
10568 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10569 wsmap="suppress"
10570 >
10571 <desc>
10572 The IFramebufferOverlay interface represents an alpha blended overlay
10573 for displaying status icons above an IFramebuffer. It is always created
10574 not visible, so that it must be explicitly shown. It only covers a
10575 portion of the IFramebuffer, determined by its width, height and
10576 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10577 that order) format, and may be written to directly. Do re-read the
10578 width though, after setting it, as it may be adjusted (increased) to
10579 make it more suitable for the front end.
10580 </desc>
10581 <attribute name="x" type="unsigned long" readonly="yes">
10582 <desc>X position of the overlay, relative to the frame buffer.</desc>
10583 </attribute>
10584
10585 <attribute name="y" type="unsigned long" readonly="yes">
10586 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10587 </attribute>
10588
10589 <attribute name="visible" type="boolean" readonly="no">
10590 <desc>
10591 Whether the overlay is currently visible.
10592 </desc>
10593 </attribute>
10594
10595 <attribute name="alpha" type="unsigned long" readonly="no">
10596 <desc>
10597 The global alpha value for the overlay. This may or may not be
10598 supported by a given front end.
10599 </desc>
10600 </attribute>
10601
10602 <method name="move">
10603 <desc>
10604 Changes the overlay's position relative to the IFramebuffer.
10605 </desc>
10606 <param name="x" type="unsigned long" dir="in"/>
10607 <param name="y" type="unsigned long" dir="in"/>
10608 </method>
10609
10610 </interface>
10611
10612 <interface
10613 name="IDisplay" extends="$unknown"
10614 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10615 wsmap="managed"
10616 >
10617 <desc>
10618 The IDisplay interface represents the virtual machine's display.
10619
10620 The object implementing this interface is contained in each
10621 <link to="IConsole::display"/> attribute and represents the visual
10622 output of the virtual machine.
10623
10624 The virtual display supports pluggable output targets represented by the
10625 IFramebuffer interface. Examples of the output target are a window on
10626 the host computer or an RDP session's display on a remote computer.
10627 </desc>
10628 <attribute name="width" type="unsigned long" readonly="yes">
10629 <desc>Current display width.</desc>
10630 </attribute>
10631
10632 <attribute name="height" type="unsigned long" readonly="yes">
10633 <desc>Current display height.</desc>
10634 </attribute>
10635
10636 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10637 <desc>
10638 Current guest display color depth. Note that this may differ
10639 from <link to="IFramebuffer::bitsPerPixel"/>.
10640 </desc>
10641 </attribute>
10642
10643 <method name="setFramebuffer">
10644 <desc>
10645 Sets the framebuffer for given screen.
10646 </desc>
10647 <param name="screenId" type="unsigned long" dir="in"/>
10648 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10649 </method>
10650
10651 <method name="getFramebuffer">
10652 <desc>
10653 Queries the framebuffer for given screen.
10654 </desc>
10655 <param name="screenId" type="unsigned long" dir="in"/>
10656 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10657 <param name="xOrigin" type="long" dir="out"/>
10658 <param name="yOrigin" type="long" dir="out"/>
10659 </method>
10660
10661 <method name="setVideoModeHint">
10662 <desc>
10663 Asks VirtualBox to request the given video mode from
10664 the guest. This is just a hint and it cannot be guaranteed
10665 that the requested resolution will be used. Guest Additions
10666 are required for the request to be seen by guests. The caller
10667 should issue the request and wait for a resolution change and
10668 after a timeout retry.
10669
10670 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10671 parameters means that the corresponding values should be taken from the
10672 current video mode (i.e. left unchanged).
10673
10674 If the guest OS supports multi-monitor configuration then the @a display
10675 parameter specifies the number of the guest display to send the hint to:
10676 @c 0 is the primary display, @c 1 is the first secondary and
10677 so on. If the multi-monitor configuration is not supported, @a display
10678 must be @c 0.
10679
10680 <result name="E_INVALIDARG">
10681 The @a display is not associated with any monitor.
10682 </result>
10683
10684 </desc>
10685 <param name="width" type="unsigned long" dir="in"/>
10686 <param name="height" type="unsigned long" dir="in"/>
10687 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10688 <param name="display" type="unsigned long" dir="in"/>
10689 </method>
10690
10691 <method name="setSeamlessMode">
10692 <desc>
10693 Enables or disables seamless guest display rendering (seamless desktop
10694 integration) mode.
10695 <note>
10696 Calling this method has no effect if <link
10697 to="IGuest::supportsSeamless"/> returns @c false.
10698 </note>
10699 </desc>
10700 <param name="enabled" type="boolean" dir="in"/>
10701 </method>
10702
10703 <method name="takeScreenShot">
10704 <desc>
10705 Takes a screen shot of the requested size and copies it to the
10706 32-bpp buffer allocated by the caller and pointed to by @a address.
10707
10708 <note>This API can be used only by the COM/XPCOM C++ API as it
10709 requires pointer support. Use <link to="#takeScreenShotSlow" />
10710 with other language bindings.
10711 </note>
10712
10713 <result name="E_NOTIMPL">
10714 Feature not implemented.
10715 </result>
10716 <result name="VBOX_E_IPRT_ERROR">
10717 Could not take a screenshot.
10718 </result>
10719
10720 </desc>
10721 <param name="address" type="octet" mod="ptr" dir="in"/>
10722 <param name="width" type="unsigned long" dir="in"/>
10723 <param name="height" type="unsigned long" dir="in"/>
10724 </method>
10725
10726 <method name="takeScreenShotSlow">
10727 <desc>
10728 Takes a guest screen shot of the requested size and returns it as
10729 an array of bytes in uncompressed 32-bit ARGB format.
10730 This API is slow, but could be the only option to get guest screenshot
10731 for scriptable languages not allowed to manipulate with addresses
10732 directly.
10733
10734 <result name="E_NOTIMPL">
10735 Feature not implemented.
10736 </result>
10737 <result name="VBOX_E_IPRT_ERROR">
10738 Could not take a screenshot.
10739 </result>
10740 </desc>
10741 <param name="width" type="unsigned long" dir="in">
10742 <desc>
10743 Desired image width.
10744 </desc>
10745 </param>
10746 <param name="height" type="unsigned long" dir="in">
10747 <desc>
10748 Desired image height.
10749 </desc>
10750 </param>
10751 <param name="screenData" type="octet" dir="return" safearray="yes">
10752 <desc>
10753 Array with resulting screen data.
10754 </desc>
10755 </param>
10756 </method>
10757
10758 <method name="drawToScreen">
10759 <desc>
10760 Draws a 32-bpp image of the specified size from the given buffer
10761 to the given point on the VM display.
10762
10763 <result name="E_NOTIMPL">
10764 Feature not implemented.
10765 </result>
10766 <result name="VBOX_E_IPRT_ERROR">
10767 Could not draw to screen.
10768 </result>
10769
10770 </desc>
10771 <param name="address" type="octet" mod="ptr" dir="in"/>
10772 <param name="x" type="unsigned long" dir="in"/>
10773 <param name="y" type="unsigned long" dir="in"/>
10774 <param name="width" type="unsigned long" dir="in"/>
10775 <param name="height" type="unsigned long" dir="in"/>
10776 </method>
10777
10778 <method name="invalidateAndUpdate">
10779 <desc>
10780 Does a full invalidation of the VM display and instructs the VM
10781 to update it.
10782
10783 <result name="VBOX_E_IPRT_ERROR">
10784 Could not invalidate and update screen.
10785 </result>
10786
10787 </desc>
10788 </method>
10789
10790 <method name="resizeCompleted">
10791 <desc>
10792 Signals that a framebuffer has completed the resize operation.
10793
10794 <result name="VBOX_E_NOT_SUPPORTED">
10795 Operation only valid for external frame buffers.
10796 </result>
10797
10798 </desc>
10799 <param name="screenId" type="unsigned long" dir="in"/>
10800 </method>
10801
10802 <method name="updateCompleted">
10803 <desc>
10804 Signals that a framebuffer has completed the update operation.
10805
10806 <result name="VBOX_E_NOT_SUPPORTED">
10807 Operation only valid for external frame buffers.
10808 </result>
10809
10810 </desc>
10811 </method>
10812
10813 <method name="completeVHWACommand">
10814 <desc>
10815 Signals that the Video HW Acceleration command has completed.
10816 </desc>
10817
10818 <param name="command" type="octet" mod="ptr" dir="in">
10819 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10820 </param>
10821 </method>
10822
10823 </interface>
10824
10825 <!--
10826 // INetworkAdapter
10827 /////////////////////////////////////////////////////////////////////////
10828 -->
10829
10830 <enum
10831 name="NetworkAttachmentType"
10832 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10833 >
10834 <desc>
10835 Network attachment type.
10836 </desc>
10837
10838 <const name="Null" value="0">
10839 <desc>Null value, also means "not attached".</desc>
10840 </const>
10841 <const name="NAT" value="1"/>
10842 <const name="Bridged" value="2"/>
10843 <const name="Internal" value="3"/>
10844 <const name="HostOnly" value="4"/>
10845 </enum>
10846
10847 <enum
10848 name="NetworkAdapterType"
10849 uuid="50c3dfd8-07ac-4a31-baac-519c828fbf97"
10850 >
10851 <desc>
10852 Network adapter type.
10853 </desc>
10854
10855 <const name="Null" value="0">
10856 <desc>Null value (never used by the API).</desc>
10857 </const>
10858 <const name="Am79C970A" value="1">
10859 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10860 </const>
10861 <const name="Am79C973" value="2">
10862 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10863 </const>
10864 <const name="I82540EM" value="3">
10865 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10866 </const>
10867 <const name="I82543GC" value="4">
10868 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10869 </const>
10870 <const name="I82545EM" value="5">
10871 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10872 </const>
10873 </enum>
10874
10875 <interface
10876 name="INetworkAdapter" extends="$unknown"
10877 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10878 wsmap="managed"
10879 >
10880 <desc>
10881 Represents a virtual network adapter that is attached to a virtual machine.
10882 Each virtual machine has a fixed number of network adapter slots with one
10883 instance of this attached to each of them. Call
10884 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10885 is attached to a given slot in a given machine.
10886
10887 Each network adapter can be in one of five attachment modes, which are
10888 represented by the <link to="NetworkAttachmentType" /> enumeration;
10889 see the <link to="#attachmentType" /> attribute.
10890 </desc>
10891
10892 <attribute name="adapterType" type="NetworkAdapterType">
10893 <desc>
10894 Type of the virtual network adapter. Depending on this value,
10895 VirtualBox will provide a different virtual network hardware
10896 to the guest.
10897 </desc>
10898 </attribute>
10899
10900 <attribute name="slot" type="unsigned long" readonly="yes">
10901 <desc>
10902 Slot number this adapter is plugged into. Corresponds to
10903 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10904 to obtain this instance.
10905 </desc>
10906 </attribute>
10907
10908 <attribute name="enabled" type="boolean">
10909 <desc>
10910 Flag whether the network adapter is present in the
10911 guest system. If disabled, the virtual guest hardware will
10912 not contain this network adapter. Can only be changed when
10913 the VM is not running.
10914 </desc>
10915 </attribute>
10916
10917 <attribute name="MACAddress" type="wstring">
10918 <desc>
10919 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10920 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10921 </desc>
10922 </attribute>
10923
10924 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10925
10926 <attribute name="hostInterface" type="wstring">
10927 <desc>
10928 Name of the host network interface the VM is attached to.
10929 </desc>
10930 </attribute>
10931
10932 <attribute name="internalNetwork" type="wstring">
10933 <desc>
10934 Name of the internal network the VM is attached to.
10935 </desc>
10936 </attribute>
10937
10938 <attribute name="NATNetwork" type="wstring">
10939 <desc>
10940 Name of the NAT network the VM is attached to.
10941 </desc>
10942 </attribute>
10943
10944 <attribute name="cableConnected" type="boolean">
10945 <desc>
10946 Flag whether the adapter reports the cable as connected or not.
10947 It can be used to report offline situations to a VM.
10948 </desc>
10949 </attribute>
10950
10951 <attribute name="lineSpeed" type="unsigned long">
10952 <desc>
10953 Line speed reported by custom drivers, in units of 1 kbps.
10954 </desc>
10955 </attribute>
10956
10957 <attribute name="traceEnabled" type="boolean">
10958 <desc>
10959 Flag whether network traffic from/to the network card should be traced.
10960 Can only be toggled when the VM is turned off.
10961 </desc>
10962 </attribute>
10963
10964 <attribute name="traceFile" type="wstring">
10965 <desc>
10966 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10967 will be used.
10968 </desc>
10969 </attribute>
10970
10971 <method name="attachToNAT">
10972 <desc>
10973 Attach the network adapter to the Network Address Translation (NAT) interface.
10974 </desc>
10975 </method>
10976
10977 <method name="attachToBridgedInterface">
10978 <desc>
10979 Attach the network adapter to a bridged host interface.
10980 </desc>
10981 </method>
10982
10983 <method name="attachToInternalNetwork">
10984 <desc>
10985 Attach the network adapter to an internal network.
10986 </desc>
10987 </method>
10988
10989 <method name="attachToHostOnlyInterface">
10990 <desc>
10991 Attach the network adapter to the host-only network.
10992 </desc>
10993 </method>
10994
10995 <method name="detach">
10996 <desc>
10997 Detach the network adapter
10998 </desc>
10999 </method>
11000 </interface>
11001
11002
11003 <!--
11004 // ISerialPort
11005 /////////////////////////////////////////////////////////////////////////
11006 -->
11007
11008 <enum
11009 name="PortMode"
11010 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11011 >
11012 <desc>
11013 The PortMode enumeration represents possible communication modes for
11014 the virtual serial port device.
11015 </desc>
11016
11017 <const name="Disconnected" value="0">
11018 <desc>Virtual device is not attached to any real host device.</desc>
11019 </const>
11020 <const name="HostPipe" value="1">
11021 <desc>Virtual device is attached to a host pipe.</desc>
11022 </const>
11023 <const name="HostDevice" value="2">
11024 <desc>Virtual device is attached to a host device.</desc>
11025 </const>
11026 <const name="RawFile" value="3">
11027 <desc>Virtual device is attached to a raw file.</desc>
11028 </const>
11029 </enum>
11030
11031 <interface
11032 name="ISerialPort" extends="$unknown"
11033 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11034 wsmap="managed"
11035 >
11036
11037 <desc>
11038 The ISerialPort interface represents the virtual serial port device.
11039
11040 The virtual serial port device acts like an ordinary serial port
11041 inside the virtual machine. This device communicates to the real
11042 serial port hardware in one of two modes: host pipe or host device.
11043
11044 In host pipe mode, the #path attribute specifies the path to the pipe on
11045 the host computer that represents a serial port. The #server attribute
11046 determines if this pipe is created by the virtual machine process at
11047 machine startup or it must already exist before starting machine
11048 execution.
11049
11050 In host device mode, the #path attribute specifies the name of the
11051 serial port device on the host computer.
11052
11053 There is also a third communication mode: the disconnected mode. In this
11054 mode, the guest OS running inside the virtual machine will be able to
11055 detect the serial port, but all port write operations will be discarded
11056 and all port read operations will return no data.
11057
11058 <see>IMachine::getSerialPort</see>
11059 </desc>
11060
11061 <attribute name="slot" type="unsigned long" readonly="yes">
11062 <desc>
11063 Slot number this serial port is plugged into. Corresponds to
11064 the value you pass to <link to="IMachine::getSerialPort"/>
11065 to obtain this instance.
11066 </desc>
11067 </attribute>
11068
11069 <attribute name="enabled" type="boolean">
11070 <desc>
11071 Flag whether the serial port is enabled. If disabled,
11072 the serial port will not be reported to the guest OS.
11073 </desc>
11074 </attribute>
11075
11076 <attribute name="IOBase" type="unsigned long">
11077 <desc>Base I/O address of the serial port.</desc>
11078 </attribute>
11079
11080 <attribute name="IRQ" type="unsigned long">
11081 <desc>IRQ number of the serial port.</desc>
11082 </attribute>
11083
11084 <attribute name="hostMode" type="PortMode">
11085 <desc>
11086 How is this port connected to the host.
11087 <note>
11088 Changing this attribute may fail if the conditions for
11089 <link to="#path"/> are not met.
11090 </note>
11091 </desc>
11092 </attribute>
11093
11094 <attribute name="server" type="boolean">
11095 <desc>
11096 Flag whether this serial port acts as a server (creates a new pipe on
11097 the host) or as a client (uses the existing pipe). This attribute is
11098 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11099 </desc>
11100 </attribute>
11101
11102 <attribute name="path" type="wstring">
11103 <desc>
11104 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11105 PortMode_HostPipe, or the host serial device name when
11106 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11107 cases, setting a @c null or empty string as the attribute's value
11108 is an error. Otherwise, the value of this property is ignored.
11109 </desc>
11110 </attribute>
11111
11112 </interface>
11113
11114 <!--
11115 // IParallelPort
11116 /////////////////////////////////////////////////////////////////////////
11117 -->
11118
11119 <interface
11120 name="IParallelPort" extends="$unknown"
11121 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11122 wsmap="managed"
11123 >
11124
11125 <desc>
11126 The IParallelPort interface represents the virtual parallel port device.
11127
11128 The virtual parallel port device acts like an ordinary parallel port
11129 inside the virtual machine. This device communicates to the real
11130 parallel port hardware using the name of the parallel device on the host
11131 computer specified in the #path attribute.
11132
11133 Each virtual parallel port device is assigned a base I/O address and an
11134 IRQ number that will be reported to the guest operating system and used
11135 to operate the given parallel port from within the virtual machine.
11136
11137 <see>IMachine::getParallelPort</see>
11138 </desc>
11139
11140 <attribute name="slot" type="unsigned long" readonly="yes">
11141 <desc>
11142 Slot number this parallel port is plugged into. Corresponds to
11143 the value you pass to <link to="IMachine::getParallelPort"/>
11144 to obtain this instance.
11145 </desc>
11146 </attribute>
11147
11148 <attribute name="enabled" type="boolean">
11149 <desc>
11150 Flag whether the parallel port is enabled. If disabled,
11151 the parallel port will not be reported to the guest OS.
11152 </desc>
11153 </attribute>
11154
11155 <attribute name="IOBase" type="unsigned long">
11156 <desc>Base I/O address of the parallel port.</desc>
11157 </attribute>
11158
11159 <attribute name="IRQ" type="unsigned long">
11160 <desc>IRQ number of the parallel port.</desc>
11161 </attribute>
11162
11163 <attribute name="path" type="wstring">
11164 <desc>
11165 Host parallel device name. If this parallel port is enabled, setting a
11166 @c null or an empty string as this attribute's value will result into
11167 an error.
11168 </desc>
11169 </attribute>
11170
11171 </interface>
11172
11173
11174 <!--
11175 // IMachineDebugger
11176 /////////////////////////////////////////////////////////////////////////
11177 -->
11178
11179 <interface
11180 name="IMachineDebugger" extends="$unknown"
11181 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11182 wsmap="suppress"
11183 >
11184 <method name="resetStats">
11185 <desc>
11186 Reset VM statistics.
11187 </desc>
11188 <param name="pattern" type="wstring" dir="in">
11189 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11190 </param>
11191 </method>
11192
11193 <method name="dumpStats">
11194 <desc>
11195 Dumps VM statistics.
11196 </desc>
11197 <param name="pattern" type="wstring" dir="in">
11198 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11199 </param>
11200 </method>
11201
11202 <method name="getStats">
11203 <desc>
11204 Get the VM statistics in a XMLish format.
11205 </desc>
11206 <param name="pattern" type="wstring" dir="in">
11207 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11208 </param>
11209 <param name="withDescriptions" type="boolean" dir="in">
11210 <desc>Whether to include the descriptions.</desc>
11211 </param>
11212 <param name="stats" type="wstring" dir="out">
11213 <desc>The XML document containing the statistics.</desc>
11214 </param>
11215 </method>
11216
11217 <method name="injectNMI">
11218 <desc>
11219 Inject an NMI into a running VT-x/AMD-V VM.
11220 </desc>
11221 </method>
11222
11223 <attribute name="singlestep" type="boolean">
11224 <desc>Switch for enabling singlestepping.</desc>
11225 </attribute>
11226
11227 <attribute name="recompileUser" type="boolean">
11228 <desc>Switch for forcing code recompilation for user mode code.</desc>
11229 </attribute>
11230
11231 <attribute name="recompileSupervisor" type="boolean">
11232 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11233 </attribute>
11234
11235 <attribute name="PATMEnabled" type="boolean">
11236 <desc>Switch for enabling and disabling the PATM component.</desc>
11237 </attribute>
11238
11239 <attribute name="CSAMEnabled" type="boolean">
11240 <desc>Switch for enabling and disabling the CSAM component.</desc>
11241 </attribute>
11242
11243 <attribute name="logEnabled" type="boolean">
11244 <desc>Switch for enabling and disabling logging.</desc>
11245 </attribute>
11246
11247 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11248 <desc>
11249 Flag indicating whether the VM is currently making use of CPU hardware
11250 virtualization extensions.
11251 </desc>
11252 </attribute>
11253
11254 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11255 <desc>
11256 Flag indicating whether the VM is currently making use of the nested paging
11257 CPU hardware virtualization extension.
11258 </desc>
11259 </attribute>
11260
11261 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11262 <desc>
11263 Flag indicating whether the VM is currently making use of the VPID
11264 VT-x extension.
11265 </desc>
11266 </attribute>
11267
11268 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11269 <desc>
11270 Flag indicating whether the VM is currently making use of the Physical
11271 Address Extension CPU feature.
11272 </desc>
11273 </attribute>
11274
11275 <attribute name="virtualTimeRate" type="unsigned long">
11276 <desc>
11277 The rate at which the virtual time runs expressed as a percentage.
11278 The accepted range is 2% to 20000%.
11279 </desc>
11280 </attribute>
11281
11282 <!-- @todo method for setting log flags, groups and destination! -->
11283
11284 <attribute name="VM" type="unsigned long long" readonly="yes">
11285 <desc>
11286 Gets the VM handle. This is only for internal use while
11287 we carve the details of this interface.
11288 </desc>
11289 </attribute>
11290
11291 </interface>
11292
11293 <!--
11294 // IUSBController
11295 /////////////////////////////////////////////////////////////////////////
11296 -->
11297
11298 <interface
11299 name="IUSBController" extends="$unknown"
11300 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11301 wsmap="managed"
11302 >
11303 <attribute name="enabled" type="boolean">
11304 <desc>
11305 Flag whether the USB controller is present in the
11306 guest system. If disabled, the virtual guest hardware will
11307 not contain any USB controller. Can only be changed when
11308 the VM is powered off.
11309 </desc>
11310 </attribute>
11311
11312 <attribute name="enabledEhci" type="boolean">
11313 <desc>
11314 Flag whether the USB EHCI controller is present in the
11315 guest system. If disabled, the virtual guest hardware will
11316 not contain a USB EHCI controller. Can only be changed when
11317 the VM is powered off.
11318 </desc>
11319 </attribute>
11320
11321 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11322 <desc>
11323 USB standard version which the controller implements.
11324 This is a BCD which means that the major version is in the
11325 high byte and minor version is in the low byte.
11326 </desc>
11327 </attribute>
11328
11329 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11330 <desc>
11331 List of USB device filters associated with the machine.
11332
11333 If the machine is currently running, these filters are activated
11334 every time a new (supported) USB device is attached to the host
11335 computer that was not ignored by global filters
11336 (<link to="IHost::USBDeviceFilters"/>).
11337
11338 These filters are also activated when the machine is powered up.
11339 They are run against a list of all currently available USB
11340 devices (in states
11341 <link to="USBDeviceState_Available"/>,
11342 <link to="USBDeviceState_Busy"/>,
11343 <link to="USBDeviceState_Held"/>) that were not previously
11344 ignored by global filters.
11345
11346 If at least one filter matches the USB device in question, this
11347 device is automatically captured (attached to) the virtual USB
11348 controller of this machine.
11349
11350 <see>IUSBDeviceFilter, ::IUSBController</see>
11351 </desc>
11352 </attribute>
11353
11354 <method name="createDeviceFilter">
11355 <desc>
11356 Creates a new USB device filter. All attributes except
11357 the filter name are set to empty (any match),
11358 <i>active</i> is @c false (the filter is not active).
11359
11360 The created filter can then be added to the list of filters using
11361 <link to="#insertDeviceFilter"/>.
11362
11363 <result name="VBOX_E_INVALID_VM_STATE">
11364 The virtual machine is not mutable.
11365 </result>
11366
11367 <see>#deviceFilters</see>
11368 </desc>
11369 <param name="name" type="wstring" dir="in">
11370 <desc>
11371 Filter name. See <link to="IUSBDeviceFilter::name"/>
11372 for more info.
11373 </desc>
11374 </param>
11375 <param name="filter" type="IUSBDeviceFilter" dir="return">
11376 <desc>Created filter object.</desc>
11377 </param>
11378 </method>
11379
11380 <method name="insertDeviceFilter">
11381 <desc>
11382 Inserts the given USB device to the specified position
11383 in the list of filters.
11384
11385 Positions are numbered starting from <tt>0</tt>. If the specified
11386 position is equal to or greater than the number of elements in
11387 the list, the filter is added to the end of the collection.
11388
11389 <note>
11390 Duplicates are not allowed, so an attempt to insert a
11391 filter that is already in the collection, will return an
11392 error.
11393 </note>
11394
11395 <result name="VBOX_E_INVALID_VM_STATE">
11396 Virtual machine is not mutable.
11397 </result>
11398 <result name="E_INVALIDARG">
11399 USB device filter not created within this VirtualBox instance.
11400 </result>
11401 <result name="VBOX_E_INVALID_OBJECT_STATE">
11402 USB device filter already in list.
11403 </result>
11404
11405 <see>#deviceFilters</see>
11406 </desc>
11407 <param name="position" type="unsigned long" dir="in">
11408 <desc>Position to insert the filter to.</desc>
11409 </param>
11410 <param name="filter" type="IUSBDeviceFilter" dir="in">
11411 <desc>USB device filter to insert.</desc>
11412 </param>
11413 </method>
11414
11415 <method name="removeDeviceFilter">
11416 <desc>
11417 Removes a USB device filter from the specified position in the
11418 list of filters.
11419
11420 Positions are numbered starting from <tt>0</tt>. Specifying a
11421 position equal to or greater than the number of elements in
11422 the list will produce an error.
11423
11424 <see>#deviceFilters</see>
11425
11426 <result name="VBOX_E_INVALID_VM_STATE">
11427 Virtual machine is not mutable.
11428 </result>
11429 <result name="E_INVALIDARG">
11430 USB device filter list empty or invalid @a position.
11431 </result>
11432
11433 </desc>
11434 <param name="position" type="unsigned long" dir="in">
11435 <desc>Position to remove the filter from.</desc>
11436 </param>
11437 <param name="filter" type="IUSBDeviceFilter" dir="return">
11438 <desc>Removed USB device filter.</desc>
11439 </param>
11440 </method>
11441
11442 </interface>
11443
11444
11445 <!--
11446 // IUSBDevice
11447 /////////////////////////////////////////////////////////////////////////
11448 -->
11449
11450 <interface
11451 name="IUSBDevice" extends="$unknown"
11452 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11453 wsmap="managed"
11454 >
11455 <desc>
11456 The IUSBDevice interface represents a virtual USB device attached to the
11457 virtual machine.
11458
11459 A collection of objects implementing this interface is stored in the
11460 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11461 attached to a running virtual machine's USB controller.
11462 </desc>
11463
11464 <attribute name="id" type="wstring" readonly="yes">
11465 <desc>
11466 Unique USB device ID. This ID is built from #vendorId,
11467 #productId, #revision and #serialNumber.
11468 </desc>
11469 </attribute>
11470
11471 <attribute name="vendorId" type="unsigned short" readonly="yes">
11472 <desc>Vendor ID.</desc>
11473 </attribute>
11474
11475 <attribute name="productId" type="unsigned short" readonly="yes">
11476 <desc>Product ID.</desc>
11477 </attribute>
11478
11479 <attribute name="revision" type="unsigned short" readonly="yes">
11480 <desc>
11481 Product revision number. This is a packed BCD represented as
11482 unsigned short. The high byte is the integer part and the low
11483 byte is the decimal.
11484 </desc>
11485 </attribute>
11486
11487 <attribute name="manufacturer" type="wstring" readonly="yes">
11488 <desc>Manufacturer string.</desc>
11489 </attribute>
11490
11491 <attribute name="product" type="wstring" readonly="yes">
11492 <desc>Product string.</desc>
11493 </attribute>
11494
11495 <attribute name="serialNumber" type="wstring" readonly="yes">
11496 <desc>Serial number string.</desc>
11497 </attribute>
11498
11499 <attribute name="address" type="wstring" readonly="yes">
11500 <desc>Host specific address of the device.</desc>
11501 </attribute>
11502
11503 <attribute name="port" type="unsigned short" readonly="yes">
11504 <desc>
11505 Host USB port number the device is physically
11506 connected to.
11507 </desc>
11508 </attribute>
11509
11510 <attribute name="version" type="unsigned short" readonly="yes">
11511 <desc>
11512 The major USB version of the device - 1 or 2.
11513 </desc>
11514 </attribute>
11515
11516 <attribute name="portVersion" type="unsigned short" readonly="yes">
11517 <desc>
11518 The major USB version of the host USB port the device is
11519 physically connected to - 1 or 2. For devices not connected to
11520 anything this will have the same value as the version attribute.
11521 </desc>
11522 </attribute>
11523
11524 <attribute name="remote" type="boolean" readonly="yes">
11525 <desc>
11526 Whether the device is physically connected to a remote VRDP
11527 client or to a local host machine.
11528 </desc>
11529 </attribute>
11530
11531 </interface>
11532
11533
11534 <!--
11535 // IUSBDeviceFilter
11536 /////////////////////////////////////////////////////////////////////////
11537 -->
11538
11539 <interface
11540 name="IUSBDeviceFilter" extends="$unknown"
11541 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11542 wsmap="managed"
11543 >
11544 <desc>
11545 The IUSBDeviceFilter interface represents an USB device filter used
11546 to perform actions on a group of USB devices.
11547
11548 This type of filters is used by running virtual machines to
11549 automatically capture selected USB devices once they are physically
11550 attached to the host computer.
11551
11552 A USB device is matched to the given device filter if and only if all
11553 attributes of the device match the corresponding attributes of the
11554 filter (that is, attributes are joined together using the logical AND
11555 operation). On the other hand, all together, filters in the list of
11556 filters carry the semantics of the logical OR operation. So if it is
11557 desirable to create a match like "this vendor id OR this product id",
11558 one needs to create two filters and specify "any match" (see below)
11559 for unused attributes.
11560
11561 All filter attributes used for matching are strings. Each string
11562 is an expression representing a set of values of the corresponding
11563 device attribute, that will match the given filter. Currently, the
11564 following filtering expressions are supported:
11565
11566 <ul>
11567 <li><i>Interval filters</i>. Used to specify valid intervals for
11568 integer device attributes (Vendor ID, Product ID and Revision).
11569 The format of the string is:
11570
11571 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11572
11573 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11574 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11575 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11576 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11577 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11578 possible integer is assumed.
11579 </li>
11580 <li><i>Boolean filters</i>. Used to specify acceptable values for
11581 boolean device attributes. The format of the string is:
11582
11583 <tt>true|false|yes|no|0|1</tt>
11584
11585 </li>
11586 <li><i>Exact match</i>. Used to specify a single value for the given
11587 device attribute. Any string that doesn't start with <tt>int:</tt>
11588 represents the exact match. String device attributes are compared to
11589 this string including case of symbols. Integer attributes are first
11590 converted to a string (see individual filter attributes) and then
11591 compared ignoring case.
11592
11593 </li>
11594 <li><i>Any match</i>. Any value of the corresponding device attribute
11595 will match the given filter. An empty or @c null string is
11596 used to construct this type of filtering expressions.
11597
11598 </li>
11599 </ul>
11600
11601 <note>
11602 On the Windows host platform, interval filters are not currently
11603 available. Also all string filter attributes
11604 (<link to="#manufacturer"/>, <link to="#product"/>,
11605 <link to="#serialNumber"/>) are ignored, so they behave as
11606 <i>any match</i> no matter what string expression is specified.
11607 </note>
11608
11609 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11610 </desc>
11611
11612 <attribute name="name" type="wstring">
11613 <desc>
11614 Visible name for this filter.
11615 This name is used to visually distinguish one filter from another,
11616 so it can neither be @c null nor an empty string.
11617 </desc>
11618 </attribute>
11619
11620 <attribute name="active" type="boolean">
11621 <desc>Whether this filter active or has been temporarily disabled.</desc>
11622 </attribute>
11623
11624 <attribute name="vendorId" type="wstring">
11625 <desc>
11626 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11627 The string representation for the <i>exact matching</i>
11628 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11629 (including leading zeroes).
11630 </desc>
11631 </attribute>
11632
11633 <attribute name="productId" type="wstring">
11634 <desc>
11635 <link to="IUSBDevice::productId">Product ID</link> filter.
11636 The string representation for the <i>exact matching</i>
11637 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11638 (including leading zeroes).
11639 </desc>
11640 </attribute>
11641
11642 <attribute name="revision" type="wstring">
11643 <desc>
11644 <link to="IUSBDevice::productId">Product revision number</link>
11645 filter. The string representation for the <i>exact matching</i>
11646 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11647 of the integer part of the revision, and <tt>F</tt> is the
11648 decimal digit of its fractional part (including leading and
11649 trailing zeros).
11650 Note that for interval filters, it's best to use the hexadecimal
11651 form, because the revision is stored as a 16 bit packed BCD value;
11652 so the expression <tt>int:0x0100-0x0199</tt> will match any
11653 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11654 </desc>
11655 </attribute>
11656
11657 <attribute name="manufacturer" type="wstring">
11658 <desc>
11659 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11660 </desc>
11661 </attribute>
11662
11663 <attribute name="product" type="wstring">
11664 <desc>
11665 <link to="IUSBDevice::product">Product</link> filter.
11666 </desc>
11667 </attribute>
11668
11669 <attribute name="serialNumber" type="wstring">
11670 <desc>
11671 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11672 </desc>
11673 </attribute>
11674
11675 <attribute name="port" type="wstring">
11676 <desc>
11677 <link to="IUSBDevice::port">Host USB port</link> filter.
11678 </desc>
11679 </attribute>
11680
11681 <attribute name="remote" type="wstring">
11682 <desc>
11683 <link to="IUSBDevice::remote">Remote state</link> filter.
11684 <note>
11685 This filter makes sense only for machine USB filters,
11686 i.e. it is ignored by IHostUSBDeviceFilter objects.
11687 </note>
11688 </desc>
11689 </attribute>
11690
11691 <attribute name="maskedInterfaces" type="unsigned long">
11692 <desc>
11693 This is an advanced option for hiding one or more USB interfaces
11694 from the guest. The value is a bit mask where the bits that are set
11695 means the corresponding USB interface should be hidden, masked off
11696 if you like.
11697 This feature only works on Linux hosts.
11698 </desc>
11699 </attribute>
11700
11701 </interface>
11702
11703
11704 <!--
11705 // IHostUSBDevice
11706 /////////////////////////////////////////////////////////////////////////
11707 -->
11708
11709 <enum
11710 name="USBDeviceState"
11711 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11712 >
11713 <desc>
11714 USB device state. This enumeration represents all possible states
11715 of the USB device physically attached to the host computer regarding
11716 its state on the host computer and availability to guest computers
11717 (all currently running virtual machines).
11718
11719 Once a supported USB device is attached to the host, global USB
11720 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11721 either ignore the device, or put it to USBDeviceState_Held state, or do
11722 nothing. Unless the device is ignored by global filters, filters of all
11723 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11724 activated that can put it to USBDeviceState_Captured state.
11725
11726 If the device was ignored by global filters, or didn't match
11727 any filters at all (including guest ones), it is handled by the host
11728 in a normal way. In this case, the device state is determined by
11729 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11730 or USBDeviceState_Available, depending on the current device usage.
11731
11732 Besides auto-capturing based on filters, the device can be manually
11733 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11734 state is USBDeviceState_Busy, USBDeviceState_Available or
11735 USBDeviceState_Held.
11736
11737 <note>
11738 Due to differences in USB stack implementations in Linux and Win32,
11739 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11740 only to the Linux version of the product. This also means that (<link
11741 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11742 device state is USBDeviceState_Held.
11743 </note>
11744
11745 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11746 </desc>
11747
11748 <const name="NotSupported" value="0">
11749 <desc>
11750 Not supported by the VirtualBox server, not available to guests.
11751 </desc>
11752 </const>
11753 <const name="Unavailable" value="1">
11754 <desc>
11755 Being used by the host computer exclusively,
11756 not available to guests.
11757 </desc>
11758 </const>
11759 <const name="Busy" value="2">
11760 <desc>
11761 Being used by the host computer, potentially available to guests.
11762 </desc>
11763 </const>
11764 <const name="Available" value="3">
11765 <desc>
11766 Not used by the host computer, available to guests (the host computer
11767 can also start using the device at any time).
11768 </desc>
11769 </const>
11770 <const name="Held" value="4">
11771 <desc>
11772 Held by the VirtualBox server (ignored by the host computer),
11773 available to guests.
11774 </desc>
11775 </const>
11776 <const name="Captured" value="5">
11777 <desc>
11778 Captured by one of the guest computers, not available
11779 to anybody else.
11780 </desc>
11781 </const>
11782 </enum>
11783
11784 <interface
11785 name="IHostUSBDevice" extends="IUSBDevice"
11786 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11787 wsmap="managed"
11788 >
11789 <desc>
11790 The IHostUSBDevice interface represents a physical USB device attached
11791 to the host computer.
11792
11793 Besides properties inherited from IUSBDevice, this interface adds the
11794 <link to="#state"/> property that holds the current state of the USB
11795 device.
11796
11797 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11798 </desc>
11799
11800 <attribute name="state" type="USBDeviceState" readonly="yes">
11801 <desc>
11802 Current state of the device.
11803 </desc>
11804 </attribute>
11805
11806 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11807
11808 </interface>
11809
11810
11811 <!--
11812 // IHostUSBDeviceFilter
11813 /////////////////////////////////////////////////////////////////////////
11814 -->
11815
11816 <enum
11817 name="USBDeviceFilterAction"
11818 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11819 >
11820 <desc>
11821 Actions for host USB device filters.
11822 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11823 </desc>
11824
11825 <const name="Null" value="0">
11826 <desc>Null value (never used by the API).</desc>
11827 </const>
11828 <const name="Ignore" value="1">
11829 <desc>Ignore the matched USB device.</desc>
11830 </const>
11831 <const name="Hold" value="2">
11832 <desc>Hold the matched USB device.</desc>
11833 </const>
11834 </enum>
11835
11836 <interface
11837 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11838 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11839 wsmap="managed"
11840 >
11841 <desc>
11842 The IHostUSBDeviceFilter interface represents a global filter for a
11843 physical USB device used by the host computer. Used indirectly in
11844 <link to="IHost::USBDeviceFilters"/>.
11845
11846 Using filters of this type, the host computer determines the initial
11847 state of the USB device after it is physically attached to the
11848 host's USB controller.
11849
11850 <note>
11851 The <link to="#remote"/> attribute is ignored by this type of
11852 filters, because it makes sense only for
11853 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11854 </note>
11855
11856 <see>IHost::USBDeviceFilters</see>
11857 </desc>
11858
11859 <attribute name="action" type="USBDeviceFilterAction">
11860 <desc>
11861 Action performed by the host when an attached USB device
11862 matches this filter.
11863 </desc>
11864 </attribute>
11865
11866 </interface>
11867
11868 <!--
11869 // IAudioAdapter
11870 /////////////////////////////////////////////////////////////////////////
11871 -->
11872
11873 <enum
11874 name="AudioDriverType"
11875 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11876 >
11877 <desc>
11878 Host audio driver type.
11879 </desc>
11880
11881 <const name="Null" value="0">
11882 <desc>Null value, also means "dummy audio driver".</desc>
11883 </const>
11884 <const name="WinMM" value="1"/>
11885 <const name="OSS" value="2"/>
11886 <const name="ALSA" value="3"/>
11887 <const name="DirectSound" value="4"/>
11888 <const name="CoreAudio" value="5"/>
11889 <const name="MMPM" value="6"/>
11890 <const name="Pulse" value="7"/>
11891 <const name="SolAudio" value="8"/>
11892 </enum>
11893
11894 <enum
11895 name="AudioControllerType"
11896 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11897 >
11898 <desc>
11899 Virtual audio controller type.
11900 </desc>
11901
11902 <const name="AC97" value="0"/>
11903 <const name="SB16" value="1"/>
11904 </enum>
11905
11906 <interface
11907 name="IAudioAdapter" extends="$unknown"
11908 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11909 wsmap="managed"
11910 >
11911 <desc>
11912 The IAudioAdapter interface represents the virtual audio adapter of
11913 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11914 </desc>
11915 <attribute name="enabled" type="boolean">
11916 <desc>
11917 Flag whether the audio adapter is present in the
11918 guest system. If disabled, the virtual guest hardware will
11919 not contain any audio adapter. Can only be changed when
11920 the VM is not running.
11921 </desc>
11922 </attribute>
11923 <attribute name="audioController" type="AudioControllerType">
11924 <desc>
11925 The audio hardware we emulate.
11926 </desc>
11927 </attribute>
11928 <attribute name="audioDriver" type="AudioDriverType">
11929 <desc>
11930 Audio driver the adapter is connected to. This setting
11931 can only be changed when the VM is not running.
11932 </desc>
11933 </attribute>
11934 </interface>
11935
11936 <!--
11937 // IVRDPServer
11938 /////////////////////////////////////////////////////////////////////////
11939 -->
11940
11941 <enum
11942 name="VRDPAuthType"
11943 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11944 >
11945 <desc>
11946 VRDP authentication type.
11947 </desc>
11948
11949 <const name="Null" value="0">
11950 <desc>Null value, also means "no authentication".</desc>
11951 </const>
11952 <const name="External" value="1"/>
11953 <const name="Guest" value="2"/>
11954 </enum>
11955
11956 <interface
11957 name="IVRDPServer" extends="$unknown"
11958 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11959 wsmap="managed"
11960 >
11961 <attribute name="enabled" type="boolean">
11962 <desc>VRDP server status.</desc>
11963 </attribute>
11964
11965 <attribute name="port" type="unsigned long">
11966 <desc>
11967 VRDP server port number.
11968 <note>
11969 Setting the value of this property to <tt>0</tt> will reset the port
11970 number to the default value which is
11971 currently <tt>3389</tt>. Reading this property will always return a
11972 real port number, even after it has been set to <tt>0</tt> (in which
11973 case the default port is returned).
11974 </note>
11975 </desc>
11976 </attribute>
11977
11978 <attribute name="netAddress" type="wstring">
11979 <desc>VRDP server address.</desc>
11980 </attribute>
11981
11982 <attribute name="authType" type="VRDPAuthType">
11983 <desc>VRDP authentication method.</desc>
11984 </attribute>
11985
11986 <attribute name="authTimeout" type="unsigned long">
11987 <desc>Timeout for guest authentication. Milliseconds.</desc>
11988 </attribute>
11989
11990 <attribute name="allowMultiConnection" type="boolean">
11991 <desc>
11992 Flag whether multiple simultaneous connections to the VM are permitted.
11993 Note that this will be replaced by a more powerful mechanism in the future.
11994 </desc>
11995 </attribute>
11996
11997 <attribute name="reuseSingleConnection" type="boolean">
11998 <desc>
11999 Flag whether the existing connection must be dropped and a new connection
12000 must be established by the VRDP server, when a new client connects in single
12001 connection mode.
12002 </desc>
12003 </attribute>
12004
12005 </interface>
12006
12007
12008 <!--
12009 // ISharedFolder
12010 /////////////////////////////////////////////////////////////////////////
12011 -->
12012
12013 <interface
12014 name="ISharedFolder" extends="$unknown"
12015 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12016 wsmap="struct"
12017 >
12018 <desc>
12019 The ISharedFolder interface represents a folder in the host computer's
12020 file system accessible from the guest OS running inside a virtual
12021 machine using an associated logical name.
12022
12023 There are three types of shared folders:
12024 <ul>
12025 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12026 folders available to all virtual machines.</li>
12027 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12028 VM-specific shared folders available to the given virtual machine at
12029 startup.</li>
12030 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12031 VM-specific shared folders created in the session context (for
12032 example, when the virtual machine is running) and automatically
12033 discarded when the session is closed (the VM is powered off).</li>
12034 </ul>
12035
12036 Logical names of shared folders must be unique within the given scope
12037 (global, permanent or transient). However, they do not need to be unique
12038 across scopes. In this case, the definition of the shared folder in a
12039 more specific scope takes precedence over definitions in all other
12040 scopes. The order of precedence is (more specific to more general):
12041 <ol>
12042 <li>Transient definitions</li>
12043 <li>Permanent definitions</li>
12044 <li>Global definitions</li>
12045 </ol>
12046
12047 For example, if MyMachine has a shared folder named
12048 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12049 transient shared folder named <tt>C_DRIVE</tt> (that points
12050 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12051 of <tt>C_DRIVE</tt> in the guest OS so
12052 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12053 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12054 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12055 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12056 to <tt>C:\\</tt> if it still exists.
12057
12058 Note that permanent and transient shared folders of different machines
12059 are in different name spaces, so they don't overlap and don't need to
12060 have unique logical names.
12061
12062 <note>
12063 Global shared folders are not implemented in the current version of the
12064 product.
12065 </note>
12066 </desc>
12067
12068 <attribute name="name" type="wstring" readonly="yes">
12069 <desc>Logical name of the shared folder.</desc>
12070 </attribute>
12071
12072 <attribute name="hostPath" type="wstring" readonly="yes">
12073 <desc>Full path to the shared folder in the host file system.</desc>
12074 </attribute>
12075
12076 <attribute name="accessible" type="boolean" readonly="yes">
12077 <desc>
12078 Whether the folder defined by the host path is currently
12079 accessible or not.
12080 For example, the folder can be unaccessible if it is placed
12081 on the network share that is not available by the time
12082 this property is read.
12083 </desc>
12084 </attribute>
12085
12086 <attribute name="writable" type="boolean" readonly="yes">
12087 <desc>
12088 Whether the folder defined by the host path is writable or
12089 not.
12090 </desc>
12091 </attribute>
12092
12093 <attribute name="lastAccessError" type="wstring" readonly="yes">
12094 <desc>
12095 Text message that represents the result of the last accessibility
12096 check.
12097
12098 Accessibility checks are performed each time the <link to="#accessible"/>
12099 attribute is read. An empty string is returned if the last
12100 accessibility check was successful. A non-empty string indicates a
12101 failure and should normally describe a reason of the failure (for
12102 example, a file read error).
12103 </desc>
12104 </attribute>
12105
12106 </interface>
12107
12108 <!--
12109 // ISession
12110 /////////////////////////////////////////////////////////////////////////
12111 -->
12112
12113 <interface
12114 name="IInternalSessionControl" extends="$unknown"
12115 uuid="b26552e7-9534-4f47-b766-98eac648a90d"
12116 internal="yes"
12117 wsmap="suppress"
12118 >
12119 <method name="getPID">
12120 <desc>PID of the process that has created this Session object.
12121 </desc>
12122 <param name="pid" type="unsigned long" dir="return"/>
12123 </method>
12124
12125 <method name="getRemoteConsole">
12126 <desc>
12127 Returns the console object suitable for remote control.
12128
12129 <result name="VBOX_E_INVALID_VM_STATE">
12130 Session state prevents operation.
12131 </result>
12132 <result name="VBOX_E_INVALID_OBJECT_STATE">
12133 Session type prevents operation.
12134 </result>
12135
12136 </desc>
12137 <param name="console" type="IConsole" dir="return"/>
12138 </method>
12139
12140 <method name="assignMachine">
12141 <desc>
12142 Assigns the machine object associated with this direct-type
12143 session or informs the session that it will be a remote one
12144 (if @a machine == @c null).
12145
12146 <result name="VBOX_E_INVALID_VM_STATE">
12147 Session state prevents operation.
12148 </result>
12149 <result name="VBOX_E_INVALID_OBJECT_STATE">
12150 Session type prevents operation.
12151 </result>
12152
12153 </desc>
12154 <param name="machine" type="IMachine" dir="in"/>
12155 </method>
12156
12157 <method name="assignRemoteMachine">
12158 <desc>
12159 Assigns the machine and the (remote) console object associated with
12160 this remote-type session.
12161
12162 <result name="VBOX_E_INVALID_VM_STATE">
12163 Session state prevents operation.
12164 </result>
12165
12166 </desc>
12167 <param name="machine" type="IMachine" dir="in"/>
12168 <param name="console" type="IConsole" dir="in"/>
12169 </method>
12170
12171 <method name="updateMachineState">
12172 <desc>
12173 Updates the machine state in the VM process.
12174 Must be called only in certain cases
12175 (see the method implementation).
12176
12177 <result name="VBOX_E_INVALID_VM_STATE">
12178 Session state prevents operation.
12179 </result>
12180 <result name="VBOX_E_INVALID_OBJECT_STATE">
12181 Session type prevents operation.
12182 </result>
12183
12184 </desc>
12185 <param name="aMachineState" type="MachineState" dir="in"/>
12186 </method>
12187
12188 <method name="uninitialize">
12189 <desc>
12190 Uninitializes (closes) this session. Used by VirtualBox to close
12191 the corresponding remote session when the direct session dies
12192 or gets closed.
12193
12194 <result name="VBOX_E_INVALID_VM_STATE">
12195 Session state prevents operation.
12196 </result>
12197
12198 </desc>
12199 </method>
12200
12201 <method name="onDVDDriveChange">
12202 <desc>
12203 Triggered when settings of the DVD drive object of the
12204 associated virtual machine have changed.
12205
12206 <result name="VBOX_E_INVALID_VM_STATE">
12207 Session state prevents operation.
12208 </result>
12209 <result name="VBOX_E_INVALID_OBJECT_STATE">
12210 Session type prevents operation.
12211 </result>
12212
12213 </desc>
12214 </method>
12215
12216 <method name="onFloppyDriveChange">
12217 <desc>
12218 Triggered when settings of the floppy drive object of the
12219 associated virtual machine have changed.
12220
12221 <result name="VBOX_E_INVALID_VM_STATE">
12222 Session state prevents operation.
12223 </result>
12224 <result name="VBOX_E_INVALID_OBJECT_STATE">
12225 Session type prevents operation.
12226 </result>
12227
12228 </desc>
12229 </method>
12230
12231 <method name="onNetworkAdapterChange">
12232 <desc>
12233 Triggered when settings of a network adapter of the
12234 associated virtual machine have changed.
12235
12236 <result name="VBOX_E_INVALID_VM_STATE">
12237 Session state prevents operation.
12238 </result>
12239 <result name="VBOX_E_INVALID_OBJECT_STATE">
12240 Session type prevents operation.
12241 </result>
12242
12243 </desc>
12244 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12245 </method>
12246
12247 <method name="onSerialPortChange">
12248 <desc>
12249 Triggered when settings of a serial port of the
12250 associated virtual machine have changed.
12251
12252 <result name="VBOX_E_INVALID_VM_STATE">
12253 Session state prevents operation.
12254 </result>
12255 <result name="VBOX_E_INVALID_OBJECT_STATE">
12256 Session type prevents operation.
12257 </result>
12258
12259 </desc>
12260 <param name="serialPort" type="ISerialPort" dir="in"/>
12261 </method>
12262
12263 <method name="onParallelPortChange">
12264 <desc>
12265 Triggered when settings of a parallel port of the
12266 associated virtual machine have changed.
12267
12268 <result name="VBOX_E_INVALID_VM_STATE">
12269 Session state prevents operation.
12270 </result>
12271 <result name="VBOX_E_INVALID_OBJECT_STATE">
12272 Session type prevents operation.
12273 </result>
12274
12275 </desc>
12276 <param name="parallelPort" type="IParallelPort" dir="in"/>
12277 </method>
12278
12279 <method name="onStorageControllerChange">
12280 <desc>
12281 Triggered when settings of a storage controller of the
12282 associated virtual machine have changed.
12283
12284 <result name="VBOX_E_INVALID_VM_STATE">
12285 Session state prevents operation.
12286 </result>
12287 <result name="VBOX_E_INVALID_OBJECT_STATE">
12288 Session type prevents operation.
12289 </result>
12290
12291 </desc>
12292 </method>
12293
12294 <method name="onVRDPServerChange">
12295 <desc>
12296 Triggered when settings of the VRDP server object of the
12297 associated virtual machine have changed.
12298
12299 <result name="VBOX_E_INVALID_VM_STATE">
12300 Session state prevents operation.
12301 </result>
12302 <result name="VBOX_E_INVALID_OBJECT_STATE">
12303 Session type prevents operation.
12304 </result>
12305
12306 </desc>
12307 </method>
12308
12309 <method name="onUSBControllerChange">
12310 <desc>
12311 Triggered when settings of the USB controller object of the
12312 associated virtual machine have changed.
12313
12314 <result name="VBOX_E_INVALID_VM_STATE">
12315 Session state prevents operation.
12316 </result>
12317 <result name="VBOX_E_INVALID_OBJECT_STATE">
12318 Session type prevents operation.
12319 </result>
12320
12321 </desc>
12322 </method>
12323
12324 <method name="onSharedFolderChange">
12325 <desc>
12326 Triggered when a permanent (global or machine) shared folder has been
12327 created or removed.
12328 <note>
12329 We don't pass shared folder parameters in this notification because
12330 the order in which parallel notifications are delivered is not defined,
12331 therefore it could happen that these parameters were outdated by the
12332 time of processing this notification.
12333 </note>
12334
12335 <result name="VBOX_E_INVALID_VM_STATE">
12336 Session state prevents operation.
12337 </result>
12338 <result name="VBOX_E_INVALID_OBJECT_STATE">
12339 Session type prevents operation.
12340 </result>
12341
12342 </desc>
12343 <param name="global" type="boolean" dir="in"/>
12344 </method>
12345
12346 <method name="onUSBDeviceAttach">
12347 <desc>
12348 Triggered when a request to capture a USB device (as a result
12349 of matched USB filters or direct call to
12350 <link to="IConsole::attachUSBDevice"/>) has completed.
12351 A @c null @a error object means success, otherwise it
12352 describes a failure.
12353
12354 <result name="VBOX_E_INVALID_VM_STATE">
12355 Session state prevents operation.
12356 </result>
12357 <result name="VBOX_E_INVALID_OBJECT_STATE">
12358 Session type prevents operation.
12359 </result>
12360
12361 </desc>
12362 <param name="device" type="IUSBDevice" dir="in"/>
12363 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12364 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12365 </method>
12366
12367 <method name="onUSBDeviceDetach">
12368 <desc>
12369 Triggered when a request to release the USB device (as a result
12370 of machine termination or direct call to
12371 <link to="IConsole::detachUSBDevice"/>) has completed.
12372 A @c null @a error object means success, otherwise it
12373 describes a failure.
12374
12375 <result name="VBOX_E_INVALID_VM_STATE">
12376 Session state prevents operation.
12377 </result>
12378 <result name="VBOX_E_INVALID_OBJECT_STATE">
12379 Session type prevents operation.
12380 </result>
12381
12382 </desc>
12383 <param name="id" type="wstring" dir="in"/>
12384 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12385 </method>
12386
12387 <method name="onShowWindow">
12388 <desc>
12389 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12390 <link to="IMachine::showConsoleWindow"/> in order to notify
12391 console callbacks
12392 <link to="IConsoleCallback::onCanShowWindow"/>
12393 and <link to="IConsoleCallback::onShowWindow"/>.
12394
12395 <result name="VBOX_E_INVALID_OBJECT_STATE">
12396 Session type prevents operation.
12397 </result>
12398
12399 </desc>
12400 <param name="check" type="boolean" dir="in"/>
12401 <param name="canShow" type="boolean" dir="out"/>
12402 <param name="winId" type="unsigned long long" dir="out"/>
12403 </method>
12404
12405 <method name="accessGuestProperty">
12406 <desc>
12407 Called by <link to="IMachine::getGuestProperty"/> and by
12408 <link to="IMachine::setGuestProperty"/> in order to read and
12409 modify guest properties.
12410
12411 <result name="VBOX_E_INVALID_VM_STATE">
12412 Machine session is not open.
12413 </result>
12414 <result name="VBOX_E_INVALID_OBJECT_STATE">
12415 Session type is not direct.
12416 </result>
12417
12418 </desc>
12419 <param name="name" type="wstring" dir="in"/>
12420 <param name="value" type="wstring" dir="in"/>
12421 <param name="flags" type="wstring" dir="in"/>
12422 <param name="isSetter" type="boolean" dir="in"/>
12423 <param name="retValue" type="wstring" dir="out"/>
12424 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12425 <param name="retFlags" type="wstring" dir="out"/>
12426 </method>
12427
12428 <method name="enumerateGuestProperties">
12429 <desc>
12430 Return a list of the guest properties matching a set of patterns along
12431 with their values, time stamps and flags.
12432
12433 <result name="VBOX_E_INVALID_VM_STATE">
12434 Machine session is not open.
12435 </result>
12436 <result name="VBOX_E_INVALID_OBJECT_STATE">
12437 Session type is not direct.
12438 </result>
12439
12440 </desc>
12441 <param name="patterns" type="wstring" dir="in">
12442 <desc>
12443 The patterns to match the properties against as a comma-separated
12444 string. If this is empty, all properties currently set will be
12445 returned.
12446 </desc>
12447 </param>
12448 <param name="key" type="wstring" dir="out" safearray="yes">
12449 <desc>
12450 The key names of the properties returned.
12451 </desc>
12452 </param>
12453 <param name="value" type="wstring" dir="out" safearray="yes">
12454 <desc>
12455 The values of the properties returned. The array entries match the
12456 corresponding entries in the @a key array.
12457 </desc>
12458 </param>
12459 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12460 <desc>
12461 The time stamps of the properties returned. The array entries match
12462 the corresponding entries in the @a key array.
12463 </desc>
12464 </param>
12465 <param name="flags" type="wstring" dir="out" safearray="yes">
12466 <desc>
12467 The flags of the properties returned. The array entries match the
12468 corresponding entries in the @a key array.
12469 </desc>
12470 </param>
12471 </method>
12472
12473 </interface>
12474
12475 <interface
12476 name="ISession" extends="$dispatched"
12477 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12478 wsmap="managed"
12479 >
12480 <desc>
12481 The ISession interface represents a serialization primitive for virtual
12482 machines.
12483
12484 With VirtualBox, every time one wishes to manipulate a virtual machine
12485 (e.g. change its settings or start execution), a session object is
12486 required. Such an object must be passed to one of the session methods
12487 that open the given session, which then initiates the machine manipulation.
12488
12489 A session serves several purposes: it identifies to the inter-process VirtualBox
12490 code which process is currently working with the virtual machine, and it ensures
12491 that there are no incompatible requests from several processes for the
12492 same virtual machine. Session objects can therefore be thought of as mutex
12493 semaphores that lock virtual machines to prevent conflicting accesses from
12494 several processes.
12495
12496 How sessions objects are used depends on whether you use the Main API
12497 via COM or via the webservice:
12498
12499 <ul>
12500 <li>When using the COM API directly, an object of the Session class from the
12501 VirtualBox type library needs to be created. In regular COM C++ client code,
12502 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12503 This object will then act as a local session object in further calls to open
12504 a session.
12505 </li>
12506
12507 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12508 one session object automatically when <link to="IWebsessionManager::logon" />
12509 is called. A managed object reference to that session object can be retrieved by
12510 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12511 reference can then be used to open sessions.
12512 </li>
12513 </ul>
12514
12515 Sessions are mainly used in two variations:
12516
12517 <ul>
12518 <li>
12519 To start a virtual machine in a separate process, one would call
12520 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12521 object as its first parameter. This session then identifies the caller
12522 and lets him control the started machine (for example, pause machine
12523 execution or power it down) as well as be notified about machine
12524 execution state changes.
12525 </li>
12526
12527 <li>To alter machine settings, or to start machine execution within the
12528 current process, one needs to open a direct session for the machine first by
12529 calling <link to="IVirtualBox::openSession"/>. While a direct session
12530 is open within one process, no any other process may open another direct
12531 session for the same machine. This prevents the machine from being changed
12532 by other processes while it is running or while the machine is being configured.
12533 </li>
12534 </ul>
12535
12536 One also can attach to an existing direct session already opened by
12537 another process (for example, in order to send a control request to the
12538 virtual machine such as the pause or the reset request). This is done by
12539 calling <link to="IVirtualBox::openExistingSession"/>.
12540
12541 <note>
12542 Unless you are trying to write a new VirtualBox front-end that
12543 performs direct machine execution (like the VirtualBox or VBoxSDL
12544 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12545 session opened by <link to="IVirtualBox::openSession"/> and use this
12546 session only to change virtual machine settings. If you simply want to
12547 start virtual machine execution using one of the existing front-ends
12548 (for example the VirtualBox GUI or headless server), simply use
12549 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12550 will power up the machine automatically for you.
12551 </note>
12552 </desc>
12553
12554 <attribute name="state" type="SessionState" readonly="yes">
12555 <desc>Current state of this session.</desc>
12556 </attribute>
12557
12558 <attribute name="type" type="SessionType" readonly="yes">
12559 <desc>
12560 Type of this session. The value of this attribute is valid only
12561 if the session is currently open (i.e. its #state is
12562 SessionType_SessionOpen), otherwise an error will be returned.
12563 </desc>
12564 </attribute>
12565
12566 <attribute name="machine" type="IMachine" readonly="yes">
12567 <desc>Machine object associated with this session.</desc>
12568 </attribute>
12569
12570 <attribute name="console" type="IConsole" readonly="yes">
12571 <desc>Console object associated with this session.</desc>
12572 </attribute>
12573
12574 <method name="close">
12575 <desc>
12576 Closes a session that was previously opened.
12577
12578 It is recommended that every time an "open session" method (such as
12579 <link to="IVirtualBox::openRemoteSession" /> or
12580 <link to="IVirtualBox::openSession" />) has been called to
12581 manipulate a virtual machine, the caller invoke
12582 ISession::close() when it's done doing so. Since sessions are
12583 serialization primitives much like ordinary mutexes, they are
12584 best used the same way: for each "open" call, there should be
12585 a matching "close" call, even when errors occur.
12586
12587 Otherwise, if a direct session for a machine opened with
12588 <link to="IVirtualBox::openSession"/> is not explicitly closed
12589 when the application terminates, the state of the machine will
12590 be set to <link to="MachineState_Aborted" /> on the server.
12591
12592 Generally, it is recommended to close all open sessions explicitly
12593 before terminating the application (regardless of the reason for
12594 the termination).
12595
12596 <note>
12597 Do not expect the session state (<link to="ISession::state" />
12598 to return to "Closed" immediately after you invoke
12599 ISession::close(), particularly if you have started a remote
12600 session to execute the VM in a new process. The session state will
12601 automatically return to "Closed" once the VM is no longer executing,
12602 which can of course take a very long time.
12603 </note>
12604
12605 <result name="E_UNEXPECTED">
12606 Session is not open.
12607 </result>
12608
12609 </desc>
12610 </method>
12611
12612 </interface>
12613
12614 <!--
12615 // IStorageController
12616 /////////////////////////////////////////////////////////////////////////
12617 -->
12618
12619 <enum
12620 name="StorageBus"
12621 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12622 >
12623 <desc>
12624 The connection type of the storage controller.
12625 </desc>
12626 <const name="Null" value="0">
12627 <desc>@c null value. Never used by the API.</desc>
12628 </const>
12629 <const name="IDE" value="1"/>
12630 <const name="SATA" value="2"/>
12631 <const name="SCSI" value="3"/>
12632 </enum>
12633
12634 <enum
12635 name="StorageControllerType"
12636 uuid="685387db-a837-4320-a258-08f46a22f62a"
12637 >
12638 <desc>
12639 Storage controller type.
12640 </desc>
12641
12642 <const name="Null" value="0">
12643 <desc>@c null value. Never used by the API.</desc>
12644 </const>
12645 <const name="LsiLogic" value="1"/>
12646 <const name="BusLogic" value="2"/>
12647 <const name="IntelAhci" value="3"/>
12648 <const name="PIIX3" value="4"/>
12649 <const name="PIIX4" value="5"/>
12650 <const name="ICH6" value="6"/>
12651 </enum>
12652
12653 <interface
12654 name="IStorageController" extends="$unknown"
12655 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12656 wsmap="managed"
12657 >
12658 <desc>
12659 Represents a storage controller that is attached to a virtual machine
12660 (<link to="IMachine" />). Just as hard disks are attached to storage
12661 controllers in a real computer, virtual hard disks (represented by
12662 <link to="IHardDisk" />) are attached to virtual storage controllers,
12663 represented by this interface.
12664
12665 VirtualBox supports three types of virtual storage controller hardware:
12666 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12667 these three is used, certain sub-types are available and can be
12668 selected in <link to="#controllerType" />.
12669 </desc>
12670
12671 <attribute name="name" type="wstring" readonly="yes">
12672 <desc>
12673 Name of the storage controller, as originally specified with
12674 <link to="IMachine::addStorageController" />. This then uniquely
12675 identifies this controller with other method calls such as
12676 <link to="IMachine::attachHardDisk" />.
12677 </desc>
12678 </attribute>
12679
12680 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12681 <desc>
12682 Maximum number of devices which can be attached to one port.
12683 </desc>
12684 </attribute>
12685
12686 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12687 <desc>
12688 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12689 </desc>
12690 </attribute>
12691
12692 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12693 <desc>
12694 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12695 </desc>
12696 </attribute>
12697
12698 <attribute name="instance" type="unsigned long">
12699 <desc>
12700 The instance number of the device in the running VM.
12701 </desc>
12702 </attribute>
12703
12704 <attribute name="portCount" type="unsigned long">
12705 <desc>
12706 The number of currently usable ports on the controller.
12707 The minimum and maximum number of ports for one controller are
12708 stored in <link to="IStorageController::minPortCount"/>
12709 and <link to="IStorageController::maxPortCount"/>.
12710 </desc>
12711 </attribute>
12712
12713 <attribute name="bus" type="StorageBus" readonly="yes">
12714 <desc>
12715 The connection type of the storage controller.
12716 </desc>
12717 </attribute>
12718
12719 <attribute name="controllerType" type="StorageControllerType">
12720 <desc>
12721 Type of the virtual storage controller. Depending on this value,
12722 VirtualBox will provide a different virtual storage controller hardware
12723 to the guest.
12724
12725 For SCSI controllers, the default type is LsiLogic.
12726 </desc>
12727 </attribute>
12728
12729 <method name="GetIDEEmulationPort">
12730 <desc>
12731 Gets the corresponding port number which is emulated as an IDE device.
12732
12733 <result name="E_INVALIDARG">
12734 The @a devicePosition is not in the range 0 to 3.
12735 </result>
12736 <result name="E_NOTIMPL">
12737 The storage controller type is not SATAIntelAhci.
12738 </result>
12739
12740 </desc>
12741 <param name="devicePosition" type="long" dir="in"/>
12742 <param name="portNumber" type="long" dir="return"/>
12743 </method>
12744
12745 <method name="SetIDEEmulationPort">
12746 <desc>
12747 Sets the port number which is emulated as an IDE device.
12748
12749 <result name="E_INVALIDARG">
12750 The @a devicePosition is not in the range 0 to 3 or the
12751 @a portNumber is not in the range 0 to 29.
12752 </result>
12753 <result name="E_NOTIMPL">
12754 The storage controller type is not SATAIntelAhci.
12755 </result>
12756
12757 </desc>
12758 <param name="devicePosition" type="long" dir="in"/>
12759 <param name="portNumber" type="long" dir="in"/>
12760 </method>
12761
12762 </interface>
12763
12764<if target="wsdl">
12765
12766 <!--
12767 // IManagedObjectRef
12768 /////////////////////////////////////////////////////////////////////////
12769 -->
12770
12771 <interface
12772 name="IManagedObjectRef" extends="$unknown"
12773 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12774 internal="yes"
12775 wsmap="managed"
12776 wscpp="hardcoded"
12777 >
12778 <desc>
12779 Managed object reference.
12780
12781 Only within the webservice, a managed object reference (which is really
12782 an opaque number) allows a webservice client to address an object
12783 that lives in the address space of the webservice server.
12784
12785 Behind each managed object reference, there is a COM object that lives
12786 in the webservice server's address space. The COM object is not freed
12787 until the managed object reference is released, either by an explicit
12788 call to <link to="IManagedObjectRef::release" /> or by logging off from
12789 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12790 all objects created during the webservice session.
12791
12792 Whenever a method call of the VirtualBox API returns a COM object, the
12793 webservice representation of that method will instead return a
12794 managed object reference, which can then be used to invoke methods
12795 on that object.
12796 </desc>
12797
12798 <method name="getInterfaceName">
12799 <desc>
12800 Returns the name of the interface that this managed object represents,
12801 for example, "IMachine", as a string.
12802 </desc>
12803 <param name="return" type="wstring" dir="return"/>
12804 </method>
12805
12806 <method name="release">
12807 <desc>
12808 Releases this managed object reference and frees the resources that
12809 were allocated for it in the webservice server process. After calling
12810 this method, the identifier of the reference can no longer be used.
12811 </desc>
12812 </method>
12813
12814 </interface>
12815
12816 <!--
12817 // IWebsessionManager
12818 /////////////////////////////////////////////////////////////////////////
12819 -->
12820
12821 <interface
12822 name="IWebsessionManager" extends="$unknown"
12823 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12824 internal="yes"
12825 wsmap="global"
12826 wscpp="hardcoded"
12827 >
12828 <desc>
12829 Websession manager. This provides essential services
12830 to webservice clients.
12831 </desc>
12832 <method name="logon">
12833 <desc>
12834 Logs a new client onto the webservice and returns a managed object reference to
12835 the IVirtualBox instance, which the client can then use as a basis to further
12836 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12837 interface, in one way or the other.
12838 </desc>
12839 <param name="username" type="wstring" dir="in"/>
12840 <param name="password" type="wstring" dir="in"/>
12841 <param name="return" type="IVirtualBox" dir="return"/>
12842 </method>
12843
12844 <method name="getSessionObject">
12845 <desc>
12846 Returns a managed object reference to the internal ISession object that was created
12847 for this web service session when the client logged on.
12848
12849 <see>ISession</see>
12850 </desc>
12851 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12852 <param name="return" type="ISession" dir="return"/>
12853 </method>
12854
12855 <method name="logoff">
12856 <desc>
12857 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12858 and destroys all resources associated with the session (most importantly, all
12859 managed objects created in the server while the session was active).
12860 </desc>
12861 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12862 </method>
12863
12864 </interface>
12865
12866</if>
12867
12868 <!--
12869 // IPerformanceCollector & friends
12870 /////////////////////////////////////////////////////////////////////////
12871 -->
12872
12873 <interface
12874 name="IPerformanceMetric" extends="$unknown"
12875 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12876 >
12877 <desc>
12878 The IPerformanceMetric interface represents parameters of the given
12879 performance metric.
12880 </desc>
12881
12882 <attribute name="metricName" type="wstring" readonly="yes">
12883 <desc>
12884 Name of the metric.
12885 </desc>
12886 </attribute>
12887
12888 <attribute name="object" type="$unknown" readonly="yes">
12889 <desc>
12890 Object this metric belongs to.
12891 </desc>
12892 </attribute>
12893
12894 <attribute name="description" type="wstring" readonly="yes">
12895 <desc>
12896 Textual description of the metric.
12897 </desc>
12898 </attribute>
12899
12900 <attribute name="period" type="unsigned long" readonly="yes">
12901 <desc>
12902 Time interval between samples, measured in seconds.
12903 </desc>
12904 </attribute>
12905
12906 <attribute name="count" type="unsigned long" readonly="yes">
12907 <desc>
12908 Number of recent samples retained by the performance collector for this
12909 metric.
12910
12911 When the collected sample count exceeds this number, older samples
12912 are discarded.
12913 </desc>
12914 </attribute>
12915
12916 <attribute name="unit" type="wstring" readonly="yes">
12917 <desc>
12918 Unit of measurement.
12919 </desc>
12920 </attribute>
12921
12922 <attribute name="minimumValue" type="long" readonly="yes">
12923 <desc>
12924 Minimum possible value of this metric.
12925 </desc>
12926 </attribute>
12927
12928 <attribute name="maximumValue" type="long" readonly="yes">
12929 <desc>
12930 Maximum possible value of this metric.
12931 </desc>
12932 </attribute>
12933 </interface>
12934
12935 <interface
12936 name="IPerformanceCollector" extends="$unknown"
12937 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12938 wsmap="managed"
12939 >
12940 <desc>
12941 The IPerformanceCollector interface represents a service that collects and
12942 stores performance metrics data.
12943
12944 Performance metrics are associated with objects of interfaces like IHost and
12945 IMachine. Each object has a distinct set of performance metrics.
12946 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12947
12948 Metric data is collected at the specified intervals and is retained
12949 internally. The interval and the number of retained samples can be set
12950 with <link to="IPerformanceCollector::setupMetrics" />.
12951
12952 Metrics are organized hierarchically, with each level separated by a
12953 slash (/) character. Generally, the scheme for metric names is like this:
12954
12955 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12956
12957 "Category/Metric" together form the base metric name. A base metric is the
12958 smallest unit for which a sampling interval and the number of retained
12959 samples can be set. Only base metrics can be enabled and disabled. All
12960 sub-metrics are collected when their base metric is collected.
12961 Collected values for any set of sub-metrics can be queried with
12962 <link to="IPerformanceCollector::queryMetricsData" />.
12963
12964 For example "CPU/Load/User:avg"
12965 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12966 "average" aggregate. An aggregate function is computed over all retained
12967 data. Valid aggregate functions are:
12968
12969 <ul>
12970 <li>avg -- average</li>
12971 <li>min -- minimum</li>
12972 <li>max -- maximum</li>
12973 </ul>
12974
12975 When setting up
12976 metric parameters, querying metric data, enabling or disabling metrics
12977 wildcards can be used in metric names to specify a subset of metrics. For
12978 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12979 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12980 values without aggregates <tt>*:</tt> can be used.
12981
12982 The valid names for base metrics are:
12983
12984 <ul>
12985 <li>CPU/Load</li>
12986 <li>CPU/MHz</li>
12987 <li>RAM/Usage</li>
12988 </ul>
12989
12990 The general sequence for collecting and retrieving the metrics is:
12991 <ul>
12992 <li>
12993 Obtain an instance of IPerformanceCollector with
12994 <link to="IVirtualBox::performanceCollector" />
12995 </li>
12996 <li>
12997 Allocate and populate an array with references to objects the metrics
12998 will be collected for. Use references to IHost and IMachine objects.
12999 </li>
13000 <li>
13001 Allocate and populate an array with base metric names the data will be
13002 collected for.
13003 </li>
13004 <li>
13005 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13006 metric data will be collected and stored.
13007 </li>
13008 <li>
13009 Wait for the data to get collected.
13010 </li>
13011 <li>
13012 Allocate and populate an array with references to objects the metric
13013 values will be queried for. You can re-use the object array used for
13014 setting base metrics.
13015 </li>
13016 <li>
13017 Allocate and populate an array with metric names the data will be
13018 collected for. Note that metric names differ from base metric names.
13019 </li>
13020 <li>
13021 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13022 have been collected so far are returned. Note that the values are still
13023 retained internally and data collection continues.
13024 </li>
13025 </ul>
13026
13027 For an example of usage refer to the following files in VirtualBox SDK:
13028 <ul>
13029 <li>
13030 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13031 </li>
13032 <li>
13033 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13034 </li>
13035 </ul>
13036 </desc>
13037
13038 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13039 <desc>
13040 Array of unique names of metrics.
13041
13042 This array represents all metrics supported by the performance
13043 collector. Individual objects do not necessarily support all of them.
13044 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13045 list of supported metrics for a particular object.
13046 </desc>
13047 </attribute>
13048
13049 <method name="getMetrics">
13050 <desc>
13051 Returns parameters of specified metrics for a set of objects.
13052 <note>
13053 @c Null metrics array means all metrics. @c Null object array means
13054 all existing objects.
13055 </note>
13056 </desc>
13057 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13058 <desc>
13059 Metric name filter. Currently, only a comma-separated list of metrics
13060 is supported.
13061 </desc>
13062 </param>
13063 <param name="objects" type="$unknown" dir="in" safearray="yes">
13064 <desc>
13065 Set of objects to return metric parameters for.
13066 </desc>
13067 </param>
13068 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13069 <desc>
13070 Array of returned metric parameters.
13071 </desc>
13072 </param>
13073 </method>
13074
13075 <method name="setupMetrics">
13076 <desc>
13077 Sets parameters of specified base metrics for a set of objects. Returns
13078 an array of <link to="IPerformanceMetric" /> describing the metrics have
13079 been affected.
13080 <note>
13081 @c Null or empty metric name array means all metrics. @c Null or empty
13082 object array means all existing objects. If metric name array contains
13083 a single element and object array contains many, the single metric
13084 name array element is applied to each object array element to form
13085 metric/object pairs.
13086 </note>
13087 </desc>
13088 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13089 <desc>
13090 Metric name filter. Comma-separated list of metrics with wildcard
13091 support.
13092 </desc>
13093 </param>
13094 <param name="objects" type="$unknown" dir="in" safearray="yes">
13095 <desc>
13096 Set of objects to setup metric parameters for.
13097 </desc>
13098 </param>
13099 <param name="period" type="unsigned long" dir="in">
13100 <desc>
13101 Time interval in seconds between two consecutive samples of performance
13102 data.
13103 </desc>
13104 </param>
13105 <param name="count" type="unsigned long" dir="in">
13106 <desc>
13107 Number of samples to retain in performance data history. Older samples
13108 get discarded.
13109 </desc>
13110 </param>
13111 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13112 <desc>
13113 Array of metrics that have been modified by the call to this method.
13114 </desc>
13115 </param>
13116 </method>
13117
13118 <method name="enableMetrics">
13119 <desc>
13120 Turns on collecting specified base metrics. Returns an array of
13121 <link to="IPerformanceMetric" /> describing the metrics have been
13122 affected.
13123 <note>
13124 @c Null or empty metric name array means all metrics. @c Null or empty
13125 object array means all existing objects. If metric name array contains
13126 a single element and object array contains many, the single metric
13127 name array element is applied to each object array element to form
13128 metric/object pairs.
13129 </note>
13130 </desc>
13131 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13132 <desc>
13133 Metric name filter. Comma-separated list of metrics with wildcard
13134 support.
13135 </desc>
13136 </param>
13137 <param name="objects" type="$unknown" dir="in" safearray="yes">
13138 <desc>
13139 Set of objects to enable metrics for.
13140 </desc>
13141 </param>
13142 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13143 <desc>
13144 Array of metrics that have been modified by the call to this method.
13145 </desc>
13146 </param>
13147 </method>
13148
13149 <method name="disableMetrics">
13150 <desc>
13151 Turns off collecting specified base metrics. Returns an array of
13152 <link to="IPerformanceMetric" /> describing the metrics have been
13153 affected.
13154 <note>
13155 @c Null or empty metric name array means all metrics. @c Null or empty
13156 object array means all existing objects. If metric name array contains
13157 a single element and object array contains many, the single metric
13158 name array element is applied to each object array element to form
13159 metric/object pairs.
13160 </note>
13161 </desc>
13162 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13163 <desc>
13164 Metric name filter. Comma-separated list of metrics with wildcard
13165 support.
13166 </desc>
13167 </param>
13168 <param name="objects" type="$unknown" dir="in" safearray="yes">
13169 <desc>
13170 Set of objects to disable metrics for.
13171 </desc>
13172 </param>
13173 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13174 <desc>
13175 Array of metrics that have been modified by the call to this method.
13176 </desc>
13177 </param>
13178 </method>
13179
13180 <method name="queryMetricsData">
13181 <desc>
13182 Queries collected metrics data for a set of objects.
13183
13184 The data itself and related metric information are returned in seven
13185 parallel and one flattened array of arrays. Elements of
13186 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13187 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13188 the same index describe one set of values corresponding to a single
13189 metric.
13190
13191 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13192 start and length of a sub-array is indicated by
13193 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13194 value for metric <tt>metricNames[i]</tt> is at
13195 <tt>returnData[returnIndices[i]]</tt>.
13196
13197 <note>
13198 @c Null or empty metric name array means all metrics. @c Null or empty
13199 object array means all existing objects. If metric name array contains
13200 a single element and object array contains many, the single metric
13201 name array element is applied to each object array element to form
13202 metric/object pairs.
13203 </note>
13204 <note>
13205 Data collection continues behind the scenes after call to
13206 @c queryMetricsData. The return data can be seen as the snapshot of
13207 the current state at the time of @c queryMetricsData call. The
13208 internally kept metric values are not cleared by the call. This makes
13209 possible querying different subsets of metrics or aggregates with
13210 subsequent calls. If periodic querying is needed it is highly
13211 suggested to query the values with @c interval*count period to avoid
13212 confusion. This way a completely new set of data values will be
13213 provided by each query.
13214 </note>
13215 </desc>
13216 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13217 <desc>
13218 Metric name filter. Comma-separated list of metrics with wildcard
13219 support.
13220 </desc>
13221 </param>
13222 <param name="objects" type="$unknown" dir="in" safearray="yes">
13223 <desc>
13224 Set of objects to query metrics for.
13225 </desc>
13226 </param>
13227 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13228 <desc>
13229 Names of metrics returned in @c returnData.
13230 </desc>
13231 </param>
13232 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13233 <desc>
13234 Objects associated with metrics returned in @c returnData.
13235 </desc>
13236 </param>
13237 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13238 <desc>
13239 Units of measurement for each returned metric.
13240 </desc>
13241 </param>
13242 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13243 <desc>
13244 Divisor that should be applied to return values in order to get
13245 floating point values. For example:
13246 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13247 will retrieve the floating point value of i-th sample of the first
13248 metric.
13249 </desc>
13250 </param>
13251 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13252 <desc>
13253 Sequence numbers of the first elements of value sequences of particular metrics
13254 returned in @c returnData. For aggregate metrics it is the sequence number of
13255 the sample the aggregate started calculation from.
13256 </desc>
13257 </param>
13258 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13259 <desc>
13260 Indices of the first elements of value sequences of particular metrics
13261 returned in @c returnData.
13262 </desc>
13263 </param>
13264 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13265 <desc>
13266 Lengths of value sequences of particular metrics.
13267 </desc>
13268 </param>
13269 <param name="returnData" type="long" dir="return" safearray="yes">
13270 <desc>
13271 Flattened array of all metric data containing sequences of values for
13272 each metric.
13273 </desc>
13274 </param>
13275 </method>
13276
13277 </interface>
13278
13279 <module name="VBoxSVC" context="LocalServer">
13280 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13281 namespace="virtualbox.org">
13282 <interface name="IVirtualBox" default="yes"/>
13283 </class>
13284 </module>
13285
13286 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13287 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13288 namespace="virtualbox.org">
13289 <interface name="ISession" default="yes"/>
13290 </class>
13291 </module>
13292
13293</library>
13294
13295</idl>
13296
13297<!-- 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