VirtualBox

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

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

API/HardDisk, Storage/VBoxHDD: use image variant, and to implement cloning to different image variant add a parameter to VDCopy.

  • Property svn:eol-style set to native
File size: 481.5 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="MachineState"
363 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
364 >
365 <desc>
366 Virtual machine execution state.
367
368 This enumeration represents possible values of the <link
369 to="IMachine::state"/> attribute.
370
371 Below is the basic virtual machine state diagram. It shows how the state
372 changes during virtual machine execution. The text in square braces shows
373 a method of the IConsole interface that performs the given state
374 transition.
375
376 <pre>
377 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
378 V |
379 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
380 | | | | V |
381 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
382 | | ^ | ^ |
383 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
384 | ^ | | | |
385 | | +-----------------------------------------+-|-------------------+ +
386 | | | | |
387 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
388 | | | |
389 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
390 | | |
391 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
392 </pre>
393
394 Note that states to the right from PoweredOff, Aborted and Saved in the
395 above diagram are called <i>online VM states</i>. These states
396 represent the virtual machine which is being executed in a dedicated
397 process (usually with a GUI window attached to it where you can see the
398 activity of the virtual machine and interact with it). There are two
399 special pseudo-states, FirstOnline and LastOnline, that can be used in
400 relational expressions to detect if the given machine state is online or
401 not:
402
403 <pre>
404 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
405 machine.GetState() &lt;= MachineState_LastOnline)
406 {
407 ...the machine is being executed...
408 }
409 </pre>
410
411 When the virtual machine is in one of the online VM states (that is, being
412 executed), only a few machine settings can be modified. Methods working
413 with such settings contain an explicit note about that. An attempt to
414 change any oter setting or perform a modifying operation during this time
415 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
416
417 All online states except Running, Paused and Stuck are transitional: they
418 represent temporary conditions of the virtual machine that will last as
419 long as the operation that initiated such a condition.
420
421 The Stuck state is a special case. It means that execution of the machine
422 has reached the "Guru Meditation" condition. This condition indicates an
423 internal VMM (virtual machine manager) failure which may happen as a
424 result of either an unhandled low-level virtual hardware exception or one
425 of the recompiler exceptions (such as the <i>too-many-traps</i>
426 condition).
427
428 Note also that any online VM state may transit to the Aborted state. This
429 happens if the process that is executing the virtual machine terminates
430 unexpectedly (for example, crashes). Other than that, the Aborted state is
431 equivalent to PoweredOff.
432
433 There are also a few additional state diagrams that do not deal with
434 virtual machine execution and therefore are shown separately. The states
435 shown on these diagrams are called <i>offline VM states</i> (this includes
436 PoweredOff, Aborted and Saved too).
437
438 The first diagram shows what happens when a lengthy setup operation is
439 being executed (such as <link to="IMachine::attachHardDisk"/>).
440
441 <pre>
442 +-----------------------------------(same sate as before the call)------+
443 | |
444 +-&gt; PoweredOff --+ |
445 | | |
446 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
447 | |
448 +-&gt; Saved -------+
449 </pre>
450
451 The next two diagrams demonstrate the process of taking a snapshot of a
452 powered off virtual machine and performing one of the "discard..."
453 operations, respectively.
454
455 <pre>
456 +-----------------------------------(same sate as before the call)------+
457 | |
458 +-&gt; PoweredOff --+ |
459 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
460 +-&gt; Aborted -----+
461
462 +-&gt; PoweredOff --+
463 | |
464 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
465 | | [discardCurrentState()] |
466 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
467 | |
468 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
469 </pre>
470
471 Note that the Saving state is present in both the offline state group and
472 online state group. Currently, the only way to determine what group is
473 assumed in a particular case is to remember the previous machine state: if
474 it was Running or Paused, then Saving is an online state, otherwise it is
475 an offline state. This inconsistency may be removed in one of the future
476 versions of VirtualBox by adding a new state.
477
478 <note internal="yes">
479 For whoever decides to touch this enum: In order to keep the
480 comparisons involving FirstOnline and LastOnline pseudo-states valid,
481 the numeric values of these states must be correspondingly updated if
482 needed: for any online VM state, the condition
483 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
484 <tt>true</tt>. The same relates to transient states for which
485 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
486 <tt>true</tt>.
487 </note>
488 </desc>
489
490 <const name="Null" value="0">
491 <desc>Null value (nver used by the API).</desc>
492 </const>
493 <const name="PoweredOff" value="1">
494 <desc>
495 The machine is not running.
496 </desc>
497 </const>
498 <const name="Saved" value="2">
499 <desc>
500 The machine is not currently running, but the execution state of the machine
501 has been saved to an external file when it was running.
502 </desc>
503 </const>
504 <const name="Aborted" value="3">
505 <desc>
506 The process running the machine has terminated abnormally.
507 </desc>
508 </const>
509 <const name="Running" value="4">
510 <desc>
511 The machine is currently being executed.
512 <note internal="yes">
513 For whoever decides to touch this enum: In order to keep the
514 comparisons in the old source code valid, this state must immediately
515 precede the Paused state.
516 </note>
517 </desc>
518 </const>
519 <const name="Paused" value="5">
520 <desc>
521 Execution of the machine has been paused.
522 <note internal="yes">
523 For whoever decides to touch this enum: In order to keep the
524 comparisons in the old source code valid, this state must immediately
525 follow the Running state.
526 </note>
527 </desc>
528 </const>
529 <const name="Stuck" value="6">
530 <desc>
531 Execution of the machine has reached the "Guru Meditation"
532 condition.
533 </desc>
534 </const>
535 <const name="Starting" value="7">
536 <desc>
537 Machine is being started after powering it on from a
538 zero execution state.
539 </desc>
540 </const>
541 <const name="Stopping" value="8">
542 <desc>
543 Machine is being normally stopped powering it off, or after the guest OS
544 has initiated a shutdown sequence.
545 </desc>
546 </const>
547 <const name="Saving" value="9">
548 <desc>
549 Machine is saving its execution state to a file or an online
550 snapshot of the machine is being taken.
551 </desc>
552 </const>
553 <const name="Restoring" value="10">
554 <desc>
555 Execution state of the machine is being restored from a file
556 after powering it on from the saved execution state.
557 </desc>
558 </const>
559 <const name="Discarding" value="11">
560 <desc>
561 Snapshot of the machine is being discarded.
562 </desc>
563 </const>
564 <const name="SettingUp" value="12">
565 <desc>
566 Lengthy setup operation is in progress.
567 </desc>
568 </const>
569
570 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
571 <desc>
572 Pseudo-state: first online state (for use in relational expressions).
573 </desc>
574 </const>
575 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
576 <desc>
577 Pseudo-state: last online state (for use in relational expressions).
578 </desc>
579 </const>
580
581 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
582 <desc>
583 Pseudo-state: first transient state (for use in relational expressions).
584 </desc>
585 </const>
586 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
587 <desc>
588 Pseudo-state: last transient state (for use in relational expressions).
589 </desc>
590 </const>
591
592 </enum>
593
594 <enum
595 name="SessionState"
596 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
597 >
598 <desc>
599 Session state. This enumeration represents possible values of
600 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
601 attributes. See individual enumerator descriptions for the meaning for
602 every value.
603 </desc>
604
605 <const name="Null" value="0">
606 <desc>Null value (never used by the API).</desc>
607 </const>
608 <const name="Closed" value="1">
609 <desc>
610 The machine has no open sessions (<link to="IMachine::sessionState"/>);
611 the session is closed (<link to="ISession::state"/>)
612 </desc>
613 </const>
614 <const name="Open" value="2">
615 <desc>
616 The machine has an open direct session (<link to="IMachine::sessionState"/>);
617 the session is open (<link to="ISession::state"/>)
618 </desc>
619 </const>
620 <const name="Spawning" value="3">
621 <desc>
622 A new (direct) session is being opened for the machine
623 as a result of <link to="IVirtualBox::openRemoteSession"/>
624 call (<link to="IMachine::sessionState"/>);
625 the session is currently being opened
626 as a result of <link to="IVirtualBox::openRemoteSession"/>
627 call (<link to="ISession::state"/>)
628 </desc>
629 </const>
630 <const name="Closing" value="4">
631 <desc>
632 The direct session is being closed (<link to="IMachine::sessionState"/>);
633 the session is being closed (<link to="ISession::state"/>)
634 </desc>
635 </const>
636 </enum>
637
638 <enum
639 name="SessionType"
640 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
641 >
642 <desc>
643 Session type. This enumeration represents possible values of the
644 <link to="ISession::type"/> attribute.
645 </desc>
646
647 <const name="Null" value="0">
648 <desc>Null value (never used by the API).</desc>
649 </const>
650 <const name="Direct" value="1">
651 <desc>
652 Direct session
653 (opened by <link to="IVirtualBox::openSession"/>)
654 </desc>
655 </const>
656 <const name="Remote" value="2">
657 <desc>
658 Remote session
659 (opened by <link to="IVirtualBox::openRemoteSession"/>)
660 </desc>
661 </const>
662 <const name="Existing" value="3">
663 <desc>
664 Existing session
665 (opened by <link to="IVirtualBox::openExistingSession"/>)
666 </desc>
667 </const>
668 </enum>
669
670 <enum
671 name="DeviceType"
672 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
673 >
674 <desc>
675 Device type.
676 </desc>
677 <const name="Null" value="0">
678 <desc>
679 Null value, may also mean "no device" (not allowed for
680 <link to="IConsole::getDeviceActivity"/>).
681 </desc>
682 </const>
683 <const name="Floppy" value="1">
684 <desc>Floppy device.</desc>
685 </const>
686 <const name="DVD" value="2">
687 <desc>CD/DVD-ROM device.</desc>
688 </const>
689 <const name="HardDisk" value="3">
690 <desc>Hard disk device.</desc>
691 </const>
692 <const name="Network" value="4">
693 <desc>Network device.</desc>
694 </const>
695 <const name="USB" value="5">
696 <desc>USB device.</desc>
697 </const>
698 <const name="SharedFolder" value="6">
699 <desc>Shared folder device.</desc>
700 </const>
701 </enum>
702
703 <enum
704 name="DeviceActivity"
705 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
706 >
707 <desc>
708 Device activity for <link to="IConsole::getDeviceActivity"/>.
709 </desc>
710
711 <const name="Null" value="0"/>
712 <const name="Idle" value="1"/>
713 <const name="Reading" value="2"/>
714 <const name="Writing" value="3"/>
715 </enum>
716
717 <enum
718 name="ClipboardMode"
719 uuid="33364716-4008-4701-8f14-be0fa3d62950"
720 >
721 <desc>
722 Host-Guest clipboard interchange mode.
723 </desc>
724
725 <const name="Disabled" value="0"/>
726 <const name="HostToGuest" value="1"/>
727 <const name="GuestToHost" value="2"/>
728 <const name="Bidirectional" value="3"/>
729 </enum>
730
731 <enum
732 name="Scope"
733 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
734 >
735 <desc>
736 Scope of the operation.
737
738 A generic enumeration used in various methods to define the action or
739 argument scope.
740 </desc>
741
742 <const name="Global" value="0"/>
743 <const name="Machine" value="1"/>
744 <const name="Session" value="2"/>
745 </enum>
746
747 <enum
748 name="GuestStatisticType"
749 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
750 >
751 <desc>
752 Statistics type for <link to="IGuest::getStatistic"/>.
753 </desc>
754
755 <const name="CPULoad_Idle" value="0">
756 <desc>
757 Idle CPU load (0-100%) for last interval.
758 </desc>
759 </const>
760 <const name="CPULoad_Kernel" value="1">
761 <desc>
762 Kernel CPU load (0-100%) for last interval.
763 </desc>
764 </const>
765 <const name="CPULoad_User" value="2">
766 <desc>
767 User CPU load (0-100%) for last interval.
768 </desc>
769 </const>
770 <const name="Threads" value="3">
771 <desc>
772 Total number of threads in the system.
773 </desc>
774 </const>
775 <const name="Processes" value="4">
776 <desc>
777 Total number of processes in the system.
778 </desc>
779 </const>
780 <const name="Handles" value="5">
781 <desc>
782 Total number of handles in the system.
783 </desc>
784 </const>
785 <const name="MemoryLoad" value="6">
786 <desc>
787 Memory load (0-100%).
788 </desc>
789 </const>
790 <const name="PhysMemTotal" value="7">
791 <desc>
792 Total physical memory in megabytes.
793 </desc>
794 </const>
795 <const name="PhysMemAvailable" value="8">
796 <desc>
797 Free physical memory in megabytes.
798 </desc>
799 </const>
800 <const name="PhysMemBalloon" value="9">
801 <desc>
802 Ballooned physical memory in megabytes.
803 </desc>
804 </const>
805 <const name="MemCommitTotal" value="10">
806 <desc>
807 Total amount of memory in the committed state in megabytes.
808 </desc>
809 </const>
810 <const name="MemKernelTotal" value="11">
811 <desc>
812 Total amount of memory used by the guest OS's kernel in megabytes.
813 </desc>
814 </const>
815 <const name="MemKernelPaged" value="12">
816 <desc>
817 Total amount of paged memory used by the guest OS's kernel in megabytes.
818 </desc>
819 </const>
820 <const name="MemKernelNonpaged" value="13">
821 <desc>
822 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
823 </desc>
824 </const>
825 <const name="MemSystemCache" value="14">
826 <desc>
827 Total amount of memory used by the guest OS's system cache in megabytes.
828 </desc>
829 </const>
830 <const name="PageFileSize" value="15">
831 <desc>
832 Pagefile size in megabytes.
833 </desc>
834 </const>
835 <const name="SampleNumber" value="16">
836 <desc>
837 Statistics sample number
838 </desc>
839 </const>
840 <const name="MaxVal" value="17"/>
841 </enum>
842
843 <enum
844 name="BIOSBootMenuMode"
845 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
846 >
847 <desc>
848 BIOS boot menu mode.
849 </desc>
850
851 <const name="Disabled" value="0"/>
852 <const name="MenuOnly" value="1"/>
853 <const name="MessageAndMenu" value="2"/>
854 </enum>
855
856 <enum
857 name="DriveState"
858 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
859 >
860 <const name="Null" value="0">
861 <desc>Null value (never used by the API).</desc>
862 </const>
863 <const name="NotMounted" value="1"/>
864 <const name="ImageMounted" value="2"/>
865 <const name="HostDriveCaptured" value="3"/>
866 </enum>
867
868 <enum
869 name="ProcessorFeature"
870 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
871 >
872 <desc>
873 CPU features.
874 </desc>
875
876 <const name="HWVirtEx" value="0"/>
877 <const name="PAE" value="1"/>
878 <const name="LongMode" value="2"/>
879 </enum>
880
881
882 <!--
883 // IVirtualBoxErrorInfo
884 /////////////////////////////////////////////////////////////////////////
885 -->
886
887 <interface
888 name="IVirtualBoxErrorInfo" extends="$errorinfo"
889 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
890 supportsErrorInfo="no"
891 wsmap="suppress"
892 >
893 <desc>
894 The IVirtualBoxErrorInfo interface represents extended error information.
895
896 Extended error information can be set by VirtualBox components after
897 unsuccessful or partially successful method invocation. This information
898 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
899 and then shown to the client in addition to the plain 32-bit result code.
900
901 In MS COM, this interface extends the IErrorInfo interface,
902 in XPCOM, it extends the nsIException interface. In both cases,
903 it provides a set of common attributes to retrieve error
904 information.
905
906 Sometimes invocation of some component's method may involve methods of
907 other components that may also fail (independently of this method's
908 failure), or a series of non-fatal errors may precede a fatal error that
909 causes method failure. In cases like that, it may be desirable to preserve
910 information about all errors happened during method invocation and deliver
911 it to the caller. The <link to="#next"/> attribute is intended
912 specifically for this purpose and allows to represent a chain of errors
913 through a single IVirtualBoxErrorInfo object set after method invocation.
914
915 Note that errors are stored to a chain in the reverse order, i.e. the
916 initial error object you query right after method invocation is the last
917 error set by the callee, the object it points to in the @a next attribute
918 is the previous error and so on, up to the first error (which is the last
919 in the chain).
920 </desc>
921
922 <attribute name="resultCode" type="result" readonly="yes">
923 <desc>
924 Result code of the error.
925 Usually, it will be the same as the result code returned
926 by the method that provided this error information, but not
927 always. For example, on Win32, CoCreateInstance() will most
928 likely return E_NOINTERFACE upon unsuccessful component
929 instantiation attempt, but not the value the component factory
930 returned.
931 <note>
932 In MS COM, there is no equivalent.
933 In XPCOM, it is the same as nsIException::result.
934 </note>
935 </desc>
936 </attribute>
937
938 <attribute name="interfaceID" type="uuid" readonly="yes">
939 <desc>
940 UUID of the interface that defined the error.
941 <note>
942 In MS COM, it is the same as IErrorInfo::GetGUID.
943 In XPCOM, there is no equivalent.
944 </note>
945 </desc>
946 </attribute>
947
948 <attribute name="component" type="wstring" readonly="yes">
949 <desc>
950 Name of the component that generated the error.
951 <note>
952 In MS COM, it is the same as IErrorInfo::GetSource.
953 In XPCOM, there is no equivalent.
954 </note>
955 </desc>
956 </attribute>
957
958 <attribute name="text" type="wstring" readonly="yes">
959 <desc>
960 Text description of the error.
961 <note>
962 In MS COM, it is the same as IErrorInfo::GetDescription.
963 In XPCOM, it is the same as nsIException::message.
964 </note>
965 </desc>
966 </attribute>
967
968 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
969 <desc>
970 Next error object if there is any, or @c null otherwise.
971 <note>
972 In MS COM, there is no equivalent.
973 In XPCOM, it is the same as nsIException::inner.
974 </note>
975 </desc>
976 </attribute>
977
978 </interface>
979
980
981 <!--
982 // IVirtualBox
983 /////////////////////////////////////////////////////////////////////////
984 -->
985
986 <interface
987 name="IVirtualBoxCallback" extends="$unknown"
988 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
989 wsmap="suppress"
990 >
991 <method name="onMachineStateChange">
992 <desc>
993 The execution state of the given machine has changed.
994 <see>IMachine::state</see>
995 </desc>
996 <param name="machineId" type="uuid" dir="in">
997 <desc>ID of the machine this event relates to.</desc>
998 </param>
999 <param name="state" type="MachineState" dir="in">
1000 <desc>New execution state.</desc>
1001 </param>
1002 </method>
1003
1004 <method name="onMachineDataChange">
1005 <desc>
1006 Any of the settings of the given machine has changed.
1007 </desc>
1008 <param name="machineId" type="uuid" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 </method>
1012
1013 <method name="onExtraDataCanChange">
1014 <desc>
1015 Notification when someone tries to change extra data for
1016 either the given machine or (if null) global extra data.
1017 This gives the chance to veto against changes.
1018 </desc>
1019 <param name="machineId" type="uuid" dir="in">
1020 <desc>
1021 ID of the machine this event relates to
1022 (null ID for global extra data change requests).
1023 </desc>
1024 </param>
1025 <param name="key" type="wstring" dir="in">
1026 <desc>
1027 Extra data key for the attempted write.
1028 </desc>
1029 </param>
1030 <param name="value" type="wstring" dir="in">
1031 <desc>
1032 Extra data value for the given key.
1033 </desc>
1034 </param>
1035 <param name="error" type="wstring" dir="out">
1036 <desc>
1037 Optional error message describing the reason of the
1038 veto (ignored if this notification returns @c true).
1039 </desc>
1040 </param>
1041 <param name="allowChange" type="boolean" dir="return">
1042 <desc>
1043 Flag to indicate whether the callee agrees (@c true)
1044 or vetoes against the change (@c false).
1045 </desc>
1046 </param>
1047 </method>
1048
1049 <method name="onExtraDataChange">
1050 <desc>
1051 Notification when machine specific or global extra data
1052 has changed.
1053 </desc>
1054 <param name="machineId" type="uuid" dir="in">
1055 <desc>
1056 ID of the machine this event relates to.
1057 Null for global extra data changes.
1058 </desc>
1059 </param>
1060 <param name="key" type="wstring" dir="in">
1061 <desc>
1062 Extra data key that has changed.
1063 </desc>
1064 </param>
1065 <param name="value" type="wstring" dir="in">
1066 <desc>
1067 Extra data value for the given key.
1068 </desc>
1069 </param>
1070 </method>
1071
1072 <method name="onMediaRegistered">
1073 <desc>
1074 The given media was registered or unregistered
1075 within this VirtualBox installation.
1076
1077 The @a mediaType parameter describes what type of
1078 media the specified @a mediaId refers to. Possible
1079 values are:
1080
1081 <ul>
1082 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1083 that, if registered, can be obtained using the
1084 <link to="IVirtualBox::getHardDisk"/> call.</li>
1085 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1086 that, if registered, can be obtained using the
1087 <link to="IVirtualBox::getDVDImage"/> call.</li>
1088 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1089 that, if registered, can be obtained using the
1090 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1091 </ul>
1092
1093 Note that if this is a deregistration notification,
1094 there is no way to access the object representing the
1095 unregistered media. It is supposed that the
1096 application will do required cleanup based on the
1097 @a mediaId value.
1098 </desc>
1099 <param name="mediaId" type="uuid" dir="in">
1100 <desc>ID of the media this event relates to.</desc>
1101 </param>
1102 <param name="mediaType" type="DeviceType" dir="in">
1103 <desc>Type of the media this event relates to.</desc>
1104 </param>
1105 <param name="registered" type="boolean" dir="in">
1106 <desc>
1107 If true, the media was registered, otherwise it was
1108 unregistered.
1109 </desc>
1110 </param>
1111 </method>
1112
1113 <method name="onMachineRegistered">
1114 <desc>
1115 The given machine was registered or unregistered
1116 within this VirtualBox installation.
1117 </desc>
1118 <param name="machineId" type="uuid" dir="in">
1119 <desc>ID of the machine this event relates to.</desc>
1120 </param>
1121 <param name="registered" type="boolean" dir="in">
1122 <desc>
1123 If true, the machine was registered, otherwise it was
1124 unregistered.
1125 </desc>
1126 </param>
1127 </method>
1128
1129 <method name="onSessionStateChange">
1130 <desc>
1131 The state of the session for the given machine was changed.
1132 <see>IMachine::sessionState</see>
1133 </desc>
1134 <param name="machineId" type="uuid" dir="in">
1135 <desc>ID of the machine this event relates to.</desc>
1136 </param>
1137 <param name="state" type="SessionState" dir="in">
1138 <desc>New session state.</desc>
1139 </param>
1140 </method>
1141
1142 <method name="onSnapshotTaken">
1143 <desc>
1144 A new snapshot of the machine has been taken.
1145 <see>ISnapshot</see>
1146 </desc>
1147 <param name="machineId" type="uuid" dir="in">
1148 <desc>ID of the machine this event relates to.</desc>
1149 </param>
1150 <param name="snapshotId" type="uuid" dir="in">
1151 <desc>ID of the new snapshot.</desc>
1152 </param>
1153 </method>
1154
1155 <method name="onSnapshotDiscarded">
1156 <desc>
1157 Snapshot of the given machine has been discarded.
1158
1159 <note>
1160 This notification is delivered <b>after</b> the snapshot
1161 object has been uninitialized on the server (so that any
1162 attempt to call its methods will return an error).
1163 </note>
1164
1165 <see>ISnapshot</see>
1166 </desc>
1167 <param name="machineId" type="uuid" dir="in">
1168 <desc>ID of the machine this event relates to.</desc>
1169 </param>
1170 <param name="snapshotId" type="uuid" dir="in">
1171 <desc>
1172 ID of the discarded snapshot. <tt>null</tt> means the
1173 current machine state has been discarded (restored from
1174 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="uuid" dir="in">
1185 <desc>ID of the machine this event relates to.</desc>
1186 </param>
1187 <param name="snapshotId" type="uuid" 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="uuid" 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="IVirtualBox" extends="$dispatched"
1222 uuid="18c00639-2bc0-4d5f-93a0-5f20372f9914"
1223 wsmap="managed"
1224 >
1225 <desc>
1226 The IVirtualBox interface represents the main interface exposed by the
1227 product that provides virtual machine management.
1228
1229 An instance of IVirtualBox is required for the product to do anything
1230 useful. Even though the interface does not expose this, internally,
1231 IVirtualBox is implemented as a singleton and actually lives in the
1232 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1233 IVirtualBox can track the state of all virtual machines on a particular
1234 host, regardless of which frontend started them.
1235
1236 To enumerate all the virtual machines on the host, use the
1237 <link to="IVirtualBox::machines"/> attribute.
1238 </desc>
1239
1240 <attribute name="version" type="wstring" readonly="yes">
1241 <desc>
1242 A string representing the version number of the product. The
1243 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1244 last number represents the build number and will frequently change.
1245 </desc>
1246 </attribute>
1247
1248 <attribute name="revision" type="unsigned long" readonly="yes">
1249 <desc>
1250 The internal build revision number of the product.
1251 </desc>
1252 </attribute>
1253
1254 <attribute name="packageType" type="wstring" readonly="yes">
1255 <desc>
1256 A string representing the package type of this product. The
1257 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1258 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1259 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1260 this.
1261 </desc>
1262 </attribute>
1263
1264 <attribute name="homeFolder" type="wstring" readonly="yes">
1265 <desc>
1266 Full path to the directory where the global settings file,
1267 <tt>VirtualBox.xml</tt>, is stored.
1268
1269 In this version of VirtualBox, the value of this property is
1270 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1271 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1272 as determined by the host OS), and cannot be changed.
1273
1274 This path is also used as the base to resolve relative paths in
1275 places where relative paths are allowed (unless otherwise
1276 expressly indicated).
1277 </desc>
1278 </attribute>
1279
1280 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1281 <desc>
1282 Full name of the global settings file.
1283 The value of this property corresponds to the value of
1284 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1285 </desc>
1286 </attribute>
1287
1288 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1289 <desc>
1290 Current version of the format of the global VirtualBox settings file
1291 (<tt>VirtualBox.xml</tt>).
1292
1293 The version string has the following format:
1294 <pre>
1295 x.y-platform
1296 </pre>
1297 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1298 versions, and <tt>platform</tt> is the platform identifier.
1299
1300 The current version usually matches the value of the
1301 <link to="#settingsFormatVersion"/> attribute unless the
1302 settings file was created by an older version of VirtualBox and there
1303 was a change of the settings file format since then.
1304
1305 Note that VirtualBox automatically converts settings files from older
1306 versions to the most recent version when reading them (usually at
1307 VirtualBox startup) but it doesn't save the changes back until
1308 you call a method that implicitly saves settings (such as
1309 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1310 explicitly. Therefore, if the value of this attribute differs from the
1311 value of <link to="#settingsFormatVersion"/>, then it
1312 means that the settings file was converted but the result of the
1313 conversion is not yet saved to disk.
1314
1315 The above feature may be used by interactive front-ends to inform users
1316 about the settings file format change and offer them to explicitly save
1317 all converted settings files (the global and VM-specific ones),
1318 optionally create backup copies of the old settings files before saving,
1319 etc.
1320
1321 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1322 </desc>
1323 </attribute>
1324
1325 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1326 <desc>
1327 Most recent version of the settings file format.
1328
1329 The version string has the following format:
1330 <pre>
1331 x.y-platform
1332 </pre>
1333 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1334 versions, and <tt>platform</tt> is the platform identifier.
1335
1336 VirtualBox uses this version of the format when saving settings files
1337 (either as a result of method calls that require to save settings or as
1338 a result of an explicit call to <link to="#saveSettings"/>).
1339
1340 <see>settingsFileVersion</see>
1341 </desc>
1342 </attribute>
1343
1344 <attribute name="host" type="IHost" readonly="yes">
1345 <desc>Associated host object.</desc>
1346 </attribute>
1347
1348 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1349 <desc>Associated system information object.</desc>
1350 </attribute>
1351
1352 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1353 <desc>
1354 Array of machine objects registered within this VirtualBox instance.
1355 </desc>
1356 </attribute>
1357
1358 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1359 <desc>
1360 Array of hard disk objects known to this VirtualBox installation.
1361
1362 This array contains only base (root) hard disks. All differencing
1363 hard disks of the given base hard disk can be enumerated using
1364 <link to="IHardDisk::children"/>.
1365 </desc>
1366 </attribute>
1367
1368 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1369 <desc>
1370 Array of CD/DVD image objects registered with this VirtualBox instance.
1371 </desc>
1372 </attribute>
1373
1374 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1375 <desc>
1376 Array of floppy image objects registered with this VirtualBox instance.
1377 </desc>
1378 </attribute>
1379
1380 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1381
1382 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1383
1384 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1385 <desc>
1386 Collection of global shared folders. Global shared folders are
1387 available to all virtual machines.
1388
1389 New shared folders are added to the collection using
1390 <link to="#createSharedFolder"/>. Existing shared folders can be
1391 removed using <link to="#removeSharedFolder"/>.
1392
1393 <note>
1394 In the current version of the product, global shared folders are not
1395 implemented and therefore this collection is always empty.
1396 </note>
1397 </desc>
1398 </attribute>
1399
1400 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1401 <desc>
1402 Associated performance collector object.
1403 </desc>
1404 </attribute>
1405
1406 <method name="createMachine">
1407 <desc>
1408 Creates a new virtual machine.
1409
1410 The new machine is created unregistered, with the initial configuration
1411 set according to the specified guest OS type. A typical sequence of
1412 actions to create a new virtual machine is as follows:
1413
1414 <ol>
1415 <li>
1416 Call this method to have a new machine created. The returned machine
1417 object will be "mutable" allowing to change any machine property.
1418 </li>
1419
1420 <li>
1421 Configure the machine using the appropriate attributes and methods.
1422 </li>
1423
1424 <li>
1425 Call <link to="IMachine::saveSettings" /> to write the settings
1426 to the machine's XML settings file. The configuration of the newly
1427 created machine will not be saved to disk until this method is
1428 called.
1429 </li>
1430
1431 <li>
1432 Call <link to="#registerMachine" /> to add the machine to the list
1433 of machines known to VirtualBox.
1434 </li>
1435 </ol>
1436
1437 You should specify valid name for the newly created machine when calling
1438 this method. See the <link to="IMachine::name"/> attribute description
1439 for more details about the machine name.
1440
1441 The specified guest OS type identifier must match an ID of one of known
1442 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1443 array.
1444
1445 Every machine has a <i>settings file</i> that is used to store
1446 the machine configuration. This file is stored in a directory called the
1447 <i>machine settings subfolder</i>. Both the settings subfolder and file
1448 will have a name that corresponds to the name of the virtual machine.
1449 You can specify where to create the machine setting subfolder using the
1450 @a baseFolder argument. The base folder can be absolute (full path) or
1451 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1452 directory</link>.
1453
1454 If @a baseFolder is a null or empty string (which is recommended), the
1455 <link to="ISystemProperties::defaultMachineFolder">default machine
1456 settings folder</link> will be used as a base folder for the created
1457 machine. Otherwise the given base folder will be used. In either case,
1458 the full path to the resulting settings file has the following
1459 structure:
1460 <pre>
1461 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1462 </pre>
1463
1464 Note that if the resulting settings file already exists, this method
1465 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1466
1467 Optionally, you may specify an UUID of to assign to the created machine.
1468 However, this is not recommended and you should normally pass an empty
1469 (null) UUID to this method so that a new UUID will be automatically
1470 generated for every created machine. You can use UUID
1471 00000000-0000-0000-0000-000000000000 as null value.
1472
1473 <note>
1474 There is no way to change the name of the settings file or
1475 subfolder of the created machine directly.
1476 </note>
1477
1478 <result name="VBOX_E_OBJECT_NOT_FOUND">
1479 @a osTypeId is invalid.
1480 </result>
1481 <result name="VBOX_E_FILE_ERROR">
1482 Resulting settings file name is invalid or the settings file already
1483 exists or could not be created due to an I/O error.
1484 </result>
1485 <result name="E_INVALIDARG">
1486 @a name is empty or null.
1487 </result>
1488 </desc>
1489
1490 <param name="name" type="wstring" dir="in">
1491 <desc>Machine name.</desc>
1492 </param>
1493 <param name="osTypeId" type="wstring" dir="in">
1494 <desc>Guest OS Type ID.</desc>
1495 </param>
1496 <param name="baseFolder" type="wstring" dir="in">
1497 <desc>Base machine folder (optional).</desc>
1498 </param>
1499 <param name="id" type="uuid" dir="in">
1500 <desc>Machine UUID (optional).</desc>
1501 </param>
1502 <param name="machine" type="IMachine" dir="return">
1503 <desc>Created machine object.</desc>
1504 </param>
1505 </method>
1506
1507 <method name="createLegacyMachine">
1508 <desc>
1509 Creates a new virtual machine in "legacy" mode, using the specified
1510 settings file to store machine settings.
1511
1512 As opposed to machines created by <link to="#createMachine"/>,
1513 the settings file of the machine created in "legacy" mode is not
1514 automatically renamed when the machine name is changed -- it will always
1515 remain the same as specified in this method call.
1516
1517 The specified settings file name can be absolute (full path) or relative
1518 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1519 directory</link>. If the file name doesn't contain an extension, the
1520 default extension (.xml) will be appended.
1521
1522 Note that the configuration of the newly created machine is not
1523 saved to disk (and therefore no settings file is created)
1524 until <link to="IMachine::saveSettings"/> is called. If the
1525 specified settings file already exists, this method
1526 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1527
1528 See <link to="#createMachine"/> for more information.
1529
1530 @deprecated This method may be removed later. Use <link
1531 to="IVirtualBox::createMachine"/> instead.
1532
1533 <note>
1534 There is no way to change the name of the settings file
1535 of the machine created in "legacy" mode.
1536 </note>
1537
1538 <result name="VBOX_E_OBJECT_NOT_FOUND">
1539 @a osTypeId is invalid.
1540 </result>
1541 <result name="VBOX_E_FILE_ERROR">
1542 @a settingsFile is invalid or the settings file already exists or
1543 could not be created due to an I/O error.
1544 </result>
1545 <result name="E_INVALIDARG">
1546 @a name or @a settingsFile is empty or null.
1547 </result>
1548 </desc>
1549
1550 <param name="name" type="wstring" dir="in">
1551 <desc>Machine name.</desc>
1552 </param>
1553 <param name="osTypeId" type="wstring" dir="in">
1554 <desc>Machine OS Type ID.</desc>
1555 </param>
1556 <param name="settingsFile" type="wstring" dir="in">
1557 <desc>Name of the machine settings file.</desc>
1558 </param>
1559 <param name="id" type="uuid" dir="in">
1560 <desc>Machine UUID (optional).</desc>
1561 </param>
1562 <param name="machine" type="IMachine" dir="return">
1563 <desc>Created machine object.</desc>
1564 </param>
1565 </method>
1566
1567 <method name="openMachine">
1568 <desc>
1569 Opens a virtual machine from the existing settings file.
1570 The opened machine remains unregistered until you call
1571 <link to="#registerMachine"/>.
1572
1573 The specified settings file name can be absolute
1574 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1575 VirtualBox home directory</link>. This file must exist
1576 and must be a valid machine settings file whose contents
1577 will be used to construct the machine object.
1578
1579 @deprecated Will be removed soon.
1580 <result name="VBOX_E_FILE_ERROR">
1581 Settings file name invalid, not found or sharing violation.
1582 </result>
1583 </desc>
1584 <param name="settingsFile" type="wstring" dir="in">
1585 <desc>
1586 Name of the machine settings file.
1587 </desc>
1588 </param>
1589 <param name="machine" type="IMachine" dir="return">
1590 <desc>Opened machine object.</desc>
1591 </param>
1592 <note>
1593 <link to="IMachine::settingsModified"/> will return
1594 false for the created machine, until any of machine settings
1595 are changed.
1596 </note>
1597 </method>
1598
1599 <method name="registerMachine">
1600 <desc>
1601
1602 Registers the machine previously created using
1603 <link to="#createMachine"/> or opened using
1604 <link to="#openMachine"/> within this VirtualBox installation. After
1605 successful method invocation, the
1606 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1607 to all registered callbacks.
1608
1609 <note>
1610 This method implicitly calls <link to="IMachine::saveSettings"/>
1611 to save all current machine settings before registering it.
1612 </note>
1613
1614 <result name="VBOX_E_OBJECT_NOT_FOUND">
1615 No matching virtual machine found.
1616 </result>
1617 <result name="VBOX_E_INVALID_OBJECT_STATE">
1618 Virtual machine was not created within this VirtualBox instance.
1619 </result>
1620
1621 </desc>
1622 <param name="machine" type="IMachine" dir="in"/>
1623 </method>
1624
1625 <method name="getMachine">
1626 <desc>
1627 Attempts to find a virtual machine given its UUID.
1628 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1629 instead.
1630
1631 <result name="VBOX_E_OBJECT_NOT_FOUND">
1632 Could not find registered machine matching @a id.
1633 </result>
1634
1635 </desc>
1636 <param name="id" type="uuid" dir="in"/>
1637 <param name="machine" type="IMachine" dir="return"/>
1638 </method>
1639
1640 <method name="findMachine">
1641 <desc>
1642 Attempts to find a virtual machine given its name.
1643 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1644 instead.
1645
1646 <result name="VBOX_E_OBJECT_NOT_FOUND">
1647 Could not find registered machine matching @a name.
1648 </result>
1649
1650 </desc>
1651 <param name="name" type="wstring" dir="in"/>
1652 <param name="machine" type="IMachine" dir="return"/>
1653 </method>
1654
1655 <method name="unregisterMachine">
1656 <desc>
1657
1658 Unregisters the machine previously registered using
1659 <link to="#registerMachine"/>. After successful method invocation, the
1660 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1661 to all registered callbacks.
1662
1663 <note>
1664 The specified machine must not be in the Saved state, have an open
1665 (or a spawning) direct session associated with it, have snapshots or
1666 have hard disks attached.
1667 </note>
1668
1669 <note>
1670 This method implicitly calls <link to="IMachine::saveSettings"/> to
1671 save all current machine settings before unregistering it.
1672 </note>
1673
1674 <note>
1675 If the given machine is inaccessible (see
1676 <link to="IMachine::accessible"/>), it will be unregistered and
1677 fully uninitialized right afterwards. As a result, the returned
1678 machine object will be unusable and an attempt to call
1679 <b>any</b> method will return the "Object not ready" error.
1680 </note>
1681
1682 <result name="VBOX_E_OBJECT_NOT_FOUND">
1683 Could not find registered machine matching @a id.
1684 </result>
1685 <result name="VBOX_E_INVALID_VM_STATE">
1686 Machine is in Saved state.
1687 </result>
1688 <result name="VBOX_E_INVALID_OBJECT_STATE">
1689 Machine has snapshot or open session or hard disk attached.
1690 </result>
1691
1692 </desc>
1693 <param name="id" type="uuid" dir="in">
1694 <desc>UUID of the machine to unregister.</desc>
1695 </param>
1696 <param name="machine" type="IMachine" dir="return">
1697 <desc>Unregistered machine object.</desc>
1698 </param>
1699 </method>
1700
1701 <method name="createAppliance">
1702 <desc>
1703 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1704 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1705 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1706 </desc>
1707 <param name="appliance" type="IAppliance" dir="return">
1708 <desc>New appliance.</desc>
1709 </param>
1710 </method>
1711
1712 <method name="createHardDisk">
1713 <desc>
1714 Creates a new base hard disk object that will use the given storage
1715 format and location for hard disk data.
1716
1717 Note that the actual storage unit is not created by this method. In
1718 order to do it, and before you are able to attach the created hard disk
1719 to virtual machines, you must call one of the following methods to
1720 allocate a format-specific storage unit at the specified location:
1721 <ul>
1722 <li><link to="IHardDisk::createDynamicStorage"/></li>
1723 <li><link to="IHardDisk::createFixedStorage"/></li>
1724 <li><link to="IHardDisk::createDiffStorage"/></li>
1725 </ul>
1726
1727 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1728 remain uninitialized until the hard disk storage unit is successfully
1729 created by one of the above methods.
1730
1731 After the storage unit is successfully created, the hard disk gets
1732 remembered by this VirtualBox installation and will be accessible
1733 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1734 methods. Remembered root (base) hard disks are also returned as part of
1735 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1736
1737 The list of all storage formats supported by this VirtualBox
1738 installation can be obtained using
1739 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1740 attribute is empty or <tt>null</tt> then the default storage format
1741 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1742 be used for creating a storage unit of the hard disk.
1743
1744 Note that the format of the location string is storage format specific.
1745 See <link to="IMedium::location"/>, IHardDisk and
1746 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1747
1748 <result name="VBOX_E_OBJECT_NOT_FOUND">
1749 @a format identifier is invalid. See
1750 <link to="ISystemProperties::hardDiskFormats"/>.
1751 </result>
1752 <result name="VBOX_E_FILE_ERROR">
1753 @a location is a not valid file name (for file-based formats only).
1754 </result>
1755 <result name="E_INVALIDARG">
1756 @a format is a null or empty string.
1757 </result>
1758 </desc>
1759 <param name="format" type="wstring" dir="in">
1760 <desc>
1761 Identifier of the storage format to use for the new hard disk.
1762 </desc>
1763 </param>
1764 <param name="location" type="wstring" dir="in">
1765 <desc>
1766 Location of the storage unit for the new hard disk.
1767 </desc>
1768 </param>
1769 <param name="hardDisk" type="IHardDisk" dir="return">
1770 <desc>Created hard disk object.</desc>
1771 </param>
1772 </method>
1773
1774 <method name="openHardDisk">
1775 <desc>
1776 Opens a hard disk from an existing location.
1777
1778 After the hard disk is successfully opened by this method, it gets
1779 remembered by (known to) this VirtualBox installation and will be
1780 accessible through <link to="#getHardDisk"/> and
1781 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1782 are also returned as part of the <link to="#hardDisks"/> array and can
1783 be attached to virtual machines. See IHardDisk for more details.
1784
1785 If a differencing hard disk is to be opened by this method, the
1786 operation will succeed only if its parent hard disk and all ancestors,
1787 if any, are already known to this VirtualBox installation (for example,
1788 were opened by this method before).
1789
1790 This method tries to guess the storage format of the specified hard disk
1791 by reading hard disk data at the specified location.
1792
1793 Note that the format of the location string is storage format specific.
1794 See <link to="IMedium::location"/>, IHardDisk and
1795 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1796
1797
1798 <result name="VBOX_E_FILE_ERROR">
1799 Invalid hard disk storage file location.
1800 </result>
1801 <result name="VBOX_E_IPRT_ERROR">
1802 Could not get hard disk storage format.
1803 </result>
1804 <result name="E_INVALIDARG">
1805 Invalid hard disk storage format.
1806 </result>
1807
1808 </desc>
1809 <param name="location" type="wstring" dir="in">
1810 <desc>
1811 Location of the storage unit that contains hard disk data in one of
1812 the supported storage formats.
1813 </desc>
1814 </param>
1815 <param name="hardDisk" type="IHardDisk" dir="return">
1816 <desc>Opened hard disk object.</desc>
1817 </param>
1818 </method>
1819
1820 <method name="getHardDisk" const="yes">
1821 <desc>
1822 Returns a hard disk with the given UUID.
1823
1824 The hard disk with the given UUID must be known to this VirtualBox
1825 installation, i.e. it must be previously created by
1826 <link to="#createHardDisk"/> or opened by <link
1827 to="#openHardDisk"/>, or attached to some known virtual machine.
1828
1829 <result name="VBOX_E_OBJECT_NOT_FOUND">
1830 No hard disk object matching @a id found.
1831 </result>
1832
1833 </desc>
1834 <param name="id" type="uuid" dir="in">
1835 <desc>UUID of the hard disk to look for.</desc>
1836 </param>
1837 <param name="hardDisk" type="IHardDisk" dir="return">
1838 <desc>Found hard disk object.</desc>
1839 </param>
1840 </method>
1841
1842 <method name="findHardDisk">
1843 <desc>
1844 Returns a hard disk that uses the given location to store hard
1845 disk data.
1846
1847 The given hard disk must be known to this VirtualBox installation, i.e.
1848 it must be previously created by
1849 <link to="#createHardDisk"/> or opened by <link
1850 to="#openHardDisk"/>, or attached to some known virtual machine.
1851
1852 The search is done by comparing the value of the @a location argument to
1853 the <link to="IHardDisk::location"/> attribute of each known hard
1854 disk.
1855
1856 For locations represented by file names in the host's file system, the
1857 requested location can be a path relative to the
1858 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1859 only a file name without any path is given, the
1860 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1861 folder</link> will be prepended to the file name before searching. Note
1862 that on case sensitive file systems, a case sensitive comparison is
1863 performed, otherwise the case of symbols in the file path is ignored.
1864
1865 <result name="VBOX_E_OBJECT_NOT_FOUND">
1866 No hard disk object matching @a location found.
1867 </result>
1868
1869 </desc>
1870 <param name="location" type="wstring" dir="in">
1871 <desc>Location string to search for.</desc>
1872 </param>
1873 <param name="hardDisk" type="IHardDisk" dir="return">
1874 <desc>Found hard disk object.</desc>
1875 </param>
1876 </method>
1877
1878 <method name="openDVDImage">
1879 <desc>
1880 Opens a CD/DVD image contained in the specified file of the supported
1881 format and assigns it the given UUID.
1882
1883 After the image is successfully opened by this method, it gets
1884 remembered by (known to) this VirtualBox installation and will be
1885 accessible through <link to="#getDVDImage"/> and
1886 <link to="#findDVDImage"/> methods. Remembered images are also
1887 returned as part of the <link to="#DVDImages"/> array and can be mounted
1888 to virtual machines. See IMedium for more details.
1889
1890 See <link to="IMedium::location"/> to get more details about the format
1891 of the location string.
1892
1893 <note>
1894 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1895 </note>
1896
1897 <result name="VBOX_E_INVALID_OBJECT_STATE">
1898 CD/DVD image already exists in the media registry.
1899 </result>
1900
1901 </desc>
1902 <param name="location" type="wstring" dir="in">
1903 <desc>
1904 Full path to the file that contains a valid CD/DVD image.
1905 </desc>
1906 </param>
1907 <param name="id" type="uuid" dir="in">
1908 <desc>
1909 UUID to assign to the given image within this VirtualBox installation.
1910 If an empty (null) UUID is specified, the system will randomly
1911 generate a new UUID.
1912 </desc>
1913 </param>
1914 <param name="image" type="IDVDImage" dir="return">
1915 <desc>Opened CD/DVD image object.</desc>
1916 </param>
1917 </method>
1918
1919 <method name="getDVDImage">
1920 <desc>
1921 Returns a CD/DVD image with the given UUID.
1922
1923 The image with the given UUID must be known to this VirtualBox
1924 installation, i.e. it must be previously opened by <link
1925 to="#openDVDImage"/>, or mounted to some known virtual machine.
1926
1927 <result name="VBOX_E_OBJECT_NOT_FOUND">
1928 No matching DVD image found in the media registry.
1929 </result>
1930
1931 </desc>
1932 <param name="id" type="uuid" dir="in">
1933 <desc>UUID of the image to look for.</desc>
1934 </param>
1935 <param name="image" type="IDVDImage" dir="return">
1936 <desc>Found CD/DVD image object.</desc>
1937 </param>
1938 </method>
1939
1940 <method name="findDVDImage">
1941 <desc>
1942 Returns a CD/DVD image with the given image location.
1943
1944 The image with the given UUID must be known to this VirtualBox
1945 installation, i.e. it must be previously opened by <link
1946 to="#openDVDImage"/>, or mounted to some known virtual machine.
1947
1948 The search is done by comparing the value of the @a location argument to
1949 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
1950
1951 The requested location can be a path relative to the
1952 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1953 only a file name without any path is given, the
1954 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1955 folder</link> will be prepended to the file name before searching. Note
1956 that on case sensitive file systems, a case sensitive comparison is
1957 performed, otherwise the case in the file path is ignored.
1958
1959 <result name="VBOX_E_FILE_ERROR">
1960 Invalid image file location.
1961 </result>
1962 <result name="VBOX_E_OBJECT_NOT_FOUND">
1963 No matching DVD image found in the media registry.
1964 </result>
1965
1966 </desc>
1967 <param name="location" type="wstring" dir="in">
1968 <desc>CD/DVD image file path to look for.</desc>
1969 </param>
1970 <param name="image" type="IDVDImage" dir="return">
1971 <desc>Found CD/DVD image object.</desc>
1972 </param>
1973 </method>
1974
1975 <method name="openFloppyImage">
1976 <desc>
1977 Opens a floppy image contained in the specified file of the supported
1978 format and assigns it the given UUID.
1979
1980 After the image is successfully opened by this method, it gets
1981 remembered by (known to) this VirtualBox installation and will be
1982 accessible through <link to="#getFloppyImage"/> and
1983 <link to="#findFloppyImage"/> methods. Remembered images are also
1984 returned as part of the <link to="#floppyImages"/> array and can be
1985 mounted to virtual machines. See IMedium for more details.
1986
1987 See <link to="IMedium::location"/> to get more details about the format
1988 of the location string.
1989
1990 <result name="VBOX_E_FILE_ERROR">
1991 Floppy image specified by @a location not accessible.
1992 </result>
1993 <result name="VBOX_E_INVALID_OBJECT_STATE">
1994 Floppy image already exists in the media registry.
1995 </result>
1996
1997 <note>
1998 Currently, only raw floppy images are supported by VirtualBox.
1999 </note>
2000 </desc>
2001 <param name="location" type="wstring" dir="in">
2002 <desc>
2003 Full path to the file that contains a valid floppy image.
2004 </desc>
2005 </param>
2006 <param name="id" type="uuid" dir="in">
2007 <desc>
2008 UUID to assign to the given image file within this VirtualBox
2009 installation. If an empty (null) UUID is specified, the system will
2010 randomly generate a new UUID.
2011 </desc>
2012 </param>
2013 <param name="image" type="IFloppyImage" dir="return">
2014 <desc>Opened floppy image object.</desc>
2015 </param>
2016 </method>
2017
2018 <method name="getFloppyImage">
2019 <desc>
2020 Returns a floppy image with the given UUID.
2021
2022 The image with the given UUID must be known to this VirtualBox
2023 installation, i.e. it must be previously opened by <link
2024 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2025
2026 <result name="VBOX_E_OBJECT_NOT_FOUND">
2027 No matching floppy image found in the media registry.
2028 </result>
2029
2030 </desc>
2031 <param name="id" type="uuid" dir="in">
2032 <desc>UUID of the image to look for.</desc>
2033 </param>
2034 <param name="image" type="IFloppyImage" dir="return">
2035 <desc>Found floppy image object.</desc>
2036 </param>
2037 </method>
2038
2039 <method name="findFloppyImage">
2040 <desc>
2041 Returns a floppy image with the given image location.
2042
2043 The image with the given UUID must be known to this VirtualBox
2044 installation, i.e. it must be previously opened by <link
2045 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2046
2047 The search is done by comparing the value of the @a location argument to
2048 the <link to="IMedium::location"/> attribute of each known floppy image.
2049
2050 The requested location can be a path relative to the
2051 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2052 only a file name without any path is given, the
2053 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2054 folder</link> will be prepended to the file name before searching. Note
2055 that on case sensitive file systems, a case sensitive comparison is
2056 performed, otherwise the case of symbols in the file path is ignored.
2057
2058 <result name="VBOX_E_FILE_ERROR">
2059 Invalid image file location.
2060 </result>
2061 <result name="VBOX_E_OBJECT_NOT_FOUND">
2062 No matching floppy image found in the media registry.
2063 </result>
2064
2065 </desc>
2066 <param name="location" type="wstring" dir="in">
2067 <desc>Floppy image file path to look for.</desc>
2068 </param>
2069 <param name="image" type="IFloppyImage" dir="return">
2070 <desc>Found floppy image object.</desc>
2071 </param>
2072 </method>
2073
2074 <method name="getGuestOSType">
2075 <desc>
2076 Returns an object describing the specified guest OS type.
2077
2078 The requested guest OS type is specified using a string which is a
2079 mnemonic identifier of the guest operating system, such as
2080 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2081 particular virtual machine can be read or set using the
2082 <link to="IMachine::OSTypeId"/> attribute.
2083
2084 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2085 available guest OS type objects. Each object has an
2086 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2087 the guest OS this object describes.
2088
2089 <result name="E_INVALIDARG">
2090 @a id is not a valid Guest OS type.
2091 </result>
2092
2093 </desc>
2094 <param name="id" type="wstring" dir="in">
2095 <desc>Guest OS type ID string.</desc>
2096 </param>
2097 <param name="type" type="IGuestOSType" dir="return">
2098 <desc>Guest OS type object.</desc>
2099 </param>
2100 </method>
2101
2102 <method name="createSharedFolder">
2103 <desc>
2104 Creates a new global shared folder by associating the given logical
2105 name with the given host path, adds it to the collection of shared
2106 folders and starts sharing it. Refer to the description of
2107 <link to="ISharedFolder"/> to read more about logical names.
2108 <note>
2109 In the current implementation, this operation is not
2110 implemented.
2111 </note>
2112 </desc>
2113 <param name="name" type="wstring" dir="in">
2114 <desc>Unique logical name of the shared folder.</desc>
2115 </param>
2116 <param name="hostPath" type="wstring" dir="in">
2117 <desc>Full path to the shared folder in the host file system.</desc>
2118 </param>
2119 <param name="writable" type="boolean" dir="in">
2120 <desc>Whether the share is writable or readonly</desc>
2121 </param>
2122 </method>
2123
2124 <method name="removeSharedFolder">
2125 <desc>
2126 Removes the global shared folder with the given name previously
2127 created by <link to="#createSharedFolder"/> from the collection of
2128 shared folders and stops sharing it.
2129 <note>
2130 In the current implementation, this operation is not
2131 implemented.
2132 </note>
2133 </desc>
2134 <param name="name" type="wstring" dir="in">
2135 <desc>Logical name of the shared folder to remove.</desc>
2136 </param>
2137 </method>
2138
2139 <method name="getNextExtraDataKey">
2140 <desc>
2141 Returns the global extra data key name following the supplied key.
2142
2143 An error is returned if the supplied @a key does not exist. @c NULL is
2144 returned in @a nextKey if the supplied key is the last key. When
2145 supplying @c NULL or an empty string for the @a key, the first key item
2146 is returned in @a nextKey (if there is any). @a nextValue is an optional
2147 parameter and if supplied, the next key's value is returned in it.
2148
2149 <result name="VBOX_E_OBJECT_NOT_FOUND">
2150 Extra data @a key not found.
2151 </result>
2152
2153 </desc>
2154 <param name="key" type="wstring" dir="in">
2155 <desc>Name of the data key to follow.</desc>
2156 </param>
2157 <param name="nextKey" type="wstring" dir="out">
2158 <desc>Name of the next data key.</desc>
2159 </param>
2160 <param name="nextValue" type="wstring" dir="out">
2161 <desc>Value of the next data key.</desc>
2162 </param>
2163 </method>
2164
2165 <method name="getExtraData">
2166 <desc>
2167 Returns associated global extra data.
2168
2169 If the requested data @a key does not exist, this function will
2170 succeed and return @c NULL in the @a value argument.
2171
2172 <result name="VBOX_E_FILE_ERROR">
2173 Settings file not accessible.
2174 </result>
2175 <result name="VBOX_E_XML_ERROR">
2176 Could not parse the settings file.
2177 </result>
2178
2179 </desc>
2180 <param name="key" type="wstring" dir="in">
2181 <desc>Name of the data key to get.</desc>
2182 </param>
2183 <param name="value" type="wstring" dir="return">
2184 <desc>Value of the requested data key.</desc>
2185 </param>
2186 </method>
2187
2188 <method name="setExtraData">
2189 <desc>
2190 Sets associated global extra data.
2191
2192 If you pass @c NULL as a key @a value, the given @a key will be
2193 deleted.
2194
2195 <note>
2196 Before performing the actual data change, this method will ask all
2197 registered callbacks using the
2198 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2199 notification for a permission. If one of the callbacks refuses the
2200 new value, the change will not be performed.
2201 </note>
2202 <note>
2203 On success, the
2204 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2205 is called to inform all registered callbacks about a successful data
2206 change.
2207 </note>
2208
2209 <result name="VBOX_E_FILE_ERROR">
2210 Settings file not accessible.
2211 </result>
2212 <result name="VBOX_E_XML_ERROR">
2213 Could not parse the settings file.
2214 </result>
2215 <result name="E_ACCESSDENIED">
2216 Modification request refused.
2217 </result>
2218
2219 </desc>
2220 <param name="key" type="wstring" dir="in">
2221 <desc>Name of the data key to set.</desc>
2222 </param>
2223 <param name="value" type="wstring" dir="in">
2224 <desc>Value to assign to the key.</desc>
2225 </param>
2226 </method>
2227
2228 <method name="openSession">
2229 <desc>
2230 Opens a new direct session with the given virtual machine.
2231
2232 A direct session acts as a local lock on the given VM.
2233 There can be only one direct session open at a time for every
2234 virtual machine, protecting the VM from being manipulated by
2235 conflicting actions from different processes. Only after a
2236 direct session has been opened, one can change all VM settings
2237 and execute the VM in the process space of the session object.
2238
2239 Sessions therefore can be compared to mutex semaphores that
2240 lock a given VM for modification and execution.
2241 See <link to="ISession">ISession</link> for details.
2242
2243 <note>Unless you are writing a new VM frontend, you will not
2244 want to execute a VM in the current process. To spawn a new
2245 process that executes a VM, use
2246 <link to="IVirtualBox::openRemoteSession" />
2247 instead.</note>
2248
2249 Upon successful return, the session object can be used to
2250 get access to the machine and to the VM console.
2251
2252 In VirtualBox terminology, the machine becomes "mutable" after
2253 a session has been opened. Note that the "mutable" machine
2254 object, on which you may invoke IMachine methods to change its
2255 settings, will be a different object from the immutable IMachine
2256 objects returned by various IVirtualBox methods. To obtain a
2257 mutable IMachine object (upon which you can invoke settings methods),
2258 use the <link to="ISession::machine" /> attribute.
2259
2260 One must always call <link to="ISession::close" /> to release the
2261 lock on the machine, or the machine's state will eventually be
2262 set to "Aborted".
2263
2264 In other words, to change settings on a machine, the following
2265 sequence is typically performed:
2266
2267 <ol>
2268 <li>Call this method (openSession) to have a machine locked for
2269 the current session.</li>
2270
2271 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2272
2273 <li>Change the settings of the machine.</li>
2274
2275 <li>Call <link to="IMachine::saveSettings" />.</li>
2276
2277 <li>Close the session by calling <link to="ISession::close"/>.</li>
2278 </ol>
2279
2280 <result name="E_UNEXPECTED">
2281 Virtual machine not registered.
2282 </result>
2283 <result name="E_ACCESSDENIED">
2284 Process not started by OpenRemoteSession.
2285 </result>
2286 <result name="VBOX_E_OBJECT_NOT_FOUND">
2287 No matching virtual machine found.
2288 </result>
2289 <result name="VBOX_E_INVALID_OBJECT_STATE">
2290 Session already open or being opened.
2291 </result>
2292 <result name="VBOX_E_VM_ERROR">
2293 Failed to assign machine to session.
2294 </result>
2295
2296 </desc>
2297 <param name="session" type="ISession" dir="in">
2298 <desc>
2299 Session object that will represent the opened session after
2300 successful method invocation. This object must not represent
2301 the already open session.
2302 <note>
2303 This session will be automatically closed if the
2304 VirtualBox server is terminated for some reason.
2305 </note>
2306 </desc>
2307 </param>
2308 <param name="machineId" type="uuid" dir="in">
2309 <desc>ID of the virtual machine to open a session with.</desc>
2310 </param>
2311 </method>
2312
2313 <method name="openRemoteSession">
2314 <desc>
2315 Spawns a new process that executes a virtual machine (called a
2316 "remote session").
2317
2318 Opening a remote session causes the VirtualBox server to start a new
2319 process that opens a direct session with the given VM. As a result, the
2320 VM is locked by that direct session in the new process, preventing
2321 conflicting changes from other processes. Since sessions act as locks
2322 that prevent conflicting changes, one cannot open a remote session
2323 for a VM that already has another open session (direct or remote), or
2324 is currently in the process of opening one (see <link
2325 to="IMachine::sessionState"/>).
2326
2327 While the remote session still provides some level of control over the
2328 VM execution to the caller (using the <link to="IConsole" /> interface),
2329 not all VM settings are available for modification within the remote
2330 session context.
2331
2332 This operation can take some time (a new VM is started in a new process,
2333 for which memory and other resources need to be set up). Because of this,
2334 an <link to="IProgress" /> is returned to allow the caller to wait for this
2335 asynchronous operation to be completed. Until then, the remote session
2336 object remains in the closed state, and accessing the machine or its
2337 console through it is invalid. It is recommended to use
2338 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2339 completion.
2340
2341 As with all <link to="ISession" /> objects, it is recommended to call
2342 <link to="ISession::close" /> on the local session object once openRemoteSession()
2343 has been called. However, the session's state (see <link to="ISession::state" />)
2344 will not return to "Closed" until the remote session has also closed (i.e.
2345 until the VM is no longer running). In that case, however, the state of
2346 the session will automatically change back to "Closed".
2347
2348 Currently supported session types (values of the @a type
2349 argument) are:
2350 <ul>
2351 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2352 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2353 </ul>
2354
2355 The @a environment argument is a string containing definitions of
2356 environment variables in the following format:
2357 @code
2358 NAME[=VALUE]\n
2359 NAME[=VALUE]\n
2360 ...
2361 @endcode
2362 where <tt>\\n</tt> is the new line character. These environment
2363 variables will be appended to the environment of the VirtualBox server
2364 process. If an environment variable exists both in the server process
2365 and in this list, the value from this list takes precedence over the
2366 server's variable. If the value of the environment variable is
2367 omitted, this variable will be removed from the resulting environment.
2368 If the environment string is @c null, the server environment is
2369 inherited by the started process as is.
2370
2371 <see>openExistingSession</see>
2372
2373 <result name="E_UNEXPECTED">
2374 Virtual machine not registered.
2375 </result>
2376 <result name="E_INVALIDARG">
2377 Invalid session type @a type.
2378 </result>
2379 <result name="VBOX_E_OBJECT_NOT_FOUND">
2380 No machine matching @a machineId found.
2381 </result>
2382 <result name="VBOX_E_INVALID_OBJECT_STATE">
2383 Session already open or being opened.
2384 </result>
2385 <result name="VBOX_E_IPRT_ERROR">
2386 Launching process for machine failed.
2387 </result>
2388 <result name="VBOX_E_VM_ERROR">
2389 Failed to assign machine to session.
2390 </result>
2391
2392 </desc>
2393 <param name="session" type="ISession" dir="in">
2394 <desc>
2395 Session object that will represent the opened remote session
2396 after successful method invocation (this object must not
2397 represent an already open session).
2398 </desc>
2399 </param>
2400 <param name="machineId" type="uuid" dir="in">
2401 <desc>ID of the virtual machine to open a session with.</desc>
2402 </param>
2403 <param name="type" type="wstring" dir="in">
2404 <desc>
2405 Type of the remote session (case sensitive).
2406 </desc>
2407 </param>
2408 <param name="environment" type="wstring" dir="in">
2409 <desc>
2410 Environment to pass to the opened session (may be @c null).
2411 </desc>
2412 </param>
2413 <param name="progress" type="IProgress" dir="return">
2414 <desc>Progress object to track the operation completion.</desc>
2415 </param>
2416 </method>
2417
2418 <method name="openExistingSession">
2419 <desc>
2420 Opens a new remote session with the virtual machine for
2421 which a direct session is already open.
2422
2423 The remote session provides some level of control over the VM
2424 execution (using the IConsole interface) to the caller; however,
2425 within the remote session context, not all VM settings are available
2426 for modification.
2427
2428 As opposed to <link to="#openRemoteSession"/>, the number of
2429 remote sessions opened this way is not limited by the API
2430
2431 <note>
2432 It is an error to open a remote session with the machine that
2433 doesn't have an open direct session.
2434 </note>
2435
2436 <result name="E_UNEXPECTED">
2437 Virtual machine not registered.
2438 </result>
2439 <result name="VBOX_E_OBJECT_NOT_FOUND">
2440 No machine matching @a machineId found.
2441 </result>
2442 <result name="VBOX_E_INVALID_OBJECT_STATE">
2443 Session already open or being opened.
2444 </result>
2445 <result name="VBOX_E_INVALID_SESSION_STATE">
2446 Direct session state not Open.
2447 </result>
2448 <result name="VBOX_E_VM_ERROR">
2449 Failed to get console object from direct session or assign
2450 machine to session.
2451 </result>
2452
2453 <see>openRemoteSession</see>
2454 </desc>
2455 <param name="session" type="ISession" dir="in">
2456 <desc>
2457 Session object that will represent the open remote session
2458 after successful method invocation. This object must not
2459 represent an already open session.
2460 <note>
2461 This session will be automatically closed when the peer
2462 (direct) session dies or gets closed.
2463 </note>
2464 </desc>
2465 </param>
2466 <param name="machineId" type="uuid" dir="in">
2467 <desc>ID of the virtual machine to open a session with.</desc>
2468 </param>
2469 </method>
2470
2471 <method name="registerCallback">
2472 <desc>
2473 Registers a new global VirtualBox callback. The methods of the given
2474 callback object will be called by VirtualBox when an appropriate
2475 event occurs.
2476
2477 <result name="E_INVALIDARG">
2478 A @c NULL callback cannot be registered.
2479 </result>
2480
2481 </desc>
2482 <param name="callback" type="IVirtualBoxCallback" dir="in">
2483 <desc>Callback object to register.</desc>
2484 </param>
2485 </method>
2486
2487 <method name="unregisterCallback">
2488 <desc>
2489 Unregisters the previously registered global VirtualBox callback.
2490
2491 <result name="E_INVALIDARG">
2492 Specified @a callback not registered.
2493 </result>
2494
2495 </desc>
2496 <param name="callback" type="IVirtualBoxCallback" dir="in">
2497 <desc>Callback object to unregister.</desc>
2498 </param>
2499 </method>
2500
2501 <method name="waitForPropertyChange">
2502 <desc>
2503 Blocks the caller until any of the properties represented by the
2504 @a what argument changes the value or until the given timeout interval
2505 expires.
2506
2507 The @a what argument is a comma separated list of property masks that
2508 describe properties the caller is interested in. The property mask is
2509 a string in the following format:
2510
2511 <pre>
2512 [[group.]subgroup.]name
2513 </pre>
2514
2515 where @c name is the property name and @c group, @c subgroup are zero
2516 or more property group specifiers. Each element (group or name) in
2517 the property mask may be either a Latin string or an asterisk symbol
2518 (@c "*") which is used to match any string for the given element. A
2519 property mask that doesn't contain asterisk symbols represents a
2520 single fully qualified property name.
2521
2522 Groups in the fully qualified property name go from more generic (the
2523 left-most part) to more specific (the right-most part). The first
2524 element is usually a name of the object the property belongs to. The
2525 second element may be either a property name, or a child object name,
2526 or an index if the preceding element names an object which is one of
2527 many objects of the same type. This way, property names form a
2528 hierarchy of properties. Here are some examples of property names:
2529
2530 <table>
2531 <tr>
2532 <td><tt>VirtualBox.version</tt></td>
2533 <td><link to="IVirtualBox::version"/> property</td>
2534 </tr>
2535 <tr>
2536 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2537 <td><link to="IMachine::name"/> property of the machine with the
2538 given UUID</td>
2539 </tr>
2540 </table>
2541
2542 Most property names directly correspond to the properties of objects
2543 (components) provided by the VirtualBox library and may be used to
2544 track changes to these properties. However, there may be
2545 pseudo-property names that don't correspond to any existing object's
2546 property directly, as well as there may be object properties that
2547 don't have a corresponding property name that is understood by this
2548 method, and therefore changes to such properties cannot be
2549 tracked. See individual object's property descriptions to get a
2550 fully qualified property name that can be used with this method (if
2551 any).
2552
2553 There is a special property mask @c "*" (i.e. a string consisting of a
2554 single asterisk symbol) that can be used to match all properties.
2555 Below are more examples of property masks:
2556
2557 <table>
2558 <tr>
2559 <td><tt>VirtualBox.*</tt></td>
2560 <td>Track all properties of the VirtualBox object</td>
2561 </tr>
2562 <tr>
2563 <td><tt>Machine.*.name</tt></td>
2564 <td>Track changes to the <link to="IMachine::name"/> property of
2565 all registered virtual machines</td>
2566 </tr>
2567 </table>
2568
2569 <note>
2570 This function is not implemented in the current version of the
2571 product.
2572 </note>
2573 </desc>
2574 <param name="what" type="wstring" dir="in">
2575 <desc>Comma separated list of property masks.</desc>
2576 </param>
2577 <param name="timeout" type="unsigned long" dir="in">
2578 <desc>
2579 Wait timeout in milliseconds.
2580 Specify -1 for an indefinite wait.
2581 </desc>
2582 </param>
2583 <param name="changed" type="wstring" dir="out">
2584 <desc>
2585 Comma separated list of properties that have been changed and caused
2586 this method to return to the caller.
2587 </desc>
2588 </param>
2589 <param name="values" type="wstring" dir="out">
2590 <desc>Reserved, not currently used.</desc>
2591 </param>
2592 </method>
2593
2594 <method name="saveSettings">
2595 <desc>
2596 Saves the global settings to the global settings file
2597 (<link to="#settingsFilePath"/>).
2598
2599 This method is only useful for explicitly saving the global settings
2600 file after it has been auto-converted from the old format to the most
2601 recent format (see <link to="#settingsFileVersion"/> for details).
2602 Normally, the global settings file is implicitly saved when a global
2603 setting is changed.
2604
2605 <result name="VBOX_E_FILE_ERROR">
2606 Settings file not accessible.
2607 </result>
2608 <result name="VBOX_E_XML_ERROR">
2609 Could not parse the settings file.
2610 </result>
2611
2612 </desc>
2613 </method>
2614
2615 <method name="saveSettingsWithBackup">
2616 <desc>
2617 Creates a backup copy of the global settings file
2618 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2619 calls <link to="#saveSettings"/>.
2620
2621 Note that the backup copy is created <b>only</b> if the settings file
2622 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2623 details). Otherwise, this call is fully equivalent to
2624 <link to="#saveSettings"/> and no backup copying is done.
2625
2626 The backup copy is created in the same directory where the original
2627 settings file is located. It is given the following file name:
2628 <pre>
2629 original.xml.x.y-platform.bak
2630 </pre>
2631 where <tt>original.xml</tt> is the original settings file name
2632 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2633 format of the settings file (before auto-conversion).
2634
2635 If the given backup file already exists, this method will try to add the
2636 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2637 0 to 9) and copy it again until it succeeds. If all suffixes are
2638 occupied, or if any other copy error occurs, this method will return a
2639 failure.
2640
2641 If the copy operation succeeds, the @a bakFileName return argument will
2642 receive a full path to the created backup file (for informational
2643 purposes). Note that this will happen even if the subsequent
2644 <link to="#saveSettings"/> call performed by this method after the
2645 copy operation, fails.
2646
2647 <note>
2648 The VirtualBox API never calls this method. It is intended purely for
2649 the purposes of creating backup copies of the settings files by
2650 front-ends before saving the results of the automatically performed
2651 settings conversion to disk.
2652 </note>
2653
2654 <see>settingsFileVersion</see>
2655
2656 <result name="VBOX_E_FILE_ERROR">
2657 Settings file not accessible.
2658 </result>
2659 <result name="VBOX_E_XML_ERROR">
2660 Could not parse the settings file.
2661 </result>
2662 <result name="VBOX_E_IPRT_ERROR">
2663 Could not copy the settings file.
2664 </result>
2665
2666 </desc>
2667 <param name="bakFileName" type="wstring" dir="return">
2668 <desc>Full path to the created backup copy.</desc>
2669 </param>
2670 </method>
2671
2672 </interface>
2673
2674 <!--
2675 // IAppliance
2676 /////////////////////////////////////////////////////////////////////////
2677 -->
2678
2679 <enum
2680 name="CIMOSType"
2681 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2682 >
2683 <desc>
2684 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2685 </desc>
2686
2687 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2688 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2689 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2690 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2691 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2692 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2693 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2694 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2695 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2696 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2697 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2698 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2699 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2700 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2701 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2702 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2703 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2704 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2705 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2706 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2707 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2708 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2709 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2710 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2711 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2712 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2713 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2714 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2715 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2716 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2717 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2718 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2719 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2720 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2721 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2722 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2723 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2724 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2725 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2726 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2727 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2728 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2729 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2730 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2731 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2732 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2733 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2734 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2735 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2736 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2737 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2738 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2739 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2740 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2741 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2742 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2743 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2744 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2745 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2746 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2747 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2748 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2749 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2750 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2751 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2752 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2753 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2754 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2755 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2756 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2757 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2758 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2759 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2760 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2761 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2762 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2763 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2764 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2765 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2766 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2767 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2768 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2769 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2770 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2771 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2772 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2773 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2774 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2775 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2776 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2777 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2778 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2779 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2780 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2781 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2782 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2783 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2784 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2785 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2786 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2787 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2788 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2789 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2790 </enum>
2791
2792 <enum
2793 name="OVFResourceType"
2794 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2795 >
2796 <desc>
2797 OVF resource type.
2798 </desc>
2799
2800 <const name="Other" value="1" />
2801 <const name="ComputerSystem" value="2" />
2802 <const name="Processor" value="3" />
2803 <const name="Memory" value="4" />
2804 <const name="IdeController" value="5" />
2805 <const name="ParallelScsiHba" value="6" />
2806 <const name="FcHba" value="7" />
2807 <const name="iScsiHba" value="8" />
2808 <const name="IbHca" value="9" />
2809 <const name="EthernetAdapter" value="10" />
2810 <const name="OtherNetworkAdapter" value="11" />
2811 <const name="IoSlot" value="12" />
2812 <const name="IoDevice" value="13" />
2813 <const name="FloppyDrive" value="14" />
2814 <const name="CdDrive" value="15" />
2815 <const name="DvdDrive" value="16" />
2816 <const name="HardDisk" value="17" />
2817 <const name="UsbController" value="23" />
2818 <const name="SoundCard" value="35" />
2819 </enum>
2820
2821 <interface
2822 name="IAppliance" extends="$unknown"
2823 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
2824 wsmap="managed"
2825 >
2826 <desc>
2827 Represents a platform-independent appliance in OVF format. An instance of this is returned
2828 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2829 appliances with VirtualBox.
2830
2831 The OVF standard suggests two different physical file formats:
2832
2833 <ol>
2834 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
2835 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
2836 this descriptor file references other files, as OVF appliances distributed as a set of
2837 files most likely do, those files must be in the same directory as the descriptor file.</li>
2838
2839 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
2840 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2841 files and optionally other files.
2842
2843 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2844 be added with a later version.</li>
2845 </ol>
2846
2847 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2848 <link to="IMachine" /> involves the following sequence of API calls:
2849
2850 <ol>
2851 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2852 </li>
2853
2854 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2855 would like to import. So long as this file is syntactically valid, this will succeed
2856 and return an instance of IAppliance that contains the parsed data from the OVF file.
2857 </li>
2858
2859 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2860 contents of the IAppliance attributes accordingly. These can be inspected by a
2861 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2862 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2863 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2864 systems in the OVF, which in turn describe the virtual hardware prescribed by the
2865 OVF (network and hardware adapters, virtual disk images, memory size and so on).
2866 The GUI can then give the user the option to confirm and/or change these suggestions.
2867 </li>
2868
2869 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2870 virtual system to override the suggestions made by the interpret() routine.
2871 </li>
2872
2873 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2874 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2875 virtual system descriptions.
2876 </li>
2877 </ol>
2878
2879 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2880
2881 <ol>
2882 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2883 an empty IAppliance object.
2884 </li>
2885
2886 <li>For each machine you would like to export, call <link to="IMachine::export" />
2887 with the IAppliance object you just created. This creates an instance of
2888 <link to="IVirtualSystemDescription" /> inside the appliance.
2889 </li>
2890
2891 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2892 virtual system to override the suggestions made by the export() routine.
2893 </li>
2894
2895 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2896 file written.</li>
2897 </ol>
2898
2899 </desc>
2900
2901 <attribute name="path" type="wstring" readonly="yes">
2902 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2903 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2904 <link to="#write" /> (for export).
2905 This attribute is empty until one of these methods has been called.
2906 </desc>
2907 </attribute>
2908
2909 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2910 <desc>
2911 Array of virtual disk definitions. One such description exists for each
2912 disk definition in the OVF; each string array item represents one such piece of
2913 disk information, with the information fields separated by tab (\t) characters.
2914
2915 The caller should be prepared for additional fields being appended to
2916 this string in future versions of VirtualBox and therefore check for
2917 the number of tabs in the strings returned.
2918
2919 In the current version, the following eight fields are returned per string
2920 in the array:
2921
2922 <ol>
2923 <li>Disk ID (unique string identifier given to disk)</li>
2924
2925 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2926
2927 <li>Populated size (optional unsigned integer indicating the current size of the
2928 disk; can be approximate; -1 if unspecified)</li>
2929
2930 <li>Format (string identifying the disk format, typically
2931 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2932
2933 <li>Reference (where to find the disk image, typically a file name; if empty,
2934 then the disk should be created on import)</li>
2935
2936 <li>Image size (optional unsigned integer indicating the size of the image,
2937 which need not necessarily be the same as the values specified above, since
2938 the image may be compressed or sparse; -1 if not specified)</li>
2939
2940 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2941 presently unsupported and always -1)</li>
2942
2943 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2944 </ol>
2945 </desc>
2946 </attribute>
2947
2948 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2949 <desc> Array of virtual system descriptions. One such description is created
2950 for each virtual system found in the OVF.
2951 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2952 (for export) has been called.
2953 </desc>
2954 </attribute>
2955
2956 <method name="read">
2957 <desc>
2958 Reads an OVF file into the appliance object.
2959
2960 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2961 mere fact that this method returns successfully does not mean that VirtualBox supports all
2962 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2963 </desc>
2964 <param name="file" type="wstring" dir="in">
2965 <desc>
2966 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2967 on whether the appliance is distributed as a set of files or as a single file, respectively).
2968 </desc>
2969 </param>
2970 </method>
2971
2972 <method name="interpret">
2973 <desc>
2974 Interprets the OVF data that was read when the appliance was constructed. After
2975 calling this method, one can inspect the
2976 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2977 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2978 the appliance.
2979
2980 Calling this method is the second step of importing an appliance into VirtualBox;
2981 see <link to="IAppliance" /> for an overview.
2982
2983 After calling this method, one should call <link to="#getWarnings" /> to find out
2984 if problems were encountered during the processing which might later lead to
2985 errors.
2986 </desc>
2987 </method>
2988
2989 <method name="importMachines">
2990 <desc>
2991 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2992 and other interfaces that match the information contained in the appliance as
2993 closely as possible, as represented by the import instructions in the
2994 <link to="#virtualSystemDescriptions" /> array.
2995
2996 Calling this method is the final step of importing an appliance into VirtualBox;
2997 see <link to="IAppliance" /> for an overview.
2998
2999 Since importing the appliance will most probably involve copying and converting
3000 disk images, which can take a long time, this method operates asynchronously and
3001 returns an IProgress object to allow the caller to monitor the progress.
3002 </desc>
3003
3004 <param name="aProgress" type="IProgress" dir="return">
3005 <desc></desc>
3006 </param>
3007 </method>
3008
3009 <method name="write">
3010 <desc>
3011 Writes the contents of the appliance exports into a new OVF file.
3012
3013 Calling this method is the final step of exporting an appliance from VirtualBox;
3014 see <link to="IAppliance" /> for an overview.
3015
3016 Since importing the appliance will most probably involve copying and converting
3017 disk images, which can take a long time, this method operates asynchronously and
3018 returns an IProgress object to allow the caller to monitor the progress.
3019 </desc>
3020 <param name="path" type="wstring" dir="in">
3021 <desc>
3022 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3023 on whether the appliance is distributed as a set of files or as a single file, respectively).
3024 </desc>
3025 </param>
3026 <param name="aProgress" type="IProgress" dir="return">
3027 <desc></desc>
3028 </param>
3029 </method>
3030
3031 <method name="getWarnings">
3032 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3033
3034 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3035 <desc></desc>
3036 </param>
3037 </method>
3038
3039 </interface>
3040
3041 <enum
3042 name="VirtualSystemDescriptionType"
3043 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
3044 >
3045 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3046 a configuration value.</desc>
3047
3048 <const name="Ignore" value="1" />
3049 <const name="OS" value="2" />
3050 <const name="Name" value="3" />
3051 <const name="CPU" value="4" />
3052 <const name="Memory" value="5" />
3053 <const name="HardDiskControllerIDE" value="6" />
3054 <const name="HardDiskControllerSATA" value="7" />
3055 <const name="HardDiskControllerSCSI" value="8" />
3056 <const name="HardDiskImage" value="9" />
3057 <const name="Floppy" value="10" />
3058 <const name="CDROM" value="11" />
3059 <const name="NetworkAdapter" value="12" />
3060 <const name="USBController" value="13" />
3061 <const name="SoundCard" value="14" />
3062
3063 </enum>
3064
3065 <interface
3066 name="IVirtualSystemDescription" extends="$unknown"
3067 uuid="8606c2ae-c06f-487f-9573-1465b44f9524"
3068 wsmap="managed"
3069 >
3070
3071 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3072 After <link to="IAppliance::interpret" /> has been called, that array contains
3073 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3074 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3075 into VirtualBox.
3076 </desc>
3077
3078 <attribute name="count" type="unsigned long" readonly="yes">
3079 <desc>Return the number of virtual system description entries.</desc>
3080 </attribute>
3081
3082 <method name="getDescription">
3083 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3084 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3085
3086 The list below identifies the value sets that are possible depending on the
3087 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3088 the array item with the same index in aOvfValues[] will contain the original value as contained
3089 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3090 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3091 the aExtraConfigValues[] array item may also be used.
3092
3093 <ul>
3094 <li>
3095 "OS": the guest operating system type. There must be exactly one such array item on import. The
3096 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3097 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3098 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3099 (see <link to="CIMOSType" />).
3100 </li>
3101 <li>
3102 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3103 if none is present on import, then an automatic name will be created from the operating system
3104 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3105 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3106 <link to="IMachine" /> name that does not exist yet.
3107 </li>
3108 <li>
3109 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3110 </li>
3111 <li>
3112 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3113 is present on import, then VirtualBox will set a meaningful default based on the operating system
3114 type.
3115 </li>
3116 <li>
3117 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3118 has no value in aOvfValues[] or aVboxValues[].
3119 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3120 type can use to specify which hard disk controller a virtual disk should be connected to.
3121 </li>
3122 <li>
3123 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3124 has no value in aOvfValues[] or aVboxValues[].
3125 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3126 </li>
3127 <li>
3128 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3129 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3130 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3131 </li>
3132 <li>
3133 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3134 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3135
3136 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3137 a path since the image file should be in the same location as the OVF file itself), whereas the
3138 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3139 hard disk image. This means that on import the image will be copied and converted from the
3140 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3141 On import, the target image will also be registered with VirtualBox.
3142
3143 The matching item in the aExtraConfigValues[] array must contain a string of the following
3144 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3145 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3146 the image to. That number must be the index of an array item with one of the hard disk controller
3147 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3148 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3149 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3150 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3151 SCSI conrollers, the channel can range from 0-29.
3152 </li>
3153 <li>
3154 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3155 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3156 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3157 </li>
3158 <li>
3159 "USBController": a USB controller. There can be at most one such item. If and only if such an
3160 item ispresent, USB support will be enabled for the new virtual machine.
3161 </li>
3162 <li>
3163 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3164 present, sound support will be enabled for the new virtual machine. Note that the virtual
3165 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3166 may be different from the virtual soundcard expected by the appliance.
3167 </li>
3168 </ul>
3169
3170 </desc>
3171
3172 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3173 <desc></desc>
3174 </param>
3175
3176 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3177 <desc></desc>
3178 </param>
3179
3180 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3181 <desc></desc>
3182 </param>
3183
3184 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3185 <desc></desc>
3186 </param>
3187
3188 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3189 <desc></desc>
3190 </param>
3191
3192 </method>
3193
3194 <method name="setFinalValues">
3195 <desc>
3196 This method allows the appliance's user to change the configuration for the virtual
3197 system descriptions. For each array item returned from <link to="getDescription" />,
3198 you must pass in one boolean value and one configuration value.
3199
3200 Each item in the boolean array determines whether the particular configuration item
3201 should be enabled.
3202 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3203 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3204 and SoundCard.
3205
3206 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3207 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3208 the configuration remains unchanged. Please see the documentation for getDescription()
3209 for valid configuration values for the individual array item types. If the
3210 corresponding item in the aEnabled array is false, the configuration value is ignored.
3211 </desc>
3212
3213 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3214 <desc></desc>
3215 </param>
3216
3217 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3218 <desc></desc>
3219 </param>
3220
3221 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3222 <desc></desc>
3223 </param>
3224 </method>
3225 </interface>
3226
3227
3228 <!--
3229 // IMachine
3230 /////////////////////////////////////////////////////////////////////////
3231 -->
3232
3233 <interface
3234 name="IInternalMachineControl" extends="$unknown"
3235 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3236 internal="yes"
3237 wsmap="suppress"
3238 >
3239 <method name="updateState">
3240 <desc>
3241 Updates the VM state.
3242 <note>
3243 This operation will also update the settings file with
3244 the correct information about the saved state file
3245 and delete this file from disk when appropriate.
3246 </note>
3247 </desc>
3248 <param name="state" type="MachineState" dir="in"/>
3249 </method>
3250
3251 <method name="getIPCId">
3252 <param name="id" type="wstring" dir="return"/>
3253 </method>
3254
3255 <method name="runUSBDeviceFilters">
3256 <desc>
3257 Asks the server to run USB devices filters of the associated
3258 machine against the given USB device and tell if there is
3259 a match.
3260 <note>
3261 Intended to be used only for remote USB devices. Local
3262 ones don't require to call this method (this is done
3263 implicitly by the Host and USBProxyService).
3264 </note>
3265 </desc>
3266 <param name="device" type="IUSBDevice" dir="in"/>
3267 <param name="matched" type="boolean" dir="out"/>
3268 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3269 </method>
3270
3271 <method name="captureUSBDevice">
3272 <desc>
3273 Requests a capture of the given host USB device.
3274 When the request is completed, the VM process will
3275 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3276 notification.
3277 </desc>
3278 <param name="id" type="uuid" dir="in"/>
3279 </method>
3280
3281 <method name="detachUSBDevice">
3282 <desc>
3283 Notification that a VM is going to detach (done = false) or has
3284 already detached (done = true) the given USB device.
3285 When the done = true request is completed, the VM process will
3286 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3287 notification.
3288 <note>
3289 In the done = true case, the server must run its own filters
3290 and filters of all VMs but this one on the detached device
3291 as if it were just attached to the host computer.
3292 </note>
3293 </desc>
3294 <param name="id" type="uuid" dir="in"/>
3295 <param name="done" type="boolean" dir="in"/>
3296 </method>
3297
3298 <method name="autoCaptureUSBDevices">
3299 <desc>
3300 Requests a capture all matching USB devices attached to the host.
3301 When the request is completed, the VM process will
3302 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3303 notification per every captured device.
3304 </desc>
3305 </method>
3306
3307 <method name="detachAllUSBDevices">
3308 <desc>
3309 Notification that a VM that is being powered down. The done
3310 parameter indicates whether which stage of the power down
3311 we're at. When done = false the VM is announcing its
3312 intentions, while when done = true the VM is reporting
3313 what it has done.
3314 <note>
3315 In the done = true case, the server must run its own filters
3316 and filters of all VMs but this one on all detach devices as
3317 if they were just attached to the host computer.
3318 </note>
3319 </desc>
3320 <param name="done" type="boolean" dir="in"/>
3321 </method>
3322
3323 <method name="onSessionEnd">
3324 <desc>
3325 Triggered by the given session object when the session is about
3326 to close normally.
3327 </desc>
3328 <param name="session" type="ISession" dir="in">
3329 <desc>Session that is being closed</desc>
3330 </param>
3331 <param name="progress" type="IProgress" dir="return">
3332 <desc>
3333 Used to wait until the corresponding machine is actually
3334 dissociated from the given session on the server.
3335 Returned only when this session is a direct one.
3336 </desc>
3337 </param>
3338 </method>
3339
3340 <method name="beginSavingState">
3341 <desc>
3342 Called by the VM process to inform the server it wants to
3343 save the current state and stop the VM execution.
3344 </desc>
3345 <param name="progress" type="IProgress" dir="in">
3346 <desc>
3347 Progress object created by the VM process to wait until
3348 the state is saved.
3349 </desc>
3350 </param>
3351 <param name="stateFilePath" type="wstring" dir="out">
3352 <desc>
3353 File path the VM process must save the execution state to.
3354 </desc>
3355 </param>
3356 </method>
3357
3358 <method name="endSavingState">
3359 <desc>
3360 Called by the VM process to inform the server that saving
3361 the state previously requested by #beginSavingState is either
3362 successfully finished or there was a failure.
3363
3364 <result name="VBOX_E_FILE_ERROR">
3365 Settings file not accessible.
3366 </result>
3367 <result name="VBOX_E_XML_ERROR">
3368 Could not parse the settings file.
3369 </result>
3370
3371 </desc>
3372
3373 <param name="success" type="boolean" dir="in">
3374 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3375 otherwise.
3376 </desc>
3377 </param>
3378 </method>
3379
3380 <method name="adoptSavedState">
3381 <desc>
3382 Gets called by IConsole::adoptSavedState.
3383 <result name="VBOX_E_FILE_ERROR">
3384 Invalid saved state file path.
3385 </result>
3386 </desc>
3387 <param name="savedStateFile" type="wstring" dir="in">
3388 <desc>Path to the saved state file to adopt.</desc>
3389 </param>
3390 </method>
3391
3392 <method name="beginTakingSnapshot">
3393 <desc>
3394 Called by the VM process to inform the server it wants to
3395 take a snapshot.
3396
3397 <result name="VBOX_E_FILE_ERROR">
3398 Settings file not accessible.
3399 </result>
3400 <result name="VBOX_E_XML_ERROR">
3401 Could not parse the settings file.
3402 </result>
3403 </desc>
3404 <param name="initiator" type="IConsole" dir="in">
3405 <desc>The console object that initiated this call.</desc>
3406 </param>
3407 <param name="name" type="wstring" dir="in">
3408 <desc>Snapshot name.</desc>
3409 </param>
3410 <param name="description" type="wstring" dir="in">
3411 <desc>Snapshot description.</desc>
3412 </param>
3413 <param name="progress" type="IProgress" dir="in">
3414 <desc>
3415 Progress object created by the VM process to wait until
3416 the state is saved (only for online snapshots).
3417 </desc>
3418 </param>
3419 <param name="stateFilePath" type="wstring" dir="out">
3420 <desc>
3421 File path the VM process must save the execution state to.
3422 </desc>
3423 </param>
3424 <param name="serverProgress" type="IProgress" dir="out">
3425 <desc>
3426 Progress object created by the server process to wait until
3427 the snapshot is taken (VDI diff creation, etc.).
3428 </desc>
3429 </param>
3430 </method>
3431
3432 <method name="endTakingSnapshot">
3433 <desc>
3434 Called by the VM process to inform the server that the snapshot
3435 previously requested by #beginTakingSnapshot is either
3436 successfully taken or there was a failure.
3437 </desc>
3438
3439 <param name="success" type="boolean" dir="in">
3440 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3441 </param>
3442 </method>
3443
3444 <method name="discardSnapshot">
3445 <desc>
3446 Gets called by IConsole::discardSnapshot.
3447 <result name="VBOX_E_INVALID_OBJECT_STATE">
3448 Snapshot has more than one child snapshot.
3449 </result>
3450 </desc>
3451 <param name="initiator" type="IConsole" dir="in">
3452 <desc>The console object that initiated this call.</desc>
3453 </param>
3454 <param name="id" type="uuid" dir="in">
3455 <desc>UUID of the snapshot to discard.</desc>
3456 </param>
3457 <param name="machineState" type="MachineState" dir="out">
3458 <desc>New machine state after this operation is started.</desc>
3459 </param>
3460 <param name="progress" type="IProgress" dir="return">
3461 <desc>Progress object to track the operation completion.</desc>
3462 </param>
3463 </method>
3464
3465 <method name="discardCurrentState">
3466 <desc>
3467 Gets called by IConsole::discardCurrentState.
3468 <result name="VBOX_E_INVALID_OBJECT_STATE">
3469 Virtual machine does not have any snapshot.
3470 </result>
3471 </desc>
3472 <param name="initiator" type="IConsole" dir="in">
3473 <desc>The console object that initiated this call.</desc>
3474 </param>
3475 <param name="machineState" type="MachineState" dir="out">
3476 <desc>New machine state after this operation is started.</desc>
3477 </param>
3478 <param name="progress" type="IProgress" dir="return">
3479 <desc>Progress object to track the operation completion.</desc>
3480 </param>
3481 </method>
3482
3483 <method name="discardCurrentSnapshotAndState">
3484 <desc>
3485 Gets called by IConsole::discardCurrentSnapshotAndState.
3486 <result name="VBOX_E_INVALID_OBJECT_STATE">
3487 Virtual machine does not have any snapshot.
3488 </result>
3489 </desc>
3490 <param name="initiator" type="IConsole" dir="in">
3491 <desc>The console object that initiated this call.</desc>
3492 </param>
3493 <param name="machineState" type="MachineState" dir="out">
3494 <desc>New machine state after this operation is started.</desc>
3495 </param>
3496 <param name="progress" type="IProgress" dir="return">
3497 <desc>Progress object to track the operation completion.</desc>
3498 </param>
3499 </method>
3500
3501 <method name="pullGuestProperties">
3502 <desc>
3503 Get the list of the guest properties matching a set of patterns along
3504 with their values, time stamps and flags and give responsibility for
3505 managing properties to the console.
3506 </desc>
3507 <param name="name" type="wstring" dir="out" safearray="yes">
3508 <desc>
3509 The names of the properties returned.
3510 </desc>
3511 </param>
3512 <param name="value" type="wstring" dir="out" safearray="yes">
3513 <desc>
3514 The values of the properties returned. The array entries match the
3515 corresponding entries in the @a name array.
3516 </desc>
3517 </param>
3518 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3519 <desc>
3520 The time stamps of the properties returned. The array entries match
3521 the corresponding entries in the @a name array.
3522 </desc>
3523 </param>
3524 <param name="flags" type="wstring" dir="out" safearray="yes">
3525 <desc>
3526 The flags of the properties returned. The array entries match the
3527 corresponding entries in the @a name array.
3528 </desc>
3529 </param>
3530 </method>
3531
3532 <method name="pushGuestProperties">
3533 <desc>
3534 Set the list of the guest properties matching a set of patterns along
3535 with their values, time stamps and flags and return responsibility for
3536 managing properties to IMachine.
3537 </desc>
3538 <param name="name" type="wstring" dir="in" safearray="yes">
3539 <desc>
3540 The names of the properties.
3541 </desc>
3542 </param>
3543 <param name="value" type="wstring" dir="in" safearray="yes">
3544 <desc>
3545 The values of the properties. The array entries match the
3546 corresponding entries in the @a name array.
3547 </desc>
3548 </param>
3549 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3550 <desc>
3551 The time stamps of the properties. The array entries match
3552 the corresponding entries in the @a name array.
3553 </desc>
3554 </param>
3555 <param name="flags" type="wstring" dir="in" safearray="yes">
3556 <desc>
3557 The flags of the properties. The array entries match the
3558 corresponding entries in the @a name array.
3559 </desc>
3560 </param>
3561 </method>
3562 <method name="pushGuestProperty">
3563 <desc>
3564 Update a single guest property in IMachine.
3565 </desc>
3566 <param name="name" type="wstring" dir="in">
3567 <desc>
3568 The name of the property to be updated.
3569 </desc>
3570 </param>
3571 <param name="value" type="wstring" dir="in">
3572 <desc>
3573 The value of the property.
3574 </desc>
3575 </param>
3576 <param name="timestamp" type="unsigned long long" dir="in">
3577 <desc>
3578 The timestamp of the property.
3579 </desc>
3580 </param>
3581 <param name="flags" type="wstring" dir="in">
3582 <desc>
3583 The flags of the property.
3584 </desc>
3585 </param>
3586 </method>
3587
3588 <method name="lockMedia">
3589 <desc>
3590 Locks all media attached to the machine for writing and parents of
3591 attahced different hard disks (if any) for reading. This operation is
3592 atomic so that if it fails no media is actually locked.
3593
3594 This method is intended to be called when the machine is in Starting or
3595 Restoring state. The locked media will be automatically unlocked when
3596 the machine is powered off or crashed.
3597 </desc>
3598 </method>
3599 </interface>
3600
3601 <interface
3602 name="IBIOSSettings" extends="$unknown"
3603 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3604 wsmap="managed"
3605 >
3606 <desc>
3607 The IBIOSSettings interface represents BIOS settings of the virtual
3608 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3609 </desc>
3610 <attribute name="logoFadeIn" type="boolean">
3611 <desc>Fade in flag for BIOS logo animation.</desc>
3612 </attribute>
3613
3614 <attribute name="logoFadeOut" type="boolean">
3615 <desc>Fade out flag for BIOS logo animation.</desc>
3616 </attribute>
3617
3618 <attribute name="logoDisplayTime" type="unsigned long">
3619 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3620 </attribute>
3621
3622 <attribute name="logoImagePath" type="wstring">
3623 <desc>Local file system path for external BIOS image.</desc>
3624 </attribute>
3625
3626 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3627 <desc>Mode of the BIOS boot device menu.</desc>
3628 </attribute>
3629
3630 <attribute name="ACPIEnabled" type="boolean">
3631 <desc>ACPI support flag.</desc>
3632 </attribute>
3633
3634 <attribute name="IOAPICEnabled" type="boolean">
3635 <desc>
3636 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3637 and support IRQs above 15.
3638 </desc>
3639 </attribute>
3640
3641 <attribute name="timeOffset" type="long long">
3642 <desc>
3643 Offset in milliseconds from the host system time. This allows for
3644 guests running with a different system date/time than the host.
3645 It is equivalent to setting the system date/time in the BIOS except
3646 it is not an absolute value but a relative one. Guest Additions
3647 time synchronization honors this offset.
3648 </desc>
3649 </attribute>
3650
3651 <attribute name="PXEDebugEnabled" type="boolean">
3652 <desc>
3653 PXE debug logging flag. If set, VirtualBox will write extensive
3654 PXE trace information to the release log.
3655 </desc>
3656 </attribute>
3657
3658 </interface>
3659
3660 <interface
3661 name="IMachine" extends="$unknown"
3662 uuid="dcf6a64c-1466-4b5a-b822-9db04133dc74"
3663 wsmap="managed"
3664 >
3665 <desc>
3666 The IMachine interface represents a virtual machine, or guest, created
3667 in VirtualBox.
3668
3669 This interface is used in two contexts. First of all, a collection of
3670 objects implementing this interface is stored in the
3671 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3672 machines that are currently registered with this VirtualBox
3673 installation. Also, once a session has been opened for the given virtual
3674 machine (e.g. the virtual machine is running), the machine object
3675 associated with the open session can be queried from the session object;
3676 see <link to="ISession"/> for details.
3677
3678 The main role of this interface is to expose the settings of the virtual
3679 machine and provide methods to change various aspects of the virtual
3680 machine's configuration. For machine objects stored in the
3681 <link to="IVirtualBox::machines"/> collection, all attributes are
3682 read-only unless explicitly stated otherwise in individual attribute
3683 and method descriptions. In order to change a machine setting, a session
3684 for this machine must be opened using one of
3685 <link to="IVirtualBox::openSession"/>,
3686 <link to="IVirtualBox::openRemoteSession"/> or
3687 <link to="IVirtualBox::openExistingSession"/> methods. After the
3688 session has been successfully opened, a mutable machine object needs to
3689 be queried from the session object and then the desired settings changes
3690 can be applied to the returned object using IMachine attributes and
3691 methods. See the ISession interface description for more information
3692 about sessions.
3693
3694 Note that the IMachine interface does not provide methods to control
3695 virtual machine execution (such as start the machine, or power it
3696 down) -- these methods are grouped in a separate IConsole
3697 interface. Refer to the IConsole interface description to get more
3698 information about this topic.
3699
3700 <see>ISession, IConsole</see>
3701 </desc>
3702
3703 <attribute name="parent" type="IVirtualBox" readonly="yes">
3704 <desc>Associated parent object.</desc>
3705 </attribute>
3706
3707 <attribute name="accessible" type="boolean" readonly="yes">
3708 <desc>
3709 Whether this virtual machine is currently accessible or not.
3710
3711 The machine is considered to be inaccessible when:
3712 <ul>
3713 <li>It is a registered virtual machine, and
3714 </li>
3715 <li>Its settings file is inaccessible (for example, it is
3716 located on a network share that is not accessible during
3717 VirtualBox startup, or becomes inaccessible later, or if
3718 the settings file can be read but is invalid).
3719 </li>
3720 </ul>
3721
3722 Otherwise, the value of this property is always <tt>true</tt>.
3723
3724 Every time this property is read, the accessibility state of
3725 this machine is re-evaluated. If the returned value is |false|,
3726 the <link to="#accessError"/> property may be used to get the
3727 detailed error information describing the reason of
3728 inaccessibility.
3729
3730 When the machine is inaccessible, only the following properties
3731 can be used on it:
3732 <ul>
3733 <li><link to="#parent"/></li>
3734 <li><link to="#id"/></li>
3735 <li><link to="#settingsFilePath"/></li>
3736 <li><link to="#accessible"/></li>
3737 <li><link to="#accessError"/></li>
3738 </ul>
3739
3740 An attempt to access any other property or method will return
3741 an error.
3742
3743 The only possible action you can perform on an inaccessible
3744 machine is to unregister it using the
3745 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3746 for the accessibility state once more by querying this
3747 property).
3748
3749 <note>
3750 In the current implementation, once this property returns
3751 <tt>true</tt>, the machine will never become inaccessible
3752 later, even if its settings file cannot be successfully
3753 read/written any more (at least, until the VirtualBox
3754 server is restarted). This limitation may be removed in
3755 future releases.
3756 </note>
3757 </desc>
3758 </attribute>
3759
3760 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3761 <desc>
3762 Error information describing the reason of machine
3763 inaccessibility.
3764
3765 Reading this property is only valid after the last call to
3766 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3767 machine is currently unaccessible). Otherwise, a null
3768 IVirtualBoxErrorInfo object will be returned.
3769 </desc>
3770 </attribute>
3771
3772 <attribute name="name" type="wstring">
3773 <desc>
3774 Name of the virtual machine.
3775
3776 Besides being used for human-readable identification purposes
3777 everywhere in VirtualBox, the virtual machine name is also used
3778 as a name of the machine's settings file and as a name of the
3779 subdirectory this settings file resides in. Thus, every time you
3780 change the value of this property, the settings file will be
3781 renamed once you call <link to="#saveSettings"/> to confirm the
3782 change. The containing subdirectory will be also renamed, but
3783 only if it has exactly the same name as the settings file
3784 itself prior to changing this property (for backward compatibility
3785 with previous API releases). The above implies the following
3786 limitations:
3787 <ul>
3788 <li>The machine name cannot be empty.</li>
3789 <li>The machine name can contain only characters that are valid
3790 file name characters according to the rules of the file
3791 system used to store VirtualBox configuration.</li>
3792 <li>You cannot have two or more machines with the same name
3793 if they use the same subdirectory for storing the machine
3794 settings files.</li>
3795 <li>You cannot change the name of the machine if it is running,
3796 or if any file in the directory containing the settings file
3797 is being used by another running machine or by any other
3798 process in the host operating system at a time when
3799 <link to="#saveSettings"/> is called.
3800 </li>
3801 </ul>
3802 If any of the above limitations are hit, <link to="#saveSettings"/>
3803 will return an appropriate error message explaining the exact
3804 reason and the changes you made to this machine will not be
3805 saved.
3806 <note>
3807 For "legacy" machines created using the
3808 <link to="IVirtualBox::createLegacyMachine"/> call,
3809 the above naming limitations do not apply because the
3810 machine name does not affect the settings file name.
3811 The settings file name remains the same as it was specified
3812 during machine creation and never changes.
3813 </note>
3814 </desc>
3815 </attribute>
3816
3817 <attribute name="description" type="wstring">
3818 <desc>
3819 Description of the virtual machine.
3820
3821 The description attribute can contain any text and is
3822 typically used to describe the hardware and software
3823 configuration of the virtual machine in detail (i.e. network
3824 settings, versions of the installed software and so on).
3825 </desc>
3826 </attribute>
3827
3828 <attribute name="id" type="uuid" readonly="yes">
3829 <desc>UUID of the virtual machine.</desc>
3830 </attribute>
3831
3832 <attribute name="OSTypeId" type="wstring">
3833 <desc>
3834 User-defined identifier of the Guest OS type.
3835 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3836 an IGuestOSType object representing details about the given
3837 Guest OS type.
3838 <note>
3839 This value may differ from the value returned by
3840 <link to="IGuest::OSTypeId"/> if Guest Additions are
3841 installed to the guest OS.
3842 </note>
3843 </desc>
3844 </attribute>
3845
3846 <attribute name="HardwareVersion" type="wstring">
3847 <desc>Hardware version identifier. Internal use only for now.</desc>
3848 </attribute>
3849
3850 <attribute name="CPUCount" type="unsigned long">
3851 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
3852 </attribute>
3853
3854 <attribute name="memorySize" type="unsigned long">
3855 <desc>System memory size in megabytes.</desc>
3856 </attribute>
3857
3858 <attribute name="memoryBalloonSize" type="unsigned long">
3859 <desc>Initial memory balloon size in megabytes.</desc>
3860 </attribute>
3861
3862 <attribute name="statisticsUpdateInterval" type="unsigned long">
3863 <desc>Initial interval to update guest statistics in seconds.</desc>
3864 </attribute>
3865
3866 <attribute name="VRAMSize" type="unsigned long">
3867 <desc>Video memory size in megabytes.</desc>
3868 </attribute>
3869
3870 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3871 <desc>
3872 This setting determines whether VirtualBox allows guests to make use
3873 of the 3D graphics support available on the host. Currently limited
3874 to OpenGL only. </desc>
3875 </attribute>
3876
3877 <attribute name="monitorCount" type="unsigned long">
3878 <desc>
3879 Number of virtual monitors.
3880 <note>
3881 Only effective on Windows XP and later guests with
3882 Guest Additions installed.
3883 </note>
3884 </desc>
3885 </attribute>
3886
3887 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3888 <desc>Object containing all BIOS settings.</desc>
3889 </attribute>
3890
3891 <attribute name="HWVirtExEnabled" type="TSBool">
3892 <desc>
3893 This setting determines whether VirtualBox will try to make use of
3894 the host CPU's hardware virtualization extensions such as Intel VT-x
3895 and AMD-V. Note that in case such extensions are not available,
3896 they will not be used.
3897 </desc>
3898 </attribute>
3899
3900 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
3901 <desc>
3902 This setting determines whether VirtualBox will try to make use of
3903 the nested paging extension of Intel VT-x and AMD-V. Note that in case
3904 such extensions are not available, they will not be used.
3905 </desc>
3906 </attribute>
3907
3908 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
3909 <desc>
3910 This setting determines whether VirtualBox will try to make use of
3911 the VPID extension of Intel VT-x. Note that in case such extensions are
3912 not available, they will not be used.
3913 </desc>
3914 </attribute>
3915
3916 <attribute name="PAEEnabled" type="boolean" default="false">
3917 <desc>
3918 This setting determines whether VirtualBox will expose the Physical Address
3919 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
3920 is not available, it will not be reported.
3921 </desc>
3922 </attribute>
3923
3924 <attribute name="snapshotFolder" type="wstring">
3925 <desc>
3926 Full path to the directory used to store snapshot data
3927 (differencing hard disks and saved state files) of this machine.
3928
3929 The initial value of this property is
3930 <tt>&lt;</tt><link to="#settingsFilePath">
3931 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3932 <link to="#id">machine_uuid</link>
3933 <tt>&gt;</tt>.
3934
3935 Currently, it is an error to try to change this property on
3936 a machine that has snapshots (because this would require to
3937 move possibly large files to a different location).
3938 A separate method will be available for this purpose later.
3939
3940 <note>
3941 Setting this property to <tt>null</tt> will restore the
3942 initial value.
3943 </note>
3944 <note>
3945 When setting this property, the specified path can be
3946 absolute (full path) or relative to the directory where the
3947 <link to="#settingsFilePath">machine settings file</link>
3948 is located. When reading this property, a full path is
3949 always returned.
3950 </note>
3951 <note>
3952 The specified path may not exist, it will be created
3953 when necessary.
3954 </note>
3955 </desc>
3956 </attribute>
3957
3958 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3959 <desc>VRDP server object.</desc>
3960 </attribute>
3961
3962 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
3963 <desc>Array of hard disks attached to this machine.</desc>
3964 </attribute>
3965
3966 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
3967 <desc>Associated DVD drive object.</desc>
3968 </attribute>
3969
3970 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
3971 <desc>Associated floppy drive object.</desc>
3972 </attribute>
3973
3974 <attribute name="USBController" type="IUSBController" readonly="yes">
3975 <desc>
3976 Associated USB controller object.
3977
3978 <note>
3979 This method may set a @ref com_warnings "warning result code".
3980 </note>
3981 <note>
3982 If USB functionality is not available in the given edition of
3983 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3984 </note>
3985 </desc>
3986 </attribute>
3987
3988 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3989 <desc>Associated audio adapter, always present.</desc>
3990 </attribute>
3991
3992 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3993 <desc>Array of storage controllers attached to this machine.</desc>
3994 </attribute>
3995
3996 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3997 <desc>
3998 Full name of the file containing machine settings data.
3999 </desc>
4000 </attribute>
4001
4002 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4003 <desc>
4004 Current version of the format of the settings file of this machine
4005 (<link to="#settingsFilePath"/>).
4006
4007 The version string has the following format:
4008 <pre>
4009 x.y-platform
4010 </pre>
4011 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4012 versions, and <tt>platform</tt> is the platform identifier.
4013
4014 The current version usually matches the value of the
4015 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4016 settings file was created by an older version of VirtualBox and there
4017 was a change of the settings file format since then.
4018
4019 Note that VirtualBox automatically converts settings files from older
4020 versions to the most recent version when reading them (usually at
4021 VirtualBox startup) but it doesn't save the changes back until
4022 you call a method that implicitly saves settings (such as
4023 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4024 explicitly. Therefore, if the value of this attribute differs from the
4025 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4026 means that the settings file was converted but the result of the
4027 conversion is not yet saved to disk.
4028
4029 The above feature may be used by interactive front-ends to inform users
4030 about the settings file format change and offer them to explicitly save
4031 all converted settings files (the global and VM-specific ones),
4032 optionally create backup copies of the old settings files before saving,
4033 etc.
4034
4035 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4036 </desc>
4037 </attribute>
4038
4039 <attribute name="settingsModified" type="boolean" readonly="yes">
4040 <desc>
4041 Whether the settings of this machine have been modified
4042 (but neither yet saved nor discarded).
4043 <note>
4044 Reading this property is only valid on instances returned
4045 by <link to="ISession::machine"/> and on new machines
4046 created by <link to="IVirtualBox::createMachine"/> or opened
4047 by <link to="IVirtualBox::openMachine"/> but not
4048 yet registered, or on unregistered machines after calling
4049 <link to="IVirtualBox::unregisterMachine"/>. For all other
4050 cases, the settings can never be modified.
4051 </note>
4052 <note>
4053 For newly created unregistered machines, the value of this
4054 property is always TRUE until <link to="#saveSettings"/>
4055 is called (no matter if any machine settings have been
4056 changed after the creation or not). For opened machines
4057 the value is set to FALSE (and then follows to normal rules).
4058 </note>
4059 </desc>
4060 </attribute>
4061
4062 <attribute name="sessionState" type="SessionState" readonly="yes">
4063 <desc>Current session state for this machine.</desc>
4064 </attribute>
4065
4066 <attribute name="sessionType" type="wstring" readonly="yes">
4067 <desc>
4068 Type of the session. If <link to="#sessionState"/> is
4069 SessionSpawning or SessionOpen, this attribute contains the
4070 same value as passed to the
4071 <link to="IVirtualBox::openRemoteSession"/> method in the
4072 @a type parameter. If the session was opened directly using
4073 <link to="IVirtualBox::openSession"/>, or if
4074 <link to="#sessionState"/> is SessionClosed, the value of this
4075 attribute is @c null.
4076 </desc>
4077 </attribute>
4078
4079 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4080 <desc>
4081 Identifier of the session process. This attribute contains the
4082 platform-dependent identifier of the process that has opened a
4083 direct session for this machine using the
4084 <link to="IVirtualBox::openSession"/> call. The returned value
4085 is only valid if <link to="#sessionState"/> is SessionOpen or
4086 SessionClosing (i.e. a session is currently open or being
4087 closed) by the time this property is read.
4088 </desc>
4089 </attribute>
4090
4091 <attribute name="state" type="MachineState" readonly="yes">
4092 <desc>Current execution state of this machine.</desc>
4093 </attribute>
4094
4095 <attribute name="lastStateChange" type="long long" readonly="yes">
4096 <desc>
4097 Time stamp of the last execution state change,
4098 in milliseconds since 1970-01-01 UTC.
4099 </desc>
4100 </attribute>
4101
4102 <attribute name="stateFilePath" type="wstring" readonly="yes">
4103 <desc>
4104 Full path to the file that stores the execution state of
4105 the machine when it is in the <link to="MachineState_Saved"/> state.
4106 <note>
4107 When the machine is not in the Saved state, this attribute
4108 <tt>null</tt>.
4109 </note>
4110 </desc>
4111 </attribute>
4112
4113 <attribute name="logFolder" type="wstring" readonly="yes">
4114 <desc>
4115 Full path to the folder that stores a set of rotated log files
4116 recorded during machine execution. The most recent log file is
4117 named <tt>VBox.log</tt>, the previous log file is
4118 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4119 in the current version).
4120 </desc>
4121 </attribute>
4122
4123 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4124 <desc>
4125 Current snapshot of this machine.
4126 <note>
4127 A <tt>null</tt> object is returned if the machine doesn't
4128 have snapshots.
4129 </note>
4130 <see><link to="ISnapshot"/></see>
4131 </desc>
4132 </attribute>
4133
4134 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4135 <desc>
4136 Number of snapshots taken on this machine. Zero means the
4137 machine doesn't have any snapshots.
4138 </desc>
4139 </attribute>
4140
4141 <attribute name="currentStateModified" type="boolean" readonly="yes">
4142 <desc>
4143 Returns <tt>true</tt> if the current state of the machine is not
4144 identical to the state stored in the current snapshot.
4145
4146 The current state is identical to the current snapshot right
4147 after one of the following calls are made:
4148 <ul>
4149 <li><link to="IConsole::discardCurrentState"/> or
4150 <link to="IConsole::discardCurrentSnapshotAndState"/>
4151 </li>
4152 <li><link to="IConsole::takeSnapshot"/> (issued on a
4153 powered off or saved machine, for which
4154 <link to="#settingsModified"/> returns <tt>false</tt>)
4155 </li>
4156 <li><link to="IMachine::setCurrentSnapshot"/>
4157 </li>
4158 </ul>
4159
4160 The current state remains identical until one of the following
4161 happens:
4162 <ul>
4163 <li>settings of the machine are changed</li>
4164 <li>the saved state is discarded</li>
4165 <li>the current snapshot is discarded</li>
4166 <li>an attempt to execute the machine is made</li>
4167 </ul>
4168
4169 <note>
4170 For machines that don't have snapshots, this property is
4171 always <tt>false</tt>.
4172 </note>
4173 </desc>
4174 </attribute>
4175
4176 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4177 <desc>
4178 Collection of shared folders for this machine (permanent shared
4179 folders). These folders are shared automatically at machine startup
4180 and available only to the guest OS installed within this machine.
4181
4182 New shared folders are added to the collection using
4183 <link to="#createSharedFolder"/>. Existing shared folders can be
4184 removed using <link to="#removeSharedFolder"/>.
4185 </desc>
4186 </attribute>
4187
4188 <attribute name="clipboardMode" type="ClipboardMode">
4189 <desc>
4190 Synchronization mode between the host OS clipboard
4191 and the guest OS clipboard.
4192 </desc>
4193 </attribute>
4194
4195 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4196 <desc>
4197 A comma-separated list of simple glob patterns. Changes to guest
4198 properties whose name matches one of the patterns will generate an
4199 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4200 </desc>
4201 </attribute>
4202
4203 <method name="setBootOrder">
4204 <desc>
4205 Puts the given device to the specified position in
4206 the boot order.
4207
4208 To indicate that no device is associated with the given position,
4209 <link to="DeviceType_Null"/> should be used.
4210
4211 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4212
4213 <result name="E_INVALIDARG">
4214 Boot @a position out of range.
4215 </result>
4216 <result name="E_NOTIMPL">
4217 Booting from USB @a device currently not supported.
4218 </result>
4219
4220 </desc>
4221 <param name="position" type="unsigned long" dir="in">
4222 <desc>
4223 Position in the boot order (<tt>1</tt> to the total number of
4224 devices the machine can boot from, as returned by
4225 <link to="ISystemProperties::maxBootPosition"/>).
4226 </desc>
4227 </param>
4228 <param name="device" type="DeviceType" dir="in">
4229 <desc>
4230 The type of the device used to boot at the given position.
4231 </desc>
4232 </param>
4233 </method>
4234
4235 <method name="getBootOrder" const="yes">
4236 <desc>
4237 Returns the device type that occupies the specified
4238 position in the boot order.
4239
4240 @todo [remove?]
4241 If the machine can have more than one device of the returned type
4242 (such as hard disks), then a separate method should be used to
4243 retrieve the individual device that occupies the given position.
4244
4245 If here are no devices at the given position, then
4246 <link to="DeviceType_Null"/> is returned.
4247
4248 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4249
4250 <result name="E_INVALIDARG">
4251 Boot @a position out of range.
4252 </result>
4253
4254 </desc>
4255 <param name="position" type="unsigned long" dir="in">
4256 <desc>
4257 Position in the boot order (<tt>1</tt> to the total number of
4258 devices the machine can boot from, as returned by
4259 <link to="ISystemProperties::maxBootPosition"/>).
4260 </desc>
4261 </param>
4262 <param name="device" type="DeviceType" dir="return">
4263 <desc>
4264 Device at the given position.
4265 </desc>
4266 </param>
4267 </method>
4268
4269 <method name="attachHardDisk">
4270 <desc>
4271 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4272 by the given UUID @a id) to the given hard disk controller
4273 (<link to="IStorageController" />, identified by @a name),
4274 at the indicated port and device.
4275
4276 For the IDE bus, the @a controllerPort parameter can be either
4277 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4278 respectively. For the primary controller of the IDE bus,
4279 @a device can be either @c 0 or @c 1, to specify the master or the
4280 slave device, respectively. For the secondary IDE controller, the
4281 device number must be @c 1 because VirtualBox reserves the
4282 secondary master for the CD-ROM drive.
4283
4284 For an SATA controller, @a controllerPort must be a number ranging
4285 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4286 be a number ranging from @c 0 to @c 15.
4287
4288 For both SCSI and SATA, the @a device parameter is unused and must
4289 be @c 0.
4290
4291 The specified device slot must not have another disk attached to it, or
4292 this method will fail.
4293
4294 See <link to="IHardDisk"/> for more detailed information about
4295 attaching hard disks.
4296
4297 <note>
4298 You cannot attach a hard disk to a running machine. Also, you cannot
4299 attach a hard disk to a newly created machine until this machine's
4300 settings are saved to disk using <link to="#saveSettings"/>.
4301 </note>
4302 <note>
4303 If the hard disk is being attached indirectly, a new differencing hard
4304 disk will implicitly be created for it and attached instead. If the
4305 changes made to the machine settings (including this indirect
4306 attachment) are later cancelled using <link to="#discardSettings"/>,
4307 this implicitly created differencing hard disk will implicitly
4308 be deleted.
4309 </note>
4310
4311 <result name="E_INVALIDARG">
4312 SATA device, SATA port, IDE port or IDE slot out of range.
4313 </result>
4314 <result name="VBOX_E_INVALID_OBJECT_STATE">
4315 Attempt to attach hard disk to an unregistered virtual machine.
4316 </result>
4317 <result name="VBOX_E_INVALID_VM_STATE">
4318 Invalid machine state.
4319 </result>
4320 <result name="VBOX_E_OBJECT_IN_USE">
4321 Hard disk already attached to this or another virtual machine.
4322 </result>
4323
4324 </desc>
4325 <param name="id" type="uuid" dir="in">
4326 <desc>UUID of the hard disk to attach.</desc>
4327 </param>
4328 <param name="name" type="wstring" dir="in">
4329 <desc>Name of the storage controller to attach the hard disk to.</desc>
4330 </param>
4331 <param name="controllerPort" type="long" dir="in">
4332 <desc>Port to attach the hard disk to.</desc>
4333 </param>
4334 <param name="device" type="long" dir="in">
4335 <desc>
4336 Device slot in the given port to attach the hard disk to.
4337 </desc>
4338 </param>
4339 </method>
4340
4341 <method name="getHardDisk" const="yes">
4342 <desc>
4343 Returns the virtual hard disk attached to a device slot of the specified
4344 bus.
4345
4346 Note that if the hard disk was indirectly attached by
4347 <link to="#attachHardDisk"/> to the given device slot then this
4348 method will return not the same object as passed to the
4349 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4350 more detailed information about attaching hard disks.
4351
4352 <result name="VBOX_E_OBJECT_NOT_FOUND">
4353 No hard disk attached to given slot/bus.
4354 </result>
4355
4356 </desc>
4357 <param name="name" type="wstring" dir="in">
4358 <desc>Name of the storage controller the hard disk is attached to.</desc>
4359 </param>
4360 <param name="controllerPort" type="long" dir="in">
4361 <desc>Port to query.</desc>
4362 </param>
4363 <param name="device" type="long" dir="in">
4364 <desc>Device slot in the given port to query.</desc>
4365 </param>
4366 <param name="hardDisk" type="IHardDisk" dir="return">
4367 <desc>Attached hard disk object.</desc>
4368 </param>
4369 </method>
4370
4371 <method name="detachHardDisk">
4372 <desc>
4373 Detaches the virtual hard disk attached to a device slot of the
4374 specified bus.
4375
4376 Detaching the hard disk from the virtual machine is deferred. This means
4377 that the hard disk remains associated with the machine when this method
4378 returns and gets actually de-associated only after a successful
4379 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4380 for more detailed information about attaching hard disks.
4381
4382 <note>
4383 You cannot detach the hard disk from a running machine.
4384 </note>
4385 <note>
4386 Detaching differencing hard disks implicitly created by <link
4387 to="#attachHardDisk"/> for the indirect attachment using this
4388 method will <b>not</b> implicitly delete them. The
4389 <link to="IHardDisk::deleteStorage"/> operation should be
4390 explicitly performed by the caller after the hard disk is successfully
4391 detached and the settings are saved with
4392 <link to="#saveSettings"/>, if it is the desired action.
4393 </note>
4394
4395 <result name="VBOX_E_INVALID_VM_STATE">
4396 Attempt to detach hard disk from a running virtual machine.
4397 </result>
4398 <result name="VBOX_E_OBJECT_NOT_FOUND">
4399 No hard disk attached to given slot/bus.
4400 </result>
4401 <result name="VBOX_E_NOT_SUPPORTED">
4402 Hard disk format does not support storage deletion.
4403 </result>
4404
4405 </desc>
4406 <param name="name" type="wstring" dir="in">
4407 <desc>name of the storage controller to detach the hard disk from.</desc>
4408 </param>
4409 <param name="controllerPort" type="long" dir="in">
4410 <desc>Port number to detach the hard disk from.</desc>
4411 </param>
4412 <param name="device" type="long" dir="in">
4413 <desc>Device slot number to detach the hard disk from.</desc>
4414 </param>
4415 </method>
4416
4417 <method name="getHardDiskAttachmentsOfController" const="yes">
4418 <desc>
4419 Returns an array of hard disk attachments which are attached to the
4420 the controller with the given name.
4421
4422 <result name="VBOX_E_OBJECT_NOT_FOUND">
4423 A storage controller with given name doesn't exist.
4424 </result>
4425 </desc>
4426 <param name="name" type="wstring" dir="in"/>
4427 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4428 </method>
4429
4430 <method name="getNetworkAdapter" const="yes">
4431 <desc>
4432 Returns the network adapter associated with the given slot.
4433 Slots are numbered sequentially, starting with zero. The total
4434 number of adapters per machine is defined by the
4435 <link to="ISystemProperties::networkAdapterCount"/> property,
4436 so the maximum slot number is one less than that property's value.
4437
4438 <result name="E_INVALIDARG">
4439 Invalid @a slot number.
4440 </result>
4441
4442 </desc>
4443 <param name="slot" type="unsigned long" dir="in"/>
4444 <param name="adapter" type="INetworkAdapter" dir="return"/>
4445 </method>
4446
4447 <method name="addStorageController">
4448 <desc>
4449 Adds a new storage controller (SCSI or SATA controller) to the
4450 machine and returns it as an instance of
4451 <link to="IStorageController" />.
4452
4453 @a name identifies the controller with subsequent calls such as
4454 <link to="#getStorageControllerByName" /> or
4455 <link to="#removeStorageController" /> or
4456 <link to="#attachHardDisk" />.
4457
4458 After the controller has been added, you can set its exact
4459 type by setting the <link to="IStorageController::controllerType" />.
4460
4461 <result name="VBOX_E_OBJECT_IN_USE">
4462 A storage controller with given name exists already.
4463 </result>
4464 <result name="E_INVALIDARG">
4465 Invalid @a controllerType.
4466 </result>
4467 </desc>
4468 <param name="name" type="wstring" dir="in"/>
4469 <param name="connectionType" type="StorageBus" dir="in"/>
4470 <param name="controller" type="IStorageController" dir="return"/>
4471 </method>
4472
4473 <method name="getStorageControllerByName" const="yes">
4474 <desc>
4475 Returns a storage controller with the given name.
4476
4477 <result name="VBOX_E_OBJECT_NOT_FOUND">
4478 A storage controller with given name doesn't exist.
4479 </result>
4480 </desc>
4481 <param name="name" type="wstring" dir="in"/>
4482 <param name="storageController" type="IStorageController" dir="return"/>
4483 </method>
4484
4485 <method name="removeStorageController">
4486 <desc>
4487 Removes a storage controller from the machine.
4488
4489 <result name="VBOX_E_OBJECT_NOT_FOUND">
4490 A storage controller with given name doesn't exist.
4491 </result>
4492 </desc>
4493 <param name="name" type="wstring" dir="in"/>
4494 </method>
4495
4496 <method name="getSerialPort" const="yes">
4497 <desc>
4498 Returns the serial port associated with the given slot.
4499 Slots are numbered sequentially, starting with zero. The total
4500 number of serial ports per machine is defined by the
4501 <link to="ISystemProperties::serialPortCount"/> property,
4502 so the maximum slot number is one less than that property's value.
4503
4504 <result name="E_INVALIDARG">
4505 Invalid @a slot number.
4506 </result>
4507
4508 </desc>
4509 <param name="slot" type="unsigned long" dir="in"/>
4510 <param name="port" type="ISerialPort" dir="return"/>
4511 </method>
4512
4513 <method name="getParallelPort" const="yes">
4514 <desc>
4515 Returns the parallel port associated with the given slot.
4516 Slots are numbered sequentially, starting with zero. The total
4517 number of parallel ports per machine is defined by the
4518 <link to="ISystemProperties::parallelPortCount"/> property,
4519 so the maximum slot number is one less than that property's value.
4520
4521 <result name="E_INVALIDARG">
4522 Invalid @a slot number.
4523 </result>
4524
4525 </desc>
4526 <param name="slot" type="unsigned long" dir="in"/>
4527 <param name="port" type="IParallelPort" dir="return"/>
4528 </method>
4529
4530 <method name="getNextExtraDataKey">
4531 <desc>
4532 Returns the machine-specific extra data key name following the
4533 supplied key.
4534
4535 An error is returned if the supplied @a key does not exist. @c NULL is
4536 returned in @a nextKey if the supplied key is the last key. When
4537 supplying @c NULL for the @a key, the first key item is returned in
4538 @a nextKey (if there is any). @a nextValue is an optional parameter and
4539 if supplied, the next key's value is returned in it.
4540
4541 <result name="VBOX_E_OBJECT_NOT_FOUND">
4542 Extra data @a key not found.
4543 </result>
4544
4545 </desc>
4546 <param name="key" type="wstring" dir="in">
4547 <desc>Name of the data key to follow.</desc>
4548 </param>
4549 <param name="nextKey" type="wstring" dir="out">
4550 <desc>Name of the next data key.</desc>
4551 </param>
4552 <param name="nextValue" type="wstring" dir="out">
4553 <desc>Value of the next data key.</desc>
4554 </param>
4555 </method>
4556
4557 <method name="getExtraData">
4558 <desc>
4559 Returns associated machine-specific extra data.
4560
4561 If the requested data @a key does not exist, this function will
4562 succeed and return @c NULL in the @a value argument.
4563
4564 <result name="VBOX_E_FILE_ERROR">
4565 Settings file not accessible.
4566 </result>
4567 <result name="VBOX_E_XML_ERROR">
4568 Could not parse the settings file.
4569 </result>
4570
4571 </desc>
4572 <param name="key" type="wstring" dir="in">
4573 <desc>Name of the data key to get.</desc>
4574 </param>
4575 <param name="value" type="wstring" dir="return">
4576 <desc>Value of the requested data key.</desc>
4577 </param>
4578 </method>
4579
4580 <method name="setExtraData">
4581 <desc>
4582 Sets associated machine-specific extra data.
4583
4584 If you pass @c NULL as a key @a value, the given @a key will be
4585 deleted.
4586
4587 <note>
4588 Before performing the actual data change, this method will ask all
4589 registered callbacks using the
4590 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4591 notification for a permission. If one of the callbacks refuses the
4592 new value, the change will not be performed.
4593 </note>
4594 <note>
4595 On success, the
4596 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4597 is called to inform all registered callbacks about a successful data
4598 change.
4599 </note>
4600 <note>
4601 This method can be called outside the machine session and therefore
4602 it's a caller's responsibility to handle possible race conditions
4603 when several clients change the same key at the same time.
4604 </note>
4605
4606 <result name="VBOX_E_FILE_ERROR">
4607 Settings file not accessible.
4608 </result>
4609 <result name="VBOX_E_XML_ERROR">
4610 Could not parse the settings file.
4611 </result>
4612
4613 </desc>
4614 <param name="key" type="wstring" dir="in">
4615 <desc>Name of the data key to set.</desc>
4616 </param>
4617 <param name="value" type="wstring" dir="in">
4618 <desc>Value to assign to the key.</desc>
4619 </param>
4620 </method>
4621
4622 <method name="saveSettings">
4623 <desc>
4624 Saves any changes to machine settings made since the session
4625 has been opened or a new machine has been created, or since the
4626 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4627 For registered machines, new settings become visible to all
4628 other VirtualBox clients after successful invocation of this
4629 method.
4630 <note>
4631 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4632 notification event after the configuration has been successfully
4633 saved (only for registered machines).
4634 </note>
4635 <note>
4636 Calling this method is only valid on instances returned
4637 by <link to="ISession::machine"/> and on new machines
4638 created by <link to="IVirtualBox::createMachine"/> but not
4639 yet registered, or on unregistered machines after calling
4640 <link to="IVirtualBox::unregisterMachine"/>.
4641 </note>
4642
4643 <result name="VBOX_E_FILE_ERROR">
4644 Settings file not accessible.
4645 </result>
4646 <result name="VBOX_E_XML_ERROR">
4647 Could not parse the settings file.
4648 </result>
4649 <result name="E_ACCESSDENIED">
4650 Modification request refused.
4651 </result>
4652
4653 </desc>
4654 </method>
4655
4656 <method name="saveSettingsWithBackup">
4657 <desc>
4658 Creates a backup copy of the machine settings file (<link
4659 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4660 <link to="#saveSettings"/>.
4661
4662 Note that the backup copy is created <b>only</b> if the settings file
4663 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4664 details). Otherwise, this call is fully equivalent to
4665 <link to="#saveSettings"/> and no backup copying is done.
4666
4667 The backup copy is created in the same directory where the original
4668 settings file is located. It is given the following file name:
4669 <pre>
4670 original.xml.x.y-platform.bak
4671 </pre>
4672 where <tt>original.xml</tt> is the original settings file name
4673 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4674 format of the settings file (before auto-conversion).
4675
4676 If the given backup file already exists, this method will try to add the
4677 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4678 0 to 9) and copy it again until it succeeds. If all suffixes are
4679 occupied, or if any other copy error occurs, this method will return a
4680 failure.
4681
4682 If the copy operation succeeds, the @a bakFileName return argument will
4683 receive a full path to the created backup file (for informational
4684 purposes). Note that this will happen even if the subsequent
4685 <link to="#saveSettings"/> call performed by this method after the
4686 copy operation, fails.
4687
4688 <note>
4689 The VirtualBox API never calls this method. It is intended purely for
4690 the purposes of creating backup copies of the settings files by
4691 front-ends before saving the results of the automatically performed
4692 settings conversion to disk.
4693 </note>
4694
4695 <see>settingsFileVersion</see>
4696
4697 <result name="VBOX_E_FILE_ERROR">
4698 Settings file not accessible.
4699 </result>
4700 <result name="VBOX_E_XML_ERROR">
4701 Could not parse the settings file.
4702 </result>
4703 <result name="VBOX_E_INVALID_VM_STATE">
4704 Virtual machine is not mutable.
4705 </result>
4706 <result name="E_ACCESSDENIED">
4707 Modification request refused.
4708 </result>
4709
4710 </desc>
4711 <param name="bakFileName" type="wstring" dir="return">
4712 <desc>Full path to the created backup copy.</desc>
4713 </param>
4714 </method>
4715
4716 <method name="discardSettings">
4717 <desc>
4718 Discards any changes to the machine settings made since the session
4719 has been opened or since the last call to <link to="#saveSettings"/>
4720 or <link to="#discardSettings"/>.
4721 <note>
4722 Calling this method is only valid on instances returned
4723 by <link to="ISession::machine"/> and on new machines
4724 created by <link to="IVirtualBox::createMachine"/> or
4725 opened by <link to="IVirtualBox::openMachine"/> but not
4726 yet registered, or on unregistered machines after calling
4727 <link to="IVirtualBox::unregisterMachine"/>.
4728 </note>
4729
4730 <result name="VBOX_E_INVALID_VM_STATE">
4731 Virtual machine is not mutable.
4732 </result>
4733
4734 </desc>
4735 </method>
4736
4737 <method name="deleteSettings">
4738 <desc>
4739 Deletes the settings file of this machine from disk.
4740 The machine must not be registered in order for this operation
4741 to succeed.
4742 <note>
4743 <link to="#settingsModified"/> will return TRUE after this
4744 method successfully returns.
4745 </note>
4746 <note>
4747 Calling this method is only valid on instances returned
4748 by <link to="ISession::machine"/> and on new machines
4749 created by <link to="IVirtualBox::createMachine"/> or
4750 opened by <link to="IVirtualBox::openMachine"/> but not
4751 yet registered, or on unregistered machines after calling
4752 <link to="IVirtualBox::unregisterMachine"/>.
4753 </note>
4754 <note>
4755 The deleted machine settings file can be restored (saved again)
4756 by calling <link to="#saveSettings"/>.
4757 </note>
4758
4759 <result name="VBOX_E_INVALID_VM_STATE">
4760 Cannot delete settings of a registered machine or
4761 machine not mutable.
4762 </result>
4763 <result name="VBOX_E_IPRT_ERROR">
4764 Could not delete the settings file.
4765 </result>
4766
4767 </desc>
4768 </method>
4769
4770 <method name="export">
4771 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
4772 steps required to export VirtualBox machines to OVF.
4773 </desc>
4774
4775 <param name="appliance" type="IAppliance" dir="in">
4776 <desc>Appliance to export this machine to.</desc>
4777 </param>
4778 </method >
4779
4780 <method name="getSnapshot">
4781 <desc>
4782 Returns a snapshot of this machine with the given UUID.
4783 A <tt>null</tt> UUID can be used to obtain the first snapshot
4784 taken on this machine. This is useful if you want to traverse
4785 the whole tree of snapshots starting from the root.
4786
4787 <result name="VBOX_E_OBJECT_NOT_FOUND">
4788 Virtual machine has no snapshots or snapshot not found.
4789 </result>
4790
4791 </desc>
4792 <param name="id" type="uuid" dir="in">
4793 <desc>UUID of the snapshot to get</desc>
4794 </param>
4795 <param name="snapshot" type="ISnapshot" dir="return">
4796 <desc>Snapshot object with the given UUID.</desc>
4797 </param>
4798 </method>
4799
4800 <method name="findSnapshot">
4801 <desc>
4802 Returns a snapshot of this machine with the given name.
4803
4804 <result name="VBOX_E_OBJECT_NOT_FOUND">
4805 Virtual machine has no snapshots or snapshot not found.
4806 </result>
4807
4808 </desc>
4809 <param name="name" type="wstring" dir="in">
4810 <desc>Name of the snapshot to find</desc>
4811 </param>
4812 <param name="snapshot" type="ISnapshot" dir="return">
4813 <desc>Snapshot object with the given name.</desc>
4814 </param>
4815 </method>
4816
4817 <method name="setCurrentSnapshot">
4818 <desc>
4819 Sets the current snapshot of this machine.
4820 <note>
4821 In the current implementation, this operation is not
4822 implemented.
4823 </note>
4824 </desc>
4825 <param name="id" type="uuid" dir="in">
4826 <desc>UUID of the snapshot to set as the current snapshot.</desc>
4827 </param>
4828 </method>
4829
4830 <method name="createSharedFolder">
4831 <desc>
4832 Creates a new permanent shared folder by associating the given logical
4833 name with the given host path, adds it to the collection of shared
4834 folders and starts sharing it. Refer to the description of
4835 <link to="ISharedFolder"/> to read more about logical names.
4836
4837 <result name="VBOX_E_OBJECT_IN_USE">
4838 Shared folder already exists.
4839 </result>
4840 <result name="VBOX_E_FILE_ERROR">
4841 Shared folder @a hostPath not accessible.
4842 </result>
4843
4844 </desc>
4845 <param name="name" type="wstring" dir="in">
4846 <desc>Unique logical name of the shared folder.</desc>
4847 </param>
4848 <param name="hostPath" type="wstring" dir="in">
4849 <desc>Full path to the shared folder in the host file system.</desc>
4850 </param>
4851 <param name="writable" type="boolean" dir="in">
4852 <desc>Whether the share is writable or readonly</desc>
4853 </param>
4854 </method>
4855
4856 <method name="removeSharedFolder">
4857 <desc>
4858 Removes the permanent shared folder with the given name previously
4859 created by <link to="#createSharedFolder"/> from the collection of
4860 shared folders and stops sharing it.
4861
4862 <result name="VBOX_E_INVALID_VM_STATE">
4863 Virtual machine is not mutable.
4864 </result>
4865 <result name="VBOX_E_OBJECT_NOT_FOUND">
4866 Shared folder @a name does not exist.
4867 </result>
4868
4869 </desc>
4870 <param name="name" type="wstring" dir="in">
4871 <desc>Logical name of the shared folder to remove.</desc>
4872 </param>
4873 </method>
4874
4875 <method name="canShowConsoleWindow">
4876 <desc>
4877 Returns @c true if the VM console process can activate the
4878 console window and bring it to foreground on the desktop of
4879 the host PC.
4880 <note>
4881 This method will fail if a session for this machine is not
4882 currently open.
4883 </note>
4884
4885 <result name="VBOX_E_INVALID_VM_STATE">
4886 Machine session is not open.
4887 </result>
4888
4889 </desc>
4890 <param name="canShow" type="boolean" dir="return">
4891 <desc>
4892 @c true if the console window can be shown and @c
4893 false otherwise.
4894 </desc>
4895 </param>
4896 </method>
4897
4898 <method name="showConsoleWindow">
4899 <desc>
4900 Activates the console window and brings it to foreground on
4901 the desktop of the host PC. Many modern window managers on
4902 many platforms implement some sort of focus stealing
4903 prevention logic, so that it may be impossible to activate
4904 a window without the help of the currently active
4905 application. In this case, this method will return a non-zero
4906 identifier that represents the top-level window of the VM
4907 console process. The caller, if it represents a currently
4908 active process, is responsible to use this identifier (in a
4909 platform-dependent manner) to perform actual window
4910 activation.
4911 <note>
4912 This method will fail if a session for this machine is not
4913 currently open.
4914 </note>
4915
4916 <result name="VBOX_E_INVALID_VM_STATE">
4917 Machine session is not open.
4918 </result>
4919
4920 </desc>
4921 <param name="winId" type="unsigned long long" dir="return">
4922 <desc>
4923 Platform-dependent identifier of the top-level VM console
4924 window, or zero if this method has performed all actions
4925 necessary to implement the <i>show window</i> semantics for
4926 the given platform and/or VirtualBox front-end.
4927 </desc>
4928 </param>
4929 </method>
4930
4931 <method name="getGuestProperty">
4932 <desc>
4933 Reads an entry from the machine's guest property store.
4934
4935 <result name="VBOX_E_INVALID_VM_STATE">
4936 Machine session is not open.
4937 </result>
4938
4939 </desc>
4940 <param name="name" type="wstring" dir="in">
4941 <desc>
4942 The name of the property to read.
4943 </desc>
4944 </param>
4945 <param name="value" type="wstring" dir="out">
4946 <desc>
4947 The value of the property. If the property does not exist then this
4948 will be empty.
4949 </desc>
4950 </param>
4951 <param name="timestamp" type="unsigned long long" dir="out">
4952 <desc>
4953 The time at which the property was last modified, as seen by the
4954 server process.
4955 </desc>
4956 </param>
4957 <param name="flags" type="wstring" dir="out">
4958 <desc>
4959 Additional property parameters, passed as a comma-separated list of
4960 "name=value" type entries.
4961 </desc>
4962 </param>
4963 </method>
4964
4965 <method name="getGuestPropertyValue">
4966 <desc>
4967 Reads a value from the machine's guest property store.
4968
4969 <result name="VBOX_E_INVALID_VM_STATE">
4970 Machine session is not open.
4971 </result>
4972
4973 </desc>
4974 <param name="property" type="wstring" dir="in">
4975 <desc>
4976 The name of the property to read.
4977 </desc>
4978 </param>
4979 <param name="value" type="wstring" dir="return">
4980 <desc>
4981 The value of the property. If the property does not exist then this
4982 will be empty.
4983 </desc>
4984 </param>
4985 </method>
4986
4987 <method name="getGuestPropertyTimestamp">
4988 <desc>
4989 Reads a property timestamp from the machine's guest property store.
4990
4991 <result name="VBOX_E_INVALID_VM_STATE">
4992 Machine session is not open.
4993 </result>
4994
4995 </desc>
4996 <param name="property" type="wstring" dir="in">
4997 <desc>
4998 The name of the property to read.
4999 </desc>
5000 </param>
5001 <param name="value" type="unsigned long long" dir="return">
5002 <desc>
5003 The timestamp. If the property does not exist then this will be
5004 empty.
5005 </desc>
5006 </param>
5007 </method>
5008
5009 <method name="setGuestProperty">
5010 <desc>
5011 Sets, changes or deletes an entry in the machine's guest property
5012 store.
5013
5014 <result name="E_ACCESSDENIED">
5015 Property cannot be changed.
5016 </result>
5017 <result name="E_INVALIDARG">
5018 Invalid @a flags.
5019 </result>
5020 <result name="VBOX_E_INVALID_VM_STATE">
5021 Virtual machine is not mutable or session not open.
5022 </result>
5023 <result name="VBOX_E_INVALID_OBJECT_STATE">
5024 Cannot set transient property when machine not running.
5025 </result>
5026
5027 </desc>
5028 <param name="property" type="wstring" dir="in">
5029 <desc>
5030 The name of the property to set, change or delete.
5031 </desc>
5032 </param>
5033 <param name="value" type="wstring" dir="in">
5034 <desc>
5035 The new value of the property to set, change or delete. If the
5036 property does not yet exist and value is non-empty, it will be
5037 created. If the value is empty, the key will be deleted if it
5038 exists.
5039 </desc>
5040 </param>
5041 <param name="flags" type="wstring" dir="in">
5042 <desc>
5043 Additional property parameters, passed as a comma-separated list of
5044 "name=value" type entries.
5045 </desc>
5046 </param>
5047 </method>
5048
5049 <method name="setGuestPropertyValue">
5050 <desc>
5051 Sets, changes or deletes a value in the machine's guest property
5052 store. The flags field will be left unchanged or created empty for a
5053 new property.
5054
5055 <result name="E_ACCESSDENIED">
5056 Property cannot be changed.
5057 </result>
5058 <result name="VBOX_E_INVALID_VM_STATE">
5059 Virtual machine is not mutable or session not open.
5060 </result>
5061 <result name="VBOX_E_INVALID_OBJECT_STATE">
5062 Cannot set transient property when machine not running.
5063 </result>
5064 </desc>
5065
5066 <param name="property" type="wstring" dir="in">
5067 <desc>
5068 The name of the property to set, change or delete.
5069 </desc>
5070 </param>
5071 <param name="value" type="wstring" dir="in">
5072 <desc>
5073 The new value of the property to set, change or delete. If the
5074 property does not yet exist and value is non-empty, it will be
5075 created. If value is empty, the property will be deleted if it
5076 exists.
5077 </desc>
5078 </param>
5079 </method>
5080
5081 <method name="enumerateGuestProperties">
5082 <desc>
5083 Return a list of the guest properties matching a set of patterns along
5084 with their values, time stamps and flags.
5085 </desc>
5086 <param name="patterns" type="wstring" dir="in">
5087 <desc>
5088 The patterns to match the properties against, separated by '|'
5089 characters. If this is empty or NULL, all properties will match.
5090 </desc>
5091 </param>
5092 <param name="name" type="wstring" dir="out" safearray="yes">
5093 <desc>
5094 The names of the properties returned.
5095 </desc>
5096 </param>
5097 <param name="value" type="wstring" dir="out" safearray="yes">
5098 <desc>
5099 The values of the properties returned. The array entries match the
5100 corresponding entries in the @a name array.
5101 </desc>
5102 </param>
5103 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5104 <desc>
5105 The time stamps of the properties returned. The array entries match
5106 the corresponding entries in the @a name array.
5107 </desc>
5108 </param>
5109 <param name="flags" type="wstring" dir="out" safearray="yes">
5110 <desc>
5111 The flags of the properties returned. The array entries match the
5112 corresponding entries in the @a name array.
5113 </desc>
5114 </param>
5115 </method>
5116</interface>
5117
5118 <!--
5119 // IConsole
5120 /////////////////////////////////////////////////////////////////////////
5121 -->
5122
5123 <interface
5124 name="IConsoleCallback" extends="$unknown"
5125 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5126 wsmap="suppress"
5127 >
5128
5129 <method name="onMousePointerShapeChange">
5130 <desc>
5131 Notification when the guest mouse pointer shape has
5132 changed. The new shape data is given.
5133 </desc>
5134 <param name="visible" type="boolean" dir="in">
5135 <desc>
5136 Flag whether the pointer is visible.
5137 </desc>
5138 </param>
5139 <param name="alpha" type="boolean" dir="in">
5140 <desc>
5141 Flag whether the pointer has an alpha channel.
5142 </desc>
5143 </param>
5144 <param name="xHot" type="unsigned long" dir="in">
5145 <desc>
5146 The pointer hot spot x coordinate.
5147 </desc>
5148 </param>
5149 <param name="yHot" type="unsigned long" dir="in">
5150 <desc>
5151 The pointer hot spot y coordinate.
5152 </desc>
5153 </param>
5154 <param name="width" type="unsigned long" dir="in">
5155 <desc>
5156 Width of the pointer shape in pixels.
5157 </desc>
5158 </param>
5159 <param name="height" type="unsigned long" dir="in">
5160 <desc>
5161 Height of the pointer shape in pixels.
5162 </desc>
5163 </param>
5164 <param name="shape" type="octet" mod="ptr" dir="in">
5165 <desc>
5166 Address of the shape buffer.
5167
5168 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5169 followed by a 32-bpp XOR (color) mask.
5170
5171 For pointers without alpha channel the XOR mask pixels are 32
5172 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5173 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5174
5175 An AND mask is used for pointers with alpha channel, so if the
5176 callback does not support alpha, the pointer could be
5177 displayed as a normal color pointer.
5178
5179 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5180 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5181 height</tt>. The padding bits at the end of each scanline are
5182 undefined.
5183
5184 The XOR mask follows the AND mask on the next 4-byte aligned
5185 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5186 Bytes in the gap between the AND and the XOR mask are undefined.
5187 The XOR mask scanlines have no gap between them and the size of
5188 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5189
5190 <note>
5191 If @a shape is 0, only the pointer visibility is changed.
5192 </note>
5193 </desc>
5194 </param>
5195 </method>
5196
5197 <method name="onMouseCapabilityChange">
5198 <desc>
5199 Notification when the mouse capabilities reported by the
5200 guest have changed. The new capabilities are passed.
5201 </desc>
5202 <param name="supportsAbsolute" type="boolean" dir="in"/>
5203 <param name="needsHostCursor" type="boolean" dir="in"/>
5204 </method>
5205
5206 <method name="onKeyboardLedsChange">
5207 <desc>
5208 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5209 to alter the state of the keyboard LEDs.
5210 </desc>
5211 <param name="numLock" type="boolean" dir="in"/>
5212 <param name="capsLock" type="boolean" dir="in"/>
5213 <param name="scrollLock" type="boolean" dir="in"/>
5214 </method>
5215
5216 <method name="onStateChange">
5217 <desc>
5218 Notification when the execution state of the machine has changed.
5219 The new state will be given.
5220 </desc>
5221 <param name="state" type="MachineState" dir="in"/>
5222 </method>
5223
5224 <method name="onAdditionsStateChange">
5225 <desc>
5226 Notification when a Guest Additions property changes.
5227 Interested callees should query IGuest attributes to
5228 find out what has changed.
5229 </desc>
5230 </method>
5231
5232 <method name="onDVDDriveChange">
5233 <desc>
5234 Notification when a property of the
5235 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5236 Interested callees should use IDVDDrive methods to find out what has
5237 changed.
5238 </desc>
5239 </method>
5240
5241 <method name="onFloppyDriveChange">
5242 <desc>
5243 Notification when a property of the
5244 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5245 Interested callees should use IFloppyDrive methods to find out what
5246 has changed.
5247 </desc>
5248 </method>
5249
5250 <method name="onNetworkAdapterChange">
5251 <desc>
5252 Notification when a property of one of the
5253 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5254 changes. Interested callees should use INetworkAdapter methods and
5255 attributes to find out what has changed.
5256 </desc>
5257 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5258 <desc>Network adapter that is subject to change.</desc>
5259 </param>
5260 </method>
5261
5262 <method name="onSerialPortChange">
5263 <desc>
5264 Notification when a property of one of the
5265 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5266 Interested callees should use ISerialPort methods and attributes
5267 to find out what has changed.
5268 </desc>
5269 <param name="serialPort" type="ISerialPort" dir="in">
5270 <desc>Serial port that is subject to change.</desc>
5271 </param>
5272 </method>
5273
5274 <method name="onParallelPortChange">
5275 <desc>
5276 Notification when a property of one of the
5277 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5278 changes. Interested callees should use ISerialPort methods and
5279 attributes to find out what has changed.
5280 </desc>
5281 <param name="parallelPort" type="IParallelPort" dir="in">
5282 <desc>Parallel port that is subject to change.</desc>
5283 </param>
5284 </method>
5285
5286 <method name="onStorageControllerChange">
5287 <desc>
5288 Notification when a property of one of the
5289 virtual <link to="IMachine::getStorageControllers">storage controllers</link>
5290 changes. Interested callees should use query the corresponding collections
5291 to find out what has changed.
5292 </desc>
5293 </method>
5294
5295 <method name="onVRDPServerChange">
5296 <desc>
5297 Notification when a property of the
5298 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5299 Interested callees should use IVRDPServer methods and attributes to
5300 find out what has changed.
5301 </desc>
5302 </method>
5303
5304 <method name="onUSBControllerChange">
5305 <desc>
5306 Notification when a property of the virtual
5307 <link to="IMachine::USBController">USB controller</link> changes.
5308 Interested callees should use IUSBController methods and attributes to
5309 find out what has changed.
5310 </desc>
5311 </method>
5312
5313 <method name="onUSBDeviceStateChange">
5314 <desc>
5315 Notification when a USB device is attached to or detached from
5316 the virtual USB controller.
5317
5318 This notification is sent as a result of the indirect
5319 request to attach the device because it matches one of the
5320 machine USB filters, or as a result of the direct request
5321 issued by <link to="IConsole::attachUSBDevice"/> or
5322 <link to="IConsole::detachUSBDevice"/>.
5323
5324 This notification is sent in case of both a succeeded and a
5325 failed request completion. When the request succeeds, the
5326 @a error parameter is @c null, and the given device has been
5327 already added to (when @a attached is @c true) or removed from
5328 (when @a attached is @c false) the collection represented by
5329 <link to="IConsole::USBDevices"/>. On failure, the collection
5330 doesn't change and the @a error parameter represents the error
5331 message describing the failure.
5332
5333 </desc>
5334 <param name="device" type="IUSBDevice" dir="in">
5335 <desc>Device that is subject to state change.</desc>
5336 </param>
5337 <param name="attached" type="boolean" dir="in">
5338 <desc>
5339 <tt>true</tt> if the device was attached
5340 and <tt>false</tt> otherwise.
5341 </desc>
5342 </param>
5343 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5344 <desc>
5345 <tt>null</tt> on success or an error message object on
5346 failure.
5347 </desc>
5348 </param>
5349 </method>
5350
5351 <method name="onSharedFolderChange">
5352 <desc>
5353 Notification when a shared folder is added or removed.
5354 The @a scope argument defines one of three scopes:
5355 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5356 (<link to="Scope_Global">Global</link>),
5357 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5358 the machine (<link to="Scope_Machine">Machine</link>) or <link
5359 to="IConsole::sharedFolders">transient shared folders</link> of the
5360 machine (<link to="Scope_Session">Session</link>). Interested callees
5361 should use query the corresponding collections to find out what has
5362 changed.
5363 </desc>
5364 <param name="scope" type="Scope" dir="in">
5365 <desc>Scope of the notification.</desc>
5366 </param>
5367 </method>
5368
5369 <method name="onRuntimeError">
5370 <desc>
5371 Notification when an error happens during the virtual
5372 machine execution.
5373
5374 There are three kinds of runtime errors:
5375 <ul>
5376 <li><i>fatal</i></li>
5377 <li><i>non-fatal with retry</i></li>
5378 <li><i>non-fatal warnings</i></li>
5379 </ul>
5380
5381 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5382 to <tt>true</tt>. In case of fatal errors, the virtual machine
5383 execution is always paused before calling this notification, and
5384 the notification handler is supposed either to immediately save
5385 the virtual machine state using <link to="IConsole::saveState"/>
5386 or power it off using <link to="IConsole::powerDown"/>.
5387 Resuming the execution can lead to unpredictable results.
5388
5389 <b>Non-fatal</b> errors and warnings are indicated by the
5390 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5391 is in the Paused state by the time the error notification is
5392 received, it means that the user can <i>try to resume</i> the machine
5393 execution after attempting to solve the problem that caused the
5394 error. In this case, the notification handler is supposed
5395 to show an appropriate message to the user (depending on the
5396 value of the @a id parameter) that offers several actions such
5397 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5398 wants to retry, the notification handler should continue
5399 the machine execution using the <link to="IConsole::resume"/>
5400 call. If the machine execution is not Paused during this
5401 notification, then it means this notification is a <i>warning</i>
5402 (for example, about a fatal condition that can happen very soon);
5403 no immediate action is required from the user, the machine
5404 continues its normal execution.
5405
5406 Note that in either case the notification handler
5407 <b>must not</b> perform any action directly on a thread
5408 where this notification is called. Everything it is allowed to
5409 do is to post a message to another thread that will then talk
5410 to the user and take the corresponding action.
5411
5412 Currently, the following error identifiers are known:
5413 <ul>
5414 <li><tt>"HostMemoryLow"</tt></li>
5415 <li><tt>"HostAudioNotResponding"</tt></li>
5416 <li><tt>"VDIStorageFull"</tt></li>
5417 </ul>
5418
5419 <note>
5420 This notification is not designed to be implemented by
5421 more than one callback at a time. If you have multiple
5422 IConsoleCallback instances registered on the given
5423 IConsole object, make sure you simply do nothing but
5424 return @c S_OK from all but one of them that does actual
5425 user notification and performs necessary actions.
5426 </note>
5427
5428 </desc>
5429 <param name="fatal" type="boolean" dir="in">
5430 <desc>Whether the error is fatal or not</desc>
5431 </param>
5432 <param name="id" type="wstring" dir="in">
5433 <desc>Error identifier</desc>
5434 </param>
5435 <param name="message" type="wstring" dir="in">
5436 <desc>Optional error message</desc>
5437 </param>
5438 </method>
5439
5440 <method name="onCanShowWindow">
5441 <desc>
5442 Notification when a call to
5443 <link to="IMachine::canShowConsoleWindow"/> is made by a
5444 front-end to check if a subsequent call to
5445 <link to="IMachine::showConsoleWindow"/> can succeed.
5446
5447 The callee should give an answer appropriate to the current
5448 machine state in the @a canShow argument. This answer must
5449 remain valid at least until the next
5450 <link to="IConsole::state">machine state</link> change.
5451
5452 <note>
5453 This notification is not designed to be implemented by
5454 more than one callback at a time. If you have multiple
5455 IConsoleCallback instances registered on the given
5456 IConsole object, make sure you simply do nothing but
5457 return @c true and @c S_OK from all but one of them that
5458 actually manages console window activation.
5459 </note>
5460 </desc>
5461 <param name="canShow" type="boolean" dir="return">
5462 <desc>
5463 @c true if the console window can be shown and @c
5464 false otherwise.
5465 </desc>
5466 </param>
5467 </method>
5468
5469 <method name="onShowWindow">
5470 <desc>
5471 Notification when a call to
5472 <link to="IMachine::showConsoleWindow"/>
5473 requests the console window to be activated and brought to
5474 foreground on the desktop of the host PC.
5475
5476 This notification should cause the VM console process to
5477 perform the requested action as described above. If it is
5478 impossible to do it at a time of this notification, this
5479 method should return a failure.
5480
5481 Note that many modern window managers on many platforms
5482 implement some sort of focus stealing prevention logic, so
5483 that it may be impossible to activate a window without the
5484 help of the currently active application (which is supposedly
5485 an initiator of this notification). In this case, this method
5486 must return a non-zero identifier that represents the
5487 top-level window of the VM console process. The caller, if it
5488 represents a currently active process, is responsible to use
5489 this identifier (in a platform-dependent manner) to perform
5490 actual window activation.
5491
5492 This method must set @a winId to zero if it has performed all
5493 actions necessary to complete the request and the console
5494 window is now active and in foreground, to indicate that no
5495 further action is required on the caller's side.
5496
5497 <note>
5498 This notification is not designed to be implemented by
5499 more than one callback at a time. If you have multiple
5500 IConsoleCallback instances registered on the given
5501 IConsole object, make sure you simply do nothing but
5502 return @c S_OK from all but one of them that actually
5503 manages console window activation.
5504 </note>
5505 </desc>
5506 <param name="winId" type="unsigned long long" dir="return">
5507 <desc>
5508 Platform-dependent identifier of the top-level VM console
5509 window, or zero if this method has performed all actions
5510 necessary to implement the <i>show window</i> semantics for
5511 the given platform and/or this VirtualBox front-end.
5512 </desc>
5513 </param>
5514 </method>
5515
5516 </interface>
5517
5518 <interface
5519 name="IRemoteDisplayInfo" extends="$unknown"
5520 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5521 wsmap="struct"
5522 >
5523 <desc>
5524 Contains information about the remote display (VRDP) capabilities and status.
5525 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5526 </desc>
5527
5528 <attribute name="active" type="boolean" readonly="yes">
5529 <desc>
5530 Whether the remote display connection is active.
5531 </desc>
5532 </attribute>
5533
5534 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5535 <desc>
5536 How many times a client connected.
5537 </desc>
5538 </attribute>
5539
5540 <attribute name="beginTime" type="long long" readonly="yes">
5541 <desc>
5542 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5543 </desc>
5544 </attribute>
5545
5546 <attribute name="endTime" type="long long" readonly="yes">
5547 <desc>
5548 When the last connection was terminated or the current time, if
5549 connection is still active, in milliseconds since 1970-01-01 UTC.
5550 </desc>
5551 </attribute>
5552
5553 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5554 <desc>
5555 How many bytes were sent in last or current, if still active, connection.
5556 </desc>
5557 </attribute>
5558
5559 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5560 <desc>
5561 How many bytes were sent in all connections.
5562 </desc>
5563 </attribute>
5564
5565 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5566 <desc>
5567 How many bytes were received in last or current, if still active, connection.
5568 </desc>
5569 </attribute>
5570
5571 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5572 <desc>
5573 How many bytes were received in all connections.
5574 </desc>
5575 </attribute>
5576
5577 <attribute name="user" type="wstring" readonly="yes">
5578 <desc>
5579 Login user name supplied by the client.
5580 </desc>
5581 </attribute>
5582
5583 <attribute name="domain" type="wstring" readonly="yes">
5584 <desc>
5585 Login domain name supplied by the client.
5586 </desc>
5587 </attribute>
5588
5589 <attribute name="clientName" type="wstring" readonly="yes">
5590 <desc>
5591 The client name supplied by the client.
5592 </desc>
5593 </attribute>
5594
5595 <attribute name="clientIP" type="wstring" readonly="yes">
5596 <desc>
5597 The IP address of the client.
5598 </desc>
5599 </attribute>
5600
5601 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5602 <desc>
5603 The client software version number.
5604 </desc>
5605 </attribute>
5606
5607 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5608 <desc>
5609 Public key exchange method used when connection was established.
5610 Values: 0 - RDP4 public key exchange scheme.
5611 1 - X509 certificates were sent to client.
5612 </desc>
5613 </attribute>
5614
5615 </interface>
5616
5617 <interface
5618 name="IConsole" extends="$unknown"
5619 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5620 wsmap="managed"
5621 >
5622 <desc>
5623 The IConsole interface represents an interface to control virtual
5624 machine execution.
5625
5626 The console object that implements the IConsole interface is obtained
5627 from a session object after the session for the given machine has been
5628 opened using one of <link to="IVirtualBox::openSession"/>,
5629 <link to="IVirtualBox::openRemoteSession"/> or
5630 <link to="IVirtualBox::openExistingSession"/> methods.
5631
5632 Methods of the IConsole interface allow the caller to query the current
5633 virtual machine execution state, pause the machine or power it down, save
5634 the machine state or take a snapshot, attach and detach removable media
5635 and so on.
5636
5637 <see>ISession</see>
5638 </desc>
5639
5640 <attribute name="machine" type="IMachine" readonly="yes">
5641 <desc>
5642 Machine object this console is sessioned with.
5643 <note>
5644 This is a convenience property, it has the same value as
5645 <link to="ISession::machine"/> of the corresponding session
5646 object.
5647 </note>
5648 </desc>
5649 </attribute>
5650
5651 <attribute name="state" type="MachineState" readonly="yes">
5652 <desc>
5653 Current execution state of the machine.
5654 <note>
5655 This property always returns the same value as the corresponding
5656 property of the IMachine object this console is sessioned with.
5657 For the process that owns (executes) the VM, this is the
5658 preferable way of querying the VM state, because no IPC
5659 calls are made.
5660 </note>
5661 </desc>
5662 </attribute>
5663
5664 <attribute name="guest" type="IGuest" readonly="yes">
5665 <desc>Guest object.</desc>
5666 </attribute>
5667
5668 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5669 <desc>
5670 Virtual keyboard object.
5671 <note>
5672 If the machine is not running, any attempt to use
5673 the returned object will result in an error.
5674 </note>
5675 </desc>
5676 </attribute>
5677
5678 <attribute name="mouse" type="IMouse" readonly="yes">
5679 <desc>
5680 Virtual mouse object.
5681 <note>
5682 If the machine is not running, any attempt to use
5683 the returned object will result in an error.
5684 </note>
5685 </desc>
5686 </attribute>
5687
5688 <attribute name="display" type="IDisplay" readonly="yes">
5689 <desc>Virtual display object.
5690 <note>
5691 If the machine is not running, any attempt to use
5692 the returned object will result in an error.
5693 </note>
5694 </desc>
5695 </attribute>
5696
5697 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5698 <desc>Debugging interface.</desc>
5699 </attribute>
5700
5701 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5702 <desc>
5703 Collection of USB devices currently attached to the virtual
5704 USB controller.
5705 <note>
5706 The collection is empty if the machine is not running.
5707 </note>
5708 </desc>
5709 </attribute>
5710
5711 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5712 <desc>
5713 List of USB devices currently attached to the remote VRDP client.
5714 Once a new device is physically attached to the remote host computer,
5715 it appears in this list and remains there until detached.
5716 </desc>
5717 </attribute>
5718
5719 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5720 <desc>
5721 Collection of shared folders for the current session. These folders
5722 are called transient shared folders because they are available to the
5723 guest OS running inside the associated virtual machine only for the
5724 duration of the session (as opposed to
5725 <link to="IMachine::sharedFolders"/> which represent permanent shared
5726 folders). When the session is closed (e.g. the machine is powered down),
5727 these folders are automatically discarded.
5728
5729 New shared folders are added to the collection using
5730 <link to="#createSharedFolder"/>. Existing shared folders can be
5731 removed using <link to="#removeSharedFolder"/>.
5732 </desc>
5733 </attribute>
5734
5735 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5736 <desc>
5737 Interface that provides information on Remote Display (VRDP) connection.
5738 </desc>
5739 </attribute>
5740
5741 <method name="powerUp">
5742 <desc>
5743 Starts the virtual machine execution using the current machine
5744 state (that is, its current execution state, current settings and
5745 current hard disks).
5746
5747 If the machine is powered off or aborted, the execution will
5748 start from the beginning (as if the real hardware were just
5749 powered on).
5750
5751 If the machine is in the <link to="MachineState_Saved"/> state,
5752 it will continue its execution the point where the state has
5753 been saved.
5754
5755 <note>
5756 Unless you are trying to write a new VirtualBox front-end that
5757 performs direct machine execution (like the VirtualBox or VBoxSDL
5758 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5759 session opened by <link to="IVirtualBox::openSession"/> and use this
5760 session only to change virtual machine settings. If you simply want to
5761 start virtual machine execution using one of the existing front-ends
5762 (for example the VirtualBox GUI or headless server), simply use
5763 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5764 power up the machine automatically for you.
5765 </note>
5766
5767 <see>#saveState</see>
5768 <result name="VBOX_E_INVALID_VM_STATE">
5769 Virtual machine already running.
5770 </result>
5771 <result name="VBOX_E_HOST_ERROR">
5772 Host interface does not exist or name not set.
5773 </result>
5774 <result name="VBOX_E_FILE_ERROR">
5775 Invalid saved state file.
5776 </result>
5777 </desc>
5778 <param name="progress" type="IProgress" dir="return">
5779 <desc>Progress object to track the operation completion.</desc>
5780 </param>
5781 </method>
5782
5783 <method name="powerUpPaused">
5784 <desc>
5785 Identical to powerUp except that the VM will enter the
5786 <link to="MachineState_Paused"/> state, instead of
5787 <link to="MachineState_Running"/>.
5788
5789 <see>#powerUp</see>
5790 <result name="VBOX_E_INVALID_VM_STATE">
5791 Virtual machine already running.
5792 </result>
5793 <result name="VBOX_E_HOST_ERROR">
5794 Host interface does not exist or name not set.
5795 </result>
5796 <result name="VBOX_E_FILE_ERROR">
5797 Invalid saved state file.
5798 </result>
5799 </desc>
5800 <param name="progress" type="IProgress" dir="return">
5801 <desc>Progress object to track the operation completion.</desc>
5802 </param>
5803 </method>
5804
5805 <method name="powerDown">
5806 <desc>
5807 Stops the virtual machine execution.
5808 After this operation completes, the machine will go to the
5809 PoweredOff state.
5810
5811 @deprecated This method will be removed in VirtualBox 2.1 where the
5812 powerDownAsync() method will take its name. Do not use this method in
5813 the code.
5814 <result name="VBOX_E_INVALID_VM_STATE">
5815 Virtual machine must be Running, Paused or Stuck to be powered down.
5816 </result>
5817 <result name="VBOX_E_VM_ERROR">
5818 Unable to power off or destroy virtual machine.
5819 </result>
5820 </desc>
5821 </method>
5822
5823 <method name="powerDownAsync">
5824 <desc>
5825 Initiates the power down procedure to stop the virtual machine
5826 execution.
5827
5828 The completion of the power down procedure is tracked using the returned
5829 IProgress object. After the operation is complete, the machine will go
5830 to the PoweredOff state.
5831
5832 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
5833 where the original powerDown() method will be removed. You will need to
5834 rename "powerDownAsync" to "powerDown" in your sources to make them
5835 build with version 2.1.
5836 <result name="VBOX_E_INVALID_VM_STATE">
5837 Virtual machine must be Running, Paused or Stuck to be powered down.
5838 </result>
5839 </desc>
5840 <param name="progress" type="IProgress" dir="return">
5841 <desc>Progress object to track the operation completion.</desc>
5842 </param>
5843 </method>
5844
5845 <method name="reset">
5846 <desc>Resets the virtual machine.
5847 <result name="VBOX_E_INVALID_VM_STATE">
5848 Virtual machine not in Running state.
5849 </result>
5850 <result name="VBOX_E_VM_ERROR">
5851 Virtual machine error in reset operation.
5852 </result>
5853 </desc>
5854 </method>
5855
5856 <method name="pause">
5857 <desc>Pauses the virtual machine execution.
5858 <result name="VBOX_E_INVALID_VM_STATE">
5859 Virtual machine not in Running state.
5860 </result>
5861 <result name="VBOX_E_VM_ERROR">
5862 Virtual machine error in suspend operation.
5863 </result>
5864 </desc>
5865 </method>
5866
5867 <method name="resume">
5868 <desc>Resumes the virtual machine execution.
5869 <result name="VBOX_E_INVALID_VM_STATE">
5870 Virtual machine not in Paused state.
5871 </result>
5872 <result name="VBOX_E_VM_ERROR">
5873 Virtual machine error in resume operation.
5874 </result>
5875 </desc>
5876 </method>
5877
5878 <method name="powerButton">
5879 <desc>Sends the ACPI power button event to the guest.
5880 <result name="VBOX_E_INVALID_VM_STATE">
5881 Virtual machine not in Running state.
5882 </result>
5883 <result name="VBOX_E_PDM_ERROR">
5884 Controlled power off failed.
5885 </result>
5886 </desc>
5887 </method>
5888
5889 <method name="sleepButton">
5890 <desc>Sends the ACPI sleep button event to the guest.
5891 <result name="VBOX_E_INVALID_VM_STATE">
5892 Virtual machine not in Running state.
5893 </result>
5894 <result name="VBOX_E_PDM_ERROR">
5895 Sending sleep button event failed.
5896 </result>
5897 </desc>
5898 </method>
5899
5900 <method name="getPowerButtonHandled">
5901 <desc>Checks if the last power button event was handled by guest.
5902 <result name="VBOX_E_PDM_ERROR">
5903 Checking if the event was handled by the guest OS failed.
5904 </result>
5905 </desc>
5906 <param name="handled" type="boolean" dir="return"/>
5907 </method>
5908
5909 <method name="getGuestEnteredACPIMode">
5910 <desc>Checks if the guest entered the ACPI mode G0 (working) or
5911 G1 (sleeping). If this method returns false, the guest will
5912 most likely not respond to external ACPI events.
5913 <result name="VBOX_E_INVALID_VM_STATE">
5914 Virtual machine not in Running state.
5915 </result>
5916 </desc>
5917 <param name="entered" type="boolean" dir="return"/>
5918 </method>
5919
5920 <method name="saveState">
5921 <desc>
5922 Saves the current execution state of a running virtual machine
5923 and stops its execution.
5924
5925 After this operation completes, the machine will go to the
5926 Saved state. Next time it is powered up, this state will
5927 be restored and the machine will continue its execution from
5928 the place where it was saved.
5929
5930 This operation differs from taking a snapshot to the effect
5931 that it doesn't create new differencing hard disks. Also, once
5932 the machine is powered up from the state saved using this method,
5933 the saved state is deleted, so it will be impossible to return
5934 to this state later.
5935
5936 <note>
5937 On success, this method implicitly calls
5938 <link to="IMachine::saveSettings"/> to save all current machine
5939 settings (including runtime changes to the DVD drive, etc.).
5940 Together with the impossibility to change any VM settings when it is
5941 in the Saved state, this guarantees adequate hardware
5942 configuration of the machine when it is restored from the saved
5943 state file.
5944 </note>
5945
5946 <note>
5947 The machine must be in the Running or Paused state, otherwise
5948 the operation will fail.
5949 </note>
5950 <result name="VBOX_E_INVALID_VM_STATE">
5951 Virtual machine state neither Running nor Paused.
5952 </result>
5953 <result name="VBOX_E_FILE_ERROR">
5954 Failed to create directory for saved state file.
5955 </result>
5956
5957 <see><link to="#takeSnapshot"/></see>
5958 </desc>
5959 <param name="progress" type="IProgress" dir="return">
5960 <desc>Progress object to track the operation completion.</desc>
5961 </param>
5962 </method>
5963
5964 <method name="adoptSavedState">
5965 <desc>
5966 Associates the given saved state file to the virtual machine.
5967
5968 On success, the machine will go to the Saved state. Next time it is
5969 powered up, it will be restored from the adopted saved state and
5970 continue execution from the place where the saved state file was
5971 created.
5972
5973 The specified saved state file path may be absolute or relative to the
5974 folder the VM normally saves the state to (usually,
5975 <link to="IMachine::snapshotFolder"/>).
5976
5977 <note>
5978 It's a caller's responsibility to make sure the given saved state
5979 file is compatible with the settings of this virtual machine that
5980 represent its virtual hardware (memory size, hard disk configuration
5981 etc.). If there is a mismatch, the behavior of the virtual machine
5982 is undefined.
5983 </note>
5984 <result name="VBOX_E_INVALID_VM_STATE">
5985 Virtual machine state neither PoweredOff nor Aborted.
5986 </result>
5987 </desc>
5988 <param name="savedStateFile" type="wstring" dir="in">
5989 <desc>Path to the saved state file to adopt.</desc>
5990 </param>
5991 </method>
5992
5993 <method name="discardSavedState">
5994 <desc>
5995 Discards (deletes) the saved state of the virtual machine
5996 previously created by <link to="#saveState"/>. Next time the
5997 machine is powered up, a clean boot will occur.
5998 <note>
5999 This operation is equivalent to resetting or powering off
6000 the machine without doing a proper shutdown in the guest OS.
6001 </note>
6002 <result name="VBOX_E_INVALID_VM_STATE">
6003 Virtual machine not in state Saved.
6004 </result>
6005 </desc>
6006 </method>
6007
6008 <method name="getDeviceActivity">
6009 <desc>
6010 Gets the current activity type of a given device or device group.
6011 <result name="E_INVALIDARG">
6012 Invalid device type.
6013 </result>
6014 </desc>
6015 <param name="type" type="DeviceType" dir="in"/>
6016 <param name="activity" type="DeviceActivity" dir="return"/>
6017 </method>
6018
6019 <method name="attachUSBDevice">
6020 <desc>
6021 Attaches a host USB device with the given UUID to the
6022 USB controller of the virtual machine.
6023
6024 The device needs to be in one of the following states:
6025 <link to="USBDeviceState_Busy"/>,
6026 <link to="USBDeviceState_Available"/> or
6027 <link to="USBDeviceState_Held"/>,
6028 otherwise an error is immediately returned.
6029
6030 When the device state is
6031 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6032 be returned if the host computer refuses to release it for some reason.
6033
6034 <see>IUSBController::deviceFilters, USBDeviceState</see>
6035 <result name="VBOX_E_INVALID_VM_STATE">
6036 Virtual machine state neither Running nor Paused.
6037 </result>
6038 <result name="VBOX_E_PDM_ERROR">
6039 Virtual machine does not have a USB controller.
6040 </result>
6041 </desc>
6042 <param name="id" type="uuid" dir="in">
6043 <desc>UUID of the host USB device to attach.</desc>
6044 </param>
6045 </method>
6046
6047 <method name="detachUSBDevice">
6048 <desc>
6049 Detaches an USB device with the given UUID from the USB controller
6050 of the virtual machine.
6051
6052 After this method succeeds, the VirtualBox server re-initiates
6053 all USB filters as if the device were just physically attached
6054 to the host, but filters of this machine are ignored to avoid
6055 a possible automatic re-attachment.
6056
6057 <see>IUSBController::deviceFilters, USBDeviceState</see>
6058
6059 <result name="VBOX_E_PDM_ERROR">
6060 Virtual machine does not have a USB controller.
6061 </result>
6062 <result name="E_INVALIDARG">
6063 USB device not attached to this virtual machine.
6064 </result>
6065 </desc>
6066 <param name="id" type="uuid" dir="in">
6067 <desc>UUID of the USB device to detach.</desc>
6068 </param>
6069 <param name="device" type="IUSBDevice" dir="return">
6070 <desc>Detached USB device.</desc>
6071 </param>
6072 </method>
6073
6074 <method name="findUSBDeviceByAddress">
6075 <desc>
6076 Searches for a USB device with the given host address.
6077
6078 <result name="VBOX_E_OBJECT_NOT_FOUND">
6079 Given @c name does not correspond to any USB device.
6080 </result>
6081
6082 <see>IUSBDevice::address</see>
6083 </desc>
6084 <param name="name" type="wstring" dir="in">
6085 <desc>
6086 Address of the USB device (as assigned by the host) to
6087 search for.
6088 </desc>
6089 </param>
6090 <param name="device" type="IUSBDevice" dir="return">
6091 <desc>Found USB device object.</desc>
6092 </param>
6093 </method>
6094
6095 <method name="findUSBDeviceById">
6096 <desc>
6097 Searches for a USB device with the given UUID.
6098
6099 <result name="VBOX_E_OBJECT_NOT_FOUND">
6100 Given @c id does not correspond to any USB device.
6101 </result>
6102
6103 <see>IUSBDevice::id</see>
6104 </desc>
6105 <param name="id" type="uuid" dir="in">
6106 <desc>UUID of the USB device to search for.</desc>
6107 </param>
6108 <param name="device" type="IUSBDevice" dir="return">
6109 <desc>Found USB device object.</desc>
6110 </param>
6111 </method>
6112
6113 <method name="createSharedFolder">
6114 <desc>
6115 Creates a transient new shared folder by associating the given logical
6116 name with the given host path, adds it to the collection of shared
6117 folders and starts sharing it. Refer to the description of
6118 <link to="ISharedFolder"/> to read more about logical names.
6119
6120 <result name="VBOX_E_INVALID_VM_STATE">
6121 Virtual machine in Saved state or currently changing state.
6122 </result>
6123 <result name="VBOX_E_FILE_ERROR">
6124 Shared folder already exists or not accessible.
6125 </result>
6126 </desc>
6127 <param name="name" type="wstring" dir="in">
6128 <desc>Unique logical name of the shared folder.</desc>
6129 </param>
6130 <param name="hostPath" type="wstring" dir="in">
6131 <desc>Full path to the shared folder in the host file system.</desc>
6132 </param>
6133 <param name="writable" type="boolean" dir="in">
6134 <desc>Whether the share is writable or readonly</desc>
6135 </param>
6136 </method>
6137
6138 <method name="removeSharedFolder">
6139 <desc>
6140 Removes a transient shared folder with the given name previously
6141 created by <link to="#createSharedFolder"/> from the collection of
6142 shared folders and stops sharing it.
6143 <result name="VBOX_E_INVALID_VM_STATE">
6144 Virtual machine in Saved state or currently changing state.
6145 </result>
6146 <result name="VBOX_E_FILE_ERROR">
6147 Shared folder does not exists.
6148 </result>
6149 </desc>
6150 <param name="name" type="wstring" dir="in">
6151 <desc>Logical name of the shared folder to remove.</desc>
6152 </param>
6153 </method>
6154
6155 <method name="takeSnapshot">
6156 <desc>
6157 Saves the current execution state and all settings of the
6158 machine and creates differencing images for all
6159 normal (non-independent) hard disks.
6160
6161 This method can be called for a PoweredOff, Saved, Running or
6162 Paused virtual machine. When the machine is PoweredOff, an
6163 offline <link to="ISnapshot">snapshot</link> is created,
6164 in all other cases -- an online snapshot.
6165
6166 The taken snapshot is always based on the
6167 <link to="IMachine::currentSnapshot">current
6168 snapshot</link> of the associated virtual machine and becomes
6169 a new current snapshot.
6170
6171 <note>
6172 This method implicitly calls <link to="IMachine::saveSettings"/> to
6173 save all current machine settings before taking an offline snapshot.
6174 </note>
6175
6176 <see>ISnapshot, <link to="#saveState"/></see>
6177 <result name="VBOX_E_INVALID_VM_STATE">
6178 Virtual machine currently changing state.
6179 </result>
6180 </desc>
6181 <param name="name" type="wstring" dir="in">
6182 <desc>Short name for the snapshot.</desc>
6183 </param>
6184 <param name="description" type="wstring" dir="in">
6185 <desc>Optional description of the snapshot.</desc>
6186 </param>
6187 <param name="progress" type="IProgress" dir="return">
6188 <desc>Progress object to track the operation completion.</desc>
6189 </param>
6190 </method>
6191
6192 <method name="discardSnapshot">
6193 <desc>
6194
6195 Starts discarding the specified snapshot. The execution state
6196 and settings of the associated machine stored in the snapshot
6197 will be deleted. The contents of all differencing hard disks of
6198 this snapshot will be merged with the contents of their
6199 dependent child hard disks to keep the, disks valid (in other
6200 words, all changes represented by hard disks being discarded
6201 will be propagated to their child hard disks). After that, this
6202 snapshot's differencing hard disks will be deleted. The parent
6203 of this snapshot will become a new parent for all its child
6204 snapshots.
6205
6206 If the discarded snapshot is the current one, its parent
6207 snapshot will become a new current snapshot. The current machine
6208 state is not directly affected in this case, except that
6209 currently attached differencing hard disks based on hard disks
6210 of the discarded snapshot will be also merged as described
6211 above.
6212
6213 If the discarded snapshot is the first one (the root snapshot)
6214 and it has exactly one child snapshot, this child snapshot will
6215 become the first snapshot after discarding. If there are no
6216 children at all (i.e. the first snapshot is the only snapshot of
6217 the machine), both the current and the first snapshot of the
6218 machine will be set to null. In all other cases, the first
6219 snapshot cannot be discarded.
6220
6221 You cannot discard the snapshot if it
6222 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6223 hard disks that have differencing hard disks based on them. Snapshots of
6224 such kind can be discarded only when every normal hard disk has either
6225 no children at all or exactly one child. In the former case, the normal
6226 hard disk simply becomes unused (i.e. not attached to any VM). In the
6227 latter case, it receives all the changes stored in the child hard disk,
6228 and then it replaces the child hard disk in the configuration of the
6229 corresponding snapshot or machine.
6230
6231 Also, you cannot discard the snapshot if it stores hard disks
6232 (of any type) having differencing child hard disks that belong
6233 to other machines. Such snapshots can be only discarded after
6234 you discard all snapshots of other machines containing "foreign"
6235 child disks, or detach these "foreign" child disks from machines
6236 they are attached to.
6237
6238 One particular example of the snapshot storing normal hard disks
6239 is the first snapshot of a virtual machine that had normal hard
6240 disks attached when taking the snapshot. Be careful when
6241 discarding such snapshots because this implicitly commits
6242 changes (made since the snapshot being discarded has been taken)
6243 to normal hard disks (as described above), which may be not what
6244 you want.
6245
6246 The virtual machine is put to
6247 the <link to="MachineState_Discarding">Discarding</link> state until
6248 the discard operation is completed.
6249
6250 <note>
6251 The machine must not be running, otherwise the operation
6252 will fail.
6253 </note>
6254
6255 <note>
6256 Child hard disks of all normal hard disks of the discarded snapshot
6257 must be accessible (see <link to="IMedium::state"/>) for this
6258 operation to succeed. In particular, this means that all virtual
6259 machines, whose hard disks are directly or indirectly based on the
6260 hard disks of discarded snapshot, must be powered off.
6261 </note>
6262 <note>
6263 Merging hard disk contents can be very time and disk space
6264 consuming, if these disks are big in size and have many
6265 children. However, if the snapshot being discarded is the last
6266 (head) snapshot on the branch, the operation will be rather
6267 quick.
6268 </note>
6269 <note>
6270 Note that discarding the current snapshot
6271 will implicitly call <link to="IMachine::saveSettings"/> to
6272 make all current machine settings permanent.
6273 </note>
6274 <result name="VBOX_E_INVALID_VM_STATE">
6275 Virtual machine is running.
6276 </result>
6277 </desc>
6278 <param name="id" type="uuid" dir="in">
6279 <desc>UUID of the snapshot to discard.</desc>
6280 </param>
6281 <param name="progress" type="IProgress" dir="return">
6282 <desc>Progress object to track the operation completion.</desc>
6283 </param>
6284 </method>
6285
6286 <method name="discardCurrentState">
6287 <desc>
6288 This operation is similar to <link to="#discardSnapshot"/> but
6289 affects the current machine state. This means that the state stored in
6290 the current snapshot will become a new current state, and all current
6291 settings of the machine and changes stored in differencing hard disks
6292 will be lost.
6293
6294 After this operation is successfully completed, new empty differencing
6295 hard disks are created for all normal hard disks of the machine.
6296
6297 If the current snapshot of the machine is an online snapshot, the
6298 machine will go to the <link to="MachineState_Saved"> saved
6299 state</link>, so that the next time it is powered on, the execution
6300 state will be restored from the current snapshot.
6301
6302 <note>
6303 The machine must not be running, otherwise the operation will fail.
6304 </note>
6305
6306 <note>
6307 If the machine state is <link to="MachineState_Saved">Saved</link>
6308 prior to this operation, the saved state file will be implicitly
6309 discarded (as if <link to="IConsole::discardSavedState"/> were
6310 called).
6311 </note>
6312
6313 <result name="VBOX_E_INVALID_VM_STATE">
6314 Virtual machine is running.
6315 </result>
6316 </desc>
6317 <param name="progress" type="IProgress" dir="return">
6318 <desc>Progress object to track the operation completion.</desc>
6319 </param>
6320 </method>
6321
6322 <method name="discardCurrentSnapshotAndState">
6323 <desc>
6324
6325 This method is equivalent to
6326 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6327 (currentSnapshot.id(), progress) followed by
6328 <link to="#discardCurrentState"/>.
6329
6330 As a result, the machine will be fully restored from the
6331 snapshot preceding the current snapshot, while both the current
6332 snapshot and the current machine state will be discarded.
6333
6334 If the current snapshot is the first snapshot of the machine (i.e. it
6335 has the only snapshot), the current machine state will be
6336 discarded <b>before</b> discarding the snapshot. In other words, the
6337 machine will be restored from its last snapshot, before discarding
6338 it. This differs from performing a single
6339 <link to="#discardSnapshot"/> call (note that no
6340 <link to="#discardCurrentState"/> will be possible after it)
6341 to the effect that the latter will preserve the current state instead of
6342 discarding it.
6343
6344 Unless explicitly mentioned otherwise, all remarks and
6345 limitations of the above two methods also apply to this method.
6346
6347 <note>
6348 The machine must not be running, otherwise the operation
6349 will fail.
6350 </note>
6351
6352 <note>
6353 If the machine state is <link to="MachineState_Saved">Saved</link>
6354 prior to this operation, the saved state file will be implicitly
6355 discarded (as if <link to="#discardSavedState"/> were
6356 called).
6357 </note>
6358
6359 <note>
6360 This method is more efficient than calling both of the above
6361 methods separately: it requires less IPC calls and provides
6362 a single progress object.
6363 </note>
6364
6365 <result name="VBOX_E_INVALID_VM_STATE">
6366 Virtual machine is running.
6367 </result>
6368 </desc>
6369 <param name="progress" type="IProgress" dir="return">
6370 <desc>Progress object to track the operation completion.</desc>
6371 </param>
6372 </method>
6373
6374 <method name="registerCallback">
6375 <desc>
6376 Registers a new console callback on this instance. The methods of the
6377 callback interface will be called by this instance when the appropriate
6378 event occurs.
6379 </desc>
6380 <param name="callback" type="IConsoleCallback" dir="in"/>
6381 </method>
6382
6383 <method name="unregisterCallback">
6384 <desc>
6385 Unregisters the console callback previously registered using
6386 <link to="#registerCallback"/>.
6387 <result name="E_INVALIDARG">
6388 Given @a callback handler is not registered.
6389 </result>
6390 </desc>
6391 <param name="callback" type="IConsoleCallback" dir="in"/>
6392 </method>
6393 </interface>
6394
6395 <!--
6396 // IHost
6397 /////////////////////////////////////////////////////////////////////////
6398 -->
6399
6400 <interface
6401 name="IHostDVDDrive" extends="$unknown"
6402 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6403 wsmap="managed"
6404 >
6405 <desc>
6406 The IHostDVDDrive interface represents the physical CD/DVD drive
6407 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6408 </desc>
6409
6410 <attribute name="name" type="wstring" readonly="yes">
6411 <desc>
6412 Returns the platform-specific device identifier.
6413 On DOS-like platforms, it is a drive name (e.g. R:).
6414 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6415 </desc>
6416 </attribute>
6417 <attribute name="description" type="wstring" readonly="yes">
6418 <desc>
6419 Returns a human readable description for the drive. This
6420 description usually contains the product and vendor name. A
6421 @c null string is returned if the description is not available.
6422 </desc>
6423 </attribute>
6424 <attribute name="udi" type="wstring" readonly="yes">
6425 <desc>
6426 Returns the unique device identifier for the drive. This
6427 attribute is reserved for future use instead of
6428 <link to="#name"/>. Currently it is not used and may return
6429 @c null on some platforms.
6430 </desc>
6431 </attribute>
6432
6433 </interface>
6434
6435 <interface
6436 name="IHostFloppyDrive" extends="$unknown"
6437 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6438 wsmap="managed"
6439 >
6440 <desc>
6441 The IHostFloppyDrive interface represents the physical floppy drive
6442 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6443 </desc>
6444 <attribute name="name" type="wstring" readonly="yes">
6445 <desc>
6446 Returns the platform-specific device identifier.
6447 On DOS-like platforms, it is a drive name (e.g. A:).
6448 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6449 </desc>
6450 </attribute>
6451 <attribute name="description" type="wstring" readonly="yes">
6452 <desc>
6453 Returns a human readable description for the drive. This
6454 description usually contains the product and vendor name. A
6455 @c null string is returned if the description is not available.
6456 </desc>
6457 </attribute>
6458 <attribute name="udi" type="wstring" readonly="yes">
6459 <desc>
6460 Returns the unique device identifier for the drive. This
6461 attribute is reserved for future use instead of
6462 <link to="#name"/>. Currently it is not used and may return
6463 @c null on some platforms.
6464 </desc>
6465 </attribute>
6466 </interface>
6467
6468 <enum
6469 name="HostNetworkInterfaceMediumType"
6470 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6471 >
6472 <desc>
6473 Type of encapsulation. Ethernet encapsulation includes both wired and
6474 wireless Ethernet connections.
6475 <see>IHostNetworkInterface</see>
6476 </desc>
6477
6478 <const name="Unknown" value="0">
6479 <desc>
6480 The type of interface cannot be determined.
6481 </desc>
6482 </const>
6483 <const name="Ethernet" value="1">
6484 <desc>
6485 Ethernet frame encapsulation.
6486 </desc>
6487 </const>
6488 <const name="PPP" value="2">
6489 <desc>
6490 Point-to-point protocol encapsulation.
6491 </desc>
6492 </const>
6493 <const name="SLIP" value="3">
6494 <desc>
6495 Serial line IP encapsulation.
6496 </desc>
6497 </const>
6498 </enum>
6499
6500 <enum
6501 name="HostNetworkInterfaceStatus"
6502 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6503 >
6504 <desc>
6505 Current status of the interface.
6506 <see>IHostNetworkInterface</see>
6507 </desc>
6508
6509 <const name="Unknown" value="0">
6510 <desc>
6511 The state of interface cannot be determined.
6512 </desc>
6513 </const>
6514 <const name="Up" value="1">
6515 <desc>
6516 The interface is fully operational.
6517 </desc>
6518 </const>
6519 <const name="Down" value="2">
6520 <desc>
6521 The interface is not functioning.
6522 </desc>
6523 </const>
6524 </enum>
6525
6526 <enum
6527 name="HostNetworkInterfaceType"
6528 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6529 >
6530 <desc>
6531 Network interface type.
6532 </desc>
6533 <const name="Bridged" value="1"/>
6534 <const name="HostOnly" value="2"/>
6535 </enum>
6536
6537 <interface
6538 name="IHostNetworkInterface" extends="$unknown"
6539 uuid="bcc99385-71ad-4887-90fc-15a3f2cad0a5"
6540 wsmap="managed"
6541 >
6542 <desc>
6543 Reprents one of host's network interfaces. IP V6 address and network
6544 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6545 separated by colons.
6546 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6547 </desc>
6548 <attribute name="name" type="wstring" readonly="yes">
6549 <desc>Returns the host network interface name.</desc>
6550 </attribute>
6551
6552 <attribute name="id" type="uuid" readonly="yes">
6553 <desc>Returns the interface UUID.</desc>
6554 </attribute>
6555
6556 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6557 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6558 </attribute>
6559
6560 <attribute name="IPAddress" type="wstring" readonly="yes">
6561 <desc>Returns the IP V4 address of the interface.</desc>
6562 </attribute>
6563
6564 <attribute name="networkMask" type="wstring" readonly="yes">
6565 <desc>Returns the network mask of the interface.</desc>
6566 </attribute>
6567
6568 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6569 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6570 </attribute>
6571
6572 <attribute name="IPV6Address" type="wstring" readonly="yes">
6573 <desc>Returns the IP V6 address of the interface.</desc>
6574 </attribute>
6575
6576 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6577 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6578 </attribute>
6579
6580 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6581 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6582 </attribute>
6583
6584 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6585 <desc>Type of protocol encapsulation used.</desc>
6586 </attribute>
6587
6588 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6589 <desc>Status of the interface.</desc>
6590 </attribute>
6591
6592 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6593 <desc>specifies the host interface type.</desc>
6594 </attribute>
6595
6596 <method name="enableStaticIpConfig">
6597 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6598 <param name="IPAddress" type="wstring" dir="in">
6599 <desc>
6600 IP address.
6601 </desc>
6602 </param>
6603 <param name="networkMask" type="wstring" dir="in">
6604 <desc>
6605 network mask.
6606 </desc>
6607 </param>
6608 </method>
6609
6610 <method name="enableStaticIpConfigV6">
6611 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6612 <param name="IPV6Address" type="wstring" dir="in">
6613 <desc>
6614 IP address.
6615 </desc>
6616 </param>
6617 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6618 <desc>
6619 network mask.
6620 </desc>
6621 </param>
6622 </method>
6623
6624 <method name="enableDynamicIpConfig">
6625 <desc>enables the dynamic IP configuration.</desc>
6626 </method>
6627
6628 <method name="dhcpRediscover">
6629 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6630 </method>
6631
6632 </interface>
6633
6634 <interface
6635 name="IHost" extends="$unknown"
6636 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6637 wsmap="managed"
6638 >
6639 <desc>
6640 The IHost interface represents the physical machine that this VirtualBox
6641 installation runs on.
6642
6643 An object implementing this interface is returned by the
6644 <link to="IVirtualBox::host" /> attribute. This interface contains
6645 read-only information about the host's physical hardware (such as what
6646 processors and disks are available, what the host operating system is,
6647 and so on) and also allows for manipulating some of the host's hardware,
6648 such as global USB device filters and host interface networking.
6649
6650 </desc>
6651 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6652 <desc>List of DVD drives available on the host.</desc>
6653 </attribute>
6654
6655 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6656 <desc>List of floppy drives available on the host.</desc>
6657 </attribute>
6658
6659 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6660 <desc>
6661 List of USB devices currently attached to the host.
6662 Once a new device is physically attached to the host computer,
6663 it appears in this list and remains there until detached.
6664
6665 <note>
6666 This method may set a @ref com_warnings "warning result code".
6667 </note>
6668 <note>
6669 If USB functionality is not available in the given edition of
6670 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6671 </note>
6672 </desc>
6673 </attribute>
6674
6675 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6676 <desc>
6677 List of USB device filters in action.
6678 When a new device is physically attached to the host computer,
6679 filters from this list are applied to it (in order they are stored
6680 in the list). The first matched filter will determine the
6681 <link to="IHostUSBDeviceFilter::action">action</link>
6682 performed on the device.
6683
6684 Unless the device is ignored by these filters, filters of all
6685 currently running virtual machines
6686 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6687
6688 <note>
6689 This method may set a @ref com_warnings "warning result code".
6690 </note>
6691 <note>
6692 If USB functionality is not available in the given edition of
6693 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6694 </note>
6695
6696 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6697 </desc>
6698 </attribute>
6699
6700 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6701 <desc>List of host network interfaces currently defined on the host.</desc>
6702 </attribute>
6703
6704 <attribute name="processorCount" type="unsigned long" readonly="yes">
6705 <desc>Number of (logical) CPUs installed in the host system.</desc>
6706 </attribute>
6707
6708 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6709 <desc>Number of (logical) CPUs online in the host system.</desc>
6710 </attribute>
6711
6712 <method name="getProcessorSpeed">
6713 <desc>Query the (approximate) maximum speed of a specified host CPU in
6714 Megahertz.
6715 </desc>
6716 <param name="cpuId" type="unsigned long" dir="in">
6717 <desc>
6718 Identifier of the CPU.
6719 </desc>
6720 </param>
6721 <param name="speed" type="unsigned long" dir="return">
6722 <desc>
6723 Speed value. 0 is returned if value is not known or @a cpuId is
6724 invalid.
6725 </desc>
6726 </param>
6727 </method>
6728
6729 <method name="getProcessorFeature">
6730 <desc>Query whether a CPU feature is supported or not.</desc>
6731 <param name="feature" type="ProcessorFeature" dir="in">
6732 <desc>
6733 CPU Feature identifier.
6734 </desc>
6735 </param>
6736 <param name="supported" type="boolean" dir="return">
6737 <desc>
6738 Feature is supported or not.
6739 </desc>
6740 </param>
6741 </method>
6742
6743 <method name="getProcessorDescription">
6744 <desc>Query the model string of a specified host CPU.
6745 <note>
6746 This function is not implemented in the current version of the
6747 product.
6748 </note>
6749 </desc>
6750 <param name="cpuId" type="unsigned long" dir="in">
6751 <desc>
6752 Identifier of the CPU.
6753 </desc>
6754 </param>
6755 <param name="description" type="wstring" dir="return">
6756 <desc>
6757 Model string. A NULL string is returned if value is not known or
6758 @a cpuId is invalid.
6759 </desc>
6760 </param>
6761 </method>
6762
6763 <attribute name="memorySize" type="unsigned long" readonly="yes">
6764 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6765 </attribute>
6766
6767 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6768 <desc>Available system memory in the host system.</desc>
6769 </attribute>
6770
6771 <attribute name="operatingSystem" type="wstring" readonly="yes">
6772 <desc>Name of the host system's operating system.</desc>
6773 </attribute>
6774
6775 <attribute name="OSVersion" type="wstring" readonly="yes">
6776 <desc>Host operating system's version string.</desc>
6777 </attribute>
6778
6779 <attribute name="UTCTime" type="long long" readonly="yes">
6780 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6781 </attribute>
6782
6783<if target="midl">
6784 <method name="createHostOnlyNetworkInterface">
6785 <desc>
6786 Creates a new adapter for Host Only Networking.
6787 <result name="E_INVALIDARG">
6788 Host network interface @a name already exists.
6789 </result>
6790 </desc>
6791 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6792 <desc>
6793 Created host interface object.
6794 </desc>
6795 </param>
6796 <param name="progress" type="IProgress" dir="return">
6797 <desc>
6798 Progress object to track the operation completion.
6799 </desc>
6800 </param>
6801 </method>
6802 <method name="removeHostOnlyNetworkInterface">
6803 <desc>
6804 Removes the given Host Only Networking interface.
6805 <result name="VBOX_E_OBJECT_NOT_FOUND">
6806 No host network interface matching @a id found.
6807 </result>
6808 </desc>
6809 <param name="id" type="uuid" dir="in">
6810 <desc>
6811 Adapter GUID.
6812 </desc>
6813 </param>
6814 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6815 <desc>
6816 Removed host interface object.
6817 </desc>
6818 </param>
6819 <param name="progress" type="IProgress" dir="return">
6820 <desc>
6821 Progress object to track the operation completion.
6822 </desc>
6823 </param>
6824 </method>
6825</if>
6826
6827 <method name="createUSBDeviceFilter">
6828 <desc>
6829 Creates a new USB device filter. All attributes except
6830 the filter name are set to <tt>null</tt> (any match),
6831 <i>active</i> is <tt>false</tt> (the filter is not active).
6832
6833 The created filter can be added to the list of filters using
6834 <link to="#insertUSBDeviceFilter"/>.
6835
6836 <see>#USBDeviceFilters</see>
6837 </desc>
6838 <param name="name" type="wstring" dir="in">
6839 <desc>
6840 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
6841 for more info.
6842 </desc>
6843 </param>
6844 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6845 <desc>Created filter object.</desc>
6846 </param>
6847 </method>
6848
6849 <method name="insertUSBDeviceFilter">
6850 <desc>
6851 Inserts the given USB device to the specified position
6852 in the list of filters.
6853
6854 Positions are numbered starting from <tt>0</tt>. If the specified
6855 position is equal to or greater than the number of elements in
6856 the list, the filter is added at the end of the collection.
6857
6858 <note>
6859 Duplicates are not allowed, so an attempt to insert a
6860 filter that is already in the list, will return an
6861 error.
6862 </note>
6863 <note>
6864 This method may set a @ref com_warnings "warning result code".
6865 </note>
6866 <note>
6867 If USB functionality is not available in the given edition of
6868 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6869 </note>
6870
6871 <see>#USBDeviceFilters</see>
6872
6873 <result name="VBOX_E_INVALID_OBJECT_STATE">
6874 USB device filter is not created within this VirtualBox instance.
6875 </result>
6876 <result name="E_INVALIDARG">
6877 USB device filter already in list.
6878 </result>
6879
6880 </desc>
6881 <param name="position" type="unsigned long" dir="in">
6882 <desc>Position to insert the filter to.</desc>
6883 </param>
6884 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6885 <desc>USB device filter to insert.</desc>
6886 </param>
6887 </method>
6888
6889 <method name="removeUSBDeviceFilter">
6890 <desc>
6891 Removes a USB device filter from the specified position in the
6892 list of filters.
6893
6894 Positions are numbered starting from <tt>0</tt>. Specifying a
6895 position equal to or greater than the number of elements in
6896 the list will produce an error.
6897
6898 <note>
6899 This method may set a @ref com_warnings "warning result code".
6900 </note>
6901 <note>
6902 If USB functionality is not available in the given edition of
6903 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6904 </note>
6905
6906 <see>#USBDeviceFilters</see>
6907
6908 <result name="E_INVALIDARG">
6909 USB device filter list empty or invalid @a position.
6910 </result>
6911
6912 </desc>
6913 <param name="position" type="unsigned long" dir="in">
6914 <desc>Position to remove the filter from.</desc>
6915 </param>
6916 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6917 <desc>Removed USB device filter.</desc>
6918 </param>
6919 </method>
6920
6921 <method name="findHostDVDDrive">
6922 <desc>
6923 Searches for a host DVD drive with the given @c name.
6924
6925 <result name="VBOX_E_OBJECT_NOT_FOUND">
6926 Given @c name does not correspond to any host drive.
6927 </result>
6928
6929 </desc>
6930 <param name="name" type="wstring" dir="in">
6931 <desc>Name of the host drive to search for</desc>
6932 </param>
6933 <param name="drive" type="IHostDVDDrive" dir="return">
6934 <desc>Found host drive object</desc>
6935 </param>
6936 </method>
6937
6938 <method name="findHostFloppyDrive">
6939 <desc>
6940 Searches for a host floppy drive with the given @c name.
6941
6942 <result name="VBOX_E_OBJECT_NOT_FOUND">
6943 Given @c name does not correspond to any host floppy drive.
6944 </result>
6945
6946 </desc>
6947 <param name="name" type="wstring" dir="in">
6948 <desc>Name of the host floppy drive to search for</desc>
6949 </param>
6950 <param name="drive" type="IHostFloppyDrive" dir="return">
6951 <desc>Found host floppy drive object</desc>
6952 </param>
6953 </method>
6954
6955 <method name="findHostNetworkInterfaceByName">
6956 <desc>
6957 Searches through all host network interfaces for an interface with
6958 the given @c name.
6959 <note>
6960 The method returns an error if the given @c name does not
6961 correspond to any host network interface.
6962 </note>
6963 </desc>
6964 <param name="name" type="wstring" dir="in">
6965 <desc>Name of the host network interface to search for.</desc>
6966 </param>
6967 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6968 <desc>Found host network interface object.</desc>
6969 </param>
6970 </method>
6971 <method name="findHostNetworkInterfaceById">
6972 <desc>
6973 Searches through all host network interfaces for an interface with
6974 the given GUID.
6975 <note>
6976 The method returns an error if the given GUID does not
6977 correspond to any host network interface.
6978 </note>
6979 </desc>
6980 <param name="id" type="uuid" dir="in">
6981 <desc>GUID of the host network interface to search for.</desc>
6982 </param>
6983 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
6984 <desc>Found host network interface object.</desc>
6985 </param>
6986 </method>
6987 <method name="findHostNetworkInterfacesOfType">
6988 <desc>
6989 Searches through all host network interfaces and returns a list of interfaces of the specified type
6990 </desc>
6991 <param name="type" type="HostNetworkInterfaceType" dir="in">
6992 <desc>type of the host network interfaces to search for.</desc>
6993 </param>
6994 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
6995 <desc>Found host network interface objects.</desc>
6996 </param>
6997 </method>
6998
6999 <method name="findUSBDeviceById">
7000 <desc>
7001 Searches for a USB device with the given UUID.
7002
7003 <result name="VBOX_E_OBJECT_NOT_FOUND">
7004 Given @id does not correspond to any USB device.
7005 </result>
7006
7007 <see>IHostUSBDevice::id</see>
7008 </desc>
7009 <param name="id" type="uuid" dir="in">
7010 <desc>UUID of the USB device to search for.</desc>
7011 </param>
7012 <param name="device" type="IHostUSBDevice" dir="return">
7013 <desc>Found USB device object.</desc>
7014 </param>
7015 </method>
7016
7017 <method name="findUSBDeviceByAddress">
7018 <desc>
7019 Searches for a USB device with the given host address.
7020
7021 <result name="VBOX_E_OBJECT_NOT_FOUND">
7022 Given @c name does not correspond to any USB device.
7023 </result>
7024
7025 <see>IHostUSBDevice::address</see>
7026 </desc>
7027 <param name="name" type="wstring" dir="in">
7028 <desc>
7029 Address of the USB device (as assigned by the host) to
7030 search for.
7031 </desc>
7032 </param>
7033 <param name="device" type="IHostUSBDevice" dir="return">
7034 <desc>Found USB device object.</desc>
7035 </param>
7036 </method>
7037
7038 </interface>
7039
7040 <!--
7041 // ISystemProperties
7042 /////////////////////////////////////////////////////////////////////////
7043 -->
7044
7045 <interface
7046 name="ISystemProperties"
7047 extends="$unknown"
7048 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7049 wsmap="managed"
7050 >
7051 <desc>
7052 The ISystemProperties interface represents global properties of the given
7053 VirtualBox installation.
7054
7055 These properties define limits and default values for various attributes
7056 and parameters. Most of the properties are read-only, but some can be
7057 changed by a user.
7058 </desc>
7059
7060 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7061 <desc>Minimum guest system memory in Megabytes.</desc>
7062 </attribute>
7063
7064 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7065 <desc>Maximum guest system memory in Megabytes.</desc>
7066 </attribute>
7067
7068 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7069 <desc>Minimum guest video memory in Megabytes.</desc>
7070 </attribute>
7071
7072 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7073 <desc>Maximum guest video memory in Megabytes.</desc>
7074 </attribute>
7075
7076 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7077 <desc>Minimum CPU count.</desc>
7078 </attribute>
7079
7080 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7081 <desc>Maximum CPU count.</desc>
7082 </attribute>
7083
7084 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7085 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7086 </attribute>
7087
7088 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7089 <desc>
7090 Number of network adapters associated with every
7091 <link to="IMachine"/> instance.
7092 </desc>
7093 </attribute>
7094
7095 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7096 <desc>
7097 Number of serial ports associated with every
7098 <link to="IMachine"/> instance.
7099 </desc>
7100 </attribute>
7101
7102 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7103 <desc>
7104 Number of parallel ports associated with every
7105 <link to="IMachine"/> instance.
7106 </desc>
7107 </attribute>
7108
7109 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7110 <desc>
7111 Maximum device position in the boot order. This value corresponds
7112 to the total number of devices a machine can boot from, to make it
7113 possible to include all possible devices to the boot list.
7114 <see><link to="IMachine::setBootOrder"/></see>
7115 </desc>
7116 </attribute>
7117
7118 <attribute name="defaultMachineFolder" type="wstring">
7119 <desc>
7120 Full path to the default directory used to create new or open
7121 existing machines when a settings file name contains no
7122 path.
7123
7124 The initial value of this property is
7125 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7126 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7127
7128 <note>
7129 Setting this property to <tt>null</tt> will restore the
7130 initial value.
7131 </note>
7132 <note>
7133 When settings this property, the specified path can be
7134 absolute (full path) or relative
7135 to the <link to="IVirtualBox::homeFolder">
7136 VirtualBox home directory</link>.
7137 When reading this property, a full path is
7138 always returned.
7139 </note>
7140 <note>
7141 The specified path may not exist, it will be created
7142 when necessary.
7143 </note>
7144
7145 <see>
7146 <link to="IVirtualBox::createMachine"/>,
7147 <link to="IVirtualBox::openMachine"/>
7148 </see>
7149 </desc>
7150 </attribute>
7151
7152 <attribute name="defaultHardDiskFolder" type="wstring">
7153 <desc>
7154 Full path to the default directory used to create new or open existing
7155 virtual disks.
7156
7157 This path is used when the storage unit of a hard disk is a regular file
7158 in the host's file system and only a file name that contains no path is
7159 given.
7160
7161 The initial value of this property is
7162 <tt>&lt;</tt>
7163 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7164 <tt>&gt;/HardDisks</tt>.
7165
7166 <note>
7167 Setting this property to <tt>null</tt> will restore the
7168 initial value.
7169 </note>
7170 <note>
7171 When settings this property, the specified path can be relative
7172 to the
7173 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7174 absolute. When reading this property, a full path is
7175 always returned.
7176 </note>
7177 <note>
7178 The specified path may not exist, it will be created
7179 when necessary.
7180 </note>
7181
7182 <see>
7183 IHardDisk,
7184 <link to="IVirtualBox::createHardDisk"/>,
7185 <link to="IVirtualBox::openHardDisk"/>,
7186 <link to="IMedium::location"/>
7187 </see>
7188 </desc>
7189 </attribute>
7190
7191 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7192 <desc>
7193 List of all hard disk storage formats supported by this VirtualBox
7194 installation.
7195
7196 Keep in mind that the hard disk format identifier
7197 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7198 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7199 hard disk format is a case-insensitive string. This means that, for
7200 example, all of the following strings:
7201 <pre>
7202 "VDI"
7203 "vdi"
7204 "VdI"</pre>
7205 refer to the same hard disk format.
7206
7207 Note that the virtual hard disk framework is backend-based, therefore
7208 the list of supported formats depends on what backends are currently
7209 installed.
7210
7211 <see>
7212 <link to="IHardDiskFormat"/>,
7213 </see>
7214 </desc>
7215 </attribute>
7216
7217 <attribute name="defaultHardDiskFormat" type="wstring">
7218 <desc>
7219 Identifier of the default hard disk format used by VirtualBox.
7220
7221 The hard disk format set by this attribute is used by VirtualBox
7222 when the hard disk format was not specified explicitly. One example is
7223 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7224 format argument. A more complex example is implicit creation of
7225 differencing hard disks when taking a snapshot of a virtual machine:
7226 this operation will try to use a format of the parent hard disk first
7227 and if this format does not support differencing hard disks the default
7228 format specified by this argument will be used.
7229
7230 The list of supported hard disk formats may be obtained by the
7231 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7232 format must have a capability to create differencing hard disks;
7233 otherwise opeartions that create hard disks implicitly may fail
7234 unexpectedly.
7235
7236 The initial value of this property is <tt>VDI</tt> in the current
7237 version of the VirtualBox product, but may change in the future.
7238
7239 <note>
7240 Setting this property to <tt>null</tt> will restore the
7241 initial value.
7242 </note>
7243
7244 <see>
7245 <link to="#hardDiskFormats"/>,
7246 <link to="IHardDiskFormat::id"/>,
7247 <link to="IVirtualBox::createHardDisk"/>
7248 </see>
7249 </desc>
7250 </attribute>
7251
7252 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7253 <desc>
7254 Library that provides authentication for VRDP clients. The library
7255 is used if a virtual machine's authentication type is set to "external"
7256 in the VM RemoteDisplay configuration.
7257
7258 The system library extension (".DLL" or ".so") must be omitted.
7259 A full path can be specified; if not, then the library must reside on the
7260 system's default library path.
7261
7262 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7263 of that name in one of the default VirtualBox library directories.
7264
7265 For details about VirtualBox authentication libraries and how to implement
7266 them, please refer to the VirtualBox manual.
7267
7268 <note>
7269 Setting this property to <tt>null</tt> will restore the
7270 initial value.
7271 </note>
7272 </desc>
7273 </attribute>
7274
7275 <attribute name="webServiceAuthLibrary" type="wstring">
7276 <desc>
7277 Library that provides authentication for webservice clients. The library
7278 is used if a virtual machine's authentication type is set to "external"
7279 in the VM RemoteDisplay configuration and will be called from
7280 within the <link to="IWebsessionManager::logon" /> implementation.
7281
7282 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7283 there is no per-VM setting for this, as the webservice is a global
7284 resource (if it is running). Only for this setting (for the webservice),
7285 setting this value to a literal "null" string disables authentication,
7286 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7287 no matter what user name and password are supplied.
7288
7289 The initial value of this property is <tt>VRDPAuth</tt>,
7290 meaning that the webservice will use the same authentication
7291 library that is used by default for VBoxVRDP (again, see
7292 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7293 The format and calling convention of authentication libraries
7294 is the same for the webservice as it is for VBoxVRDP.
7295
7296 </desc>
7297 </attribute>
7298
7299 <attribute name="HWVirtExEnabled" type="boolean">
7300 <desc>
7301 This specifies the default value for hardware virtualization
7302 extensions. If enabled, virtual machines will make use of
7303 hardware virtualization extensions such as Intel VT-x and
7304 AMD-V by default. This value can be overridden by each VM
7305 using their <link to="IMachine::HWVirtExEnabled" /> property.
7306 </desc>
7307 </attribute>
7308
7309 <attribute name="LogHistoryCount" type="unsigned long">
7310 <desc>
7311 This value specifies how many old release log files are kept.
7312 </desc>
7313 </attribute>
7314 </interface>
7315
7316 <!--
7317 // IGuest
7318 /////////////////////////////////////////////////////////////////////////
7319 -->
7320
7321 <interface
7322 name="IGuestOSType" extends="$unknown"
7323 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7324 wsmap="struct"
7325 >
7326 <desc>
7327 </desc>
7328
7329 <attribute name="familyId" type="wstring" readonly="yes">
7330 <desc>Guest OS family identifier string.</desc>
7331 </attribute>
7332
7333 <attribute name="familyDescription" type="wstring" readonly="yes">
7334 <desc>Human readable description of the guest OS family.</desc>
7335 </attribute>
7336
7337 <attribute name="id" type="wstring" readonly="yes">
7338 <desc>Guest OS identifier string.</desc>
7339 </attribute>
7340
7341 <attribute name="description" type="wstring" readonly="yes">
7342 <desc>Human readable description of the guest OS.</desc>
7343 </attribute>
7344
7345 <attribute name="is64Bit" type="boolean" readonly="yes">
7346 <desc>Returns @c true if the given OS is 64-bit</desc>
7347 </attribute>
7348
7349 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7350 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7351 </attribute>
7352
7353 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7354 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7355 </attribute>
7356
7357 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7358 <desc>Recommended RAM size in Megabytes.</desc>
7359 </attribute>
7360
7361 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7362 <desc>Recommended video RAM size in Megabytes.</desc>
7363 </attribute>
7364
7365 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7366 <desc>Recommended hard disk size in Megabytes.</desc>
7367 </attribute>
7368
7369 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7370 <desc>Returns recommended network adapter for this OS type.</desc>
7371 </attribute>
7372 </interface>
7373
7374 <interface
7375 name="IGuest" extends="$unknown"
7376 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7377
7378 wsmap="suppress"
7379 >
7380 <desc>
7381 The IGuest interface represents information about the operating system
7382 running inside the virtual machine. Used in
7383 <link to="IConsole::guest"/>.
7384
7385 IGuest provides information about the guest operating system, whether
7386 Guest Additions are installed and other OS-specific virtual machine
7387 properties.
7388 </desc>
7389
7390 <attribute name="OSTypeId" type="wstring" readonly="yes">
7391 <desc>
7392 Identifier of the Guest OS type as reported by the Guest
7393 Additions.
7394 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7395 an IGuestOSType object representing details about the given
7396 Guest OS type.
7397 <note>
7398 If Guest Additions are not installed, this value will be
7399 the same as <link to="IMachine::OSTypeId"/>.
7400 </note>
7401 </desc>
7402 </attribute>
7403
7404 <attribute name="additionsActive" type="boolean" readonly="yes">
7405 <desc>
7406 Flag whether the Guest Additions are installed and active
7407 in which case their version will be returned by the
7408 <link to="#additionsVersion"/> property.
7409 </desc>
7410 </attribute>
7411
7412 <attribute name="additionsVersion" type="wstring" readonly="yes">
7413 <desc>
7414 Version of the Guest Additions (3 decimal numbers separated
7415 by dots) or empty when the Additions are not installed. The
7416 Additions may also report a version but yet not be active as
7417 the version might be refused by VirtualBox (incompatible) or
7418 other failures occurred.
7419 </desc>
7420 </attribute>
7421
7422 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7423 <desc>
7424 Flag whether seamless guest display rendering (seamless desktop
7425 integration) is supported.
7426 </desc>
7427 </attribute>
7428
7429 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7430 <desc>
7431 Flag whether the guest is in graphics mode. If it is not, then
7432 seamless rendering will not work, resize hints are not immediately
7433 acted on and guest display resizes are probably not initiated by
7434 the guest additions.
7435 </desc>
7436 </attribute>
7437
7438 <attribute name="memoryBalloonSize" type="unsigned long">
7439 <desc>Guest system memory balloon size in megabytes.</desc>
7440 </attribute>
7441
7442 <attribute name="statisticsUpdateInterval" type="unsigned long">
7443 <desc>Interval to update guest statistics in seconds.</desc>
7444 </attribute>
7445
7446 <method name="setCredentials">
7447 <desc>
7448 Store login credentials that can be queried by guest operating
7449 systems with Additions installed. The credentials are transient
7450 to the session and the guest may also choose to erase them. Note
7451 that the caller cannot determine whether the guest operating system
7452 has queried or made use of the credentials.
7453
7454 <result name="VBOX_E_VM_ERROR">
7455 VMM device is not available.
7456 </result>
7457
7458 </desc>
7459 <param name="userName" type="wstring" dir="in">
7460 <desc>User name string, can be empty</desc>
7461 </param>
7462 <param name="password" type="wstring" dir="in">
7463 <desc>Password string, can be empty</desc>
7464 </param>
7465 <param name="domain" type="wstring" dir="in">
7466 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7467 </param>
7468 <param name="allowInteractiveLogon" type="boolean" dir="in">
7469 <desc>
7470 Flag whether the guest should alternatively allow the user to
7471 interactively specify different credentials. This flag might
7472 not be supported by all versions of the Additions.
7473 </desc>
7474 </param>
7475 </method>
7476
7477 <method name="getStatistic">
7478 <desc>
7479 Query specified guest statistics as reported by the VirtualBox Additions.
7480 </desc>
7481 <param name="cpuId" type="unsigned long" dir="in">
7482 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7483 </param>
7484 <param name="statistic" type="GuestStatisticType" dir="in">
7485 <desc>Statistic type.</desc>
7486 </param>
7487 <param name="statVal" type="unsigned long" dir="out">
7488 <desc>Statistics value</desc>
7489 </param>
7490 </method>
7491
7492 </interface>
7493
7494
7495 <!--
7496 // IProgress
7497 /////////////////////////////////////////////////////////////////////////
7498 -->
7499
7500 <interface
7501 name="IProgress" extends="$unknown"
7502 uuid="d3aa5417-6103-41fc-9e54-01ee1d08f42f"
7503 wsmap="managed"
7504 >
7505 <desc>
7506 The IProgress interface represents a task progress object that allows
7507 to wait for the completion of some asynchronous task.
7508
7509 The task consists of one or more operations that run sequentially,
7510 one by one. There is an individual percentage of completion of the
7511 current operation and the percentage of completion of the task as a
7512 whole. Similarly, you can wait for the completion of a particular
7513 operation or for the completion of the whole task.
7514
7515 Every operation is identified by a number (starting from 0)
7516 and has a separate description.
7517 </desc>
7518
7519 <attribute name="id" type="uuid" readonly="yes">
7520 <desc>ID of the task.</desc>
7521 </attribute>
7522
7523 <attribute name="description" type="wstring" readonly="yes">
7524 <desc>Description of the task.</desc>
7525 </attribute>
7526
7527 <attribute name="initiator" type="$unknown" readonly="yes">
7528 <desc>Initiator of the task.</desc>
7529 </attribute>
7530
7531 <attribute name="cancelable" type="boolean" readonly="yes">
7532 <desc>Whether the task can be interrupted.</desc>
7533 </attribute>
7534
7535 <attribute name="percent" type="long" readonly="yes">
7536 <desc>
7537 Current task progress value in percent.
7538 This value depends on how many operations are already complete.
7539 </desc>
7540 </attribute>
7541
7542 <attribute name="completed" type="boolean" readonly="yes">
7543 <desc>Whether the task has been completed.</desc>
7544 </attribute>
7545
7546 <attribute name="canceled" type="boolean" readonly="yes">
7547 <desc>Whether the task has been canceled.</desc>
7548 </attribute>
7549
7550 <attribute name="resultCode" type="result" readonly="yes">
7551 <desc>
7552 Result code of the progress task.
7553 Valid only if <link to="#completed"/> is true.
7554 </desc>
7555 </attribute>
7556
7557 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7558 <desc>
7559 Extended information about the unsuccessful result of the
7560 progress operation. May be NULL when no extended information
7561 is available.
7562 Valid only if <link to="#completed"/> is true and
7563 <link to="#resultCode"/> indicates a failure.
7564 </desc>
7565 </attribute>
7566
7567 <attribute name="operationCount" type="unsigned long" readonly="yes">
7568 <desc>
7569 Number of operations this task is divided into.
7570 Every task consists of at least one operation.
7571 </desc>
7572 </attribute>
7573
7574 <attribute name="operation" type="unsigned long" readonly="yes">
7575 <desc>Number of the operation being currently executed.</desc>
7576 </attribute>
7577
7578 <attribute name="operationDescription" type="wstring" readonly="yes">
7579 <desc>
7580 Description of the operation being currently executed.
7581 </desc>
7582 </attribute>
7583
7584 <attribute name="operationPercent" type="long" readonly="yes">
7585 <desc>Current operation progress value in percent.</desc>
7586 </attribute>
7587
7588 <method name="waitForCompletion">
7589 <desc>
7590 Waits until the task is done (including all operations) with a
7591 given timeout.
7592
7593 <result name="VBOX_E_IPRT_ERROR">
7594 Failed to wait for task completion.
7595 </result>
7596
7597 </desc>
7598 <param name="timeout" type="long" dir="in">
7599 <desc>
7600 Timeout value in milliseconds.
7601 Specify -1 for an indefinite wait.
7602 </desc>
7603 </param>
7604 </method>
7605
7606 <method name="waitForOperationCompletion">
7607 <desc>
7608 Waits until the given operation is done with a given timeout.
7609
7610 <result name="VBOX_E_IPRT_ERROR">
7611 Failed to wait for operation completion.
7612 </result>
7613
7614 </desc>
7615 <param name="operation" type="unsigned long" dir="in">
7616 <desc>
7617 Number of the operation to wait for.
7618 Must be less than <link to="#operationCount"/>.
7619 </desc>
7620 </param>
7621 <param name="timeout" type="long" dir="in">
7622 <desc>
7623 Timeout value in milliseconds.
7624 Specify -1 for an indefinite wait.
7625 </desc>
7626 </param>
7627 </method>
7628
7629 <method name="cancel">
7630 <desc>
7631 Cancels the task.
7632 <note>
7633 If <link to="#cancelable"/> is <tt>false</tt>, then
7634 this method will fail.
7635 </note>
7636
7637 <result name="VBOX_E_INVALID_OBJECT_STATE">
7638 Operation cannot be canceled.
7639 </result>
7640
7641 </desc>
7642 </method>
7643
7644 </interface>
7645
7646
7647 <!--
7648 // ISnapshot
7649 /////////////////////////////////////////////////////////////////////////
7650 -->
7651
7652 <interface
7653 name="ISnapshot" extends="$unknown"
7654 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
7655 wsmap="managed"
7656 >
7657 <desc>
7658 The ISnapshot interface represents a snapshot of the virtual
7659 machine.
7660
7661 The <i>snapshot</i> stores all the information about a virtual
7662 machine necessary to bring it to exactly the same state as it was at
7663 the time of taking the snapshot. The snapshot includes:
7664
7665 <ul>
7666 <li>all settings of the virtual machine (i.e. its hardware
7667 configuration: RAM size, attached hard disks, etc.)
7668 </li>
7669 <li>the execution state of the virtual machine (memory contents,
7670 CPU state, etc.).
7671 </li>
7672 </ul>
7673
7674 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7675 or <i>online</i> (taken when the VM is running). The execution
7676 state of the offline snapshot is called a <i>zero execution state</i>
7677 (it doesn't actually contain any information about memory contents
7678 or the CPU state, assuming that all hardware is just powered off).
7679
7680 <h3>Snapshot branches</h3>
7681
7682 Snapshots can be chained. Chained snapshots form a branch where
7683 every next snapshot is based on the previous one. This chaining is
7684 mostly related to hard disk branching (see <link to="IHardDisk"/>
7685 description). This means that every time a new snapshot is created,
7686 a new differencing hard disk is implicitly created for all normal
7687 hard disks attached to the given virtual machine. This allows to
7688 fully restore hard disk contents when the machine is later reverted
7689 to a particular snapshot.
7690
7691 In the current implementation, multiple snapshot branches within one
7692 virtual machine are not allowed. Every machine has a single branch,
7693 and <link to="IConsole::takeSnapshot"/> operation adds a new
7694 snapshot to the top of that branch.
7695
7696 Existing snapshots can be discarded using
7697 <link to="IConsole::discardSnapshot"/>.
7698
7699 <h3>Current snapshot</h3>
7700
7701 Every virtual machine has a current snapshot, identified by
7702 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7703 a base for the <i>current machine state</i> (see below), to the effect
7704 that all normal hard disks of the machine and its execution
7705 state are based on this snapshot.
7706
7707 In the current implementation, the current snapshot is always the
7708 last taken snapshot (i.e. the head snapshot on the branch) and it
7709 cannot be changed.
7710
7711 The current snapshot is <tt>null</tt> if the machine doesn't have
7712 snapshots at all; in this case the current machine state is just
7713 current settings of this machine plus its current execution state.
7714
7715 <h3>Current machine state</h3>
7716
7717 The current machine state is what represented by IMachine instances got
7718 directly from IVirtualBox
7719 using <link
7720 to="IVirtualBox::getMachine">getMachine()</link>, <link
7721 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
7722 to instances returned by <link to="ISnapshot::machine"/>). This state
7723 is always used when the machine is <link to="IConsole::powerUp"> powered
7724 on</link>.
7725
7726 The current machine state also includes the current execution state.
7727 If the machine is being currently executed
7728 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7729 and above), its execution state is just what's happening now.
7730 If it is powered off (<link to="MachineState_PoweredOff"/> or
7731 <link to="MachineState_Aborted"/>), it has a zero execution state.
7732 If the machine is saved (<link to="MachineState_Saved"/>), its
7733 execution state is what saved in the execution state file
7734 (<link to="IMachine::stateFilePath"/>).
7735
7736 If the machine is in the saved state, then, next time it is powered
7737 on, its execution state will be fully restored from the saved state
7738 file and the execution will continue from the point where the state
7739 was saved.
7740
7741 Similarly to snapshots, the current machine state can be discarded
7742 using <link to="IConsole::discardCurrentState"/>.
7743
7744 <h3>Taking and discarding snapshots</h3>
7745
7746 The table below briefly explains the meaning of every snapshot
7747 operation:
7748
7749 <table>
7750 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7751
7752 <tr><td><link to="IConsole::takeSnapshot"/></td>
7753
7754 <td>Save the current state of the virtual machine, including all
7755 settings, contents of normal hard disks and the current modifications
7756 to immutable hard disks (for online snapshots)</td>
7757
7758 <td>The current state is not changed (the machine will continue
7759 execution if it is being executed when the snapshot is
7760 taken)</td></tr>
7761
7762 <tr><td><link to="IConsole::discardSnapshot"/></td>
7763
7764 <td>Forget the state of the virtual machine stored in the snapshot:
7765 dismiss all saved settings and delete the saved execution state (for
7766 online snapshots)</td>
7767
7768 <td>Other snapshots (including child snapshots, if any) and the
7769 current state are not directly affected</td></tr>
7770
7771 <tr><td><link to="IConsole::discardCurrentState"/></td>
7772
7773 <td>Restore the current state of the virtual machine from the state
7774 stored in the current snapshot, including all settings and hard disk
7775 contents</td>
7776
7777 <td>The current state of the machine existed prior to this operation
7778 is lost</td></tr>
7779
7780 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
7781
7782 <td>Completely revert the virtual machine to the state it was in
7783 before the current snapshot has been taken</td>
7784
7785 <td>The current state, as well as the current snapshot, are
7786 lost</td></tr>
7787
7788 </table>
7789
7790 </desc>
7791
7792 <attribute name="id" type="uuid" readonly="yes">
7793 <desc>UUID of the snapshot.</desc>
7794 </attribute>
7795
7796 <attribute name="name" type="wstring">
7797 <desc>Short name of the snapshot.</desc>
7798 </attribute>
7799
7800 <attribute name="description" type="wstring">
7801 <desc>Optional description of the snapshot.</desc>
7802 </attribute>
7803
7804 <attribute name="timeStamp" type="long long" readonly="yes">
7805 <desc>
7806 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
7807 </desc>
7808 </attribute>
7809
7810 <attribute name="online" type="boolean" readonly="yes">
7811 <desc>
7812 <tt>true</tt> if this snapshot is an online snapshot and
7813 <tt>false</tt> otherwise.
7814
7815 <note>
7816 When this attribute is <tt>true</tt>, the
7817 <link to="IMachine::stateFilePath"/> attribute of the
7818 <link to="#machine"/> object associated with this snapshot
7819 will point to the saved state file. Otherwise, it will be
7820 <tt>null</tt>.
7821 </note>
7822 </desc>
7823 </attribute>
7824
7825 <attribute name="machine" type="IMachine" readonly="yes">
7826 <desc>
7827 Virtual machine this snapshot is taken on. This object
7828 stores all settings the machine had when taking this snapshot.
7829 <note>
7830 The returned machine object is immutable, i.e. no
7831 any settings can be changed.
7832 </note>
7833 </desc>
7834 </attribute>
7835
7836 <attribute name="parent" type="ISnapshot" readonly="yes">
7837 <desc>
7838 Parent snapshot (a snapshot this one is based on).
7839 <note>
7840 It's not an error to read this attribute on a snapshot
7841 that doesn't have a parent -- a null object will be
7842 returned to indicate this.
7843 </note>
7844 </desc>
7845 </attribute>
7846
7847 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
7848 <desc>
7849 Child snapshots (all snapshots having this one as a parent).
7850 <note>
7851 In the current implementation, there can be only one
7852 child snapshot, or no children at all, meaning this is the
7853 last (head) snapshot.
7854 </note>
7855 </desc>
7856 </attribute>
7857
7858 </interface>
7859
7860
7861 <!--
7862 // IMedia
7863 /////////////////////////////////////////////////////////////////////////
7864 -->
7865
7866 <enum
7867 name="MediaState"
7868 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
7869 >
7870 <desc>
7871 Virtual media state.
7872 <see>IMedia</see>
7873 </desc>
7874
7875 <const name="NotCreated" value="0">
7876 <desc>
7877 Associated media storage does not exist (either was not created yet or
7878 was deleted).
7879 </desc>
7880 </const>
7881 <const name="Created" value="1">
7882 <desc>
7883 Associated storage exists and accessible.
7884 </desc>
7885 </const>
7886 <const name="LockedRead" value="2">
7887 <desc>
7888 Media is locked for reading, no data modification is possible.
7889 </desc>
7890 </const>
7891 <const name="LockedWrite" value="3">
7892 <desc>
7893 Media is locked for writing, no concurrent data reading or modification
7894 is possible.
7895 </desc>
7896 </const>
7897 <const name="Inaccessible" value="4">
7898 <desc>
7899 Associated media storage is not accessible.
7900 </desc>
7901 </const>
7902 <const name="Creating" value="5">
7903 <desc>
7904 Associated media storage is being created.
7905 </desc>
7906 </const>
7907 <const name="Deleting" value="6">
7908 <desc>
7909 Associated media storage is being deleted.
7910 </desc>
7911 </const>
7912 </enum>
7913
7914 <interface
7915 name="IMedium" extends="$unknown"
7916 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
7917 wsmap="managed"
7918 >
7919 <desc>
7920 The IMedium interface is a common interface for all objects representing
7921 virtual media such as hard disks, DVD images.
7922
7923 Each medium is associated with a storage unit (such as a file on the host
7924 computer or a network resource) that holds actual data. The location of
7925 the storage unit is represented by the #location attribute. The value of
7926 this attribute is media type dependent.
7927
7928 The exact media type may be determined by querying the appropriate
7929 interface such as:
7930 <ul>
7931 <li>IHardDisk (virtual hard disks)</li>
7932 <li>IDVDImage (standard CD/DVD ISO image files)</li>
7933 <li>IFloppyImage (raw floppy image files)</li>
7934 </ul>
7935
7936 Existing media are opened using the following methods, depending on the
7937 media type:
7938 <ul>
7939 <li><link to="IVirtualBox::openHardDisk"/></li>
7940 <li><link to="IVirtualBox::openDVDImage"/></li>
7941 <li><link to="IVirtualBox::openFloppyImage"/></li>
7942 </ul>
7943
7944 New hard disk media are created using the
7945 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
7946 images are created outside VirtualBox, usually by storing a copy
7947 of the real medium of the corresponding type in a regular file.
7948
7949 <h3>Known Media</h3>
7950
7951 When an existing medium gets opened for the first time, it gets
7952 automatically remembered by the given VirtualBox installation or, in other
7953 words, becomes a <i>known medium</i>. Known media are stored in the media
7954 registry transparently maintained by VirtualBox and stored in settings
7955 files so that this registry is preserved when VirtualBox is not running.
7956
7957 Newly created virtual hard disks get remembered only when the associated
7958 storage unit is actually created (see IHardDisk for more details).
7959
7960 All known media can be enumerated using
7961 <link to="IVirtualBox::hardDisks"/>,
7962 <link to="IVirtualBox::DVDImages"/> and
7963 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
7964 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
7965 and similar methods or by location using
7966 <link to="IVirtualBox::findHardDisk"/> and similar methods.
7967
7968 Only known media can be attached to virtual machines.
7969
7970 Removing known media from the media registry is performed when the given
7971 medium is closed using the <link to="#close"/> method or when its
7972 associated storage unit is deleted (only for hard disks).
7973
7974 <h3>Accessibility Checks</h3>
7975
7976 The given medium (with the created storage unit) is considered to be
7977 <i>accessible</i> when its storage unit can be successfully read from.
7978 Accessible media are indicated by the <link to="MediaState_Created"/>
7979 value of the <link to="#state"/> attribute. When the storage unit cannot
7980 be read (for example, because it is located on a disconnected network
7981 resource, or was accidentally deleted outside VirtualBox), the medium is
7982 considered to be <i>inaccessible</i> which is indicated by the
7983 <link to="MediaState_Inaccessible"/> state. The details about the reason
7984 of being inaccessible can be obtained using the
7985 <link to="#lastAccessError"/> attribute.
7986
7987 A new accessibility check is performed each time the <link to="#state"/>
7988 attribute is read. Please note that this check may take long time (several
7989 seconds or even minutes, depending on the storage unit location and
7990 format), and will block the calling thread until finished. For this
7991 reason, it is recommended to never read this attribute on the main UI
7992 thread to avoid making the UI unresponsive.
7993
7994 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
7995 created for the first time), all known media are in the
7996 <link to="MediaState_Inaccessible"/> state but the value of the <link
7997 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
7998 accessibility check is made on startup. This is done to make the
7999 VirtualBox object ready for serving requests as
8000 fast as possible and let the end-user application decide if it needs to
8001 check media accessibility right away or not.
8002 </desc>
8003
8004 <attribute name="id" type="uuid" readonly="yes">
8005 <desc>
8006 UUID of the medium. For a newly created medium, this value is a randomly
8007 generated UUID.
8008
8009 <note>
8010 For media in one of MediaState_NotCreated, MediaState_Creating or
8011 MediaState_Deleting states, the value of this property is undefined
8012 and will most likely be an empty UUID.
8013 </note>
8014 </desc>
8015 </attribute>
8016
8017 <attribute name="description" type="wstring">
8018 <desc>
8019 Optional description of the medium. For newly created media, the value
8020 of this attribute value is <tt>null</tt>.
8021
8022 Media types that don't support this attribute will return E_NOTIMPL in
8023 attempt to get or set this attribute's value.
8024
8025 <note>
8026 For some storage types, reading this attribute may return an outdated
8027 (last known) value when <link to="#state"/> is <link
8028 to="MediaState_Inaccessible"/> or <link
8029 to="MediaState_LockedWrite"/> because the value of this attribute is
8030 stored within the storage unit itself. Also note that changing the
8031 attribute value is not possible in such case, as well as when the
8032 medium is the <link to="MediaState_LockedRead"/> state.
8033 </note>
8034 </desc>
8035 </attribute>
8036
8037 <attribute name="state" type="MediaState" readonly="yes">
8038 <desc>
8039 Current media state. Inspect <link to="MediaState"/> values for details.
8040
8041 Reading this attribute may take long time because a new accessibility
8042 check of the storage unit is performed every time the attribute is read.
8043 This check may cause a significant delay if the storage unit of the
8044 given medium is, for example, a file located on a network share which is
8045 not currently accessible due to connectivity problems -- the call will
8046 not return until a timeout interval defined by the host OS for this
8047 operation expires.
8048
8049 If the last known state of the medium is <link to="MediaState_Created"/>
8050 and the accessibility check fails then the state would be set to
8051 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8052 may be used to get more details about the failure. If the state of the
8053 medium is <link to="MediaState_LockedRead"/> or
8054 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8055 non-null value of <link to="#lastAccessError"/> will indicate a failed
8056 accessibility check in this case.
8057
8058 Note that not all media states are applicable to certain media types.
8059 For example, states <link to="MediaState_NotCreated"/>,
8060 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8061 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8062 IFloppyImage media.
8063 </desc>
8064 </attribute>
8065
8066 <attribute name="location" type="wstring">
8067 <desc>
8068 Location of the storage unit holding media data.
8069
8070 The format of the location string is media type specific. For media
8071 types that use regular files in a host's file system, the location
8072 string is just a full file name.
8073
8074 Some media types may support changing the storage unit location by
8075 simply changing the value of this property. If this operation is not
8076 supported, the implementation will return E_NOTIMPL in attempt to set
8077 this attribute's value.
8078
8079 When setting a value of the location attribute which is a regular file
8080 in the host's file system, the given file name may be either relative to
8081 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8082 absolute. Note that if the given location specification does not contain
8083 the file extension part then a proper default extension will be
8084 automatically appended by the implementation depending on the media type.
8085 </desc>
8086 </attribute>
8087
8088 <attribute name="name" type="wstring" readonly="yes">
8089 <desc>
8090 Name of the storage unit holding media data.
8091
8092 The returned string is a short version of the <link to="#location"/>
8093 attribute that is suitable for representing the medium in situations
8094 where the full location specification is too long (such as lists
8095 and comboboxes in GUI frontends). This string is also used by frontends
8096 to sort the media list alphabetically when needed.
8097
8098 For example, for locations that are regular files in the host's file
8099 system, the value of this attribute is just a file name (+ extension),
8100 without the path specification.
8101
8102 Note that as opposed to the <link to="#location"/> attribute, the name
8103 attribute will not necessary be unique for a list of media of the
8104 given type and format.
8105 </desc>
8106 </attribute>
8107
8108 <attribute name="size" type="unsigned long long" readonly="yes">
8109 <desc>
8110 Physical size of the storage unit used to hold media data (in bytes).
8111
8112 <note>
8113 For media whose <link to="#state"/> is <link
8114 to="MediaState_Inaccessible"/>, the value of this property is the
8115 last known size. For <link to="MediaState_NotCreated"/> media,
8116 the returned value is zero.
8117 </note>
8118 </desc>
8119 </attribute>
8120
8121 <attribute name="lastAccessError" type="wstring" readonly="yes">
8122 <desc>
8123 Text message that represents the result of the last accessibility
8124 check.
8125
8126 Accessibility checks are performed each time the <link to="#state"/>
8127 attribute is read. A @c null string is returned if the last
8128 accessibility check was successful. A non-null string indicates a
8129 failure and should normally describe a reason of the failure (for
8130 example, a file read error).
8131 </desc>
8132 </attribute>
8133
8134 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8135 <desc>
8136 Array of UUIDs of all machines this medium is attached to.
8137
8138 A <tt>null</tt> array is returned if this medium is not attached to any
8139 machine or to any machine's snapshot.
8140
8141 <note>
8142 The returned array will include a machine even if this medium is not
8143 attached to that machine in the current state but attached to it in
8144 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8145 details.
8146 </note>
8147 </desc>
8148 </attribute>
8149
8150 <method name="getSnapshotIds">
8151 <desc>
8152 Returns an array of UUIDs of all snapshots of the given machine where
8153 this medium is attached to it.
8154
8155 If the medium is attached to the machine in the current state, then the
8156 first element in the array will always be the ID of the queried machine
8157 (i.e. the value equal to the @c machineId argument), followed by
8158 snapshot IDs (if any).
8159
8160 If the medium is not attached to the machine in the current state, then
8161 the array will contain only snapshot IDs.
8162
8163 The returned array may be <tt>null</tt> if this medium is not attached
8164 to the given machine at all, neither in the current state nor in one of
8165 snapshots.
8166 </desc>
8167 <param name="machineId" type="uuid" dir="in">
8168 <desc>
8169 UUID of the machine to query.
8170 </desc>
8171 </param>
8172 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8173 <desc>
8174 Array of snapshot UUIDs of the given machine using this medium.
8175 </desc>
8176 </param>
8177 </method>
8178
8179 <method name="lockRead">
8180 <desc>
8181 Locks this medium for reading.
8182
8183 The read lock is shared: many clients can simultaneously lock the
8184 same media for reading unless it is already locked for writing (see
8185 <link to="#lockWrite"/>) in which case an error is returned.
8186
8187 When the medium is locked for reading, it cannot be modified
8188 from within VirtualBox. This means that any method that changes
8189 the properties of this medium or contents of the storage unit
8190 will return an error (unless explicitly stated otherwise) and
8191 that an attempt to start a virtual machine that wants to modify
8192 the medium will also fail.
8193
8194 When the virtual machine is started up, it locks for reading all
8195 media it uses in read-only mode. If some media cannot be locked
8196 for reading, the startup procedure will fail.
8197
8198 The medium locked for reading must be unlocked using the <link
8199 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8200 can be nested and must be followed by the same number of paired
8201 <link to="#unlockRead"/> calls.
8202
8203 This method sets the media state to <link
8204 to="MediaState_LockedRead"/> on success. The state prior to
8205 this call must be <link to="MediaState_Created"/>, <link
8206 to="MediaState_Inaccessible"/> or <link
8207 to="MediaState_LockedRead"/>. As you can see, inaccessible
8208 media can be locked too. This is not an error; this method
8209 performs a logical lock that prevents modifications of this
8210 media through the VirtualBox API, not a physical lock of the
8211 underlying storage unit.
8212
8213 This method returns the current state of the medium
8214 <b>before</b> the operation.
8215
8216 <result name="VBOX_E_INVALID_OBJECT_STATE">
8217 Invalid media state (e.g. not created, locked, inaccessible,
8218 creating, deleting).
8219 </result>
8220
8221 </desc>
8222 <param name="state" type="MediaState" dir="return">
8223 <desc>
8224 State of the medium after the operation.
8225 </desc>
8226 </param>
8227 </method>
8228
8229 <method name="unlockRead">
8230 <desc>
8231 Cancels the read lock previously set by <link to="#lockRead"/>.
8232
8233 Either on success or on failure, this method returns the current state
8234 of the medium <b>after</b> the operation.
8235
8236 See <link to="#lockRead"/> for more details.
8237
8238 <result name="VBOX_E_INVALID_OBJECT_STATE">
8239 Medium not locked for reading.
8240 </result>
8241
8242 </desc>
8243 <param name="state" type="MediaState" dir="return">
8244 <desc>
8245 State of the medium after the operation.
8246 </desc>
8247 </param>
8248 </method>
8249
8250 <method name="lockWrite">
8251 <desc>
8252 Locks this medium for writing.
8253
8254 The write lock, as opposed to <link to="#lockRead"/>, is
8255 exclusive: there may be only one client that holds a write lock
8256 and there may be no read locks while the write lock is held.
8257
8258 When the medium is locked for writing, it cannot be modified
8259 from within VirtualBox and it is not guaranteed that the values
8260 of its properties are up-to-date. Any method that changes the
8261 properties of this medium or contents of the storage unit will
8262 return an error ((unless explicitly stated otherwise) and an
8263 attempt to start a virtual machine that wants to modify or to
8264 read the medium will also fail.
8265
8266 When the virtual machine is started up, it locks for writing all
8267 media it uses to write data to. If some media cannot be locked
8268 for writing, the startup procedure will fail.
8269
8270 The medium locked for writing must be unlocked using the <link
8271 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8272 can <b>not</b> be nested and must be followed by a paired <link
8273 to="#unlockWrite"/> call.
8274
8275 This method sets the media state to <link
8276 to="MediaState_LockedWrite"/> on success. The state prior to
8277 this call must be <link to="MediaState_Created"/> or <link
8278 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8279 media can be locked too. This is not an error; this method
8280 performs a logical lock that prevents modifications of this
8281 media through the VirtualBox API, not a physical lock of the
8282 underlying storage unit.
8283
8284 Either on success or on failure, this method returns the current
8285 state of the medium <b>before</b> the operation.
8286
8287 <result name="VBOX_E_INVALID_OBJECT_STATE">
8288 Invalid media state (e.g. not created, locked, inaccessible,
8289 creating, deleting).
8290 </result>
8291
8292 </desc>
8293 <param name="state" type="MediaState" dir="return">
8294 <desc>
8295 State of the medium after the operation.
8296 </desc>
8297 </param>
8298 </method>
8299
8300 <method name="unlockWrite">
8301 <desc>
8302 Cancels the write lock previously set by <link to="#lockWrite"/>.
8303
8304 Either on success or on failure, this method returns the current
8305 state of the medium <b>after</b> the operation.
8306
8307 See <link to="#lockWrite"/> for more details.
8308
8309 <result name="VBOX_E_INVALID_OBJECT_STATE">
8310 Medium not locked for writing.
8311 </result>
8312
8313 </desc>
8314 <param name="state" type="MediaState" dir="return">
8315 <desc>
8316 State of the medium after the operation.
8317 </desc>
8318 </param>
8319 </method>
8320
8321 <method name="close">
8322 <desc>
8323 Closes this medium.
8324
8325 The hard disk must not be attached to any known virtual machine
8326 and must not have any known child hard disks, otherwise the
8327 operation will fail.
8328
8329 When the hard disk is successfully closed, it gets removed from
8330 the list of remembered hard disks, but its storage unit is not
8331 deleted. In particular, this means that this hard disk can be
8332 later opened again using the <link
8333 to="IVirtualBox::openHardDisk"/> call.
8334
8335 Note that after this method successfully returns, the given hard
8336 disk object becomes uninitialized. This means that any attempt
8337 to call any of its methods or attributes will fail with the
8338 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8339
8340 <result name="VBOX_E_INVALID_OBJECT_STATE">
8341 Invalid media state (other than not created, created or
8342 inaccessible).
8343 </result>
8344 <result name="VBOX_E_OBJECT_IN_USE">
8345 Medium attached to virtual machine.
8346 </result>
8347 <result name="VBOX_E_FILE_ERROR">
8348 Settings file not accessible.
8349 </result>
8350 <result name="VBOX_E_XML_ERROR">
8351 Could not parse the settings file.
8352 </result>
8353
8354 </desc>
8355 </method>
8356
8357 </interface>
8358
8359
8360 <!--
8361 // IHardDisk
8362 /////////////////////////////////////////////////////////////////////////
8363 -->
8364
8365 <enum
8366 name="HardDiskType"
8367 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8368 >
8369 <desc>
8370 Virtual hard disk type.
8371 <see>IHardDisk</see>
8372 </desc>
8373
8374 <const name="Normal" value="0">
8375 <desc>
8376 Normal hard disk (attached directly or indirectly, preserved
8377 when taking snapshots).
8378 </desc>
8379 </const>
8380 <const name="Immutable" value="1">
8381 <desc>
8382 Immutable hard disk (attached indirectly, changes are wiped out
8383 after powering off the virtual machine).
8384 </desc>
8385 </const>
8386 <const name="Writethrough" value="2">
8387 <desc>
8388 Write through hard disk (attached directly, ignored when
8389 taking snapshots).
8390 </desc>
8391 </const>
8392 </enum>
8393
8394 <enum
8395 name="HardDiskVariant"
8396 uuid="3bc36e8c-bf7a-4dba-b6cb-df87cdc9cc19"
8397 >
8398 <desc>
8399 Virtual hard disk image variant. More than one flag may be set.
8400 <see>IHardDisk</see>
8401 </desc>
8402
8403 <const name="Standard" value="0">
8404 <desc>
8405 No particular variant requested, results in using the backend default.
8406 </desc>
8407 </const>
8408 <const name="VmdkSplit2G" value="0x01">
8409 <desc>
8410 VMDK image split in chunks of less than 2GByte.
8411 </desc>
8412 </const>
8413 <const name="VmdkStreamOptimized" value="0x04">
8414 <desc>
8415 VMDK streamOptimized image. Special import/export format which is
8416 read-only/append-only.
8417 </desc>
8418 </const>
8419 </enum>
8420
8421 <interface
8422 name="IHardDiskAttachment" extends="$unknown"
8423 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8424 wsmap="struct"
8425 >
8426 <desc>
8427 The IHardDiskAttachment interface represents a hard disk attachment of a
8428 virtual machine.
8429
8430 Every hard disk attachment specifies a slot of the virtual hard disk
8431 controller and a virtual hard disk attached to this slot.
8432
8433 The array of hard disk attachments is returned by
8434 <link to="IMachine::hardDiskAttachments"/>.
8435 </desc>
8436 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8437 <desc>Hard disk object associated with this attachment.</desc>
8438 </attribute>
8439
8440 <attribute name="controller" type="wstring" readonly="yes">
8441 <desc>Interface bus of this attachment.</desc>
8442 </attribute>
8443
8444 <attribute name="port" type="long" readonly="yes">
8445 <desc>Port number of this attachment.</desc>
8446 </attribute>
8447
8448 <attribute name="device" type="long" readonly="yes">
8449 <desc>Device slot number of this attachment.</desc>
8450 </attribute>
8451
8452 </interface>
8453
8454 <interface
8455 name="IHardDisk" extends="IMedium"
8456 uuid="a4d391a5-e2b1-474d-824e-2ff668a92d58"
8457 wsmap="managed"
8458 >
8459 <desc>
8460 The IHardDisk interface represents a virtual hard disk drive
8461 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8462
8463 Virtual hard disk objects virtualize the hard disk hardware and look like
8464 regular hard disks for the guest OS running inside the virtual machine.
8465
8466 <h3>Hard Disk Types</h3>
8467
8468 There are three types of hard disks:
8469 <link to="HardDiskType_Normal">Normal</link>,
8470 <link to="HardDiskType_Immutable">Immutable</link> and
8471 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8472 hard disk defines how the hard disk is attached to a virtual machine and
8473 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8474 machine with the attached hard disk is taken. The type of the hard disk is
8475 defined by the <link to="#type"/> attribute.
8476
8477 All hard disks can be also divided in two big groups: <i>base</i> hard
8478 disks and <i>differencing</i> hard disks. A base hard disk contains all
8479 sectors of the hard disk data in its storage unit and therefore can be
8480 used independently. On the contrary, a differencing hard disk contains
8481 only some part of the hard disk data (a subset of sectors) and needs
8482 another hard disk to get access to the missing sectors of data. This
8483 another hard disk is called a <i>parent</i> hard disk and defines a hard
8484 disk to which this differencing hard disk is known to be <i>linked to</i>.
8485 The parent hard disk may be itself a differencing hard disk. This
8486 way, differencing hard disks form a linked hard disk chain. This chain
8487 always ends with the base hard disk which is sometimes referred to as the
8488 root hard disk of this chain. Note that several differencing hard disks
8489 may be linked to the same parent hard disk. This way, all known hard disks
8490 form a hard disk tree which is based on their parent-child relationship.
8491
8492 Differencing hard disks can be distinguished from base hard disks by
8493 querying the <link to="#parent"/> attribute: base hard disks do not have
8494 parents they would depend on, so the value of this attribute is always
8495 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8496 the hard disk tree (from the child hard disk to its parent). It is also
8497 possible to walk down the tree using the <link to="#children"/>
8498 attribute.
8499
8500 Note that the type of all differencing hard disks is
8501 <link to="HardDiskType_Normal">Normal</link>; all other values are
8502 meaningless for them. Base hard disks may be of any type.
8503
8504 <h3>Creating Hard Disks</h3>
8505
8506 New base hard disks are created using
8507 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8508 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8509 disks are usually implicitly created by VirtualBox when needed but may
8510 also be created explicitly using <link to="#createDiffStorage"/>.
8511
8512 After the hard disk is successfully created (including the storage unit)
8513 or opened, it becomes a known hard disk (remembered in the internal media
8514 registry). Known hard disks can be attached to a virtual machine, accessed
8515 through <link to="IVirtualBox::getHardDisk"/> and
8516 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8517 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8518
8519 The following methods, besides <link to="IMedium::close"/>,
8520 automatically remove the hard disk from the media registry:
8521 <ul>
8522 <li><link to="#deleteStorage"/></li>
8523 <li><link to="#mergeTo"/></li>
8524 </ul>
8525
8526 If the storage unit of the hard disk is a regular file in the host's
8527 file system then the rules stated in the description of the
8528 <link to="IMedium::location"/> attribute apply when setting its value. In
8529 addition, a plain file name without any path may be given, in which case
8530 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8531 folder</link> will be prepended to it.
8532
8533 <h4>Automatic composition of the file name part</h4>
8534
8535 Another extension to the <link to="IMedium::location"/> attribute is that
8536 there is a possibility to cause VirtualBox to compose a unique value for
8537 the file name part of the location using the UUID of the hard disk. This
8538 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8539 e.g. before the storage unit is created, and works as follows. You set the
8540 value of the <link to="IMedium::location"/> attribute to a location
8541 specification which only contains the path specification but not the file
8542 name part and ends with either a forward slash or a backslash character.
8543 In response, VirtualBox will generate a new UUID for the hard disk and
8544 compose the file name using the following pattern:
8545 <pre>
8546 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8547 </pre>
8548 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8549 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8550 is the default extension for the storage format of this hard disk. After
8551 that, you may call any of the methods that create a new hard disk storage
8552 unit and they will use the generated UUID and file name.
8553
8554 <h3>Attaching Hard Disks</h3>
8555
8556 Hard disks are attached to virtual machines using the
8557 <link to="IMachine::attachHardDisk"/> method and detached using the
8558 <link to="IMachine::detachHardDisk"/> method. Depending on their
8559 <link to="#type"/>, hard disks are attached either
8560 <i>directly</i> or <i>indirectly</i>.
8561
8562 When a hard disk is being attached directly, it is associated with the
8563 virtual machine and used for hard disk operations when the machine is
8564 running. When a hard disk is being attached indirectly, a new differencing
8565 hard disk linked to it is implicitly created and this differencing hard
8566 disk is associated with the machine and used for hard disk operations.
8567 This also means that if <link to="IMachine::attachHardDisk"/> performs
8568 a direct attachment then the same hard disk will be returned in response
8569 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8570 an indirect attachment is performed then
8571 <link to="IMachine::getHardDisk"/> will return the implicitly created
8572 differencing hard disk, not the original one passed to <link
8573 to="IMachine::attachHardDisk"/>. The following table shows the
8574 dependency of the attachment type on the hard disk type:
8575
8576 <table>
8577 <tr>
8578 <th>Hard Disk Type</th>
8579 <th>Direct or Indirect?</th>
8580 </tr>
8581 <tr>
8582 <td>Normal (Base)</td>
8583 <td>
8584 Normal base hard disks that do not have children (i.e. differencing
8585 hard disks linked to them) and that are not already attached to
8586 virtual machines in snapshots are attached <b>directly</b>.
8587 Otherwise, they are attached <b>indirectly</b> because having
8588 dependent children or being part of the snapshot makes it impossible
8589 to modify hard disk contents without breaking the integrity of the
8590 dependent party. The <link to="#readOnly"/> attribute allows to
8591 quickly determine the kind of the attachment for the given hard
8592 disk. Note that if a normal base hard disk is to be indirectly
8593 attached to a virtual machine with snapshots then a special
8594 procedure called <i>smart attachment</i> is performed (see below).
8595 </td>
8596 </tr>
8597 <tr>
8598 <td>Normal (Differencing)</td>
8599 <td>
8600 Differencing hard disks are like normal base hard disks: attached
8601 <b>directly</b> if they do not have children and are not attached to
8602 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8603 that the smart attachment procedure is never performed for
8604 differencing hard disks.
8605 </td>
8606 </tr>
8607 <tr>
8608 <td>Immutable</td>
8609 <td>
8610 Immutable hard disks are always attached <b>indirectly</b> because
8611 they are designed to be non-writable. If an immutable hard disk is
8612 attached to a virtual machine with snapshots then a special
8613 procedure called smart attachment is performed (see below).
8614 </td>
8615 </tr>
8616 <tr>
8617 <td>Writethrough</td>
8618 <td>
8619 Writethrough hard disks are always attached <b>directly</b>, also as
8620 designed. This also means that writethrough hard disks cannot have
8621 other hard disks linked to them at all.
8622 </td>
8623 </tr>
8624 </table>
8625
8626 Note that the same hard disk, regardless of its type, may be attached to
8627 more than one virtual machine at a time. In this case, the machine that is
8628 started first gains exclusive access to the hard disk and attempts to
8629 start other machines having this hard disk attached will fail until the
8630 first machine is powered down.
8631
8632 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8633 that the given hard disk remains associated with the given machine after a
8634 successful <link to="IMachine::detachHardDisk"/> call until
8635 <link to="IMachine::saveSettings"/> is called to save all changes to
8636 machine settings to disk. This deferring is necessary to guarantee that
8637 the hard disk configuration may be restored at any time by a call to
8638 <link to="IMachine::discardSettings"/> before the settings
8639 are saved (committed).
8640
8641 Note that if <link to="IMachine::discardSettings"/> is called after
8642 indirectly attaching some hard disks to the machine but before a call to
8643 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8644 all differencing hard disks implicitly created by
8645 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8646 Such implicitly created hard disks will also be immediately deleted when
8647 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8648 call if it is made before <link to="IMachine::saveSettings"/>. This
8649 implicit deletion is safe because newly created differencing hard
8650 disks do not contain any user data.
8651
8652 However, keep in mind that detaching differencing hard disks that were
8653 implicitly created by <link to="IMachine::attachHardDisk"/>
8654 before the last <link to="IMachine::saveSettings"/> call will
8655 <b>not</b> implicitly delete them as they may already contain some data
8656 (for example, as a result of virtual machine execution). If these hard
8657 disks are no more necessary, the caller can always delete them explicitly
8658 using <link to="#deleteStorage"/> after they are actually de-associated
8659 from this machine by the <link to="IMachine::saveSettings"/> call.
8660
8661 <h3>Smart Attachment</h3>
8662
8663 When normal base or immutable hard disks are indirectly attached to a
8664 virtual machine then some additional steps are performed to make sure the
8665 virtual machine will have the most recent "view" of the hard disk being
8666 attached. These steps include walking through the machine's snapshots
8667 starting from the current one and going through ancestors up to the first
8668 snapshot. Hard disks attached to the virtual machine in all
8669 of the encountered snapshots are checked whether they are descendants of
8670 the given normal base or immutable hard disk. The first found child (which
8671 is the differencing hard disk) will be used instead of the normal base or
8672 immutable hard disk as a parent for creating a new differencing hard disk
8673 that will be actually attached to the machine. And only if no descendants
8674 are found or if the virtual machine does not have any snapshots then the
8675 normal base or immutable hard disk will be used itself as a parent for
8676 this differencing hard disk.
8677
8678 It is easier to explain what smart attachment does using the
8679 following example:
8680 <pre>
8681BEFORE attaching B.vdi: AFTER attaching B.vdi:
8682
8683Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8684 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8685 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8686 Snapshot 4 (none) Snapshot 4 (none)
8687 CurState (none) CurState (D3->D2.vdi)
8688
8689 NOT
8690 ...
8691 CurState (D3->B.vdi)
8692 </pre>
8693 The first column is the virtual machine configuration before the base hard
8694 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8695 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8696 mean that the hard disk that is actually attached to the machine is a
8697 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8698 another hard disk, <tt>B.vdi</tt>.
8699
8700 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8701 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8702 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8703 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8704 it cannot be attached directly and needs an indirect attachment (i.e.
8705 implicit creation of a new differencing hard disk). Due to the smart
8706 attachment procedure, the new differencing hard disk
8707 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8708 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8709 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8710 machine.
8711
8712 Note that if there is more than one descendant hard disk of the given base
8713 hard disk found in a snapshot, and there is an exact device, channel and
8714 bus match, then this exact match will be used. Otherwise, the youngest
8715 descendant will be picked up.
8716
8717 There is one more important aspect of the smart attachment procedure which
8718 is not related to snapshots at all. Before walking through the snapshots
8719 as described above, the backup copy of the current list of hard disk
8720 attachment is searched for descendants. This backup copy is created when
8721 the hard disk configuration is changed for the first time after the last
8722 <link to="IMachine::saveSettings"/> call and used by
8723 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8724 changes. When such a descendant is found in this backup copy, it will be
8725 simply re-attached back, without creating a new differencing hard disk for
8726 it. This optimization is necessary to make it possible to re-attach the
8727 base or immutable hard disk to a different bus, channel or device slot
8728 without losing the contents of the differencing hard disk actually
8729 attached to the machine in place of it.
8730 </desc>
8731
8732 <attribute name="format" type="wstring" readonly="yes">
8733 <desc>
8734 Storage format of this hard disk.
8735
8736 The value of this attribute is a string that specifies a backend used to
8737 store hard disk data. The storage format is defined when you create a
8738 new hard disk or automatically detected when you open an existing hard
8739 disk medium, and cannot be changed later.
8740
8741 The list of all storage formats supported by this VirtualBox
8742 installation can be obtained using
8743 <link to="ISystemProperties::hardDiskFormats"/>.
8744 </desc>
8745 </attribute>
8746
8747 <attribute name="type" type="HardDiskType">
8748 <desc>
8749 Type (role) of this hard disk.
8750
8751 The following constraints apply when changing the value of this
8752 attribute:
8753 <ul>
8754 <li>If a hard disk is attached to a virtual machine (either in the
8755 current state or in one of the snapshots), its type cannot be
8756 changed.
8757 </li>
8758 <li>As long as the hard disk has children, its type cannot be set
8759 to <link to="HardDiskType_Writethrough"/>.
8760 </li>
8761 <li>The type of all differencing hard disks is
8762 <link to="HardDiskType_Normal"/> and cannot be changed.
8763 </li>
8764 </ul>
8765
8766 The type of a newly created or opened hard disk is set to
8767 <link to="HardDiskType_Normal"/>.
8768 </desc>
8769 </attribute>
8770
8771 <attribute name="parent" type="IHardDisk" readonly="yes">
8772 <desc>
8773 Parent of this hard disk (a hard disk this hard disk is directly based
8774 on).
8775
8776 Only differencing hard disks have parents. For base (non-differencing)
8777 hard disks, <tt>null</tt> is returned.
8778 </desc>
8779 </attribute>
8780
8781 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
8782 <desc>
8783 Children of this hard disk (all differencing hard disks directly based
8784 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8785 does not have any children.
8786 </desc>
8787 </attribute>
8788
8789 <attribute name="root" type="IHardDisk" readonly="yes">
8790 <desc>
8791 Root hard disk of this hard disk.
8792
8793 If this is a differencing hard disk, its root hard disk is the base hard
8794 disk the given hard disk branch starts from. For all other types of hard
8795 disks, this property returns the hard disk object itself (i.e. the same
8796 object this property is read on).
8797 </desc>
8798 </attribute>
8799
8800 <attribute name="readOnly" type="boolean" readonly="yes">
8801 <desc>
8802 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
8803 otherwise.
8804
8805 A hard disk is considered to be read-only when its contents cannot be
8806 modified without breaking the integrity of other parties that depend on
8807 this hard disk such as its child hard disks or snapshots of virtual
8808 machines where this hard disk is attached to these machines. If there
8809 are no children and no such snapshots then there is no dependency and
8810 the hard disk is not read-only.
8811
8812 The value of this attribute can be used to determine the kind of the
8813 attachment that will take place when attaching this hard disk to a
8814 virtual machine. If the value is <tt>false</tt> then the hard disk will
8815 be attached directly. If the value is <tt>true</tt> then the hard disk
8816 will be attached indirectly by creating a new differencing child hard
8817 disk for that. See the interface description for more information.
8818
8819 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
8820 disks are always read-only while all
8821 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
8822 always not.
8823
8824 <note>
8825 The read-only condition represented by this attribute is related to
8826 the hard disk type and usage, not to the current
8827 <link to="IMedium::state">media state</link> and not to the read-only
8828 state of the storage unit.
8829 </note>
8830 </desc>
8831 </attribute>
8832
8833 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8834 <desc>
8835 Logical size of this hard disk (in megabytes), as reported to the
8836 guest OS running inside the virtual machine this disk is
8837 attached to. The logical size is defined when the hard disk is created
8838 and cannot be changed later.
8839
8840 <note>
8841 Reading this property on a differencing hard disk will return the size
8842 of its <link to="#root"/> hard disk.
8843 </note>
8844 <note>
8845 For hard disks whose state is <link to="#state"/> is <link
8846 to="MediaState_Inaccessible"/>, the value of this property is the
8847 last known logical size. For <link to="MediaState_NotCreated"/> hard
8848 disks, the returned value is zero.
8849 </note>
8850 </desc>
8851 </attribute>
8852
8853 <attribute name="autoReset" type="boolean">
8854 <desc>
8855 Whether this differencing hard disk will be automatically reset each
8856 time a virtual machine it is attached to is powered up.
8857
8858 See <link to="#reset()"/> for more information about resetting
8859 differencing hard disks.
8860
8861 <note>
8862 Reading this property on a base (non-differencing) hard disk will
8863 always <tt>false</tt>. Changing the value of this property in this
8864 case is not supported.
8865 </note>
8866
8867 <result name="VBOX_E_NOT_SUPPORTED">
8868 This is not a differencing hard disk (when changing the attribute
8869 value).
8870 </result>
8871 </desc>
8872 </attribute>
8873
8874 <!-- storage methods -->
8875
8876 <method name="getProperty">
8877 <desc>
8878 Returns the value of the custom hard disk property with the given name.
8879
8880 The list of all properties supported by the given hard disk format can
8881 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
8882
8883 Note that if this method returns a <tt>null</tt> @a value, the requested
8884 property is supported but currently not assigned any value.
8885
8886 <result name="VBOX_E_OBJECT_NOT_FOUND">
8887 Requested property does not exist (not supported by the format).
8888 </result>
8889 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8890 </desc>
8891 <param name="name" type="wstring" dir="in">
8892 <desc>Name of the property to get.</desc>
8893 </param>
8894 <param name="value" type="wstring" dir="return">
8895 <desc>Current property value.</desc>
8896 </param>
8897 </method>
8898
8899 <method name="setProperty">
8900 <desc>
8901 Sets the value of the custom hard disk property with the given name.
8902
8903 The list of all properties supported by the given hard disk format can
8904 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
8905
8906 Note that setting the property value to <tt>null</tt> is equivalent to
8907 deleting the existing value. A default value (if it is defined for this
8908 property) will be used by the format backend in this case.
8909
8910 <result name="VBOX_E_OBJECT_NOT_FOUND">
8911 Requested property does not exist (not supported by the format).
8912 </result>
8913 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
8914 </desc>
8915 <param name="name" type="wstring" dir="in">
8916 <desc>Name of the property to set.</desc>
8917 </param>
8918 <param name="value" type="wstring" dir="in">
8919 <desc>Property value to set.</desc>
8920 </param>
8921 </method>
8922
8923 <method name="getProperties">
8924 <desc>
8925 Returns values for a group of properties in one call.
8926
8927 The names of the properties to get are specified using the @a names
8928 argument which is a list of comma-separated property names or
8929 <tt>null</tt> if all properties are to be returned. Note that currently
8930 the value of this argument is ignored and the method always returns all
8931 existing properties.
8932
8933 The list of all properties supported by the given hard disk format can
8934 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
8935
8936 The method returns two arrays, the array of property names corresponding
8937 to the @a names argument and the current values of these properties.
8938 Both arrays have the same number of elements with each elemend at the
8939 given index in the first array corresponds to an element at the same
8940 index in the second array.
8941
8942 Note that for properties that do not have assigned values,
8943 <tt>null</tt> is returned at the appropriate index in the
8944 @a returnValues array.
8945
8946 </desc>
8947 <param name="names" type="wstring" dir="in">
8948 <desc>
8949 Names of properties to get.
8950 </desc>
8951 </param>
8952 <param name="returnNames" type="wstring" safearray="yes" dir="out">
8953 <desc>Names of returned properties.</desc>
8954 </param>
8955 <param name="returnValues" type="wstring" safearray="yes" dir="return">
8956 <desc>Values of returned properties.</desc>
8957 </param>
8958 </method>
8959
8960 <method name="setProperties">
8961 <desc>
8962 Sets values for a group of properties in one call.
8963
8964 The names of the properties to set are passed in the @a names
8965 array along with the new values for them in the @a values array. Both
8966 arrays have the same number of elements with each elemend at the given
8967 index in the first array corresponding to an element at the same index
8968 in the second array.
8969
8970 If there is at least one property name in @a names that is not valid,
8971 the method will fail before changing the values of any other properties
8972 from the @a names array.
8973
8974 Using this method over <link to="#setProperty"/> is preferred if you
8975 need to set several properties at once since it will result into less
8976 IPC calls.
8977
8978 The list of all properties supported by the given hard disk format can
8979 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
8980
8981 Note that setting the property value to <tt>null</tt> is equivalent to
8982 deleting the existing value. A default value (if it is defined for this
8983 property) will be used by the format backend in this case.
8984 </desc>
8985 <param name="names" type="wstring" safearray="yes" dir="in">
8986 <desc>Names of properties to set.</desc>
8987 </param>
8988 <param name="values" type="wstring" safearray="yes" dir="in">
8989 <desc>Values of properties to set.</desc>
8990 </param>
8991 </method>
8992
8993 <!-- storage methods -->
8994
8995 <method name="createDynamicStorage">
8996 <desc>
8997 Starts creating a dynamically expanding hard disk storage unit in the
8998 background. The previous storage unit created for this object, if
8999 any, must first be deleted using <link to="#deleteStorage"/>, otherwise
9000 the operation will fail.
9001
9002 Before the operation starts, the hard disk is placed in
9003 <link to="MediaState_Creating"/> state. If the create operation
9004 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9005 state.
9006
9007 After the returned progress object reports that the operation has
9008 successfully completed, the media state will be set to <link
9009 to="MediaState_Created"/>, the hard disk will be remembered by this
9010 VirtualBox installation and may be attached to virtual machines.
9011
9012 <result name="VBOX_E_NOT_SUPPORTED">
9013 Dynamic storage creation operation is not supported. See <link
9014 to="IHardDiskFormat::capabilities"/>.
9015 </result>
9016 </desc>
9017 <param name="logicalSize" type="unsigned long long" dir="in">
9018 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9019 </param>
9020 <param name="variant" type="HardDiskVariant" dir="in">
9021 <desc>Exact image variant which should be created.</desc>
9022 </param>
9023 <param name="progress" type="IProgress" dir="return">
9024 <desc>Progress object to track the operation completion.</desc>
9025 </param>
9026 </method>
9027
9028 <method name="createFixedStorage">
9029 <desc>
9030 Starts creating a fixed-size hard disk storage unit in the background.
9031 The previous storage unit created for this object, if
9032 any, must be first deleted using <link to="#deleteStorage"/>, otherwise
9033 the operation will fail.
9034
9035 Before the operation starts, the hard disk is placed to
9036 <link to="MediaState_Creating"/> state. If the create operation
9037 fails, the media will placed back to <link to="MediaState_NotCreated"/>
9038 state.
9039
9040 After the returned progress object reports that the operation is
9041 successfully complete, the media state will be set to <link
9042 to="MediaState_Created"/>, the hard disk will be remembered by this
9043 VirtualBox installation and may be attached to virtual machines.
9044
9045 <result name="VBOX_E_NOT_SUPPORTED">
9046 Fixed storage creation operation is not supported. See
9047 <link to="IHardDiskFormat::capabilities"/>.
9048 </result>
9049 </desc>
9050 <param name="logicalSize" type="unsigned long long" dir="in">
9051 <desc>Logical size of the hard disk in megabytes.</desc>
9052 </param>
9053 <param name="variant" type="HardDiskVariant" dir="in">
9054 <desc>Exact image variant which should be created.</desc>
9055 </param>
9056 <param name="progress" type="IProgress" dir="return">
9057 <desc>Progress object to track the operation completion.</desc>
9058 </param>
9059 </method>
9060
9061 <method name="deleteStorage">
9062 <desc>
9063 Starts deleting the storage unit of this hard disk.
9064
9065 The hard disk must not be attached to any known virtual machine and must
9066 not have any known child hard disks, otherwise the operation will fail.
9067 It will also fail if there is no storage unit to delete or if deletion
9068 is already in progress, or if the hard disk is being in use (locked for
9069 read or for write) or inaccessible. Therefore, the only valid state for
9070 this operation to succeed is <link to="MediaState_Created"/>.
9071
9072 Before the operation starts, the hard disk is placed to
9073 <link to="MediaState_Deleting"/> state and gets removed from the list
9074 of remembered hard disks (media registry). If the delete operation
9075 fails, the media will be remembered again and placed back to
9076 <link to="MediaState_Created"/> state.
9077
9078 After the returned progress object reports that the operation is
9079 complete, the media state will be set to
9080 <link to="MediaState_NotCreated"/> and you will be able to use one of
9081 the storage creation methods to create it again.
9082
9083 <see>#close()</see>
9084
9085 <result name="VBOX_E_OBJECT_IN_USE">
9086 Hard disk is attached to a virtual machine.
9087 </result>
9088 <result name="VBOX_E_NOT_SUPPORTED">
9089 Storage deletion is not allowed because neither of storage creation
9090 operations are supported. See
9091 <link to="IHardDiskFormat::capabilities"/>.
9092 </result>
9093
9094 <note>
9095 If the deletion operation fails, it is not guaranteed that the storage
9096 unit still exists. You may check the <link to="IMedium::state"/> value
9097 to answer this question.
9098 </note>
9099 </desc>
9100 <param name="progress" type="IProgress" dir="return">
9101 <desc>Progress object to track the operation completion.</desc>
9102 </param>
9103 </method>
9104
9105 <!-- diff methods -->
9106
9107 <method name="createDiffStorage">
9108 <desc>
9109 Starts creating an empty differencing storage unit based on this hard
9110 disk in the format and at the location defined by the @a target
9111 argument.
9112
9113 The target hard disk must be in <link to="MediaState_NotCreated"/>
9114 state (i.e. must not have an existing storage unit). Upon successful
9115 completion, this operation will set the type of the target hard disk to
9116 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9117 represent the differencing hard disk data in the given format (according
9118 to the storage format of the target object).
9119
9120 After the returned progress object reports that the operation is
9121 successfully complete, the target hard disk gets remembered by this
9122 VirtualBox installation and may be attached to virtual machines.
9123
9124 <note>
9125 The hard disk will be set to <link to="MediaState_LockedRead"/>
9126 state for the duration of this operation.
9127 </note>
9128 <result name="VBOX_E_OBJECT_IN_USE">
9129 Hard disk not in NotCreated state.
9130 </result>
9131 </desc>
9132 <param name="target" type="IHardDisk" dir="in">
9133 <desc>Target hard disk.</desc>
9134 </param>
9135 <param name="variant" type="HardDiskVariant" dir="in">
9136 <desc>Exact image variant which should be created.</desc>
9137 </param>
9138 <param name="progress" type="IProgress" dir="return">
9139 <desc>Progress object to track the operation completion.</desc>
9140 </param>
9141 </method>
9142
9143 <method name="mergeTo">
9144 <desc>
9145 Starts merging the contents of this hard disk and all intermediate
9146 differencing hard disks in the chain to the given target hard disk.
9147
9148 The target hard disk must be either a descendant of this hard disk or
9149 its ancestor (otherwise this method will immediately return a failure).
9150 It follows that there are two logical directions of the merge operation:
9151 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9152 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9153 chain:
9154
9155 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9156
9157 Here, calling this method on the <tt>Base</tt> hard disk object with
9158 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9159 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9160 merge. Note that in both cases the contents of the resulting hard disk
9161 will be the same, the only difference is the hard disk object that takes
9162 the result of the merge operation. In case of the forward merge in the
9163 above example, the result will be written to <tt>Diff_2</tt>; in case of
9164 the backward merge, the result will be written to <tt>Base</tt>. In
9165 other words, the result of the operation is always stored in the target
9166 hard disk.
9167
9168 Upon successful operation completion, the storage units of all hard
9169 disks in the chain between this (source) hard disk and the target hard
9170 disk, including the source hard disk itself, will be automatically
9171 deleted and the relevant hard disk objects (including this hard disk)
9172 will become uninitialized. This means that any attempt to call any of
9173 their methods or attributes will fail with the
9174 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9175 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9176 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9177 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9178 disk itself since it will no longer be based on any other hard disk.
9179
9180 Considering the above, all of the following conditions must be met in
9181 order for the merge operation to succeed:
9182 <ul>
9183 <li>
9184 Neither this (source) hard disk nor any intermediate
9185 differencing hard disk in the chain between it and the target
9186 hard disk is attached to any virtual machine.
9187 </li>
9188 <li>
9189 Neither the source hard disk nor the target hard disk is an
9190 <link to="HardDiskType_Immutable"/> hard disk.
9191 </li>
9192 <li>
9193 The part of the hard disk tree from the source hard disk to the
9194 target hard disk is a linear chain, i.e. all hard disks in this
9195 chain have exactly one child which is the next hard disk in this
9196 chain. The only exception from this rule is the target hard disk in
9197 the forward merge operation; it is allowed to have any number of
9198 child hard disks because the merge operation will hot change its
9199 logical contents (as it is seen by the guest OS or by children).
9200 </li>
9201 <li>
9202 None of the involved hard disks are in
9203 <link to="MediaState_LockedRead"/> or
9204 <link to="MediaState_LockedWrite"/> state.
9205 </li>
9206 </ul>
9207
9208 <note>
9209 This (source) hard disk and all intermediates will be placed to <link
9210 to="MediaState_Deleting"/> state and the target hard disk will be
9211 placed to <link to="MediaState_LockedWrite"/> state and for the
9212 duration of this operation.
9213 </note>
9214 </desc>
9215 <param name="targetId" type="uuid" dir="in">
9216 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9217 </param>
9218 <param name="progress" type="IProgress" dir="return">
9219 <desc>Progress object to track the operation completion.</desc>
9220 </param>
9221 </method>
9222
9223 <!-- clone methods -->
9224
9225 <method name="cloneTo">
9226 <desc>
9227 Starts creating a clone of this hard disk in the format and at the
9228 location defined by the @a target argument.
9229
9230 The target hard disk must be in <link to="MediaState_NotCreated"/>
9231 state (i.e. must not have an existing storage unit). Upon successful
9232 completion, the cloned hard disk will contain exactly the same sector
9233 data as the hard disk being cloned, except that a new UUID for the clone
9234 will be randomly generated.
9235
9236 After the returned progress object reports that the operation is
9237 successfully complete, the target hard disk gets remembered by this
9238 VirtualBox installation and may be attached to virtual machines.
9239
9240 <note>
9241 If the cloned hard disk is a differencing hard disk, it will inherit
9242 parent dependency of the original hard disk.
9243 </note>
9244 <note>
9245 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9246 state for the duration of this operation.
9247 </note>
9248 </desc>
9249 <param name="target" type="IHardDisk" dir="in">
9250 <desc>Target hard disk.</desc>
9251 </param>
9252 <param name="variant" type="HardDiskVariant" dir="in">
9253 <desc>Exact image variant which should be created.</desc>
9254 </param>
9255 <param name="progress" type="IProgress" dir="return">
9256 <desc>Progress object to track the operation completion.</desc>
9257 </param>
9258 </method>
9259
9260 <method name="flattenTo">
9261 <desc>
9262 Starts creating a deep (independent) clone of this hard disk in the
9263 format and at the location defined by the @a target argument.
9264
9265 This operation is similar to <link to="#cloneTo"/> except that when
9266 applied to a differencing hard disk, it will also copy missing hard disk
9267 data from all parent hard disks it is linked to. This will make the
9268 created clone an independent base hard disk that contains all hard disk
9269 data and does not need any other hard disks to operate.
9270
9271 After the returned progress object reports that the operation is
9272 successfully complete, the target hard disk gets remembered by this
9273 VirtualBox installation and may be attached to virtual machines.
9274
9275 <note>
9276 For base hard disks, this operation is identical to
9277 <link to="#cloneTo"/>.
9278 </note>
9279 <note>
9280 This hard disk and all its parent hard disks will be placed to <link
9281 to="MediaState_LockedRead"/> state for the duration of this
9282 operation.
9283 </note>
9284 </desc>
9285 <param name="target" type="IHardDisk" dir="in">
9286 <desc>Target hard disk.</desc>
9287 </param>
9288 <param name="variant" type="HardDiskVariant" dir="in">
9289 <desc>Exact image variant which should be created.</desc>
9290 </param>
9291 <param name="progress" type="IProgress" dir="return">
9292 <desc>Progress object to track the operation completion.</desc>
9293 </param>
9294 </method>
9295
9296 <!-- other methods -->
9297
9298 <method name="compact">
9299 <desc>
9300 Starts compacting of this hard disk. This means that the disk is
9301 transformed into a possibly more compact storage representation.
9302 This potentially creates temporary images, which can require a
9303 substantial amount of additional disk space.
9304
9305 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9306 state and all its parent hard disks (if any) will be placed to
9307 <link to="MediaState_LockedRead"/> state for the duration of this
9308 operation.
9309 </desc>
9310 <param name="progress" type="IProgress" dir="return">
9311 <desc>Progress object to track the operation completion.</desc>
9312 </param>
9313 </method>
9314
9315 <method name="reset">
9316 <desc>
9317 Starts erasing the contents of this differencing hard disk.
9318
9319 This operation will reset the differencing hard disk to its initial
9320 state when it does not contain any sector data and any read operation is
9321 redirected to its parent hard disk.
9322
9323 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9324 for the duration of this operation.
9325
9326 <result name="VBOX_E_NOT_SUPPORTED">
9327 This is not a differencing hard disk.
9328 </result>
9329 <result name="VBOX_E_INVALID_OBJECT_STATE">
9330 Hard disk is not in <link to="MediaState_Created"/> or
9331 <link to="MediaState_Inaccessible"/> state.
9332 </result>
9333 </desc>
9334 <param name="progress" type="IProgress" dir="return">
9335 <desc>Progress object to track the operation completion.</desc>
9336 </param>
9337 </method>
9338
9339 </interface>
9340
9341
9342 <!--
9343 // IHardDiskFormat
9344 /////////////////////////////////////////////////////////////////////////
9345 -->
9346
9347 <enum
9348 name="DataType"
9349 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9350 >
9351 <const name="Int32" value="0"/>
9352 <const name="Int8" value="1"/>
9353 <const name="String" value="2"/>
9354 </enum>
9355
9356 <enum
9357 name="DataFlags"
9358 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9359 >
9360 <const name="None" value="0x00"/>
9361 <const name="Mandatory" value="0x01"/>
9362 <const name="Expert" value="0x02"/>
9363 <const name="Array" value="0x04"/>
9364 <const name="FlagMask" value="0x07"/>
9365 </enum>
9366
9367 <enum
9368 name="HardDiskFormatCapabilities"
9369 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9370 >
9371 <desc>
9372 Hard disk format capability flags.
9373 </desc>
9374
9375 <const name="Uuid" value="0x01">
9376 <desc>
9377 Supports UUIDs as expected by VirtualBox code.
9378 </desc>
9379 </const>
9380
9381 <const name="CreateFixed" value="0x02">
9382 <desc>
9383 Supports creating fixed size images, allocating all space instantly.
9384 </desc>
9385 </const>
9386
9387 <const name="CreateDynamic" value="0x04">
9388 <desc>
9389 Supports creating dynamically growing images, allocating space on
9390 demand.
9391 </desc>
9392 </const>
9393
9394 <const name="CreateSplit2G" value="0x08">
9395 <desc>
9396 Supports creating images split in chunks of a bit less than 2 GBytes.
9397 </desc>
9398 </const>
9399
9400 <const name="Differencing" value="0x10">
9401 <desc>
9402 Supports being used as a format for differencing hard disks (see <link
9403 to="IHardDisk::createDiffStorage"/>).
9404 </desc>
9405 </const>
9406
9407 <const name="Asynchronous" value="0x20">
9408 <desc>
9409 Supports asynchronous I/O operations for at least some configurations.
9410 </desc>
9411 </const>
9412
9413 <const name="File" value="0x40">
9414 <desc>
9415 The format backend operates on files (the <link to="IMedium::location"/>
9416 attribute of the hard disk specifies a file used to store hard disk
9417 data; for a list of supported file extensions see
9418 <link to="IHardDiskFormat::fileExtensions"/>).
9419 </desc>
9420 </const>
9421
9422 <const name="Properties" value="0x80">
9423 <desc>
9424 The format backend uses the property interface to configure the storage
9425 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9426 method is used to get access to properties supported by the given hard
9427 disk format).
9428 </desc>
9429 </const>
9430
9431 <const name="CapabilityMask" value="0xFF"/>
9432 </enum>
9433
9434 <interface
9435 name="IHardDiskFormat" extends="$unknown"
9436 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9437 wsmap="managed"
9438 >
9439 <desc>
9440 The IHardDiskFormat interface represents a virtual hard disk format.
9441
9442 Each hard disk format has an associated backend which is used to handle
9443 hard disks stored in this format. This interface provides information
9444 about the properties of the associated backend.
9445
9446 Each hard disk format is identified by a string represented by the
9447 <link to="#id"/> attribute. This string is used in calls like
9448 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9449 format.
9450
9451 The list of all supported hard disk formats can be obtained using
9452 <link to="ISystemProperties::hardDiskFormats"/>.
9453
9454 <see>IHardDisk</see>
9455 </desc>
9456
9457 <attribute name="id" type="wstring" readonly="yes">
9458 <desc>
9459 Identifier of this format.
9460
9461 The format identifier is a non-null non-empty ASCII string. Note that
9462 this string is case-insensitive. This means that, for example, all of
9463 the following strings:
9464 <pre>
9465 "VDI"
9466 "vdi"
9467 "VdI"</pre>
9468 refer to the same hard disk format.
9469
9470 This string is used in methods of other interfaces where it is necessary
9471 to specify a hard disk format, such as
9472 <link to="IVirtualBox::createHardDisk"/>.
9473 </desc>
9474 </attribute>
9475
9476 <attribute name="name" type="wstring" readonly="yes">
9477 <desc>
9478 Human readable description of this format.
9479
9480 Mainly for use in file open dialogs.
9481 </desc>
9482 </attribute>
9483
9484 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9485 <desc>
9486 Array of strings containing the supported file extensions.
9487
9488 The first extension in the array is the extension preferred by the
9489 backend. It is recommended to use this extension when specifying a
9490 location of the storage unit for a new hard disk.
9491
9492 Note that some backends do not work on files, so this array may be
9493 empty.
9494
9495 <see>IHardDiskFormat::capabilities</see>
9496 </desc>
9497 </attribute>
9498
9499 <attribute name="capabilities" type="unsigned long" readonly="yes">
9500 <desc>
9501 Capabilities of the format as a set of bit flags.
9502
9503 For the meaning of individual capability flags see
9504 <link to="HardDiskFormatCapabilities"/>.
9505 </desc>
9506 </attribute>
9507
9508 <method name="describeProperties">
9509 <desc>
9510 Returns several arrays describing the properties supported by this
9511 format.
9512
9513 An element with the given index in each array describes one
9514 property. Thus, the number of elements in each returned array is the
9515 same and corresponds to the number of supported properties.
9516
9517 The returned arrays are filled in only if the
9518 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9519 All arguments must be non-NULL.
9520
9521 <see>DataType</see>
9522 <see>DataFlags</see>
9523 </desc>
9524
9525 <param name="names" type="wstring" safearray="yes" dir="out">
9526 <desc>Array of property names.</desc>
9527 </param>
9528 <param name="description" type="wstring" safearray="yes" dir="out">
9529 <desc>Array of property descriptions.</desc>
9530 </param>
9531 <param name="types" type="DataType" safearray="yes" dir="out">
9532 <desc>Array of property types.</desc>
9533 </param>
9534 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9535 <desc>Array of property flags.</desc>
9536 </param>
9537 <param name="defaults" type="wstring" safearray="yes" dir="out">
9538 <desc>Array of default property values.</desc>
9539 </param>
9540 </method>
9541
9542 </interface>
9543
9544
9545 <!--
9546 // IFloppyImage
9547 /////////////////////////////////////////////////////////////////////////
9548 -->
9549
9550 <interface
9551 name="IFloppyImage" extends="IMedium"
9552 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9553 wsmap="managed"
9554 >
9555 <desc>
9556 The IFloppyImage interface represents a medium containing the image
9557 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9558 </desc>
9559
9560 </interface>
9561
9562
9563 <!--
9564 // IDVDImage
9565 /////////////////////////////////////////////////////////////////////////
9566 -->
9567
9568 <interface
9569 name="IDVDImage" extends="IMedium"
9570 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9571 wsmap="managed"
9572 >
9573 <desc>
9574 The IDVDImage interface represents a medium containing the image
9575 of a CD or DVD disk in the ISO format.
9576
9577 This is a subclass of <link to="IMedium" />; see remarks there.
9578 </desc>
9579
9580 </interface>
9581
9582
9583 <!--
9584 // IDVDDrive
9585 /////////////////////////////////////////////////////////////////////////
9586 -->
9587
9588 <interface
9589 name="IDVDDrive" extends="$unknown"
9590 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9591 wsmap="managed"
9592 >
9593 <desc>
9594 The IDVDDrive interface represents the virtual CD/DVD drive of the
9595 virtual machine. An object of this type is returned by
9596 <link to="IMachine::DVDDrive"/>.
9597 </desc>
9598
9599 <attribute name="state" type="DriveState" readonly="yes">
9600 <desc>Current drive state.</desc>
9601 </attribute>
9602
9603 <attribute name="passthrough" type="boolean">
9604 <desc>
9605 When a host drive is mounted and passthrough is enabled
9606 the guest OS will be able to directly send SCSI commands to
9607 the host drive. This enables the guest OS to use CD/DVD writers
9608 but is potentially dangerous.
9609 </desc>
9610 </attribute>
9611
9612 <method name="mountImage">
9613 <desc>Mounts a CD/DVD image with the specified UUID.
9614
9615 <result name="VBOX_E_FILE_ERROR">
9616 Invalid image file location.
9617 </result>
9618 <result name="VBOX_E_OBJECT_NOT_FOUND">
9619 Could not find a CD/DVD image matching @a imageID.
9620 </result>
9621 <result name="VBOX_E_INVALID_OBJECT_STATE">
9622 Invalid media state.
9623 </result>
9624
9625 </desc>
9626 <param name="imageId" type="uuid" dir="in"/>
9627 </method>
9628
9629 <method name="captureHostDrive">
9630 <desc>Captures the specified host CD/DVD drive.</desc>
9631 <param name="drive" type="IHostDVDDrive" dir="in"/>
9632 </method>
9633
9634 <method name="unmount">
9635 <desc>Unmounts the currently mounted image or host drive.</desc>
9636 </method>
9637
9638 <method name="getImage">
9639 <desc>Returns the currently mounted CD/DVD image.</desc>
9640 <param name="image" type="IDVDImage" dir="return"/>
9641 </method>
9642
9643 <method name="getHostDrive">
9644 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9645 <param name="drive" type="IHostDVDDrive" dir="return"/>
9646 </method>
9647
9648 </interface>
9649
9650
9651 <!--
9652 // IFloppyDrive
9653 /////////////////////////////////////////////////////////////////////////
9654 -->
9655
9656 <interface
9657 name="IFloppyDrive" extends="$unknown"
9658 uuid="159412cd-bab8-452e-8097-218a020825a6"
9659 wsmap="managed"
9660 >
9661 <desc>
9662 The IFloppyDrive interface represents the virtual floppy drive of the
9663 virtual machine. An object of this type is returned by
9664 <link to="IMachine::floppyDrive" />.
9665 </desc>
9666
9667 <attribute name="enabled" type="boolean">
9668 <desc>
9669 Flag whether the floppy drive is enabled. If it is disabled,
9670 the floppy drive will not be reported to the guest OS.
9671 </desc>
9672 </attribute>
9673
9674 <attribute name="state" type="DriveState" readonly="yes">
9675 <desc>Current drive state.</desc>
9676 </attribute>
9677
9678 <method name="mountImage">
9679 <desc>Mounts a floppy image with the specified UUID.
9680
9681 <result name="VBOX_E_FILE_ERROR">
9682 Invalid image file location.
9683 </result>
9684 <result name="VBOX_E_OBJECT_NOT_FOUND">
9685 Could not find a floppy image matching @a imageID.
9686 </result>
9687 <result name="VBOX_E_INVALID_OBJECT_STATE">
9688 Invalid media state.
9689 </result>
9690
9691 </desc>
9692 <param name="imageId" type="uuid" dir="in"/>
9693 </method>
9694
9695 <method name="captureHostDrive">
9696 <desc>Captures the specified host floppy drive.</desc>
9697 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9698 </method>
9699
9700 <method name="unmount">
9701 <desc>Unmounts the currently mounted image or host drive.</desc>
9702 </method>
9703
9704 <method name="getImage">
9705 <desc>Returns the currently mounted floppy image.</desc>
9706 <param name="image" type="IFloppyImage" dir="return"/>
9707 </method>
9708
9709 <method name="getHostDrive">
9710 <desc>Returns the currently mounted host floppy drive.</desc>
9711 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9712 </method>
9713
9714 </interface>
9715
9716
9717 <!--
9718 // IKeyboard
9719 /////////////////////////////////////////////////////////////////////////
9720 -->
9721
9722 <interface
9723 name="IKeyboard" extends="$unknown"
9724 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9725 wsmap="managed"
9726 >
9727 <desc>
9728 The IKeyboard interface represents the virtual machine's keyboard. Used
9729 in <link to="IConsole::keyboard"/>.
9730
9731 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9732 to the virtual machine.
9733
9734 </desc>
9735 <method name="putScancode">
9736 <desc>Sends a scancode to the keyboard.
9737
9738 <result name="VBOX_E_IPRT_ERROR">
9739 Could not send scan code to virtual keyboard.
9740 </result>
9741
9742 </desc>
9743 <param name="scancode" type="long" dir="in"/>
9744 </method>
9745
9746 <method name="putScancodes">
9747 <desc>Sends an array of scancodes to the keyboard.
9748
9749 <result name="VBOX_E_IPRT_ERROR">
9750 Could not send all scan codes to virtual keyboard.
9751 </result>
9752
9753 </desc>
9754 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9755 <param name="codesStored" type="unsigned long" dir="return"/>
9756 </method>
9757
9758 <method name="putCAD">
9759 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9760 function is nothing special, it is just a convenience function
9761 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9762
9763 <result name="VBOX_E_IPRT_ERROR">
9764 Could not send all scan codes to virtual keyboard.
9765 </result>
9766
9767 </desc>
9768 </method>
9769
9770 </interface>
9771
9772
9773 <!--
9774 // IMouse
9775 /////////////////////////////////////////////////////////////////////////
9776 -->
9777
9778 <enum
9779 name="MouseButtonState"
9780 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9781 >
9782 <desc>
9783 Mouse button state.
9784 </desc>
9785
9786 <const name="LeftButton" value="0x01"/>
9787 <const name="RightButton" value="0x02"/>
9788 <const name="MiddleButton" value="0x04"/>
9789 <const name="WheelUp" value="0x08"/>
9790 <const name="WheelDown" value="0x10"/>
9791 <const name="MouseStateMask" value="0x1F"/>
9792 </enum>
9793
9794 <interface
9795 name="IMouse" extends="$unknown"
9796 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9797 wsmap="managed"
9798 >
9799 <desc>
9800 The IMouse interface represents the virtual machine's mouse. Used in
9801 <link to="IConsole::mouse"/>.
9802
9803 Through this interface, the virtual machine's virtual mouse can be
9804 controlled.
9805 </desc>
9806
9807 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9808 <desc>
9809 Whether the guest OS supports absolute mouse pointer positioning
9810 or not.
9811 <note>
9812 VirtualBox Guest Tools need to be installed to the guest OS
9813 in order to enable absolute mouse positioning support.
9814 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9815 callback to be instantly informed about changes of this attribute
9816 during virtual machine execution.
9817 </note>
9818 <see><link to="#putMouseEventAbsolute"/></see>
9819 </desc>
9820 </attribute>
9821
9822 <method name="putMouseEvent">
9823 <desc>
9824 Initiates a mouse event using relative pointer movements
9825 along x and y axis.
9826
9827 <result name="E_ACCESSDENIED">
9828 Console not powered up.
9829 </result>
9830 <result name="VBOX_E_IPRT_ERROR">
9831 Could not send mouse event to virtual mouse.
9832 </result>
9833
9834 </desc>
9835
9836 <param name="dx" type="long" dir="in">
9837 <desc>
9838 Amount of pixels the mouse should move to the right.
9839 Negative values move the mouse to the left.
9840 </desc>
9841 </param>
9842 <param name="dy" type="long" dir="in">
9843 <desc>
9844 Amount of pixels the mouse should move downwards.
9845 Negative values move the mouse upwards.
9846 </desc>
9847 </param>
9848 <param name="dz" type="long" dir="in">
9849 <desc>
9850 Amount of mouse wheel moves.
9851 Positive values describe clockwise wheel rotations,
9852 negative values describe counterclockwise rotations.
9853 </desc>
9854 </param>
9855 <param name="buttonState" type="long" dir="in">
9856 <desc>
9857 The current state of mouse buttons. Every bit represents
9858 a mouse button as follows:
9859 <table>
9860 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9861 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9862 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9863 </table>
9864 A value of <tt>1</tt> means the corresponding button is pressed.
9865 otherwise it is released.
9866 </desc>
9867 </param>
9868 </method>
9869
9870 <method name="putMouseEventAbsolute">
9871 <desc>
9872 Positions the mouse pointer using absolute x and y coordinates.
9873 These coordinates are expressed in pixels and
9874 start from <tt>[1,1]</tt> which corresponds to the top left
9875 corner of the virtual display.
9876
9877 <result name="E_ACCESSDENIED">
9878 Console not powered up.
9879 </result>
9880 <result name="VBOX_E_IPRT_ERROR">
9881 Could not send mouse event to virtual mouse.
9882 </result>
9883
9884 <note>
9885 This method will have effect only if absolute mouse
9886 positioning is supported by the guest OS.
9887 </note>
9888
9889 <see><link to="#absoluteSupported"/></see>
9890 </desc>
9891
9892 <param name="x" type="long" dir="in">
9893 <desc>
9894 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
9895 </desc>
9896 </param>
9897 <param name="y" type="long" dir="in">
9898 <desc>
9899 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
9900 </desc>
9901 </param>
9902 <param name="dz" type="long" dir="in">
9903 <desc>
9904 Amount of mouse wheel moves.
9905 Positive values describe clockwise wheel rotations,
9906 negative values describe counterclockwise rotations.
9907 </desc>
9908 </param>
9909 <param name="buttonState" type="long" dir="in">
9910 <desc>
9911 The current state of mouse buttons. Every bit represents
9912 a mouse button as follows:
9913 <table>
9914 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
9915 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
9916 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
9917 </table>
9918 A value of <tt>1</tt> means the corresponding button is pressed.
9919 otherwise it is released.
9920 </desc>
9921 </param>
9922 </method>
9923
9924 </interface>
9925
9926 <!--
9927 // IDisplay
9928 /////////////////////////////////////////////////////////////////////////
9929 -->
9930
9931 <enum
9932 name="FramebufferAccelerationOperation"
9933 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
9934 >
9935 <desc>
9936 Frame buffer acceleration operation.
9937 </desc>
9938
9939 <const name="SolidFillAcceleration" value="1"/>
9940 <const name="ScreenCopyAcceleration" value="2"/>
9941 </enum>
9942
9943 <enum
9944 name="FramebufferPixelFormat"
9945 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
9946 >
9947 <desc>
9948 Format of the video memory buffer. Constants represented by this enum can
9949 be used to test for particular values of <link
9950 to="IFramebuffer::pixelFormat"/>. See also <link
9951 to="IFramebuffer::requestResize"/>.
9952
9953 See also www.fourcc.org for more information about FOURCC pixel formats.
9954 </desc>
9955
9956 <const name="Opaque" value="0">
9957 <desc>
9958 Unknown buffer format (the user may not assume any particular format of
9959 the buffer).
9960 </desc>
9961 </const>
9962 <const name="FOURCC_RGB" value="0x32424752">
9963 <desc>
9964 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
9965 bit layout).
9966 </desc>
9967 </const>
9968 </enum>
9969
9970 <interface
9971 name="IFramebuffer" extends="$unknown"
9972 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
9973 wsmap="suppress"
9974 >
9975 <attribute name="address" type="octet" mod="ptr" readonly="yes">
9976 <desc>Address of the start byte of the frame buffer.</desc>
9977 </attribute>
9978
9979 <attribute name="width" type="unsigned long" readonly="yes">
9980 <desc>Frame buffer width, in pixels.</desc>
9981 </attribute>
9982
9983 <attribute name="height" type="unsigned long" readonly="yes">
9984 <desc>Frame buffer height, in pixels.</desc>
9985 </attribute>
9986
9987 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
9988 <desc>
9989 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
9990 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
9991 are: 8, 15, 16, 24 and 32.
9992 </desc>
9993 </attribute>
9994
9995 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
9996 <desc>
9997 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
9998 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
9999 size of the scan line must be aligned to 32 bits.
10000 </desc>
10001 </attribute>
10002
10003 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10004 <desc>
10005 Frame buffer pixel format. It's either one of the values defined by <link
10006 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10007 <note>
10008 This attribute must never return <link
10009 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10010 <link to="#address"/> points to must be always known.
10011 </note>
10012 </desc>
10013 </attribute>
10014
10015 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10016 <desc>
10017 Defines whether this frame buffer uses the virtual video card's memory
10018 buffer (guest VRAM) directly or not. See <link
10019 to="IFramebuffer::requestResize"/> for more information.
10020 </desc>
10021 </attribute>
10022
10023 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10024 <desc>
10025 Hint from the frame buffer about how much of the standard
10026 screen height it wants to use for itself. This information is
10027 exposed to the guest through the VESA BIOS and VMMDev interface
10028 so that it can use it for determining its video mode table. It
10029 is not guaranteed that the guest respects the value.
10030 </desc>
10031 </attribute>
10032
10033 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10034 <desc>
10035 An alpha-blended overlay which is superposed over the frame buffer.
10036 The initial purpose is to allow the display of icons providing
10037 information about the VM state, including disk activity, in front
10038 ends which do not have other means of doing that. The overlay is
10039 designed to controlled exclusively by IDisplay. It has no locking
10040 of its own, and any changes made to it are not guaranteed to be
10041 visible until the affected portion of IFramebuffer is updated. The
10042 overlay can be created lazily the first time it is requested. This
10043 attribute can also return NULL to signal that the overlay is not
10044 implemented.
10045 </desc>
10046 </attribute>
10047
10048 <attribute name="winId" type="unsigned long long" readonly="yes">
10049 <desc>
10050 Platform-dependent identifier of the window where context of this
10051 frame buffer is drawn, or zero if there's no such window.
10052 </desc>
10053 </attribute>
10054
10055 <method name="lock">
10056 <desc>
10057 Locks the frame buffer.
10058 Gets called by the IDisplay object where this frame buffer is
10059 bound to.
10060 </desc>
10061 </method>
10062
10063 <method name="unlock">
10064 <desc>
10065 Unlocks the frame buffer.
10066 Gets called by the IDisplay object where this frame buffer is
10067 bound to.
10068 </desc>
10069 </method>
10070
10071 <method name="notifyUpdate">
10072 <desc>
10073 Informs about an update.
10074 Gets called by the display object where this buffer is
10075 registered.
10076 </desc>
10077 <param name="x" type="unsigned long" dir="in"/>
10078 <param name="y" type="unsigned long" dir="in"/>
10079 <param name="width" type="unsigned long" dir="in"/>
10080 <param name="height" type="unsigned long" dir="in"/>
10081 <param name="finished" type="boolean" dir="return"/>
10082 </method>
10083
10084 <method name="requestResize">
10085 <desc>
10086 Requests a size and pixel format change.
10087
10088 There are two modes of working with the video buffer of the virtual
10089 machine. The <i>indirect</i> mode implies that the IFramebuffer
10090 implementation allocates a memory buffer for the requested display mode
10091 and provides it to the virtual machine. In <i>direct</i> mode, the
10092 IFramebuffer implementation uses the memory buffer allocated and owned
10093 by the virtual machine. This buffer represents the video memory of the
10094 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10095 usually faster because the implementation gets a raw pointer to the
10096 guest VRAM buffer which it can directly use for visualizing the contents
10097 of the virtual display, as opposed to the indirect mode where the
10098 contents of guest VRAM are copied to the memory buffer provided by
10099 the implementation every time a display update occurs.
10100
10101 It is important to note that the direct mode is really fast only when
10102 the implementation uses the given guest VRAM buffer directly, for
10103 example, by blitting it to the window representing the virtual machine's
10104 display, which saves at least one copy operation comparing to the
10105 indirect mode. However, using the guest VRAM buffer directly is not
10106 always possible: the format and the color depth of this buffer may be
10107 not supported by the target window, or it may be unknown (opaque) as in
10108 case of text or non-linear multi-plane VGA video modes. In this case,
10109 the indirect mode (that is always available) should be used as a
10110 fallback: when the guest VRAM contents are copied to the
10111 implementation-provided memory buffer, color and format conversion is
10112 done automatically by the underlying code.
10113
10114 The @a pixelFormat parameter defines whether the direct mode is
10115 available or not. If @a pixelFormat is <link
10116 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10117 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10118 @a bytesPerLine parameters must be ignored and the implementation must use
10119 the indirect mode (where it provides its own buffer in one of the
10120 supported formats). In all other cases, @a pixelFormat together with
10121 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10122 buffer pointed to by the @a VRAM parameter and the implementation is
10123 free to choose which mode to use. To indicate that this frame buffer uses
10124 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10125 attribute must return <tt>true</tt> and <link to="#address"/> must
10126 return exactly the same address that is passed in the @a VRAM parameter
10127 of this method; otherwise it is assumed that the indirect strategy is
10128 chosen.
10129
10130 The @a width and @a height parameters represent the size of the
10131 requested display mode in both modes. In case of indirect mode, the
10132 provided memory buffer should be big enough to store data of the given
10133 display mode. In case of direct mode, it is guaranteed that the given
10134 @a VRAM buffer contains enough space to represent the display mode of the
10135 given size. Note that this frame buffer's <link to="#width"/> and <link
10136 to="#height"/> attributes must return exactly the same values as
10137 passed to this method after the resize is completed (see below).
10138
10139 The @a finished output parameter determines if the implementation has
10140 finished resizing the frame buffer or not. If, for some reason, the
10141 resize cannot be finished immediately during this call, @a finished
10142 must be set to @c false, and the implementation must call
10143 <link to="IDisplay::resizeCompleted"/> after it has returned from
10144 this method as soon as possible. If @a finished is @c false, the
10145 machine will not call any frame buffer methods until
10146 <link to="IDisplay::resizeCompleted"/> is called.
10147
10148 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10149 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10150 this frame buffer must return exactly the same values as specified in the
10151 parameters of this method, after the resize is completed. If the
10152 indirect mode is chosen, these attributes must return values describing
10153 the format of the implementation's own memory buffer <link
10154 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10155 value must always correlate with <link to="#pixelFormat"/>. Note that
10156 the <link to="#pixelFormat"/> attribute must never return <link
10157 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10158
10159 <note>
10160 This method is called by the IDisplay object under the
10161 <link to="#lock"/> provided by this IFramebuffer
10162 implementation. If this method returns @c false in @a finished, then
10163 this lock is not released until
10164 <link to="IDisplay::resizeCompleted"/> is called.
10165 </note>
10166 </desc>
10167 <param name="screenId" type="unsigned long" dir="in">
10168 <desc>
10169 Logical screen number. Must be used in the corresponding call to
10170 <link to="IDisplay::resizeCompleted"/> if this call is made.
10171 </desc>
10172 </param>
10173 <param name="pixelFormat" type="unsigned long" dir="in">
10174 <desc>
10175 Pixel format of the memory buffer pointed to by @a VRAM.
10176 See also <link to="FramebufferPixelFormat"/>.
10177 </desc>
10178 </param>
10179 <param name="VRAM" type="octet" mod="ptr" dir="in">
10180 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10181 </param>
10182 <param name="bitsPerPixel" type="unsigned long" dir="in">
10183 <desc>Color depth, bits per pixel.</desc>
10184 </param>
10185 <param name="bytesPerLine" type="unsigned long" dir="in">
10186 <desc>Size of one scan line, in bytes.</desc>
10187 </param>
10188 <param name="width" type="unsigned long" dir="in">
10189 <desc>Width of the guest display, in pixels.</desc>
10190 </param>
10191 <param name="height" type="unsigned long" dir="in">
10192 <desc>Height of the guest display, in pixels.</desc>
10193 </param>
10194 <param name="finished" type="boolean" dir="return">
10195 <desc>
10196 Can the VM start using the new frame buffer immediately
10197 after this method returns or it should wait for
10198 <link to="IDisplay::resizeCompleted"/>.
10199 </desc>
10200 </param>
10201 </method>
10202
10203 <method name="operationSupported">
10204 <desc>
10205 Returns whether the given acceleration operation is supported
10206 by the IFramebuffer implementation. If not, the display object
10207 will not attempt to call the corresponding IFramebuffer entry
10208 point. Even if an operation is indicated as supported, the
10209 IFramebuffer implementation always has the option to return non
10210 supported from the corresponding acceleration method in which
10211 case the operation will be performed by the display engine. This
10212 allows for reduced IFramebuffer implementation complexity where
10213 only common cases are handled.
10214 </desc>
10215 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10216 <param name="supported" type="boolean" dir="return"/>
10217 </method>
10218
10219 <method name="videoModeSupported">
10220 <desc>
10221 Returns whether the frame buffer implementation is willing to
10222 support a given video mode. In case it is not able to render
10223 the video mode (or for some reason not willing), it should
10224 return false. Usually this method is called when the guest
10225 asks the VMM device whether a given video mode is supported
10226 so the information returned is directly exposed to the guest.
10227 It is important that this method returns very quickly.
10228 </desc>
10229 <param name="width" type="unsigned long" dir="in"/>
10230 <param name="height" type="unsigned long" dir="in"/>
10231 <param name="bpp" type="unsigned long" dir="in"/>
10232 <param name="supported" type="boolean" dir="return"/>
10233 </method>
10234
10235 <method name="solidFill">
10236 <desc>
10237 Fills the specified rectangle on screen with a solid color.
10238 </desc>
10239 <param name="x" type="unsigned long" dir="in"/>
10240 <param name="y" type="unsigned long" dir="in"/>
10241 <param name="width" type="unsigned long" dir="in"/>
10242 <param name="height" type="unsigned long" dir="in"/>
10243 <param name="color" type="unsigned long" dir="in"/>
10244 <param name="handled" type="boolean" dir="return"/>
10245 </method>
10246
10247 <method name="copyScreenBits">
10248 <desc>
10249 Copies specified rectangle on the screen.
10250 </desc>
10251 <param name="xDst" type="unsigned long" dir="in"/>
10252 <param name="yDst" type="unsigned long" dir="in"/>
10253 <param name="xSrc" type="unsigned long" dir="in"/>
10254 <param name="ySrc" type="unsigned long" dir="in"/>
10255 <param name="width" type="unsigned long" dir="in"/>
10256 <param name="height" type="unsigned long" dir="in"/>
10257 <param name="handled" type="boolean" dir="return"/>
10258 </method>
10259
10260 <method name="getVisibleRegion">
10261 <desc>
10262 Returns the visible region of this frame buffer.
10263
10264 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10265 @a count parameter is ignored and the number of elements necessary to
10266 describe the current visible region is returned in @a countCopied.
10267
10268 If @a rectangles is not <tt>NULL</tt> but @a count is less
10269 than the required number of elements to store region data, the method
10270 will report a failure. If @a count is equal or greater than the
10271 required number of elements, then the actual number of elements copied
10272 to the provided array will be returned in @a countCopied.
10273
10274 <note>
10275 The address of the provided array must be in the process space of
10276 this IFramebuffer object.
10277 </note>
10278 <note>
10279 Method not yet implemented.
10280 </note>
10281 </desc>
10282 <param name="rectangles" type="octet" mod="ptr" dir="in">
10283 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10284 </param>
10285 <param name="count" type="unsigned long" dir="in">
10286 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10287 </param>
10288 <param name="countCopied" type="unsigned long" dir="return">
10289 <desc>Number of elements copied to the @a rectangles array.</desc>
10290 </param>
10291 </method>
10292
10293 <method name="setVisibleRegion">
10294 <desc>
10295 Suggests a new visible region to this frame buffer. This region
10296 represents the area of the VM display which is a union of regions of
10297 all top-level windows of the guest operating system running inside the
10298 VM (if the Guest Additions for this system support this
10299 functionality). This information may be used by the frontends to
10300 implement the seamless desktop integration feature.
10301
10302 <note>
10303 The address of the provided array must be in the process space of
10304 this IFramebuffer object.
10305 </note>
10306 <note>
10307 The IFramebuffer implementation must make a copy of the provided
10308 array of rectangles.
10309 </note>
10310 <note>
10311 Method not yet implemented.
10312 </note>
10313 </desc>
10314 <param name="rectangles" type="octet" mod="ptr" dir="in">
10315 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10316 </param>
10317 <param name="count" type="unsigned long" dir="in">
10318 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10319 </param>
10320 </method>
10321
10322 </interface>
10323
10324 <interface
10325 name="IFramebufferOverlay" extends="IFramebuffer"
10326 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10327 wsmap="suppress"
10328 >
10329 <desc>
10330 The IFramebufferOverlay interface represents an alpha blended overlay
10331 for displaying status icons above an IFramebuffer. It is always created
10332 not visible, so that it must be explicitly shown. It only covers a
10333 portion of the IFramebuffer, determined by its width, height and
10334 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10335 that order) format, and may be written to directly. Do re-read the
10336 width though, after setting it, as it may be adjusted (increased) to
10337 make it more suitable for the front end.
10338 </desc>
10339 <attribute name="x" type="unsigned long" readonly="yes">
10340 <desc>X position of the overlay, relative to the frame buffer.</desc>
10341 </attribute>
10342
10343 <attribute name="y" type="unsigned long" readonly="yes">
10344 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10345 </attribute>
10346
10347 <attribute name="visible" type="boolean" readonly="no">
10348 <desc>
10349 Whether the overlay is currently visible.
10350 </desc>
10351 </attribute>
10352
10353 <attribute name="alpha" type="unsigned long" readonly="no">
10354 <desc>
10355 The global alpha value for the overlay. This may or may not be
10356 supported by a given front end.
10357 </desc>
10358 </attribute>
10359
10360 <method name="move">
10361 <desc>
10362 Changes the overlay's position relative to the IFramebuffer.
10363 </desc>
10364 <param name="x" type="unsigned long" dir="in"/>
10365 <param name="y" type="unsigned long" dir="in"/>
10366 </method>
10367
10368 </interface>
10369
10370 <interface
10371 name="IDisplay" extends="$unknown"
10372 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10373 wsmap="suppress"
10374 >
10375 <desc>
10376 The IDisplay interface represents the virtual machine's display.
10377
10378 The object implementing this interface is contained in each
10379 <link to="IConsole::display"/> attribute and represents the visual
10380 output of the virtual machine.
10381
10382 The virtual display supports pluggable output targets represented by the
10383 IFramebuffer interface. Examples of the output target are a window on
10384 the host computer or an RDP session's display on a remote computer.
10385 </desc>
10386 <attribute name="width" type="unsigned long" readonly="yes">
10387 <desc>Current display width.</desc>
10388 </attribute>
10389
10390 <attribute name="height" type="unsigned long" readonly="yes">
10391 <desc>Current display height.</desc>
10392 </attribute>
10393
10394 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10395 <desc>
10396 Current guest display color depth. Note that this may differ
10397 from <link to="IFramebuffer::bitsPerPixel"/>.
10398 </desc>
10399 </attribute>
10400
10401 <method name="setupInternalFramebuffer">
10402 <desc>
10403 Prepares an internally managed frame buffer.
10404 </desc>
10405 <param name="depth" type="unsigned long" dir="in"/>
10406 </method>
10407
10408 <method name="lockFramebuffer">
10409 <desc>
10410 Requests access to the internal frame buffer.
10411
10412 <result name="VBOX_E_NOT_SUPPORTED">
10413 Attempt to lock a non-internal frame buffer.
10414 </result>
10415
10416 </desc>
10417 <param name="address" type="octet" mod="ptr" dir="return"/>
10418 </method>
10419
10420 <method name="unlockFramebuffer">
10421 <desc>
10422 Releases access to the internal frame buffer.
10423
10424 <result name="VBOX_E_NOT_SUPPORTED">
10425 Attempt to unlock a non-internal frame buffer.
10426 </result>
10427
10428 </desc>
10429 </method>
10430
10431 <method name="registerExternalFramebuffer">
10432 <desc>
10433 Registers an external frame buffer.
10434 </desc>
10435 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10436 </method>
10437
10438 <method name="setFramebuffer">
10439 <desc>
10440 Sets the framebuffer for given screen.
10441 </desc>
10442 <param name="screenId" type="unsigned long" dir="in"/>
10443 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10444 </method>
10445
10446 <method name="getFramebuffer">
10447 <desc>
10448 Queries the framebuffer for given screen.
10449 </desc>
10450 <param name="screenId" type="unsigned long" dir="in"/>
10451 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10452 <param name="xOrigin" type="long" dir="out"/>
10453 <param name="yOrigin" type="long" dir="out"/>
10454 </method>
10455
10456 <method name="setVideoModeHint">
10457 <desc>
10458 Asks VirtualBox to request the given video mode from
10459 the guest. This is just a hint and it cannot be guaranteed
10460 that the requested resolution will be used. Guest Additions
10461 are required for the request to be seen by guests. The caller
10462 should issue the request and wait for a resolution change and
10463 after a timeout retry.
10464
10465 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10466 parameters means that the corresponding values should be taken from the
10467 current video mode (i.e. left unchanged).
10468
10469 If the guest OS supports multi-monitor configuration then the @a display
10470 parameter specifies the number of the guest display to send the hint to:
10471 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10472 so on. If the multi-monitor configuration is not supported, @a display
10473 must be <tt>0</tt>.
10474
10475 <result name="E_INVALIDARG">
10476 The @a display is not associated with any monitor.
10477 </result>
10478
10479 </desc>
10480 <param name="width" type="unsigned long" dir="in"/>
10481 <param name="height" type="unsigned long" dir="in"/>
10482 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10483 <param name="display" type="unsigned long" dir="in"/>
10484 </method>
10485
10486 <method name="setSeamlessMode">
10487 <desc>
10488 Enables or disables seamless guest display rendering (seamless desktop
10489 integration) mode.
10490 <note>
10491 Calling this method has no effect if <link
10492 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10493 </note>
10494 </desc>
10495 <param name="enabled" type="boolean" dir="in"/>
10496 </method>
10497
10498 <method name="takeScreenShot">
10499 <desc>
10500 Takes a screen shot of the requested size and copies it to the
10501 32-bpp buffer allocated by the caller.
10502
10503 <result name="E_NOTIMPL">
10504 Feature not implemented.
10505 </result>
10506 <result name="VBOX_E_IPRT_ERROR">
10507 Could not take a screenshot.
10508 </result>
10509
10510 </desc>
10511 <param name="address" type="octet" mod="ptr" dir="in"/>
10512 <param name="width" type="unsigned long" dir="in"/>
10513 <param name="height" type="unsigned long" dir="in"/>
10514 </method>
10515
10516 <method name="drawToScreen">
10517 <desc>
10518 Draws a 32-bpp image of the specified size from the given buffer
10519 to the given point on the VM display.
10520
10521 <result name="E_NOTIMPL">
10522 Feature not implemented.
10523 </result>
10524 <result name="VBOX_E_IPRT_ERROR">
10525 Could not draw to screen.
10526 </result>
10527
10528 </desc>
10529 <param name="address" type="octet" mod="ptr" dir="in"/>
10530 <param name="x" type="unsigned long" dir="in"/>
10531 <param name="y" type="unsigned long" dir="in"/>
10532 <param name="width" type="unsigned long" dir="in"/>
10533 <param name="height" type="unsigned long" dir="in"/>
10534 </method>
10535
10536 <method name="invalidateAndUpdate">
10537 <desc>
10538 Does a full invalidation of the VM display and instructs the VM
10539 to update it.
10540
10541 <result name="VBOX_E_IPRT_ERROR">
10542 Could not invalidate and update screen.
10543 </result>
10544
10545 </desc>
10546 </method>
10547
10548 <method name="resizeCompleted">
10549 <desc>
10550 Signals that a framebuffer has completed the resize operation.
10551
10552 <result name="VBOX_E_NOT_SUPPORTED">
10553 Operation only valid for external frame buffers.
10554 </result>
10555
10556 </desc>
10557 <param name="screenId" type="unsigned long" dir="in"/>
10558 </method>
10559
10560 <method name="updateCompleted">
10561 <desc>
10562 Signals that a framebuffer has completed the update operation.
10563
10564 <result name="VBOX_E_NOT_SUPPORTED">
10565 Operation only valid for external frame buffers.
10566 </result>
10567
10568 </desc>
10569 </method>
10570
10571 </interface>
10572
10573 <!--
10574 // INetworkAdapter
10575 /////////////////////////////////////////////////////////////////////////
10576 -->
10577
10578 <enum
10579 name="NetworkAttachmentType"
10580 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10581 >
10582 <desc>
10583 Network attachment type.
10584 </desc>
10585
10586 <const name="Null" value="0">
10587 <desc>Null value, also means "not attached".</desc>
10588 </const>
10589 <const name="NAT" value="1"/>
10590 <const name="Bridged" value="2"/>
10591 <const name="Internal" value="3"/>
10592 <const name="HostOnly" value="4"/>
10593 </enum>
10594
10595 <enum
10596 name="NetworkAdapterType"
10597 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10598 >
10599 <desc>
10600 Network adapter type.
10601 </desc>
10602
10603 <const name="Null" value="0">
10604 <desc>Null value (never used by the API).</desc>
10605 </const>
10606 <const name="Am79C970A" value="1"/>
10607 <const name="Am79C973" value="2"/>
10608 <const name="I82540EM" value="3"/>
10609 <const name="I82543GC" value="4"/>
10610 </enum>
10611
10612 <interface
10613 name="INetworkAdapter" extends="$unknown"
10614 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10615 wsmap="managed"
10616 >
10617 <desc>
10618 Represents a virtual network adapter that is attached to a virtual machine.
10619 Each virtual machine has a fixed number of network adapter slots with one
10620 instance of this attached to each of them. Call
10621 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10622 is attached to a given slot in a given machine.
10623
10624 Each network adapter can be in one of five attachment modes, which are
10625 represented by the <link to="NetworkAttachmentType" /> enumeration;
10626 see the <link to="#attachmentType" /> attribute.
10627 </desc>
10628
10629 <attribute name="adapterType" type="NetworkAdapterType">
10630 <desc>
10631 Type of the virtual network adapter. Depending on this value,
10632 VirtualBox will provide a different virtual network hardware
10633 to the guest.
10634 </desc>
10635 </attribute>
10636
10637 <attribute name="slot" type="unsigned long" readonly="yes">
10638 <desc>
10639 Slot number this adapter is plugged into. Corresponds to
10640 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10641 to obtain this instance.
10642 </desc>
10643 </attribute>
10644
10645 <attribute name="enabled" type="boolean">
10646 <desc>
10647 Flag whether the network adapter is present in the
10648 guest system. If disabled, the virtual guest hardware will
10649 not contain this network adapter. Can only be changed when
10650 the VM is not running.
10651 </desc>
10652 </attribute>
10653
10654 <attribute name="MACAddress" type="wstring">
10655 <desc>
10656 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10657 it to NULL, VirtualBox will generate a unique MAC address.
10658 </desc>
10659 </attribute>
10660
10661 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10662
10663 <attribute name="hostInterface" type="wstring">
10664 <desc>
10665 Name of the host network interface the VM is attached to.
10666 </desc>
10667 </attribute>
10668
10669 <attribute name="internalNetwork" type="wstring">
10670 <desc>
10671 Name of the internal network the VM is attached to.
10672 </desc>
10673 </attribute>
10674
10675 <attribute name="NATNetwork" type="wstring">
10676 <desc>
10677 Name of the NAT network the VM is attached to.
10678 </desc>
10679 </attribute>
10680
10681 <attribute name="cableConnected" type="boolean">
10682 <desc>
10683 Flag whether the adapter reports the cable as connected or not.
10684 It can be used to report offline situations to a VM.
10685 </desc>
10686 </attribute>
10687
10688 <attribute name="lineSpeed" type="unsigned long">
10689 <desc>
10690 Line speed reported by custom drivers, in units of 1 kbps.
10691 </desc>
10692 </attribute>
10693
10694 <attribute name="traceEnabled" type="boolean">
10695 <desc>
10696 Flag whether network traffic from/to the network card should be traced.
10697 Can only be toggled when the VM is turned off.
10698 </desc>
10699 </attribute>
10700
10701 <attribute name="traceFile" type="wstring">
10702 <desc>
10703 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10704 will be used.
10705 </desc>
10706 </attribute>
10707
10708 <method name="attachToNAT">
10709 <desc>
10710 Attach the network adapter to the Network Address Translation (NAT) interface.
10711 </desc>
10712 </method>
10713
10714 <method name="attachToBridgedInterface">
10715 <desc>
10716 Attach the network adapter to a bridged host interface.
10717 </desc>
10718 </method>
10719
10720 <method name="attachToInternalNetwork">
10721 <desc>
10722 Attach the network adapter to an internal network.
10723 </desc>
10724 </method>
10725
10726 <method name="attachToHostOnlyInterface">
10727 <desc>
10728 Attach the network adapter to the host-only network.
10729 </desc>
10730 </method>
10731
10732 <method name="detach">
10733 <desc>
10734 Detach the network adapter
10735 </desc>
10736 </method>
10737 </interface>
10738
10739
10740 <!--
10741 // ISerialPort
10742 /////////////////////////////////////////////////////////////////////////
10743 -->
10744
10745 <enum
10746 name="PortMode"
10747 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10748 >
10749 <desc>
10750 The PortMode enumeration represents possible communication modes for
10751 the virtual serial port device.
10752 </desc>
10753
10754 <const name="Disconnected" value="0">
10755 <desc>Virtual device is not attached to any real host device.</desc>
10756 </const>
10757 <const name="HostPipe" value="1">
10758 <desc>Virtual device is attached to a host pipe.</desc>
10759 </const>
10760 <const name="HostDevice" value="2">
10761 <desc>Virtual device is attached to a host device.</desc>
10762 </const>
10763 </enum>
10764
10765 <interface
10766 name="ISerialPort" extends="$unknown"
10767 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10768 wsmap="managed"
10769 >
10770
10771 <desc>
10772 The ISerialPort interface represents the virtual serial port device.
10773
10774 The virtual serial port device acts like an ordinary serial port
10775 inside the virtual machine. This device communicates to the real
10776 serial port hardware in one of two modes: host pipe or host device.
10777
10778 In host pipe mode, the #path attribute specifies the path to the pipe on
10779 the host computer that represents a serial port. The #server attribute
10780 determines if this pipe is created by the virtual machine process at
10781 machine startup or it must already exist before starting machine
10782 execution.
10783
10784 In host device mode, the #path attribute specifies the name of the
10785 serial port device on the host computer.
10786
10787 There is also a third communication mode: the disconnected mode. In this
10788 mode, the guest OS running inside the virtual machine will be able to
10789 detect the serial port, but all port write operations will be discarded
10790 and all port read operations will return no data.
10791
10792 <see>IMachine::getSerialPort</see>
10793 </desc>
10794
10795 <attribute name="slot" type="unsigned long" readonly="yes">
10796 <desc>
10797 Slot number this serial port is plugged into. Corresponds to
10798 the value you pass to <link to="IMachine::getSerialPort"/>
10799 to obtain this instance.
10800 </desc>
10801 </attribute>
10802
10803 <attribute name="enabled" type="boolean">
10804 <desc>
10805 Flag whether the serial port is enabled. If disabled,
10806 the serial port will not be reported to the guest OS.
10807 </desc>
10808 </attribute>
10809
10810 <attribute name="IOBase" type="unsigned long">
10811 <desc>Base I/O address of the serial port.</desc>
10812 </attribute>
10813
10814 <attribute name="IRQ" type="unsigned long">
10815 <desc>IRQ number of the serial port.</desc>
10816 </attribute>
10817
10818 <attribute name="hostMode" type="PortMode">
10819 <desc>
10820 How is this port connected to the host.
10821 <note>
10822 Changing this attribute may fail if the conditions for
10823 <link to="#path"/> are not met.
10824 </note>
10825 </desc>
10826 </attribute>
10827
10828 <attribute name="server" type="boolean">
10829 <desc>
10830 Flag whether this serial port acts as a server (creates a new pipe on
10831 the host) or as a client (uses the existing pipe). This attribute is
10832 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10833 </desc>
10834 </attribute>
10835
10836 <attribute name="path" type="wstring">
10837 <desc>
10838 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
10839 PortMode_HostPipe, or the host serial device name when
10840 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
10841 cases, setting a @c null or an empty string as the attribute's value
10842 will result into an error. Otherwise, the value of this property is
10843 ignored.
10844 </desc>
10845 </attribute>
10846
10847 </interface>
10848
10849 <!--
10850 // IParallelPort
10851 /////////////////////////////////////////////////////////////////////////
10852 -->
10853
10854 <interface
10855 name="IParallelPort" extends="$unknown"
10856 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
10857 wsmap="managed"
10858 >
10859
10860 <desc>
10861 The IParallelPort interface represents the virtual parallel port device.
10862
10863 The virtual parallel port device acts like an ordinary parallel port
10864 inside the virtual machine. This device communicates to the real
10865 parallel port hardware using the name of the parallel device on the host
10866 computer specified in the #path attribute.
10867
10868 Each virtual parallel port device is assigned a base I/O address and an
10869 IRQ number that will be reported to the guest operating system and used
10870 to operate the given parallel port from within the virtual machine.
10871
10872 <see>IMachine::getParallelPort</see>
10873 </desc>
10874
10875 <attribute name="slot" type="unsigned long" readonly="yes">
10876 <desc>
10877 Slot number this parallel port is plugged into. Corresponds to
10878 the value you pass to <link to="IMachine::getParallelPort"/>
10879 to obtain this instance.
10880 </desc>
10881 </attribute>
10882
10883 <attribute name="enabled" type="boolean">
10884 <desc>
10885 Flag whether the parallel port is enabled. If disabled,
10886 the parallel port will not be reported to the guest OS.
10887 </desc>
10888 </attribute>
10889
10890 <attribute name="IOBase" type="unsigned long">
10891 <desc>Base I/O address of the parallel port.</desc>
10892 </attribute>
10893
10894 <attribute name="IRQ" type="unsigned long">
10895 <desc>IRQ number of the parallel port.</desc>
10896 </attribute>
10897
10898 <attribute name="path" type="wstring">
10899 <desc>
10900 Host parallel device name. If this parallel port is enabled, setting a
10901 @c null or an empty string as this attribute's value will result into
10902 an error.
10903 </desc>
10904 </attribute>
10905
10906 </interface>
10907
10908
10909 <!--
10910 // IMachineDebugger
10911 /////////////////////////////////////////////////////////////////////////
10912 -->
10913
10914 <interface
10915 name="IMachineDebugger" extends="$unknown"
10916 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
10917 wsmap="suppress"
10918 >
10919 <method name="resetStats">
10920 <desc>
10921 Reset VM statistics.
10922 </desc>
10923 <param name="pattern" type="wstring" dir="in">
10924 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10925 </param>
10926 </method>
10927
10928 <method name="dumpStats">
10929 <desc>
10930 Dumps VM statistics.
10931 </desc>
10932 <param name="pattern" type="wstring" dir="in">
10933 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10934 </param>
10935 </method>
10936
10937 <method name="getStats">
10938 <desc>
10939 Get the VM statistics in a XMLish format.
10940 </desc>
10941 <param name="pattern" type="wstring" dir="in">
10942 <desc>The selection pattern. A bit similar to filename globbing.</desc>
10943 </param>
10944 <param name="withDescriptions" type="boolean" dir="in">
10945 <desc>Whether to include the descriptions.</desc>
10946 </param>
10947 <param name="stats" type="wstring" dir="out">
10948 <desc>The XML document containing the statistics.</desc>
10949 </param>
10950 </method>
10951
10952 <method name="injectNMI">
10953 <desc>
10954 Inject an NMI into a running VT-x/AMD-V VM.
10955 </desc>
10956 </method>
10957
10958 <attribute name="singlestep" type="boolean">
10959 <desc>Switch for enabling singlestepping.</desc>
10960 </attribute>
10961
10962 <attribute name="recompileUser" type="boolean">
10963 <desc>Switch for forcing code recompilation for user mode code.</desc>
10964 </attribute>
10965
10966 <attribute name="recompileSupervisor" type="boolean">
10967 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
10968 </attribute>
10969
10970 <attribute name="PATMEnabled" type="boolean">
10971 <desc>Switch for enabling and disabling the PATM component.</desc>
10972 </attribute>
10973
10974 <attribute name="CSAMEnabled" type="boolean">
10975 <desc>Switch for enabling and disabling the CSAM component.</desc>
10976 </attribute>
10977
10978 <attribute name="logEnabled" type="boolean">
10979 <desc>Switch for enabling and disabling logging.</desc>
10980 </attribute>
10981
10982 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
10983 <desc>
10984 Flag indicating whether the VM is currently making use of CPU hardware
10985 virtualization extensions.
10986 </desc>
10987 </attribute>
10988
10989 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
10990 <desc>
10991 Flag indicating whether the VM is currently making use of the nested paging
10992 CPU hardware virtualization extension.
10993 </desc>
10994 </attribute>
10995
10996 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
10997 <desc>
10998 Flag indicating whether the VM is currently making use of the VPID
10999 VT-x extension.
11000 </desc>
11001 </attribute>
11002
11003 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11004 <desc>
11005 Flag indicating whether the VM is currently making use of the Physical
11006 Address Extension CPU feature.
11007 </desc>
11008 </attribute>
11009
11010 <attribute name="virtualTimeRate" type="unsigned long">
11011 <desc>
11012 The rate at which the virtual time runs expressed as a percentage.
11013 The accepted range is 2% to 20000%.
11014 </desc>
11015 </attribute>
11016
11017 <!-- @todo method for setting log flags, groups and destination! -->
11018
11019 <attribute name="VM" type="unsigned long long" readonly="yes">
11020 <desc>
11021 Gets the VM handle. This is only for internal use while
11022 we carve the details of this interface.
11023 </desc>
11024 </attribute>
11025
11026 </interface>
11027
11028 <!--
11029 // IUSBController
11030 /////////////////////////////////////////////////////////////////////////
11031 -->
11032
11033 <interface
11034 name="IUSBController" extends="$unknown"
11035 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11036 wsmap="managed"
11037 >
11038 <attribute name="enabled" type="boolean">
11039 <desc>
11040 Flag whether the USB controller is present in the
11041 guest system. If disabled, the virtual guest hardware will
11042 not contain any USB controller. Can only be changed when
11043 the VM is powered off.
11044 </desc>
11045 </attribute>
11046
11047 <attribute name="enabledEhci" type="boolean">
11048 <desc>
11049 Flag whether the USB EHCI controller is present in the
11050 guest system. If disabled, the virtual guest hardware will
11051 not contain a USB EHCI controller. Can only be changed when
11052 the VM is powered off.
11053 </desc>
11054 </attribute>
11055
11056 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11057 <desc>
11058 USB standard version which the controller implements.
11059 This is a BCD which means that the major version is in the
11060 high byte and minor version is in the low byte.
11061 </desc>
11062 </attribute>
11063
11064 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11065 <desc>
11066 List of USB device filters associated with the machine.
11067
11068 If the machine is currently running, these filters are activated
11069 every time a new (supported) USB device is attached to the host
11070 computer that was not ignored by global filters
11071 (<link to="IHost::USBDeviceFilters"/>).
11072
11073 These filters are also activated when the machine is powered up.
11074 They are run against a list of all currently available USB
11075 devices (in states
11076 <link to="USBDeviceState_Available"/>,
11077 <link to="USBDeviceState_Busy"/>,
11078 <link to="USBDeviceState_Held"/>) that were not previously
11079 ignored by global filters.
11080
11081 If at least one filter matches the USB device in question, this
11082 device is automatically captured (attached to) the virtual USB
11083 controller of this machine.
11084
11085 <see>IUSBDeviceFilter, ::IUSBController</see>
11086 </desc>
11087 </attribute>
11088
11089 <method name="createDeviceFilter">
11090 <desc>
11091 Creates a new USB device filter. All attributes except
11092 the filter name are set to <tt>null</tt> (any match),
11093 <i>active</i> is <tt>false</tt> (the filter is not active).
11094
11095 The created filter can then be added to the list of filters using
11096 <link to="#insertDeviceFilter"/>.
11097
11098 <result name="VBOX_E_INVALID_VM_STATE">
11099 The virtual machine is not mutable.
11100 </result>
11101
11102 <see>#deviceFilters</see>
11103 </desc>
11104 <param name="name" type="wstring" dir="in">
11105 <desc>
11106 Filter name. See <link to="IUSBDeviceFilter::name"/>
11107 for more info.
11108 </desc>
11109 </param>
11110 <param name="filter" type="IUSBDeviceFilter" dir="return">
11111 <desc>Created filter object.</desc>
11112 </param>
11113 </method>
11114
11115 <method name="insertDeviceFilter">
11116 <desc>
11117 Inserts the given USB device to the specified position
11118 in the list of filters.
11119
11120 Positions are numbered starting from <tt>0</tt>. If the specified
11121 position is equal to or greater than the number of elements in
11122 the list, the filter is added to the end of the collection.
11123
11124 <note>
11125 Duplicates are not allowed, so an attempt to insert a
11126 filter that is already in the collection, will return an
11127 error.
11128 </note>
11129
11130 <result name="VBOX_E_INVALID_VM_STATE">
11131 Virtual machine is not mutable.
11132 </result>
11133 <result name="E_INVALIDARG">
11134 USB device filter not created within this VirtualBox instance.
11135 </result>
11136 <result name="VBOX_E_INVALID_OBJECT_STATE">
11137 USB device filter already in list.
11138 </result>
11139
11140 <see>#deviceFilters</see>
11141 </desc>
11142 <param name="position" type="unsigned long" dir="in">
11143 <desc>Position to insert the filter to.</desc>
11144 </param>
11145 <param name="filter" type="IUSBDeviceFilter" dir="in">
11146 <desc>USB device filter to insert.</desc>
11147 </param>
11148 </method>
11149
11150 <method name="removeDeviceFilter">
11151 <desc>
11152 Removes a USB device filter from the specified position in the
11153 list of filters.
11154
11155 Positions are numbered starting from <tt>0</tt>. Specifying a
11156 position equal to or greater than the number of elements in
11157 the list will produce an error.
11158
11159 <see>#deviceFilters</see>
11160
11161 <result name="VBOX_E_INVALID_VM_STATE">
11162 Virtual machine is not mutable.
11163 </result>
11164 <result name="E_INVALIDARG">
11165 USB device filter list empty or invalid @a position.
11166 </result>
11167
11168 </desc>
11169 <param name="position" type="unsigned long" dir="in">
11170 <desc>Position to remove the filter from.</desc>
11171 </param>
11172 <param name="filter" type="IUSBDeviceFilter" dir="return">
11173 <desc>Removed USB device filter.</desc>
11174 </param>
11175 </method>
11176
11177 </interface>
11178
11179
11180 <!--
11181 // IUSBDevice
11182 /////////////////////////////////////////////////////////////////////////
11183 -->
11184
11185 <interface
11186 name="IUSBDevice" extends="$unknown"
11187 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11188 wsmap="managed"
11189 >
11190 <desc>
11191 The IUSBDevice interface represents a virtual USB device attached to the
11192 virtual machine.
11193
11194 A collection of objects implementing this interface is stored in the
11195 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11196 attached to a running virtual machine's USB controller.
11197 </desc>
11198
11199 <attribute name="id" type="uuid" readonly="yes">
11200 <desc>
11201 Unique USB device ID. This ID is built from #vendorId,
11202 #productId, #revision and #serialNumber.
11203 </desc>
11204 </attribute>
11205
11206 <attribute name="vendorId" type="unsigned short" readonly="yes">
11207 <desc>Vendor ID.</desc>
11208 </attribute>
11209
11210 <attribute name="productId" type="unsigned short" readonly="yes">
11211 <desc>Product ID.</desc>
11212 </attribute>
11213
11214 <attribute name="revision" type="unsigned short" readonly="yes">
11215 <desc>
11216 Product revision number. This is a packed BCD represented as
11217 unsigned short. The high byte is the integer part and the low
11218 byte is the decimal.
11219 </desc>
11220 </attribute>
11221
11222 <attribute name="manufacturer" type="wstring" readonly="yes">
11223 <desc>Manufacturer string.</desc>
11224 </attribute>
11225
11226 <attribute name="product" type="wstring" readonly="yes">
11227 <desc>Product string.</desc>
11228 </attribute>
11229
11230 <attribute name="serialNumber" type="wstring" readonly="yes">
11231 <desc>Serial number string.</desc>
11232 </attribute>
11233
11234 <attribute name="address" type="wstring" readonly="yes">
11235 <desc>Host specific address of the device.</desc>
11236 </attribute>
11237
11238 <attribute name="port" type="unsigned short" readonly="yes">
11239 <desc>
11240 Host USB port number the device is physically
11241 connected to.
11242 </desc>
11243 </attribute>
11244
11245 <attribute name="version" type="unsigned short" readonly="yes">
11246 <desc>
11247 The major USB version of the device - 1 or 2.
11248 </desc>
11249 </attribute>
11250
11251 <attribute name="portVersion" type="unsigned short" readonly="yes">
11252 <desc>
11253 The major USB version of the host USB port the device is
11254 physically connected to - 1 or 2. For devices not connected to
11255 anything this will have the same value as the version attribute.
11256 </desc>
11257 </attribute>
11258
11259 <attribute name="remote" type="boolean" readonly="yes">
11260 <desc>
11261 Whether the device is physically connected to a remote VRDP
11262 client or to a local host machine.
11263 </desc>
11264 </attribute>
11265
11266 </interface>
11267
11268
11269 <!--
11270 // IUSBDeviceFilter
11271 /////////////////////////////////////////////////////////////////////////
11272 -->
11273
11274 <interface
11275 name="IUSBDeviceFilter" extends="$unknown"
11276 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11277 wsmap="managed"
11278 >
11279 <desc>
11280 The IUSBDeviceFilter interface represents an USB device filter used
11281 to perform actions on a group of USB devices.
11282
11283 This type of filters is used by running virtual machines to
11284 automatically capture selected USB devices once they are physically
11285 attached to the host computer.
11286
11287 A USB device is matched to the given device filter if and only if all
11288 attributes of the device match the corresponding attributes of the
11289 filter (that is, attributes are joined together using the logical AND
11290 operation). On the other hand, all together, filters in the list of
11291 filters carry the semantics of the logical OR operation. So if it is
11292 desirable to create a match like "this vendor id OR this product id",
11293 one needs to create two filters and specify "any match" (see below)
11294 for unused attributes.
11295
11296 All filter attributes used for matching are strings. Each string
11297 is an expression representing a set of values of the corresponding
11298 device attribute, that will match the given filter. Currently, the
11299 following filtering expressions are supported:
11300
11301 <ul>
11302 <li><i>Interval filters</i>. Used to specify valid intervals for
11303 integer device attributes (Vendor ID, Product ID and Revision).
11304 The format of the string is:
11305
11306 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11307
11308 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11309 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11310 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11311 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11312 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11313 possible integer is assumed.
11314 </li>
11315 <li><i>Boolean filters</i>. Used to specify acceptable values for
11316 boolean device attributes. The format of the string is:
11317
11318 <tt>true|false|yes|no|0|1</tt>
11319
11320 </li>
11321 <li><i>Exact match</i>. Used to specify a single value for the given
11322 device attribute. Any string that doesn't start with <tt>int:</tt>
11323 represents the exact match. String device attributes are compared to
11324 this string including case of symbols. Integer attributes are first
11325 converted to a string (see individual filter attributes) and then
11326 compared ignoring case.
11327
11328 </li>
11329 <li><i>Any match</i>. Any value of the corresponding device attribute
11330 will match the given filter. An empty or <tt>null</tt> string is
11331 used to construct this type of filtering expressions.
11332
11333 </li>
11334 </ul>
11335
11336 <note>
11337 On the Windows host platform, interval filters are not currently
11338 available. Also all string filter attributes
11339 (<link to="#manufacturer"/>, <link to="#product"/>,
11340 <link to="#serialNumber"/>) are ignored, so they behave as
11341 <i>any match</i> no matter what string expression is specified.
11342 </note>
11343
11344 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11345 </desc>
11346
11347 <attribute name="name" type="wstring">
11348 <desc>
11349 Visible name for this filter.
11350 This name is used to visually distinguish one filter from another,
11351 so it can neither be <tt>null</tt> nor an empty string.
11352 </desc>
11353 </attribute>
11354
11355 <attribute name="active" type="boolean">
11356 <desc>Whether this filter active or has been temporarily disabled.</desc>
11357 </attribute>
11358
11359 <attribute name="vendorId" type="wstring">
11360 <desc>
11361 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11362 The string representation for the <i>exact matching</i>
11363 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11364 (including leading zeroes).
11365 </desc>
11366 </attribute>
11367
11368 <attribute name="productId" type="wstring">
11369 <desc>
11370 <link to="IUSBDevice::productId">Product ID</link> filter.
11371 The string representation for the <i>exact matching</i>
11372 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11373 (including leading zeroes).
11374 </desc>
11375 </attribute>
11376
11377 <attribute name="revision" type="wstring">
11378 <desc>
11379 <link to="IUSBDevice::productId">Product revision number</link>
11380 filter. The string representation for the <i>exact matching</i>
11381 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11382 of the integer part of the revision, and <tt>F</tt> is the
11383 decimal digit of its fractional part (including leading and
11384 trailing zeros).
11385 Note that for interval filters, it's best to use the hexadecimal
11386 form, because the revision is stored as a 16 bit packed BCD value;
11387 so the expression <tt>int:0x0100-0x0199</tt> will match any
11388 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11389 </desc>
11390 </attribute>
11391
11392 <attribute name="manufacturer" type="wstring">
11393 <desc>
11394 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11395 </desc>
11396 </attribute>
11397
11398 <attribute name="product" type="wstring">
11399 <desc>
11400 <link to="IUSBDevice::product">Product</link> filter.
11401 </desc>
11402 </attribute>
11403
11404 <attribute name="serialNumber" type="wstring">
11405 <desc>
11406 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11407 </desc>
11408 </attribute>
11409
11410 <attribute name="port" type="wstring">
11411 <desc>
11412 <link to="IUSBDevice::port">Host USB port</link> filter.
11413 </desc>
11414 </attribute>
11415
11416 <attribute name="remote" type="wstring">
11417 <desc>
11418 <link to="IUSBDevice::remote">Remote state</link> filter.
11419 <note>
11420 This filter makes sense only for machine USB filters,
11421 i.e. it is ignored by IHostUSBDeviceFilter objects.
11422 </note>
11423 </desc>
11424 </attribute>
11425
11426 <attribute name="maskedInterfaces" type="unsigned long">
11427 <desc>
11428 This is an advanced option for hiding one or more USB interfaces
11429 from the guest. The value is a bit mask where the bits that are set
11430 means the corresponding USB interface should be hidden, masked off
11431 if you like.
11432 This feature only works on Linux hosts.
11433 </desc>
11434 </attribute>
11435
11436 </interface>
11437
11438
11439 <!--
11440 // IHostUSBDevice
11441 /////////////////////////////////////////////////////////////////////////
11442 -->
11443
11444 <enum
11445 name="USBDeviceState"
11446 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11447 >
11448 <desc>
11449 USB device state. This enumeration represents all possible states
11450 of the USB device physically attached to the host computer regarding
11451 its state on the host computer and availability to guest computers
11452 (all currently running virtual machines).
11453
11454 Once a supported USB device is attached to the host, global USB
11455 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11456 either ignore the device, or put it to USBDeviceState_Held state, or do
11457 nothing. Unless the device is ignored by global filters, filters of all
11458 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11459 activated that can put it to USBDeviceState_Captured state.
11460
11461 If the device was ignored by global filters, or didn't match
11462 any filters at all (including guest ones), it is handled by the host
11463 in a normal way. In this case, the device state is determined by
11464 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11465 or USBDeviceState_Available, depending on the current device usage.
11466
11467 Besides auto-capturing based on filters, the device can be manually
11468 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11469 state is USBDeviceState_Busy, USBDeviceState_Available or
11470 USBDeviceState_Held.
11471
11472 <note>
11473 Due to differences in USB stack implementations in Linux and Win32,
11474 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11475 only to the Linux version of the product. This also means that (<link
11476 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11477 device state is USBDeviceState_Held.
11478 </note>
11479
11480 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11481 </desc>
11482
11483 <const name="NotSupported" value="0">
11484 <desc>
11485 Not supported by the VirtualBox server, not available to guests.
11486 </desc>
11487 </const>
11488 <const name="Unavailable" value="1">
11489 <desc>
11490 Being used by the host computer exclusively,
11491 not available to guests.
11492 </desc>
11493 </const>
11494 <const name="Busy" value="2">
11495 <desc>
11496 Being used by the host computer, potentially available to guests.
11497 </desc>
11498 </const>
11499 <const name="Available" value="3">
11500 <desc>
11501 Not used by the host computer, available to guests (the host computer
11502 can also start using the device at any time).
11503 </desc>
11504 </const>
11505 <const name="Held" value="4">
11506 <desc>
11507 Held by the VirtualBox server (ignored by the host computer),
11508 available to guests.
11509 </desc>
11510 </const>
11511 <const name="Captured" value="5">
11512 <desc>
11513 Captured by one of the guest computers, not available
11514 to anybody else.
11515 </desc>
11516 </const>
11517 </enum>
11518
11519 <interface
11520 name="IHostUSBDevice" extends="IUSBDevice"
11521 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11522 wsmap="managed"
11523 >
11524 <desc>
11525 The IHostUSBDevice interface represents a physical USB device attached
11526 to the host computer.
11527
11528 Besides properties inherited from IUSBDevice, this interface adds the
11529 <link to="#state"/> property that holds the current state of the USB
11530 device.
11531
11532 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11533 </desc>
11534
11535 <attribute name="state" type="USBDeviceState" readonly="yes">
11536 <desc>
11537 Current state of the device.
11538 </desc>
11539 </attribute>
11540
11541 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11542
11543 </interface>
11544
11545
11546 <!--
11547 // IHostUSBDeviceFilter
11548 /////////////////////////////////////////////////////////////////////////
11549 -->
11550
11551 <enum
11552 name="USBDeviceFilterAction"
11553 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11554 >
11555 <desc>
11556 Actions for host USB device filters.
11557 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11558 </desc>
11559
11560 <const name="Null" value="0">
11561 <desc>Null value (never used by the API).</desc>
11562 </const>
11563 <const name="Ignore" value="1">
11564 <desc>Ignore the matched USB device.</desc>
11565 </const>
11566 <const name="Hold" value="2">
11567 <desc>Hold the matched USB device.</desc>
11568 </const>
11569 </enum>
11570
11571 <interface
11572 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11573 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11574 wsmap="managed"
11575 >
11576 <desc>
11577 The IHostUSBDeviceFilter interface represents a global filter for a
11578 physical USB device used by the host computer. Used indirectly in
11579 <link to="IHost::USBDeviceFilters"/>.
11580
11581 Using filters of this type, the host computer determines the initial
11582 state of the USB device after it is physically attached to the
11583 host's USB controller.
11584
11585 <note>
11586 The <link to="#remote"/> attribute is ignored by this type of
11587 filters, because it makes sense only for
11588 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11589 </note>
11590
11591 <see>IHost::USBDeviceFilters</see>
11592 </desc>
11593
11594 <attribute name="action" type="USBDeviceFilterAction">
11595 <desc>
11596 Action performed by the host when an attached USB device
11597 matches this filter.
11598 </desc>
11599 </attribute>
11600
11601 </interface>
11602
11603 <!--
11604 // IAudioAdapter
11605 /////////////////////////////////////////////////////////////////////////
11606 -->
11607
11608 <enum
11609 name="AudioDriverType"
11610 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11611 >
11612 <desc>
11613 Host audio driver type.
11614 </desc>
11615
11616 <const name="Null" value="0">
11617 <desc>Null value, also means "dummy audio driver".</desc>
11618 </const>
11619 <const name="WinMM" value="1"/>
11620 <const name="OSS" value="2"/>
11621 <const name="ALSA" value="3"/>
11622 <const name="DirectSound" value="4"/>
11623 <const name="CoreAudio" value="5"/>
11624 <const name="MMPM" value="6"/>
11625 <const name="Pulse" value="7"/>
11626 <const name="SolAudio" value="8"/>
11627 </enum>
11628
11629 <enum
11630 name="AudioControllerType"
11631 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11632 >
11633 <desc>
11634 Virtual audio controller type.
11635 </desc>
11636
11637 <const name="AC97" value="0"/>
11638 <const name="SB16" value="1"/>
11639 </enum>
11640
11641 <interface
11642 name="IAudioAdapter" extends="$unknown"
11643 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11644 wsmap="managed"
11645 >
11646 <desc>
11647 The IAudioAdapter interface represents the virtual audio adapter of
11648 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11649 </desc>
11650 <attribute name="enabled" type="boolean">
11651 <desc>
11652 Flag whether the audio adapter is present in the
11653 guest system. If disabled, the virtual guest hardware will
11654 not contain any audio adapter. Can only be changed when
11655 the VM is not running.
11656 </desc>
11657 </attribute>
11658 <attribute name="audioController" type="AudioControllerType">
11659 <desc>
11660 The audio hardware we emulate.
11661 </desc>
11662 </attribute>
11663 <attribute name="audioDriver" type="AudioDriverType">
11664 <desc>
11665 Audio driver the adapter is connected to. This setting
11666 can only be changed when the VM is not running.
11667 </desc>
11668 </attribute>
11669 </interface>
11670
11671 <!--
11672 // IVRDPServer
11673 /////////////////////////////////////////////////////////////////////////
11674 -->
11675
11676 <enum
11677 name="VRDPAuthType"
11678 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11679 >
11680 <desc>
11681 VRDP authentication type.
11682 </desc>
11683
11684 <const name="Null" value="0">
11685 <desc>Null value, also means "no authentication".</desc>
11686 </const>
11687 <const name="External" value="1"/>
11688 <const name="Guest" value="2"/>
11689 </enum>
11690
11691 <interface
11692 name="IVRDPServer" extends="$unknown"
11693 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11694 wsmap="managed"
11695 >
11696 <attribute name="enabled" type="boolean">
11697 <desc>VRDP server status.</desc>
11698 </attribute>
11699
11700 <attribute name="port" type="unsigned long">
11701 <desc>
11702 VRDP server port number.
11703 <note>
11704 Setting the value of this property to <tt>0</tt> will reset the port
11705 number to the default value which is
11706 currently <tt>3389</tt>. Reading this property will always return a
11707 real port number, even after it has been set to <tt>0</tt> (in which
11708 case the default port is returned).
11709 </note>
11710 </desc>
11711 </attribute>
11712
11713 <attribute name="netAddress" type="wstring">
11714 <desc>VRDP server address.</desc>
11715 </attribute>
11716
11717 <attribute name="authType" type="VRDPAuthType">
11718 <desc>VRDP authentication method.</desc>
11719 </attribute>
11720
11721 <attribute name="authTimeout" type="unsigned long">
11722 <desc>Timeout for guest authentication. Milliseconds.</desc>
11723 </attribute>
11724
11725 <attribute name="allowMultiConnection" type="boolean">
11726 <desc>
11727 Flag whether multiple simultaneous connections to the VM are permitted.
11728 Note that this will be replaced by a more powerful mechanism in the future.
11729 </desc>
11730 </attribute>
11731
11732 <attribute name="reuseSingleConnection" type="boolean">
11733 <desc>
11734 Flag whether the existing connection must be dropped and a new connection
11735 must be established by the VRDP server, when a new client connects in single
11736 connection mode.
11737 </desc>
11738 </attribute>
11739
11740 </interface>
11741
11742
11743 <!--
11744 // ISharedFolder
11745 /////////////////////////////////////////////////////////////////////////
11746 -->
11747
11748 <interface
11749 name="ISharedFolder" extends="$unknown"
11750 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11751 wsmap="struct"
11752 >
11753 <desc>
11754 The ISharedFolder interface represents a folder in the host computer's
11755 file system accessible from the guest OS running inside a virtual
11756 machine using an associated logical name.
11757
11758 There are three types of shared folders:
11759 <ul>
11760 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11761 folders available to all virtual machines.</li>
11762 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11763 VM-specific shared folders available to the given virtual machine at
11764 startup.</li>
11765 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11766 VM-specific shared folders created in the session context (for
11767 example, when the virtual machine is running) and automatically
11768 discarded when the session is closed (the VM is powered off).</li>
11769 </ul>
11770
11771 Logical names of shared folders must be unique within the given scope
11772 (global, permanent or transient). However, they do not need to be unique
11773 across scopes. In this case, the definition of the shared folder in a
11774 more specific scope takes precedence over definitions in all other
11775 scopes. The order of precedence is (more specific to more general):
11776 <ol>
11777 <li>Transient definitions</li>
11778 <li>Permanent definitions</li>
11779 <li>Global definitions</li>
11780 </ol>
11781
11782 For example, if MyMachine has a shared folder named
11783 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11784 transient shared folder named <tt>C_DRIVE</tt> (that points
11785 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11786 of <tt>C_DRIVE</tt> in the guest OS so
11787 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11788 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11789 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11790 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11791 to <tt>C:\\</tt> if it still exists.
11792
11793 Note that permanent and transient shared folders of different machines
11794 are in different name spaces, so they don't overlap and don't need to
11795 have unique logical names.
11796
11797 <note>
11798 Global shared folders are not implemented in the current version of the
11799 product.
11800 </note>
11801 </desc>
11802
11803 <attribute name="name" type="wstring" readonly="yes">
11804 <desc>Logical name of the shared folder.</desc>
11805 </attribute>
11806
11807 <attribute name="hostPath" type="wstring" readonly="yes">
11808 <desc>Full path to the shared folder in the host file system.</desc>
11809 </attribute>
11810
11811 <attribute name="accessible" type="boolean" readonly="yes">
11812 <desc>
11813 Whether the folder defined by the host path is currently
11814 accessible or not.
11815 For example, the folder can be unaccessible if it is placed
11816 on the network share that is not available by the time
11817 this property is read.
11818 </desc>
11819 </attribute>
11820
11821 <attribute name="writable" type="boolean" readonly="yes">
11822 <desc>
11823 Whether the folder defined by the host path is writable or
11824 not.
11825 </desc>
11826 </attribute>
11827
11828 <attribute name="lastAccessError" type="wstring" readonly="yes">
11829 <desc>
11830 Text message that represents the result of the last accessibility
11831 check.
11832
11833 Accessibility checks are performed each time the <link to="#accessible"/>
11834 attribute is read. A @c null string is returned if the last
11835 accessibility check was successful. A non-null string indicates a
11836 failure and should normally describe a reason of the failure (for
11837 example, a file read error).
11838 </desc>
11839 </attribute>
11840
11841 </interface>
11842
11843 <!--
11844 // ISession
11845 /////////////////////////////////////////////////////////////////////////
11846 -->
11847
11848 <interface
11849 name="IInternalSessionControl" extends="$unknown"
11850 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
11851 internal="yes"
11852 wsmap="suppress"
11853 >
11854 <method name="getPID">
11855 <desc>PID of the process that has created this Session object.
11856 </desc>
11857 <param name="pid" type="unsigned long" dir="return"/>
11858 </method>
11859
11860 <method name="getRemoteConsole">
11861 <desc>
11862 Returns the console object suitable for remote control.
11863
11864 <result name="VBOX_E_INVALID_VM_STATE">
11865 Session state prevents operation.
11866 </result>
11867 <result name="VBOX_E_INVALID_OBJECT_STATE">
11868 Session type prevents operation.
11869 </result>
11870
11871 </desc>
11872 <param name="console" type="IConsole" dir="return"/>
11873 </method>
11874
11875 <method name="assignMachine">
11876 <desc>
11877 Assigns the machine object associated with this direct-type
11878 session or informs the session that it will be a remote one
11879 (if @a machine == NULL).
11880
11881 <result name="VBOX_E_INVALID_VM_STATE">
11882 Session state prevents operation.
11883 </result>
11884 <result name="VBOX_E_INVALID_OBJECT_STATE">
11885 Session type prevents operation.
11886 </result>
11887
11888 </desc>
11889 <param name="machine" type="IMachine" dir="in"/>
11890 </method>
11891
11892 <method name="assignRemoteMachine">
11893 <desc>
11894 Assigns the machine and the (remote) console object associated with
11895 this remote-type session.
11896
11897 <result name="VBOX_E_INVALID_VM_STATE">
11898 Session state prevents operation.
11899 </result>
11900
11901 </desc>
11902 <param name="machine" type="IMachine" dir="in"/>
11903 <param name="console" type="IConsole" dir="in"/>
11904 </method>
11905
11906 <method name="updateMachineState">
11907 <desc>
11908 Updates the machine state in the VM process.
11909 Must be called only in certain cases
11910 (see the method implementation).
11911
11912 <result name="VBOX_E_INVALID_VM_STATE">
11913 Session state prevents operation.
11914 </result>
11915 <result name="VBOX_E_INVALID_OBJECT_STATE">
11916 Session type prevents operation.
11917 </result>
11918
11919 </desc>
11920 <param name="aMachineState" type="MachineState" dir="in"/>
11921 </method>
11922
11923 <method name="uninitialize">
11924 <desc>
11925 Uninitializes (closes) this session. Used by VirtualBox to close
11926 the corresponding remote session when the direct session dies
11927 or gets closed.
11928
11929 <result name="VBOX_E_INVALID_VM_STATE">
11930 Session state prevents operation.
11931 </result>
11932
11933 </desc>
11934 </method>
11935
11936 <method name="onDVDDriveChange">
11937 <desc>
11938 Triggered when settings of the DVD drive object of the
11939 associated virtual machine have changed.
11940
11941 <result name="VBOX_E_INVALID_VM_STATE">
11942 Session state prevents operation.
11943 </result>
11944 <result name="VBOX_E_INVALID_OBJECT_STATE">
11945 Session type prevents operation.
11946 </result>
11947
11948 </desc>
11949 </method>
11950
11951 <method name="onFloppyDriveChange">
11952 <desc>
11953 Triggered when settings of the floppy drive object of the
11954 associated virtual machine have changed.
11955
11956 <result name="VBOX_E_INVALID_VM_STATE">
11957 Session state prevents operation.
11958 </result>
11959 <result name="VBOX_E_INVALID_OBJECT_STATE">
11960 Session type prevents operation.
11961 </result>
11962
11963 </desc>
11964 </method>
11965
11966 <method name="onNetworkAdapterChange">
11967 <desc>
11968 Triggered when settings of a network adapter of the
11969 associated virtual machine have changed.
11970
11971 <result name="VBOX_E_INVALID_VM_STATE">
11972 Session state prevents operation.
11973 </result>
11974 <result name="VBOX_E_INVALID_OBJECT_STATE">
11975 Session type prevents operation.
11976 </result>
11977
11978 </desc>
11979 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
11980 </method>
11981
11982 <method name="onSerialPortChange">
11983 <desc>
11984 Triggered when settings of a serial port of the
11985 associated virtual machine have changed.
11986
11987 <result name="VBOX_E_INVALID_VM_STATE">
11988 Session state prevents operation.
11989 </result>
11990 <result name="VBOX_E_INVALID_OBJECT_STATE">
11991 Session type prevents operation.
11992 </result>
11993
11994 </desc>
11995 <param name="serialPort" type="ISerialPort" dir="in"/>
11996 </method>
11997
11998 <method name="onParallelPortChange">
11999 <desc>
12000 Triggered when settings of a parallel port of the
12001 associated virtual machine have changed.
12002
12003 <result name="VBOX_E_INVALID_VM_STATE">
12004 Session state prevents operation.
12005 </result>
12006 <result name="VBOX_E_INVALID_OBJECT_STATE">
12007 Session type prevents operation.
12008 </result>
12009
12010 </desc>
12011 <param name="parallelPort" type="IParallelPort" dir="in"/>
12012 </method>
12013
12014 <method name="onStorageControllerChange">
12015 <desc>
12016 Triggered when settings of a storage controller of the
12017 associated virtual machine have changed.
12018
12019 <result name="VBOX_E_INVALID_VM_STATE">
12020 Session state prevents operation.
12021 </result>
12022 <result name="VBOX_E_INVALID_OBJECT_STATE">
12023 Session type prevents operation.
12024 </result>
12025
12026 </desc>
12027 </method>
12028
12029 <method name="onVRDPServerChange">
12030 <desc>
12031 Triggered when settings of the VRDP server object of the
12032 associated virtual machine have changed.
12033
12034 <result name="VBOX_E_INVALID_VM_STATE">
12035 Session state prevents operation.
12036 </result>
12037 <result name="VBOX_E_INVALID_OBJECT_STATE">
12038 Session type prevents operation.
12039 </result>
12040
12041 </desc>
12042 </method>
12043
12044 <method name="onUSBControllerChange">
12045 <desc>
12046 Triggered when settings of the USB controller object of the
12047 associated virtual machine have changed.
12048
12049 <result name="VBOX_E_INVALID_VM_STATE">
12050 Session state prevents operation.
12051 </result>
12052 <result name="VBOX_E_INVALID_OBJECT_STATE">
12053 Session type prevents operation.
12054 </result>
12055
12056 </desc>
12057 </method>
12058
12059 <method name="onSharedFolderChange">
12060 <desc>
12061 Triggered when a permanent (global or machine) shared folder has been
12062 created or removed.
12063 <note>
12064 We don't pass shared folder parameters in this notification because
12065 the order in which parallel notifications are delivered is not defined,
12066 therefore it could happen that these parameters were outdated by the
12067 time of processing this notification.
12068 </note>
12069
12070 <result name="VBOX_E_INVALID_VM_STATE">
12071 Session state prevents operation.
12072 </result>
12073 <result name="VBOX_E_INVALID_OBJECT_STATE">
12074 Session type prevents operation.
12075 </result>
12076
12077 </desc>
12078 <param name="global" type="boolean" dir="in"/>
12079 </method>
12080
12081 <method name="onUSBDeviceAttach">
12082 <desc>
12083 Triggered when a request to capture a USB device (as a result
12084 of matched USB filters or direct call to
12085 <link to="IConsole::attachUSBDevice"/>) has completed.
12086 A @c null @a error object means success, otherwise it
12087 describes a failure.
12088
12089 <result name="VBOX_E_INVALID_VM_STATE">
12090 Session state prevents operation.
12091 </result>
12092 <result name="VBOX_E_INVALID_OBJECT_STATE">
12093 Session type prevents operation.
12094 </result>
12095
12096 </desc>
12097 <param name="device" type="IUSBDevice" dir="in"/>
12098 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12099 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12100 </method>
12101
12102 <method name="onUSBDeviceDetach">
12103 <desc>
12104 Triggered when a request to release the USB device (as a result
12105 of machine termination or direct call to
12106 <link to="IConsole::detachUSBDevice"/>) has completed.
12107 A @c null @a error object means success, otherwise it
12108
12109 <result name="VBOX_E_INVALID_VM_STATE">
12110 Session state prevents operation.
12111 </result>
12112 <result name="VBOX_E_INVALID_OBJECT_STATE">
12113 Session type prevents operation.
12114 </result>
12115
12116 </desc>
12117 <param name="id" type="uuid" dir="in"/>
12118 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12119 </method>
12120
12121 <method name="onShowWindow">
12122 <desc>
12123 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12124 <link to="IMachine::showConsoleWindow"/> in order to notify
12125 console callbacks
12126 <link to="IConsoleCallback::onCanShowWindow"/>
12127 and <link to="IConsoleCallback::onShowWindow"/>.
12128
12129 <result name="VBOX_E_INVALID_OBJECT_STATE">
12130 Session type prevents operation.
12131 </result>
12132
12133 </desc>
12134 <param name="check" type="boolean" dir="in"/>
12135 <param name="canShow" type="boolean" dir="out"/>
12136 <param name="winId" type="unsigned long long" dir="out"/>
12137 </method>
12138
12139 <method name="accessGuestProperty">
12140 <desc>
12141 Called by <link to="IMachine::getGuestProperty"/> and by
12142 <link to="IMachine::setGuestProperty"/> in order to read and
12143 modify guest properties.
12144
12145 <result name="VBOX_E_INVALID_VM_STATE">
12146 Machine session is not open.
12147 </result>
12148 <result name="VBOX_E_INVALID_OBJECT_STATE">
12149 Session type is not direct.
12150 </result>
12151
12152 </desc>
12153 <param name="name" type="wstring" dir="in"/>
12154 <param name="value" type="wstring" dir="in"/>
12155 <param name="flags" type="wstring" dir="in"/>
12156 <param name="isSetter" type="boolean" dir="in"/>
12157 <param name="retValue" type="wstring" dir="out"/>
12158 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12159 <param name="retFlags" type="wstring" dir="out"/>
12160 </method>
12161
12162 <method name="enumerateGuestProperties">
12163 <desc>
12164 Return a list of the guest properties matching a set of patterns along
12165 with their values, time stamps and flags.
12166
12167 <result name="VBOX_E_INVALID_VM_STATE">
12168 Machine session is not open.
12169 </result>
12170 <result name="VBOX_E_INVALID_OBJECT_STATE">
12171 Session type is not direct.
12172 </result>
12173
12174 </desc>
12175 <param name="patterns" type="wstring" dir="in">
12176 <desc>
12177 The patterns to match the properties against as a comma-separated
12178 string. If this is empty, all properties currently set will be
12179 returned.
12180 </desc>
12181 </param>
12182 <param name="key" type="wstring" dir="out" safearray="yes">
12183 <desc>
12184 The key names of the properties returned.
12185 </desc>
12186 </param>
12187 <param name="value" type="wstring" dir="out" safearray="yes">
12188 <desc>
12189 The values of the properties returned. The array entries match the
12190 corresponding entries in the @a key array.
12191 </desc>
12192 </param>
12193 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12194 <desc>
12195 The time stamps of the properties returned. The array entries match
12196 the corresponding entries in the @a key array.
12197 </desc>
12198 </param>
12199 <param name="flags" type="wstring" dir="out" safearray="yes">
12200 <desc>
12201 The flags of the properties returned. The array entries match the
12202 corresponding entries in the @a key array.
12203 </desc>
12204 </param>
12205 </method>
12206
12207 </interface>
12208
12209 <interface
12210 name="ISession" extends="$dispatched"
12211 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12212 wsmap="managed"
12213 >
12214 <desc>
12215 The ISession interface represents a serialization primitive for virtual
12216 machines.
12217
12218 With VirtualBox, every time one wishes to manipulate a virtual machine
12219 (e.g. change its settings or start execution), a session object is
12220 required. Such an object must be passed to one of the session methods
12221 that open the given session, which then initiates the machine manipulation.
12222
12223 A session serves several purposes: it identifies to the inter-process VirtualBox
12224 code which process is currently working with the virtual machine, and it ensures
12225 that there are no incompatible requests from several processes for the
12226 same virtual machine. Session objects can therefore be thought of as mutex
12227 semaphores that lock virtual machines to prevent conflicting accesses from
12228 several processes.
12229
12230 How sessions objects are used depends on whether you use the Main API
12231 via COM or via the webservice:
12232
12233 <ul>
12234 <li>When using the COM API directly, an object of the Session class from the
12235 VirtualBox type library needs to be created. In regular COM C++ client code,
12236 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12237 This object will then act as a local session object in further calls to open
12238 a session.
12239 </li>
12240
12241 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12242 one session object automatically when <link to="IWebsessionManager::logon" />
12243 is called. A managed object reference to that session object can be retrieved by
12244 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12245 reference can then be used to open sessions.
12246 </li>
12247 </ul>
12248
12249 Sessions are mainly used in two variations:
12250
12251 <ul>
12252 <li>
12253 To start a virtual machine in a separate process, one would call
12254 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12255 object as its first parameter. This session then identifies the caller
12256 and lets him control the started machine (for example, pause machine
12257 execution or power it down) as well as be notified about machine
12258 execution state changes.
12259 </li>
12260
12261 <li>To alter machine settings, or to start machine execution within the
12262 current process, one needs to open a direct session for the machine first by
12263 calling <link to="IVirtualBox::openSession"/>. While a direct session
12264 is open within one process, no any other process may open another direct
12265 session for the same machine. This prevents the machine from being changed
12266 by other processes while it is running or while the machine is being configured.
12267 </li>
12268 </ul>
12269
12270 One also can attach to an existing direct session already opened by
12271 another process (for example, in order to send a control request to the
12272 virtual machine such as the pause or the reset request). This is done by
12273 calling <link to="IVirtualBox::openExistingSession"/>.
12274
12275 <note>
12276 Unless you are trying to write a new VirtualBox front-end that
12277 performs direct machine execution (like the VirtualBox or VBoxSDL
12278 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12279 session opened by <link to="IVirtualBox::openSession"/> and use this
12280 session only to change virtual machine settings. If you simply want to
12281 start virtual machine execution using one of the existing front-ends
12282 (for example the VirtualBox GUI or headless server), simply use
12283 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12284 will power up the machine automatically for you.
12285 </note>
12286 </desc>
12287
12288 <attribute name="state" type="SessionState" readonly="yes">
12289 <desc>Current state of this session.</desc>
12290 </attribute>
12291
12292 <attribute name="type" type="SessionType" readonly="yes">
12293 <desc>
12294 Type of this session. The value of this attribute is valid only
12295 if the session is currently open (i.e. its #state is
12296 SessionType_SessionOpen), otherwise an error will be returned.
12297 </desc>
12298 </attribute>
12299
12300 <attribute name="machine" type="IMachine" readonly="yes">
12301 <desc>Machine object associated with this session.</desc>
12302 </attribute>
12303
12304 <attribute name="console" type="IConsole" readonly="yes">
12305 <desc>Console object associated with this session.</desc>
12306 </attribute>
12307
12308 <method name="close">
12309 <desc>
12310 Closes a session that was previously opened.
12311
12312 It is recommended that every time an "open session" method (such as
12313 <link to="IVirtualBox::openRemoteSession" /> or
12314 <link to="IVirtualBox::openSession" />) has been called to
12315 manipulate a virtual machine, the caller invoke
12316 ISession::close() when it's done doing so. Since sessions are
12317 serialization primitives much like ordinary mutexes, they are
12318 best used the same way: for each "open" call, there should be
12319 a matching "close" call, even when errors occur.
12320
12321 Otherwise, if a direct session for a machine opened with
12322 <link to="IVirtualBox::openSession"/> is not explicitly closed
12323 when the application terminates, the state of the machine will
12324 be set to <link to="MachineState_Aborted" /> on the server.
12325
12326 Generally, it is recommended to close all open sessions explicitly
12327 before terminating the application (regardless of the reason for
12328 the termination).
12329
12330 <note>
12331 Do not expect the session state (<link to="ISession::state" />
12332 to return to "Closed" immediately after you invoke
12333 ISession::close(), particularly if you have started a remote
12334 session to execute the VM in a new process. The session state will
12335 automatically return to "Closed" once the VM is no longer executing,
12336 which can of course take a very long time.
12337 </note>
12338
12339 <result name="E_UNEXPECTED">
12340 Session is not open.
12341 </result>
12342
12343 </desc>
12344 </method>
12345
12346 </interface>
12347
12348 <!--
12349 // IStorageController
12350 /////////////////////////////////////////////////////////////////////////
12351 -->
12352
12353 <enum
12354 name="StorageBus"
12355 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12356 >
12357 <desc>
12358 The connection type of the storage controller.
12359 </desc>
12360 <const name="Null" value="0">
12361 <desc><tt>null</tt> value. Never used by the API.</desc>
12362 </const>
12363 <const name="IDE" value="1"/>
12364 <const name="SATA" value="2"/>
12365 <const name="SCSI" value="3"/>
12366 </enum>
12367
12368 <enum
12369 name="StorageControllerType"
12370 uuid="685387db-a837-4320-a258-08f46a22f62a"
12371 >
12372 <desc>
12373 Storage controller type.
12374 </desc>
12375
12376 <const name="Null" value="0">
12377 <desc><tt>null</tt> value. Never used by the API.</desc>
12378 </const>
12379 <const name="LsiLogic" value="1"/>
12380 <const name="BusLogic" value="2"/>
12381 <const name="IntelAhci" value="3"/>
12382 <const name="PIIX3" value="4"/>
12383 <const name="PIIX4" value="5"/>
12384 <const name="ICH6" value="6"/>
12385 </enum>
12386
12387 <interface
12388 name="IStorageController" extends="$unknown"
12389 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12390 wsmap="managed"
12391 >
12392 <desc>
12393 Represents a storage controller that is attached to a virtual machine
12394 (<link to="IMachine" />). Just as hard disks are attached to storage
12395 controllers in a real computer, virtual hard disks (represented by
12396 <link to="IHardDisk" />) are attached to virtual storage controllers,
12397 represented by this interface.
12398
12399 VirtualBox supports three types of virtual storage controller hardware:
12400 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12401 these three is used, certain sub-types are available and can be
12402 selected in <link to="#controllerType" />.
12403 </desc>
12404
12405 <attribute name="name" type="wstring" readonly="yes">
12406 <desc>
12407 Name of the storage controller, as originally specified with
12408 <link to="IMachine::addStorageController" />. This then uniquely
12409 identifies this controller with other method calls such as
12410 <link to="IMachine::attachHardDisk" />.
12411 </desc>
12412 </attribute>
12413
12414 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12415 <desc>
12416 Maximum number of devices which can be attached to one port.
12417 </desc>
12418 </attribute>
12419
12420 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12421 <desc>
12422 Minimum number of ports which can be set with
12423 <link to="IStorageController::SetPortCount"/>.
12424 </desc>
12425 </attribute>
12426
12427 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12428 <desc>
12429 Maximum number of ports which can be set with
12430 <link to="IStorageController::SetPortCount"/>.
12431 </desc>
12432 </attribute>
12433
12434 <attribute name="instance" type="unsigned long">
12435 <desc>
12436 The instance number of the device in the running VM.
12437 </desc>
12438 </attribute>
12439
12440 <attribute name="portCount" type="unsigned long">
12441 <desc>
12442 The number of currently usable ports on the controller.
12443 The minimum and maximum number of ports for one controller type can
12444 be determined with <link to="IStorageController::GetMinPortCount"/>
12445 and <link to="IStorageController::GetMaxPortCount"/>..
12446 </desc>
12447 </attribute>
12448
12449 <attribute name="bus" type="StorageBus" readonly="yes">
12450 <desc>
12451 The connection type of the storage controller.
12452 </desc>
12453 </attribute>
12454
12455 <attribute name="controllerType" type="StorageControllerType">
12456 <desc>
12457 Type of the virtual storage controller. Depending on this value,
12458 VirtualBox will provide a different virtual storage controller hardware
12459 to the guest.
12460
12461 For SCSI controllers, the default type is LsiLogic.
12462 </desc>
12463 </attribute>
12464
12465 <method name="GetIDEEmulationPort">
12466 <desc>
12467 Gets the corresponding port number which is emulated as an IDE device.
12468
12469 <result name="E_INVALIDARG">
12470 The @a devicePosition is not in the range 0 to 3.
12471 </result>
12472 <result name="E_NOTIMPL">
12473 The storage controller type is not SATAIntelAhci.
12474 </result>
12475
12476 </desc>
12477 <param name="devicePosition" type="long" dir="in"/>
12478 <param name="portNumber" type="long" dir="return"/>
12479 </method>
12480
12481 <method name="SetIDEEmulationPort">
12482 <desc>
12483 Sets the port number which is emulated as an IDE device.
12484
12485 <result name="E_INVALIDARG">
12486 The @a devicePosition is not in the range 0 to 3 or the
12487 @a portNumber is not in the range 0 to 29.
12488 </result>
12489 <result name="E_NOTIMPL">
12490 The storage controller type is not SATAIntelAhci.
12491 </result>
12492
12493 </desc>
12494 <param name="devicePosition" type="long" dir="in"/>
12495 <param name="portNumber" type="long" dir="in"/>
12496 </method>
12497
12498 </interface>
12499
12500<if target="wsdl">
12501
12502 <!--
12503 // IManagedObjectRef
12504 /////////////////////////////////////////////////////////////////////////
12505 -->
12506
12507 <interface
12508 name="IManagedObjectRef" extends="$unknown"
12509 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12510 internal="yes"
12511 wsmap="managed"
12512 wscpp="hardcoded"
12513 >
12514 <desc>
12515 Managed object reference.
12516
12517 Only within the webservice, a managed object reference (which is really
12518 an opaque number) allows a webservice client to address an object
12519 that lives in the address space of the webservice server.
12520
12521 Behind each managed object reference, there is a COM object that lives
12522 in the webservice server's address space. The COM object is not freed
12523 until the managed object reference is released, either by an explicit
12524 call to <link to="IManagedObjectRef::release" /> or by logging off from
12525 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12526 all objects created during the webservice session.
12527
12528 Whenever a method call of the VirtualBox API returns a COM object, the
12529 webservice representation of that method will instead return a
12530 managed object reference, which can then be used to invoke methods
12531 on that object.
12532 </desc>
12533
12534 <method name="getInterfaceName">
12535 <desc>
12536 Returns the name of the interface that this managed object represents,
12537 for example, "IMachine", as a string.
12538 </desc>
12539 <param name="return" type="wstring" dir="return"/>
12540 </method>
12541
12542 <method name="release">
12543 <desc>
12544 Releases this managed object reference and frees the resources that
12545 were allocated for it in the webservice server process. After calling
12546 this method, the identifier of the reference can no longer be used.
12547 </desc>
12548 </method>
12549
12550 </interface>
12551
12552 <!--
12553 // IWebsessionManager
12554 /////////////////////////////////////////////////////////////////////////
12555 -->
12556
12557 <interface
12558 name="IWebsessionManager" extends="$unknown"
12559 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12560 internal="yes"
12561 wsmap="global"
12562 wscpp="hardcoded"
12563 >
12564 <desc>
12565 Websession manager. This provides essential services
12566 to webservice clients.
12567 </desc>
12568 <method name="logon">
12569 <desc>
12570 Logs a new client onto the webservice and returns a managed object reference to
12571 the IVirtualBox instance, which the client can then use as a basis to further
12572 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12573 interface, in one way or the other.
12574 </desc>
12575 <param name="username" type="wstring" dir="in"/>
12576 <param name="password" type="wstring" dir="in"/>
12577 <param name="return" type="IVirtualBox" dir="return"/>
12578 </method>
12579
12580 <method name="getSessionObject">
12581 <desc>
12582 Returns a managed object reference to the internal ISession object that was created
12583 for this web service session when the client logged on.
12584
12585 <see>ISession</see>
12586 </desc>
12587 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12588 <param name="return" type="ISession" dir="return"/>
12589 </method>
12590
12591 <method name="logoff">
12592 <desc>
12593 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12594 and destroys all resources associated with the session (most importantly, all
12595 managed objects created in the server while the session was active).
12596 </desc>
12597 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12598 </method>
12599
12600 </interface>
12601
12602</if>
12603
12604 <!--
12605 // IPerformanceCollector & friends
12606 /////////////////////////////////////////////////////////////////////////
12607 -->
12608
12609 <interface
12610 name="IPerformanceMetric" extends="$unknown"
12611 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12612 >
12613 <desc>
12614 The IPerformanceMetric interface represents parameters of the given
12615 performance metric.
12616 </desc>
12617
12618 <attribute name="metricName" type="wstring" readonly="yes">
12619 <desc>
12620 Name of the metric.
12621 </desc>
12622 </attribute>
12623
12624 <attribute name="object" type="$unknown" readonly="yes">
12625 <desc>
12626 Object this metric belongs to.
12627 </desc>
12628 </attribute>
12629
12630 <attribute name="description" type="wstring" readonly="yes">
12631 <desc>
12632 Textual description of the metric.
12633 </desc>
12634 </attribute>
12635
12636 <attribute name="period" type="unsigned long" readonly="yes">
12637 <desc>
12638 Time interval between samples, measured in seconds.
12639 </desc>
12640 </attribute>
12641
12642 <attribute name="count" type="unsigned long" readonly="yes">
12643 <desc>
12644 Number of recent samples retained by the performance collector for this
12645 metric.
12646
12647 When the collected sample count exceeds this number, older samples
12648 are discarded.
12649 </desc>
12650 </attribute>
12651
12652 <attribute name="unit" type="wstring" readonly="yes">
12653 <desc>
12654 Unit of measurement.
12655 </desc>
12656 </attribute>
12657
12658 <attribute name="minimumValue" type="long" readonly="yes">
12659 <desc>
12660 Minimum possible value of this metric.
12661 </desc>
12662 </attribute>
12663
12664 <attribute name="maximumValue" type="long" readonly="yes">
12665 <desc>
12666 Maximum possible value of this metric.
12667 </desc>
12668 </attribute>
12669 </interface>
12670
12671 <interface
12672 name="IPerformanceCollector" extends="$unknown"
12673 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12674 wsmap="managed"
12675 >
12676 <desc>
12677 The IPerformanceCollector interface represents a service that collects and
12678 stores performance metrics data.
12679
12680 Performance metrics are associated with objects like IHost and
12681 IMachine. Each object has a distinct set of performance metrics.
12682 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12683
12684 Metric data are collected at the specified intervals and are retained
12685 internally. The interval and the number of samples retained can be set
12686 with <link to="IPerformanceCollector::setupMetrics" />.
12687
12688 Metrics are organized hierarchically, each level separated by slash (/).
12689 General scheme for metric name is
12690 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12691 metric name stands for: CPU category, Load metric, User submetric, average
12692 aggregate. An aggregate function is computed over all retained data. Valid
12693 aggregate functions are:
12694
12695 <ul>
12696 <li>avg -- average</li>
12697 <li>min -- minimum</li>
12698 <li>max -- maximum</li>
12699 </ul>
12700
12701 "Category/Metric" together form base metric name. A base metric is the
12702 smallest unit for which a sampling interval and the number of retained
12703 samples can be set. Only base metrics can be enabled and disabled. All
12704 sub-metrics are collected when their base metric is collected.
12705 Collected values for any set of sub-metrics can be queried with
12706 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12707 metric parameters, querying metric data, enabling or disabling metrics
12708 wildcards can be used in metric names to specify a subset of metrics. For
12709 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12710 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12711 values without aggregates <tt>*:</tt> can be used.
12712
12713 The valid names for base metrics are:
12714
12715 <ul>
12716 <li>CPU/Load</li>
12717 <li>CPU/MHz</li>
12718 <li>RAM/Usage</li>
12719 </ul>
12720
12721 The general sequence for collecting and retrieving the metrics is:
12722 <ul>
12723 <li>
12724 Obtain an instance of IPerformanceCollector with
12725 <link to="IVirtualBox::performanceCollector" />
12726 </li>
12727 <li>
12728 Allocate and populate an array with references to objects the metrics
12729 will be collected for. Use references to IHost and IMachine objects.
12730 </li>
12731 <li>
12732 Allocate and populate an array with base metric names the data will be
12733 collected for.
12734 </li>
12735 <li>
12736 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12737 metric data will be collected and stored.
12738 </li>
12739 <li>
12740 Wait for the data to get collected.
12741 </li>
12742 <li>
12743 Allocate and populate an array with references to objects the metric
12744 values will be queried for. You can re-use the object array used for
12745 setting base metrics.
12746 </li>
12747 <li>
12748 Allocate and populate an array with metric names the data will be
12749 collected for. Note that metric names differ from base metric names.
12750 </li>
12751 <li>
12752 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12753 have been collected so far are returned. Note that the values are still
12754 retained internally and data collection continues.
12755 </li>
12756 </ul>
12757
12758 For an example of usage refer to the following files in VirtualBox SDK:
12759 <ul>
12760 <li>
12761 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12762 </li>
12763 <li>
12764 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12765 </li>
12766 </ul>
12767 </desc>
12768
12769 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12770 <desc>
12771 Array of unique names of metrics.
12772
12773 This array represents all metrics supported by the performance
12774 collector. Individual objects do not necessarily support all of them.
12775 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12776 list of supported metrics for a particular object.
12777 </desc>
12778 </attribute>
12779
12780 <method name="getMetrics">
12781 <desc>
12782 Returns parameters of specified metrics for a set of objects.
12783 <note>
12784 @c Null metrics array means all metrics. @c Null object array means
12785 all existing objects.
12786 </note>
12787 </desc>
12788 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12789 <desc>
12790 Metric name filter. Currently, only a comma-separated list of metrics
12791 is supported.
12792 </desc>
12793 </param>
12794 <param name="objects" type="$unknown" dir="in" safearray="yes">
12795 <desc>
12796 Set of objects to return metric parameters for.
12797 </desc>
12798 </param>
12799 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12800 <desc>
12801 Array of returned metric parameters.
12802 </desc>
12803 </param>
12804 </method>
12805
12806 <method name="setupMetrics">
12807 <desc>
12808 Sets parameters of specified base metrics for a set of objects. Returns
12809 an array of <link to="IPerformanceMetric" /> describing the metrics have
12810 been affected.
12811 <note>
12812 @c Null or empty metric name array means all metrics. @c Null or empty
12813 object array means all existing objects. If metric name array contains
12814 a single element and object array contains many, the single metric
12815 name array element is applied to each object array element to form
12816 metric/object pairs.
12817 </note>
12818 </desc>
12819 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12820 <desc>
12821 Metric name filter. Comma-separated list of metrics with wildcard
12822 support.
12823 </desc>
12824 </param>
12825 <param name="objects" type="$unknown" dir="in" safearray="yes">
12826 <desc>
12827 Set of objects to setup metric parameters for.
12828 </desc>
12829 </param>
12830 <param name="period" type="unsigned long" dir="in">
12831 <desc>
12832 Time interval in seconds between two consecutive samples of performance
12833 data.
12834 </desc>
12835 </param>
12836 <param name="count" type="unsigned long" dir="in">
12837 <desc>
12838 Number of samples to retain in performance data history. Older samples
12839 get discarded.
12840 </desc>
12841 </param>
12842 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12843 <desc>
12844 Array of metrics that have been modified by the call to this method.
12845 </desc>
12846 </param>
12847 </method>
12848
12849 <method name="enableMetrics">
12850 <desc>
12851 Turns on collecting specified base metrics. Returns an array of
12852 <link to="IPerformanceMetric" /> describing the metrics have been
12853 affected.
12854 <note>
12855 @c Null or empty metric name array means all metrics. @c Null or empty
12856 object array means all existing objects. If metric name array contains
12857 a single element and object array contains many, the single metric
12858 name array element is applied to each object array element to form
12859 metric/object pairs.
12860 </note>
12861 </desc>
12862 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12863 <desc>
12864 Metric name filter. Comma-separated list of metrics with wildcard
12865 support.
12866 </desc>
12867 </param>
12868 <param name="objects" type="$unknown" dir="in" safearray="yes">
12869 <desc>
12870 Set of objects to enable metrics for.
12871 </desc>
12872 </param>
12873 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12874 <desc>
12875 Array of metrics that have been modified by the call to this method.
12876 </desc>
12877 </param>
12878 </method>
12879
12880 <method name="disableMetrics">
12881 <desc>
12882 Turns off collecting specified base metrics. Returns an array of
12883 <link to="IPerformanceMetric" /> describing the metrics have been
12884 affected.
12885 <note>
12886 @c Null or empty metric name array means all metrics. @c Null or empty
12887 object array means all existing objects. If metric name array contains
12888 a single element and object array contains many, the single metric
12889 name array element is applied to each object array element to form
12890 metric/object pairs.
12891 </note>
12892 </desc>
12893 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12894 <desc>
12895 Metric name filter. Comma-separated list of metrics with wildcard
12896 support.
12897 </desc>
12898 </param>
12899 <param name="objects" type="$unknown" dir="in" safearray="yes">
12900 <desc>
12901 Set of objects to disable metrics for.
12902 </desc>
12903 </param>
12904 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
12905 <desc>
12906 Array of metrics that have been modified by the call to this method.
12907 </desc>
12908 </param>
12909 </method>
12910
12911 <method name="queryMetricsData">
12912 <desc>
12913 Queries collected metrics data for a set of objects.
12914
12915 The data itself and related metric information are returned in seven
12916 parallel and one flattened array of arrays. Elements of
12917 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
12918 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
12919 the same index describe one set of values corresponding to a single
12920 metric.
12921
12922 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
12923 start and length of a sub-array is indicated by
12924 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
12925 value for metric <tt>metricNames[i]</tt> is at
12926 <tt>returnData[returnIndices[i]]</tt>.
12927
12928 <note>
12929 @c Null or empty metric name array means all metrics. @c Null or empty
12930 object array means all existing objects. If metric name array contains
12931 a single element and object array contains many, the single metric
12932 name array element is applied to each object array element to form
12933 metric/object pairs.
12934 </note>
12935 <note>
12936 Data collection continues behind the scenes after call to
12937 @c queryMetricsData. The return data can be seen as the snapshot of
12938 the current state at the time of @c queryMetricsData call. The
12939 internally kept metric values are not cleared by the call. This makes
12940 possible querying different subsets of metrics or aggregates with
12941 subsequent calls. If periodic querying is needed it is highly
12942 suggested to query the values with @c interval*count period to avoid
12943 confusion. This way a completely new set of data values will be
12944 provided by each query.
12945 </note>
12946 </desc>
12947 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12948 <desc>
12949 Metric name filter. Comma-separated list of metrics with wildcard
12950 support.
12951 </desc>
12952 </param>
12953 <param name="objects" type="$unknown" dir="in" safearray="yes">
12954 <desc>
12955 Set of objects to query metrics for.
12956 </desc>
12957 </param>
12958 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
12959 <desc>
12960 Names of metrics returned in @c returnData.
12961 </desc>
12962 </param>
12963 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
12964 <desc>
12965 Objects associated with metrics returned in @c returnData.
12966 </desc>
12967 </param>
12968 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
12969 <desc>
12970 Units of measurement for each returned metric.
12971 </desc>
12972 </param>
12973 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
12974 <desc>
12975 Divisor that should be applied to return values in order to get
12976 floating point values. For example:
12977 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
12978 will retrieve the floating point value of i-th sample of the first
12979 metric.
12980 </desc>
12981 </param>
12982 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
12983 <desc>
12984 Sequence numbers of the first elements of value sequences of particular metrics
12985 returned in @c returnData. For aggregate metrics it is the sequence number of
12986 the sample the aggregate started calculation from.
12987 </desc>
12988 </param>
12989 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
12990 <desc>
12991 Indices of the first elements of value sequences of particular metrics
12992 returned in @c returnData.
12993 </desc>
12994 </param>
12995 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
12996 <desc>
12997 Lengths of value sequences of particular metrics.
12998 </desc>
12999 </param>
13000 <param name="returnData" type="long" dir="return" safearray="yes">
13001 <desc>
13002 Flattened array of all metric data containing sequences of values for
13003 each metric.
13004 </desc>
13005 </param>
13006 </method>
13007
13008 </interface>
13009
13010 <module name="VBoxSVC" context="LocalServer">
13011 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13012 namespace="virtualbox.org">
13013 <interface name="IVirtualBox" default="yes"/>
13014 </class>
13015 </module>
13016
13017 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13018 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13019 namespace="virtualbox.org">
13020 <interface name="ISession" default="yes"/>
13021 </class>
13022 </module>
13023
13024</library>
13025
13026</idl>
13027
13028<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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