VirtualBox

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

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

OVF: reserve a miscellaneous config item for later string config when we add IOAPIC and other items support

  • Property svn:eol-style set to native
File size: 491.6 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="AccessMode"
363 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
364 >
365 <desc>
366 Access mode for opening files.
367 </desc>
368
369 <const name="ReadOnly" value="1"/>
370 <const name="ReadWrite" value="2"/>
371 </enum>
372
373 <enum
374 name="MachineState"
375 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
376 >
377 <desc>
378 Virtual machine execution state.
379
380 This enumeration represents possible values of the <link
381 to="IMachine::state"/> attribute.
382
383 Below is the basic virtual machine state diagram. It shows how the state
384 changes during virtual machine execution. The text in square braces shows
385 a method of the IConsole interface that performs the given state
386 transition.
387
388 <pre>
389 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
390 V |
391 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
392 | | | | V |
393 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
394 | | ^ | ^ |
395 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
396 | ^ | | | |
397 | | +-----------------------------------------+-|-------------------+ +
398 | | | | |
399 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
400 | | | |
401 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
402 | | |
403 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
404 </pre>
405
406 Note that states to the right from PoweredOff, Aborted and Saved in the
407 above diagram are called <i>online VM states</i>. These states
408 represent the virtual machine which is being executed in a dedicated
409 process (usually with a GUI window attached to it where you can see the
410 activity of the virtual machine and interact with it). There are two
411 special pseudo-states, FirstOnline and LastOnline, that can be used in
412 relational expressions to detect if the given machine state is online or
413 not:
414
415 <pre>
416 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
417 machine.GetState() &lt;= MachineState_LastOnline)
418 {
419 ...the machine is being executed...
420 }
421 </pre>
422
423 When the virtual machine is in one of the online VM states (that is, being
424 executed), only a few machine settings can be modified. Methods working
425 with such settings contain an explicit note about that. An attempt to
426 change any oter setting or perform a modifying operation during this time
427 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
428
429 All online states except Running, Paused and Stuck are transitional: they
430 represent temporary conditions of the virtual machine that will last as
431 long as the operation that initiated such a condition.
432
433 The Stuck state is a special case. It means that execution of the machine
434 has reached the "Guru Meditation" condition. This condition indicates an
435 internal VMM (virtual machine manager) failure which may happen as a
436 result of either an unhandled low-level virtual hardware exception or one
437 of the recompiler exceptions (such as the <i>too-many-traps</i>
438 condition).
439
440 Note also that any online VM state may transit to the Aborted state. This
441 happens if the process that is executing the virtual machine terminates
442 unexpectedly (for example, crashes). Other than that, the Aborted state is
443 equivalent to PoweredOff.
444
445 There are also a few additional state diagrams that do not deal with
446 virtual machine execution and therefore are shown separately. The states
447 shown on these diagrams are called <i>offline VM states</i> (this includes
448 PoweredOff, Aborted and Saved too).
449
450 The first diagram shows what happens when a lengthy setup operation is
451 being executed (such as <link to="IMachine::attachHardDisk"/>).
452
453 <pre>
454 +----------------------------------(same state as before the call)------+
455 | |
456 +-&gt; PoweredOff --+ |
457 | | |
458 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
459 | |
460 +-&gt; Saved -------+
461 </pre>
462
463 The next two diagrams demonstrate the process of taking a snapshot of a
464 powered off virtual machine and performing one of the "discard..."
465 operations, respectively.
466
467 <pre>
468 +----------------------------------(same state as before the call)------+
469 | |
470 +-&gt; PoweredOff --+ |
471 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
472 +-&gt; Aborted -----+
473
474 +-&gt; PoweredOff --+
475 | |
476 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
477 | | [discardCurrentState()] |
478 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
479 | |
480 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
481 </pre>
482
483 Note that the Saving state is present in both the offline state group and
484 online state group. Currently, the only way to determine what group is
485 assumed in a particular case is to remember the previous machine state: if
486 it was Running or Paused, then Saving is an online state, otherwise it is
487 an offline state. This inconsistency may be removed in one of the future
488 versions of VirtualBox by adding a new state.
489
490 <note internal="yes">
491 For whoever decides to touch this enum: In order to keep the
492 comparisons involving FirstOnline and LastOnline pseudo-states valid,
493 the numeric values of these states must be correspondingly updated if
494 needed: for any online VM state, the condition
495 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
496 <tt>true</tt>. The same relates to transient states for which
497 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
498 <tt>true</tt>.
499 </note>
500 </desc>
501
502 <const name="Null" value="0">
503 <desc>Null value (never used by the API).</desc>
504 </const>
505 <const name="PoweredOff" value="1">
506 <desc>
507 The machine is not running.
508 </desc>
509 </const>
510 <const name="Saved" value="2">
511 <desc>
512 The machine is not currently running, but the execution state of the machine
513 has been saved to an external file when it was running.
514 </desc>
515 </const>
516 <const name="Aborted" value="3">
517 <desc>
518 The process running the machine has terminated abnormally.
519 </desc>
520 </const>
521 <const name="Running" value="4">
522 <desc>
523 The machine is currently being executed.
524 <note internal="yes">
525 For whoever decides to touch this enum: In order to keep the
526 comparisons in the old source code valid, this state must immediately
527 precede the Paused state.
528 </note>
529 </desc>
530 </const>
531 <const name="Paused" value="5">
532 <desc>
533 Execution of the machine has been paused.
534 <note internal="yes">
535 For whoever decides to touch this enum: In order to keep the
536 comparisons in the old source code valid, this state must immediately
537 follow the Running state.
538 </note>
539 </desc>
540 </const>
541 <const name="Stuck" value="6">
542 <desc>
543 Execution of the machine has reached the "Guru Meditation"
544 condition.
545 </desc>
546 </const>
547 <const name="Starting" value="7">
548 <desc>
549 Machine is being started after powering it on from a
550 zero execution state.
551 </desc>
552 </const>
553 <const name="Stopping" value="8">
554 <desc>
555 Machine is being normally stopped powering it off, or after the guest OS
556 has initiated a shutdown sequence.
557 </desc>
558 </const>
559 <const name="Saving" value="9">
560 <desc>
561 Machine is saving its execution state to a file or an online
562 snapshot of the machine is being taken.
563 </desc>
564 </const>
565 <const name="Restoring" value="10">
566 <desc>
567 Execution state of the machine is being restored from a file
568 after powering it on from the saved execution state.
569 </desc>
570 </const>
571 <const name="Discarding" value="11">
572 <desc>
573 Snapshot of the machine is being discarded.
574 </desc>
575 </const>
576 <const name="SettingUp" value="12">
577 <desc>
578 Lengthy setup operation is in progress.
579 </desc>
580 </const>
581
582 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
583 <desc>
584 Pseudo-state: first online state (for use in relational expressions).
585 </desc>
586 </const>
587 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
588 <desc>
589 Pseudo-state: last online state (for use in relational expressions).
590 </desc>
591 </const>
592
593 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
594 <desc>
595 Pseudo-state: first transient state (for use in relational expressions).
596 </desc>
597 </const>
598 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
599 <desc>
600 Pseudo-state: last transient state (for use in relational expressions).
601 </desc>
602 </const>
603
604 </enum>
605
606 <enum
607 name="SessionState"
608 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
609 >
610 <desc>
611 Session state. This enumeration represents possible values of
612 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
613 attributes. See individual enumerator descriptions for the meaning for
614 every value.
615 </desc>
616
617 <const name="Null" value="0">
618 <desc>Null value (never used by the API).</desc>
619 </const>
620 <const name="Closed" value="1">
621 <desc>
622 The machine has no open sessions (<link to="IMachine::sessionState"/>);
623 the session is closed (<link to="ISession::state"/>)
624 </desc>
625 </const>
626 <const name="Open" value="2">
627 <desc>
628 The machine has an open direct session (<link to="IMachine::sessionState"/>);
629 the session is open (<link to="ISession::state"/>)
630 </desc>
631 </const>
632 <const name="Spawning" value="3">
633 <desc>
634 A new (direct) session is being opened for the machine
635 as a result of <link to="IVirtualBox::openRemoteSession"/>
636 call (<link to="IMachine::sessionState"/>);
637 the session is currently being opened
638 as a result of <link to="IVirtualBox::openRemoteSession"/>
639 call (<link to="ISession::state"/>)
640 </desc>
641 </const>
642 <const name="Closing" value="4">
643 <desc>
644 The direct session is being closed (<link to="IMachine::sessionState"/>);
645 the session is being closed (<link to="ISession::state"/>)
646 </desc>
647 </const>
648 </enum>
649
650 <enum
651 name="SessionType"
652 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
653 >
654 <desc>
655 Session type. This enumeration represents possible values of the
656 <link to="ISession::type"/> attribute.
657 </desc>
658
659 <const name="Null" value="0">
660 <desc>Null value (never used by the API).</desc>
661 </const>
662 <const name="Direct" value="1">
663 <desc>
664 Direct session
665 (opened by <link to="IVirtualBox::openSession"/>)
666 </desc>
667 </const>
668 <const name="Remote" value="2">
669 <desc>
670 Remote session
671 (opened by <link to="IVirtualBox::openRemoteSession"/>)
672 </desc>
673 </const>
674 <const name="Existing" value="3">
675 <desc>
676 Existing session
677 (opened by <link to="IVirtualBox::openExistingSession"/>)
678 </desc>
679 </const>
680 </enum>
681
682 <enum
683 name="DeviceType"
684 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
685 >
686 <desc>
687 Device type.
688 </desc>
689 <const name="Null" value="0">
690 <desc>
691 Null value, may also mean "no device" (not allowed for
692 <link to="IConsole::getDeviceActivity"/>).
693 </desc>
694 </const>
695 <const name="Floppy" value="1">
696 <desc>Floppy device.</desc>
697 </const>
698 <const name="DVD" value="2">
699 <desc>CD/DVD-ROM device.</desc>
700 </const>
701 <const name="HardDisk" value="3">
702 <desc>Hard disk device.</desc>
703 </const>
704 <const name="Network" value="4">
705 <desc>Network device.</desc>
706 </const>
707 <const name="USB" value="5">
708 <desc>USB device.</desc>
709 </const>
710 <const name="SharedFolder" value="6">
711 <desc>Shared folder device.</desc>
712 </const>
713 </enum>
714
715 <enum
716 name="DeviceActivity"
717 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
718 >
719 <desc>
720 Device activity for <link to="IConsole::getDeviceActivity"/>.
721 </desc>
722
723 <const name="Null" value="0"/>
724 <const name="Idle" value="1"/>
725 <const name="Reading" value="2"/>
726 <const name="Writing" value="3"/>
727 </enum>
728
729 <enum
730 name="ClipboardMode"
731 uuid="33364716-4008-4701-8f14-be0fa3d62950"
732 >
733 <desc>
734 Host-Guest clipboard interchange mode.
735 </desc>
736
737 <const name="Disabled" value="0"/>
738 <const name="HostToGuest" value="1"/>
739 <const name="GuestToHost" value="2"/>
740 <const name="Bidirectional" value="3"/>
741 </enum>
742
743 <enum
744 name="Scope"
745 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
746 >
747 <desc>
748 Scope of the operation.
749
750 A generic enumeration used in various methods to define the action or
751 argument scope.
752 </desc>
753
754 <const name="Global" value="0"/>
755 <const name="Machine" value="1"/>
756 <const name="Session" value="2"/>
757 </enum>
758
759 <enum
760 name="GuestStatisticType"
761 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
762 >
763 <desc>
764 Statistics type for <link to="IGuest::getStatistic"/>.
765 </desc>
766
767 <const name="CPULoad_Idle" value="0">
768 <desc>
769 Idle CPU load (0-100%) for last interval.
770 </desc>
771 </const>
772 <const name="CPULoad_Kernel" value="1">
773 <desc>
774 Kernel CPU load (0-100%) for last interval.
775 </desc>
776 </const>
777 <const name="CPULoad_User" value="2">
778 <desc>
779 User CPU load (0-100%) for last interval.
780 </desc>
781 </const>
782 <const name="Threads" value="3">
783 <desc>
784 Total number of threads in the system.
785 </desc>
786 </const>
787 <const name="Processes" value="4">
788 <desc>
789 Total number of processes in the system.
790 </desc>
791 </const>
792 <const name="Handles" value="5">
793 <desc>
794 Total number of handles in the system.
795 </desc>
796 </const>
797 <const name="MemoryLoad" value="6">
798 <desc>
799 Memory load (0-100%).
800 </desc>
801 </const>
802 <const name="PhysMemTotal" value="7">
803 <desc>
804 Total physical memory in megabytes.
805 </desc>
806 </const>
807 <const name="PhysMemAvailable" value="8">
808 <desc>
809 Free physical memory in megabytes.
810 </desc>
811 </const>
812 <const name="PhysMemBalloon" value="9">
813 <desc>
814 Ballooned physical memory in megabytes.
815 </desc>
816 </const>
817 <const name="MemCommitTotal" value="10">
818 <desc>
819 Total amount of memory in the committed state in megabytes.
820 </desc>
821 </const>
822 <const name="MemKernelTotal" value="11">
823 <desc>
824 Total amount of memory used by the guest OS's kernel in megabytes.
825 </desc>
826 </const>
827 <const name="MemKernelPaged" value="12">
828 <desc>
829 Total amount of paged memory used by the guest OS's kernel in megabytes.
830 </desc>
831 </const>
832 <const name="MemKernelNonpaged" value="13">
833 <desc>
834 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
835 </desc>
836 </const>
837 <const name="MemSystemCache" value="14">
838 <desc>
839 Total amount of memory used by the guest OS's system cache in megabytes.
840 </desc>
841 </const>
842 <const name="PageFileSize" value="15">
843 <desc>
844 Pagefile size in megabytes.
845 </desc>
846 </const>
847 <const name="SampleNumber" value="16">
848 <desc>
849 Statistics sample number
850 </desc>
851 </const>
852 <const name="MaxVal" value="17"/>
853 </enum>
854
855 <enum
856 name="BIOSBootMenuMode"
857 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
858 >
859 <desc>
860 BIOS boot menu mode.
861 </desc>
862
863 <const name="Disabled" value="0"/>
864 <const name="MenuOnly" value="1"/>
865 <const name="MessageAndMenu" value="2"/>
866 </enum>
867
868 <enum
869 name="DriveState"
870 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
871 >
872 <const name="Null" value="0">
873 <desc>Null value (never used by the API).</desc>
874 </const>
875 <const name="NotMounted" value="1"/>
876 <const name="ImageMounted" value="2"/>
877 <const name="HostDriveCaptured" value="3"/>
878 </enum>
879
880 <enum
881 name="ProcessorFeature"
882 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
883 >
884 <desc>
885 CPU features.
886 </desc>
887
888 <const name="HWVirtEx" value="0"/>
889 <const name="PAE" value="1"/>
890 <const name="LongMode" value="2"/>
891 </enum>
892
893
894 <!--
895 // IVirtualBoxErrorInfo
896 /////////////////////////////////////////////////////////////////////////
897 -->
898
899 <interface
900 name="IVirtualBoxErrorInfo" extends="$errorinfo"
901 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
902 supportsErrorInfo="no"
903 wsmap="suppress"
904 >
905 <desc>
906 The IVirtualBoxErrorInfo interface represents extended error information.
907
908 Extended error information can be set by VirtualBox components after
909 unsuccessful or partially successful method invocation. This information
910 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
911 and then shown to the client in addition to the plain 32-bit result code.
912
913 In MS COM, this interface extends the IErrorInfo interface,
914 in XPCOM, it extends the nsIException interface. In both cases,
915 it provides a set of common attributes to retrieve error
916 information.
917
918 Sometimes invocation of some component's method may involve methods of
919 other components that may also fail (independently of this method's
920 failure), or a series of non-fatal errors may precede a fatal error that
921 causes method failure. In cases like that, it may be desirable to preserve
922 information about all errors happened during method invocation and deliver
923 it to the caller. The <link to="#next"/> attribute is intended
924 specifically for this purpose and allows to represent a chain of errors
925 through a single IVirtualBoxErrorInfo object set after method invocation.
926
927 Note that errors are stored to a chain in the reverse order, i.e. the
928 initial error object you query right after method invocation is the last
929 error set by the callee, the object it points to in the @a next attribute
930 is the previous error and so on, up to the first error (which is the last
931 in the chain).
932 </desc>
933
934 <attribute name="resultCode" type="result" readonly="yes">
935 <desc>
936 Result code of the error.
937 Usually, it will be the same as the result code returned
938 by the method that provided this error information, but not
939 always. For example, on Win32, CoCreateInstance() will most
940 likely return E_NOINTERFACE upon unsuccessful component
941 instantiation attempt, but not the value the component factory
942 returned.
943 <note>
944 In MS COM, there is no equivalent.
945 In XPCOM, it is the same as nsIException::result.
946 </note>
947 </desc>
948 </attribute>
949
950 <attribute name="interfaceID" type="uuid" readonly="yes">
951 <desc>
952 UUID of the interface that defined the error.
953 <note>
954 In MS COM, it is the same as IErrorInfo::GetGUID.
955 In XPCOM, there is no equivalent.
956 </note>
957 </desc>
958 </attribute>
959
960 <attribute name="component" type="wstring" readonly="yes">
961 <desc>
962 Name of the component that generated the error.
963 <note>
964 In MS COM, it is the same as IErrorInfo::GetSource.
965 In XPCOM, there is no equivalent.
966 </note>
967 </desc>
968 </attribute>
969
970 <attribute name="text" type="wstring" readonly="yes">
971 <desc>
972 Text description of the error.
973 <note>
974 In MS COM, it is the same as IErrorInfo::GetDescription.
975 In XPCOM, it is the same as nsIException::message.
976 </note>
977 </desc>
978 </attribute>
979
980 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
981 <desc>
982 Next error object if there is any, or @c null otherwise.
983 <note>
984 In MS COM, there is no equivalent.
985 In XPCOM, it is the same as nsIException::inner.
986 </note>
987 </desc>
988 </attribute>
989
990 </interface>
991
992
993 <!--
994 // IVirtualBox
995 /////////////////////////////////////////////////////////////////////////
996 -->
997
998 <interface
999 name="IVirtualBoxCallback" extends="$unknown"
1000 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1001 wsmap="suppress"
1002 >
1003 <method name="onMachineStateChange">
1004 <desc>
1005 The execution state of the given machine has changed.
1006 <see>IMachine::state</see>
1007 </desc>
1008 <param name="machineId" type="uuid" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 <param name="state" type="MachineState" dir="in">
1012 <desc>New execution state.</desc>
1013 </param>
1014 </method>
1015
1016 <method name="onMachineDataChange">
1017 <desc>
1018 Any of the settings of the given machine has changed.
1019 </desc>
1020 <param name="machineId" type="uuid" dir="in">
1021 <desc>ID of the machine this event relates to.</desc>
1022 </param>
1023 </method>
1024
1025 <method name="onExtraDataCanChange">
1026 <desc>
1027 Notification when someone tries to change extra data for
1028 either the given machine or (if null) global extra data.
1029 This gives the chance to veto against changes.
1030 </desc>
1031 <param name="machineId" type="uuid" dir="in">
1032 <desc>
1033 ID of the machine this event relates to
1034 (null ID for global extra data change requests).
1035 </desc>
1036 </param>
1037 <param name="key" type="wstring" dir="in">
1038 <desc>
1039 Extra data key for the attempted write.
1040 </desc>
1041 </param>
1042 <param name="value" type="wstring" dir="in">
1043 <desc>
1044 Extra data value for the given key.
1045 </desc>
1046 </param>
1047 <param name="error" type="wstring" dir="out">
1048 <desc>
1049 Optional error message describing the reason of the
1050 veto (ignored if this notification returns @c true).
1051 </desc>
1052 </param>
1053 <param name="allowChange" type="boolean" dir="return">
1054 <desc>
1055 Flag to indicate whether the callee agrees (@c true)
1056 or vetoes against the change (@c false).
1057 </desc>
1058 </param>
1059 </method>
1060
1061 <method name="onExtraDataChange">
1062 <desc>
1063 Notification when machine specific or global extra data
1064 has changed.
1065 </desc>
1066 <param name="machineId" type="uuid" dir="in">
1067 <desc>
1068 ID of the machine this event relates to.
1069 Null for global extra data changes.
1070 </desc>
1071 </param>
1072 <param name="key" type="wstring" dir="in">
1073 <desc>
1074 Extra data key that has changed.
1075 </desc>
1076 </param>
1077 <param name="value" type="wstring" dir="in">
1078 <desc>
1079 Extra data value for the given key.
1080 </desc>
1081 </param>
1082 </method>
1083
1084 <method name="onMediaRegistered">
1085 <desc>
1086 The given media was registered or unregistered
1087 within this VirtualBox installation.
1088
1089 The @a mediaType parameter describes what type of
1090 media the specified @a mediaId refers to. Possible
1091 values are:
1092
1093 <ul>
1094 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1095 that, if registered, can be obtained using the
1096 <link to="IVirtualBox::getHardDisk"/> call.</li>
1097 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1098 that, if registered, can be obtained using the
1099 <link to="IVirtualBox::getDVDImage"/> call.</li>
1100 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1101 that, if registered, can be obtained using the
1102 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1103 </ul>
1104
1105 Note that if this is a deregistration notification,
1106 there is no way to access the object representing the
1107 unregistered media. It is supposed that the
1108 application will do required cleanup based on the
1109 @a mediaId value.
1110 </desc>
1111 <param name="mediaId" type="uuid" dir="in">
1112 <desc>ID of the media this event relates to.</desc>
1113 </param>
1114 <param name="mediaType" type="DeviceType" dir="in">
1115 <desc>Type of the media this event relates to.</desc>
1116 </param>
1117 <param name="registered" type="boolean" dir="in">
1118 <desc>
1119 If true, the media was registered, otherwise it was
1120 unregistered.
1121 </desc>
1122 </param>
1123 </method>
1124
1125 <method name="onMachineRegistered">
1126 <desc>
1127 The given machine was registered or unregistered
1128 within this VirtualBox installation.
1129 </desc>
1130 <param name="machineId" type="uuid" dir="in">
1131 <desc>ID of the machine this event relates to.</desc>
1132 </param>
1133 <param name="registered" type="boolean" dir="in">
1134 <desc>
1135 If true, the machine was registered, otherwise it was
1136 unregistered.
1137 </desc>
1138 </param>
1139 </method>
1140
1141 <method name="onSessionStateChange">
1142 <desc>
1143 The state of the session for the given machine was changed.
1144 <see>IMachine::sessionState</see>
1145 </desc>
1146 <param name="machineId" type="uuid" dir="in">
1147 <desc>ID of the machine this event relates to.</desc>
1148 </param>
1149 <param name="state" type="SessionState" dir="in">
1150 <desc>New session state.</desc>
1151 </param>
1152 </method>
1153
1154 <method name="onSnapshotTaken">
1155 <desc>
1156 A new snapshot of the machine has been taken.
1157 <see>ISnapshot</see>
1158 </desc>
1159 <param name="machineId" type="uuid" dir="in">
1160 <desc>ID of the machine this event relates to.</desc>
1161 </param>
1162 <param name="snapshotId" type="uuid" dir="in">
1163 <desc>ID of the new snapshot.</desc>
1164 </param>
1165 </method>
1166
1167 <method name="onSnapshotDiscarded">
1168 <desc>
1169 Snapshot of the given machine has been discarded.
1170
1171 <note>
1172 This notification is delivered <b>after</b> the snapshot
1173 object has been uninitialized on the server (so that any
1174 attempt to call its methods will return an error).
1175 </note>
1176
1177 <see>ISnapshot</see>
1178 </desc>
1179 <param name="machineId" type="uuid" dir="in">
1180 <desc>ID of the machine this event relates to.</desc>
1181 </param>
1182 <param name="snapshotId" type="uuid" dir="in">
1183 <desc>
1184 ID of the discarded snapshot. <tt>null</tt> means the
1185 current machine state has been discarded (restored from
1186 the current snapshot).
1187 </desc>
1188 </param>
1189 </method>
1190
1191 <method name="onSnapshotChange">
1192 <desc>
1193 Snapshot properties (name and/or description) have been changed.
1194 <see>ISnapshot</see>
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>ID of the machine this event relates to.</desc>
1198 </param>
1199 <param name="snapshotId" type="uuid" dir="in">
1200 <desc>ID of the changed snapshot.</desc>
1201 </param>
1202 </method>
1203
1204 <method name="onGuestPropertyChange">
1205 <desc>
1206 Notification when a guest property has changed.
1207 </desc>
1208 <param name="machineId" type="uuid" dir="in">
1209 <desc>
1210 ID of the machine this event relates to.
1211 </desc>
1212 </param>
1213 <param name="name" type="wstring" dir="in">
1214 <desc>
1215 The name of the property that has changed.
1216 </desc>
1217 </param>
1218 <param name="value" type="wstring" dir="in">
1219 <desc>
1220 The new property value.
1221 </desc>
1222 </param>
1223 <param name="flags" type="wstring" dir="in">
1224 <desc>
1225 The new property flags.
1226 </desc>
1227 </param>
1228 </method>
1229
1230 </interface>
1231
1232 <interface
1233 name="IDHCPServer" extends="$unknown"
1234 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1235 wsmap="managed"
1236 >
1237 <desc>
1238 The IDHCPServer interface represents the vbox dhcp server configuration.
1239
1240 To enumerate all the dhcp servers on the host, use the
1241 <link to="IVirtualBox::DHCPServers"/> attribute.
1242 </desc>
1243
1244 <attribute name="enabled" type="boolean">
1245 <desc>
1246 specifies if the dhcp server is enabled
1247 </desc>
1248 </attribute>
1249
1250 <attribute name="IPAddress" type="wstring" readonly="yes">
1251 <desc>
1252 specifies server IP
1253 </desc>
1254 </attribute>
1255
1256 <attribute name="networkMask" type="wstring" readonly="yes">
1257 <desc>
1258 specifies server network mask
1259 </desc>
1260 </attribute>
1261
1262 <attribute name="networkName" type="wstring" readonly="yes">
1263 <desc>
1264 specifies internal network name the server is used for
1265 </desc>
1266 </attribute>
1267
1268 <attribute name="lowerIP" type="wstring" readonly="yes">
1269 <desc>
1270 specifies from IP adrres in server address range
1271 </desc>
1272 </attribute>
1273
1274 <attribute name="upperIP" type="wstring" readonly="yes">
1275 <desc>
1276 specifies to IP adrres in server address range
1277 </desc>
1278 </attribute>
1279
1280 <method name="setConfiguration">
1281 <desc>
1282 configures the server
1283 <result name="E_INVALIDARG">
1284 invalid configuration supplied
1285 </result>
1286 </desc>
1287 <param name="IPAddress" type="wstring" dir="in">
1288 <desc>
1289 server IP address
1290 </desc>
1291 </param>
1292 <param name="networkMask" type="wstring" dir="in">
1293 <desc>
1294 server network mask
1295 </desc>
1296 </param>
1297 <param name="FromIPAddress" type="wstring" dir="in">
1298 <desc>
1299 server From IP address for address range
1300 </desc>
1301 </param>
1302 <param name="ToIPAddress" type="wstring" dir="in">
1303 <desc>
1304 server To IP address for address range
1305 </desc>
1306 </param>
1307 </method>
1308
1309 <method name="start">
1310 <desc>
1311 Starts DHCP server process.
1312 <result name="E_FAIL">
1313 Failed to start the process.
1314 </result>
1315 </desc>
1316 <param name="networkName" type="wstring" dir="in">
1317 <desc>
1318 Name of internal network DHCP server should attach to.
1319 </desc>
1320 </param>
1321 <param name="trunkName" type="wstring" dir="in">
1322 <desc>
1323 Name of internal network trunk.
1324 </desc>
1325 </param>
1326 <param name="trunkType" type="wstring" dir="in">
1327 <desc>
1328 Type of internal network trunk.
1329 </desc>
1330 </param>
1331 </method>
1332
1333 <method name="stop">
1334 <desc>
1335 Stops DHCP server process.
1336 <result name="E_FAIL">
1337 Failed to stop the process.
1338 </result>
1339 </desc>
1340 </method>
1341 </interface>
1342
1343 <interface
1344 name="IVirtualBox" extends="$dispatched"
1345 uuid="779264f4-65ed-48ed-be39-518ca549e296"
1346 wsmap="managed"
1347 >
1348 <desc>
1349 The IVirtualBox interface represents the main interface exposed by the
1350 product that provides virtual machine management.
1351
1352 An instance of IVirtualBox is required for the product to do anything
1353 useful. Even though the interface does not expose this, internally,
1354 IVirtualBox is implemented as a singleton and actually lives in the
1355 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1356 IVirtualBox can track the state of all virtual machines on a particular
1357 host, regardless of which frontend started them.
1358
1359 To enumerate all the virtual machines on the host, use the
1360 <link to="IVirtualBox::machines"/> attribute.
1361 </desc>
1362
1363 <attribute name="version" type="wstring" readonly="yes">
1364 <desc>
1365 A string representing the version number of the product. The
1366 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1367 last number represents the build number and will frequently change.
1368 </desc>
1369 </attribute>
1370
1371 <attribute name="revision" type="unsigned long" readonly="yes">
1372 <desc>
1373 The internal build revision number of the product.
1374 </desc>
1375 </attribute>
1376
1377 <attribute name="packageType" type="wstring" readonly="yes">
1378 <desc>
1379 A string representing the package type of this product. The
1380 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1381 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1382 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1383 this.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="homeFolder" type="wstring" readonly="yes">
1388 <desc>
1389 Full path to the directory where the global settings file,
1390 <tt>VirtualBox.xml</tt>, is stored.
1391
1392 In this version of VirtualBox, the value of this property is
1393 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1394 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1395 as determined by the host OS), and cannot be changed.
1396
1397 This path is also used as the base to resolve relative paths in
1398 places where relative paths are allowed (unless otherwise
1399 expressly indicated).
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1404 <desc>
1405 Full name of the global settings file.
1406 The value of this property corresponds to the value of
1407 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1408 </desc>
1409 </attribute>
1410
1411 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1412 <desc>
1413 Current version of the format of the global VirtualBox settings file
1414 (<tt>VirtualBox.xml</tt>).
1415
1416 The version string has the following format:
1417 <pre>
1418 x.y-platform
1419 </pre>
1420 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1421 versions, and <tt>platform</tt> is the platform identifier.
1422
1423 The current version usually matches the value of the
1424 <link to="#settingsFormatVersion"/> attribute unless the
1425 settings file was created by an older version of VirtualBox and there
1426 was a change of the settings file format since then.
1427
1428 Note that VirtualBox automatically converts settings files from older
1429 versions to the most recent version when reading them (usually at
1430 VirtualBox startup) but it doesn't save the changes back until
1431 you call a method that implicitly saves settings (such as
1432 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1433 explicitly. Therefore, if the value of this attribute differs from the
1434 value of <link to="#settingsFormatVersion"/>, then it
1435 means that the settings file was converted but the result of the
1436 conversion is not yet saved to disk.
1437
1438 The above feature may be used by interactive front-ends to inform users
1439 about the settings file format change and offer them to explicitly save
1440 all converted settings files (the global and VM-specific ones),
1441 optionally create backup copies of the old settings files before saving,
1442 etc.
1443
1444 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1445 </desc>
1446 </attribute>
1447
1448 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1449 <desc>
1450 Most recent version of the settings file format.
1451
1452 The version string has the following format:
1453 <pre>
1454 x.y-platform
1455 </pre>
1456 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1457 versions, and <tt>platform</tt> is the platform identifier.
1458
1459 VirtualBox uses this version of the format when saving settings files
1460 (either as a result of method calls that require to save settings or as
1461 a result of an explicit call to <link to="#saveSettings"/>).
1462
1463 <see>settingsFileVersion</see>
1464 </desc>
1465 </attribute>
1466
1467 <attribute name="host" type="IHost" readonly="yes">
1468 <desc>Associated host object.</desc>
1469 </attribute>
1470
1471 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1472 <desc>Associated system information object.</desc>
1473 </attribute>
1474
1475 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1476 <desc>
1477 Array of machine objects registered within this VirtualBox instance.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1482 <desc>
1483 Array of hard disk objects known to this VirtualBox installation.
1484
1485 This array contains only base (root) hard disks. All differencing
1486 hard disks of the given base hard disk can be enumerated using
1487 <link to="IHardDisk::children"/>.
1488 </desc>
1489 </attribute>
1490
1491 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1492 <desc>
1493 Array of CD/DVD image objects registered with this VirtualBox instance.
1494 </desc>
1495 </attribute>
1496
1497 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1498 <desc>
1499 Array of floppy image objects registered with this VirtualBox instance.
1500 </desc>
1501 </attribute>
1502
1503 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1504
1505 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1506
1507 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1508 <desc>
1509 Collection of global shared folders. Global shared folders are
1510 available to all virtual machines.
1511
1512 New shared folders are added to the collection using
1513 <link to="#createSharedFolder"/>. Existing shared folders can be
1514 removed using <link to="#removeSharedFolder"/>.
1515
1516 <note>
1517 In the current version of the product, global shared folders are not
1518 implemented and therefore this collection is always empty.
1519 </note>
1520 </desc>
1521 </attribute>
1522
1523 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1524 <desc>
1525 Associated performance collector object.
1526 </desc>
1527 </attribute>
1528
1529 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1530 <desc>
1531 dhcp server settings.
1532 </desc>
1533 </attribute>
1534
1535 <method name="createMachine">
1536 <desc>
1537 Creates a new virtual machine.
1538
1539 The new machine is created unregistered, with the initial configuration
1540 set according to the specified guest OS type. A typical sequence of
1541 actions to create a new virtual machine is as follows:
1542
1543 <ol>
1544 <li>
1545 Call this method to have a new machine created. The returned machine
1546 object will be "mutable" allowing to change any machine property.
1547 </li>
1548
1549 <li>
1550 Configure the machine using the appropriate attributes and methods.
1551 </li>
1552
1553 <li>
1554 Call <link to="IMachine::saveSettings" /> to write the settings
1555 to the machine's XML settings file. The configuration of the newly
1556 created machine will not be saved to disk until this method is
1557 called.
1558 </li>
1559
1560 <li>
1561 Call <link to="#registerMachine" /> to add the machine to the list
1562 of machines known to VirtualBox.
1563 </li>
1564 </ol>
1565
1566 You should specify valid name for the newly created machine when calling
1567 this method. See the <link to="IMachine::name"/> attribute description
1568 for more details about the machine name.
1569
1570 The specified guest OS type identifier must match an ID of one of known
1571 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1572 array.
1573
1574 Every machine has a <i>settings file</i> that is used to store
1575 the machine configuration. This file is stored in a directory called the
1576 <i>machine settings subfolder</i>. Both the settings subfolder and file
1577 will have a name that corresponds to the name of the virtual machine.
1578 You can specify where to create the machine setting subfolder using the
1579 @a baseFolder argument. The base folder can be absolute (full path) or
1580 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1581 directory</link>.
1582
1583 If @a baseFolder is a null or empty string (which is recommended), the
1584 <link to="ISystemProperties::defaultMachineFolder">default machine
1585 settings folder</link> will be used as a base folder for the created
1586 machine. Otherwise the given base folder will be used. In either case,
1587 the full path to the resulting settings file has the following
1588 structure:
1589 <pre>
1590 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1591 </pre>
1592
1593 Note that if the resulting settings file already exists, this method
1594 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1595
1596 Optionally, you may specify an UUID of to assign to the created machine.
1597 However, this is not recommended and you should normally pass an empty
1598 (null) UUID to this method so that a new UUID will be automatically
1599 generated for every created machine. You can use UUID
1600 00000000-0000-0000-0000-000000000000 as null value.
1601
1602 <note>
1603 There is no way to change the name of the settings file or
1604 subfolder of the created machine directly.
1605 </note>
1606
1607 <result name="VBOX_E_OBJECT_NOT_FOUND">
1608 @a osTypeId is invalid.
1609 </result>
1610 <result name="VBOX_E_FILE_ERROR">
1611 Resulting settings file name is invalid or the settings file already
1612 exists or could not be created due to an I/O error.
1613 </result>
1614 <result name="E_INVALIDARG">
1615 @a name is empty or null.
1616 </result>
1617 </desc>
1618
1619 <param name="name" type="wstring" dir="in">
1620 <desc>Machine name.</desc>
1621 </param>
1622 <param name="osTypeId" type="wstring" dir="in">
1623 <desc>Guest OS Type ID.</desc>
1624 </param>
1625 <param name="baseFolder" type="wstring" dir="in">
1626 <desc>Base machine folder (optional).</desc>
1627 </param>
1628 <param name="id" type="uuid" dir="in">
1629 <desc>Machine UUID (optional).</desc>
1630 </param>
1631 <param name="machine" type="IMachine" dir="return">
1632 <desc>Created machine object.</desc>
1633 </param>
1634 </method>
1635
1636 <method name="createLegacyMachine">
1637 <desc>
1638 Creates a new virtual machine in "legacy" mode, using the specified
1639 settings file to store machine settings.
1640
1641 As opposed to machines created by <link to="#createMachine"/>,
1642 the settings file of the machine created in "legacy" mode is not
1643 automatically renamed when the machine name is changed -- it will always
1644 remain the same as specified in this method call.
1645
1646 The specified settings file name can be absolute (full path) or relative
1647 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1648 directory</link>. If the file name doesn't contain an extension, the
1649 default extension (.xml) will be appended.
1650
1651 Note that the configuration of the newly created machine is not
1652 saved to disk (and therefore no settings file is created)
1653 until <link to="IMachine::saveSettings"/> is called. If the
1654 specified settings file already exists, this method
1655 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1656
1657 See <link to="#createMachine"/> for more information.
1658
1659 @deprecated This method may be removed later. Use <link
1660 to="IVirtualBox::createMachine"/> instead.
1661
1662 <note>
1663 There is no way to change the name of the settings file
1664 of the machine created in "legacy" mode.
1665 </note>
1666
1667 <result name="VBOX_E_OBJECT_NOT_FOUND">
1668 @a osTypeId is invalid.
1669 </result>
1670 <result name="VBOX_E_FILE_ERROR">
1671 @a settingsFile is invalid or the settings file already exists or
1672 could not be created due to an I/O error.
1673 </result>
1674 <result name="E_INVALIDARG">
1675 @a name or @a settingsFile is empty or null.
1676 </result>
1677 </desc>
1678
1679 <param name="name" type="wstring" dir="in">
1680 <desc>Machine name.</desc>
1681 </param>
1682 <param name="osTypeId" type="wstring" dir="in">
1683 <desc>Machine OS Type ID.</desc>
1684 </param>
1685 <param name="settingsFile" type="wstring" dir="in">
1686 <desc>Name of the machine settings file.</desc>
1687 </param>
1688 <param name="id" type="uuid" dir="in">
1689 <desc>Machine UUID (optional).</desc>
1690 </param>
1691 <param name="machine" type="IMachine" dir="return">
1692 <desc>Created machine object.</desc>
1693 </param>
1694 </method>
1695
1696 <method name="openMachine">
1697 <desc>
1698 Opens a virtual machine from the existing settings file.
1699 The opened machine remains unregistered until you call
1700 <link to="#registerMachine"/>.
1701
1702 The specified settings file name can be absolute
1703 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1704 VirtualBox home directory</link>. This file must exist
1705 and must be a valid machine settings file whose contents
1706 will be used to construct the machine object.
1707
1708 @deprecated Will be removed soon.
1709 <result name="VBOX_E_FILE_ERROR">
1710 Settings file name invalid, not found or sharing violation.
1711 </result>
1712 </desc>
1713 <param name="settingsFile" type="wstring" dir="in">
1714 <desc>
1715 Name of the machine settings file.
1716 </desc>
1717 </param>
1718 <param name="machine" type="IMachine" dir="return">
1719 <desc>Opened machine object.</desc>
1720 </param>
1721 <note>
1722 <link to="IMachine::settingsModified"/> will return
1723 false for the created machine, until any of machine settings
1724 are changed.
1725 </note>
1726 </method>
1727
1728 <method name="registerMachine">
1729 <desc>
1730
1731 Registers the machine previously created using
1732 <link to="#createMachine"/> or opened using
1733 <link to="#openMachine"/> within this VirtualBox installation. After
1734 successful method invocation, the
1735 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1736 to all registered callbacks.
1737
1738 <note>
1739 This method implicitly calls <link to="IMachine::saveSettings"/>
1740 to save all current machine settings before registering it.
1741 </note>
1742
1743 <result name="VBOX_E_OBJECT_NOT_FOUND">
1744 No matching virtual machine found.
1745 </result>
1746 <result name="VBOX_E_INVALID_OBJECT_STATE">
1747 Virtual machine was not created within this VirtualBox instance.
1748 </result>
1749
1750 </desc>
1751 <param name="machine" type="IMachine" dir="in"/>
1752 </method>
1753
1754 <method name="getMachine">
1755 <desc>
1756 Attempts to find a virtual machine given its UUID.
1757 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1758 instead.
1759
1760 <result name="VBOX_E_OBJECT_NOT_FOUND">
1761 Could not find registered machine matching @a id.
1762 </result>
1763
1764 </desc>
1765 <param name="id" type="uuid" dir="in"/>
1766 <param name="machine" type="IMachine" dir="return"/>
1767 </method>
1768
1769 <method name="findMachine">
1770 <desc>
1771 Attempts to find a virtual machine given its name.
1772 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1773 instead.
1774
1775 <result name="VBOX_E_OBJECT_NOT_FOUND">
1776 Could not find registered machine matching @a name.
1777 </result>
1778
1779 </desc>
1780 <param name="name" type="wstring" dir="in"/>
1781 <param name="machine" type="IMachine" dir="return"/>
1782 </method>
1783
1784 <method name="unregisterMachine">
1785 <desc>
1786
1787 Unregisters the machine previously registered using
1788 <link to="#registerMachine"/>. After successful method invocation, the
1789 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1790 to all registered callbacks.
1791
1792 <note>
1793 The specified machine must not be in the Saved state, have an open
1794 (or a spawning) direct session associated with it, have snapshots or
1795 have hard disks attached.
1796 </note>
1797
1798 <note>
1799 This method implicitly calls <link to="IMachine::saveSettings"/> to
1800 save all current machine settings before unregistering it.
1801 </note>
1802
1803 <note>
1804 If the given machine is inaccessible (see
1805 <link to="IMachine::accessible"/>), it will be unregistered and
1806 fully uninitialized right afterwards. As a result, the returned
1807 machine object will be unusable and an attempt to call
1808 <b>any</b> method will return the "Object not ready" error.
1809 </note>
1810
1811 <result name="VBOX_E_OBJECT_NOT_FOUND">
1812 Could not find registered machine matching @a id.
1813 </result>
1814 <result name="VBOX_E_INVALID_VM_STATE">
1815 Machine is in Saved state.
1816 </result>
1817 <result name="VBOX_E_INVALID_OBJECT_STATE">
1818 Machine has snapshot or open session or hard disk attached.
1819 </result>
1820
1821 </desc>
1822 <param name="id" type="uuid" dir="in">
1823 <desc>UUID of the machine to unregister.</desc>
1824 </param>
1825 <param name="machine" type="IMachine" dir="return">
1826 <desc>Unregistered machine object.</desc>
1827 </param>
1828 </method>
1829
1830 <method name="createAppliance">
1831 <desc>
1832 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1833 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1834 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1835 </desc>
1836 <param name="appliance" type="IAppliance" dir="return">
1837 <desc>New appliance.</desc>
1838 </param>
1839 </method>
1840
1841 <method name="createHardDisk">
1842 <desc>
1843 Creates a new base hard disk object that will use the given storage
1844 format and location for hard disk data.
1845
1846 Note that the actual storage unit is not created by this method. In
1847 order to do it, and before you are able to attach the created hard disk
1848 to virtual machines, you must call one of the following methods to
1849 allocate a format-specific storage unit at the specified location:
1850 <ul>
1851 <li><link to="IHardDisk::createBaseStorage"/></li>
1852 <li><link to="IHardDisk::createDiffStorage"/></li>
1853 </ul>
1854
1855 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1856 remain uninitialized until the hard disk storage unit is successfully
1857 created by one of the above methods.
1858
1859 After the storage unit is successfully created, the hard disk gets
1860 remembered by this VirtualBox installation and will be accessible
1861 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1862 methods. Remembered root (base) hard disks are also returned as part of
1863 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1864
1865 The list of all storage formats supported by this VirtualBox
1866 installation can be obtained using
1867 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1868 attribute is empty or <tt>null</tt> then the default storage format
1869 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1870 be used for creating a storage unit of the hard disk.
1871
1872 Note that the format of the location string is storage format specific.
1873 See <link to="IMedium::location"/>, IHardDisk and
1874 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1875
1876 <result name="VBOX_E_OBJECT_NOT_FOUND">
1877 @a format identifier is invalid. See
1878 <link to="ISystemProperties::hardDiskFormats"/>.
1879 </result>
1880 <result name="VBOX_E_FILE_ERROR">
1881 @a location is a not valid file name (for file-based formats only).
1882 </result>
1883 <result name="E_INVALIDARG">
1884 @a format is a null or empty string.
1885 </result>
1886 </desc>
1887 <param name="format" type="wstring" dir="in">
1888 <desc>
1889 Identifier of the storage format to use for the new hard disk.
1890 </desc>
1891 </param>
1892 <param name="location" type="wstring" dir="in">
1893 <desc>
1894 Location of the storage unit for the new hard disk.
1895 </desc>
1896 </param>
1897 <param name="hardDisk" type="IHardDisk" dir="return">
1898 <desc>Created hard disk object.</desc>
1899 </param>
1900 </method>
1901
1902 <method name="openHardDisk">
1903 <desc>
1904 Opens a hard disk from an existing location.
1905
1906 After the hard disk is successfully opened by this method, it gets
1907 remembered by (known to) this VirtualBox installation and will be
1908 accessible through <link to="#getHardDisk"/> and
1909 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1910 are also returned as part of the <link to="#hardDisks"/> array and can
1911 be attached to virtual machines. See IHardDisk for more details.
1912
1913 If a differencing hard disk is to be opened by this method, the
1914 operation will succeed only if its parent hard disk and all ancestors,
1915 if any, are already known to this VirtualBox installation (for example,
1916 were opened by this method before).
1917
1918 This method tries to guess the storage format of the specified hard disk
1919 by reading hard disk data at the specified location.
1920
1921 If @a write is ReadWrite (which it should be), the image is opened for
1922 read/write access and must have according permissions, as VirtualBox
1923 may actually write status information into the disk's metadata sections.
1924
1925 Note that write access is required for all typical image usage in VirtualBox,
1926 since VirtualBox may need to write metadata such as a UUID into the image.
1927 The only exception is opening a source image temporarily for copying and
1928 cloning when the image will quickly be closed again.
1929
1930 Note that the format of the location string is storage format specific.
1931 See <link to="IMedium::location"/>, IHardDisk and
1932 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1933
1934 <result name="VBOX_E_FILE_ERROR">
1935 Invalid hard disk storage file location.
1936 </result>
1937 <result name="VBOX_E_IPRT_ERROR">
1938 Could not get hard disk storage format.
1939 </result>
1940 <result name="E_INVALIDARG">
1941 Invalid hard disk storage format.
1942 </result>
1943
1944 </desc>
1945 <param name="location" type="wstring" dir="in">
1946 <desc>
1947 Location of the storage unit that contains hard disk data in one of
1948 the supported storage formats.
1949 </desc>
1950 </param>
1951 <param name="accessMode" type="AccessMode" dir="in">
1952 <desc>
1953 Determines whether to open the image in read/write or read-only mode.
1954 </desc>
1955 </param>
1956 <param name="hardDisk" type="IHardDisk" dir="return">
1957 <desc>Opened hard disk object.</desc>
1958 </param>
1959 </method>
1960
1961 <method name="getHardDisk" const="yes">
1962 <desc>
1963 Returns a hard disk with the given UUID.
1964
1965 The hard disk with the given UUID must be known to this VirtualBox
1966 installation, i.e. it must be previously created by
1967 <link to="#createHardDisk"/> or opened by <link
1968 to="#openHardDisk"/>, or attached to some known virtual machine.
1969
1970 <result name="VBOX_E_OBJECT_NOT_FOUND">
1971 No hard disk object matching @a id found.
1972 </result>
1973
1974 </desc>
1975 <param name="id" type="uuid" dir="in">
1976 <desc>UUID of the hard disk to look for.</desc>
1977 </param>
1978 <param name="hardDisk" type="IHardDisk" dir="return">
1979 <desc>Found hard disk object.</desc>
1980 </param>
1981 </method>
1982
1983 <method name="findHardDisk">
1984 <desc>
1985 Returns a hard disk that uses the given location to store hard
1986 disk data.
1987
1988 The given hard disk must be known to this VirtualBox installation, i.e.
1989 it must be previously created by
1990 <link to="#createHardDisk"/> or opened by <link
1991 to="#openHardDisk"/>, or attached to some known virtual machine.
1992
1993 The search is done by comparing the value of the @a location argument to
1994 the <link to="IHardDisk::location"/> attribute of each known hard
1995 disk.
1996
1997 For locations represented by file names in the host's file system, the
1998 requested location can be a path relative to the
1999 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2000 only a file name without any path is given, the
2001 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2002 folder</link> will be prepended to the file name before searching. Note
2003 that on case sensitive file systems, a case sensitive comparison is
2004 performed, otherwise the case of symbols in the file path is ignored.
2005
2006 <result name="VBOX_E_OBJECT_NOT_FOUND">
2007 No hard disk object matching @a location found.
2008 </result>
2009
2010 </desc>
2011 <param name="location" type="wstring" dir="in">
2012 <desc>Location string to search for.</desc>
2013 </param>
2014 <param name="hardDisk" type="IHardDisk" dir="return">
2015 <desc>Found hard disk object.</desc>
2016 </param>
2017 </method>
2018
2019 <method name="openDVDImage">
2020 <desc>
2021 Opens a CD/DVD image contained in the specified file of the supported
2022 format and assigns it the given UUID.
2023
2024 After the image is successfully opened by this method, it gets
2025 remembered by (known to) this VirtualBox installation and will be
2026 accessible through <link to="#getDVDImage"/> and
2027 <link to="#findDVDImage"/> methods. Remembered images are also
2028 returned as part of the <link to="#DVDImages"/> array and can be mounted
2029 to virtual machines. See IMedium for more details.
2030
2031 See <link to="IMedium::location"/> to get more details about the format
2032 of the location string.
2033
2034 <note>
2035 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2036 </note>
2037
2038 <result name="VBOX_E_INVALID_OBJECT_STATE">
2039 CD/DVD image already exists in the media registry.
2040 </result>
2041
2042 </desc>
2043 <param name="location" type="wstring" dir="in">
2044 <desc>
2045 Full path to the file that contains a valid CD/DVD image.
2046 </desc>
2047 </param>
2048 <param name="id" type="uuid" dir="in">
2049 <desc>
2050 UUID to assign to the given image within this VirtualBox installation.
2051 If an empty (null) UUID is specified, the system will randomly
2052 generate a new UUID.
2053 </desc>
2054 </param>
2055 <param name="image" type="IDVDImage" dir="return">
2056 <desc>Opened CD/DVD image object.</desc>
2057 </param>
2058 </method>
2059
2060 <method name="getDVDImage">
2061 <desc>
2062 Returns a CD/DVD image with the given UUID.
2063
2064 The image with the given UUID must be known to this VirtualBox
2065 installation, i.e. it must be previously opened by <link
2066 to="#openDVDImage"/>, or mounted to some known virtual machine.
2067
2068 <result name="VBOX_E_OBJECT_NOT_FOUND">
2069 No matching DVD image found in the media registry.
2070 </result>
2071
2072 </desc>
2073 <param name="id" type="uuid" dir="in">
2074 <desc>UUID of the image to look for.</desc>
2075 </param>
2076 <param name="image" type="IDVDImage" dir="return">
2077 <desc>Found CD/DVD image object.</desc>
2078 </param>
2079 </method>
2080
2081 <method name="findDVDImage">
2082 <desc>
2083 Returns a CD/DVD image with the given image location.
2084
2085 The image with the given UUID must be known to this VirtualBox
2086 installation, i.e. it must be previously opened by <link
2087 to="#openDVDImage"/>, or mounted to some known virtual machine.
2088
2089 The search is done by comparing the value of the @a location argument to
2090 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2091
2092 The requested location can be a path relative to the
2093 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2094 only a file name without any path is given, the
2095 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2096 folder</link> will be prepended to the file name before searching. Note
2097 that on case sensitive file systems, a case sensitive comparison is
2098 performed, otherwise the case in the file path is ignored.
2099
2100 <result name="VBOX_E_FILE_ERROR">
2101 Invalid image file location.
2102 </result>
2103 <result name="VBOX_E_OBJECT_NOT_FOUND">
2104 No matching DVD image found in the media registry.
2105 </result>
2106
2107 </desc>
2108 <param name="location" type="wstring" dir="in">
2109 <desc>CD/DVD image file path to look for.</desc>
2110 </param>
2111 <param name="image" type="IDVDImage" dir="return">
2112 <desc>Found CD/DVD image object.</desc>
2113 </param>
2114 </method>
2115
2116 <method name="openFloppyImage">
2117 <desc>
2118 Opens a floppy image contained in the specified file of the supported
2119 format and assigns it the given UUID.
2120
2121 After the image is successfully opened by this method, it gets
2122 remembered by (known to) this VirtualBox installation and will be
2123 accessible through <link to="#getFloppyImage"/> and
2124 <link to="#findFloppyImage"/> methods. Remembered images are also
2125 returned as part of the <link to="#floppyImages"/> array and can be
2126 mounted to virtual machines. See IMedium for more details.
2127
2128 See <link to="IMedium::location"/> to get more details about the format
2129 of the location string.
2130
2131 <result name="VBOX_E_FILE_ERROR">
2132 Floppy image specified by @a location not accessible.
2133 </result>
2134 <result name="VBOX_E_INVALID_OBJECT_STATE">
2135 Floppy image already exists in the media registry.
2136 </result>
2137
2138 <note>
2139 Currently, only raw floppy images are supported by VirtualBox.
2140 </note>
2141 </desc>
2142 <param name="location" type="wstring" dir="in">
2143 <desc>
2144 Full path to the file that contains a valid floppy image.
2145 </desc>
2146 </param>
2147 <param name="id" type="uuid" dir="in">
2148 <desc>
2149 UUID to assign to the given image file within this VirtualBox
2150 installation. If an empty (null) UUID is specified, the system will
2151 randomly generate a new UUID.
2152 </desc>
2153 </param>
2154 <param name="image" type="IFloppyImage" dir="return">
2155 <desc>Opened floppy image object.</desc>
2156 </param>
2157 </method>
2158
2159 <method name="getFloppyImage">
2160 <desc>
2161 Returns a floppy image with the given UUID.
2162
2163 The image with the given UUID must be known to this VirtualBox
2164 installation, i.e. it must be previously opened by <link
2165 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2166
2167 <result name="VBOX_E_OBJECT_NOT_FOUND">
2168 No matching floppy image found in the media registry.
2169 </result>
2170
2171 </desc>
2172 <param name="id" type="uuid" dir="in">
2173 <desc>UUID of the image to look for.</desc>
2174 </param>
2175 <param name="image" type="IFloppyImage" dir="return">
2176 <desc>Found floppy image object.</desc>
2177 </param>
2178 </method>
2179
2180 <method name="findFloppyImage">
2181 <desc>
2182 Returns a floppy image with the given image location.
2183
2184 The image with the given UUID must be known to this VirtualBox
2185 installation, i.e. it must be previously opened by <link
2186 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2187
2188 The search is done by comparing the value of the @a location argument to
2189 the <link to="IMedium::location"/> attribute of each known floppy image.
2190
2191 The requested location can be a path relative to the
2192 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2193 only a file name without any path is given, the
2194 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2195 folder</link> will be prepended to the file name before searching. Note
2196 that on case sensitive file systems, a case sensitive comparison is
2197 performed, otherwise the case of symbols in the file path is ignored.
2198
2199 <result name="VBOX_E_FILE_ERROR">
2200 Invalid image file location.
2201 </result>
2202 <result name="VBOX_E_OBJECT_NOT_FOUND">
2203 No matching floppy image found in the media registry.
2204 </result>
2205
2206 </desc>
2207 <param name="location" type="wstring" dir="in">
2208 <desc>Floppy image file path to look for.</desc>
2209 </param>
2210 <param name="image" type="IFloppyImage" dir="return">
2211 <desc>Found floppy image object.</desc>
2212 </param>
2213 </method>
2214
2215 <method name="getGuestOSType">
2216 <desc>
2217 Returns an object describing the specified guest OS type.
2218
2219 The requested guest OS type is specified using a string which is a
2220 mnemonic identifier of the guest operating system, such as
2221 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2222 particular virtual machine can be read or set using the
2223 <link to="IMachine::OSTypeId"/> attribute.
2224
2225 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2226 available guest OS type objects. Each object has an
2227 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2228 the guest OS this object describes.
2229
2230 <result name="E_INVALIDARG">
2231 @a id is not a valid Guest OS type.
2232 </result>
2233
2234 </desc>
2235 <param name="id" type="wstring" dir="in">
2236 <desc>Guest OS type ID string.</desc>
2237 </param>
2238 <param name="type" type="IGuestOSType" dir="return">
2239 <desc>Guest OS type object.</desc>
2240 </param>
2241 </method>
2242
2243 <method name="createSharedFolder">
2244 <desc>
2245 Creates a new global shared folder by associating the given logical
2246 name with the given host path, adds it to the collection of shared
2247 folders and starts sharing it. Refer to the description of
2248 <link to="ISharedFolder"/> to read more about logical names.
2249 <note>
2250 In the current implementation, this operation is not
2251 implemented.
2252 </note>
2253 </desc>
2254 <param name="name" type="wstring" dir="in">
2255 <desc>Unique logical name of the shared folder.</desc>
2256 </param>
2257 <param name="hostPath" type="wstring" dir="in">
2258 <desc>Full path to the shared folder in the host file system.</desc>
2259 </param>
2260 <param name="writable" type="boolean" dir="in">
2261 <desc>Whether the share is writable or readonly</desc>
2262 </param>
2263 </method>
2264
2265 <method name="removeSharedFolder">
2266 <desc>
2267 Removes the global shared folder with the given name previously
2268 created by <link to="#createSharedFolder"/> from the collection of
2269 shared folders and stops sharing it.
2270 <note>
2271 In the current implementation, this operation is not
2272 implemented.
2273 </note>
2274 </desc>
2275 <param name="name" type="wstring" dir="in">
2276 <desc>Logical name of the shared folder to remove.</desc>
2277 </param>
2278 </method>
2279
2280 <method name="getNextExtraDataKey">
2281 <desc>
2282 Returns the global extra data key name following the supplied key.
2283
2284 An error is returned if the supplied @a key does not exist. @c NULL is
2285 returned in @a nextKey if the supplied key is the last key. When
2286 supplying @c NULL or an empty string for the @a key, the first key item
2287 is returned in @a nextKey (if there is any). @a nextValue is an optional
2288 parameter and if supplied, the next key's value is returned in it.
2289
2290 <result name="VBOX_E_OBJECT_NOT_FOUND">
2291 Extra data @a key not found.
2292 </result>
2293
2294 </desc>
2295 <param name="key" type="wstring" dir="in">
2296 <desc>Name of the data key to follow.</desc>
2297 </param>
2298 <param name="nextKey" type="wstring" dir="out">
2299 <desc>Name of the next data key.</desc>
2300 </param>
2301 <param name="nextValue" type="wstring" dir="out">
2302 <desc>Value of the next data key.</desc>
2303 </param>
2304 </method>
2305
2306 <method name="getExtraData">
2307 <desc>
2308 Returns associated global extra data.
2309
2310 If the requested data @a key does not exist, this function will
2311 succeed and return @c NULL in the @a value argument.
2312
2313 <result name="VBOX_E_FILE_ERROR">
2314 Settings file not accessible.
2315 </result>
2316 <result name="VBOX_E_XML_ERROR">
2317 Could not parse the settings file.
2318 </result>
2319
2320 </desc>
2321 <param name="key" type="wstring" dir="in">
2322 <desc>Name of the data key to get.</desc>
2323 </param>
2324 <param name="value" type="wstring" dir="return">
2325 <desc>Value of the requested data key.</desc>
2326 </param>
2327 </method>
2328
2329 <method name="setExtraData">
2330 <desc>
2331 Sets associated global extra data.
2332
2333 If you pass @c NULL as a key @a value, the given @a key will be
2334 deleted.
2335
2336 <note>
2337 Before performing the actual data change, this method will ask all
2338 registered callbacks using the
2339 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2340 notification for a permission. If one of the callbacks refuses the
2341 new value, the change will not be performed.
2342 </note>
2343 <note>
2344 On success, the
2345 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2346 is called to inform all registered callbacks about a successful data
2347 change.
2348 </note>
2349
2350 <result name="VBOX_E_FILE_ERROR">
2351 Settings file not accessible.
2352 </result>
2353 <result name="VBOX_E_XML_ERROR">
2354 Could not parse the settings file.
2355 </result>
2356 <result name="E_ACCESSDENIED">
2357 Modification request refused.
2358 </result>
2359
2360 </desc>
2361 <param name="key" type="wstring" dir="in">
2362 <desc>Name of the data key to set.</desc>
2363 </param>
2364 <param name="value" type="wstring" dir="in">
2365 <desc>Value to assign to the key.</desc>
2366 </param>
2367 </method>
2368
2369 <method name="openSession">
2370 <desc>
2371 Opens a new direct session with the given virtual machine.
2372
2373 A direct session acts as a local lock on the given VM.
2374 There can be only one direct session open at a time for every
2375 virtual machine, protecting the VM from being manipulated by
2376 conflicting actions from different processes. Only after a
2377 direct session has been opened, one can change all VM settings
2378 and execute the VM in the process space of the session object.
2379
2380 Sessions therefore can be compared to mutex semaphores that
2381 lock a given VM for modification and execution.
2382 See <link to="ISession">ISession</link> for details.
2383
2384 <note>Unless you are writing a new VM frontend, you will not
2385 want to execute a VM in the current process. To spawn a new
2386 process that executes a VM, use
2387 <link to="IVirtualBox::openRemoteSession" />
2388 instead.</note>
2389
2390 Upon successful return, the session object can be used to
2391 get access to the machine and to the VM console.
2392
2393 In VirtualBox terminology, the machine becomes "mutable" after
2394 a session has been opened. Note that the "mutable" machine
2395 object, on which you may invoke IMachine methods to change its
2396 settings, will be a different object from the immutable IMachine
2397 objects returned by various IVirtualBox methods. To obtain a
2398 mutable IMachine object (upon which you can invoke settings methods),
2399 use the <link to="ISession::machine" /> attribute.
2400
2401 One must always call <link to="ISession::close" /> to release the
2402 lock on the machine, or the machine's state will eventually be
2403 set to "Aborted".
2404
2405 In other words, to change settings on a machine, the following
2406 sequence is typically performed:
2407
2408 <ol>
2409 <li>Call this method (openSession) to have a machine locked for
2410 the current session.</li>
2411
2412 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2413
2414 <li>Change the settings of the machine.</li>
2415
2416 <li>Call <link to="IMachine::saveSettings" />.</li>
2417
2418 <li>Close the session by calling <link to="ISession::close"/>.</li>
2419 </ol>
2420
2421 <result name="E_UNEXPECTED">
2422 Virtual machine not registered.
2423 </result>
2424 <result name="E_ACCESSDENIED">
2425 Process not started by OpenRemoteSession.
2426 </result>
2427 <result name="VBOX_E_OBJECT_NOT_FOUND">
2428 No matching virtual machine found.
2429 </result>
2430 <result name="VBOX_E_INVALID_OBJECT_STATE">
2431 Session already open or being opened.
2432 </result>
2433 <result name="VBOX_E_VM_ERROR">
2434 Failed to assign machine to session.
2435 </result>
2436
2437 </desc>
2438 <param name="session" type="ISession" dir="in">
2439 <desc>
2440 Session object that will represent the opened session after
2441 successful method invocation. This object must not represent
2442 the already open session.
2443 <note>
2444 This session will be automatically closed if the
2445 VirtualBox server is terminated for some reason.
2446 </note>
2447 </desc>
2448 </param>
2449 <param name="machineId" type="uuid" dir="in">
2450 <desc>ID of the virtual machine to open a session with.</desc>
2451 </param>
2452 </method>
2453
2454 <method name="openRemoteSession">
2455 <desc>
2456 Spawns a new process that executes a virtual machine (called a
2457 "remote session").
2458
2459 Opening a remote session causes the VirtualBox server to start a new
2460 process that opens a direct session with the given VM. As a result, the
2461 VM is locked by that direct session in the new process, preventing
2462 conflicting changes from other processes. Since sessions act as locks
2463 that prevent conflicting changes, one cannot open a remote session
2464 for a VM that already has another open session (direct or remote), or
2465 is currently in the process of opening one (see <link
2466 to="IMachine::sessionState"/>).
2467
2468 While the remote session still provides some level of control over the
2469 VM execution to the caller (using the <link to="IConsole" /> interface),
2470 not all VM settings are available for modification within the remote
2471 session context.
2472
2473 This operation can take some time (a new VM is started in a new process,
2474 for which memory and other resources need to be set up). Because of this,
2475 an <link to="IProgress" /> is returned to allow the caller to wait for this
2476 asynchronous operation to be completed. Until then, the remote session
2477 object remains in the closed state, and accessing the machine or its
2478 console through it is invalid. It is recommended to use
2479 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2480 completion.
2481
2482 As with all <link to="ISession" /> objects, it is recommended to call
2483 <link to="ISession::close" /> on the local session object once openRemoteSession()
2484 has been called. However, the session's state (see <link to="ISession::state" />)
2485 will not return to "Closed" until the remote session has also closed (i.e.
2486 until the VM is no longer running). In that case, however, the state of
2487 the session will automatically change back to "Closed".
2488
2489 Currently supported session types (values of the @a type
2490 argument) are:
2491 <ul>
2492 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2493 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2494 </ul>
2495
2496 The @a environment argument is a string containing definitions of
2497 environment variables in the following format:
2498 @code
2499 NAME[=VALUE]\n
2500 NAME[=VALUE]\n
2501 ...
2502 @endcode
2503 where <tt>\\n</tt> is the new line character. These environment
2504 variables will be appended to the environment of the VirtualBox server
2505 process. If an environment variable exists both in the server process
2506 and in this list, the value from this list takes precedence over the
2507 server's variable. If the value of the environment variable is
2508 omitted, this variable will be removed from the resulting environment.
2509 If the environment string is @c null, the server environment is
2510 inherited by the started process as is.
2511
2512 <see>openExistingSession</see>
2513
2514 <result name="E_UNEXPECTED">
2515 Virtual machine not registered.
2516 </result>
2517 <result name="E_INVALIDARG">
2518 Invalid session type @a type.
2519 </result>
2520 <result name="VBOX_E_OBJECT_NOT_FOUND">
2521 No machine matching @a machineId found.
2522 </result>
2523 <result name="VBOX_E_INVALID_OBJECT_STATE">
2524 Session already open or being opened.
2525 </result>
2526 <result name="VBOX_E_IPRT_ERROR">
2527 Launching process for machine failed.
2528 </result>
2529 <result name="VBOX_E_VM_ERROR">
2530 Failed to assign machine to session.
2531 </result>
2532
2533 </desc>
2534 <param name="session" type="ISession" dir="in">
2535 <desc>
2536 Session object that will represent the opened remote session
2537 after successful method invocation (this object must not
2538 represent an already open session).
2539 </desc>
2540 </param>
2541 <param name="machineId" type="uuid" dir="in">
2542 <desc>ID of the virtual machine to open a session with.</desc>
2543 </param>
2544 <param name="type" type="wstring" dir="in">
2545 <desc>
2546 Type of the remote session (case sensitive).
2547 </desc>
2548 </param>
2549 <param name="environment" type="wstring" dir="in">
2550 <desc>
2551 Environment to pass to the opened session (may be @c null).
2552 </desc>
2553 </param>
2554 <param name="progress" type="IProgress" dir="return">
2555 <desc>Progress object to track the operation completion.</desc>
2556 </param>
2557 </method>
2558
2559 <method name="openExistingSession">
2560 <desc>
2561 Opens a new remote session with the virtual machine for
2562 which a direct session is already open.
2563
2564 The remote session provides some level of control over the VM
2565 execution (using the IConsole interface) to the caller; however,
2566 within the remote session context, not all VM settings are available
2567 for modification.
2568
2569 As opposed to <link to="#openRemoteSession"/>, the number of
2570 remote sessions opened this way is not limited by the API
2571
2572 <note>
2573 It is an error to open a remote session with the machine that
2574 doesn't have an open direct session.
2575 </note>
2576
2577 <result name="E_UNEXPECTED">
2578 Virtual machine not registered.
2579 </result>
2580 <result name="VBOX_E_OBJECT_NOT_FOUND">
2581 No machine matching @a machineId found.
2582 </result>
2583 <result name="VBOX_E_INVALID_OBJECT_STATE">
2584 Session already open or being opened.
2585 </result>
2586 <result name="VBOX_E_INVALID_SESSION_STATE">
2587 Direct session state not Open.
2588 </result>
2589 <result name="VBOX_E_VM_ERROR">
2590 Failed to get console object from direct session or assign
2591 machine to session.
2592 </result>
2593
2594 <see>openRemoteSession</see>
2595 </desc>
2596 <param name="session" type="ISession" dir="in">
2597 <desc>
2598 Session object that will represent the open remote session
2599 after successful method invocation. This object must not
2600 represent an already open session.
2601 <note>
2602 This session will be automatically closed when the peer
2603 (direct) session dies or gets closed.
2604 </note>
2605 </desc>
2606 </param>
2607 <param name="machineId" type="uuid" dir="in">
2608 <desc>ID of the virtual machine to open a session with.</desc>
2609 </param>
2610 </method>
2611
2612 <method name="registerCallback">
2613 <desc>
2614 Registers a new global VirtualBox callback. The methods of the given
2615 callback object will be called by VirtualBox when an appropriate
2616 event occurs.
2617
2618 <result name="E_INVALIDARG">
2619 A @c NULL callback cannot be registered.
2620 </result>
2621
2622 </desc>
2623 <param name="callback" type="IVirtualBoxCallback" dir="in">
2624 <desc>Callback object to register.</desc>
2625 </param>
2626 </method>
2627
2628 <method name="unregisterCallback">
2629 <desc>
2630 Unregisters the previously registered global VirtualBox callback.
2631
2632 <result name="E_INVALIDARG">
2633 Specified @a callback not registered.
2634 </result>
2635
2636 </desc>
2637 <param name="callback" type="IVirtualBoxCallback" dir="in">
2638 <desc>Callback object to unregister.</desc>
2639 </param>
2640 </method>
2641
2642 <method name="waitForPropertyChange">
2643 <desc>
2644 Blocks the caller until any of the properties represented by the
2645 @a what argument changes the value or until the given timeout interval
2646 expires.
2647
2648 The @a what argument is a comma separated list of property masks that
2649 describe properties the caller is interested in. The property mask is
2650 a string in the following format:
2651
2652 <pre>
2653 [[group.]subgroup.]name
2654 </pre>
2655
2656 where @c name is the property name and @c group, @c subgroup are zero
2657 or more property group specifiers. Each element (group or name) in
2658 the property mask may be either a Latin string or an asterisk symbol
2659 (@c "*") which is used to match any string for the given element. A
2660 property mask that doesn't contain asterisk symbols represents a
2661 single fully qualified property name.
2662
2663 Groups in the fully qualified property name go from more generic (the
2664 left-most part) to more specific (the right-most part). The first
2665 element is usually a name of the object the property belongs to. The
2666 second element may be either a property name, or a child object name,
2667 or an index if the preceding element names an object which is one of
2668 many objects of the same type. This way, property names form a
2669 hierarchy of properties. Here are some examples of property names:
2670
2671 <table>
2672 <tr>
2673 <td><tt>VirtualBox.version</tt></td>
2674 <td><link to="IVirtualBox::version"/> property</td>
2675 </tr>
2676 <tr>
2677 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2678 <td><link to="IMachine::name"/> property of the machine with the
2679 given UUID</td>
2680 </tr>
2681 </table>
2682
2683 Most property names directly correspond to the properties of objects
2684 (components) provided by the VirtualBox library and may be used to
2685 track changes to these properties. However, there may be
2686 pseudo-property names that don't correspond to any existing object's
2687 property directly, as well as there may be object properties that
2688 don't have a corresponding property name that is understood by this
2689 method, and therefore changes to such properties cannot be
2690 tracked. See individual object's property descriptions to get a
2691 fully qualified property name that can be used with this method (if
2692 any).
2693
2694 There is a special property mask @c "*" (i.e. a string consisting of a
2695 single asterisk symbol) that can be used to match all properties.
2696 Below are more examples of property masks:
2697
2698 <table>
2699 <tr>
2700 <td><tt>VirtualBox.*</tt></td>
2701 <td>Track all properties of the VirtualBox object</td>
2702 </tr>
2703 <tr>
2704 <td><tt>Machine.*.name</tt></td>
2705 <td>Track changes to the <link to="IMachine::name"/> property of
2706 all registered virtual machines</td>
2707 </tr>
2708 </table>
2709
2710 <note>
2711 This function is not implemented in the current version of the
2712 product.
2713 </note>
2714 </desc>
2715 <param name="what" type="wstring" dir="in">
2716 <desc>Comma separated list of property masks.</desc>
2717 </param>
2718 <param name="timeout" type="unsigned long" dir="in">
2719 <desc>
2720 Wait timeout in milliseconds.
2721 Specify -1 for an indefinite wait.
2722 </desc>
2723 </param>
2724 <param name="changed" type="wstring" dir="out">
2725 <desc>
2726 Comma separated list of properties that have been changed and caused
2727 this method to return to the caller.
2728 </desc>
2729 </param>
2730 <param name="values" type="wstring" dir="out">
2731 <desc>Reserved, not currently used.</desc>
2732 </param>
2733 </method>
2734
2735 <method name="saveSettings">
2736 <desc>
2737 Saves the global settings to the global settings file
2738 (<link to="#settingsFilePath"/>).
2739
2740 This method is only useful for explicitly saving the global settings
2741 file after it has been auto-converted from the old format to the most
2742 recent format (see <link to="#settingsFileVersion"/> for details).
2743 Normally, the global settings file is implicitly saved when a global
2744 setting is changed.
2745
2746 <result name="VBOX_E_FILE_ERROR">
2747 Settings file not accessible.
2748 </result>
2749 <result name="VBOX_E_XML_ERROR">
2750 Could not parse the settings file.
2751 </result>
2752
2753 </desc>
2754 </method>
2755
2756 <method name="saveSettingsWithBackup">
2757 <desc>
2758 Creates a backup copy of the global settings file
2759 (<link to="IVirtualBox::settingsFilePath"/>) in case of auto-conversion,
2760 and then calls <link to="IVirtualBox::saveSettings"/>.
2761
2762 Note that the backup copy is created <b>only</b> if the settings file
2763 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2764 details). Otherwise, this call is fully equivalent to
2765 <link to="IVirtualBox::saveSettings"/> and no backup copying is done.
2766
2767 The backup copy is created in the same directory where the original
2768 settings file is located. It is given the following file name:
2769 <pre>
2770 original.xml.x.y-platform.bak
2771 </pre>
2772 where <tt>original.xml</tt> is the original settings file name
2773 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2774 format of the settings file (before auto-conversion).
2775
2776 If the given backup file already exists, this method will try to add the
2777 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2778 0 to 9) and copy it again until it succeeds. If all suffixes are
2779 occupied, or if any other copy error occurs, this method will return a
2780 failure.
2781
2782 If the copy operation succeeds, the @a bakFileName return argument will
2783 receive a full path to the created backup file (for informational
2784 purposes). Note that this will happen even if the subsequent
2785 <link to="#saveSettings"/> call performed by this method after the
2786 copy operation, fails.
2787
2788 <note>
2789 The VirtualBox API never calls this method. It is intended purely for
2790 the purposes of creating backup copies of the settings files by
2791 front-ends before saving the results of the automatically performed
2792 settings conversion to disk.
2793 </note>
2794
2795 <see>settingsFileVersion</see>
2796
2797 <result name="VBOX_E_FILE_ERROR">
2798 Settings file not accessible.
2799 </result>
2800 <result name="VBOX_E_XML_ERROR">
2801 Could not parse the settings file.
2802 </result>
2803 <result name="VBOX_E_IPRT_ERROR">
2804 Could not copy the settings file.
2805 </result>
2806
2807 </desc>
2808 <param name="bakFileName" type="wstring" dir="return">
2809 <desc>Full path to the created backup copy.</desc>
2810 </param>
2811 </method>
2812
2813 <!--method name="createDHCPServerForInterface">
2814 <desc>
2815 Creates a dhcp server settings to be used for the given interface
2816 <result name="E_INVALIDARG">
2817 Host network interface @a name already exists.
2818 </result>
2819 </desc>
2820 <param name="interface" type="IHostNetworkInterface" dir="in">
2821 <desc>Network Interface</desc>
2822 </param>
2823 <param name="server" type="IDHCPServer" dir="out">
2824 <desc>Dhcp server settings</desc>
2825 </param>
2826 </method-->
2827
2828 <method name="createDHCPServer">
2829 <desc>
2830 Creates a dhcp server settings to be used for the given internal network name
2831 <result name="E_INVALIDARG">
2832 Host network interface @a name already exists.
2833 </result>
2834 </desc>
2835 <param name="name" type="wstring" dir="in">
2836 <desc>server name</desc>
2837 </param>
2838 <param name="server" type="IDHCPServer" dir="return">
2839 <desc>Dhcp server settings</desc>
2840 </param>
2841 </method>
2842
2843 <method name="findDHCPServerByNetworkName">
2844 <desc>
2845 Searches a dhcp server settings to be used for the given internal network name
2846 <result name="E_INVALIDARG">
2847 Host network interface @a name already exists.
2848 </result>
2849
2850 </desc>
2851 <param name="name" type="wstring" dir="in">
2852 <desc>server name</desc>
2853 </param>
2854 <param name="server" type="IDHCPServer" dir="return">
2855 <desc>Dhcp server settings</desc>
2856 </param>
2857 </method>
2858
2859 <!--method name="findDHCPServerForInterface">
2860 <desc>
2861 Searches a dhcp server settings to be used for the given interface
2862 <result name="E_INVALIDARG">
2863 Host network interface @a name already exists.
2864 </result>
2865 </desc>
2866 <param name="interface" type="IHostNetworkInterface" dir="in">
2867 <desc>Network Interface</desc>
2868 </param>
2869 <param name="server" type="IDHCPServer" dir="out">
2870 <desc>Dhcp server settings</desc>
2871 </param>
2872 </method-->
2873
2874 <method name="removeDHCPServer">
2875 <desc>
2876 Removes the dhcp server settings
2877 <result name="E_INVALIDARG">
2878 Host network interface @a name already exists.
2879 </result>
2880 </desc>
2881 <param name="server" type="IDHCPServer" dir="in">
2882 <desc>Dhcp server settings to be removed</desc>
2883 </param>
2884 </method>
2885
2886 </interface>
2887
2888 <!--
2889 // IAppliance
2890 /////////////////////////////////////////////////////////////////////////
2891 -->
2892
2893 <enum
2894 name="CIMOSType"
2895 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2896 >
2897 <desc>
2898 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2899 </desc>
2900
2901 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2902 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2903 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2904 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2905 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2906 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2907 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2908 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2909 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2910 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2911 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2912 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2913 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2914 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2915 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2916 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2917 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2918 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2919 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2920 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2921 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2922 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2923 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2924 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2925 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2926 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2927 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2928 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2929 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2930 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2931 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2932 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2933 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2934 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2935 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2936 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2937 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2938 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2939 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2940 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2941 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2942 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2943 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2944 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2945 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2946 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2947 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2948 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2949 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2950 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2951 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2952 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2953 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2954 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2955 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2956 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2957 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2958 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2959 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2960 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2961 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2962 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2963 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2964 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2965 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2966 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2967 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2968 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2969 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2970 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2971 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2972 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2973 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2974 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2975 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2976 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2977 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2978 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2979 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2980 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2981 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2982 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2983 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2984 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2985 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2986 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2987 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2988 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2989 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2990 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2991 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2992 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2993 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2994 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2995 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2996 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2997 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2998 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2999 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
3000 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
3001 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
3002 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
3003 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
3004 </enum>
3005
3006 <enum
3007 name="OVFResourceType"
3008 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
3009 >
3010 <desc>
3011 OVF resource type (as listed with CIM_ResourceAllocationSettingData; see for example
3012 http://msdn.microsoft.com/en-us/library/cc136877(VS.85).aspx).
3013 </desc>
3014
3015 <const name="Other" value="1" />
3016 <const name="ComputerSystem" value="2" />
3017 <const name="Processor" value="3" />
3018 <const name="Memory" value="4" />
3019 <const name="IDEController" value="5" />
3020 <const name="ParallelSCSIHBA" value="6" />
3021 <const name="FCHBA" value="7" />
3022 <const name="iSCSIHBA" value="8" />
3023 <const name="IBHCA" value="9" />
3024 <const name="EthernetAdapter" value="10" />
3025 <const name="OtherNetworkAdapter" value="11" />
3026 <const name="IOSlot" value="12" />
3027 <const name="IODevice" value="13" />
3028 <const name="FloppyDrive" value="14" />
3029 <const name="CDDrive" value="15" />
3030 <const name="DVDDrive" value="16" />
3031 <const name="HardDisk" value="17" />
3032 <const name="OtherStorageDevice" value="20" />
3033 <const name="USBController" value="23" />
3034 <const name="SoundCard" value="35" />
3035 </enum>
3036
3037 <interface
3038 name="IAppliance" extends="$unknown"
3039 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
3040 wsmap="managed"
3041 >
3042 <desc>
3043 Represents a platform-independent appliance in OVF format. An instance of this is returned
3044 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3045 appliances with VirtualBox.
3046
3047 The OVF standard suggests two different physical file formats:
3048
3049 <ol>
3050 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3051 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3052 this descriptor file references other files, as OVF appliances distributed as a set of
3053 files most likely do, those files must be in the same directory as the descriptor file.</li>
3054
3055 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3056 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3057 files and optionally other files.
3058
3059 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3060 be added with a later version.</li>
3061 </ol>
3062
3063 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3064 <link to="IMachine" /> involves the following sequence of API calls:
3065
3066 <ol>
3067 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3068 </li>
3069
3070 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3071 would like to import. So long as this file is syntactically valid, this will succeed
3072 and return an instance of IAppliance that contains the parsed data from the OVF file.
3073 </li>
3074
3075 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3076 contents of the IAppliance attributes accordingly. These can be inspected by a
3077 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3078 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3079 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3080 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3081 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3082 The GUI can then give the user the option to confirm and/or change these suggestions.
3083 </li>
3084
3085 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3086 virtual system to override the suggestions made by the interpret() routine.
3087 </li>
3088
3089 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3090 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3091 virtual system descriptions.
3092 </li>
3093 </ol>
3094
3095 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3096
3097 <ol>
3098 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3099 an empty IAppliance object.
3100 </li>
3101
3102 <li>For each machine you would like to export, call <link to="IMachine::export" />
3103 with the IAppliance object you just created. This creates an instance of
3104 <link to="IVirtualSystemDescription" /> inside the appliance.
3105 </li>
3106
3107 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3108 virtual system to override the suggestions made by the export() routine.
3109 </li>
3110
3111 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3112 file written.</li>
3113 </ol>
3114
3115 </desc>
3116
3117 <attribute name="path" type="wstring" readonly="yes">
3118 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3119 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3120 <link to="#write" /> (for export).
3121 This attribute is empty until one of these methods has been called.
3122 </desc>
3123 </attribute>
3124
3125 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3126 <desc>
3127 Array of virtual disk definitions. One such description exists for each
3128 disk definition in the OVF; each string array item represents one such piece of
3129 disk information, with the information fields separated by tab (\\t) characters.
3130
3131 The caller should be prepared for additional fields being appended to
3132 this string in future versions of VirtualBox and therefore check for
3133 the number of tabs in the strings returned.
3134
3135 In the current version, the following eight fields are returned per string
3136 in the array:
3137
3138 <ol>
3139 <li>Disk ID (unique string identifier given to disk)</li>
3140
3141 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3142
3143 <li>Populated size (optional unsigned integer indicating the current size of the
3144 disk; can be approximate; -1 if unspecified)</li>
3145
3146 <li>Format (string identifying the disk format, typically
3147 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3148
3149 <li>Reference (where to find the disk image, typically a file name; if empty,
3150 then the disk should be created on import)</li>
3151
3152 <li>Image size (optional unsigned integer indicating the size of the image,
3153 which need not necessarily be the same as the values specified above, since
3154 the image may be compressed or sparse; -1 if not specified)</li>
3155
3156 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3157 presently unsupported and always -1)</li>
3158
3159 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3160 </ol>
3161 </desc>
3162 </attribute>
3163
3164 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3165 <desc> Array of virtual system descriptions. One such description is created
3166 for each virtual system found in the OVF.
3167 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3168 (for export) has been called.
3169 </desc>
3170 </attribute>
3171
3172 <method name="read">
3173 <desc>
3174 Reads an OVF file into the appliance object.
3175
3176 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3177 mere fact that this method returns successfully does not mean that VirtualBox supports all
3178 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3179 </desc>
3180 <param name="file" type="wstring" dir="in">
3181 <desc>
3182 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3183 on whether the appliance is distributed as a set of files or as a single file, respectively).
3184 </desc>
3185 </param>
3186 </method>
3187
3188 <method name="interpret">
3189 <desc>
3190 Interprets the OVF data that was read when the appliance was constructed. After
3191 calling this method, one can inspect the
3192 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3193 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3194 the appliance.
3195
3196 Calling this method is the second step of importing an appliance into VirtualBox;
3197 see <link to="IAppliance" /> for an overview.
3198
3199 After calling this method, one should call <link to="#getWarnings" /> to find out
3200 if problems were encountered during the processing which might later lead to
3201 errors.
3202 </desc>
3203 </method>
3204
3205 <method name="importMachines">
3206 <desc>
3207 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3208 and other interfaces that match the information contained in the appliance as
3209 closely as possible, as represented by the import instructions in the
3210 <link to="#virtualSystemDescriptions" /> array.
3211
3212 Calling this method is the final step of importing an appliance into VirtualBox;
3213 see <link to="IAppliance" /> for an overview.
3214
3215 Since importing the appliance will most probably involve copying and converting
3216 disk images, which can take a long time, this method operates asynchronously and
3217 returns an IProgress object to allow the caller to monitor the progress.
3218 </desc>
3219
3220 <param name="aProgress" type="IProgress" dir="return">
3221 <desc></desc>
3222 </param>
3223 </method>
3224
3225 <method name="write">
3226 <desc>
3227 Writes the contents of the appliance exports into a new OVF file.
3228
3229 Calling this method is the final step of exporting an appliance from VirtualBox;
3230 see <link to="IAppliance" /> for an overview.
3231
3232 Since exporting the appliance will most probably involve copying and converting
3233 disk images, which can take a long time, this method operates asynchronously and
3234 returns an IProgress object to allow the caller to monitor the progress.
3235 </desc>
3236 <param name="format" type="wstring" dir="in">
3237 <desc>
3238 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3239 future versions of VirtualBox may support additional formats.
3240 </desc>
3241 </param>
3242 <param name="path" type="wstring" dir="in">
3243 <desc>
3244 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3245 on whether the appliance is distributed as a set of files or as a single file, respectively).
3246 </desc>
3247 </param>
3248 <param name="aProgress" type="IProgress" dir="return">
3249 <desc></desc>
3250 </param>
3251 </method>
3252
3253 <method name="getWarnings">
3254 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3255
3256 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3257 <desc></desc>
3258 </param>
3259 </method>
3260
3261 </interface>
3262
3263 <enum
3264 name="VirtualSystemDescriptionType"
3265 uuid="68537dd6-78e6-4863-a1cd-20be54761891"
3266 >
3267 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3268 a configuration value.</desc>
3269
3270 <const name="Ignore" value="1" />
3271 <const name="OS" value="2" />
3272 <const name="Name" value="3" />
3273 <const name="Product" value="4" />
3274 <const name="Vendor" value="5" />
3275 <const name="Version" value="6" />
3276 <const name="ProductUrl" value="7" />
3277 <const name="VendorUrl" value="8" />
3278 <const name="Description" value="9" />
3279 <const name="License" value="10" />
3280 <const name="Miscellaneous" value="11" />
3281 <const name="CPU" value="12" />
3282 <const name="Memory" value="13" />
3283 <const name="HardDiskControllerIDE" value="14" />
3284 <const name="HardDiskControllerSATA" value="15" />
3285 <const name="HardDiskControllerSCSI" value="16" />
3286 <const name="HardDiskImage" value="17" />
3287 <const name="Floppy" value="18" />
3288 <const name="CDROM" value="19" />
3289 <const name="NetworkAdapter" value="20" />
3290 <const name="USBController" value="21" />
3291 <const name="SoundCard" value="22" />
3292
3293 </enum>
3294
3295 <enum
3296 name="VirtualSystemDescriptionValueType"
3297 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3298 >
3299 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3300 type to fetch.</desc>
3301
3302 <const name="Reference" value="1" />
3303 <const name="Original" value="2" />
3304 <const name="Auto" value="3" />
3305 <const name="ExtraConfig" value="4" />
3306
3307 </enum>
3308
3309 <interface
3310 name="IVirtualSystemDescription" extends="$unknown"
3311 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3312 wsmap="managed"
3313 >
3314
3315 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3316 After <link to="IAppliance::interpret" /> has been called, that array contains
3317 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3318 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3319 into VirtualBox.
3320 </desc>
3321
3322 <attribute name="count" type="unsigned long" readonly="yes">
3323 <desc>Return the number of virtual system description entries.</desc>
3324 </attribute>
3325
3326 <method name="getDescription">
3327 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3328 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3329
3330 The list below identifies the value sets that are possible depending on the
3331 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3332 the array item with the same index in aOvfValues[] will contain the original value as contained
3333 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3334 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3335 the aExtraConfigValues[] array item may also be used.
3336
3337 <ul>
3338 <li>
3339 "OS": the guest operating system type. There must be exactly one such array item on import. The
3340 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3341 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3342 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3343 (see <link to="CIMOSType" />).
3344 </li>
3345 <li>
3346 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3347 if none is present on import, then an automatic name will be created from the operating system
3348 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3349 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3350 <link to="IMachine" /> name that does not exist yet.
3351 </li>
3352 <li>
3353 "Description": an arbitrary description.
3354 </li>
3355 <li>
3356 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3357 code to display such a license for agreement; the Main API does not enforce any such policy.
3358 </li>
3359 <li>
3360 Miscellaneous: reserved for future use.
3361 </li>
3362 <li>
3363 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3364 </li>
3365 <li>
3366 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3367 is present on import, then VirtualBox will set a meaningful default based on the operating system
3368 type.
3369 </li>
3370 <li>
3371 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3372 has no value in aOvfValues[] or aVboxValues[].
3373 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3374 type can use to specify which hard disk controller a virtual disk should be connected to.
3375 </li>
3376 <li>
3377 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3378 has no value in aOvfValues[] or aVboxValues[].
3379 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3380 </li>
3381 <li>
3382 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3383 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3384 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3385 </li>
3386 <li>
3387 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3388 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3389
3390 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3391 a path since the image file should be in the same location as the OVF file itself), whereas the
3392 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3393 hard disk image. This means that on import the image will be copied and converted from the
3394 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3395 On import, the target image will also be registered with VirtualBox.
3396
3397 The matching item in the aExtraConfigValues[] array must contain a string of the following
3398 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3399 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3400 the image to. That number must be the index of an array item with one of the hard disk controller
3401 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3402 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3403 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3404 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3405 SCSI conrollers, the channel can range from 0-29.
3406 </li>
3407 <li>
3408 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3409 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3410 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3411 </li>
3412 <li>
3413 "USBController": a USB controller. There can be at most one such item. If and only if such an
3414 item ispresent, USB support will be enabled for the new virtual machine.
3415 </li>
3416 <li>
3417 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3418 present, sound support will be enabled for the new virtual machine. Note that the virtual
3419 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3420 may be different from the virtual soundcard expected by the appliance.
3421 </li>
3422 </ul>
3423
3424 </desc>
3425
3426 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3427 <desc></desc>
3428 </param>
3429
3430 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3431 <desc></desc>
3432 </param>
3433
3434 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3435 <desc></desc>
3436 </param>
3437
3438 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3439 <desc></desc>
3440 </param>
3441
3442 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3443 <desc></desc>
3444 </param>
3445
3446 </method>
3447
3448 <method name="getDescriptionByType">
3449 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3450 should be returned.</desc>
3451
3452 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3453 <desc></desc>
3454 </param>
3455
3456 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3457 <desc></desc>
3458 </param>
3459
3460 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3461 <desc></desc>
3462 </param>
3463
3464 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3465 <desc></desc>
3466 </param>
3467
3468 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3469 <desc></desc>
3470 </param>
3471
3472 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3473 <desc></desc>
3474 </param>
3475
3476 </method>
3477
3478 <method name="getValuesByType">
3479 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3480 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3481 values.</desc>
3482
3483 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3484 <desc></desc>
3485 </param>
3486
3487 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3488 <desc></desc>
3489 </param>
3490
3491 <param name="aValues" type="wstring" dir="return" safearray="yes">
3492 <desc></desc>
3493 </param>
3494
3495 </method>
3496
3497 <method name="setFinalValues">
3498 <desc>
3499 This method allows the appliance's user to change the configuration for the virtual
3500 system descriptions. For each array item returned from <link to="#getDescription" />,
3501 you must pass in one boolean value and one configuration value.
3502
3503 Each item in the boolean array determines whether the particular configuration item
3504 should be enabled.
3505 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3506 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3507 and SoundCard.
3508
3509 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3510 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3511 the configuration remains unchanged. Please see the documentation for getDescription()
3512 for valid configuration values for the individual array item types. If the
3513 corresponding item in the aEnabled array is false, the configuration value is ignored.
3514 </desc>
3515
3516 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3517 <desc></desc>
3518 </param>
3519
3520 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3521 <desc></desc>
3522 </param>
3523
3524 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3525 <desc></desc>
3526 </param>
3527 </method>
3528
3529 <method name="addDescription">
3530 <desc>
3531 This method adds an additional description entry to the stack of already
3532 available descriptions for this virtual system. This is handy for writing
3533 values which aren't directly supported by VirtualBox. One example would
3534 be the License type of <link to="VirtualSystemDescriptionType" />.
3535 </desc>
3536
3537 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3538 <desc></desc>
3539 </param>
3540
3541 <param name="aVboxValue" type="wstring" dir="in">
3542 <desc></desc>
3543 </param>
3544
3545 <param name="aExtraConfigValue" type="wstring" dir="in">
3546 <desc></desc>
3547 </param>
3548 </method>
3549 </interface>
3550
3551
3552 <!--
3553 // IMachine
3554 /////////////////////////////////////////////////////////////////////////
3555 -->
3556
3557 <interface
3558 name="IInternalMachineControl" extends="$unknown"
3559 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3560 internal="yes"
3561 wsmap="suppress"
3562 >
3563 <method name="updateState">
3564 <desc>
3565 Updates the VM state.
3566 <note>
3567 This operation will also update the settings file with
3568 the correct information about the saved state file
3569 and delete this file from disk when appropriate.
3570 </note>
3571 </desc>
3572 <param name="state" type="MachineState" dir="in"/>
3573 </method>
3574
3575 <method name="getIPCId">
3576 <param name="id" type="wstring" dir="return"/>
3577 </method>
3578
3579 <method name="runUSBDeviceFilters">
3580 <desc>
3581 Asks the server to run USB devices filters of the associated
3582 machine against the given USB device and tell if there is
3583 a match.
3584 <note>
3585 Intended to be used only for remote USB devices. Local
3586 ones don't require to call this method (this is done
3587 implicitly by the Host and USBProxyService).
3588 </note>
3589 </desc>
3590 <param name="device" type="IUSBDevice" dir="in"/>
3591 <param name="matched" type="boolean" dir="out"/>
3592 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3593 </method>
3594
3595 <method name="captureUSBDevice">
3596 <desc>
3597 Requests a capture of the given host USB device.
3598 When the request is completed, the VM process will
3599 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3600 notification.
3601 </desc>
3602 <param name="id" type="uuid" dir="in"/>
3603 </method>
3604
3605 <method name="detachUSBDevice">
3606 <desc>
3607 Notification that a VM is going to detach (done = false) or has
3608 already detached (done = true) the given USB device.
3609 When the done = true request is completed, the VM process will
3610 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3611 notification.
3612 <note>
3613 In the done = true case, the server must run its own filters
3614 and filters of all VMs but this one on the detached device
3615 as if it were just attached to the host computer.
3616 </note>
3617 </desc>
3618 <param name="id" type="uuid" dir="in"/>
3619 <param name="done" type="boolean" dir="in"/>
3620 </method>
3621
3622 <method name="autoCaptureUSBDevices">
3623 <desc>
3624 Requests a capture all matching USB devices attached to the host.
3625 When the request is completed, the VM process will
3626 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3627 notification per every captured device.
3628 </desc>
3629 </method>
3630
3631 <method name="detachAllUSBDevices">
3632 <desc>
3633 Notification that a VM that is being powered down. The done
3634 parameter indicates whether which stage of the power down
3635 we're at. When done = false the VM is announcing its
3636 intentions, while when done = true the VM is reporting
3637 what it has done.
3638 <note>
3639 In the done = true case, the server must run its own filters
3640 and filters of all VMs but this one on all detach devices as
3641 if they were just attached to the host computer.
3642 </note>
3643 </desc>
3644 <param name="done" type="boolean" dir="in"/>
3645 </method>
3646
3647 <method name="onSessionEnd">
3648 <desc>
3649 Triggered by the given session object when the session is about
3650 to close normally.
3651 </desc>
3652 <param name="session" type="ISession" dir="in">
3653 <desc>Session that is being closed</desc>
3654 </param>
3655 <param name="progress" type="IProgress" dir="return">
3656 <desc>
3657 Used to wait until the corresponding machine is actually
3658 dissociated from the given session on the server.
3659 Returned only when this session is a direct one.
3660 </desc>
3661 </param>
3662 </method>
3663
3664 <method name="beginSavingState">
3665 <desc>
3666 Called by the VM process to inform the server it wants to
3667 save the current state and stop the VM execution.
3668 </desc>
3669 <param name="progress" type="IProgress" dir="in">
3670 <desc>
3671 Progress object created by the VM process to wait until
3672 the state is saved.
3673 </desc>
3674 </param>
3675 <param name="stateFilePath" type="wstring" dir="out">
3676 <desc>
3677 File path the VM process must save the execution state to.
3678 </desc>
3679 </param>
3680 </method>
3681
3682 <method name="endSavingState">
3683 <desc>
3684 Called by the VM process to inform the server that saving
3685 the state previously requested by #beginSavingState is either
3686 successfully finished or there was a failure.
3687
3688 <result name="VBOX_E_FILE_ERROR">
3689 Settings file not accessible.
3690 </result>
3691 <result name="VBOX_E_XML_ERROR">
3692 Could not parse the settings file.
3693 </result>
3694
3695 </desc>
3696
3697 <param name="success" type="boolean" dir="in">
3698 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3699 otherwise.
3700 </desc>
3701 </param>
3702 </method>
3703
3704 <method name="adoptSavedState">
3705 <desc>
3706 Gets called by IConsole::adoptSavedState.
3707 <result name="VBOX_E_FILE_ERROR">
3708 Invalid saved state file path.
3709 </result>
3710 </desc>
3711 <param name="savedStateFile" type="wstring" dir="in">
3712 <desc>Path to the saved state file to adopt.</desc>
3713 </param>
3714 </method>
3715
3716 <method name="beginTakingSnapshot">
3717 <desc>
3718 Called by the VM process to inform the server it wants to
3719 take a snapshot.
3720
3721 <result name="VBOX_E_FILE_ERROR">
3722 Settings file not accessible.
3723 </result>
3724 <result name="VBOX_E_XML_ERROR">
3725 Could not parse the settings file.
3726 </result>
3727 </desc>
3728 <param name="initiator" type="IConsole" dir="in">
3729 <desc>The console object that initiated this call.</desc>
3730 </param>
3731 <param name="name" type="wstring" dir="in">
3732 <desc>Snapshot name.</desc>
3733 </param>
3734 <param name="description" type="wstring" dir="in">
3735 <desc>Snapshot description.</desc>
3736 </param>
3737 <param name="progress" type="IProgress" dir="in">
3738 <desc>
3739 Progress object created by the VM process to wait until
3740 the state is saved (only for online snapshots).
3741 </desc>
3742 </param>
3743 <param name="stateFilePath" type="wstring" dir="out">
3744 <desc>
3745 File path the VM process must save the execution state to.
3746 </desc>
3747 </param>
3748 <param name="serverProgress" type="IProgress" dir="out">
3749 <desc>
3750 Progress object created by the server process to wait until
3751 the snapshot is taken (VDI diff creation, etc.).
3752 </desc>
3753 </param>
3754 </method>
3755
3756 <method name="endTakingSnapshot">
3757 <desc>
3758 Called by the VM process to inform the server that the snapshot
3759 previously requested by #beginTakingSnapshot is either
3760 successfully taken or there was a failure.
3761 </desc>
3762
3763 <param name="success" type="boolean" dir="in">
3764 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3765 </param>
3766 </method>
3767
3768 <method name="discardSnapshot">
3769 <desc>
3770 Gets called by IConsole::discardSnapshot.
3771 <result name="VBOX_E_INVALID_OBJECT_STATE">
3772 Snapshot has more than one child snapshot.
3773 </result>
3774 </desc>
3775 <param name="initiator" type="IConsole" dir="in">
3776 <desc>The console object that initiated this call.</desc>
3777 </param>
3778 <param name="id" type="uuid" dir="in">
3779 <desc>UUID of the snapshot to discard.</desc>
3780 </param>
3781 <param name="machineState" type="MachineState" dir="out">
3782 <desc>New machine state after this operation is started.</desc>
3783 </param>
3784 <param name="progress" type="IProgress" dir="return">
3785 <desc>Progress object to track the operation completion.</desc>
3786 </param>
3787 </method>
3788
3789 <method name="discardCurrentState">
3790 <desc>
3791 Gets called by IConsole::discardCurrentState.
3792 <result name="VBOX_E_INVALID_OBJECT_STATE">
3793 Virtual machine does not have any snapshot.
3794 </result>
3795 </desc>
3796 <param name="initiator" type="IConsole" dir="in">
3797 <desc>The console object that initiated this call.</desc>
3798 </param>
3799 <param name="machineState" type="MachineState" dir="out">
3800 <desc>New machine state after this operation is started.</desc>
3801 </param>
3802 <param name="progress" type="IProgress" dir="return">
3803 <desc>Progress object to track the operation completion.</desc>
3804 </param>
3805 </method>
3806
3807 <method name="discardCurrentSnapshotAndState">
3808 <desc>
3809 Gets called by IConsole::discardCurrentSnapshotAndState.
3810 <result name="VBOX_E_INVALID_OBJECT_STATE">
3811 Virtual machine does not have any snapshot.
3812 </result>
3813 </desc>
3814 <param name="initiator" type="IConsole" dir="in">
3815 <desc>The console object that initiated this call.</desc>
3816 </param>
3817 <param name="machineState" type="MachineState" dir="out">
3818 <desc>New machine state after this operation is started.</desc>
3819 </param>
3820 <param name="progress" type="IProgress" dir="return">
3821 <desc>Progress object to track the operation completion.</desc>
3822 </param>
3823 </method>
3824
3825 <method name="pullGuestProperties">
3826 <desc>
3827 Get the list of the guest properties matching a set of patterns along
3828 with their values, time stamps and flags and give responsibility for
3829 managing properties to the console.
3830 </desc>
3831 <param name="name" type="wstring" dir="out" safearray="yes">
3832 <desc>
3833 The names of the properties returned.
3834 </desc>
3835 </param>
3836 <param name="value" type="wstring" dir="out" safearray="yes">
3837 <desc>
3838 The values of the properties returned. The array entries match the
3839 corresponding entries in the @a name array.
3840 </desc>
3841 </param>
3842 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3843 <desc>
3844 The time stamps of the properties returned. The array entries match
3845 the corresponding entries in the @a name array.
3846 </desc>
3847 </param>
3848 <param name="flags" type="wstring" dir="out" safearray="yes">
3849 <desc>
3850 The flags of the properties returned. The array entries match the
3851 corresponding entries in the @a name array.
3852 </desc>
3853 </param>
3854 </method>
3855
3856 <method name="pushGuestProperties">
3857 <desc>
3858 Set the list of the guest properties matching a set of patterns along
3859 with their values, time stamps and flags and return responsibility for
3860 managing properties to IMachine.
3861 </desc>
3862 <param name="name" type="wstring" dir="in" safearray="yes">
3863 <desc>
3864 The names of the properties.
3865 </desc>
3866 </param>
3867 <param name="value" type="wstring" dir="in" safearray="yes">
3868 <desc>
3869 The values of the properties. The array entries match the
3870 corresponding entries in the @a name array.
3871 </desc>
3872 </param>
3873 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3874 <desc>
3875 The time stamps of the properties. The array entries match
3876 the corresponding entries in the @a name array.
3877 </desc>
3878 </param>
3879 <param name="flags" type="wstring" dir="in" safearray="yes">
3880 <desc>
3881 The flags of the properties. The array entries match the
3882 corresponding entries in the @a name array.
3883 </desc>
3884 </param>
3885 </method>
3886 <method name="pushGuestProperty">
3887 <desc>
3888 Update a single guest property in IMachine.
3889 </desc>
3890 <param name="name" type="wstring" dir="in">
3891 <desc>
3892 The name of the property to be updated.
3893 </desc>
3894 </param>
3895 <param name="value" type="wstring" dir="in">
3896 <desc>
3897 The value of the property.
3898 </desc>
3899 </param>
3900 <param name="timestamp" type="unsigned long long" dir="in">
3901 <desc>
3902 The timestamp of the property.
3903 </desc>
3904 </param>
3905 <param name="flags" type="wstring" dir="in">
3906 <desc>
3907 The flags of the property.
3908 </desc>
3909 </param>
3910 </method>
3911
3912 <method name="lockMedia">
3913 <desc>
3914 Locks all media attached to the machine for writing and parents of
3915 attahced different hard disks (if any) for reading. This operation is
3916 atomic so that if it fails no media is actually locked.
3917
3918 This method is intended to be called when the machine is in Starting or
3919 Restoring state. The locked media will be automatically unlocked when
3920 the machine is powered off or crashed.
3921 </desc>
3922 </method>
3923 </interface>
3924
3925 <interface
3926 name="IBIOSSettings" extends="$unknown"
3927 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3928 wsmap="managed"
3929 >
3930 <desc>
3931 The IBIOSSettings interface represents BIOS settings of the virtual
3932 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3933 </desc>
3934 <attribute name="logoFadeIn" type="boolean">
3935 <desc>Fade in flag for BIOS logo animation.</desc>
3936 </attribute>
3937
3938 <attribute name="logoFadeOut" type="boolean">
3939 <desc>Fade out flag for BIOS logo animation.</desc>
3940 </attribute>
3941
3942 <attribute name="logoDisplayTime" type="unsigned long">
3943 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3944 </attribute>
3945
3946 <attribute name="logoImagePath" type="wstring">
3947 <desc>Local file system path for external BIOS image.</desc>
3948 </attribute>
3949
3950 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3951 <desc>Mode of the BIOS boot device menu.</desc>
3952 </attribute>
3953
3954 <attribute name="ACPIEnabled" type="boolean">
3955 <desc>ACPI support flag.</desc>
3956 </attribute>
3957
3958 <attribute name="IOAPICEnabled" type="boolean">
3959 <desc>
3960 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3961 and support IRQs above 15.
3962 </desc>
3963 </attribute>
3964
3965 <attribute name="timeOffset" type="long long">
3966 <desc>
3967 Offset in milliseconds from the host system time. This allows for
3968 guests running with a different system date/time than the host.
3969 It is equivalent to setting the system date/time in the BIOS except
3970 it is not an absolute value but a relative one. Guest Additions
3971 time synchronization honors this offset.
3972 </desc>
3973 </attribute>
3974
3975 <attribute name="PXEDebugEnabled" type="boolean">
3976 <desc>
3977 PXE debug logging flag. If set, VirtualBox will write extensive
3978 PXE trace information to the release log.
3979 </desc>
3980 </attribute>
3981
3982 </interface>
3983
3984 <interface
3985 name="IMachine" extends="$unknown"
3986 uuid="13420cbb-175a-4456-85d0-301126dfdec7"
3987 wsmap="managed"
3988 >
3989 <desc>
3990 The IMachine interface represents a virtual machine, or guest, created
3991 in VirtualBox.
3992
3993 This interface is used in two contexts. First of all, a collection of
3994 objects implementing this interface is stored in the
3995 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3996 machines that are currently registered with this VirtualBox
3997 installation. Also, once a session has been opened for the given virtual
3998 machine (e.g. the virtual machine is running), the machine object
3999 associated with the open session can be queried from the session object;
4000 see <link to="ISession"/> for details.
4001
4002 The main role of this interface is to expose the settings of the virtual
4003 machine and provide methods to change various aspects of the virtual
4004 machine's configuration. For machine objects stored in the
4005 <link to="IVirtualBox::machines"/> collection, all attributes are
4006 read-only unless explicitly stated otherwise in individual attribute
4007 and method descriptions. In order to change a machine setting, a session
4008 for this machine must be opened using one of
4009 <link to="IVirtualBox::openSession"/>,
4010 <link to="IVirtualBox::openRemoteSession"/> or
4011 <link to="IVirtualBox::openExistingSession"/> methods. After the
4012 session has been successfully opened, a mutable machine object needs to
4013 be queried from the session object and then the desired settings changes
4014 can be applied to the returned object using IMachine attributes and
4015 methods. See the ISession interface description for more information
4016 about sessions.
4017
4018 Note that the IMachine interface does not provide methods to control
4019 virtual machine execution (such as start the machine, or power it
4020 down) -- these methods are grouped in a separate IConsole
4021 interface. Refer to the IConsole interface description to get more
4022 information about this topic.
4023
4024 <see>ISession, IConsole</see>
4025 </desc>
4026
4027 <attribute name="parent" type="IVirtualBox" readonly="yes">
4028 <desc>Associated parent object.</desc>
4029 </attribute>
4030
4031 <attribute name="accessible" type="boolean" readonly="yes">
4032 <desc>
4033 Whether this virtual machine is currently accessible or not.
4034
4035 The machine is considered to be inaccessible when:
4036 <ul>
4037 <li>It is a registered virtual machine, and
4038 </li>
4039 <li>Its settings file is inaccessible (for example, it is
4040 located on a network share that is not accessible during
4041 VirtualBox startup, or becomes inaccessible later, or if
4042 the settings file can be read but is invalid).
4043 </li>
4044 </ul>
4045
4046 Otherwise, the value of this property is always <tt>true</tt>.
4047
4048 Every time this property is read, the accessibility state of
4049 this machine is re-evaluated. If the returned value is |false|,
4050 the <link to="#accessError"/> property may be used to get the
4051 detailed error information describing the reason of
4052 inaccessibility.
4053
4054 When the machine is inaccessible, only the following properties
4055 can be used on it:
4056 <ul>
4057 <li><link to="#parent"/></li>
4058 <li><link to="#id"/></li>
4059 <li><link to="#settingsFilePath"/></li>
4060 <li><link to="#accessible"/></li>
4061 <li><link to="#accessError"/></li>
4062 </ul>
4063
4064 An attempt to access any other property or method will return
4065 an error.
4066
4067 The only possible action you can perform on an inaccessible
4068 machine is to unregister it using the
4069 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4070 for the accessibility state once more by querying this
4071 property).
4072
4073 <note>
4074 In the current implementation, once this property returns
4075 <tt>true</tt>, the machine will never become inaccessible
4076 later, even if its settings file cannot be successfully
4077 read/written any more (at least, until the VirtualBox
4078 server is restarted). This limitation may be removed in
4079 future releases.
4080 </note>
4081 </desc>
4082 </attribute>
4083
4084 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4085 <desc>
4086 Error information describing the reason of machine
4087 inaccessibility.
4088
4089 Reading this property is only valid after the last call to
4090 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
4091 machine is currently unaccessible). Otherwise, a null
4092 IVirtualBoxErrorInfo object will be returned.
4093 </desc>
4094 </attribute>
4095
4096 <attribute name="name" type="wstring">
4097 <desc>
4098 Name of the virtual machine.
4099
4100 Besides being used for human-readable identification purposes
4101 everywhere in VirtualBox, the virtual machine name is also used
4102 as a name of the machine's settings file and as a name of the
4103 subdirectory this settings file resides in. Thus, every time you
4104 change the value of this property, the settings file will be
4105 renamed once you call <link to="#saveSettings"/> to confirm the
4106 change. The containing subdirectory will be also renamed, but
4107 only if it has exactly the same name as the settings file
4108 itself prior to changing this property (for backward compatibility
4109 with previous API releases). The above implies the following
4110 limitations:
4111 <ul>
4112 <li>The machine name cannot be empty.</li>
4113 <li>The machine name can contain only characters that are valid
4114 file name characters according to the rules of the file
4115 system used to store VirtualBox configuration.</li>
4116 <li>You cannot have two or more machines with the same name
4117 if they use the same subdirectory for storing the machine
4118 settings files.</li>
4119 <li>You cannot change the name of the machine if it is running,
4120 or if any file in the directory containing the settings file
4121 is being used by another running machine or by any other
4122 process in the host operating system at a time when
4123 <link to="#saveSettings"/> is called.
4124 </li>
4125 </ul>
4126 If any of the above limitations are hit, <link to="#saveSettings"/>
4127 will return an appropriate error message explaining the exact
4128 reason and the changes you made to this machine will not be
4129 saved.
4130 <note>
4131 For "legacy" machines created using the
4132 <link to="IVirtualBox::createLegacyMachine"/> call,
4133 the above naming limitations do not apply because the
4134 machine name does not affect the settings file name.
4135 The settings file name remains the same as it was specified
4136 during machine creation and never changes.
4137 </note>
4138 </desc>
4139 </attribute>
4140
4141 <attribute name="description" type="wstring">
4142 <desc>
4143 Description of the virtual machine.
4144
4145 The description attribute can contain any text and is
4146 typically used to describe the hardware and software
4147 configuration of the virtual machine in detail (i.e. network
4148 settings, versions of the installed software and so on).
4149 </desc>
4150 </attribute>
4151
4152 <attribute name="id" type="uuid" readonly="yes">
4153 <desc>UUID of the virtual machine.</desc>
4154 </attribute>
4155
4156 <attribute name="OSTypeId" type="wstring">
4157 <desc>
4158 User-defined identifier of the Guest OS type.
4159 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4160 an IGuestOSType object representing details about the given
4161 Guest OS type.
4162 <note>
4163 This value may differ from the value returned by
4164 <link to="IGuest::OSTypeId"/> if Guest Additions are
4165 installed to the guest OS.
4166 </note>
4167 </desc>
4168 </attribute>
4169
4170 <attribute name="HardwareVersion" type="wstring">
4171 <desc>Hardware version identifier. Internal use only for now.</desc>
4172 </attribute>
4173
4174 <attribute name="CPUCount" type="unsigned long">
4175 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
4176 </attribute>
4177
4178 <attribute name="memorySize" type="unsigned long">
4179 <desc>System memory size in megabytes.</desc>
4180 </attribute>
4181
4182 <attribute name="memoryBalloonSize" type="unsigned long">
4183 <desc>Initial memory balloon size in megabytes.</desc>
4184 </attribute>
4185
4186 <attribute name="statisticsUpdateInterval" type="unsigned long">
4187 <desc>Initial interval to update guest statistics in seconds.</desc>
4188 </attribute>
4189
4190 <attribute name="VRAMSize" type="unsigned long">
4191 <desc>Video memory size in megabytes.</desc>
4192 </attribute>
4193
4194 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4195 <desc>
4196 This setting determines whether VirtualBox allows guests to make use
4197 of the 3D graphics support available on the host. Currently limited
4198 to OpenGL only. </desc>
4199 </attribute>
4200
4201 <attribute name="monitorCount" type="unsigned long">
4202 <desc>
4203 Number of virtual monitors.
4204 <note>
4205 Only effective on Windows XP and later guests with
4206 Guest Additions installed.
4207 </note>
4208 </desc>
4209 </attribute>
4210
4211 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4212 <desc>Object containing all BIOS settings.</desc>
4213 </attribute>
4214
4215 <attribute name="HWVirtExEnabled" type="TSBool">
4216 <desc>
4217 This setting determines whether VirtualBox will try to make use of
4218 the host CPU's hardware virtualization extensions such as Intel VT-x
4219 and AMD-V. Note that in case such extensions are not available,
4220 they will not be used.
4221 </desc>
4222 </attribute>
4223
4224 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4225 <desc>
4226 This setting determines whether VirtualBox will try to make use of
4227 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4228 such extensions are not available, they will not be used.
4229 </desc>
4230 </attribute>
4231
4232 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4233 <desc>
4234 This setting determines whether VirtualBox will try to make use of
4235 the VPID extension of Intel VT-x. Note that in case such extensions are
4236 not available, they will not be used.
4237 </desc>
4238 </attribute>
4239
4240 <attribute name="PAEEnabled" type="boolean" default="false">
4241 <desc>
4242 This setting determines whether VirtualBox will expose the Physical Address
4243 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4244 is not available, it will not be reported.
4245 </desc>
4246 </attribute>
4247
4248 <attribute name="snapshotFolder" type="wstring">
4249 <desc>
4250 Full path to the directory used to store snapshot data
4251 (differencing hard disks and saved state files) of this machine.
4252
4253 The initial value of this property is
4254 <tt>&lt;</tt><link to="#settingsFilePath">
4255 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4256 <link to="#id">machine_uuid</link>
4257 <tt>&gt;</tt>.
4258
4259 Currently, it is an error to try to change this property on
4260 a machine that has snapshots (because this would require to
4261 move possibly large files to a different location).
4262 A separate method will be available for this purpose later.
4263
4264 <note>
4265 Setting this property to <tt>null</tt> will restore the
4266 initial value.
4267 </note>
4268 <note>
4269 When setting this property, the specified path can be
4270 absolute (full path) or relative to the directory where the
4271 <link to="#settingsFilePath">machine settings file</link>
4272 is located. When reading this property, a full path is
4273 always returned.
4274 </note>
4275 <note>
4276 The specified path may not exist, it will be created
4277 when necessary.
4278 </note>
4279 </desc>
4280 </attribute>
4281
4282 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4283 <desc>VRDP server object.</desc>
4284 </attribute>
4285
4286 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4287 <desc>Array of hard disks attached to this machine.</desc>
4288 </attribute>
4289
4290 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4291 <desc>Associated DVD drive object.</desc>
4292 </attribute>
4293
4294 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4295 <desc>Associated floppy drive object.</desc>
4296 </attribute>
4297
4298 <attribute name="USBController" type="IUSBController" readonly="yes">
4299 <desc>
4300 Associated USB controller object.
4301
4302 <note>
4303 If USB functionality is not available in the given edition of
4304 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4305 </note>
4306 </desc>
4307 </attribute>
4308
4309 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4310 <desc>Associated audio adapter, always present.</desc>
4311 </attribute>
4312
4313 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4314 <desc>Array of storage controllers attached to this machine.</desc>
4315 </attribute>
4316
4317 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4318 <desc>
4319 Full name of the file containing machine settings data.
4320 </desc>
4321 </attribute>
4322
4323 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4324 <desc>
4325 Current version of the format of the settings file of this machine
4326 (<link to="IMachine::settingsFilePath"/>).
4327
4328 The version string has the following format:
4329 <pre>
4330 x.y-platform
4331 </pre>
4332 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4333 versions, and <tt>platform</tt> is the platform identifier.
4334
4335 The current version usually matches the value of the
4336 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4337 settings file was created by an older version of VirtualBox and there
4338 was a change of the settings file format since then.
4339
4340 Note that VirtualBox automatically converts settings files from older
4341 versions to the most recent version when reading them (usually at
4342 VirtualBox startup) but it doesn't save the changes back until
4343 you call a method that implicitly saves settings (such as
4344 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4345 explicitly. Therefore, if the value of this attribute differs from the
4346 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4347 means that the settings file was converted but the result of the
4348 conversion is not yet saved to disk.
4349
4350 The above feature may be used by interactive front-ends to inform users
4351 about the settings file format change and offer them to explicitly save
4352 all converted settings files (the global and VM-specific ones),
4353 optionally create backup copies of the old settings files before saving,
4354 etc.
4355
4356 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4357 </desc>
4358 </attribute>
4359
4360 <attribute name="settingsModified" type="boolean" readonly="yes">
4361 <desc>
4362 Whether the settings of this machine have been modified
4363 (but neither yet saved nor discarded).
4364 <note>
4365 Reading this property is only valid on instances returned
4366 by <link to="ISession::machine"/> and on new machines
4367 created by <link to="IVirtualBox::createMachine"/> or opened
4368 by <link to="IVirtualBox::openMachine"/> but not
4369 yet registered, or on unregistered machines after calling
4370 <link to="IVirtualBox::unregisterMachine"/>. For all other
4371 cases, the settings can never be modified.
4372 </note>
4373 <note>
4374 For newly created unregistered machines, the value of this
4375 property is always TRUE until <link to="#saveSettings"/>
4376 is called (no matter if any machine settings have been
4377 changed after the creation or not). For opened machines
4378 the value is set to FALSE (and then follows to normal rules).
4379 </note>
4380 </desc>
4381 </attribute>
4382
4383 <attribute name="sessionState" type="SessionState" readonly="yes">
4384 <desc>Current session state for this machine.</desc>
4385 </attribute>
4386
4387 <attribute name="sessionType" type="wstring" readonly="yes">
4388 <desc>
4389 Type of the session. If <link to="#sessionState"/> is
4390 SessionSpawning or SessionOpen, this attribute contains the
4391 same value as passed to the
4392 <link to="IVirtualBox::openRemoteSession"/> method in the
4393 @a type parameter. If the session was opened directly using
4394 <link to="IVirtualBox::openSession"/>, or if
4395 <link to="#sessionState"/> is SessionClosed, the value of this
4396 attribute is @c null.
4397 </desc>
4398 </attribute>
4399
4400 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4401 <desc>
4402 Identifier of the session process. This attribute contains the
4403 platform-dependent identifier of the process that has opened a
4404 direct session for this machine using the
4405 <link to="IVirtualBox::openSession"/> call. The returned value
4406 is only valid if <link to="#sessionState"/> is SessionOpen or
4407 SessionClosing (i.e. a session is currently open or being
4408 closed) by the time this property is read.
4409 </desc>
4410 </attribute>
4411
4412 <attribute name="state" type="MachineState" readonly="yes">
4413 <desc>Current execution state of this machine.</desc>
4414 </attribute>
4415
4416 <attribute name="lastStateChange" type="long long" readonly="yes">
4417 <desc>
4418 Time stamp of the last execution state change,
4419 in milliseconds since 1970-01-01 UTC.
4420 </desc>
4421 </attribute>
4422
4423 <attribute name="stateFilePath" type="wstring" readonly="yes">
4424 <desc>
4425 Full path to the file that stores the execution state of
4426 the machine when it is in the <link to="MachineState_Saved"/> state.
4427 <note>
4428 When the machine is not in the Saved state, this attribute
4429 <tt>null</tt>.
4430 </note>
4431 </desc>
4432 </attribute>
4433
4434 <attribute name="logFolder" type="wstring" readonly="yes">
4435 <desc>
4436 Full path to the folder that stores a set of rotated log files
4437 recorded during machine execution. The most recent log file is
4438 named <tt>VBox.log</tt>, the previous log file is
4439 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4440 in the current version).
4441 </desc>
4442 </attribute>
4443
4444 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4445 <desc>
4446 Current snapshot of this machine.
4447 <note>
4448 A <tt>null</tt> object is returned if the machine doesn't
4449 have snapshots.
4450 </note>
4451 <see><link to="ISnapshot"/></see>
4452 </desc>
4453 </attribute>
4454
4455 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4456 <desc>
4457 Number of snapshots taken on this machine. Zero means the
4458 machine doesn't have any snapshots.
4459 </desc>
4460 </attribute>
4461
4462 <attribute name="currentStateModified" type="boolean" readonly="yes">
4463 <desc>
4464 Returns <tt>true</tt> if the current state of the machine is not
4465 identical to the state stored in the current snapshot.
4466
4467 The current state is identical to the current snapshot right
4468 after one of the following calls are made:
4469 <ul>
4470 <li><link to="IConsole::discardCurrentState"/> or
4471 <link to="IConsole::discardCurrentSnapshotAndState"/>
4472 </li>
4473 <li><link to="IConsole::takeSnapshot"/> (issued on a
4474 powered off or saved machine, for which
4475 <link to="#settingsModified"/> returns <tt>false</tt>)
4476 </li>
4477 <li><link to="IMachine::setCurrentSnapshot"/>
4478 </li>
4479 </ul>
4480
4481 The current state remains identical until one of the following
4482 happens:
4483 <ul>
4484 <li>settings of the machine are changed</li>
4485 <li>the saved state is discarded</li>
4486 <li>the current snapshot is discarded</li>
4487 <li>an attempt to execute the machine is made</li>
4488 </ul>
4489
4490 <note>
4491 For machines that don't have snapshots, this property is
4492 always <tt>false</tt>.
4493 </note>
4494 </desc>
4495 </attribute>
4496
4497 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4498 <desc>
4499 Collection of shared folders for this machine (permanent shared
4500 folders). These folders are shared automatically at machine startup
4501 and available only to the guest OS installed within this machine.
4502
4503 New shared folders are added to the collection using
4504 <link to="#createSharedFolder"/>. Existing shared folders can be
4505 removed using <link to="#removeSharedFolder"/>.
4506 </desc>
4507 </attribute>
4508
4509 <attribute name="clipboardMode" type="ClipboardMode">
4510 <desc>
4511 Synchronization mode between the host OS clipboard
4512 and the guest OS clipboard.
4513 </desc>
4514 </attribute>
4515
4516 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4517 <desc>
4518 A comma-separated list of simple glob patterns. Changes to guest
4519 properties whose name matches one of the patterns will generate an
4520 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4521 </desc>
4522 </attribute>
4523
4524 <method name="setBootOrder">
4525 <desc>
4526 Puts the given device to the specified position in
4527 the boot order.
4528
4529 To indicate that no device is associated with the given position,
4530 <link to="DeviceType_Null"/> should be used.
4531
4532 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4533
4534 <result name="E_INVALIDARG">
4535 Boot @a position out of range.
4536 </result>
4537 <result name="E_NOTIMPL">
4538 Booting from USB @a device currently not supported.
4539 </result>
4540
4541 </desc>
4542 <param name="position" type="unsigned long" dir="in">
4543 <desc>
4544 Position in the boot order (<tt>1</tt> to the total number of
4545 devices the machine can boot from, as returned by
4546 <link to="ISystemProperties::maxBootPosition"/>).
4547 </desc>
4548 </param>
4549 <param name="device" type="DeviceType" dir="in">
4550 <desc>
4551 The type of the device used to boot at the given position.
4552 </desc>
4553 </param>
4554 </method>
4555
4556 <method name="getBootOrder" const="yes">
4557 <desc>
4558 Returns the device type that occupies the specified
4559 position in the boot order.
4560
4561 @todo [remove?]
4562 If the machine can have more than one device of the returned type
4563 (such as hard disks), then a separate method should be used to
4564 retrieve the individual device that occupies the given position.
4565
4566 If here are no devices at the given position, then
4567 <link to="DeviceType_Null"/> is returned.
4568
4569 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4570
4571 <result name="E_INVALIDARG">
4572 Boot @a position out of range.
4573 </result>
4574
4575 </desc>
4576 <param name="position" type="unsigned long" dir="in">
4577 <desc>
4578 Position in the boot order (<tt>1</tt> to the total number of
4579 devices the machine can boot from, as returned by
4580 <link to="ISystemProperties::maxBootPosition"/>).
4581 </desc>
4582 </param>
4583 <param name="device" type="DeviceType" dir="return">
4584 <desc>
4585 Device at the given position.
4586 </desc>
4587 </param>
4588 </method>
4589
4590 <method name="attachHardDisk">
4591 <desc>
4592 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4593 by the given UUID @a id) to the given hard disk controller
4594 (<link to="IStorageController" />, identified by @a name),
4595 at the indicated port and device.
4596
4597 For the IDE bus, the @a controllerPort parameter can be either
4598 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4599 respectively. For the primary controller of the IDE bus,
4600 @a device can be either @c 0 or @c 1, to specify the master or the
4601 slave device, respectively. For the secondary IDE controller, the
4602 device number must be @c 1 because VirtualBox reserves the
4603 secondary master for the CD-ROM drive.
4604
4605 For an SATA controller, @a controllerPort must be a number ranging
4606 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4607 be a number ranging from @c 0 to @c 15.
4608
4609 For both SCSI and SATA, the @a device parameter is unused and must
4610 be @c 0.
4611
4612 The specified device slot must not have another disk attached to it, or
4613 this method will fail.
4614
4615 See <link to="IHardDisk"/> for more detailed information about
4616 attaching hard disks.
4617
4618 <note>
4619 You cannot attach a hard disk to a running machine. Also, you cannot
4620 attach a hard disk to a newly created machine until this machine's
4621 settings are saved to disk using <link to="#saveSettings"/>.
4622 </note>
4623 <note>
4624 If the hard disk is being attached indirectly, a new differencing hard
4625 disk will implicitly be created for it and attached instead. If the
4626 changes made to the machine settings (including this indirect
4627 attachment) are later cancelled using <link to="#discardSettings"/>,
4628 this implicitly created differencing hard disk will implicitly
4629 be deleted.
4630 </note>
4631
4632 <result name="E_INVALIDARG">
4633 SATA device, SATA port, IDE port or IDE slot out of range.
4634 </result>
4635 <result name="VBOX_E_INVALID_OBJECT_STATE">
4636 Attempt to attach hard disk to an unregistered virtual machine.
4637 </result>
4638 <result name="VBOX_E_INVALID_VM_STATE">
4639 Invalid machine state.
4640 </result>
4641 <result name="VBOX_E_OBJECT_IN_USE">
4642 Hard disk already attached to this or another virtual machine.
4643 </result>
4644
4645 </desc>
4646 <param name="id" type="uuid" dir="in">
4647 <desc>UUID of the hard disk to attach.</desc>
4648 </param>
4649 <param name="name" type="wstring" dir="in">
4650 <desc>Name of the storage controller to attach the hard disk to.</desc>
4651 </param>
4652 <param name="controllerPort" type="long" dir="in">
4653 <desc>Port to attach the hard disk to.</desc>
4654 </param>
4655 <param name="device" type="long" dir="in">
4656 <desc>
4657 Device slot in the given port to attach the hard disk to.
4658 </desc>
4659 </param>
4660 </method>
4661
4662 <method name="getHardDisk" const="yes">
4663 <desc>
4664 Returns the virtual hard disk attached to a device slot of the specified
4665 bus.
4666
4667 Note that if the hard disk was indirectly attached by
4668 <link to="#attachHardDisk"/> to the given device slot then this
4669 method will return not the same object as passed to the
4670 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4671 more detailed information about attaching hard disks.
4672
4673 <result name="VBOX_E_OBJECT_NOT_FOUND">
4674 No hard disk attached to given slot/bus.
4675 </result>
4676
4677 </desc>
4678 <param name="name" type="wstring" dir="in">
4679 <desc>Name of the storage controller the hard disk is attached to.</desc>
4680 </param>
4681 <param name="controllerPort" type="long" dir="in">
4682 <desc>Port to query.</desc>
4683 </param>
4684 <param name="device" type="long" dir="in">
4685 <desc>Device slot in the given port to query.</desc>
4686 </param>
4687 <param name="hardDisk" type="IHardDisk" dir="return">
4688 <desc>Attached hard disk object.</desc>
4689 </param>
4690 </method>
4691
4692 <method name="detachHardDisk">
4693 <desc>
4694 Detaches the virtual hard disk attached to a device slot of the
4695 specified bus.
4696
4697 Detaching the hard disk from the virtual machine is deferred. This means
4698 that the hard disk remains associated with the machine when this method
4699 returns and gets actually de-associated only after a successful
4700 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4701 for more detailed information about attaching hard disks.
4702
4703 <note>
4704 You cannot detach the hard disk from a running machine.
4705 </note>
4706 <note>
4707 Detaching differencing hard disks implicitly created by <link
4708 to="#attachHardDisk"/> for the indirect attachment using this
4709 method will <b>not</b> implicitly delete them. The
4710 <link to="IHardDisk::deleteStorage"/> operation should be
4711 explicitly performed by the caller after the hard disk is successfully
4712 detached and the settings are saved with
4713 <link to="#saveSettings"/>, if it is the desired action.
4714 </note>
4715
4716 <result name="VBOX_E_INVALID_VM_STATE">
4717 Attempt to detach hard disk from a running virtual machine.
4718 </result>
4719 <result name="VBOX_E_OBJECT_NOT_FOUND">
4720 No hard disk attached to given slot/bus.
4721 </result>
4722 <result name="VBOX_E_NOT_SUPPORTED">
4723 Hard disk format does not support storage deletion.
4724 </result>
4725
4726 </desc>
4727 <param name="name" type="wstring" dir="in">
4728 <desc>name of the storage controller to detach the hard disk from.</desc>
4729 </param>
4730 <param name="controllerPort" type="long" dir="in">
4731 <desc>Port number to detach the hard disk from.</desc>
4732 </param>
4733 <param name="device" type="long" dir="in">
4734 <desc>Device slot number to detach the hard disk from.</desc>
4735 </param>
4736 </method>
4737
4738 <method name="getHardDiskAttachmentsOfController" const="yes">
4739 <desc>
4740 Returns an array of hard disk attachments which are attached to the
4741 the controller with the given name.
4742
4743 <result name="VBOX_E_OBJECT_NOT_FOUND">
4744 A storage controller with given name doesn't exist.
4745 </result>
4746 </desc>
4747 <param name="name" type="wstring" dir="in"/>
4748 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4749 </method>
4750
4751 <method name="getNetworkAdapter" const="yes">
4752 <desc>
4753 Returns the network adapter associated with the given slot.
4754 Slots are numbered sequentially, starting with zero. The total
4755 number of adapters per machine is defined by the
4756 <link to="ISystemProperties::networkAdapterCount"/> property,
4757 so the maximum slot number is one less than that property's value.
4758
4759 <result name="E_INVALIDARG">
4760 Invalid @a slot number.
4761 </result>
4762
4763 </desc>
4764 <param name="slot" type="unsigned long" dir="in"/>
4765 <param name="adapter" type="INetworkAdapter" dir="return"/>
4766 </method>
4767
4768 <method name="addStorageController">
4769 <desc>
4770 Adds a new storage controller (SCSI or SATA controller) to the
4771 machine and returns it as an instance of
4772 <link to="IStorageController" />.
4773
4774 @a name identifies the controller for subsequent calls such as
4775 <link to="#getStorageControllerByName" /> or
4776 <link to="#removeStorageController" /> or
4777 <link to="#attachHardDisk" />.
4778
4779 After the controller has been added, you can set its exact
4780 type by setting the <link to="IStorageController::controllerType" />.
4781
4782 <result name="VBOX_E_OBJECT_IN_USE">
4783 A storage controller with given name exists already.
4784 </result>
4785 <result name="E_INVALIDARG">
4786 Invalid @a controllerType.
4787 </result>
4788 </desc>
4789 <param name="name" type="wstring" dir="in"/>
4790 <param name="connectionType" type="StorageBus" dir="in"/>
4791 <param name="controller" type="IStorageController" dir="return"/>
4792 </method>
4793
4794 <method name="getStorageControllerByName" const="yes">
4795 <desc>
4796 Returns a storage controller with the given name.
4797
4798 <result name="VBOX_E_OBJECT_NOT_FOUND">
4799 A storage controller with given name doesn't exist.
4800 </result>
4801 </desc>
4802 <param name="name" type="wstring" dir="in"/>
4803 <param name="storageController" type="IStorageController" dir="return"/>
4804 </method>
4805
4806 <method name="removeStorageController">
4807 <desc>
4808 Removes a storage controller from the machine.
4809
4810 <result name="VBOX_E_OBJECT_NOT_FOUND">
4811 A storage controller with given name doesn't exist.
4812 </result>
4813 </desc>
4814 <param name="name" type="wstring" dir="in"/>
4815 </method>
4816
4817 <method name="getSerialPort" const="yes">
4818 <desc>
4819 Returns the serial port associated with the given slot.
4820 Slots are numbered sequentially, starting with zero. The total
4821 number of serial ports per machine is defined by the
4822 <link to="ISystemProperties::serialPortCount"/> property,
4823 so the maximum slot number is one less than that property's value.
4824
4825 <result name="E_INVALIDARG">
4826 Invalid @a slot number.
4827 </result>
4828
4829 </desc>
4830 <param name="slot" type="unsigned long" dir="in"/>
4831 <param name="port" type="ISerialPort" dir="return"/>
4832 </method>
4833
4834 <method name="getParallelPort" const="yes">
4835 <desc>
4836 Returns the parallel port associated with the given slot.
4837 Slots are numbered sequentially, starting with zero. The total
4838 number of parallel ports per machine is defined by the
4839 <link to="ISystemProperties::parallelPortCount"/> property,
4840 so the maximum slot number is one less than that property's value.
4841
4842 <result name="E_INVALIDARG">
4843 Invalid @a slot number.
4844 </result>
4845
4846 </desc>
4847 <param name="slot" type="unsigned long" dir="in"/>
4848 <param name="port" type="IParallelPort" dir="return"/>
4849 </method>
4850
4851 <method name="getNextExtraDataKey">
4852 <desc>
4853 Returns the machine-specific extra data key name following the
4854 supplied key.
4855
4856 An error is returned if the supplied @a key does not exist. @c NULL is
4857 returned in @a nextKey if the supplied key is the last key. When
4858 supplying @c NULL for the @a key, the first key item is returned in
4859 @a nextKey (if there is any). @a nextValue is an optional parameter and
4860 if supplied, the next key's value is returned in it.
4861
4862 <result name="VBOX_E_OBJECT_NOT_FOUND">
4863 Extra data @a key not found.
4864 </result>
4865
4866 </desc>
4867 <param name="key" type="wstring" dir="in">
4868 <desc>Name of the data key to follow.</desc>
4869 </param>
4870 <param name="nextKey" type="wstring" dir="out">
4871 <desc>Name of the next data key.</desc>
4872 </param>
4873 <param name="nextValue" type="wstring" dir="out">
4874 <desc>Value of the next data key.</desc>
4875 </param>
4876 </method>
4877
4878 <method name="getExtraData">
4879 <desc>
4880 Returns associated machine-specific extra data.
4881
4882 If the requested data @a key does not exist, this function will
4883 succeed and return @c NULL in the @a value argument.
4884
4885 <result name="VBOX_E_FILE_ERROR">
4886 Settings file not accessible.
4887 </result>
4888 <result name="VBOX_E_XML_ERROR">
4889 Could not parse the settings file.
4890 </result>
4891
4892 </desc>
4893 <param name="key" type="wstring" dir="in">
4894 <desc>Name of the data key to get.</desc>
4895 </param>
4896 <param name="value" type="wstring" dir="return">
4897 <desc>Value of the requested data key.</desc>
4898 </param>
4899 </method>
4900
4901 <method name="setExtraData">
4902 <desc>
4903 Sets associated machine-specific extra data.
4904
4905 If you pass @c NULL as a key @a value, the given @a key will be
4906 deleted.
4907
4908 <note>
4909 Before performing the actual data change, this method will ask all
4910 registered callbacks using the
4911 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4912 notification for a permission. If one of the callbacks refuses the
4913 new value, the change will not be performed.
4914 </note>
4915 <note>
4916 On success, the
4917 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4918 is called to inform all registered callbacks about a successful data
4919 change.
4920 </note>
4921 <note>
4922 This method can be called outside the machine session and therefore
4923 it's a caller's responsibility to handle possible race conditions
4924 when several clients change the same key at the same time.
4925 </note>
4926
4927 <result name="VBOX_E_FILE_ERROR">
4928 Settings file not accessible.
4929 </result>
4930 <result name="VBOX_E_XML_ERROR">
4931 Could not parse the settings file.
4932 </result>
4933
4934 </desc>
4935 <param name="key" type="wstring" dir="in">
4936 <desc>Name of the data key to set.</desc>
4937 </param>
4938 <param name="value" type="wstring" dir="in">
4939 <desc>Value to assign to the key.</desc>
4940 </param>
4941 </method>
4942
4943 <method name="saveSettings">
4944 <desc>
4945 Saves any changes to machine settings made since the session
4946 has been opened or a new machine has been created, or since the
4947 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4948 For registered machines, new settings become visible to all
4949 other VirtualBox clients after successful invocation of this
4950 method.
4951 <note>
4952 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4953 notification event after the configuration has been successfully
4954 saved (only for registered machines).
4955 </note>
4956 <note>
4957 Calling this method is only valid on instances returned
4958 by <link to="ISession::machine"/> and on new machines
4959 created by <link to="IVirtualBox::createMachine"/> but not
4960 yet registered, or on unregistered machines after calling
4961 <link to="IVirtualBox::unregisterMachine"/>.
4962 </note>
4963
4964 <result name="VBOX_E_FILE_ERROR">
4965 Settings file not accessible.
4966 </result>
4967 <result name="VBOX_E_XML_ERROR">
4968 Could not parse the settings file.
4969 </result>
4970 <result name="E_ACCESSDENIED">
4971 Modification request refused.
4972 </result>
4973
4974 </desc>
4975 </method>
4976
4977 <method name="saveSettingsWithBackup">
4978 <desc>
4979 Creates a backup copy of the machine settings file (<link
4980 to="IMachine::settingsFilePath"/>) in case of auto-conversion, and then calls
4981 <link to="IMachine::saveSettings"/>.
4982
4983 Note that the backup copy is created <b>only</b> if the settings file
4984 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4985 details). Otherwise, this call is fully equivalent to
4986 <link to="IMachine::saveSettings"/> and no backup copying is done.
4987
4988 The backup copy is created in the same directory where the original
4989 settings file is located. It is given the following file name:
4990 <pre>
4991 original.xml.x.y-platform.bak
4992 </pre>
4993 where <tt>original.xml</tt> is the original settings file name
4994 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4995 format of the settings file (before auto-conversion).
4996
4997 If the given backup file already exists, this method will try to add the
4998 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4999 0 to 9) and copy it again until it succeeds. If all suffixes are
5000 occupied, or if any other copy error occurs, this method will return a
5001 failure.
5002
5003 If the copy operation succeeds, the @a bakFileName return argument will
5004 receive a full path to the created backup file (for informational
5005 purposes). Note that this will happen even if the subsequent
5006 <link to="#saveSettings"/> call performed by this method after the
5007 copy operation, fails.
5008
5009 <note>
5010 The VirtualBox API never calls this method. It is intended purely for
5011 the purposes of creating backup copies of the settings files by
5012 front-ends before saving the results of the automatically performed
5013 settings conversion to disk.
5014 </note>
5015
5016 <see>settingsFileVersion</see>
5017
5018 <result name="VBOX_E_FILE_ERROR">
5019 Settings file not accessible.
5020 </result>
5021 <result name="VBOX_E_XML_ERROR">
5022 Could not parse the settings file.
5023 </result>
5024 <result name="VBOX_E_INVALID_VM_STATE">
5025 Virtual machine is not mutable.
5026 </result>
5027 <result name="E_ACCESSDENIED">
5028 Modification request refused.
5029 </result>
5030
5031 </desc>
5032 <param name="bakFileName" type="wstring" dir="return">
5033 <desc>Full path to the created backup copy.</desc>
5034 </param>
5035 </method>
5036
5037 <method name="discardSettings">
5038 <desc>
5039 Discards any changes to the machine settings made since the session
5040 has been opened or since the last call to <link to="#saveSettings"/>
5041 or <link to="#discardSettings"/>.
5042 <note>
5043 Calling this method is only valid on instances returned
5044 by <link to="ISession::machine"/> and on new machines
5045 created by <link to="IVirtualBox::createMachine"/> or
5046 opened by <link to="IVirtualBox::openMachine"/> but not
5047 yet registered, or on unregistered machines after calling
5048 <link to="IVirtualBox::unregisterMachine"/>.
5049 </note>
5050
5051 <result name="VBOX_E_INVALID_VM_STATE">
5052 Virtual machine is not mutable.
5053 </result>
5054
5055 </desc>
5056 </method>
5057
5058 <method name="deleteSettings">
5059 <desc>
5060 Deletes the settings file of this machine from disk.
5061 The machine must not be registered in order for this operation
5062 to succeed.
5063 <note>
5064 <link to="#settingsModified"/> will return TRUE after this
5065 method successfully returns.
5066 </note>
5067 <note>
5068 Calling this method is only valid on instances returned
5069 by <link to="ISession::machine"/> and on new machines
5070 created by <link to="IVirtualBox::createMachine"/> or
5071 opened by <link to="IVirtualBox::openMachine"/> but not
5072 yet registered, or on unregistered machines after calling
5073 <link to="IVirtualBox::unregisterMachine"/>.
5074 </note>
5075 <note>
5076 The deleted machine settings file can be restored (saved again)
5077 by calling <link to="#saveSettings"/>.
5078 </note>
5079
5080 <result name="VBOX_E_INVALID_VM_STATE">
5081 Cannot delete settings of a registered machine or
5082 machine not mutable.
5083 </result>
5084 <result name="VBOX_E_IPRT_ERROR">
5085 Could not delete the settings file.
5086 </result>
5087
5088 </desc>
5089 </method>
5090
5091 <method name="export">
5092 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5093 steps required to export VirtualBox machines to OVF.
5094 </desc>
5095
5096 <param name="aAppliance" type="IAppliance" dir="in">
5097 <desc>Appliance to export this machine to.</desc>
5098 </param>
5099 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5100 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5101 </param>
5102 </method >
5103
5104 <method name="getSnapshot">
5105 <desc>
5106 Returns a snapshot of this machine with the given UUID.
5107 A <tt>null</tt> UUID can be used to obtain the first snapshot
5108 taken on this machine. This is useful if you want to traverse
5109 the whole tree of snapshots starting from the root.
5110
5111 <result name="VBOX_E_OBJECT_NOT_FOUND">
5112 Virtual machine has no snapshots or snapshot not found.
5113 </result>
5114
5115 </desc>
5116 <param name="id" type="uuid" dir="in">
5117 <desc>UUID of the snapshot to get</desc>
5118 </param>
5119 <param name="snapshot" type="ISnapshot" dir="return">
5120 <desc>Snapshot object with the given UUID.</desc>
5121 </param>
5122 </method>
5123
5124 <method name="findSnapshot">
5125 <desc>
5126 Returns a snapshot of this machine with the given name.
5127
5128 <result name="VBOX_E_OBJECT_NOT_FOUND">
5129 Virtual machine has no snapshots or snapshot not found.
5130 </result>
5131
5132 </desc>
5133 <param name="name" type="wstring" dir="in">
5134 <desc>Name of the snapshot to find</desc>
5135 </param>
5136 <param name="snapshot" type="ISnapshot" dir="return">
5137 <desc>Snapshot object with the given name.</desc>
5138 </param>
5139 </method>
5140
5141 <method name="setCurrentSnapshot">
5142 <desc>
5143 Sets the current snapshot of this machine.
5144 <note>
5145 In the current implementation, this operation is not
5146 implemented.
5147 </note>
5148 </desc>
5149 <param name="id" type="uuid" dir="in">
5150 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5151 </param>
5152 </method>
5153
5154 <method name="createSharedFolder">
5155 <desc>
5156 Creates a new permanent shared folder by associating the given logical
5157 name with the given host path, adds it to the collection of shared
5158 folders and starts sharing it. Refer to the description of
5159 <link to="ISharedFolder"/> to read more about logical names.
5160
5161 <result name="VBOX_E_OBJECT_IN_USE">
5162 Shared folder already exists.
5163 </result>
5164 <result name="VBOX_E_FILE_ERROR">
5165 Shared folder @a hostPath not accessible.
5166 </result>
5167
5168 </desc>
5169 <param name="name" type="wstring" dir="in">
5170 <desc>Unique logical name of the shared folder.</desc>
5171 </param>
5172 <param name="hostPath" type="wstring" dir="in">
5173 <desc>Full path to the shared folder in the host file system.</desc>
5174 </param>
5175 <param name="writable" type="boolean" dir="in">
5176 <desc>Whether the share is writable or readonly</desc>
5177 </param>
5178 </method>
5179
5180 <method name="removeSharedFolder">
5181 <desc>
5182 Removes the permanent shared folder with the given name previously
5183 created by <link to="#createSharedFolder"/> from the collection of
5184 shared folders and stops sharing it.
5185
5186 <result name="VBOX_E_INVALID_VM_STATE">
5187 Virtual machine is not mutable.
5188 </result>
5189 <result name="VBOX_E_OBJECT_NOT_FOUND">
5190 Shared folder @a name does not exist.
5191 </result>
5192
5193 </desc>
5194 <param name="name" type="wstring" dir="in">
5195 <desc>Logical name of the shared folder to remove.</desc>
5196 </param>
5197 </method>
5198
5199 <method name="canShowConsoleWindow">
5200 <desc>
5201 Returns @c true if the VM console process can activate the
5202 console window and bring it to foreground on the desktop of
5203 the host PC.
5204 <note>
5205 This method will fail if a session for this machine is not
5206 currently open.
5207 </note>
5208
5209 <result name="VBOX_E_INVALID_VM_STATE">
5210 Machine session is not open.
5211 </result>
5212
5213 </desc>
5214 <param name="canShow" type="boolean" dir="return">
5215 <desc>
5216 @c true if the console window can be shown and @c
5217 false otherwise.
5218 </desc>
5219 </param>
5220 </method>
5221
5222 <method name="showConsoleWindow">
5223 <desc>
5224 Activates the console window and brings it to foreground on
5225 the desktop of the host PC. Many modern window managers on
5226 many platforms implement some sort of focus stealing
5227 prevention logic, so that it may be impossible to activate
5228 a window without the help of the currently active
5229 application. In this case, this method will return a non-zero
5230 identifier that represents the top-level window of the VM
5231 console process. The caller, if it represents a currently
5232 active process, is responsible to use this identifier (in a
5233 platform-dependent manner) to perform actual window
5234 activation.
5235 <note>
5236 This method will fail if a session for this machine is not
5237 currently open.
5238 </note>
5239
5240 <result name="VBOX_E_INVALID_VM_STATE">
5241 Machine session is not open.
5242 </result>
5243
5244 </desc>
5245 <param name="winId" type="unsigned long long" dir="return">
5246 <desc>
5247 Platform-dependent identifier of the top-level VM console
5248 window, or zero if this method has performed all actions
5249 necessary to implement the <i>show window</i> semantics for
5250 the given platform and/or VirtualBox front-end.
5251 </desc>
5252 </param>
5253 </method>
5254
5255 <method name="getGuestProperty">
5256 <desc>
5257 Reads an entry from the machine's guest property store.
5258
5259 <result name="VBOX_E_INVALID_VM_STATE">
5260 Machine session is not open.
5261 </result>
5262
5263 </desc>
5264 <param name="name" type="wstring" dir="in">
5265 <desc>
5266 The name of the property to read.
5267 </desc>
5268 </param>
5269 <param name="value" type="wstring" dir="out">
5270 <desc>
5271 The value of the property. If the property does not exist then this
5272 will be empty.
5273 </desc>
5274 </param>
5275 <param name="timestamp" type="unsigned long long" dir="out">
5276 <desc>
5277 The time at which the property was last modified, as seen by the
5278 server process.
5279 </desc>
5280 </param>
5281 <param name="flags" type="wstring" dir="out">
5282 <desc>
5283 Additional property parameters, passed as a comma-separated list of
5284 "name=value" type entries.
5285 </desc>
5286 </param>
5287 </method>
5288
5289 <method name="getGuestPropertyValue">
5290 <desc>
5291 Reads a value from the machine's guest property store.
5292
5293 <result name="VBOX_E_INVALID_VM_STATE">
5294 Machine session is not open.
5295 </result>
5296
5297 </desc>
5298 <param name="property" type="wstring" dir="in">
5299 <desc>
5300 The name of the property to read.
5301 </desc>
5302 </param>
5303 <param name="value" type="wstring" dir="return">
5304 <desc>
5305 The value of the property. If the property does not exist then this
5306 will be empty.
5307 </desc>
5308 </param>
5309 </method>
5310
5311 <method name="getGuestPropertyTimestamp">
5312 <desc>
5313 Reads a property timestamp from the machine's guest property store.
5314
5315 <result name="VBOX_E_INVALID_VM_STATE">
5316 Machine session is not open.
5317 </result>
5318
5319 </desc>
5320 <param name="property" type="wstring" dir="in">
5321 <desc>
5322 The name of the property to read.
5323 </desc>
5324 </param>
5325 <param name="value" type="unsigned long long" dir="return">
5326 <desc>
5327 The timestamp. If the property does not exist then this will be
5328 empty.
5329 </desc>
5330 </param>
5331 </method>
5332
5333 <method name="setGuestProperty">
5334 <desc>
5335 Sets, changes or deletes an entry in the machine's guest property
5336 store.
5337
5338 <result name="E_ACCESSDENIED">
5339 Property cannot be changed.
5340 </result>
5341 <result name="E_INVALIDARG">
5342 Invalid @a flags.
5343 </result>
5344 <result name="VBOX_E_INVALID_VM_STATE">
5345 Virtual machine is not mutable or session not open.
5346 </result>
5347 <result name="VBOX_E_INVALID_OBJECT_STATE">
5348 Cannot set transient property when machine not running.
5349 </result>
5350
5351 </desc>
5352 <param name="property" type="wstring" dir="in">
5353 <desc>
5354 The name of the property to set, change or delete.
5355 </desc>
5356 </param>
5357 <param name="value" type="wstring" dir="in">
5358 <desc>
5359 The new value of the property to set, change or delete. If the
5360 property does not yet exist and value is non-empty, it will be
5361 created. If the value is empty, the key will be deleted if it
5362 exists.
5363 </desc>
5364 </param>
5365 <param name="flags" type="wstring" dir="in">
5366 <desc>
5367 Additional property parameters, passed as a comma-separated list of
5368 "name=value" type entries.
5369 </desc>
5370 </param>
5371 </method>
5372
5373 <method name="setGuestPropertyValue">
5374 <desc>
5375 Sets, changes or deletes a value in the machine's guest property
5376 store. The flags field will be left unchanged or created empty for a
5377 new property.
5378
5379 <result name="E_ACCESSDENIED">
5380 Property cannot be changed.
5381 </result>
5382 <result name="VBOX_E_INVALID_VM_STATE">
5383 Virtual machine is not mutable or session not open.
5384 </result>
5385 <result name="VBOX_E_INVALID_OBJECT_STATE">
5386 Cannot set transient property when machine not running.
5387 </result>
5388 </desc>
5389
5390 <param name="property" type="wstring" dir="in">
5391 <desc>
5392 The name of the property to set, change or delete.
5393 </desc>
5394 </param>
5395 <param name="value" type="wstring" dir="in">
5396 <desc>
5397 The new value of the property to set, change or delete. If the
5398 property does not yet exist and value is non-empty, it will be
5399 created. If value is empty, the property will be deleted if it
5400 exists.
5401 </desc>
5402 </param>
5403 </method>
5404
5405 <method name="enumerateGuestProperties">
5406 <desc>
5407 Return a list of the guest properties matching a set of patterns along
5408 with their values, time stamps and flags.
5409 </desc>
5410 <param name="patterns" type="wstring" dir="in">
5411 <desc>
5412 The patterns to match the properties against, separated by '|'
5413 characters. If this is empty or NULL, all properties will match.
5414 </desc>
5415 </param>
5416 <param name="name" type="wstring" dir="out" safearray="yes">
5417 <desc>
5418 The names of the properties returned.
5419 </desc>
5420 </param>
5421 <param name="value" type="wstring" dir="out" safearray="yes">
5422 <desc>
5423 The values of the properties returned. The array entries match the
5424 corresponding entries in the @a name array.
5425 </desc>
5426 </param>
5427 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5428 <desc>
5429 The time stamps of the properties returned. The array entries match
5430 the corresponding entries in the @a name array.
5431 </desc>
5432 </param>
5433 <param name="flags" type="wstring" dir="out" safearray="yes">
5434 <desc>
5435 The flags of the properties returned. The array entries match the
5436 corresponding entries in the @a name array.
5437 </desc>
5438 </param>
5439 </method>
5440</interface>
5441
5442 <!--
5443 // IConsole
5444 /////////////////////////////////////////////////////////////////////////
5445 -->
5446
5447 <interface
5448 name="IConsoleCallback" extends="$unknown"
5449 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5450 wsmap="suppress"
5451 >
5452
5453 <method name="onMousePointerShapeChange">
5454 <desc>
5455 Notification when the guest mouse pointer shape has
5456 changed. The new shape data is given.
5457 </desc>
5458 <param name="visible" type="boolean" dir="in">
5459 <desc>
5460 Flag whether the pointer is visible.
5461 </desc>
5462 </param>
5463 <param name="alpha" type="boolean" dir="in">
5464 <desc>
5465 Flag whether the pointer has an alpha channel.
5466 </desc>
5467 </param>
5468 <param name="xHot" type="unsigned long" dir="in">
5469 <desc>
5470 The pointer hot spot x coordinate.
5471 </desc>
5472 </param>
5473 <param name="yHot" type="unsigned long" dir="in">
5474 <desc>
5475 The pointer hot spot y coordinate.
5476 </desc>
5477 </param>
5478 <param name="width" type="unsigned long" dir="in">
5479 <desc>
5480 Width of the pointer shape in pixels.
5481 </desc>
5482 </param>
5483 <param name="height" type="unsigned long" dir="in">
5484 <desc>
5485 Height of the pointer shape in pixels.
5486 </desc>
5487 </param>
5488 <param name="shape" type="octet" mod="ptr" dir="in">
5489 <desc>
5490 Address of the shape buffer.
5491
5492 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5493 followed by a 32-bpp XOR (color) mask.
5494
5495 For pointers without alpha channel the XOR mask pixels are 32
5496 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5497 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5498
5499 An AND mask is used for pointers with alpha channel, so if the
5500 callback does not support alpha, the pointer could be
5501 displayed as a normal color pointer.
5502
5503 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5504 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5505 height</tt>. The padding bits at the end of each scanline are
5506 undefined.
5507
5508 The XOR mask follows the AND mask on the next 4-byte aligned
5509 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5510 Bytes in the gap between the AND and the XOR mask are undefined.
5511 The XOR mask scanlines have no gap between them and the size of
5512 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5513
5514 <note>
5515 If @a shape is 0, only the pointer visibility is changed.
5516 </note>
5517 </desc>
5518 </param>
5519 </method>
5520
5521 <method name="onMouseCapabilityChange">
5522 <desc>
5523 Notification when the mouse capabilities reported by the
5524 guest have changed. The new capabilities are passed.
5525 </desc>
5526 <param name="supportsAbsolute" type="boolean" dir="in"/>
5527 <param name="needsHostCursor" type="boolean" dir="in"/>
5528 </method>
5529
5530 <method name="onKeyboardLedsChange">
5531 <desc>
5532 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5533 to alter the state of the keyboard LEDs.
5534 </desc>
5535 <param name="numLock" type="boolean" dir="in"/>
5536 <param name="capsLock" type="boolean" dir="in"/>
5537 <param name="scrollLock" type="boolean" dir="in"/>
5538 </method>
5539
5540 <method name="onStateChange">
5541 <desc>
5542 Notification when the execution state of the machine has changed.
5543 The new state will be given.
5544 </desc>
5545 <param name="state" type="MachineState" dir="in"/>
5546 </method>
5547
5548 <method name="onAdditionsStateChange">
5549 <desc>
5550 Notification when a Guest Additions property changes.
5551 Interested callees should query IGuest attributes to
5552 find out what has changed.
5553 </desc>
5554 </method>
5555
5556 <method name="onDVDDriveChange">
5557 <desc>
5558 Notification when a property of the
5559 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5560 Interested callees should use IDVDDrive methods to find out what has
5561 changed.
5562 </desc>
5563 </method>
5564
5565 <method name="onFloppyDriveChange">
5566 <desc>
5567 Notification when a property of the
5568 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5569 Interested callees should use IFloppyDrive methods to find out what
5570 has changed.
5571 </desc>
5572 </method>
5573
5574 <method name="onNetworkAdapterChange">
5575 <desc>
5576 Notification when a property of one of the
5577 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5578 changes. Interested callees should use INetworkAdapter methods and
5579 attributes to find out what has changed.
5580 </desc>
5581 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5582 <desc>Network adapter that is subject to change.</desc>
5583 </param>
5584 </method>
5585
5586 <method name="onSerialPortChange">
5587 <desc>
5588 Notification when a property of one of the
5589 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5590 Interested callees should use ISerialPort methods and attributes
5591 to find out what has changed.
5592 </desc>
5593 <param name="serialPort" type="ISerialPort" dir="in">
5594 <desc>Serial port that is subject to change.</desc>
5595 </param>
5596 </method>
5597
5598 <method name="onParallelPortChange">
5599 <desc>
5600 Notification when a property of one of the
5601 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5602 changes. Interested callees should use ISerialPort methods and
5603 attributes to find out what has changed.
5604 </desc>
5605 <param name="parallelPort" type="IParallelPort" dir="in">
5606 <desc>Parallel port that is subject to change.</desc>
5607 </param>
5608 </method>
5609
5610 <method name="onStorageControllerChange">
5611 <desc>
5612 Notification when a property of one of the
5613 virtual <link to="IMachine::storageControllers">storage controllers</link>
5614 changes. Interested callees should query the corresponding collections
5615 to find out what has changed.
5616 </desc>
5617 </method>
5618
5619 <method name="onVRDPServerChange">
5620 <desc>
5621 Notification when a property of the
5622 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5623 Interested callees should use IVRDPServer methods and attributes to
5624 find out what has changed.
5625 </desc>
5626 </method>
5627
5628 <method name="onUSBControllerChange">
5629 <desc>
5630 Notification when a property of the virtual
5631 <link to="IMachine::USBController">USB controller</link> changes.
5632 Interested callees should use IUSBController methods and attributes to
5633 find out what has changed.
5634 </desc>
5635 </method>
5636
5637 <method name="onUSBDeviceStateChange">
5638 <desc>
5639 Notification when a USB device is attached to or detached from
5640 the virtual USB controller.
5641
5642 This notification is sent as a result of the indirect
5643 request to attach the device because it matches one of the
5644 machine USB filters, or as a result of the direct request
5645 issued by <link to="IConsole::attachUSBDevice"/> or
5646 <link to="IConsole::detachUSBDevice"/>.
5647
5648 This notification is sent in case of both a succeeded and a
5649 failed request completion. When the request succeeds, the
5650 @a error parameter is @c null, and the given device has been
5651 already added to (when @a attached is @c true) or removed from
5652 (when @a attached is @c false) the collection represented by
5653 <link to="IConsole::USBDevices"/>. On failure, the collection
5654 doesn't change and the @a error parameter represents the error
5655 message describing the failure.
5656
5657 </desc>
5658 <param name="device" type="IUSBDevice" dir="in">
5659 <desc>Device that is subject to state change.</desc>
5660 </param>
5661 <param name="attached" type="boolean" dir="in">
5662 <desc>
5663 <tt>true</tt> if the device was attached
5664 and <tt>false</tt> otherwise.
5665 </desc>
5666 </param>
5667 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5668 <desc>
5669 <tt>null</tt> on success or an error message object on
5670 failure.
5671 </desc>
5672 </param>
5673 </method>
5674
5675 <method name="onSharedFolderChange">
5676 <desc>
5677 Notification when a shared folder is added or removed.
5678 The @a scope argument defines one of three scopes:
5679 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5680 (<link to="Scope_Global">Global</link>),
5681 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5682 the machine (<link to="Scope_Machine">Machine</link>) or <link
5683 to="IConsole::sharedFolders">transient shared folders</link> of the
5684 machine (<link to="Scope_Session">Session</link>). Interested callees
5685 should use query the corresponding collections to find out what has
5686 changed.
5687 </desc>
5688 <param name="scope" type="Scope" dir="in">
5689 <desc>Scope of the notification.</desc>
5690 </param>
5691 </method>
5692
5693 <method name="onRuntimeError">
5694 <desc>
5695 Notification when an error happens during the virtual
5696 machine execution.
5697
5698 There are three kinds of runtime errors:
5699 <ul>
5700 <li><i>fatal</i></li>
5701 <li><i>non-fatal with retry</i></li>
5702 <li><i>non-fatal warnings</i></li>
5703 </ul>
5704
5705 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5706 to <tt>true</tt>. In case of fatal errors, the virtual machine
5707 execution is always paused before calling this notification, and
5708 the notification handler is supposed either to immediately save
5709 the virtual machine state using <link to="IConsole::saveState"/>
5710 or power it off using <link to="IConsole::powerDown"/>.
5711 Resuming the execution can lead to unpredictable results.
5712
5713 <b>Non-fatal</b> errors and warnings are indicated by the
5714 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5715 is in the Paused state by the time the error notification is
5716 received, it means that the user can <i>try to resume</i> the machine
5717 execution after attempting to solve the problem that caused the
5718 error. In this case, the notification handler is supposed
5719 to show an appropriate message to the user (depending on the
5720 value of the @a id parameter) that offers several actions such
5721 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5722 wants to retry, the notification handler should continue
5723 the machine execution using the <link to="IConsole::resume"/>
5724 call. If the machine execution is not Paused during this
5725 notification, then it means this notification is a <i>warning</i>
5726 (for example, about a fatal condition that can happen very soon);
5727 no immediate action is required from the user, the machine
5728 continues its normal execution.
5729
5730 Note that in either case the notification handler
5731 <b>must not</b> perform any action directly on a thread
5732 where this notification is called. Everything it is allowed to
5733 do is to post a message to another thread that will then talk
5734 to the user and take the corresponding action.
5735
5736 Currently, the following error identifiers are known:
5737 <ul>
5738 <li><tt>"HostMemoryLow"</tt></li>
5739 <li><tt>"HostAudioNotResponding"</tt></li>
5740 <li><tt>"VDIStorageFull"</tt></li>
5741 </ul>
5742
5743 <note>
5744 This notification is not designed to be implemented by
5745 more than one callback at a time. If you have multiple
5746 IConsoleCallback instances registered on the given
5747 IConsole object, make sure you simply do nothing but
5748 return @c S_OK from all but one of them that does actual
5749 user notification and performs necessary actions.
5750 </note>
5751
5752 </desc>
5753 <param name="fatal" type="boolean" dir="in">
5754 <desc>Whether the error is fatal or not</desc>
5755 </param>
5756 <param name="id" type="wstring" dir="in">
5757 <desc>Error identifier</desc>
5758 </param>
5759 <param name="message" type="wstring" dir="in">
5760 <desc>Optional error message</desc>
5761 </param>
5762 </method>
5763
5764 <method name="onCanShowWindow">
5765 <desc>
5766 Notification when a call to
5767 <link to="IMachine::canShowConsoleWindow"/> is made by a
5768 front-end to check if a subsequent call to
5769 <link to="IMachine::showConsoleWindow"/> can succeed.
5770
5771 The callee should give an answer appropriate to the current
5772 machine state in the @a canShow argument. This answer must
5773 remain valid at least until the next
5774 <link to="IConsole::state">machine state</link> change.
5775
5776 <note>
5777 This notification is not designed to be implemented by
5778 more than one callback at a time. If you have multiple
5779 IConsoleCallback instances registered on the given
5780 IConsole object, make sure you simply do nothing but
5781 return @c true and @c S_OK from all but one of them that
5782 actually manages console window activation.
5783 </note>
5784 </desc>
5785 <param name="canShow" type="boolean" dir="return">
5786 <desc>
5787 @c true if the console window can be shown and @c
5788 false otherwise.
5789 </desc>
5790 </param>
5791 </method>
5792
5793 <method name="onShowWindow">
5794 <desc>
5795 Notification when a call to
5796 <link to="IMachine::showConsoleWindow"/>
5797 requests the console window to be activated and brought to
5798 foreground on the desktop of the host PC.
5799
5800 This notification should cause the VM console process to
5801 perform the requested action as described above. If it is
5802 impossible to do it at a time of this notification, this
5803 method should return a failure.
5804
5805 Note that many modern window managers on many platforms
5806 implement some sort of focus stealing prevention logic, so
5807 that it may be impossible to activate a window without the
5808 help of the currently active application (which is supposedly
5809 an initiator of this notification). In this case, this method
5810 must return a non-zero identifier that represents the
5811 top-level window of the VM console process. The caller, if it
5812 represents a currently active process, is responsible to use
5813 this identifier (in a platform-dependent manner) to perform
5814 actual window activation.
5815
5816 This method must set @a winId to zero if it has performed all
5817 actions necessary to complete the request and the console
5818 window is now active and in foreground, to indicate that no
5819 further action is required on the caller's side.
5820
5821 <note>
5822 This notification is not designed to be implemented by
5823 more than one callback at a time. If you have multiple
5824 IConsoleCallback instances registered on the given
5825 IConsole object, make sure you simply do nothing but
5826 return @c S_OK from all but one of them that actually
5827 manages console window activation.
5828 </note>
5829 </desc>
5830 <param name="winId" type="unsigned long long" dir="return">
5831 <desc>
5832 Platform-dependent identifier of the top-level VM console
5833 window, or zero if this method has performed all actions
5834 necessary to implement the <i>show window</i> semantics for
5835 the given platform and/or this VirtualBox front-end.
5836 </desc>
5837 </param>
5838 </method>
5839
5840 </interface>
5841
5842 <interface
5843 name="IRemoteDisplayInfo" extends="$unknown"
5844 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5845 wsmap="struct"
5846 >
5847 <desc>
5848 Contains information about the remote display (VRDP) capabilities and status.
5849 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5850 </desc>
5851
5852 <attribute name="active" type="boolean" readonly="yes">
5853 <desc>
5854 Whether the remote display connection is active.
5855 </desc>
5856 </attribute>
5857
5858 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5859 <desc>
5860 How many times a client connected.
5861 </desc>
5862 </attribute>
5863
5864 <attribute name="beginTime" type="long long" readonly="yes">
5865 <desc>
5866 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5867 </desc>
5868 </attribute>
5869
5870 <attribute name="endTime" type="long long" readonly="yes">
5871 <desc>
5872 When the last connection was terminated or the current time, if
5873 connection is still active, in milliseconds since 1970-01-01 UTC.
5874 </desc>
5875 </attribute>
5876
5877 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5878 <desc>
5879 How many bytes were sent in last or current, if still active, connection.
5880 </desc>
5881 </attribute>
5882
5883 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5884 <desc>
5885 How many bytes were sent in all connections.
5886 </desc>
5887 </attribute>
5888
5889 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5890 <desc>
5891 How many bytes were received in last or current, if still active, connection.
5892 </desc>
5893 </attribute>
5894
5895 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5896 <desc>
5897 How many bytes were received in all connections.
5898 </desc>
5899 </attribute>
5900
5901 <attribute name="user" type="wstring" readonly="yes">
5902 <desc>
5903 Login user name supplied by the client.
5904 </desc>
5905 </attribute>
5906
5907 <attribute name="domain" type="wstring" readonly="yes">
5908 <desc>
5909 Login domain name supplied by the client.
5910 </desc>
5911 </attribute>
5912
5913 <attribute name="clientName" type="wstring" readonly="yes">
5914 <desc>
5915 The client name supplied by the client.
5916 </desc>
5917 </attribute>
5918
5919 <attribute name="clientIP" type="wstring" readonly="yes">
5920 <desc>
5921 The IP address of the client.
5922 </desc>
5923 </attribute>
5924
5925 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5926 <desc>
5927 The client software version number.
5928 </desc>
5929 </attribute>
5930
5931 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5932 <desc>
5933 Public key exchange method used when connection was established.
5934 Values: 0 - RDP4 public key exchange scheme.
5935 1 - X509 certificates were sent to client.
5936 </desc>
5937 </attribute>
5938
5939 </interface>
5940
5941 <interface
5942 name="IConsole" extends="$unknown"
5943 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5944 wsmap="managed"
5945 >
5946 <desc>
5947 The IConsole interface represents an interface to control virtual
5948 machine execution.
5949
5950 The console object that implements the IConsole interface is obtained
5951 from a session object after the session for the given machine has been
5952 opened using one of <link to="IVirtualBox::openSession"/>,
5953 <link to="IVirtualBox::openRemoteSession"/> or
5954 <link to="IVirtualBox::openExistingSession"/> methods.
5955
5956 Methods of the IConsole interface allow the caller to query the current
5957 virtual machine execution state, pause the machine or power it down, save
5958 the machine state or take a snapshot, attach and detach removable media
5959 and so on.
5960
5961 <see>ISession</see>
5962 </desc>
5963
5964 <attribute name="machine" type="IMachine" readonly="yes">
5965 <desc>
5966 Machine object this console is sessioned with.
5967 <note>
5968 This is a convenience property, it has the same value as
5969 <link to="ISession::machine"/> of the corresponding session
5970 object.
5971 </note>
5972 </desc>
5973 </attribute>
5974
5975 <attribute name="state" type="MachineState" readonly="yes">
5976 <desc>
5977 Current execution state of the machine.
5978 <note>
5979 This property always returns the same value as the corresponding
5980 property of the IMachine object this console is sessioned with.
5981 For the process that owns (executes) the VM, this is the
5982 preferable way of querying the VM state, because no IPC
5983 calls are made.
5984 </note>
5985 </desc>
5986 </attribute>
5987
5988 <attribute name="guest" type="IGuest" readonly="yes">
5989 <desc>Guest object.</desc>
5990 </attribute>
5991
5992 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5993 <desc>
5994 Virtual keyboard object.
5995 <note>
5996 If the machine is not running, any attempt to use
5997 the returned object will result in an error.
5998 </note>
5999 </desc>
6000 </attribute>
6001
6002 <attribute name="mouse" type="IMouse" readonly="yes">
6003 <desc>
6004 Virtual mouse object.
6005 <note>
6006 If the machine is not running, any attempt to use
6007 the returned object will result in an error.
6008 </note>
6009 </desc>
6010 </attribute>
6011
6012 <attribute name="display" type="IDisplay" readonly="yes">
6013 <desc>Virtual display object.
6014 <note>
6015 If the machine is not running, any attempt to use
6016 the returned object will result in an error.
6017 </note>
6018 </desc>
6019 </attribute>
6020
6021 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6022 <desc>Debugging interface.</desc>
6023 </attribute>
6024
6025 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6026 <desc>
6027 Collection of USB devices currently attached to the virtual
6028 USB controller.
6029 <note>
6030 The collection is empty if the machine is not running.
6031 </note>
6032 </desc>
6033 </attribute>
6034
6035 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6036 <desc>
6037 List of USB devices currently attached to the remote VRDP client.
6038 Once a new device is physically attached to the remote host computer,
6039 it appears in this list and remains there until detached.
6040 </desc>
6041 </attribute>
6042
6043 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6044 <desc>
6045 Collection of shared folders for the current session. These folders
6046 are called transient shared folders because they are available to the
6047 guest OS running inside the associated virtual machine only for the
6048 duration of the session (as opposed to
6049 <link to="IMachine::sharedFolders"/> which represent permanent shared
6050 folders). When the session is closed (e.g. the machine is powered down),
6051 these folders are automatically discarded.
6052
6053 New shared folders are added to the collection using
6054 <link to="#createSharedFolder"/>. Existing shared folders can be
6055 removed using <link to="#removeSharedFolder"/>.
6056 </desc>
6057 </attribute>
6058
6059 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6060 <desc>
6061 Interface that provides information on Remote Display (VRDP) connection.
6062 </desc>
6063 </attribute>
6064
6065 <method name="powerUp">
6066 <desc>
6067 Starts the virtual machine execution using the current machine
6068 state (that is, its current execution state, current settings and
6069 current hard disks).
6070
6071 If the machine is powered off or aborted, the execution will
6072 start from the beginning (as if the real hardware were just
6073 powered on).
6074
6075 If the machine is in the <link to="MachineState_Saved"/> state,
6076 it will continue its execution the point where the state has
6077 been saved.
6078
6079 <note>
6080 Unless you are trying to write a new VirtualBox front-end that
6081 performs direct machine execution (like the VirtualBox or VBoxSDL
6082 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6083 session opened by <link to="IVirtualBox::openSession"/> and use this
6084 session only to change virtual machine settings. If you simply want to
6085 start virtual machine execution using one of the existing front-ends
6086 (for example the VirtualBox GUI or headless server), simply use
6087 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6088 power up the machine automatically for you.
6089 </note>
6090
6091 <see>#saveState</see>
6092 <result name="VBOX_E_INVALID_VM_STATE">
6093 Virtual machine already running.
6094 </result>
6095 <result name="VBOX_E_HOST_ERROR">
6096 Host interface does not exist or name not set.
6097 </result>
6098 <result name="VBOX_E_FILE_ERROR">
6099 Invalid saved state file.
6100 </result>
6101 </desc>
6102 <param name="progress" type="IProgress" dir="return">
6103 <desc>Progress object to track the operation completion.</desc>
6104 </param>
6105 </method>
6106
6107 <method name="powerUpPaused">
6108 <desc>
6109 Identical to powerUp except that the VM will enter the
6110 <link to="MachineState_Paused"/> state, instead of
6111 <link to="MachineState_Running"/>.
6112
6113 <see>#powerUp</see>
6114 <result name="VBOX_E_INVALID_VM_STATE">
6115 Virtual machine already running.
6116 </result>
6117 <result name="VBOX_E_HOST_ERROR">
6118 Host interface does not exist or name not set.
6119 </result>
6120 <result name="VBOX_E_FILE_ERROR">
6121 Invalid saved state file.
6122 </result>
6123 </desc>
6124 <param name="progress" type="IProgress" dir="return">
6125 <desc>Progress object to track the operation completion.</desc>
6126 </param>
6127 </method>
6128
6129 <method name="powerDown">
6130 <desc>
6131 Stops the virtual machine execution.
6132 After this operation completes, the machine will go to the
6133 PoweredOff state.
6134
6135 @deprecated This method will be removed in VirtualBox 2.1 where the
6136 powerDownAsync() method will take its name. Do not use this method in
6137 the code.
6138 <result name="VBOX_E_INVALID_VM_STATE">
6139 Virtual machine must be Running, Paused or Stuck to be powered down.
6140 </result>
6141 <result name="VBOX_E_VM_ERROR">
6142 Unable to power off or destroy virtual machine.
6143 </result>
6144 </desc>
6145 </method>
6146
6147 <method name="powerDownAsync">
6148 <desc>
6149 Initiates the power down procedure to stop the virtual machine
6150 execution.
6151
6152 The completion of the power down procedure is tracked using the returned
6153 IProgress object. After the operation is complete, the machine will go
6154 to the PoweredOff state.
6155
6156 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
6157 where the original powerDown() method will be removed. You will need to
6158 rename "powerDownAsync" to "powerDown" in your sources to make them
6159 build with version 2.1.
6160 <result name="VBOX_E_INVALID_VM_STATE">
6161 Virtual machine must be Running, Paused or Stuck to be powered down.
6162 </result>
6163 </desc>
6164 <param name="progress" type="IProgress" dir="return">
6165 <desc>Progress object to track the operation completion.</desc>
6166 </param>
6167 </method>
6168
6169 <method name="reset">
6170 <desc>Resets the virtual machine.
6171 <result name="VBOX_E_INVALID_VM_STATE">
6172 Virtual machine not in Running state.
6173 </result>
6174 <result name="VBOX_E_VM_ERROR">
6175 Virtual machine error in reset operation.
6176 </result>
6177 </desc>
6178 </method>
6179
6180 <method name="pause">
6181 <desc>Pauses the virtual machine execution.
6182 <result name="VBOX_E_INVALID_VM_STATE">
6183 Virtual machine not in Running state.
6184 </result>
6185 <result name="VBOX_E_VM_ERROR">
6186 Virtual machine error in suspend operation.
6187 </result>
6188 </desc>
6189 </method>
6190
6191 <method name="resume">
6192 <desc>Resumes the virtual machine execution.
6193 <result name="VBOX_E_INVALID_VM_STATE">
6194 Virtual machine not in Paused state.
6195 </result>
6196 <result name="VBOX_E_VM_ERROR">
6197 Virtual machine error in resume operation.
6198 </result>
6199 </desc>
6200 </method>
6201
6202 <method name="powerButton">
6203 <desc>Sends the ACPI power button event to the guest.
6204 <result name="VBOX_E_INVALID_VM_STATE">
6205 Virtual machine not in Running state.
6206 </result>
6207 <result name="VBOX_E_PDM_ERROR">
6208 Controlled power off failed.
6209 </result>
6210 </desc>
6211 </method>
6212
6213 <method name="sleepButton">
6214 <desc>Sends the ACPI sleep button event to the guest.
6215 <result name="VBOX_E_INVALID_VM_STATE">
6216 Virtual machine not in Running state.
6217 </result>
6218 <result name="VBOX_E_PDM_ERROR">
6219 Sending sleep button event failed.
6220 </result>
6221 </desc>
6222 </method>
6223
6224 <method name="getPowerButtonHandled">
6225 <desc>Checks if the last power button event was handled by guest.
6226 <result name="VBOX_E_PDM_ERROR">
6227 Checking if the event was handled by the guest OS failed.
6228 </result>
6229 </desc>
6230 <param name="handled" type="boolean" dir="return"/>
6231 </method>
6232
6233 <method name="getGuestEnteredACPIMode">
6234 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6235 G1 (sleeping). If this method returns false, the guest will
6236 most likely not respond to external ACPI events.
6237 <result name="VBOX_E_INVALID_VM_STATE">
6238 Virtual machine not in Running state.
6239 </result>
6240 </desc>
6241 <param name="entered" type="boolean" dir="return"/>
6242 </method>
6243
6244 <method name="saveState">
6245 <desc>
6246 Saves the current execution state of a running virtual machine
6247 and stops its execution.
6248
6249 After this operation completes, the machine will go to the
6250 Saved state. Next time it is powered up, this state will
6251 be restored and the machine will continue its execution from
6252 the place where it was saved.
6253
6254 This operation differs from taking a snapshot to the effect
6255 that it doesn't create new differencing hard disks. Also, once
6256 the machine is powered up from the state saved using this method,
6257 the saved state is deleted, so it will be impossible to return
6258 to this state later.
6259
6260 <note>
6261 On success, this method implicitly calls
6262 <link to="IMachine::saveSettings"/> to save all current machine
6263 settings (including runtime changes to the DVD drive, etc.).
6264 Together with the impossibility to change any VM settings when it is
6265 in the Saved state, this guarantees adequate hardware
6266 configuration of the machine when it is restored from the saved
6267 state file.
6268 </note>
6269
6270 <note>
6271 The machine must be in the Running or Paused state, otherwise
6272 the operation will fail.
6273 </note>
6274 <result name="VBOX_E_INVALID_VM_STATE">
6275 Virtual machine state neither Running nor Paused.
6276 </result>
6277 <result name="VBOX_E_FILE_ERROR">
6278 Failed to create directory for saved state file.
6279 </result>
6280
6281 <see><link to="#takeSnapshot"/></see>
6282 </desc>
6283 <param name="progress" type="IProgress" dir="return">
6284 <desc>Progress object to track the operation completion.</desc>
6285 </param>
6286 </method>
6287
6288 <method name="adoptSavedState">
6289 <desc>
6290 Associates the given saved state file to the virtual machine.
6291
6292 On success, the machine will go to the Saved state. Next time it is
6293 powered up, it will be restored from the adopted saved state and
6294 continue execution from the place where the saved state file was
6295 created.
6296
6297 The specified saved state file path may be absolute or relative to the
6298 folder the VM normally saves the state to (usually,
6299 <link to="IMachine::snapshotFolder"/>).
6300
6301 <note>
6302 It's a caller's responsibility to make sure the given saved state
6303 file is compatible with the settings of this virtual machine that
6304 represent its virtual hardware (memory size, hard disk configuration
6305 etc.). If there is a mismatch, the behavior of the virtual machine
6306 is undefined.
6307 </note>
6308 <result name="VBOX_E_INVALID_VM_STATE">
6309 Virtual machine state neither PoweredOff nor Aborted.
6310 </result>
6311 </desc>
6312 <param name="savedStateFile" type="wstring" dir="in">
6313 <desc>Path to the saved state file to adopt.</desc>
6314 </param>
6315 </method>
6316
6317 <method name="discardSavedState">
6318 <desc>
6319 Discards (deletes) the saved state of the virtual machine
6320 previously created by <link to="#saveState"/>. Next time the
6321 machine is powered up, a clean boot will occur.
6322 <note>
6323 This operation is equivalent to resetting or powering off
6324 the machine without doing a proper shutdown in the guest OS.
6325 </note>
6326 <result name="VBOX_E_INVALID_VM_STATE">
6327 Virtual machine not in state Saved.
6328 </result>
6329 </desc>
6330 </method>
6331
6332 <method name="getDeviceActivity">
6333 <desc>
6334 Gets the current activity type of a given device or device group.
6335 <result name="E_INVALIDARG">
6336 Invalid device type.
6337 </result>
6338 </desc>
6339 <param name="type" type="DeviceType" dir="in"/>
6340 <param name="activity" type="DeviceActivity" dir="return"/>
6341 </method>
6342
6343 <method name="attachUSBDevice">
6344 <desc>
6345 Attaches a host USB device with the given UUID to the
6346 USB controller of the virtual machine.
6347
6348 The device needs to be in one of the following states:
6349 <link to="USBDeviceState_Busy"/>,
6350 <link to="USBDeviceState_Available"/> or
6351 <link to="USBDeviceState_Held"/>,
6352 otherwise an error is immediately returned.
6353
6354 When the device state is
6355 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6356 be returned if the host computer refuses to release it for some reason.
6357
6358 <see>IUSBController::deviceFilters, USBDeviceState</see>
6359 <result name="VBOX_E_INVALID_VM_STATE">
6360 Virtual machine state neither Running nor Paused.
6361 </result>
6362 <result name="VBOX_E_PDM_ERROR">
6363 Virtual machine does not have a USB controller.
6364 </result>
6365 </desc>
6366 <param name="id" type="uuid" dir="in">
6367 <desc>UUID of the host USB device to attach.</desc>
6368 </param>
6369 </method>
6370
6371 <method name="detachUSBDevice">
6372 <desc>
6373 Detaches an USB device with the given UUID from the USB controller
6374 of the virtual machine.
6375
6376 After this method succeeds, the VirtualBox server re-initiates
6377 all USB filters as if the device were just physically attached
6378 to the host, but filters of this machine are ignored to avoid
6379 a possible automatic re-attachment.
6380
6381 <see>IUSBController::deviceFilters, USBDeviceState</see>
6382
6383 <result name="VBOX_E_PDM_ERROR">
6384 Virtual machine does not have a USB controller.
6385 </result>
6386 <result name="E_INVALIDARG">
6387 USB device not attached to this virtual machine.
6388 </result>
6389 </desc>
6390 <param name="id" type="uuid" dir="in">
6391 <desc>UUID of the USB device to detach.</desc>
6392 </param>
6393 <param name="device" type="IUSBDevice" dir="return">
6394 <desc>Detached USB device.</desc>
6395 </param>
6396 </method>
6397
6398 <method name="findUSBDeviceByAddress">
6399 <desc>
6400 Searches for a USB device with the given host address.
6401
6402 <result name="VBOX_E_OBJECT_NOT_FOUND">
6403 Given @c name does not correspond to any USB device.
6404 </result>
6405
6406 <see>IUSBDevice::address</see>
6407 </desc>
6408 <param name="name" type="wstring" dir="in">
6409 <desc>
6410 Address of the USB device (as assigned by the host) to
6411 search for.
6412 </desc>
6413 </param>
6414 <param name="device" type="IUSBDevice" dir="return">
6415 <desc>Found USB device object.</desc>
6416 </param>
6417 </method>
6418
6419 <method name="findUSBDeviceById">
6420 <desc>
6421 Searches for a USB device with the given UUID.
6422
6423 <result name="VBOX_E_OBJECT_NOT_FOUND">
6424 Given @c id does not correspond to any USB device.
6425 </result>
6426
6427 <see>IUSBDevice::id</see>
6428 </desc>
6429 <param name="id" type="uuid" dir="in">
6430 <desc>UUID of the USB device to search for.</desc>
6431 </param>
6432 <param name="device" type="IUSBDevice" dir="return">
6433 <desc>Found USB device object.</desc>
6434 </param>
6435 </method>
6436
6437 <method name="createSharedFolder">
6438 <desc>
6439 Creates a transient new shared folder by associating the given logical
6440 name with the given host path, adds it to the collection of shared
6441 folders and starts sharing it. Refer to the description of
6442 <link to="ISharedFolder"/> to read more about logical names.
6443
6444 <result name="VBOX_E_INVALID_VM_STATE">
6445 Virtual machine in Saved state or currently changing state.
6446 </result>
6447 <result name="VBOX_E_FILE_ERROR">
6448 Shared folder already exists or not accessible.
6449 </result>
6450 </desc>
6451 <param name="name" type="wstring" dir="in">
6452 <desc>Unique logical name of the shared folder.</desc>
6453 </param>
6454 <param name="hostPath" type="wstring" dir="in">
6455 <desc>Full path to the shared folder in the host file system.</desc>
6456 </param>
6457 <param name="writable" type="boolean" dir="in">
6458 <desc>Whether the share is writable or readonly</desc>
6459 </param>
6460 </method>
6461
6462 <method name="removeSharedFolder">
6463 <desc>
6464 Removes a transient shared folder with the given name previously
6465 created by <link to="#createSharedFolder"/> from the collection of
6466 shared folders and stops sharing it.
6467 <result name="VBOX_E_INVALID_VM_STATE">
6468 Virtual machine in Saved state or currently changing state.
6469 </result>
6470 <result name="VBOX_E_FILE_ERROR">
6471 Shared folder does not exists.
6472 </result>
6473 </desc>
6474 <param name="name" type="wstring" dir="in">
6475 <desc>Logical name of the shared folder to remove.</desc>
6476 </param>
6477 </method>
6478
6479 <method name="takeSnapshot">
6480 <desc>
6481 Saves the current execution state and all settings of the
6482 machine and creates differencing images for all
6483 normal (non-independent) hard disks.
6484
6485 This method can be called for a PoweredOff, Saved, Running or
6486 Paused virtual machine. When the machine is PoweredOff, an
6487 offline <link to="ISnapshot">snapshot</link> is created,
6488 in all other cases -- an online snapshot.
6489
6490 The taken snapshot is always based on the
6491 <link to="IMachine::currentSnapshot">current
6492 snapshot</link> of the associated virtual machine and becomes
6493 a new current snapshot.
6494
6495 <note>
6496 This method implicitly calls <link to="IMachine::saveSettings"/> to
6497 save all current machine settings before taking an offline snapshot.
6498 </note>
6499
6500 <see>ISnapshot, <link to="#saveState"/></see>
6501 <result name="VBOX_E_INVALID_VM_STATE">
6502 Virtual machine currently changing state.
6503 </result>
6504 </desc>
6505 <param name="name" type="wstring" dir="in">
6506 <desc>Short name for the snapshot.</desc>
6507 </param>
6508 <param name="description" type="wstring" dir="in">
6509 <desc>Optional description of the snapshot.</desc>
6510 </param>
6511 <param name="progress" type="IProgress" dir="return">
6512 <desc>Progress object to track the operation completion.</desc>
6513 </param>
6514 </method>
6515
6516 <method name="discardSnapshot">
6517 <desc>
6518
6519 Starts discarding the specified snapshot. The execution state
6520 and settings of the associated machine stored in the snapshot
6521 will be deleted. The contents of all differencing hard disks of
6522 this snapshot will be merged with the contents of their
6523 dependent child hard disks to keep the, disks valid (in other
6524 words, all changes represented by hard disks being discarded
6525 will be propagated to their child hard disks). After that, this
6526 snapshot's differencing hard disks will be deleted. The parent
6527 of this snapshot will become a new parent for all its child
6528 snapshots.
6529
6530 If the discarded snapshot is the current one, its parent
6531 snapshot will become a new current snapshot. The current machine
6532 state is not directly affected in this case, except that
6533 currently attached differencing hard disks based on hard disks
6534 of the discarded snapshot will be also merged as described
6535 above.
6536
6537 If the discarded snapshot is the first one (the root snapshot)
6538 and it has exactly one child snapshot, this child snapshot will
6539 become the first snapshot after discarding. If there are no
6540 children at all (i.e. the first snapshot is the only snapshot of
6541 the machine), both the current and the first snapshot of the
6542 machine will be set to null. In all other cases, the first
6543 snapshot cannot be discarded.
6544
6545 You cannot discard the snapshot if it
6546 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6547 hard disks that have differencing hard disks based on them. Snapshots of
6548 such kind can be discarded only when every normal hard disk has either
6549 no children at all or exactly one child. In the former case, the normal
6550 hard disk simply becomes unused (i.e. not attached to any VM). In the
6551 latter case, it receives all the changes stored in the child hard disk,
6552 and then it replaces the child hard disk in the configuration of the
6553 corresponding snapshot or machine.
6554
6555 Also, you cannot discard the snapshot if it stores hard disks
6556 (of any type) having differencing child hard disks that belong
6557 to other machines. Such snapshots can be only discarded after
6558 you discard all snapshots of other machines containing "foreign"
6559 child disks, or detach these "foreign" child disks from machines
6560 they are attached to.
6561
6562 One particular example of the snapshot storing normal hard disks
6563 is the first snapshot of a virtual machine that had normal hard
6564 disks attached when taking the snapshot. Be careful when
6565 discarding such snapshots because this implicitly commits
6566 changes (made since the snapshot being discarded has been taken)
6567 to normal hard disks (as described above), which may be not what
6568 you want.
6569
6570 The virtual machine is put to
6571 the <link to="MachineState_Discarding">Discarding</link> state until
6572 the discard operation is completed.
6573
6574 <note>
6575 The machine must not be running, otherwise the operation
6576 will fail.
6577 </note>
6578
6579 <note>
6580 Child hard disks of all normal hard disks of the discarded snapshot
6581 must be accessible (see <link to="IMedium::state"/>) for this
6582 operation to succeed. In particular, this means that all virtual
6583 machines, whose hard disks are directly or indirectly based on the
6584 hard disks of discarded snapshot, must be powered off.
6585 </note>
6586 <note>
6587 Merging hard disk contents can be very time and disk space
6588 consuming, if these disks are big in size and have many
6589 children. However, if the snapshot being discarded is the last
6590 (head) snapshot on the branch, the operation will be rather
6591 quick.
6592 </note>
6593 <note>
6594 Note that discarding the current snapshot
6595 will implicitly call <link to="IMachine::saveSettings"/> to
6596 make all current machine settings permanent.
6597 </note>
6598 <result name="VBOX_E_INVALID_VM_STATE">
6599 Virtual machine is running.
6600 </result>
6601 </desc>
6602 <param name="id" type="uuid" dir="in">
6603 <desc>UUID of the snapshot to discard.</desc>
6604 </param>
6605 <param name="progress" type="IProgress" dir="return">
6606 <desc>Progress object to track the operation completion.</desc>
6607 </param>
6608 </method>
6609
6610 <method name="discardCurrentState">
6611 <desc>
6612 This operation is similar to <link to="IConsole::discardSnapshot"/> but
6613 affects the current machine state. This means that the state stored in
6614 the current snapshot will become a new current state, and all current
6615 settings of the machine and changes stored in differencing hard disks
6616 will be lost.
6617
6618 After this operation is successfully completed, new empty differencing
6619 hard disks are created for all normal hard disks of the machine.
6620
6621 If the current snapshot of the machine is an online snapshot, the
6622 machine will go to the <link to="MachineState_Saved"> saved
6623 state</link>, so that the next time it is powered on, the execution
6624 state will be restored from the current snapshot.
6625
6626 <note>
6627 The machine must not be running, otherwise the operation will fail.
6628 </note>
6629
6630 <note>
6631 If the machine state is <link to="MachineState_Saved">Saved</link>
6632 prior to this operation, the saved state file will be implicitly
6633 discarded (as if <link to="IConsole::discardSavedState"/> were
6634 called).
6635 </note>
6636
6637 <result name="VBOX_E_INVALID_VM_STATE">
6638 Virtual machine is running.
6639 </result>
6640 </desc>
6641 <param name="progress" type="IProgress" dir="return">
6642 <desc>Progress object to track the operation completion.</desc>
6643 </param>
6644 </method>
6645
6646 <method name="discardCurrentSnapshotAndState">
6647 <desc>
6648
6649 This method is equivalent to
6650 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6651 (currentSnapshot.id(), progress) followed by
6652 <link to="IConsole::discardCurrentState"/>.
6653
6654 As a result, the machine will be fully restored from the
6655 snapshot preceding the current snapshot, while both the current
6656 snapshot and the current machine state will be discarded.
6657
6658 If the current snapshot is the first snapshot of the machine (i.e. it
6659 has the only snapshot), the current machine state will be
6660 discarded <b>before</b> discarding the snapshot. In other words, the
6661 machine will be restored from its last snapshot, before discarding
6662 it. This differs from performing a single
6663 <link to="IConsole::discardSnapshot"/> call (note that no
6664 <link to="IConsole::discardCurrentState"/> will be possible after it)
6665 to the effect that the latter will preserve the current state instead of
6666 discarding it.
6667
6668 Unless explicitly mentioned otherwise, all remarks and
6669 limitations of the above two methods also apply to this method.
6670
6671 <note>
6672 The machine must not be running, otherwise the operation
6673 will fail.
6674 </note>
6675
6676 <note>
6677 If the machine state is <link to="MachineState_Saved">Saved</link>
6678 prior to this operation, the saved state file will be implicitly
6679 discarded (as if <link to="#discardSavedState"/> were
6680 called).
6681 </note>
6682
6683 <note>
6684 This method is more efficient than calling both of the above
6685 methods separately: it requires less IPC calls and provides
6686 a single progress object.
6687 </note>
6688
6689 <result name="VBOX_E_INVALID_VM_STATE">
6690 Virtual machine is running.
6691 </result>
6692 </desc>
6693 <param name="progress" type="IProgress" dir="return">
6694 <desc>Progress object to track the operation completion.</desc>
6695 </param>
6696 </method>
6697
6698 <method name="registerCallback">
6699 <desc>
6700 Registers a new console callback on this instance. The methods of the
6701 callback interface will be called by this instance when the appropriate
6702 event occurs.
6703 </desc>
6704 <param name="callback" type="IConsoleCallback" dir="in"/>
6705 </method>
6706
6707 <method name="unregisterCallback">
6708 <desc>
6709 Unregisters the console callback previously registered using
6710 <link to="#registerCallback"/>.
6711 <result name="E_INVALIDARG">
6712 Given @a callback handler is not registered.
6713 </result>
6714 </desc>
6715 <param name="callback" type="IConsoleCallback" dir="in"/>
6716 </method>
6717 </interface>
6718
6719 <!--
6720 // IHost
6721 /////////////////////////////////////////////////////////////////////////
6722 -->
6723
6724 <interface
6725 name="IHostDVDDrive" extends="$unknown"
6726 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6727 wsmap="managed"
6728 >
6729 <desc>
6730 The IHostDVDDrive interface represents the physical CD/DVD drive
6731 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6732 </desc>
6733
6734 <attribute name="name" type="wstring" readonly="yes">
6735 <desc>
6736 Returns the platform-specific device identifier.
6737 On DOS-like platforms, it is a drive name (e.g. R:).
6738 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6739 </desc>
6740 </attribute>
6741 <attribute name="description" type="wstring" readonly="yes">
6742 <desc>
6743 Returns a human readable description for the drive. This
6744 description usually contains the product and vendor name. A
6745 @c null string is returned if the description is not available.
6746 </desc>
6747 </attribute>
6748 <attribute name="udi" type="wstring" readonly="yes">
6749 <desc>
6750 Returns the unique device identifier for the drive. This
6751 attribute is reserved for future use instead of
6752 <link to="#name"/>. Currently it is not used and may return
6753 @c null on some platforms.
6754 </desc>
6755 </attribute>
6756
6757 </interface>
6758
6759 <interface
6760 name="IHostFloppyDrive" extends="$unknown"
6761 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6762 wsmap="managed"
6763 >
6764 <desc>
6765 The IHostFloppyDrive interface represents the physical floppy drive
6766 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6767 </desc>
6768 <attribute name="name" type="wstring" readonly="yes">
6769 <desc>
6770 Returns the platform-specific device identifier.
6771 On DOS-like platforms, it is a drive name (e.g. A:).
6772 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6773 </desc>
6774 </attribute>
6775 <attribute name="description" type="wstring" readonly="yes">
6776 <desc>
6777 Returns a human readable description for the drive. This
6778 description usually contains the product and vendor name. A
6779 @c null string is returned if the description is not available.
6780 </desc>
6781 </attribute>
6782 <attribute name="udi" type="wstring" readonly="yes">
6783 <desc>
6784 Returns the unique device identifier for the drive. This
6785 attribute is reserved for future use instead of
6786 <link to="#name"/>. Currently it is not used and may return
6787 @c null on some platforms.
6788 </desc>
6789 </attribute>
6790 </interface>
6791
6792 <enum
6793 name="HostNetworkInterfaceMediumType"
6794 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6795 >
6796 <desc>
6797 Type of encapsulation. Ethernet encapsulation includes both wired and
6798 wireless Ethernet connections.
6799 <see>IHostNetworkInterface</see>
6800 </desc>
6801
6802 <const name="Unknown" value="0">
6803 <desc>
6804 The type of interface cannot be determined.
6805 </desc>
6806 </const>
6807 <const name="Ethernet" value="1">
6808 <desc>
6809 Ethernet frame encapsulation.
6810 </desc>
6811 </const>
6812 <const name="PPP" value="2">
6813 <desc>
6814 Point-to-point protocol encapsulation.
6815 </desc>
6816 </const>
6817 <const name="SLIP" value="3">
6818 <desc>
6819 Serial line IP encapsulation.
6820 </desc>
6821 </const>
6822 </enum>
6823
6824 <enum
6825 name="HostNetworkInterfaceStatus"
6826 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6827 >
6828 <desc>
6829 Current status of the interface.
6830 <see>IHostNetworkInterface</see>
6831 </desc>
6832
6833 <const name="Unknown" value="0">
6834 <desc>
6835 The state of interface cannot be determined.
6836 </desc>
6837 </const>
6838 <const name="Up" value="1">
6839 <desc>
6840 The interface is fully operational.
6841 </desc>
6842 </const>
6843 <const name="Down" value="2">
6844 <desc>
6845 The interface is not functioning.
6846 </desc>
6847 </const>
6848 </enum>
6849
6850 <enum
6851 name="HostNetworkInterfaceType"
6852 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6853 >
6854 <desc>
6855 Network interface type.
6856 </desc>
6857 <const name="Bridged" value="1"/>
6858 <const name="HostOnly" value="2"/>
6859 </enum>
6860
6861 <interface
6862 name="IHostNetworkInterface" extends="$unknown"
6863 uuid="88adaf3f-166b-4542-9457-0f1323507fae"
6864 wsmap="managed"
6865 >
6866 <desc>
6867 Reprents one of host's network interfaces. IP V6 address and network
6868 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6869 separated by colons.
6870 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6871 </desc>
6872 <attribute name="name" type="wstring" readonly="yes">
6873 <desc>Returns the host network interface name.</desc>
6874 </attribute>
6875
6876 <attribute name="id" type="uuid" readonly="yes">
6877 <desc>Returns the interface UUID.</desc>
6878 </attribute>
6879
6880 <attribute name="networkName" type="wstring" readonly="yes">
6881 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6882 </attribute>
6883
6884 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6885 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6886 </attribute>
6887
6888 <attribute name="IPAddress" type="wstring" readonly="yes">
6889 <desc>Returns the IP V4 address of the interface.</desc>
6890 </attribute>
6891
6892 <attribute name="networkMask" type="wstring" readonly="yes">
6893 <desc>Returns the network mask of the interface.</desc>
6894 </attribute>
6895
6896 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6897 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6898 </attribute>
6899
6900 <attribute name="IPV6Address" type="wstring" readonly="yes">
6901 <desc>Returns the IP V6 address of the interface.</desc>
6902 </attribute>
6903
6904 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6905 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6906 </attribute>
6907
6908 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6909 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6910 </attribute>
6911
6912 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6913 <desc>Type of protocol encapsulation used.</desc>
6914 </attribute>
6915
6916 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6917 <desc>Status of the interface.</desc>
6918 </attribute>
6919
6920 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6921 <desc>specifies the host interface type.</desc>
6922 </attribute>
6923
6924 <method name="enableStaticIpConfig">
6925 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6926 <param name="IPAddress" type="wstring" dir="in">
6927 <desc>
6928 IP address.
6929 </desc>
6930 </param>
6931 <param name="networkMask" type="wstring" dir="in">
6932 <desc>
6933 network mask.
6934 </desc>
6935 </param>
6936 </method>
6937
6938 <method name="enableStaticIpConfigV6">
6939 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6940 <param name="IPV6Address" type="wstring" dir="in">
6941 <desc>
6942 IP address.
6943 </desc>
6944 </param>
6945 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6946 <desc>
6947 network mask.
6948 </desc>
6949 </param>
6950 </method>
6951
6952 <method name="enableDynamicIpConfig">
6953 <desc>enables the dynamic IP configuration.</desc>
6954 </method>
6955
6956 <method name="dhcpRediscover">
6957 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6958 </method>
6959
6960 </interface>
6961
6962 <interface
6963 name="IHost" extends="$unknown"
6964 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6965 wsmap="managed"
6966 >
6967 <desc>
6968 The IHost interface represents the physical machine that this VirtualBox
6969 installation runs on.
6970
6971 An object implementing this interface is returned by the
6972 <link to="IVirtualBox::host" /> attribute. This interface contains
6973 read-only information about the host's physical hardware (such as what
6974 processors and disks are available, what the host operating system is,
6975 and so on) and also allows for manipulating some of the host's hardware,
6976 such as global USB device filters and host interface networking.
6977
6978 </desc>
6979 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6980 <desc>List of DVD drives available on the host.</desc>
6981 </attribute>
6982
6983 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6984 <desc>List of floppy drives available on the host.</desc>
6985 </attribute>
6986
6987 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6988 <desc>
6989 List of USB devices currently attached to the host.
6990 Once a new device is physically attached to the host computer,
6991 it appears in this list and remains there until detached.
6992
6993 <note>
6994 If USB functionality is not available in the given edition of
6995 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6996 </note>
6997 </desc>
6998 </attribute>
6999
7000 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7001 <desc>
7002 List of USB device filters in action.
7003 When a new device is physically attached to the host computer,
7004 filters from this list are applied to it (in order they are stored
7005 in the list). The first matched filter will determine the
7006 <link to="IHostUSBDeviceFilter::action">action</link>
7007 performed on the device.
7008
7009 Unless the device is ignored by these filters, filters of all
7010 currently running virtual machines
7011 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7012
7013 <note>
7014 If USB functionality is not available in the given edition of
7015 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7016 </note>
7017
7018 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7019 </desc>
7020 </attribute>
7021
7022 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7023 <desc>List of host network interfaces currently defined on the host.</desc>
7024 </attribute>
7025
7026 <attribute name="processorCount" type="unsigned long" readonly="yes">
7027 <desc>Number of (logical) CPUs installed in the host system.</desc>
7028 </attribute>
7029
7030 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7031 <desc>Number of (logical) CPUs online in the host system.</desc>
7032 </attribute>
7033
7034 <method name="getProcessorSpeed">
7035 <desc>Query the (approximate) maximum speed of a specified host CPU in
7036 Megahertz.
7037 </desc>
7038 <param name="cpuId" type="unsigned long" dir="in">
7039 <desc>
7040 Identifier of the CPU.
7041 </desc>
7042 </param>
7043 <param name="speed" type="unsigned long" dir="return">
7044 <desc>
7045 Speed value. 0 is returned if value is not known or @a cpuId is
7046 invalid.
7047 </desc>
7048 </param>
7049 </method>
7050
7051 <method name="getProcessorFeature">
7052 <desc>Query whether a CPU feature is supported or not.</desc>
7053 <param name="feature" type="ProcessorFeature" dir="in">
7054 <desc>
7055 CPU Feature identifier.
7056 </desc>
7057 </param>
7058 <param name="supported" type="boolean" dir="return">
7059 <desc>
7060 Feature is supported or not.
7061 </desc>
7062 </param>
7063 </method>
7064
7065 <method name="getProcessorDescription">
7066 <desc>Query the model string of a specified host CPU.
7067 <note>
7068 This function is not implemented in the current version of the
7069 product.
7070 </note>
7071 </desc>
7072 <param name="cpuId" type="unsigned long" dir="in">
7073 <desc>
7074 Identifier of the CPU.
7075 </desc>
7076 </param>
7077 <param name="description" type="wstring" dir="return">
7078 <desc>
7079 Model string. A NULL string is returned if value is not known or
7080 @a cpuId is invalid.
7081 </desc>
7082 </param>
7083 </method>
7084
7085 <attribute name="memorySize" type="unsigned long" readonly="yes">
7086 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7087 </attribute>
7088
7089 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7090 <desc>Available system memory in the host system.</desc>
7091 </attribute>
7092
7093 <attribute name="operatingSystem" type="wstring" readonly="yes">
7094 <desc>Name of the host system's operating system.</desc>
7095 </attribute>
7096
7097 <attribute name="OSVersion" type="wstring" readonly="yes">
7098 <desc>Host operating system's version string.</desc>
7099 </attribute>
7100
7101 <attribute name="UTCTime" type="long long" readonly="yes">
7102 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7103 </attribute>
7104
7105<if target="midl">
7106 <method name="createHostOnlyNetworkInterface">
7107 <desc>
7108 Creates a new adapter for Host Only Networking.
7109 <result name="E_INVALIDARG">
7110 Host network interface @a name already exists.
7111 </result>
7112 </desc>
7113 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7114 <desc>
7115 Created host interface object.
7116 </desc>
7117 </param>
7118 <param name="progress" type="IProgress" dir="return">
7119 <desc>
7120 Progress object to track the operation completion.
7121 </desc>
7122 </param>
7123 </method>
7124 <method name="removeHostOnlyNetworkInterface">
7125 <desc>
7126 Removes the given Host Only Networking interface.
7127 <result name="VBOX_E_OBJECT_NOT_FOUND">
7128 No host network interface matching @a id found.
7129 </result>
7130 </desc>
7131 <param name="id" type="uuid" dir="in">
7132 <desc>
7133 Adapter GUID.
7134 </desc>
7135 </param>
7136 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7137 <desc>
7138 Removed host interface object.
7139 </desc>
7140 </param>
7141 <param name="progress" type="IProgress" dir="return">
7142 <desc>
7143 Progress object to track the operation completion.
7144 </desc>
7145 </param>
7146 </method>
7147</if>
7148
7149 <method name="createUSBDeviceFilter">
7150 <desc>
7151 Creates a new USB device filter. All attributes except
7152 the filter name are set to <tt>null</tt> (any match),
7153 <i>active</i> is <tt>false</tt> (the filter is not active).
7154
7155 The created filter can be added to the list of filters using
7156 <link to="#insertUSBDeviceFilter"/>.
7157
7158 <see>#USBDeviceFilters</see>
7159 </desc>
7160 <param name="name" type="wstring" dir="in">
7161 <desc>
7162 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7163 for more info.
7164 </desc>
7165 </param>
7166 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7167 <desc>Created filter object.</desc>
7168 </param>
7169 </method>
7170
7171 <method name="insertUSBDeviceFilter">
7172 <desc>
7173 Inserts the given USB device to the specified position
7174 in the list of filters.
7175
7176 Positions are numbered starting from <tt>0</tt>. If the specified
7177 position is equal to or greater than the number of elements in
7178 the list, the filter is added at the end of the collection.
7179
7180 <note>
7181 Duplicates are not allowed, so an attempt to insert a
7182 filter already in the list is an error.
7183 </note>
7184 <note>
7185 If USB functionality is not available in the given edition of
7186 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7187 </note>
7188
7189 <see>#USBDeviceFilters</see>
7190
7191 <result name="VBOX_E_INVALID_OBJECT_STATE">
7192 USB device filter is not created within this VirtualBox instance.
7193 </result>
7194 <result name="E_INVALIDARG">
7195 USB device filter already in list.
7196 </result>
7197
7198 </desc>
7199 <param name="position" type="unsigned long" dir="in">
7200 <desc>Position to insert the filter to.</desc>
7201 </param>
7202 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7203 <desc>USB device filter to insert.</desc>
7204 </param>
7205 </method>
7206
7207 <method name="removeUSBDeviceFilter">
7208 <desc>
7209 Removes a USB device filter from the specified position in the
7210 list of filters.
7211
7212 Positions are numbered starting from <tt>0</tt>. Specifying a
7213 position equal to or greater than the number of elements in
7214 the list will produce an error.
7215
7216 <note>
7217 If USB functionality is not available in the given edition of
7218 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7219 </note>
7220
7221 <see>#USBDeviceFilters</see>
7222
7223 <result name="E_INVALIDARG">
7224 USB device filter list empty or invalid @a position.
7225 </result>
7226
7227 </desc>
7228 <param name="position" type="unsigned long" dir="in">
7229 <desc>Position to remove the filter from.</desc>
7230 </param>
7231 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7232 <desc>Removed USB device filter.</desc>
7233 </param>
7234 </method>
7235
7236 <method name="findHostDVDDrive">
7237 <desc>
7238 Searches for a host DVD drive with the given @c name.
7239
7240 <result name="VBOX_E_OBJECT_NOT_FOUND">
7241 Given @c name does not correspond to any host drive.
7242 </result>
7243
7244 </desc>
7245 <param name="name" type="wstring" dir="in">
7246 <desc>Name of the host drive to search for</desc>
7247 </param>
7248 <param name="drive" type="IHostDVDDrive" dir="return">
7249 <desc>Found host drive object</desc>
7250 </param>
7251 </method>
7252
7253 <method name="findHostFloppyDrive">
7254 <desc>
7255 Searches for a host floppy drive with the given @c name.
7256
7257 <result name="VBOX_E_OBJECT_NOT_FOUND">
7258 Given @c name does not correspond to any host floppy drive.
7259 </result>
7260
7261 </desc>
7262 <param name="name" type="wstring" dir="in">
7263 <desc>Name of the host floppy drive to search for</desc>
7264 </param>
7265 <param name="drive" type="IHostFloppyDrive" dir="return">
7266 <desc>Found host floppy drive object</desc>
7267 </param>
7268 </method>
7269
7270 <method name="findHostNetworkInterfaceByName">
7271 <desc>
7272 Searches through all host network interfaces for an interface with
7273 the given @c name.
7274 <note>
7275 The method returns an error if the given @c name does not
7276 correspond to any host network interface.
7277 </note>
7278 </desc>
7279 <param name="name" type="wstring" dir="in">
7280 <desc>Name of the host network interface to search for.</desc>
7281 </param>
7282 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7283 <desc>Found host network interface object.</desc>
7284 </param>
7285 </method>
7286 <method name="findHostNetworkInterfaceById">
7287 <desc>
7288 Searches through all host network interfaces for an interface with
7289 the given GUID.
7290 <note>
7291 The method returns an error if the given GUID does not
7292 correspond to any host network interface.
7293 </note>
7294 </desc>
7295 <param name="id" type="uuid" dir="in">
7296 <desc>GUID of the host network interface to search for.</desc>
7297 </param>
7298 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7299 <desc>Found host network interface object.</desc>
7300 </param>
7301 </method>
7302 <method name="findHostNetworkInterfacesOfType">
7303 <desc>
7304 Searches through all host network interfaces and returns a list of interfaces of the specified type
7305 </desc>
7306 <param name="type" type="HostNetworkInterfaceType" dir="in">
7307 <desc>type of the host network interfaces to search for.</desc>
7308 </param>
7309 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7310 <desc>Found host network interface objects.</desc>
7311 </param>
7312 </method>
7313
7314 <method name="findUSBDeviceById">
7315 <desc>
7316 Searches for a USB device with the given UUID.
7317
7318 <result name="VBOX_E_OBJECT_NOT_FOUND">
7319 Given @c id does not correspond to any USB device.
7320 </result>
7321
7322 <see>IHostUSBDevice::id</see>
7323 </desc>
7324 <param name="id" type="uuid" dir="in">
7325 <desc>UUID of the USB device to search for.</desc>
7326 </param>
7327 <param name="device" type="IHostUSBDevice" dir="return">
7328 <desc>Found USB device object.</desc>
7329 </param>
7330 </method>
7331
7332 <method name="findUSBDeviceByAddress">
7333 <desc>
7334 Searches for a USB device with the given host address.
7335
7336 <result name="VBOX_E_OBJECT_NOT_FOUND">
7337 Given @c name does not correspond to any USB device.
7338 </result>
7339
7340 <see>IHostUSBDevice::address</see>
7341 </desc>
7342 <param name="name" type="wstring" dir="in">
7343 <desc>
7344 Address of the USB device (as assigned by the host) to
7345 search for.
7346 </desc>
7347 </param>
7348 <param name="device" type="IHostUSBDevice" dir="return">
7349 <desc>Found USB device object.</desc>
7350 </param>
7351 </method>
7352
7353 </interface>
7354
7355 <!--
7356 // ISystemProperties
7357 /////////////////////////////////////////////////////////////////////////
7358 -->
7359
7360 <interface
7361 name="ISystemProperties"
7362 extends="$unknown"
7363 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7364 wsmap="managed"
7365 >
7366 <desc>
7367 The ISystemProperties interface represents global properties of the given
7368 VirtualBox installation.
7369
7370 These properties define limits and default values for various attributes
7371 and parameters. Most of the properties are read-only, but some can be
7372 changed by a user.
7373 </desc>
7374
7375 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7376 <desc>Minimum guest system memory in Megabytes.</desc>
7377 </attribute>
7378
7379 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7380 <desc>Maximum guest system memory in Megabytes.</desc>
7381 </attribute>
7382
7383 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7384 <desc>Minimum guest video memory in Megabytes.</desc>
7385 </attribute>
7386
7387 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7388 <desc>Maximum guest video memory in Megabytes.</desc>
7389 </attribute>
7390
7391 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7392 <desc>Minimum CPU count.</desc>
7393 </attribute>
7394
7395 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7396 <desc>Maximum CPU count.</desc>
7397 </attribute>
7398
7399 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7400 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7401 </attribute>
7402
7403 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7404 <desc>
7405 Number of network adapters associated with every
7406 <link to="IMachine"/> instance.
7407 </desc>
7408 </attribute>
7409
7410 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7411 <desc>
7412 Number of serial ports associated with every
7413 <link to="IMachine"/> instance.
7414 </desc>
7415 </attribute>
7416
7417 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7418 <desc>
7419 Number of parallel ports associated with every
7420 <link to="IMachine"/> instance.
7421 </desc>
7422 </attribute>
7423
7424 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7425 <desc>
7426 Maximum device position in the boot order. This value corresponds
7427 to the total number of devices a machine can boot from, to make it
7428 possible to include all possible devices to the boot list.
7429 <see><link to="IMachine::setBootOrder"/></see>
7430 </desc>
7431 </attribute>
7432
7433 <attribute name="defaultMachineFolder" type="wstring">
7434 <desc>
7435 Full path to the default directory used to create new or open
7436 existing machines when a settings file name contains no
7437 path.
7438
7439 The initial value of this property is
7440 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7441 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7442
7443 <note>
7444 Setting this property to <tt>null</tt> will restore the
7445 initial value.
7446 </note>
7447 <note>
7448 When settings this property, the specified path can be
7449 absolute (full path) or relative
7450 to the <link to="IVirtualBox::homeFolder">
7451 VirtualBox home directory</link>.
7452 When reading this property, a full path is
7453 always returned.
7454 </note>
7455 <note>
7456 The specified path may not exist, it will be created
7457 when necessary.
7458 </note>
7459
7460 <see>
7461 <link to="IVirtualBox::createMachine"/>,
7462 <link to="IVirtualBox::openMachine"/>
7463 </see>
7464 </desc>
7465 </attribute>
7466
7467 <attribute name="defaultHardDiskFolder" type="wstring">
7468 <desc>
7469 Full path to the default directory used to create new or open existing
7470 virtual disks.
7471
7472 This path is used when the storage unit of a hard disk is a regular file
7473 in the host's file system and only a file name that contains no path is
7474 given.
7475
7476 The initial value of this property is
7477 <tt>&lt;</tt>
7478 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7479 <tt>&gt;/HardDisks</tt>.
7480
7481 <note>
7482 Setting this property to <tt>null</tt> will restore the
7483 initial value.
7484 </note>
7485 <note>
7486 When settings this property, the specified path can be relative
7487 to the
7488 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7489 absolute. When reading this property, a full path is
7490 always returned.
7491 </note>
7492 <note>
7493 The specified path may not exist, it will be created
7494 when necessary.
7495 </note>
7496
7497 <see>
7498 IHardDisk,
7499 <link to="IVirtualBox::createHardDisk"/>,
7500 <link to="IVirtualBox::openHardDisk"/>,
7501 <link to="IMedium::location"/>
7502 </see>
7503 </desc>
7504 </attribute>
7505
7506 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7507 <desc>
7508 List of all hard disk storage formats supported by this VirtualBox
7509 installation.
7510
7511 Keep in mind that the hard disk format identifier
7512 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7513 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7514 hard disk format is a case-insensitive string. This means that, for
7515 example, all of the following strings:
7516 <pre>
7517 "VDI"
7518 "vdi"
7519 "VdI"</pre>
7520 refer to the same hard disk format.
7521
7522 Note that the virtual hard disk framework is backend-based, therefore
7523 the list of supported formats depends on what backends are currently
7524 installed.
7525
7526 <see>
7527 <link to="IHardDiskFormat"/>,
7528 </see>
7529 </desc>
7530 </attribute>
7531
7532 <attribute name="defaultHardDiskFormat" type="wstring">
7533 <desc>
7534 Identifier of the default hard disk format used by VirtualBox.
7535
7536 The hard disk format set by this attribute is used by VirtualBox
7537 when the hard disk format was not specified explicitly. One example is
7538 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7539 format argument. A more complex example is implicit creation of
7540 differencing hard disks when taking a snapshot of a virtual machine:
7541 this operation will try to use a format of the parent hard disk first
7542 and if this format does not support differencing hard disks the default
7543 format specified by this argument will be used.
7544
7545 The list of supported hard disk formats may be obtained by the
7546 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7547 format must have a capability to create differencing hard disks;
7548 otherwise opeartions that create hard disks implicitly may fail
7549 unexpectedly.
7550
7551 The initial value of this property is <tt>VDI</tt> in the current
7552 version of the VirtualBox product, but may change in the future.
7553
7554 <note>
7555 Setting this property to <tt>null</tt> will restore the
7556 initial value.
7557 </note>
7558
7559 <see>
7560 <link to="#hardDiskFormats"/>,
7561 <link to="IHardDiskFormat::id"/>,
7562 <link to="IVirtualBox::createHardDisk"/>
7563 </see>
7564 </desc>
7565 </attribute>
7566
7567 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7568 <desc>
7569 Library that provides authentication for VRDP clients. The library
7570 is used if a virtual machine's authentication type is set to "external"
7571 in the VM RemoteDisplay configuration.
7572
7573 The system library extension (".DLL" or ".so") must be omitted.
7574 A full path can be specified; if not, then the library must reside on the
7575 system's default library path.
7576
7577 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7578 of that name in one of the default VirtualBox library directories.
7579
7580 For details about VirtualBox authentication libraries and how to implement
7581 them, please refer to the VirtualBox manual.
7582
7583 <note>
7584 Setting this property to <tt>null</tt> will restore the
7585 initial value.
7586 </note>
7587 </desc>
7588 </attribute>
7589
7590 <attribute name="webServiceAuthLibrary" type="wstring">
7591 <desc>
7592 Library that provides authentication for webservice clients. The library
7593 is used if a virtual machine's authentication type is set to "external"
7594 in the VM RemoteDisplay configuration and will be called from
7595 within the <link to="IWebsessionManager::logon" /> implementation.
7596
7597 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7598 there is no per-VM setting for this, as the webservice is a global
7599 resource (if it is running). Only for this setting (for the webservice),
7600 setting this value to a literal "null" string disables authentication,
7601 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7602 no matter what user name and password are supplied.
7603
7604 The initial value of this property is <tt>VRDPAuth</tt>,
7605 meaning that the webservice will use the same authentication
7606 library that is used by default for VBoxVRDP (again, see
7607 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7608 The format and calling convention of authentication libraries
7609 is the same for the webservice as it is for VBoxVRDP.
7610
7611 </desc>
7612 </attribute>
7613
7614 <attribute name="HWVirtExEnabled" type="boolean">
7615 <desc>
7616 This specifies the default value for hardware virtualization
7617 extensions. If enabled, virtual machines will make use of
7618 hardware virtualization extensions such as Intel VT-x and
7619 AMD-V by default. This value can be overridden by each VM
7620 using their <link to="IMachine::HWVirtExEnabled" /> property.
7621 </desc>
7622 </attribute>
7623
7624 <attribute name="LogHistoryCount" type="unsigned long">
7625 <desc>
7626 This value specifies how many old release log files are kept.
7627 </desc>
7628 </attribute>
7629 </interface>
7630
7631 <!--
7632 // IGuest
7633 /////////////////////////////////////////////////////////////////////////
7634 -->
7635
7636 <interface
7637 name="IGuestOSType" extends="$unknown"
7638 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7639 wsmap="struct"
7640 >
7641 <desc>
7642 </desc>
7643
7644 <attribute name="familyId" type="wstring" readonly="yes">
7645 <desc>Guest OS family identifier string.</desc>
7646 </attribute>
7647
7648 <attribute name="familyDescription" type="wstring" readonly="yes">
7649 <desc>Human readable description of the guest OS family.</desc>
7650 </attribute>
7651
7652 <attribute name="id" type="wstring" readonly="yes">
7653 <desc>Guest OS identifier string.</desc>
7654 </attribute>
7655
7656 <attribute name="description" type="wstring" readonly="yes">
7657 <desc>Human readable description of the guest OS.</desc>
7658 </attribute>
7659
7660 <attribute name="is64Bit" type="boolean" readonly="yes">
7661 <desc>Returns @c true if the given OS is 64-bit</desc>
7662 </attribute>
7663
7664 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7665 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7666 </attribute>
7667
7668 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7669 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7670 </attribute>
7671
7672 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7673 <desc>Recommended RAM size in Megabytes.</desc>
7674 </attribute>
7675
7676 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7677 <desc>Recommended video RAM size in Megabytes.</desc>
7678 </attribute>
7679
7680 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7681 <desc>Recommended hard disk size in Megabytes.</desc>
7682 </attribute>
7683
7684 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7685 <desc>Returns recommended network adapter for this OS type.</desc>
7686 </attribute>
7687 </interface>
7688
7689 <interface
7690 name="IGuest" extends="$unknown"
7691 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7692
7693 wsmap="suppress"
7694 >
7695 <desc>
7696 The IGuest interface represents information about the operating system
7697 running inside the virtual machine. Used in
7698 <link to="IConsole::guest"/>.
7699
7700 IGuest provides information about the guest operating system, whether
7701 Guest Additions are installed and other OS-specific virtual machine
7702 properties.
7703 </desc>
7704
7705 <attribute name="OSTypeId" type="wstring" readonly="yes">
7706 <desc>
7707 Identifier of the Guest OS type as reported by the Guest
7708 Additions.
7709 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7710 an IGuestOSType object representing details about the given
7711 Guest OS type.
7712 <note>
7713 If Guest Additions are not installed, this value will be
7714 the same as <link to="IMachine::OSTypeId"/>.
7715 </note>
7716 </desc>
7717 </attribute>
7718
7719 <attribute name="additionsActive" type="boolean" readonly="yes">
7720 <desc>
7721 Flag whether the Guest Additions are installed and active
7722 in which case their version will be returned by the
7723 <link to="#additionsVersion"/> property.
7724 </desc>
7725 </attribute>
7726
7727 <attribute name="additionsVersion" type="wstring" readonly="yes">
7728 <desc>
7729 Version of the Guest Additions (3 decimal numbers separated
7730 by dots) or empty when the Additions are not installed. The
7731 Additions may also report a version but yet not be active as
7732 the version might be refused by VirtualBox (incompatible) or
7733 other failures occurred.
7734 </desc>
7735 </attribute>
7736
7737 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7738 <desc>
7739 Flag whether seamless guest display rendering (seamless desktop
7740 integration) is supported.
7741 </desc>
7742 </attribute>
7743
7744 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7745 <desc>
7746 Flag whether the guest is in graphics mode. If it is not, then
7747 seamless rendering will not work, resize hints are not immediately
7748 acted on and guest display resizes are probably not initiated by
7749 the guest additions.
7750 </desc>
7751 </attribute>
7752
7753 <attribute name="memoryBalloonSize" type="unsigned long">
7754 <desc>Guest system memory balloon size in megabytes.</desc>
7755 </attribute>
7756
7757 <attribute name="statisticsUpdateInterval" type="unsigned long">
7758 <desc>Interval to update guest statistics in seconds.</desc>
7759 </attribute>
7760
7761 <method name="setCredentials">
7762 <desc>
7763 Store login credentials that can be queried by guest operating
7764 systems with Additions installed. The credentials are transient
7765 to the session and the guest may also choose to erase them. Note
7766 that the caller cannot determine whether the guest operating system
7767 has queried or made use of the credentials.
7768
7769 <result name="VBOX_E_VM_ERROR">
7770 VMM device is not available.
7771 </result>
7772
7773 </desc>
7774 <param name="userName" type="wstring" dir="in">
7775 <desc>User name string, can be empty</desc>
7776 </param>
7777 <param name="password" type="wstring" dir="in">
7778 <desc>Password string, can be empty</desc>
7779 </param>
7780 <param name="domain" type="wstring" dir="in">
7781 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7782 </param>
7783 <param name="allowInteractiveLogon" type="boolean" dir="in">
7784 <desc>
7785 Flag whether the guest should alternatively allow the user to
7786 interactively specify different credentials. This flag might
7787 not be supported by all versions of the Additions.
7788 </desc>
7789 </param>
7790 </method>
7791
7792 <method name="getStatistic">
7793 <desc>
7794 Query specified guest statistics as reported by the VirtualBox Additions.
7795 </desc>
7796 <param name="cpuId" type="unsigned long" dir="in">
7797 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7798 </param>
7799 <param name="statistic" type="GuestStatisticType" dir="in">
7800 <desc>Statistic type.</desc>
7801 </param>
7802 <param name="statVal" type="unsigned long" dir="out">
7803 <desc>Statistics value</desc>
7804 </param>
7805 </method>
7806
7807 </interface>
7808
7809
7810 <!--
7811 // IProgress
7812 /////////////////////////////////////////////////////////////////////////
7813 -->
7814
7815 <interface
7816 name="IProgress" extends="$unknown"
7817 uuid="c4f94e6b-2273-446b-9539-4c05bb416fe7"
7818 wsmap="managed"
7819 >
7820 <desc>
7821 The IProgress interface is used to track and control
7822 asynchronous tasks within VirtualBox.
7823
7824 An instance of this is returned every time VirtualBox starts
7825 an asynchronous task (in other words, a separate thread) which
7826 continues to run after a method call returns. For example,
7827 <link to="IConsole::saveState" />, which saves the state of
7828 a running virtual machine, can take a long time to complete.
7829 To be able to display a progress bar, a user interface such as
7830 the VirtualBox graphical user interface can use the IProgress
7831 object returned by that method.
7832
7833 Note that IProgress is a "read-only" interface in the sense
7834 that only the VirtualBox internals behind the Main API can
7835 create and manipulate progress objects, whereas client code
7836 can only use the IProgress object to monitor a task's
7837 progress and, if <link to="#cancelable" /> is true,
7838 cancel the task by calling <link to="#cancel" />.
7839
7840 A task represented by IProgress consists of either one or
7841 several sub-operations that run sequentially, one by one (see
7842 <link to="#operation" /> and <link to="#operationCount" />).
7843 Every operation is identified by a number (starting from 0)
7844 and has a separate description.
7845
7846 You can find the individual percentage of completion of the current
7847 operation in <link to="#operationPercent" /> and the
7848 percentage of completion of the task as a whole
7849 in <link to="#percent" />.
7850
7851 Similarly, you can wait for the completion of a particular
7852 operation via <link to="#waitForOperationCompletion" /> or
7853 for the completion of the whole task via
7854 <link to="#waitForCompletion" />.
7855 </desc>
7856
7857 <attribute name="id" type="uuid" readonly="yes">
7858 <desc>ID of the task.</desc>
7859 </attribute>
7860
7861 <attribute name="description" type="wstring" readonly="yes">
7862 <desc>Description of the task.</desc>
7863 </attribute>
7864
7865 <attribute name="initiator" type="$unknown" readonly="yes">
7866 <desc>Initiator of the task.</desc>
7867 </attribute>
7868
7869 <attribute name="cancelable" type="boolean" readonly="yes">
7870 <desc>Whether the task can be interrupted.</desc>
7871 </attribute>
7872
7873 <attribute name="percent" type="unsigned long" readonly="yes">
7874 <desc>
7875 Current progress value of the task as a whole, in percent.
7876 This value depends on how many operations are already complete.
7877 Returns 100 if <link to="#completed" /> is true.
7878 </desc>
7879 </attribute>
7880
7881 <attribute name="timeRemaining" type="long" readonly="yes">
7882 <desc>
7883 Estimated remaining time until the task completes, in
7884 seconds. Returns 0 once the task has completed; returns -1
7885 if the remaining time cannot be computed, in particular if
7886 the current progress is 0.
7887
7888 Even if a value is returned, the estimate will be unreliable
7889 for low progress values. It will become more reliable as the
7890 task progresses; it is not recommended to display an ETA
7891 before at least 20% of a task have completed.
7892 </desc>
7893 </attribute>
7894
7895 <attribute name="completed" type="boolean" readonly="yes">
7896 <desc>Whether the task has been completed.</desc>
7897 </attribute>
7898
7899 <attribute name="canceled" type="boolean" readonly="yes">
7900 <desc>Whether the task has been canceled.</desc>
7901 </attribute>
7902
7903 <attribute name="resultCode" type="result" readonly="yes">
7904 <desc>
7905 Result code of the progress task.
7906 Valid only if <link to="#completed"/> is true.
7907 </desc>
7908 </attribute>
7909
7910 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7911 <desc>
7912 Extended information about the unsuccessful result of the
7913 progress operation. May be NULL if no extended information
7914 is available.
7915 Valid only if <link to="#completed"/> is true and
7916 <link to="#resultCode"/> indicates a failure.
7917 </desc>
7918 </attribute>
7919
7920 <attribute name="operationCount" type="unsigned long" readonly="yes">
7921 <desc>
7922 Number of sub-operations this task is divided into.
7923 Every task consists of at least one suboperation.
7924 </desc>
7925 </attribute>
7926
7927 <attribute name="operation" type="unsigned long" readonly="yes">
7928 <desc>Number of the sub-operation being currently executed.</desc>
7929 </attribute>
7930
7931 <attribute name="operationDescription" type="wstring" readonly="yes">
7932 <desc>
7933 Description of the sub-operation being currently executed.
7934 </desc>
7935 </attribute>
7936
7937 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7938 <desc>Progress value of the current sub-operation only, in percent.</desc>
7939 </attribute>
7940
7941 <method name="waitForCompletion">
7942 <desc>
7943 Waits until the task is done (including all sub-operations)
7944 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7945
7946 <result name="VBOX_E_IPRT_ERROR">
7947 Failed to wait for task completion.
7948 </result>
7949 </desc>
7950
7951 <param name="timeout" type="long" dir="in">
7952 <desc>
7953 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7954 </desc>
7955 </param>
7956 </method>
7957
7958 <method name="waitForOperationCompletion">
7959 <desc>
7960 Waits until the given operation is done with a given timeout in
7961 milliseconds; specify -1 for an indefinite wait.
7962
7963 <result name="VBOX_E_IPRT_ERROR">
7964 Failed to wait for operation completion.
7965 </result>
7966
7967 </desc>
7968 <param name="operation" type="unsigned long" dir="in">
7969 <desc>
7970 Number of the operation to wait for.
7971 Must be less than <link to="#operationCount"/>.
7972 </desc>
7973 </param>
7974 <param name="timeout" type="long" dir="in">
7975 <desc>
7976 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7977 </desc>
7978 </param>
7979 </method>
7980
7981 <method name="cancel">
7982 <desc>
7983 Cancels the task.
7984 <note>
7985 If <link to="#cancelable"/> is <tt>false</tt>, then
7986 this method will fail.
7987 </note>
7988
7989 <result name="VBOX_E_INVALID_OBJECT_STATE">
7990 Operation cannot be canceled.
7991 </result>
7992
7993 </desc>
7994 </method>
7995
7996 </interface>
7997
7998
7999 <!--
8000 // ISnapshot
8001 /////////////////////////////////////////////////////////////////////////
8002 -->
8003
8004 <interface
8005 name="ISnapshot" extends="$unknown"
8006 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
8007 wsmap="managed"
8008 >
8009 <desc>
8010 The ISnapshot interface represents a snapshot of the virtual
8011 machine.
8012
8013 The <i>snapshot</i> stores all the information about a virtual
8014 machine necessary to bring it to exactly the same state as it was at
8015 the time of taking the snapshot. The snapshot includes:
8016
8017 <ul>
8018 <li>all settings of the virtual machine (i.e. its hardware
8019 configuration: RAM size, attached hard disks, etc.)
8020 </li>
8021 <li>the execution state of the virtual machine (memory contents,
8022 CPU state, etc.).
8023 </li>
8024 </ul>
8025
8026 Snapshots can be <i>offline</i> (taken when the VM is powered off)
8027 or <i>online</i> (taken when the VM is running). The execution
8028 state of the offline snapshot is called a <i>zero execution state</i>
8029 (it doesn't actually contain any information about memory contents
8030 or the CPU state, assuming that all hardware is just powered off).
8031
8032 <h3>Snapshot branches</h3>
8033
8034 Snapshots can be chained. Chained snapshots form a branch where
8035 every next snapshot is based on the previous one. This chaining is
8036 mostly related to hard disk branching (see <link to="IHardDisk"/>
8037 description). This means that every time a new snapshot is created,
8038 a new differencing hard disk is implicitly created for all normal
8039 hard disks attached to the given virtual machine. This allows to
8040 fully restore hard disk contents when the machine is later reverted
8041 to a particular snapshot.
8042
8043 In the current implementation, multiple snapshot branches within one
8044 virtual machine are not allowed. Every machine has a single branch,
8045 and <link to="IConsole::takeSnapshot"/> operation adds a new
8046 snapshot to the top of that branch.
8047
8048 Existing snapshots can be discarded using
8049 <link to="IConsole::discardSnapshot"/>.
8050
8051 <h3>Current snapshot</h3>
8052
8053 Every virtual machine has a current snapshot, identified by
8054 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
8055 a base for the <i>current machine state</i> (see below), to the effect
8056 that all normal hard disks of the machine and its execution
8057 state are based on this snapshot.
8058
8059 In the current implementation, the current snapshot is always the
8060 last taken snapshot (i.e. the head snapshot on the branch) and it
8061 cannot be changed.
8062
8063 The current snapshot is <tt>null</tt> if the machine doesn't have
8064 snapshots at all; in this case the current machine state is just
8065 current settings of this machine plus its current execution state.
8066
8067 <h3>Current machine state</h3>
8068
8069 The current machine state is what represented by IMachine instances got
8070 directly from IVirtualBox
8071 using <link
8072 to="IVirtualBox::getMachine">getMachine()</link>, <link
8073 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
8074 to instances returned by <link to="ISnapshot::machine"/>). This state
8075 is always used when the machine is <link to="IConsole::powerUp"> powered
8076 on</link>.
8077
8078 The current machine state also includes the current execution state.
8079 If the machine is being currently executed
8080 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
8081 and above), its execution state is just what's happening now.
8082 If it is powered off (<link to="MachineState_PoweredOff"/> or
8083 <link to="MachineState_Aborted"/>), it has a zero execution state.
8084 If the machine is saved (<link to="MachineState_Saved"/>), its
8085 execution state is what saved in the execution state file
8086 (<link to="IMachine::stateFilePath"/>).
8087
8088 If the machine is in the saved state, then, next time it is powered
8089 on, its execution state will be fully restored from the saved state
8090 file and the execution will continue from the point where the state
8091 was saved.
8092
8093 Similarly to snapshots, the current machine state can be discarded
8094 using <link to="IConsole::discardCurrentState"/>.
8095
8096 <h3>Taking and discarding snapshots</h3>
8097
8098 The table below briefly explains the meaning of every snapshot
8099 operation:
8100
8101 <table>
8102 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
8103
8104 <tr><td><link to="IConsole::takeSnapshot"/></td>
8105
8106 <td>Save the current state of the virtual machine, including all
8107 settings, contents of normal hard disks and the current modifications
8108 to immutable hard disks (for online snapshots)</td>
8109
8110 <td>The current state is not changed (the machine will continue
8111 execution if it is being executed when the snapshot is
8112 taken)</td></tr>
8113
8114 <tr><td><link to="IConsole::discardSnapshot"/></td>
8115
8116 <td>Forget the state of the virtual machine stored in the snapshot:
8117 dismiss all saved settings and delete the saved execution state (for
8118 online snapshots)</td>
8119
8120 <td>Other snapshots (including child snapshots, if any) and the
8121 current state are not directly affected</td></tr>
8122
8123 <tr><td><link to="IConsole::discardCurrentState"/></td>
8124
8125 <td>Restore the current state of the virtual machine from the state
8126 stored in the current snapshot, including all settings and hard disk
8127 contents</td>
8128
8129 <td>The current state of the machine existed prior to this operation
8130 is lost</td></tr>
8131
8132 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
8133
8134 <td>Completely revert the virtual machine to the state it was in
8135 before the current snapshot has been taken</td>
8136
8137 <td>The current state, as well as the current snapshot, are
8138 lost</td></tr>
8139
8140 </table>
8141
8142 </desc>
8143
8144 <attribute name="id" type="uuid" readonly="yes">
8145 <desc>UUID of the snapshot.</desc>
8146 </attribute>
8147
8148 <attribute name="name" type="wstring">
8149 <desc>Short name of the snapshot.</desc>
8150 </attribute>
8151
8152 <attribute name="description" type="wstring">
8153 <desc>Optional description of the snapshot.</desc>
8154 </attribute>
8155
8156 <attribute name="timeStamp" type="long long" readonly="yes">
8157 <desc>
8158 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8159 </desc>
8160 </attribute>
8161
8162 <attribute name="online" type="boolean" readonly="yes">
8163 <desc>
8164 <tt>true</tt> if this snapshot is an online snapshot and
8165 <tt>false</tt> otherwise.
8166
8167 <note>
8168 When this attribute is <tt>true</tt>, the
8169 <link to="IMachine::stateFilePath"/> attribute of the
8170 <link to="#machine"/> object associated with this snapshot
8171 will point to the saved state file. Otherwise, it will be
8172 <tt>null</tt>.
8173 </note>
8174 </desc>
8175 </attribute>
8176
8177 <attribute name="machine" type="IMachine" readonly="yes">
8178 <desc>
8179 Virtual machine this snapshot is taken on. This object
8180 stores all settings the machine had when taking this snapshot.
8181 <note>
8182 The returned machine object is immutable, i.e. no
8183 any settings can be changed.
8184 </note>
8185 </desc>
8186 </attribute>
8187
8188 <attribute name="parent" type="ISnapshot" readonly="yes">
8189 <desc>
8190 Parent snapshot (a snapshot this one is based on).
8191 <note>
8192 It's not an error to read this attribute on a snapshot
8193 that doesn't have a parent -- a null object will be
8194 returned to indicate this.
8195 </note>
8196 </desc>
8197 </attribute>
8198
8199 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8200 <desc>
8201 Child snapshots (all snapshots having this one as a parent).
8202 <note>
8203 In the current implementation, there can be only one
8204 child snapshot, or no children at all, meaning this is the
8205 last (head) snapshot.
8206 </note>
8207 </desc>
8208 </attribute>
8209
8210 </interface>
8211
8212
8213 <!--
8214 // IMedia
8215 /////////////////////////////////////////////////////////////////////////
8216 -->
8217
8218 <enum
8219 name="MediaState"
8220 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8221 >
8222 <desc>
8223 Virtual media state.
8224 <see>IMedia</see>
8225 </desc>
8226
8227 <const name="NotCreated" value="0">
8228 <desc>
8229 Associated media storage does not exist (either was not created yet or
8230 was deleted).
8231 </desc>
8232 </const>
8233 <const name="Created" value="1">
8234 <desc>
8235 Associated storage exists and accessible.
8236 </desc>
8237 </const>
8238 <const name="LockedRead" value="2">
8239 <desc>
8240 Media is locked for reading, no data modification is possible.
8241 </desc>
8242 </const>
8243 <const name="LockedWrite" value="3">
8244 <desc>
8245 Media is locked for writing, no concurrent data reading or modification
8246 is possible.
8247 </desc>
8248 </const>
8249 <const name="Inaccessible" value="4">
8250 <desc>
8251 Associated media storage is not accessible.
8252 </desc>
8253 </const>
8254 <const name="Creating" value="5">
8255 <desc>
8256 Associated media storage is being created.
8257 </desc>
8258 </const>
8259 <const name="Deleting" value="6">
8260 <desc>
8261 Associated media storage is being deleted.
8262 </desc>
8263 </const>
8264 </enum>
8265
8266 <interface
8267 name="IMedium" extends="$unknown"
8268 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
8269 wsmap="managed"
8270 >
8271 <desc>
8272 The IMedium interface is a common interface for all objects representing
8273 virtual media such as hard disks, CD/DVD images and floppy images.
8274
8275 Each medium is associated with a storage unit (such as a file on the host
8276 computer or a network resource) that holds actual data. The location of
8277 the storage unit is represented by the #location attribute. The value of
8278 this attribute is media type dependent.
8279
8280 The exact media type may be determined by querying the appropriate
8281 interface such as:
8282 <ul>
8283 <li>IHardDisk (virtual hard disks)</li>
8284 <li>IDVDImage (standard CD/DVD ISO image files)</li>
8285 <li>IFloppyImage (raw floppy image files)</li>
8286 </ul>
8287
8288 Existing media are opened using the following methods, depending on the
8289 media type:
8290 <ul>
8291 <li><link to="IVirtualBox::openHardDisk"/></li>
8292 <li><link to="IVirtualBox::openDVDImage"/></li>
8293 <li><link to="IVirtualBox::openFloppyImage"/></li>
8294 </ul>
8295
8296 New hard disk media are created using the
8297 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8298 images are created outside VirtualBox, usually by storing a copy
8299 of the real medium of the corresponding type in a regular file.
8300
8301 <h3>Known Media</h3>
8302
8303 When an existing medium gets opened for the first time, it gets
8304 automatically remembered by the given VirtualBox installation or, in other
8305 words, becomes a <i>known medium</i>. Known media are stored in the media
8306 registry transparently maintained by VirtualBox and stored in settings
8307 files so that this registry is preserved when VirtualBox is not running.
8308
8309 Newly created virtual hard disks get remembered only when the associated
8310 storage unit is actually created (see IHardDisk for more details).
8311
8312 All known media can be enumerated using
8313 <link to="IVirtualBox::hardDisks"/>,
8314 <link to="IVirtualBox::DVDImages"/> and
8315 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8316 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8317 and similar methods or by location using
8318 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8319
8320 Only known media can be attached to virtual machines.
8321
8322 Removing known media from the media registry is performed when the given
8323 medium is closed using the <link to="#close"/> method or when its
8324 associated storage unit is deleted (only for hard disks).
8325
8326 <h3>Accessibility Checks</h3>
8327
8328 The given medium (with the created storage unit) is considered to be
8329 <i>accessible</i> when its storage unit can be read.
8330 Accessible media are indicated by the <link to="MediaState_Created"/>
8331 value of the <link to="#state"/> attribute. When the storage unit cannot
8332 be read (for example, because it is located on a disconnected network
8333 resource, or was accidentally deleted outside VirtualBox), the medium is
8334 considered to be <i>inaccessible</i> which is indicated by the
8335 <link to="MediaState_Inaccessible"/> state. The details about the reason
8336 of being inaccessible can be obtained using the
8337 <link to="#lastAccessError"/> attribute.
8338
8339 A new accessibility check is performed each time the <link to="#state"/>
8340 attribute is read. Please note that this check may take long time (several
8341 seconds or even minutes, depending on the storage unit location and
8342 format), and will block the calling thread until finished. For this
8343 reason, it is recommended to never read this attribute on the main UI
8344 thread to avoid making the UI unresponsive.
8345
8346 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8347 created for the first time), all known media are in the
8348 <link to="MediaState_Inaccessible"/> state but the value of the <link
8349 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
8350 accessibility check is made on startup. This is done to make the
8351 VirtualBox object ready for serving requests as
8352 fast as possible and let the end-user application decide if it needs to
8353 check media accessibility right away or not.
8354 </desc>
8355
8356 <attribute name="id" type="uuid" readonly="yes">
8357 <desc>
8358 UUID of the medium. For a newly created medium, this value is a randomly
8359 generated UUID.
8360
8361 <note>
8362 For media in one of MediaState_NotCreated, MediaState_Creating or
8363 MediaState_Deleting states, the value of this property is undefined
8364 and will most likely be an empty UUID.
8365 </note>
8366 </desc>
8367 </attribute>
8368
8369 <attribute name="description" type="wstring">
8370 <desc>
8371 Optional description of the medium. For newly created media, the value
8372 of this attribute value is <tt>null</tt>.
8373
8374 Media types that don't support this attribute will return E_NOTIMPL in
8375 attempt to get or set this attribute's value.
8376
8377 <note>
8378 For some storage types, reading this attribute may return an outdated
8379 (last known) value when <link to="#state"/> is <link
8380 to="MediaState_Inaccessible"/> or <link
8381 to="MediaState_LockedWrite"/> because the value of this attribute is
8382 stored within the storage unit itself. Also note that changing the
8383 attribute value is not possible in such case, as well as when the
8384 medium is the <link to="MediaState_LockedRead"/> state.
8385 </note>
8386 </desc>
8387 </attribute>
8388
8389 <attribute name="state" type="MediaState" readonly="yes">
8390 <desc>
8391 Current media state. Inspect <link to="MediaState"/> values for details.
8392
8393 Reading this attribute may take a long time because an accessibility
8394 check of the storage unit is performed each time the attribute is read.
8395 This check may cause a significant delay if the storage unit of the
8396 given medium is, for example, a file located on a network share which is
8397 not currently accessible due to connectivity problems -- the call will
8398 not return until a timeout interval defined by the host OS for this
8399 operation expires.
8400
8401 If the last known state of the medium is <link to="MediaState_Created"/>
8402 and the accessibility check fails then the state would be set to
8403 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8404 may be used to get more details about the failure. If the state of the
8405 medium is <link to="MediaState_LockedRead"/> or
8406 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8407 non-null value of <link to="#lastAccessError"/> will indicate a failed
8408 accessibility check in this case.
8409
8410 Note that not all media states are applicable to all media types.
8411 For example, states <link to="MediaState_NotCreated"/>,
8412 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8413 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8414 IFloppyImage media.
8415 </desc>
8416 </attribute>
8417
8418 <attribute name="location" type="wstring">
8419 <desc>
8420 Location of the storage unit holding media data.
8421
8422 The format of the location string is media type specific. For media
8423 types using regular files in a host's file system, the location
8424 string is the full file name.
8425
8426 Some media types may support changing the storage unit location by
8427 simply changing the value of this property. If this operation is not
8428 supported, the implementation will return E_NOTIMPL in attempt to set
8429 this attribute's value.
8430
8431 When setting a value of the location attribute which is a regular file
8432 in the host's file system, the given file name may be either relative to
8433 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8434 absolute. Note that if the given location specification does not contain
8435 the file extension part then a proper default extension will be
8436 automatically appended by the implementation depending on the media type.
8437 </desc>
8438 </attribute>
8439
8440 <attribute name="name" type="wstring" readonly="yes">
8441 <desc>
8442 Name of the storage unit holding media data.
8443
8444 The returned string is a short version of the <link to="#location"/>
8445 attribute that is suitable for representing the medium in situations
8446 where the full location specification is too long (such as lists
8447 and comboboxes in GUI frontends). This string is also used by frontends
8448 to sort the media list alphabetically when needed.
8449
8450 For example, for locations that are regular files in the host's file
8451 system, the value of this attribute is just the file name (+ extension),
8452 without the path specification.
8453
8454 Note that as opposed to the <link to="#location"/> attribute, the name
8455 attribute will not necessary be unique for a list of media of the
8456 given type and format.
8457 </desc>
8458 </attribute>
8459
8460 <attribute name="size" type="unsigned long long" readonly="yes">
8461 <desc>
8462 Physical size of the storage unit used to hold media data (in bytes).
8463
8464 <note>
8465 For media whose <link to="#state"/> is <link
8466 to="MediaState_Inaccessible"/>, the value of this property is the
8467 last known size. For <link to="MediaState_NotCreated"/> media,
8468 the returned value is zero.
8469 </note>
8470 </desc>
8471 </attribute>
8472
8473 <attribute name="lastAccessError" type="wstring" readonly="yes">
8474 <desc>
8475 Text message that represents the result of the last accessibility
8476 check.
8477
8478 Accessibility checks are performed each time the <link to="#state"/>
8479 attribute is read. A @c null string is returned if the last
8480 accessibility check was successful. A non-null string indicates a
8481 failure and should normally describe a reason of the failure (for
8482 example, a file read error).
8483 </desc>
8484 </attribute>
8485
8486 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8487 <desc>
8488 Array of UUIDs of all machines this medium is attached to.
8489
8490 A <tt>null</tt> array is returned if this medium is not attached to any
8491 machine or to any machine's snapshot.
8492
8493 <note>
8494 The returned array will include a machine even if this medium is not
8495 attached to that machine in the current state but attached to it in
8496 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8497 details.
8498 </note>
8499 </desc>
8500 </attribute>
8501
8502 <method name="getSnapshotIds">
8503 <desc>
8504 Returns an array of UUIDs of all snapshots of the given machine where
8505 this medium is attached to.
8506
8507 If the medium is attached to the machine in the current state, then the
8508 first element in the array will always be the ID of the queried machine
8509 (i.e. the value equal to the @c machineId argument), followed by
8510 snapshot IDs (if any).
8511
8512 If the medium is not attached to the machine in the current state, then
8513 the array will contain only snapshot IDs.
8514
8515 The returned array may be <tt>null</tt> if this medium is not attached
8516 to the given machine at all, neither in the current state nor in one of
8517 the snapshots.
8518 </desc>
8519 <param name="machineId" type="uuid" dir="in">
8520 <desc>
8521 UUID of the machine to query.
8522 </desc>
8523 </param>
8524 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8525 <desc>
8526 Array of snapshot UUIDs of the given machine using this medium.
8527 </desc>
8528 </param>
8529 </method>
8530
8531 <method name="lockRead">
8532 <desc>
8533 Locks this medium for reading.
8534
8535 The read lock is shared: many clients can simultaneously lock the
8536 same media for reading unless it is already locked for writing (see
8537 <link to="#lockWrite"/>) in which case an error is returned.
8538
8539 When the medium is locked for reading, it cannot be modified
8540 from within VirtualBox. This means that any method that changes
8541 the properties of this medium or contents of the storage unit
8542 will return an error (unless explicitly stated otherwise) and
8543 that an attempt to start a virtual machine that wants to modify
8544 the medium will also fail.
8545
8546 When the virtual machine is started up, it locks for reading all
8547 media it uses in read-only mode. If some media cannot be locked
8548 for reading, the startup procedure will fail.
8549
8550 The medium locked for reading must be unlocked using the <link
8551 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8552 can be nested and must be followed by the same number of paired
8553 <link to="#unlockRead"/> calls.
8554
8555 This method sets the media state to <link
8556 to="MediaState_LockedRead"/> on success. The state prior to
8557 this call must be <link to="MediaState_Created"/>, <link
8558 to="MediaState_Inaccessible"/> or <link
8559 to="MediaState_LockedRead"/>. As you can see, inaccessible
8560 media can be locked too. This is not an error; this method
8561 performs a logical lock that prevents modifications of this
8562 media through the VirtualBox API, not a physical lock of the
8563 underlying storage unit.
8564
8565 This method returns the current state of the medium
8566 <b>before</b> the operation.
8567
8568 <result name="VBOX_E_INVALID_OBJECT_STATE">
8569 Invalid media state (e.g. not created, locked, inaccessible,
8570 creating, deleting).
8571 </result>
8572
8573 </desc>
8574 <param name="state" type="MediaState" dir="return">
8575 <desc>
8576 State of the medium after the operation.
8577 </desc>
8578 </param>
8579 </method>
8580
8581 <method name="unlockRead">
8582 <desc>
8583 Cancels the read lock previously set by <link to="#lockRead"/>.
8584
8585 For both, success and failure, this method returns the current state
8586 of the medium <b>after</b> the operation.
8587
8588 See <link to="#lockRead"/> for more details.
8589
8590 <result name="VBOX_E_INVALID_OBJECT_STATE">
8591 Medium not locked for reading.
8592 </result>
8593
8594 </desc>
8595 <param name="state" type="MediaState" dir="return">
8596 <desc>
8597 State of the medium after the operation.
8598 </desc>
8599 </param>
8600 </method>
8601
8602 <method name="lockWrite">
8603 <desc>
8604 Locks this medium for writing.
8605
8606 The write lock, as opposed to <link to="#lockRead"/>, is
8607 exclusive: there may be only one client holding a write lock
8608 and there may be no read locks while the write lock is held.
8609
8610 When the medium is locked for writing, it cannot be modified
8611 from within VirtualBox and it is not guaranteed that the values
8612 of its properties are up-to-date. Any method that changes the
8613 properties of this medium or contents of the storage unit will
8614 return an error (unless explicitly stated otherwise) and an
8615 attempt to start a virtual machine wanting to modify or to
8616 read the medium will fail.
8617
8618 When the virtual machine is started up, it locks for writing all
8619 media it uses to write data to. If any medium could not be locked
8620 for writing, the startup procedure will fail.
8621
8622 The medium locked for writing must be unlocked using the <link
8623 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8624 can <b>not</b> be nested and must be followed by a<link
8625 to="#unlockWrite"/> call before the next lockWrite call.
8626
8627 This method sets the media state to <link
8628 to="MediaState_LockedWrite"/> on success. The state prior to
8629 this call must be <link to="MediaState_Created"/> or <link
8630 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8631 media can be locked too. This is not an error; this method
8632 performs a logical lock preventing modifications of this
8633 media through the VirtualBox API, not a physical lock of the
8634 underlying storage unit.
8635
8636 For both, success and failure, this method returns the current
8637 state of the medium <b>before</b> the operation.
8638
8639 <result name="VBOX_E_INVALID_OBJECT_STATE">
8640 Invalid media state (e.g. not created, locked, inaccessible,
8641 creating, deleting).
8642 </result>
8643
8644 </desc>
8645 <param name="state" type="MediaState" dir="return">
8646 <desc>
8647 State of the medium after the operation.
8648 </desc>
8649 </param>
8650 </method>
8651
8652 <method name="unlockWrite">
8653 <desc>
8654 Cancels the write lock previously set by <link to="#lockWrite"/>.
8655
8656 For both, success and failure, this method returns the current
8657 state of the medium <b>after</b> the operation.
8658
8659 See <link to="#lockWrite"/> for more details.
8660
8661 <result name="VBOX_E_INVALID_OBJECT_STATE">
8662 Medium not locked for writing.
8663 </result>
8664
8665 </desc>
8666 <param name="state" type="MediaState" dir="return">
8667 <desc>
8668 State of the medium after the operation.
8669 </desc>
8670 </param>
8671 </method>
8672
8673 <method name="close">
8674 <desc>
8675 Closes this medium.
8676
8677 The hard disk must not be attached to any known virtual machine
8678 and must not have any known child hard disks, otherwise the
8679 operation will fail.
8680
8681 When the hard disk is successfully closed, it gets removed from
8682 the list of remembered hard disks, but its storage unit is not
8683 deleted. In particular, this means that this hard disk can be
8684 later opened again using the <link
8685 to="IVirtualBox::openHardDisk"/> call.
8686
8687 Note that after this method successfully returns, the given hard
8688 disk object becomes uninitialized. This means that any attempt
8689 to call any of its methods or attributes will fail with the
8690 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8691
8692 <result name="VBOX_E_INVALID_OBJECT_STATE">
8693 Invalid media state (other than not created, created or
8694 inaccessible).
8695 </result>
8696 <result name="VBOX_E_OBJECT_IN_USE">
8697 Medium attached to virtual machine.
8698 </result>
8699 <result name="VBOX_E_FILE_ERROR">
8700 Settings file not accessible.
8701 </result>
8702 <result name="VBOX_E_XML_ERROR">
8703 Could not parse the settings file.
8704 </result>
8705
8706 </desc>
8707 </method>
8708
8709 </interface>
8710
8711
8712 <!--
8713 // IHardDisk
8714 /////////////////////////////////////////////////////////////////////////
8715 -->
8716
8717 <enum
8718 name="HardDiskType"
8719 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8720 >
8721 <desc>
8722 Virtual hard disk type.
8723 <see>IHardDisk</see>
8724 </desc>
8725
8726 <const name="Normal" value="0">
8727 <desc>
8728 Normal hard disk (attached directly or indirectly, preserved
8729 when taking snapshots).
8730 </desc>
8731 </const>
8732 <const name="Immutable" value="1">
8733 <desc>
8734 Immutable hard disk (attached indirectly, changes are wiped out
8735 after powering off the virtual machine).
8736 </desc>
8737 </const>
8738 <const name="Writethrough" value="2">
8739 <desc>
8740 Write through hard disk (attached directly, ignored when
8741 taking snapshots).
8742 </desc>
8743 </const>
8744 </enum>
8745
8746 <enum
8747 name="HardDiskVariant"
8748 uuid="eb7fc6b3-ae23-4c5d-a1f6-e3522dd1efb0"
8749 >
8750 <desc>
8751 Virtual hard disk image variant. More than one flag may be set.
8752 <see>IHardDisk</see>
8753 </desc>
8754
8755 <const name="Standard" value="0">
8756 <desc>
8757 No particular variant requested, results in using the backend default.
8758 </desc>
8759 </const>
8760 <const name="VmdkSplit2G" value="0x01">
8761 <desc>
8762 VMDK image split in chunks of less than 2GByte.
8763 </desc>
8764 </const>
8765 <const name="VmdkStreamOptimized" value="0x04">
8766 <desc>
8767 VMDK streamOptimized image. Special import/export format which is
8768 read-only/append-only.
8769 </desc>
8770 </const>
8771 <const name="VmdkESX" value="0x08">
8772 <desc>
8773 VMDK format variant used on ESX products.
8774 </desc>
8775 </const>
8776 <const name="Fixed" value="0x10000">
8777 <desc>
8778 Fixed image. Only allowed for base images.
8779 </desc>
8780 </const>
8781 <const name="Diff" value="0x20000">
8782 <desc>
8783 Fixed image. Only allowed for base images.
8784 </desc>
8785 </const>
8786 </enum>
8787
8788 <interface
8789 name="IHardDiskAttachment" extends="$unknown"
8790 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8791 wsmap="struct"
8792 >
8793 <desc>
8794 The IHardDiskAttachment interface represents a hard disk attachment of a
8795 virtual machine.
8796
8797 Every hard disk attachment specifies a slot of the virtual hard disk
8798 controller and a virtual hard disk attached to this slot.
8799
8800 The array of hard disk attachments is returned by
8801 <link to="IMachine::hardDiskAttachments"/>.
8802 </desc>
8803 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8804 <desc>Hard disk object associated with this attachment.</desc>
8805 </attribute>
8806
8807 <attribute name="controller" type="wstring" readonly="yes">
8808 <desc>Interface bus of this attachment.</desc>
8809 </attribute>
8810
8811 <attribute name="port" type="long" readonly="yes">
8812 <desc>Port number of this attachment.</desc>
8813 </attribute>
8814
8815 <attribute name="device" type="long" readonly="yes">
8816 <desc>Device slot number of this attachment.</desc>
8817 </attribute>
8818
8819 </interface>
8820
8821 <interface
8822 name="IHardDisk" extends="IMedium"
8823 uuid="91648dc6-bb19-46bf-9e1c-4bf5b960c8e2"
8824 wsmap="managed"
8825 >
8826 <desc>
8827 The IHardDisk interface represents a virtual hard disk drive
8828 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8829
8830 Virtual hard disk objects virtualize the hard disk hardware and look like
8831 regular hard disks for the guest OS running inside the virtual machine.
8832
8833 <h3>Hard Disk Types</h3>
8834
8835 There are three types of hard disks:
8836 <link to="HardDiskType_Normal">Normal</link>,
8837 <link to="HardDiskType_Immutable">Immutable</link> and
8838 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8839 hard disk defines how the hard disk is attached to a virtual machine and
8840 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8841 machine with the attached hard disk is taken. The type of the hard disk is
8842 defined by the <link to="#type"/> attribute.
8843
8844 All hard disks can be also divided in two big groups: <i>base</i> hard
8845 disks and <i>differencing</i> hard disks. A base hard disk contains all
8846 sectors of the hard disk data in its storage unit and therefore can be
8847 used independently. On the contrary, a differencing hard disk contains
8848 only some part of the hard disk data (a subset of sectors) and needs
8849 another hard disk to get access to the missing sectors of data. This
8850 another hard disk is called a <i>parent</i> hard disk and defines a hard
8851 disk to which this differencing hard disk is known to be <i>linked to</i>.
8852 The parent hard disk may be itself a differencing hard disk. This
8853 way, differencing hard disks form a linked hard disk chain. This chain
8854 always ends with the base hard disk which is sometimes referred to as the
8855 root hard disk of this chain. Note that several differencing hard disks
8856 may be linked to the same parent hard disk. This way, all known hard disks
8857 form a hard disk tree which is based on their parent-child relationship.
8858
8859 Differencing hard disks can be distinguished from base hard disks by
8860 querying the <link to="#parent"/> attribute: base hard disks do not have
8861 parents they would depend on, so the value of this attribute is always
8862 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8863 the hard disk tree (from the child hard disk to its parent). It is also
8864 possible to walk down the tree using the <link to="#children"/>
8865 attribute.
8866
8867 Note that the type of all differencing hard disks is
8868 <link to="HardDiskType_Normal">Normal</link>; all other values are
8869 meaningless for them. Base hard disks may be of any type.
8870
8871 <h3>Creating Hard Disks</h3>
8872
8873 New base hard disks are created using
8874 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8875 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8876 disks are usually implicitly created by VirtualBox when needed but may
8877 also be created explicitly using <link to="#createDiffStorage"/>.
8878
8879 After the hard disk is successfully created (including the storage unit)
8880 or opened, it becomes a known hard disk (remembered in the internal media
8881 registry). Known hard disks can be attached to a virtual machine, accessed
8882 through <link to="IVirtualBox::getHardDisk"/> and
8883 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8884 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8885
8886 The following methods, besides <link to="IMedium::close"/>,
8887 automatically remove the hard disk from the media registry:
8888 <ul>
8889 <li><link to="#deleteStorage"/></li>
8890 <li><link to="#mergeTo"/></li>
8891 </ul>
8892
8893 If the storage unit of the hard disk is a regular file in the host's
8894 file system then the rules stated in the description of the
8895 <link to="IMedium::location"/> attribute apply when setting its value. In
8896 addition, a plain file name without any path may be given, in which case
8897 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8898 folder</link> will be prepended to it.
8899
8900 <h4>Automatic composition of the file name part</h4>
8901
8902 Another extension to the <link to="IMedium::location"/> attribute is that
8903 there is a possibility to cause VirtualBox to compose a unique value for
8904 the file name part of the location using the UUID of the hard disk. This
8905 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8906 e.g. before the storage unit is created, and works as follows. You set the
8907 value of the <link to="IMedium::location"/> attribute to a location
8908 specification which only contains the path specification but not the file
8909 name part and ends with either a forward slash or a backslash character.
8910 In response, VirtualBox will generate a new UUID for the hard disk and
8911 compose the file name using the following pattern:
8912 <pre>
8913 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8914 </pre>
8915 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8916 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8917 is the default extension for the storage format of this hard disk. After
8918 that, you may call any of the methods that create a new hard disk storage
8919 unit and they will use the generated UUID and file name.
8920
8921 <h3>Attaching Hard Disks</h3>
8922
8923 Hard disks are attached to virtual machines using the
8924 <link to="IMachine::attachHardDisk"/> method and detached using the
8925 <link to="IMachine::detachHardDisk"/> method. Depending on their
8926 <link to="#type"/>, hard disks are attached either
8927 <i>directly</i> or <i>indirectly</i>.
8928
8929 When a hard disk is being attached directly, it is associated with the
8930 virtual machine and used for hard disk operations when the machine is
8931 running. When a hard disk is being attached indirectly, a new differencing
8932 hard disk linked to it is implicitly created and this differencing hard
8933 disk is associated with the machine and used for hard disk operations.
8934 This also means that if <link to="IMachine::attachHardDisk"/> performs
8935 a direct attachment then the same hard disk will be returned in response
8936 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8937 an indirect attachment is performed then
8938 <link to="IMachine::getHardDisk"/> will return the implicitly created
8939 differencing hard disk, not the original one passed to <link
8940 to="IMachine::attachHardDisk"/>. The following table shows the
8941 dependency of the attachment type on the hard disk type:
8942
8943 <table>
8944 <tr>
8945 <th>Hard Disk Type</th>
8946 <th>Direct or Indirect?</th>
8947 </tr>
8948 <tr>
8949 <td>Normal (Base)</td>
8950 <td>
8951 Normal base hard disks that do not have children (i.e. differencing
8952 hard disks linked to them) and that are not already attached to
8953 virtual machines in snapshots are attached <b>directly</b>.
8954 Otherwise, they are attached <b>indirectly</b> because having
8955 dependent children or being part of the snapshot makes it impossible
8956 to modify hard disk contents without breaking the integrity of the
8957 dependent party. The <link to="#readOnly"/> attribute allows to
8958 quickly determine the kind of the attachment for the given hard
8959 disk. Note that if a normal base hard disk is to be indirectly
8960 attached to a virtual machine with snapshots then a special
8961 procedure called <i>smart attachment</i> is performed (see below).
8962 </td>
8963 </tr>
8964 <tr>
8965 <td>Normal (Differencing)</td>
8966 <td>
8967 Differencing hard disks are like normal base hard disks: attached
8968 <b>directly</b> if they do not have children and are not attached to
8969 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8970 that the smart attachment procedure is never performed for
8971 differencing hard disks.
8972 </td>
8973 </tr>
8974 <tr>
8975 <td>Immutable</td>
8976 <td>
8977 Immutable hard disks are always attached <b>indirectly</b> because
8978 they are designed to be non-writable. If an immutable hard disk is
8979 attached to a virtual machine with snapshots then a special
8980 procedure called smart attachment is performed (see below).
8981 </td>
8982 </tr>
8983 <tr>
8984 <td>Writethrough</td>
8985 <td>
8986 Writethrough hard disks are always attached <b>directly</b>, also as
8987 designed. This also means that writethrough hard disks cannot have
8988 other hard disks linked to them at all.
8989 </td>
8990 </tr>
8991 </table>
8992
8993 Note that the same hard disk, regardless of its type, may be attached to
8994 more than one virtual machine at a time. In this case, the machine that is
8995 started first gains exclusive access to the hard disk and attempts to
8996 start other machines having this hard disk attached will fail until the
8997 first machine is powered down.
8998
8999 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9000 that the given hard disk remains associated with the given machine after a
9001 successful <link to="IMachine::detachHardDisk"/> call until
9002 <link to="IMachine::saveSettings"/> is called to save all changes to
9003 machine settings to disk. This deferring is necessary to guarantee that
9004 the hard disk configuration may be restored at any time by a call to
9005 <link to="IMachine::discardSettings"/> before the settings
9006 are saved (committed).
9007
9008 Note that if <link to="IMachine::discardSettings"/> is called after
9009 indirectly attaching some hard disks to the machine but before a call to
9010 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9011 all differencing hard disks implicitly created by
9012 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
9013 Such implicitly created hard disks will also be immediately deleted when
9014 detached explicitly using the <link to="IMachine::detachHardDisk"/>
9015 call if it is made before <link to="IMachine::saveSettings"/>. This
9016 implicit deletion is safe because newly created differencing hard
9017 disks do not contain any user data.
9018
9019 However, keep in mind that detaching differencing hard disks that were
9020 implicitly created by <link to="IMachine::attachHardDisk"/>
9021 before the last <link to="IMachine::saveSettings"/> call will
9022 <b>not</b> implicitly delete them as they may already contain some data
9023 (for example, as a result of virtual machine execution). If these hard
9024 disks are no more necessary, the caller can always delete them explicitly
9025 using <link to="#deleteStorage"/> after they are actually de-associated
9026 from this machine by the <link to="IMachine::saveSettings"/> call.
9027
9028 <h3>Smart Attachment</h3>
9029
9030 When normal base or immutable hard disks are indirectly attached to a
9031 virtual machine then some additional steps are performed to make sure the
9032 virtual machine will have the most recent "view" of the hard disk being
9033 attached. These steps include walking through the machine's snapshots
9034 starting from the current one and going through ancestors up to the first
9035 snapshot. Hard disks attached to the virtual machine in all
9036 of the encountered snapshots are checked whether they are descendants of
9037 the given normal base or immutable hard disk. The first found child (which
9038 is the differencing hard disk) will be used instead of the normal base or
9039 immutable hard disk as a parent for creating a new differencing hard disk
9040 that will be actually attached to the machine. And only if no descendants
9041 are found or if the virtual machine does not have any snapshots then the
9042 normal base or immutable hard disk will be used itself as a parent for
9043 this differencing hard disk.
9044
9045 It is easier to explain what smart attachment does using the
9046 following example:
9047 <pre>
9048BEFORE attaching B.vdi: AFTER attaching B.vdi:
9049
9050Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9051 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9052 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9053 Snapshot 4 (none) Snapshot 4 (none)
9054 CurState (none) CurState (D3->D2.vdi)
9055
9056 NOT
9057 ...
9058 CurState (D3->B.vdi)
9059 </pre>
9060 The first column is the virtual machine configuration before the base hard
9061 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9062 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9063 mean that the hard disk that is actually attached to the machine is a
9064 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9065 another hard disk, <tt>B.vdi</tt>.
9066
9067 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9068 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9069 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9070 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9071 it cannot be attached directly and needs an indirect attachment (i.e.
9072 implicit creation of a new differencing hard disk). Due to the smart
9073 attachment procedure, the new differencing hard disk
9074 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9075 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9076 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9077 machine.
9078
9079 Note that if there is more than one descendant hard disk of the given base
9080 hard disk found in a snapshot, and there is an exact device, channel and
9081 bus match, then this exact match will be used. Otherwise, the youngest
9082 descendant will be picked up.
9083
9084 There is one more important aspect of the smart attachment procedure which
9085 is not related to snapshots at all. Before walking through the snapshots
9086 as described above, the backup copy of the current list of hard disk
9087 attachment is searched for descendants. This backup copy is created when
9088 the hard disk configuration is changed for the first time after the last
9089 <link to="IMachine::saveSettings"/> call and used by
9090 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9091 changes. When such a descendant is found in this backup copy, it will be
9092 simply re-attached back, without creating a new differencing hard disk for
9093 it. This optimization is necessary to make it possible to re-attach the
9094 base or immutable hard disk to a different bus, channel or device slot
9095 without losing the contents of the differencing hard disk actually
9096 attached to the machine in place of it.
9097 </desc>
9098
9099 <attribute name="format" type="wstring" readonly="yes">
9100 <desc>
9101 Storage format of this hard disk.
9102
9103 The value of this attribute is a string that specifies a backend used to
9104 store hard disk data. The storage format is defined when you create a
9105 new hard disk or automatically detected when you open an existing hard
9106 disk medium, and cannot be changed later.
9107
9108 The list of all storage formats supported by this VirtualBox
9109 installation can be obtained using
9110 <link to="ISystemProperties::hardDiskFormats"/>.
9111 </desc>
9112 </attribute>
9113
9114 <attribute name="type" type="HardDiskType">
9115 <desc>
9116 Type (role) of this hard disk.
9117
9118 The following constraints apply when changing the value of this
9119 attribute:
9120 <ul>
9121 <li>If a hard disk is attached to a virtual machine (either in the
9122 current state or in one of the snapshots), its type cannot be
9123 changed.
9124 </li>
9125 <li>As long as the hard disk has children, its type cannot be set
9126 to <link to="HardDiskType_Writethrough"/>.
9127 </li>
9128 <li>The type of all differencing hard disks is
9129 <link to="HardDiskType_Normal"/> and cannot be changed.
9130 </li>
9131 </ul>
9132
9133 The type of a newly created or opened hard disk is set to
9134 <link to="HardDiskType_Normal"/>.
9135 </desc>
9136 </attribute>
9137
9138 <attribute name="parent" type="IHardDisk" readonly="yes">
9139 <desc>
9140 Parent of this hard disk (a hard disk this hard disk is directly based
9141 on).
9142
9143 Only differencing hard disks have parents. For base (non-differencing)
9144 hard disks, <tt>null</tt> is returned.
9145 </desc>
9146 </attribute>
9147
9148 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9149 <desc>
9150 Children of this hard disk (all differencing hard disks directly based
9151 on this hard disk). A <tt>null</tt> array is returned if this hard disk
9152 does not have any children.
9153 </desc>
9154 </attribute>
9155
9156 <attribute name="root" type="IHardDisk" readonly="yes">
9157 <desc>
9158 Root hard disk of this hard disk.
9159
9160 If this is a differencing hard disk, its root hard disk is the base hard
9161 disk the given hard disk branch starts from. For all other types of hard
9162 disks, this property returns the hard disk object itself (i.e. the same
9163 object this property is read on).
9164 </desc>
9165 </attribute>
9166
9167 <attribute name="readOnly" type="boolean" readonly="yes">
9168 <desc>
9169 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
9170 otherwise.
9171
9172 A hard disk is considered to be read-only when its contents cannot be
9173 modified without breaking the integrity of other parties that depend on
9174 this hard disk such as its child hard disks or snapshots of virtual
9175 machines where this hard disk is attached to these machines. If there
9176 are no children and no such snapshots then there is no dependency and
9177 the hard disk is not read-only.
9178
9179 The value of this attribute can be used to determine the kind of the
9180 attachment that will take place when attaching this hard disk to a
9181 virtual machine. If the value is <tt>false</tt> then the hard disk will
9182 be attached directly. If the value is <tt>true</tt> then the hard disk
9183 will be attached indirectly by creating a new differencing child hard
9184 disk for that. See the interface description for more information.
9185
9186 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9187 disks are always read-only while all
9188 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9189 always not.
9190
9191 <note>
9192 The read-only condition represented by this attribute is related to
9193 the hard disk type and usage, not to the current
9194 <link to="IMedium::state">media state</link> and not to the read-only
9195 state of the storage unit.
9196 </note>
9197 </desc>
9198 </attribute>
9199
9200 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9201 <desc>
9202 Logical size of this hard disk (in megabytes), as reported to the
9203 guest OS running inside the virtual machine this disk is
9204 attached to. The logical size is defined when the hard disk is created
9205 and cannot be changed later.
9206
9207 <note>
9208 Reading this property on a differencing hard disk will return the size
9209 of its <link to="#root"/> hard disk.
9210 </note>
9211 <note>
9212 For hard disks whose state is <link to="#state"/> is <link
9213 to="MediaState_Inaccessible"/>, the value of this property is the
9214 last known logical size. For <link to="MediaState_NotCreated"/> hard
9215 disks, the returned value is zero.
9216 </note>
9217 </desc>
9218 </attribute>
9219
9220 <attribute name="autoReset" type="boolean">
9221 <desc>
9222 Whether this differencing hard disk will be automatically reset each
9223 time a virtual machine it is attached to is powered up.
9224
9225 See <link to="#reset()"/> for more information about resetting
9226 differencing hard disks.
9227
9228 <note>
9229 Reading this property on a base (non-differencing) hard disk will
9230 always <tt>false</tt>. Changing the value of this property in this
9231 case is not supported.
9232 </note>
9233
9234 <result name="VBOX_E_NOT_SUPPORTED">
9235 This is not a differencing hard disk (when changing the attribute
9236 value).
9237 </result>
9238 </desc>
9239 </attribute>
9240
9241 <!-- storage methods -->
9242
9243 <method name="getProperty">
9244 <desc>
9245 Returns the value of the custom hard disk property with the given name.
9246
9247 The list of all properties supported by the given hard disk format can
9248 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9249
9250 Note that if this method returns a <tt>null</tt> @a value, the requested
9251 property is supported but currently not assigned any value.
9252
9253 <result name="VBOX_E_OBJECT_NOT_FOUND">
9254 Requested property does not exist (not supported by the format).
9255 </result>
9256 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9257 </desc>
9258 <param name="name" type="wstring" dir="in">
9259 <desc>Name of the property to get.</desc>
9260 </param>
9261 <param name="value" type="wstring" dir="return">
9262 <desc>Current property value.</desc>
9263 </param>
9264 </method>
9265
9266 <method name="setProperty">
9267 <desc>
9268 Sets the value of the custom hard disk property with the given name.
9269
9270 The list of all properties supported by the given hard disk format can
9271 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9272
9273 Note that setting the property value to <tt>null</tt> is equivalent to
9274 deleting the existing value. A default value (if it is defined for this
9275 property) will be used by the format backend in this case.
9276
9277 <result name="VBOX_E_OBJECT_NOT_FOUND">
9278 Requested property does not exist (not supported by the format).
9279 </result>
9280 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9281 </desc>
9282 <param name="name" type="wstring" dir="in">
9283 <desc>Name of the property to set.</desc>
9284 </param>
9285 <param name="value" type="wstring" dir="in">
9286 <desc>Property value to set.</desc>
9287 </param>
9288 </method>
9289
9290 <method name="getProperties">
9291 <desc>
9292 Returns values for a group of properties in one call.
9293
9294 The names of the properties to get are specified using the @a names
9295 argument which is a list of comma-separated property names or
9296 <tt>null</tt> if all properties are to be returned. Note that currently
9297 the value of this argument is ignored and the method always returns all
9298 existing properties.
9299
9300 The list of all properties supported by the given hard disk format can
9301 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9302
9303 The method returns two arrays, the array of property names corresponding
9304 to the @a names argument and the current values of these properties.
9305 Both arrays have the same number of elements with each elemend at the
9306 given index in the first array corresponds to an element at the same
9307 index in the second array.
9308
9309 Note that for properties that do not have assigned values,
9310 <tt>null</tt> is returned at the appropriate index in the
9311 @a returnValues array.
9312
9313 </desc>
9314 <param name="names" type="wstring" dir="in">
9315 <desc>
9316 Names of properties to get.
9317 </desc>
9318 </param>
9319 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9320 <desc>Names of returned properties.</desc>
9321 </param>
9322 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9323 <desc>Values of returned properties.</desc>
9324 </param>
9325 </method>
9326
9327 <method name="setProperties">
9328 <desc>
9329 Sets values for a group of properties in one call.
9330
9331 The names of the properties to set are passed in the @a names
9332 array along with the new values for them in the @a values array. Both
9333 arrays have the same number of elements with each elemend at the given
9334 index in the first array corresponding to an element at the same index
9335 in the second array.
9336
9337 If there is at least one property name in @a names that is not valid,
9338 the method will fail before changing the values of any other properties
9339 from the @a names array.
9340
9341 Using this method over <link to="#setProperty"/> is preferred if you
9342 need to set several properties at once since it will result into less
9343 IPC calls.
9344
9345 The list of all properties supported by the given hard disk format can
9346 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9347
9348 Note that setting the property value to <tt>null</tt> is equivalent to
9349 deleting the existing value. A default value (if it is defined for this
9350 property) will be used by the format backend in this case.
9351 </desc>
9352 <param name="names" type="wstring" safearray="yes" dir="in">
9353 <desc>Names of properties to set.</desc>
9354 </param>
9355 <param name="values" type="wstring" safearray="yes" dir="in">
9356 <desc>Values of properties to set.</desc>
9357 </param>
9358 </method>
9359
9360 <!-- storage methods -->
9361
9362 <method name="createBaseStorage">
9363 <desc>
9364 Starts creating a hard disk storage unit (fixed/dynamic, according
9365 to the variant flags) in in the background. The previous storage unit
9366 created for this object, if any, must first be deleted using
9367 <link to="#deleteStorage"/>, otherwise the operation will fail.
9368
9369 Before the operation starts, the hard disk is placed in
9370 <link to="MediaState_Creating"/> state. If the create operation
9371 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9372 state.
9373
9374 After the returned progress object reports that the operation has
9375 successfully completed, the media state will be set to <link
9376 to="MediaState_Created"/>, the hard disk will be remembered by this
9377 VirtualBox installation and may be attached to virtual machines.
9378
9379 <result name="VBOX_E_NOT_SUPPORTED">
9380 The variant of storage creation operation is not supported. See <link
9381 to="IHardDiskFormat::capabilities"/>.
9382 </result>
9383 </desc>
9384 <param name="logicalSize" type="unsigned long long" dir="in">
9385 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9386 </param>
9387 <param name="variant" type="HardDiskVariant" dir="in">
9388 <desc>Exact image variant which should be created.</desc>
9389 </param>
9390 <param name="progress" type="IProgress" dir="return">
9391 <desc>Progress object to track the operation completion.</desc>
9392 </param>
9393 </method>
9394
9395 <method name="deleteStorage">
9396 <desc>
9397 Starts deleting the storage unit of this hard disk.
9398
9399 The hard disk must not be attached to any known virtual machine and must
9400 not have any known child hard disks, otherwise the operation will fail.
9401 It will also fail if there is no storage unit to delete or if deletion
9402 is already in progress, or if the hard disk is being in use (locked for
9403 read or for write) or inaccessible. Therefore, the only valid state for
9404 this operation to succeed is <link to="MediaState_Created"/>.
9405
9406 Before the operation starts, the hard disk is placed to
9407 <link to="MediaState_Deleting"/> state and gets removed from the list
9408 of remembered hard disks (media registry). If the delete operation
9409 fails, the media will be remembered again and placed back to
9410 <link to="MediaState_Created"/> state.
9411
9412 After the returned progress object reports that the operation is
9413 complete, the media state will be set to
9414 <link to="MediaState_NotCreated"/> and you will be able to use one of
9415 the storage creation methods to create it again.
9416
9417 <see>#close()</see>
9418
9419 <result name="VBOX_E_OBJECT_IN_USE">
9420 Hard disk is attached to a virtual machine.
9421 </result>
9422 <result name="VBOX_E_NOT_SUPPORTED">
9423 Storage deletion is not allowed because neither of storage creation
9424 operations are supported. See
9425 <link to="IHardDiskFormat::capabilities"/>.
9426 </result>
9427
9428 <note>
9429 If the deletion operation fails, it is not guaranteed that the storage
9430 unit still exists. You may check the <link to="IMedium::state"/> value
9431 to answer this question.
9432 </note>
9433 </desc>
9434 <param name="progress" type="IProgress" dir="return">
9435 <desc>Progress object to track the operation completion.</desc>
9436 </param>
9437 </method>
9438
9439 <!-- diff methods -->
9440
9441 <method name="createDiffStorage">
9442 <desc>
9443 Starts creating an empty differencing storage unit based on this hard
9444 disk in the format and at the location defined by the @a target
9445 argument.
9446
9447 The target hard disk must be in <link to="MediaState_NotCreated"/>
9448 state (i.e. must not have an existing storage unit). Upon successful
9449 completion, this operation will set the type of the target hard disk to
9450 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9451 represent the differencing hard disk data in the given format (according
9452 to the storage format of the target object).
9453
9454 After the returned progress object reports that the operation is
9455 successfully complete, the target hard disk gets remembered by this
9456 VirtualBox installation and may be attached to virtual machines.
9457
9458 <note>
9459 The hard disk will be set to <link to="MediaState_LockedRead"/>
9460 state for the duration of this operation.
9461 </note>
9462 <result name="VBOX_E_OBJECT_IN_USE">
9463 Hard disk not in NotCreated state.
9464 </result>
9465 </desc>
9466 <param name="target" type="IHardDisk" dir="in">
9467 <desc>Target hard disk.</desc>
9468 </param>
9469 <param name="variant" type="HardDiskVariant" dir="in">
9470 <desc>Exact image variant which should be created.</desc>
9471 </param>
9472 <param name="progress" type="IProgress" dir="return">
9473 <desc>Progress object to track the operation completion.</desc>
9474 </param>
9475 </method>
9476
9477 <method name="mergeTo">
9478 <desc>
9479 Starts merging the contents of this hard disk and all intermediate
9480 differencing hard disks in the chain to the given target hard disk.
9481
9482 The target hard disk must be either a descendant of this hard disk or
9483 its ancestor (otherwise this method will immediately return a failure).
9484 It follows that there are two logical directions of the merge operation:
9485 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9486 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9487 chain:
9488
9489 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9490
9491 Here, calling this method on the <tt>Base</tt> hard disk object with
9492 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9493 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9494 merge. Note that in both cases the contents of the resulting hard disk
9495 will be the same, the only difference is the hard disk object that takes
9496 the result of the merge operation. In case of the forward merge in the
9497 above example, the result will be written to <tt>Diff_2</tt>; in case of
9498 the backward merge, the result will be written to <tt>Base</tt>. In
9499 other words, the result of the operation is always stored in the target
9500 hard disk.
9501
9502 Upon successful operation completion, the storage units of all hard
9503 disks in the chain between this (source) hard disk and the target hard
9504 disk, including the source hard disk itself, will be automatically
9505 deleted and the relevant hard disk objects (including this hard disk)
9506 will become uninitialized. This means that any attempt to call any of
9507 their methods or attributes will fail with the
9508 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9509 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9510 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9511 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9512 disk itself since it will no longer be based on any other hard disk.
9513
9514 Considering the above, all of the following conditions must be met in
9515 order for the merge operation to succeed:
9516 <ul>
9517 <li>
9518 Neither this (source) hard disk nor any intermediate
9519 differencing hard disk in the chain between it and the target
9520 hard disk is attached to any virtual machine.
9521 </li>
9522 <li>
9523 Neither the source hard disk nor the target hard disk is an
9524 <link to="HardDiskType_Immutable"/> hard disk.
9525 </li>
9526 <li>
9527 The part of the hard disk tree from the source hard disk to the
9528 target hard disk is a linear chain, i.e. all hard disks in this
9529 chain have exactly one child which is the next hard disk in this
9530 chain. The only exception from this rule is the target hard disk in
9531 the forward merge operation; it is allowed to have any number of
9532 child hard disks because the merge operation will hot change its
9533 logical contents (as it is seen by the guest OS or by children).
9534 </li>
9535 <li>
9536 None of the involved hard disks are in
9537 <link to="MediaState_LockedRead"/> or
9538 <link to="MediaState_LockedWrite"/> state.
9539 </li>
9540 </ul>
9541
9542 <note>
9543 This (source) hard disk and all intermediates will be placed to <link
9544 to="MediaState_Deleting"/> state and the target hard disk will be
9545 placed to <link to="MediaState_LockedWrite"/> state and for the
9546 duration of this operation.
9547 </note>
9548 </desc>
9549 <param name="targetId" type="uuid" dir="in">
9550 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9551 </param>
9552 <param name="progress" type="IProgress" dir="return">
9553 <desc>Progress object to track the operation completion.</desc>
9554 </param>
9555 </method>
9556
9557 <!-- clone method -->
9558
9559 <method name="cloneTo">
9560 <desc>
9561 Starts creating a clone of this hard disk in the format and at the
9562 location defined by the @a target argument.
9563
9564 The target hard disk must be in <link to="MediaState_NotCreated"/>
9565 state (i.e. must not have an existing storage unit). Upon successful
9566 completion, the cloned hard disk will contain exactly the same sector
9567 data as the hard disk being cloned, except that a new UUID for the
9568 clone will be randomly generated.
9569
9570 The @a parent argument defines which hard disk will be the parent
9571 of the clone. Passing a NULL reference indicates that the clone will
9572 be a base image, i.e. completely independent. It is possible to specify
9573 an arbitrary hard disk for this parameter, including the parent of the
9574 hard disk which is being cloned. Even cloning to a child of the source
9575 hard disk is possible.
9576
9577 After the returned progress object reports that the operation is
9578 successfully complete, the target hard disk gets remembered by this
9579 VirtualBox installation and may be attached to virtual machines.
9580
9581 <note>
9582 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9583 state for the duration of this operation.
9584 </note>
9585 </desc>
9586 <param name="target" type="IHardDisk" dir="in">
9587 <desc>Target hard disk.</desc>
9588 </param>
9589 <param name="variant" type="HardDiskVariant" dir="in">
9590 <desc>Exact image variant which should be created.</desc>
9591 </param>
9592 <param name="parent" type="IHardDisk" dir="in">
9593 <desc>Parent of the cloned hard disk.</desc>
9594 </param>
9595 <param name="progress" type="IProgress" dir="return">
9596 <desc>Progress object to track the operation completion.</desc>
9597 </param>
9598 </method>
9599
9600 <!-- other methods -->
9601
9602 <method name="compact">
9603 <desc>
9604 Starts compacting of this hard disk. This means that the disk is
9605 transformed into a possibly more compact storage representation.
9606 This potentially creates temporary images, which can require a
9607 substantial amount of additional disk space.
9608
9609 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9610 state and all its parent hard disks (if any) will be placed to
9611 <link to="MediaState_LockedRead"/> state for the duration of this
9612 operation.
9613 </desc>
9614 <param name="progress" type="IProgress" dir="return">
9615 <desc>Progress object to track the operation completion.</desc>
9616 </param>
9617 </method>
9618
9619 <method name="reset">
9620 <desc>
9621 Starts erasing the contents of this differencing hard disk.
9622
9623 This operation will reset the differencing hard disk to its initial
9624 state when it does not contain any sector data and any read operation is
9625 redirected to its parent hard disk.
9626
9627 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9628 for the duration of this operation.
9629
9630 <result name="VBOX_E_NOT_SUPPORTED">
9631 This is not a differencing hard disk.
9632 </result>
9633 <result name="VBOX_E_INVALID_OBJECT_STATE">
9634 Hard disk is not in <link to="MediaState_Created"/> or
9635 <link to="MediaState_Inaccessible"/> state.
9636 </result>
9637 </desc>
9638 <param name="progress" type="IProgress" dir="return">
9639 <desc>Progress object to track the operation completion.</desc>
9640 </param>
9641 </method>
9642
9643 </interface>
9644
9645
9646 <!--
9647 // IHardDiskFormat
9648 /////////////////////////////////////////////////////////////////////////
9649 -->
9650
9651 <enum
9652 name="DataType"
9653 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9654 >
9655 <const name="Int32" value="0"/>
9656 <const name="Int8" value="1"/>
9657 <const name="String" value="2"/>
9658 </enum>
9659
9660 <enum
9661 name="DataFlags"
9662 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9663 >
9664 <const name="None" value="0x00"/>
9665 <const name="Mandatory" value="0x01"/>
9666 <const name="Expert" value="0x02"/>
9667 <const name="Array" value="0x04"/>
9668 <const name="FlagMask" value="0x07"/>
9669 </enum>
9670
9671 <enum
9672 name="HardDiskFormatCapabilities"
9673 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9674 >
9675 <desc>
9676 Hard disk format capability flags.
9677 </desc>
9678
9679 <const name="Uuid" value="0x01">
9680 <desc>
9681 Supports UUIDs as expected by VirtualBox code.
9682 </desc>
9683 </const>
9684
9685 <const name="CreateFixed" value="0x02">
9686 <desc>
9687 Supports creating fixed size images, allocating all space instantly.
9688 </desc>
9689 </const>
9690
9691 <const name="CreateDynamic" value="0x04">
9692 <desc>
9693 Supports creating dynamically growing images, allocating space on
9694 demand.
9695 </desc>
9696 </const>
9697
9698 <const name="CreateSplit2G" value="0x08">
9699 <desc>
9700 Supports creating images split in chunks of a bit less than 2 GBytes.
9701 </desc>
9702 </const>
9703
9704 <const name="Differencing" value="0x10">
9705 <desc>
9706 Supports being used as a format for differencing hard disks (see <link
9707 to="IHardDisk::createDiffStorage"/>).
9708 </desc>
9709 </const>
9710
9711 <const name="Asynchronous" value="0x20">
9712 <desc>
9713 Supports asynchronous I/O operations for at least some configurations.
9714 </desc>
9715 </const>
9716
9717 <const name="File" value="0x40">
9718 <desc>
9719 The format backend operates on files (the <link to="IMedium::location"/>
9720 attribute of the hard disk specifies a file used to store hard disk
9721 data; for a list of supported file extensions see
9722 <link to="IHardDiskFormat::fileExtensions"/>).
9723 </desc>
9724 </const>
9725
9726 <const name="Properties" value="0x80">
9727 <desc>
9728 The format backend uses the property interface to configure the storage
9729 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9730 method is used to get access to properties supported by the given hard
9731 disk format).
9732 </desc>
9733 </const>
9734
9735 <const name="CapabilityMask" value="0xFF"/>
9736 </enum>
9737
9738 <interface
9739 name="IHardDiskFormat" extends="$unknown"
9740 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9741 wsmap="managed"
9742 >
9743 <desc>
9744 The IHardDiskFormat interface represents a virtual hard disk format.
9745
9746 Each hard disk format has an associated backend which is used to handle
9747 hard disks stored in this format. This interface provides information
9748 about the properties of the associated backend.
9749
9750 Each hard disk format is identified by a string represented by the
9751 <link to="#id"/> attribute. This string is used in calls like
9752 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9753 format.
9754
9755 The list of all supported hard disk formats can be obtained using
9756 <link to="ISystemProperties::hardDiskFormats"/>.
9757
9758 <see>IHardDisk</see>
9759 </desc>
9760
9761 <attribute name="id" type="wstring" readonly="yes">
9762 <desc>
9763 Identifier of this format.
9764
9765 The format identifier is a non-null non-empty ASCII string. Note that
9766 this string is case-insensitive. This means that, for example, all of
9767 the following strings:
9768 <pre>
9769 "VDI"
9770 "vdi"
9771 "VdI"</pre>
9772 refer to the same hard disk format.
9773
9774 This string is used in methods of other interfaces where it is necessary
9775 to specify a hard disk format, such as
9776 <link to="IVirtualBox::createHardDisk"/>.
9777 </desc>
9778 </attribute>
9779
9780 <attribute name="name" type="wstring" readonly="yes">
9781 <desc>
9782 Human readable description of this format.
9783
9784 Mainly for use in file open dialogs.
9785 </desc>
9786 </attribute>
9787
9788 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9789 <desc>
9790 Array of strings containing the supported file extensions.
9791
9792 The first extension in the array is the extension preferred by the
9793 backend. It is recommended to use this extension when specifying a
9794 location of the storage unit for a new hard disk.
9795
9796 Note that some backends do not work on files, so this array may be
9797 empty.
9798
9799 <see>IHardDiskFormat::capabilities</see>
9800 </desc>
9801 </attribute>
9802
9803 <attribute name="capabilities" type="unsigned long" readonly="yes">
9804 <desc>
9805 Capabilities of the format as a set of bit flags.
9806
9807 For the meaning of individual capability flags see
9808 <link to="HardDiskFormatCapabilities"/>.
9809 </desc>
9810 </attribute>
9811
9812 <method name="describeProperties">
9813 <desc>
9814 Returns several arrays describing the properties supported by this
9815 format.
9816
9817 An element with the given index in each array describes one
9818 property. Thus, the number of elements in each returned array is the
9819 same and corresponds to the number of supported properties.
9820
9821 The returned arrays are filled in only if the
9822 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9823 All arguments must be non-NULL.
9824
9825 <see>DataType</see>
9826 <see>DataFlags</see>
9827 </desc>
9828
9829 <param name="names" type="wstring" safearray="yes" dir="out">
9830 <desc>Array of property names.</desc>
9831 </param>
9832 <param name="description" type="wstring" safearray="yes" dir="out">
9833 <desc>Array of property descriptions.</desc>
9834 </param>
9835 <param name="types" type="DataType" safearray="yes" dir="out">
9836 <desc>Array of property types.</desc>
9837 </param>
9838 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9839 <desc>Array of property flags.</desc>
9840 </param>
9841 <param name="defaults" type="wstring" safearray="yes" dir="out">
9842 <desc>Array of default property values.</desc>
9843 </param>
9844 </method>
9845
9846 </interface>
9847
9848
9849 <!--
9850 // IFloppyImage
9851 /////////////////////////////////////////////////////////////////////////
9852 -->
9853
9854 <interface
9855 name="IFloppyImage" extends="IMedium"
9856 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9857 wsmap="managed"
9858 >
9859 <desc>
9860 The IFloppyImage interface represents a medium containing the image
9861 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9862 </desc>
9863
9864 </interface>
9865
9866
9867 <!--
9868 // IDVDImage
9869 /////////////////////////////////////////////////////////////////////////
9870 -->
9871
9872 <interface
9873 name="IDVDImage" extends="IMedium"
9874 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9875 wsmap="managed"
9876 >
9877 <desc>
9878 The IDVDImage interface represents a medium containing the image
9879 of a CD or DVD disk in the ISO format.
9880
9881 This is a subclass of <link to="IMedium" />; see remarks there.
9882 </desc>
9883
9884 </interface>
9885
9886
9887 <!--
9888 // IDVDDrive
9889 /////////////////////////////////////////////////////////////////////////
9890 -->
9891
9892 <interface
9893 name="IDVDDrive" extends="$unknown"
9894 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9895 wsmap="managed"
9896 >
9897 <desc>
9898 The IDVDDrive interface represents the virtual CD/DVD drive of the
9899 virtual machine. An object of this type is returned by
9900 <link to="IMachine::DVDDrive"/>.
9901 </desc>
9902
9903 <attribute name="state" type="DriveState" readonly="yes">
9904 <desc>Current drive state.</desc>
9905 </attribute>
9906
9907 <attribute name="passthrough" type="boolean">
9908 <desc>
9909 When a host drive is mounted and passthrough is enabled
9910 the guest OS will be able to directly send SCSI commands to
9911 the host drive. This enables the guest OS to use CD/DVD writers
9912 but is potentially dangerous.
9913 </desc>
9914 </attribute>
9915
9916 <method name="mountImage">
9917 <desc>Mounts a CD/DVD image with the specified UUID.
9918
9919 <result name="VBOX_E_FILE_ERROR">
9920 Invalid image file location.
9921 </result>
9922 <result name="VBOX_E_OBJECT_NOT_FOUND">
9923 Could not find a CD/DVD image matching @a imageId.
9924 </result>
9925 <result name="VBOX_E_INVALID_OBJECT_STATE">
9926 Invalid media state.
9927 </result>
9928
9929 </desc>
9930 <param name="imageId" type="uuid" dir="in"/>
9931 </method>
9932
9933 <method name="captureHostDrive">
9934 <desc>Captures the specified host CD/DVD drive.</desc>
9935 <param name="drive" type="IHostDVDDrive" dir="in"/>
9936 </method>
9937
9938 <method name="unmount">
9939 <desc>Unmounts the currently mounted image or host drive.</desc>
9940 </method>
9941
9942 <method name="getImage">
9943 <desc>Returns the currently mounted CD/DVD image.</desc>
9944 <param name="image" type="IDVDImage" dir="return"/>
9945 </method>
9946
9947 <method name="getHostDrive">
9948 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9949 <param name="drive" type="IHostDVDDrive" dir="return"/>
9950 </method>
9951
9952 </interface>
9953
9954
9955 <!--
9956 // IFloppyDrive
9957 /////////////////////////////////////////////////////////////////////////
9958 -->
9959
9960 <interface
9961 name="IFloppyDrive" extends="$unknown"
9962 uuid="159412cd-bab8-452e-8097-218a020825a6"
9963 wsmap="managed"
9964 >
9965 <desc>
9966 The IFloppyDrive interface represents the virtual floppy drive of the
9967 virtual machine. An object of this type is returned by
9968 <link to="IMachine::floppyDrive" />.
9969 </desc>
9970
9971 <attribute name="enabled" type="boolean">
9972 <desc>
9973 Flag whether the floppy drive is enabled. If it is disabled,
9974 the floppy drive will not be reported to the guest OS.
9975 </desc>
9976 </attribute>
9977
9978 <attribute name="state" type="DriveState" readonly="yes">
9979 <desc>Current drive state.</desc>
9980 </attribute>
9981
9982 <method name="mountImage">
9983 <desc>Mounts a floppy image with the specified UUID.
9984
9985 <result name="VBOX_E_FILE_ERROR">
9986 Invalid image file location.
9987 </result>
9988 <result name="VBOX_E_OBJECT_NOT_FOUND">
9989 Could not find a floppy image matching @a imageID.
9990 </result>
9991 <result name="VBOX_E_INVALID_OBJECT_STATE">
9992 Invalid media state.
9993 </result>
9994
9995 </desc>
9996 <param name="imageId" type="uuid" dir="in"/>
9997 </method>
9998
9999 <method name="captureHostDrive">
10000 <desc>Captures the specified host floppy drive.</desc>
10001 <param name="drive" type="IHostFloppyDrive" dir="in"/>
10002 </method>
10003
10004 <method name="unmount">
10005 <desc>Unmounts the currently mounted image or host drive.</desc>
10006 </method>
10007
10008 <method name="getImage">
10009 <desc>Returns the currently mounted floppy image.</desc>
10010 <param name="image" type="IFloppyImage" dir="return"/>
10011 </method>
10012
10013 <method name="getHostDrive">
10014 <desc>Returns the currently mounted host floppy drive.</desc>
10015 <param name="drive" type="IHostFloppyDrive" dir="return"/>
10016 </method>
10017
10018 </interface>
10019
10020
10021 <!--
10022 // IKeyboard
10023 /////////////////////////////////////////////////////////////////////////
10024 -->
10025
10026 <interface
10027 name="IKeyboard" extends="$unknown"
10028 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10029 wsmap="managed"
10030 >
10031 <desc>
10032 The IKeyboard interface represents the virtual machine's keyboard. Used
10033 in <link to="IConsole::keyboard"/>.
10034
10035 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10036 to the virtual machine.
10037
10038 </desc>
10039 <method name="putScancode">
10040 <desc>Sends a scancode to the keyboard.
10041
10042 <result name="VBOX_E_IPRT_ERROR">
10043 Could not send scan code to virtual keyboard.
10044 </result>
10045
10046 </desc>
10047 <param name="scancode" type="long" dir="in"/>
10048 </method>
10049
10050 <method name="putScancodes">
10051 <desc>Sends an array of scancodes to the keyboard.
10052
10053 <result name="VBOX_E_IPRT_ERROR">
10054 Could not send all scan codes to virtual keyboard.
10055 </result>
10056
10057 </desc>
10058 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10059 <param name="codesStored" type="unsigned long" dir="return"/>
10060 </method>
10061
10062 <method name="putCAD">
10063 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10064 function is nothing special, it is just a convenience function
10065 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10066
10067 <result name="VBOX_E_IPRT_ERROR">
10068 Could not send all scan codes to virtual keyboard.
10069 </result>
10070
10071 </desc>
10072 </method>
10073
10074 </interface>
10075
10076
10077 <!--
10078 // IMouse
10079 /////////////////////////////////////////////////////////////////////////
10080 -->
10081
10082 <enum
10083 name="MouseButtonState"
10084 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
10085 >
10086 <desc>
10087 Mouse button state.
10088 </desc>
10089
10090 <const name="LeftButton" value="0x01"/>
10091 <const name="RightButton" value="0x02"/>
10092 <const name="MiddleButton" value="0x04"/>
10093 <const name="WheelUp" value="0x08"/>
10094 <const name="WheelDown" value="0x10"/>
10095 <const name="MouseStateMask" value="0x1F"/>
10096 </enum>
10097
10098 <interface
10099 name="IMouse" extends="$unknown"
10100 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
10101 wsmap="managed"
10102 >
10103 <desc>
10104 The IMouse interface represents the virtual machine's mouse. Used in
10105 <link to="IConsole::mouse"/>.
10106
10107 Through this interface, the virtual machine's virtual mouse can be
10108 controlled.
10109 </desc>
10110
10111 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10112 <desc>
10113 Whether the guest OS supports absolute mouse pointer positioning
10114 or not.
10115 <note>
10116 VirtualBox Guest Tools need to be installed to the guest OS
10117 in order to enable absolute mouse positioning support.
10118 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10119 callback to be instantly informed about changes of this attribute
10120 during virtual machine execution.
10121 </note>
10122 <see><link to="#putMouseEventAbsolute"/></see>
10123 </desc>
10124 </attribute>
10125
10126 <method name="putMouseEvent">
10127 <desc>
10128 Initiates a mouse event using relative pointer movements
10129 along x and y axis.
10130
10131 <result name="E_ACCESSDENIED">
10132 Console not powered up.
10133 </result>
10134 <result name="VBOX_E_IPRT_ERROR">
10135 Could not send mouse event to virtual mouse.
10136 </result>
10137
10138 </desc>
10139
10140 <param name="dx" type="long" dir="in">
10141 <desc>
10142 Amount of pixels the mouse should move to the right.
10143 Negative values move the mouse to the left.
10144 </desc>
10145 </param>
10146 <param name="dy" type="long" dir="in">
10147 <desc>
10148 Amount of pixels the mouse should move downwards.
10149 Negative values move the mouse upwards.
10150 </desc>
10151 </param>
10152 <param name="dz" type="long" dir="in">
10153 <desc>
10154 Amount of mouse wheel moves.
10155 Positive values describe clockwise wheel rotations,
10156 negative values describe counterclockwise rotations.
10157 </desc>
10158 </param>
10159 <param name="buttonState" type="long" dir="in">
10160 <desc>
10161 The current state of mouse buttons. Every bit represents
10162 a mouse button as follows:
10163 <table>
10164 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10165 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10166 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10167 </table>
10168 A value of <tt>1</tt> means the corresponding button is pressed.
10169 otherwise it is released.
10170 </desc>
10171 </param>
10172 </method>
10173
10174 <method name="putMouseEventAbsolute">
10175 <desc>
10176 Positions the mouse pointer using absolute x and y coordinates.
10177 These coordinates are expressed in pixels and
10178 start from <tt>[1,1]</tt> which corresponds to the top left
10179 corner of the virtual display.
10180
10181 <result name="E_ACCESSDENIED">
10182 Console not powered up.
10183 </result>
10184 <result name="VBOX_E_IPRT_ERROR">
10185 Could not send mouse event to virtual mouse.
10186 </result>
10187
10188 <note>
10189 This method will have effect only if absolute mouse
10190 positioning is supported by the guest OS.
10191 </note>
10192
10193 <see><link to="#absoluteSupported"/></see>
10194 </desc>
10195
10196 <param name="x" type="long" dir="in">
10197 <desc>
10198 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
10199 </desc>
10200 </param>
10201 <param name="y" type="long" dir="in">
10202 <desc>
10203 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
10204 </desc>
10205 </param>
10206 <param name="dz" type="long" dir="in">
10207 <desc>
10208 Amount of mouse wheel moves.
10209 Positive values describe clockwise wheel rotations,
10210 negative values describe counterclockwise rotations.
10211 </desc>
10212 </param>
10213 <param name="buttonState" type="long" dir="in">
10214 <desc>
10215 The current state of mouse buttons. Every bit represents
10216 a mouse button as follows:
10217 <table>
10218 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10219 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10220 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10221 </table>
10222 A value of <tt>1</tt> means the corresponding button is pressed.
10223 otherwise it is released.
10224 </desc>
10225 </param>
10226 </method>
10227
10228 </interface>
10229
10230 <!--
10231 // IDisplay
10232 /////////////////////////////////////////////////////////////////////////
10233 -->
10234
10235 <enum
10236 name="FramebufferAccelerationOperation"
10237 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
10238 >
10239 <desc>
10240 Frame buffer acceleration operation.
10241 </desc>
10242
10243 <const name="SolidFillAcceleration" value="1"/>
10244 <const name="ScreenCopyAcceleration" value="2"/>
10245 </enum>
10246
10247 <enum
10248 name="FramebufferPixelFormat"
10249 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10250 >
10251 <desc>
10252 Format of the video memory buffer. Constants represented by this enum can
10253 be used to test for particular values of <link
10254 to="IFramebuffer::pixelFormat"/>. See also <link
10255 to="IFramebuffer::requestResize"/>.
10256
10257 See also www.fourcc.org for more information about FOURCC pixel formats.
10258 </desc>
10259
10260 <const name="Opaque" value="0">
10261 <desc>
10262 Unknown buffer format (the user may not assume any particular format of
10263 the buffer).
10264 </desc>
10265 </const>
10266 <const name="FOURCC_RGB" value="0x32424752">
10267 <desc>
10268 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10269 bit layout).
10270 </desc>
10271 </const>
10272 </enum>
10273
10274 <interface
10275 name="IFramebuffer" extends="$unknown"
10276 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
10277 wsmap="suppress"
10278 >
10279 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10280 <desc>Address of the start byte of the frame buffer.</desc>
10281 </attribute>
10282
10283 <attribute name="width" type="unsigned long" readonly="yes">
10284 <desc>Frame buffer width, in pixels.</desc>
10285 </attribute>
10286
10287 <attribute name="height" type="unsigned long" readonly="yes">
10288 <desc>Frame buffer height, in pixels.</desc>
10289 </attribute>
10290
10291 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10292 <desc>
10293 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10294 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10295 are: 8, 15, 16, 24 and 32.
10296 </desc>
10297 </attribute>
10298
10299 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10300 <desc>
10301 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10302 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10303 size of the scan line must be aligned to 32 bits.
10304 </desc>
10305 </attribute>
10306
10307 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10308 <desc>
10309 Frame buffer pixel format. It's either one of the values defined by <link
10310 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10311 <note>
10312 This attribute must never return <link
10313 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10314 <link to="#address"/> points to must be always known.
10315 </note>
10316 </desc>
10317 </attribute>
10318
10319 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10320 <desc>
10321 Defines whether this frame buffer uses the virtual video card's memory
10322 buffer (guest VRAM) directly or not. See <link
10323 to="IFramebuffer::requestResize"/> for more information.
10324 </desc>
10325 </attribute>
10326
10327 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10328 <desc>
10329 Hint from the frame buffer about how much of the standard
10330 screen height it wants to use for itself. This information is
10331 exposed to the guest through the VESA BIOS and VMMDev interface
10332 so that it can use it for determining its video mode table. It
10333 is not guaranteed that the guest respects the value.
10334 </desc>
10335 </attribute>
10336
10337 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10338 <desc>
10339 An alpha-blended overlay which is superposed over the frame buffer.
10340 The initial purpose is to allow the display of icons providing
10341 information about the VM state, including disk activity, in front
10342 ends which do not have other means of doing that. The overlay is
10343 designed to controlled exclusively by IDisplay. It has no locking
10344 of its own, and any changes made to it are not guaranteed to be
10345 visible until the affected portion of IFramebuffer is updated. The
10346 overlay can be created lazily the first time it is requested. This
10347 attribute can also return NULL to signal that the overlay is not
10348 implemented.
10349 </desc>
10350 </attribute>
10351
10352 <attribute name="winId" type="unsigned long long" readonly="yes">
10353 <desc>
10354 Platform-dependent identifier of the window where context of this
10355 frame buffer is drawn, or zero if there's no such window.
10356 </desc>
10357 </attribute>
10358
10359 <method name="lock">
10360 <desc>
10361 Locks the frame buffer.
10362 Gets called by the IDisplay object where this frame buffer is
10363 bound to.
10364 </desc>
10365 </method>
10366
10367 <method name="unlock">
10368 <desc>
10369 Unlocks the frame buffer.
10370 Gets called by the IDisplay object where this frame buffer is
10371 bound to.
10372 </desc>
10373 </method>
10374
10375 <method name="notifyUpdate">
10376 <desc>
10377 Informs about an update.
10378 Gets called by the display object where this buffer is
10379 registered.
10380 </desc>
10381 <param name="x" type="unsigned long" dir="in"/>
10382 <param name="y" type="unsigned long" dir="in"/>
10383 <param name="width" type="unsigned long" dir="in"/>
10384 <param name="height" type="unsigned long" dir="in"/>
10385 <param name="finished" type="boolean" dir="return"/>
10386 </method>
10387
10388 <method name="requestResize">
10389 <desc>
10390 Requests a size and pixel format change.
10391
10392 There are two modes of working with the video buffer of the virtual
10393 machine. The <i>indirect</i> mode implies that the IFramebuffer
10394 implementation allocates a memory buffer for the requested display mode
10395 and provides it to the virtual machine. In <i>direct</i> mode, the
10396 IFramebuffer implementation uses the memory buffer allocated and owned
10397 by the virtual machine. This buffer represents the video memory of the
10398 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10399 usually faster because the implementation gets a raw pointer to the
10400 guest VRAM buffer which it can directly use for visualizing the contents
10401 of the virtual display, as opposed to the indirect mode where the
10402 contents of guest VRAM are copied to the memory buffer provided by
10403 the implementation every time a display update occurs.
10404
10405 It is important to note that the direct mode is really fast only when
10406 the implementation uses the given guest VRAM buffer directly, for
10407 example, by blitting it to the window representing the virtual machine's
10408 display, which saves at least one copy operation comparing to the
10409 indirect mode. However, using the guest VRAM buffer directly is not
10410 always possible: the format and the color depth of this buffer may be
10411 not supported by the target window, or it may be unknown (opaque) as in
10412 case of text or non-linear multi-plane VGA video modes. In this case,
10413 the indirect mode (that is always available) should be used as a
10414 fallback: when the guest VRAM contents are copied to the
10415 implementation-provided memory buffer, color and format conversion is
10416 done automatically by the underlying code.
10417
10418 The @a pixelFormat parameter defines whether the direct mode is
10419 available or not. If @a pixelFormat is <link
10420 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10421 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10422 @a bytesPerLine parameters must be ignored and the implementation must use
10423 the indirect mode (where it provides its own buffer in one of the
10424 supported formats). In all other cases, @a pixelFormat together with
10425 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10426 buffer pointed to by the @a VRAM parameter and the implementation is
10427 free to choose which mode to use. To indicate that this frame buffer uses
10428 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10429 attribute must return <tt>true</tt> and <link to="#address"/> must
10430 return exactly the same address that is passed in the @a VRAM parameter
10431 of this method; otherwise it is assumed that the indirect strategy is
10432 chosen.
10433
10434 The @a width and @a height parameters represent the size of the
10435 requested display mode in both modes. In case of indirect mode, the
10436 provided memory buffer should be big enough to store data of the given
10437 display mode. In case of direct mode, it is guaranteed that the given
10438 @a VRAM buffer contains enough space to represent the display mode of the
10439 given size. Note that this frame buffer's <link to="#width"/> and <link
10440 to="#height"/> attributes must return exactly the same values as
10441 passed to this method after the resize is completed (see below).
10442
10443 The @a finished output parameter determines if the implementation has
10444 finished resizing the frame buffer or not. If, for some reason, the
10445 resize cannot be finished immediately during this call, @a finished
10446 must be set to @c false, and the implementation must call
10447 <link to="IDisplay::resizeCompleted"/> after it has returned from
10448 this method as soon as possible. If @a finished is @c false, the
10449 machine will not call any frame buffer methods until
10450 <link to="IDisplay::resizeCompleted"/> is called.
10451
10452 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10453 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10454 this frame buffer must return exactly the same values as specified in the
10455 parameters of this method, after the resize is completed. If the
10456 indirect mode is chosen, these attributes must return values describing
10457 the format of the implementation's own memory buffer <link
10458 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10459 value must always correlate with <link to="#pixelFormat"/>. Note that
10460 the <link to="#pixelFormat"/> attribute must never return <link
10461 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10462
10463 <note>
10464 This method is called by the IDisplay object under the
10465 <link to="#lock"/> provided by this IFramebuffer
10466 implementation. If this method returns @c false in @a finished, then
10467 this lock is not released until
10468 <link to="IDisplay::resizeCompleted"/> is called.
10469 </note>
10470 </desc>
10471 <param name="screenId" type="unsigned long" dir="in">
10472 <desc>
10473 Logical screen number. Must be used in the corresponding call to
10474 <link to="IDisplay::resizeCompleted"/> if this call is made.
10475 </desc>
10476 </param>
10477 <param name="pixelFormat" type="unsigned long" dir="in">
10478 <desc>
10479 Pixel format of the memory buffer pointed to by @a VRAM.
10480 See also <link to="FramebufferPixelFormat"/>.
10481 </desc>
10482 </param>
10483 <param name="VRAM" type="octet" mod="ptr" dir="in">
10484 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10485 </param>
10486 <param name="bitsPerPixel" type="unsigned long" dir="in">
10487 <desc>Color depth, bits per pixel.</desc>
10488 </param>
10489 <param name="bytesPerLine" type="unsigned long" dir="in">
10490 <desc>Size of one scan line, in bytes.</desc>
10491 </param>
10492 <param name="width" type="unsigned long" dir="in">
10493 <desc>Width of the guest display, in pixels.</desc>
10494 </param>
10495 <param name="height" type="unsigned long" dir="in">
10496 <desc>Height of the guest display, in pixels.</desc>
10497 </param>
10498 <param name="finished" type="boolean" dir="return">
10499 <desc>
10500 Can the VM start using the new frame buffer immediately
10501 after this method returns or it should wait for
10502 <link to="IDisplay::resizeCompleted"/>.
10503 </desc>
10504 </param>
10505 </method>
10506
10507 <method name="operationSupported">
10508 <desc>
10509 Returns whether the given acceleration operation is supported
10510 by the IFramebuffer implementation. If not, the display object
10511 will not attempt to call the corresponding IFramebuffer entry
10512 point. Even if an operation is indicated as supported, the
10513 IFramebuffer implementation always has the option to return non
10514 supported from the corresponding acceleration method in which
10515 case the operation will be performed by the display engine. This
10516 allows for reduced IFramebuffer implementation complexity where
10517 only common cases are handled.
10518 </desc>
10519 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10520 <param name="supported" type="boolean" dir="return"/>
10521 </method>
10522
10523 <method name="videoModeSupported">
10524 <desc>
10525 Returns whether the frame buffer implementation is willing to
10526 support a given video mode. In case it is not able to render
10527 the video mode (or for some reason not willing), it should
10528 return false. Usually this method is called when the guest
10529 asks the VMM device whether a given video mode is supported
10530 so the information returned is directly exposed to the guest.
10531 It is important that this method returns very quickly.
10532 </desc>
10533 <param name="width" type="unsigned long" dir="in"/>
10534 <param name="height" type="unsigned long" dir="in"/>
10535 <param name="bpp" type="unsigned long" dir="in"/>
10536 <param name="supported" type="boolean" dir="return"/>
10537 </method>
10538
10539 <method name="solidFill">
10540 <desc>
10541 Fills the specified rectangle on screen with a solid color.
10542 </desc>
10543 <param name="x" type="unsigned long" dir="in"/>
10544 <param name="y" type="unsigned long" dir="in"/>
10545 <param name="width" type="unsigned long" dir="in"/>
10546 <param name="height" type="unsigned long" dir="in"/>
10547 <param name="color" type="unsigned long" dir="in"/>
10548 <param name="handled" type="boolean" dir="return"/>
10549 </method>
10550
10551 <method name="copyScreenBits">
10552 <desc>
10553 Copies specified rectangle on the screen.
10554 </desc>
10555 <param name="xDst" type="unsigned long" dir="in"/>
10556 <param name="yDst" type="unsigned long" dir="in"/>
10557 <param name="xSrc" type="unsigned long" dir="in"/>
10558 <param name="ySrc" type="unsigned long" dir="in"/>
10559 <param name="width" type="unsigned long" dir="in"/>
10560 <param name="height" type="unsigned long" dir="in"/>
10561 <param name="handled" type="boolean" dir="return"/>
10562 </method>
10563
10564 <method name="getVisibleRegion">
10565 <desc>
10566 Returns the visible region of this frame buffer.
10567
10568 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10569 @a count parameter is ignored and the number of elements necessary to
10570 describe the current visible region is returned in @a countCopied.
10571
10572 If @a rectangles is not <tt>NULL</tt> but @a count is less
10573 than the required number of elements to store region data, the method
10574 will report a failure. If @a count is equal or greater than the
10575 required number of elements, then the actual number of elements copied
10576 to the provided array will be returned in @a countCopied.
10577
10578 <note>
10579 The address of the provided array must be in the process space of
10580 this IFramebuffer object.
10581 </note>
10582 <note>
10583 Method not yet implemented.
10584 </note>
10585 </desc>
10586 <param name="rectangles" type="octet" mod="ptr" dir="in">
10587 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10588 </param>
10589 <param name="count" type="unsigned long" dir="in">
10590 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10591 </param>
10592 <param name="countCopied" type="unsigned long" dir="return">
10593 <desc>Number of elements copied to the @a rectangles array.</desc>
10594 </param>
10595 </method>
10596
10597 <method name="setVisibleRegion">
10598 <desc>
10599 Suggests a new visible region to this frame buffer. This region
10600 represents the area of the VM display which is a union of regions of
10601 all top-level windows of the guest operating system running inside the
10602 VM (if the Guest Additions for this system support this
10603 functionality). This information may be used by the frontends to
10604 implement the seamless desktop integration feature.
10605
10606 <note>
10607 The address of the provided array must be in the process space of
10608 this IFramebuffer object.
10609 </note>
10610 <note>
10611 The IFramebuffer implementation must make a copy of the provided
10612 array of rectangles.
10613 </note>
10614 <note>
10615 Method not yet implemented.
10616 </note>
10617 </desc>
10618 <param name="rectangles" type="octet" mod="ptr" dir="in">
10619 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10620 </param>
10621 <param name="count" type="unsigned long" dir="in">
10622 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10623 </param>
10624 </method>
10625
10626 </interface>
10627
10628 <interface
10629 name="IFramebufferOverlay" extends="IFramebuffer"
10630 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10631 wsmap="suppress"
10632 >
10633 <desc>
10634 The IFramebufferOverlay interface represents an alpha blended overlay
10635 for displaying status icons above an IFramebuffer. It is always created
10636 not visible, so that it must be explicitly shown. It only covers a
10637 portion of the IFramebuffer, determined by its width, height and
10638 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10639 that order) format, and may be written to directly. Do re-read the
10640 width though, after setting it, as it may be adjusted (increased) to
10641 make it more suitable for the front end.
10642 </desc>
10643 <attribute name="x" type="unsigned long" readonly="yes">
10644 <desc>X position of the overlay, relative to the frame buffer.</desc>
10645 </attribute>
10646
10647 <attribute name="y" type="unsigned long" readonly="yes">
10648 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10649 </attribute>
10650
10651 <attribute name="visible" type="boolean" readonly="no">
10652 <desc>
10653 Whether the overlay is currently visible.
10654 </desc>
10655 </attribute>
10656
10657 <attribute name="alpha" type="unsigned long" readonly="no">
10658 <desc>
10659 The global alpha value for the overlay. This may or may not be
10660 supported by a given front end.
10661 </desc>
10662 </attribute>
10663
10664 <method name="move">
10665 <desc>
10666 Changes the overlay's position relative to the IFramebuffer.
10667 </desc>
10668 <param name="x" type="unsigned long" dir="in"/>
10669 <param name="y" type="unsigned long" dir="in"/>
10670 </method>
10671
10672 </interface>
10673
10674 <interface
10675 name="IDisplay" extends="$unknown"
10676 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10677 wsmap="suppress"
10678 >
10679 <desc>
10680 The IDisplay interface represents the virtual machine's display.
10681
10682 The object implementing this interface is contained in each
10683 <link to="IConsole::display"/> attribute and represents the visual
10684 output of the virtual machine.
10685
10686 The virtual display supports pluggable output targets represented by the
10687 IFramebuffer interface. Examples of the output target are a window on
10688 the host computer or an RDP session's display on a remote computer.
10689 </desc>
10690 <attribute name="width" type="unsigned long" readonly="yes">
10691 <desc>Current display width.</desc>
10692 </attribute>
10693
10694 <attribute name="height" type="unsigned long" readonly="yes">
10695 <desc>Current display height.</desc>
10696 </attribute>
10697
10698 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10699 <desc>
10700 Current guest display color depth. Note that this may differ
10701 from <link to="IFramebuffer::bitsPerPixel"/>.
10702 </desc>
10703 </attribute>
10704
10705 <method name="setupInternalFramebuffer">
10706 <desc>
10707 Prepares an internally managed frame buffer.
10708 </desc>
10709 <param name="depth" type="unsigned long" dir="in"/>
10710 </method>
10711
10712 <method name="lockFramebuffer">
10713 <desc>
10714 Requests access to the internal frame buffer.
10715
10716 <result name="VBOX_E_NOT_SUPPORTED">
10717 Attempt to lock a non-internal frame buffer.
10718 </result>
10719
10720 </desc>
10721 <param name="address" type="octet" mod="ptr" dir="return"/>
10722 </method>
10723
10724 <method name="unlockFramebuffer">
10725 <desc>
10726 Releases access to the internal frame buffer.
10727
10728 <result name="VBOX_E_NOT_SUPPORTED">
10729 Attempt to unlock a non-internal frame buffer.
10730 </result>
10731
10732 </desc>
10733 </method>
10734
10735 <method name="registerExternalFramebuffer">
10736 <desc>
10737 Registers an external frame buffer.
10738 </desc>
10739 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10740 </method>
10741
10742 <method name="setFramebuffer">
10743 <desc>
10744 Sets the framebuffer for given screen.
10745 </desc>
10746 <param name="screenId" type="unsigned long" dir="in"/>
10747 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10748 </method>
10749
10750 <method name="getFramebuffer">
10751 <desc>
10752 Queries the framebuffer for given screen.
10753 </desc>
10754 <param name="screenId" type="unsigned long" dir="in"/>
10755 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10756 <param name="xOrigin" type="long" dir="out"/>
10757 <param name="yOrigin" type="long" dir="out"/>
10758 </method>
10759
10760 <method name="setVideoModeHint">
10761 <desc>
10762 Asks VirtualBox to request the given video mode from
10763 the guest. This is just a hint and it cannot be guaranteed
10764 that the requested resolution will be used. Guest Additions
10765 are required for the request to be seen by guests. The caller
10766 should issue the request and wait for a resolution change and
10767 after a timeout retry.
10768
10769 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10770 parameters means that the corresponding values should be taken from the
10771 current video mode (i.e. left unchanged).
10772
10773 If the guest OS supports multi-monitor configuration then the @a display
10774 parameter specifies the number of the guest display to send the hint to:
10775 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10776 so on. If the multi-monitor configuration is not supported, @a display
10777 must be <tt>0</tt>.
10778
10779 <result name="E_INVALIDARG">
10780 The @a display is not associated with any monitor.
10781 </result>
10782
10783 </desc>
10784 <param name="width" type="unsigned long" dir="in"/>
10785 <param name="height" type="unsigned long" dir="in"/>
10786 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10787 <param name="display" type="unsigned long" dir="in"/>
10788 </method>
10789
10790 <method name="setSeamlessMode">
10791 <desc>
10792 Enables or disables seamless guest display rendering (seamless desktop
10793 integration) mode.
10794 <note>
10795 Calling this method has no effect if <link
10796 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10797 </note>
10798 </desc>
10799 <param name="enabled" type="boolean" dir="in"/>
10800 </method>
10801
10802 <method name="takeScreenShot">
10803 <desc>
10804 Takes a screen shot of the requested size and copies it to the
10805 32-bpp buffer allocated by the caller.
10806
10807 <result name="E_NOTIMPL">
10808 Feature not implemented.
10809 </result>
10810 <result name="VBOX_E_IPRT_ERROR">
10811 Could not take a screenshot.
10812 </result>
10813
10814 </desc>
10815 <param name="address" type="octet" mod="ptr" dir="in"/>
10816 <param name="width" type="unsigned long" dir="in"/>
10817 <param name="height" type="unsigned long" dir="in"/>
10818 </method>
10819
10820 <method name="drawToScreen">
10821 <desc>
10822 Draws a 32-bpp image of the specified size from the given buffer
10823 to the given point on the VM display.
10824
10825 <result name="E_NOTIMPL">
10826 Feature not implemented.
10827 </result>
10828 <result name="VBOX_E_IPRT_ERROR">
10829 Could not draw to screen.
10830 </result>
10831
10832 </desc>
10833 <param name="address" type="octet" mod="ptr" dir="in"/>
10834 <param name="x" type="unsigned long" dir="in"/>
10835 <param name="y" type="unsigned long" dir="in"/>
10836 <param name="width" type="unsigned long" dir="in"/>
10837 <param name="height" type="unsigned long" dir="in"/>
10838 </method>
10839
10840 <method name="invalidateAndUpdate">
10841 <desc>
10842 Does a full invalidation of the VM display and instructs the VM
10843 to update it.
10844
10845 <result name="VBOX_E_IPRT_ERROR">
10846 Could not invalidate and update screen.
10847 </result>
10848
10849 </desc>
10850 </method>
10851
10852 <method name="resizeCompleted">
10853 <desc>
10854 Signals that a framebuffer has completed the resize operation.
10855
10856 <result name="VBOX_E_NOT_SUPPORTED">
10857 Operation only valid for external frame buffers.
10858 </result>
10859
10860 </desc>
10861 <param name="screenId" type="unsigned long" dir="in"/>
10862 </method>
10863
10864 <method name="updateCompleted">
10865 <desc>
10866 Signals that a framebuffer has completed the update operation.
10867
10868 <result name="VBOX_E_NOT_SUPPORTED">
10869 Operation only valid for external frame buffers.
10870 </result>
10871
10872 </desc>
10873 </method>
10874
10875 </interface>
10876
10877 <!--
10878 // INetworkAdapter
10879 /////////////////////////////////////////////////////////////////////////
10880 -->
10881
10882 <enum
10883 name="NetworkAttachmentType"
10884 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10885 >
10886 <desc>
10887 Network attachment type.
10888 </desc>
10889
10890 <const name="Null" value="0">
10891 <desc>Null value, also means "not attached".</desc>
10892 </const>
10893 <const name="NAT" value="1"/>
10894 <const name="Bridged" value="2"/>
10895 <const name="Internal" value="3"/>
10896 <const name="HostOnly" value="4"/>
10897 </enum>
10898
10899 <enum
10900 name="NetworkAdapterType"
10901 uuid="50c3dfd8-07ac-4a31-baac-519c828fbf97"
10902 >
10903 <desc>
10904 Network adapter type.
10905 </desc>
10906
10907 <const name="Null" value="0">
10908 <desc>Null value (never used by the API).</desc>
10909 </const>
10910 <const name="Am79C970A" value="1">
10911 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10912 </const>
10913 <const name="Am79C973" value="2">
10914 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10915 </const>
10916 <const name="I82540EM" value="3">
10917 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10918 </const>
10919 <const name="I82543GC" value="4">
10920 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10921 </const>
10922 <const name="I82545EM" value="5">
10923 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10924 </const>
10925 </enum>
10926
10927 <interface
10928 name="INetworkAdapter" extends="$unknown"
10929 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10930 wsmap="managed"
10931 >
10932 <desc>
10933 Represents a virtual network adapter that is attached to a virtual machine.
10934 Each virtual machine has a fixed number of network adapter slots with one
10935 instance of this attached to each of them. Call
10936 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10937 is attached to a given slot in a given machine.
10938
10939 Each network adapter can be in one of five attachment modes, which are
10940 represented by the <link to="NetworkAttachmentType" /> enumeration;
10941 see the <link to="#attachmentType" /> attribute.
10942 </desc>
10943
10944 <attribute name="adapterType" type="NetworkAdapterType">
10945 <desc>
10946 Type of the virtual network adapter. Depending on this value,
10947 VirtualBox will provide a different virtual network hardware
10948 to the guest.
10949 </desc>
10950 </attribute>
10951
10952 <attribute name="slot" type="unsigned long" readonly="yes">
10953 <desc>
10954 Slot number this adapter is plugged into. Corresponds to
10955 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10956 to obtain this instance.
10957 </desc>
10958 </attribute>
10959
10960 <attribute name="enabled" type="boolean">
10961 <desc>
10962 Flag whether the network adapter is present in the
10963 guest system. If disabled, the virtual guest hardware will
10964 not contain this network adapter. Can only be changed when
10965 the VM is not running.
10966 </desc>
10967 </attribute>
10968
10969 <attribute name="MACAddress" type="wstring">
10970 <desc>
10971 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10972 it to NULL, VirtualBox will generate a unique MAC address.
10973 </desc>
10974 </attribute>
10975
10976 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10977
10978 <attribute name="hostInterface" type="wstring">
10979 <desc>
10980 Name of the host network interface the VM is attached to.
10981 </desc>
10982 </attribute>
10983
10984 <attribute name="internalNetwork" type="wstring">
10985 <desc>
10986 Name of the internal network the VM is attached to.
10987 </desc>
10988 </attribute>
10989
10990 <attribute name="NATNetwork" type="wstring">
10991 <desc>
10992 Name of the NAT network the VM is attached to.
10993 </desc>
10994 </attribute>
10995
10996 <attribute name="cableConnected" type="boolean">
10997 <desc>
10998 Flag whether the adapter reports the cable as connected or not.
10999 It can be used to report offline situations to a VM.
11000 </desc>
11001 </attribute>
11002
11003 <attribute name="lineSpeed" type="unsigned long">
11004 <desc>
11005 Line speed reported by custom drivers, in units of 1 kbps.
11006 </desc>
11007 </attribute>
11008
11009 <attribute name="traceEnabled" type="boolean">
11010 <desc>
11011 Flag whether network traffic from/to the network card should be traced.
11012 Can only be toggled when the VM is turned off.
11013 </desc>
11014 </attribute>
11015
11016 <attribute name="traceFile" type="wstring">
11017 <desc>
11018 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11019 will be used.
11020 </desc>
11021 </attribute>
11022
11023 <method name="attachToNAT">
11024 <desc>
11025 Attach the network adapter to the Network Address Translation (NAT) interface.
11026 </desc>
11027 </method>
11028
11029 <method name="attachToBridgedInterface">
11030 <desc>
11031 Attach the network adapter to a bridged host interface.
11032 </desc>
11033 </method>
11034
11035 <method name="attachToInternalNetwork">
11036 <desc>
11037 Attach the network adapter to an internal network.
11038 </desc>
11039 </method>
11040
11041 <method name="attachToHostOnlyInterface">
11042 <desc>
11043 Attach the network adapter to the host-only network.
11044 </desc>
11045 </method>
11046
11047 <method name="detach">
11048 <desc>
11049 Detach the network adapter
11050 </desc>
11051 </method>
11052 </interface>
11053
11054
11055 <!--
11056 // ISerialPort
11057 /////////////////////////////////////////////////////////////////////////
11058 -->
11059
11060 <enum
11061 name="PortMode"
11062 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
11063 >
11064 <desc>
11065 The PortMode enumeration represents possible communication modes for
11066 the virtual serial port device.
11067 </desc>
11068
11069 <const name="Disconnected" value="0">
11070 <desc>Virtual device is not attached to any real host device.</desc>
11071 </const>
11072 <const name="HostPipe" value="1">
11073 <desc>Virtual device is attached to a host pipe.</desc>
11074 </const>
11075 <const name="HostDevice" value="2">
11076 <desc>Virtual device is attached to a host device.</desc>
11077 </const>
11078 </enum>
11079
11080 <interface
11081 name="ISerialPort" extends="$unknown"
11082 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11083 wsmap="managed"
11084 >
11085
11086 <desc>
11087 The ISerialPort interface represents the virtual serial port device.
11088
11089 The virtual serial port device acts like an ordinary serial port
11090 inside the virtual machine. This device communicates to the real
11091 serial port hardware in one of two modes: host pipe or host device.
11092
11093 In host pipe mode, the #path attribute specifies the path to the pipe on
11094 the host computer that represents a serial port. The #server attribute
11095 determines if this pipe is created by the virtual machine process at
11096 machine startup or it must already exist before starting machine
11097 execution.
11098
11099 In host device mode, the #path attribute specifies the name of the
11100 serial port device on the host computer.
11101
11102 There is also a third communication mode: the disconnected mode. In this
11103 mode, the guest OS running inside the virtual machine will be able to
11104 detect the serial port, but all port write operations will be discarded
11105 and all port read operations will return no data.
11106
11107 <see>IMachine::getSerialPort</see>
11108 </desc>
11109
11110 <attribute name="slot" type="unsigned long" readonly="yes">
11111 <desc>
11112 Slot number this serial port is plugged into. Corresponds to
11113 the value you pass to <link to="IMachine::getSerialPort"/>
11114 to obtain this instance.
11115 </desc>
11116 </attribute>
11117
11118 <attribute name="enabled" type="boolean">
11119 <desc>
11120 Flag whether the serial port is enabled. If disabled,
11121 the serial port will not be reported to the guest OS.
11122 </desc>
11123 </attribute>
11124
11125 <attribute name="IOBase" type="unsigned long">
11126 <desc>Base I/O address of the serial port.</desc>
11127 </attribute>
11128
11129 <attribute name="IRQ" type="unsigned long">
11130 <desc>IRQ number of the serial port.</desc>
11131 </attribute>
11132
11133 <attribute name="hostMode" type="PortMode">
11134 <desc>
11135 How is this port connected to the host.
11136 <note>
11137 Changing this attribute may fail if the conditions for
11138 <link to="#path"/> are not met.
11139 </note>
11140 </desc>
11141 </attribute>
11142
11143 <attribute name="server" type="boolean">
11144 <desc>
11145 Flag whether this serial port acts as a server (creates a new pipe on
11146 the host) or as a client (uses the existing pipe). This attribute is
11147 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11148 </desc>
11149 </attribute>
11150
11151 <attribute name="path" type="wstring">
11152 <desc>
11153 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11154 PortMode_HostPipe, or the host serial device name when
11155 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11156 cases, setting a @c null or empty string as the attribute's value
11157 is an error. Otherwise, the value of this property is ignored.
11158 </desc>
11159 </attribute>
11160
11161 </interface>
11162
11163 <!--
11164 // IParallelPort
11165 /////////////////////////////////////////////////////////////////////////
11166 -->
11167
11168 <interface
11169 name="IParallelPort" extends="$unknown"
11170 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11171 wsmap="managed"
11172 >
11173
11174 <desc>
11175 The IParallelPort interface represents the virtual parallel port device.
11176
11177 The virtual parallel port device acts like an ordinary parallel port
11178 inside the virtual machine. This device communicates to the real
11179 parallel port hardware using the name of the parallel device on the host
11180 computer specified in the #path attribute.
11181
11182 Each virtual parallel port device is assigned a base I/O address and an
11183 IRQ number that will be reported to the guest operating system and used
11184 to operate the given parallel port from within the virtual machine.
11185
11186 <see>IMachine::getParallelPort</see>
11187 </desc>
11188
11189 <attribute name="slot" type="unsigned long" readonly="yes">
11190 <desc>
11191 Slot number this parallel port is plugged into. Corresponds to
11192 the value you pass to <link to="IMachine::getParallelPort"/>
11193 to obtain this instance.
11194 </desc>
11195 </attribute>
11196
11197 <attribute name="enabled" type="boolean">
11198 <desc>
11199 Flag whether the parallel port is enabled. If disabled,
11200 the parallel port will not be reported to the guest OS.
11201 </desc>
11202 </attribute>
11203
11204 <attribute name="IOBase" type="unsigned long">
11205 <desc>Base I/O address of the parallel port.</desc>
11206 </attribute>
11207
11208 <attribute name="IRQ" type="unsigned long">
11209 <desc>IRQ number of the parallel port.</desc>
11210 </attribute>
11211
11212 <attribute name="path" type="wstring">
11213 <desc>
11214 Host parallel device name. If this parallel port is enabled, setting a
11215 @c null or an empty string as this attribute's value will result into
11216 an error.
11217 </desc>
11218 </attribute>
11219
11220 </interface>
11221
11222
11223 <!--
11224 // IMachineDebugger
11225 /////////////////////////////////////////////////////////////////////////
11226 -->
11227
11228 <interface
11229 name="IMachineDebugger" extends="$unknown"
11230 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11231 wsmap="suppress"
11232 >
11233 <method name="resetStats">
11234 <desc>
11235 Reset VM statistics.
11236 </desc>
11237 <param name="pattern" type="wstring" dir="in">
11238 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11239 </param>
11240 </method>
11241
11242 <method name="dumpStats">
11243 <desc>
11244 Dumps VM statistics.
11245 </desc>
11246 <param name="pattern" type="wstring" dir="in">
11247 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11248 </param>
11249 </method>
11250
11251 <method name="getStats">
11252 <desc>
11253 Get the VM statistics in a XMLish format.
11254 </desc>
11255 <param name="pattern" type="wstring" dir="in">
11256 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11257 </param>
11258 <param name="withDescriptions" type="boolean" dir="in">
11259 <desc>Whether to include the descriptions.</desc>
11260 </param>
11261 <param name="stats" type="wstring" dir="out">
11262 <desc>The XML document containing the statistics.</desc>
11263 </param>
11264 </method>
11265
11266 <method name="injectNMI">
11267 <desc>
11268 Inject an NMI into a running VT-x/AMD-V VM.
11269 </desc>
11270 </method>
11271
11272 <attribute name="singlestep" type="boolean">
11273 <desc>Switch for enabling singlestepping.</desc>
11274 </attribute>
11275
11276 <attribute name="recompileUser" type="boolean">
11277 <desc>Switch for forcing code recompilation for user mode code.</desc>
11278 </attribute>
11279
11280 <attribute name="recompileSupervisor" type="boolean">
11281 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11282 </attribute>
11283
11284 <attribute name="PATMEnabled" type="boolean">
11285 <desc>Switch for enabling and disabling the PATM component.</desc>
11286 </attribute>
11287
11288 <attribute name="CSAMEnabled" type="boolean">
11289 <desc>Switch for enabling and disabling the CSAM component.</desc>
11290 </attribute>
11291
11292 <attribute name="logEnabled" type="boolean">
11293 <desc>Switch for enabling and disabling logging.</desc>
11294 </attribute>
11295
11296 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11297 <desc>
11298 Flag indicating whether the VM is currently making use of CPU hardware
11299 virtualization extensions.
11300 </desc>
11301 </attribute>
11302
11303 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11304 <desc>
11305 Flag indicating whether the VM is currently making use of the nested paging
11306 CPU hardware virtualization extension.
11307 </desc>
11308 </attribute>
11309
11310 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11311 <desc>
11312 Flag indicating whether the VM is currently making use of the VPID
11313 VT-x extension.
11314 </desc>
11315 </attribute>
11316
11317 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11318 <desc>
11319 Flag indicating whether the VM is currently making use of the Physical
11320 Address Extension CPU feature.
11321 </desc>
11322 </attribute>
11323
11324 <attribute name="virtualTimeRate" type="unsigned long">
11325 <desc>
11326 The rate at which the virtual time runs expressed as a percentage.
11327 The accepted range is 2% to 20000%.
11328 </desc>
11329 </attribute>
11330
11331 <!-- @todo method for setting log flags, groups and destination! -->
11332
11333 <attribute name="VM" type="unsigned long long" readonly="yes">
11334 <desc>
11335 Gets the VM handle. This is only for internal use while
11336 we carve the details of this interface.
11337 </desc>
11338 </attribute>
11339
11340 </interface>
11341
11342 <!--
11343 // IUSBController
11344 /////////////////////////////////////////////////////////////////////////
11345 -->
11346
11347 <interface
11348 name="IUSBController" extends="$unknown"
11349 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11350 wsmap="managed"
11351 >
11352 <attribute name="enabled" type="boolean">
11353 <desc>
11354 Flag whether the USB controller is present in the
11355 guest system. If disabled, the virtual guest hardware will
11356 not contain any USB controller. Can only be changed when
11357 the VM is powered off.
11358 </desc>
11359 </attribute>
11360
11361 <attribute name="enabledEhci" type="boolean">
11362 <desc>
11363 Flag whether the USB EHCI controller is present in the
11364 guest system. If disabled, the virtual guest hardware will
11365 not contain a USB EHCI controller. Can only be changed when
11366 the VM is powered off.
11367 </desc>
11368 </attribute>
11369
11370 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11371 <desc>
11372 USB standard version which the controller implements.
11373 This is a BCD which means that the major version is in the
11374 high byte and minor version is in the low byte.
11375 </desc>
11376 </attribute>
11377
11378 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11379 <desc>
11380 List of USB device filters associated with the machine.
11381
11382 If the machine is currently running, these filters are activated
11383 every time a new (supported) USB device is attached to the host
11384 computer that was not ignored by global filters
11385 (<link to="IHost::USBDeviceFilters"/>).
11386
11387 These filters are also activated when the machine is powered up.
11388 They are run against a list of all currently available USB
11389 devices (in states
11390 <link to="USBDeviceState_Available"/>,
11391 <link to="USBDeviceState_Busy"/>,
11392 <link to="USBDeviceState_Held"/>) that were not previously
11393 ignored by global filters.
11394
11395 If at least one filter matches the USB device in question, this
11396 device is automatically captured (attached to) the virtual USB
11397 controller of this machine.
11398
11399 <see>IUSBDeviceFilter, ::IUSBController</see>
11400 </desc>
11401 </attribute>
11402
11403 <method name="createDeviceFilter">
11404 <desc>
11405 Creates a new USB device filter. All attributes except
11406 the filter name are set to <tt>null</tt> (any match),
11407 <i>active</i> is <tt>false</tt> (the filter is not active).
11408
11409 The created filter can then be added to the list of filters using
11410 <link to="#insertDeviceFilter"/>.
11411
11412 <result name="VBOX_E_INVALID_VM_STATE">
11413 The virtual machine is not mutable.
11414 </result>
11415
11416 <see>#deviceFilters</see>
11417 </desc>
11418 <param name="name" type="wstring" dir="in">
11419 <desc>
11420 Filter name. See <link to="IUSBDeviceFilter::name"/>
11421 for more info.
11422 </desc>
11423 </param>
11424 <param name="filter" type="IUSBDeviceFilter" dir="return">
11425 <desc>Created filter object.</desc>
11426 </param>
11427 </method>
11428
11429 <method name="insertDeviceFilter">
11430 <desc>
11431 Inserts the given USB device to the specified position
11432 in the list of filters.
11433
11434 Positions are numbered starting from <tt>0</tt>. If the specified
11435 position is equal to or greater than the number of elements in
11436 the list, the filter is added to the end of the collection.
11437
11438 <note>
11439 Duplicates are not allowed, so an attempt to insert a
11440 filter that is already in the collection, will return an
11441 error.
11442 </note>
11443
11444 <result name="VBOX_E_INVALID_VM_STATE">
11445 Virtual machine is not mutable.
11446 </result>
11447 <result name="E_INVALIDARG">
11448 USB device filter not created within this VirtualBox instance.
11449 </result>
11450 <result name="VBOX_E_INVALID_OBJECT_STATE">
11451 USB device filter already in list.
11452 </result>
11453
11454 <see>#deviceFilters</see>
11455 </desc>
11456 <param name="position" type="unsigned long" dir="in">
11457 <desc>Position to insert the filter to.</desc>
11458 </param>
11459 <param name="filter" type="IUSBDeviceFilter" dir="in">
11460 <desc>USB device filter to insert.</desc>
11461 </param>
11462 </method>
11463
11464 <method name="removeDeviceFilter">
11465 <desc>
11466 Removes a USB device filter from the specified position in the
11467 list of filters.
11468
11469 Positions are numbered starting from <tt>0</tt>. Specifying a
11470 position equal to or greater than the number of elements in
11471 the list will produce an error.
11472
11473 <see>#deviceFilters</see>
11474
11475 <result name="VBOX_E_INVALID_VM_STATE">
11476 Virtual machine is not mutable.
11477 </result>
11478 <result name="E_INVALIDARG">
11479 USB device filter list empty or invalid @a position.
11480 </result>
11481
11482 </desc>
11483 <param name="position" type="unsigned long" dir="in">
11484 <desc>Position to remove the filter from.</desc>
11485 </param>
11486 <param name="filter" type="IUSBDeviceFilter" dir="return">
11487 <desc>Removed USB device filter.</desc>
11488 </param>
11489 </method>
11490
11491 </interface>
11492
11493
11494 <!--
11495 // IUSBDevice
11496 /////////////////////////////////////////////////////////////////////////
11497 -->
11498
11499 <interface
11500 name="IUSBDevice" extends="$unknown"
11501 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11502 wsmap="managed"
11503 >
11504 <desc>
11505 The IUSBDevice interface represents a virtual USB device attached to the
11506 virtual machine.
11507
11508 A collection of objects implementing this interface is stored in the
11509 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11510 attached to a running virtual machine's USB controller.
11511 </desc>
11512
11513 <attribute name="id" type="uuid" readonly="yes">
11514 <desc>
11515 Unique USB device ID. This ID is built from #vendorId,
11516 #productId, #revision and #serialNumber.
11517 </desc>
11518 </attribute>
11519
11520 <attribute name="vendorId" type="unsigned short" readonly="yes">
11521 <desc>Vendor ID.</desc>
11522 </attribute>
11523
11524 <attribute name="productId" type="unsigned short" readonly="yes">
11525 <desc>Product ID.</desc>
11526 </attribute>
11527
11528 <attribute name="revision" type="unsigned short" readonly="yes">
11529 <desc>
11530 Product revision number. This is a packed BCD represented as
11531 unsigned short. The high byte is the integer part and the low
11532 byte is the decimal.
11533 </desc>
11534 </attribute>
11535
11536 <attribute name="manufacturer" type="wstring" readonly="yes">
11537 <desc>Manufacturer string.</desc>
11538 </attribute>
11539
11540 <attribute name="product" type="wstring" readonly="yes">
11541 <desc>Product string.</desc>
11542 </attribute>
11543
11544 <attribute name="serialNumber" type="wstring" readonly="yes">
11545 <desc>Serial number string.</desc>
11546 </attribute>
11547
11548 <attribute name="address" type="wstring" readonly="yes">
11549 <desc>Host specific address of the device.</desc>
11550 </attribute>
11551
11552 <attribute name="port" type="unsigned short" readonly="yes">
11553 <desc>
11554 Host USB port number the device is physically
11555 connected to.
11556 </desc>
11557 </attribute>
11558
11559 <attribute name="version" type="unsigned short" readonly="yes">
11560 <desc>
11561 The major USB version of the device - 1 or 2.
11562 </desc>
11563 </attribute>
11564
11565 <attribute name="portVersion" type="unsigned short" readonly="yes">
11566 <desc>
11567 The major USB version of the host USB port the device is
11568 physically connected to - 1 or 2. For devices not connected to
11569 anything this will have the same value as the version attribute.
11570 </desc>
11571 </attribute>
11572
11573 <attribute name="remote" type="boolean" readonly="yes">
11574 <desc>
11575 Whether the device is physically connected to a remote VRDP
11576 client or to a local host machine.
11577 </desc>
11578 </attribute>
11579
11580 </interface>
11581
11582
11583 <!--
11584 // IUSBDeviceFilter
11585 /////////////////////////////////////////////////////////////////////////
11586 -->
11587
11588 <interface
11589 name="IUSBDeviceFilter" extends="$unknown"
11590 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11591 wsmap="managed"
11592 >
11593 <desc>
11594 The IUSBDeviceFilter interface represents an USB device filter used
11595 to perform actions on a group of USB devices.
11596
11597 This type of filters is used by running virtual machines to
11598 automatically capture selected USB devices once they are physically
11599 attached to the host computer.
11600
11601 A USB device is matched to the given device filter if and only if all
11602 attributes of the device match the corresponding attributes of the
11603 filter (that is, attributes are joined together using the logical AND
11604 operation). On the other hand, all together, filters in the list of
11605 filters carry the semantics of the logical OR operation. So if it is
11606 desirable to create a match like "this vendor id OR this product id",
11607 one needs to create two filters and specify "any match" (see below)
11608 for unused attributes.
11609
11610 All filter attributes used for matching are strings. Each string
11611 is an expression representing a set of values of the corresponding
11612 device attribute, that will match the given filter. Currently, the
11613 following filtering expressions are supported:
11614
11615 <ul>
11616 <li><i>Interval filters</i>. Used to specify valid intervals for
11617 integer device attributes (Vendor ID, Product ID and Revision).
11618 The format of the string is:
11619
11620 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11621
11622 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11623 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11624 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11625 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11626 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11627 possible integer is assumed.
11628 </li>
11629 <li><i>Boolean filters</i>. Used to specify acceptable values for
11630 boolean device attributes. The format of the string is:
11631
11632 <tt>true|false|yes|no|0|1</tt>
11633
11634 </li>
11635 <li><i>Exact match</i>. Used to specify a single value for the given
11636 device attribute. Any string that doesn't start with <tt>int:</tt>
11637 represents the exact match. String device attributes are compared to
11638 this string including case of symbols. Integer attributes are first
11639 converted to a string (see individual filter attributes) and then
11640 compared ignoring case.
11641
11642 </li>
11643 <li><i>Any match</i>. Any value of the corresponding device attribute
11644 will match the given filter. An empty or <tt>null</tt> string is
11645 used to construct this type of filtering expressions.
11646
11647 </li>
11648 </ul>
11649
11650 <note>
11651 On the Windows host platform, interval filters are not currently
11652 available. Also all string filter attributes
11653 (<link to="#manufacturer"/>, <link to="#product"/>,
11654 <link to="#serialNumber"/>) are ignored, so they behave as
11655 <i>any match</i> no matter what string expression is specified.
11656 </note>
11657
11658 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11659 </desc>
11660
11661 <attribute name="name" type="wstring">
11662 <desc>
11663 Visible name for this filter.
11664 This name is used to visually distinguish one filter from another,
11665 so it can neither be <tt>null</tt> nor an empty string.
11666 </desc>
11667 </attribute>
11668
11669 <attribute name="active" type="boolean">
11670 <desc>Whether this filter active or has been temporarily disabled.</desc>
11671 </attribute>
11672
11673 <attribute name="vendorId" type="wstring">
11674 <desc>
11675 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11676 The string representation for the <i>exact matching</i>
11677 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11678 (including leading zeroes).
11679 </desc>
11680 </attribute>
11681
11682 <attribute name="productId" type="wstring">
11683 <desc>
11684 <link to="IUSBDevice::productId">Product ID</link> filter.
11685 The string representation for the <i>exact matching</i>
11686 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11687 (including leading zeroes).
11688 </desc>
11689 </attribute>
11690
11691 <attribute name="revision" type="wstring">
11692 <desc>
11693 <link to="IUSBDevice::productId">Product revision number</link>
11694 filter. The string representation for the <i>exact matching</i>
11695 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11696 of the integer part of the revision, and <tt>F</tt> is the
11697 decimal digit of its fractional part (including leading and
11698 trailing zeros).
11699 Note that for interval filters, it's best to use the hexadecimal
11700 form, because the revision is stored as a 16 bit packed BCD value;
11701 so the expression <tt>int:0x0100-0x0199</tt> will match any
11702 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11703 </desc>
11704 </attribute>
11705
11706 <attribute name="manufacturer" type="wstring">
11707 <desc>
11708 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11709 </desc>
11710 </attribute>
11711
11712 <attribute name="product" type="wstring">
11713 <desc>
11714 <link to="IUSBDevice::product">Product</link> filter.
11715 </desc>
11716 </attribute>
11717
11718 <attribute name="serialNumber" type="wstring">
11719 <desc>
11720 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11721 </desc>
11722 </attribute>
11723
11724 <attribute name="port" type="wstring">
11725 <desc>
11726 <link to="IUSBDevice::port">Host USB port</link> filter.
11727 </desc>
11728 </attribute>
11729
11730 <attribute name="remote" type="wstring">
11731 <desc>
11732 <link to="IUSBDevice::remote">Remote state</link> filter.
11733 <note>
11734 This filter makes sense only for machine USB filters,
11735 i.e. it is ignored by IHostUSBDeviceFilter objects.
11736 </note>
11737 </desc>
11738 </attribute>
11739
11740 <attribute name="maskedInterfaces" type="unsigned long">
11741 <desc>
11742 This is an advanced option for hiding one or more USB interfaces
11743 from the guest. The value is a bit mask where the bits that are set
11744 means the corresponding USB interface should be hidden, masked off
11745 if you like.
11746 This feature only works on Linux hosts.
11747 </desc>
11748 </attribute>
11749
11750 </interface>
11751
11752
11753 <!--
11754 // IHostUSBDevice
11755 /////////////////////////////////////////////////////////////////////////
11756 -->
11757
11758 <enum
11759 name="USBDeviceState"
11760 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11761 >
11762 <desc>
11763 USB device state. This enumeration represents all possible states
11764 of the USB device physically attached to the host computer regarding
11765 its state on the host computer and availability to guest computers
11766 (all currently running virtual machines).
11767
11768 Once a supported USB device is attached to the host, global USB
11769 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11770 either ignore the device, or put it to USBDeviceState_Held state, or do
11771 nothing. Unless the device is ignored by global filters, filters of all
11772 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11773 activated that can put it to USBDeviceState_Captured state.
11774
11775 If the device was ignored by global filters, or didn't match
11776 any filters at all (including guest ones), it is handled by the host
11777 in a normal way. In this case, the device state is determined by
11778 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11779 or USBDeviceState_Available, depending on the current device usage.
11780
11781 Besides auto-capturing based on filters, the device can be manually
11782 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11783 state is USBDeviceState_Busy, USBDeviceState_Available or
11784 USBDeviceState_Held.
11785
11786 <note>
11787 Due to differences in USB stack implementations in Linux and Win32,
11788 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11789 only to the Linux version of the product. This also means that (<link
11790 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11791 device state is USBDeviceState_Held.
11792 </note>
11793
11794 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11795 </desc>
11796
11797 <const name="NotSupported" value="0">
11798 <desc>
11799 Not supported by the VirtualBox server, not available to guests.
11800 </desc>
11801 </const>
11802 <const name="Unavailable" value="1">
11803 <desc>
11804 Being used by the host computer exclusively,
11805 not available to guests.
11806 </desc>
11807 </const>
11808 <const name="Busy" value="2">
11809 <desc>
11810 Being used by the host computer, potentially available to guests.
11811 </desc>
11812 </const>
11813 <const name="Available" value="3">
11814 <desc>
11815 Not used by the host computer, available to guests (the host computer
11816 can also start using the device at any time).
11817 </desc>
11818 </const>
11819 <const name="Held" value="4">
11820 <desc>
11821 Held by the VirtualBox server (ignored by the host computer),
11822 available to guests.
11823 </desc>
11824 </const>
11825 <const name="Captured" value="5">
11826 <desc>
11827 Captured by one of the guest computers, not available
11828 to anybody else.
11829 </desc>
11830 </const>
11831 </enum>
11832
11833 <interface
11834 name="IHostUSBDevice" extends="IUSBDevice"
11835 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11836 wsmap="managed"
11837 >
11838 <desc>
11839 The IHostUSBDevice interface represents a physical USB device attached
11840 to the host computer.
11841
11842 Besides properties inherited from IUSBDevice, this interface adds the
11843 <link to="#state"/> property that holds the current state of the USB
11844 device.
11845
11846 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11847 </desc>
11848
11849 <attribute name="state" type="USBDeviceState" readonly="yes">
11850 <desc>
11851 Current state of the device.
11852 </desc>
11853 </attribute>
11854
11855 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11856
11857 </interface>
11858
11859
11860 <!--
11861 // IHostUSBDeviceFilter
11862 /////////////////////////////////////////////////////////////////////////
11863 -->
11864
11865 <enum
11866 name="USBDeviceFilterAction"
11867 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11868 >
11869 <desc>
11870 Actions for host USB device filters.
11871 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11872 </desc>
11873
11874 <const name="Null" value="0">
11875 <desc>Null value (never used by the API).</desc>
11876 </const>
11877 <const name="Ignore" value="1">
11878 <desc>Ignore the matched USB device.</desc>
11879 </const>
11880 <const name="Hold" value="2">
11881 <desc>Hold the matched USB device.</desc>
11882 </const>
11883 </enum>
11884
11885 <interface
11886 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11887 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11888 wsmap="managed"
11889 >
11890 <desc>
11891 The IHostUSBDeviceFilter interface represents a global filter for a
11892 physical USB device used by the host computer. Used indirectly in
11893 <link to="IHost::USBDeviceFilters"/>.
11894
11895 Using filters of this type, the host computer determines the initial
11896 state of the USB device after it is physically attached to the
11897 host's USB controller.
11898
11899 <note>
11900 The <link to="#remote"/> attribute is ignored by this type of
11901 filters, because it makes sense only for
11902 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11903 </note>
11904
11905 <see>IHost::USBDeviceFilters</see>
11906 </desc>
11907
11908 <attribute name="action" type="USBDeviceFilterAction">
11909 <desc>
11910 Action performed by the host when an attached USB device
11911 matches this filter.
11912 </desc>
11913 </attribute>
11914
11915 </interface>
11916
11917 <!--
11918 // IAudioAdapter
11919 /////////////////////////////////////////////////////////////////////////
11920 -->
11921
11922 <enum
11923 name="AudioDriverType"
11924 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11925 >
11926 <desc>
11927 Host audio driver type.
11928 </desc>
11929
11930 <const name="Null" value="0">
11931 <desc>Null value, also means "dummy audio driver".</desc>
11932 </const>
11933 <const name="WinMM" value="1"/>
11934 <const name="OSS" value="2"/>
11935 <const name="ALSA" value="3"/>
11936 <const name="DirectSound" value="4"/>
11937 <const name="CoreAudio" value="5"/>
11938 <const name="MMPM" value="6"/>
11939 <const name="Pulse" value="7"/>
11940 <const name="SolAudio" value="8"/>
11941 </enum>
11942
11943 <enum
11944 name="AudioControllerType"
11945 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11946 >
11947 <desc>
11948 Virtual audio controller type.
11949 </desc>
11950
11951 <const name="AC97" value="0"/>
11952 <const name="SB16" value="1"/>
11953 </enum>
11954
11955 <interface
11956 name="IAudioAdapter" extends="$unknown"
11957 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11958 wsmap="managed"
11959 >
11960 <desc>
11961 The IAudioAdapter interface represents the virtual audio adapter of
11962 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11963 </desc>
11964 <attribute name="enabled" type="boolean">
11965 <desc>
11966 Flag whether the audio adapter is present in the
11967 guest system. If disabled, the virtual guest hardware will
11968 not contain any audio adapter. Can only be changed when
11969 the VM is not running.
11970 </desc>
11971 </attribute>
11972 <attribute name="audioController" type="AudioControllerType">
11973 <desc>
11974 The audio hardware we emulate.
11975 </desc>
11976 </attribute>
11977 <attribute name="audioDriver" type="AudioDriverType">
11978 <desc>
11979 Audio driver the adapter is connected to. This setting
11980 can only be changed when the VM is not running.
11981 </desc>
11982 </attribute>
11983 </interface>
11984
11985 <!--
11986 // IVRDPServer
11987 /////////////////////////////////////////////////////////////////////////
11988 -->
11989
11990 <enum
11991 name="VRDPAuthType"
11992 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11993 >
11994 <desc>
11995 VRDP authentication type.
11996 </desc>
11997
11998 <const name="Null" value="0">
11999 <desc>Null value, also means "no authentication".</desc>
12000 </const>
12001 <const name="External" value="1"/>
12002 <const name="Guest" value="2"/>
12003 </enum>
12004
12005 <interface
12006 name="IVRDPServer" extends="$unknown"
12007 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
12008 wsmap="managed"
12009 >
12010 <attribute name="enabled" type="boolean">
12011 <desc>VRDP server status.</desc>
12012 </attribute>
12013
12014 <attribute name="port" type="unsigned long">
12015 <desc>
12016 VRDP server port number.
12017 <note>
12018 Setting the value of this property to <tt>0</tt> will reset the port
12019 number to the default value which is
12020 currently <tt>3389</tt>. Reading this property will always return a
12021 real port number, even after it has been set to <tt>0</tt> (in which
12022 case the default port is returned).
12023 </note>
12024 </desc>
12025 </attribute>
12026
12027 <attribute name="netAddress" type="wstring">
12028 <desc>VRDP server address.</desc>
12029 </attribute>
12030
12031 <attribute name="authType" type="VRDPAuthType">
12032 <desc>VRDP authentication method.</desc>
12033 </attribute>
12034
12035 <attribute name="authTimeout" type="unsigned long">
12036 <desc>Timeout for guest authentication. Milliseconds.</desc>
12037 </attribute>
12038
12039 <attribute name="allowMultiConnection" type="boolean">
12040 <desc>
12041 Flag whether multiple simultaneous connections to the VM are permitted.
12042 Note that this will be replaced by a more powerful mechanism in the future.
12043 </desc>
12044 </attribute>
12045
12046 <attribute name="reuseSingleConnection" type="boolean">
12047 <desc>
12048 Flag whether the existing connection must be dropped and a new connection
12049 must be established by the VRDP server, when a new client connects in single
12050 connection mode.
12051 </desc>
12052 </attribute>
12053
12054 </interface>
12055
12056
12057 <!--
12058 // ISharedFolder
12059 /////////////////////////////////////////////////////////////////////////
12060 -->
12061
12062 <interface
12063 name="ISharedFolder" extends="$unknown"
12064 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12065 wsmap="struct"
12066 >
12067 <desc>
12068 The ISharedFolder interface represents a folder in the host computer's
12069 file system accessible from the guest OS running inside a virtual
12070 machine using an associated logical name.
12071
12072 There are three types of shared folders:
12073 <ul>
12074 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12075 folders available to all virtual machines.</li>
12076 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12077 VM-specific shared folders available to the given virtual machine at
12078 startup.</li>
12079 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12080 VM-specific shared folders created in the session context (for
12081 example, when the virtual machine is running) and automatically
12082 discarded when the session is closed (the VM is powered off).</li>
12083 </ul>
12084
12085 Logical names of shared folders must be unique within the given scope
12086 (global, permanent or transient). However, they do not need to be unique
12087 across scopes. In this case, the definition of the shared folder in a
12088 more specific scope takes precedence over definitions in all other
12089 scopes. The order of precedence is (more specific to more general):
12090 <ol>
12091 <li>Transient definitions</li>
12092 <li>Permanent definitions</li>
12093 <li>Global definitions</li>
12094 </ol>
12095
12096 For example, if MyMachine has a shared folder named
12097 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12098 transient shared folder named <tt>C_DRIVE</tt> (that points
12099 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12100 of <tt>C_DRIVE</tt> in the guest OS so
12101 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12102 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12103 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12104 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12105 to <tt>C:\\</tt> if it still exists.
12106
12107 Note that permanent and transient shared folders of different machines
12108 are in different name spaces, so they don't overlap and don't need to
12109 have unique logical names.
12110
12111 <note>
12112 Global shared folders are not implemented in the current version of the
12113 product.
12114 </note>
12115 </desc>
12116
12117 <attribute name="name" type="wstring" readonly="yes">
12118 <desc>Logical name of the shared folder.</desc>
12119 </attribute>
12120
12121 <attribute name="hostPath" type="wstring" readonly="yes">
12122 <desc>Full path to the shared folder in the host file system.</desc>
12123 </attribute>
12124
12125 <attribute name="accessible" type="boolean" readonly="yes">
12126 <desc>
12127 Whether the folder defined by the host path is currently
12128 accessible or not.
12129 For example, the folder can be unaccessible if it is placed
12130 on the network share that is not available by the time
12131 this property is read.
12132 </desc>
12133 </attribute>
12134
12135 <attribute name="writable" type="boolean" readonly="yes">
12136 <desc>
12137 Whether the folder defined by the host path is writable or
12138 not.
12139 </desc>
12140 </attribute>
12141
12142 <attribute name="lastAccessError" type="wstring" readonly="yes">
12143 <desc>
12144 Text message that represents the result of the last accessibility
12145 check.
12146
12147 Accessibility checks are performed each time the <link to="#accessible"/>
12148 attribute is read. A @c null string is returned if the last
12149 accessibility check was successful. A non-null string indicates a
12150 failure and should normally describe a reason of the failure (for
12151 example, a file read error).
12152 </desc>
12153 </attribute>
12154
12155 </interface>
12156
12157 <!--
12158 // ISession
12159 /////////////////////////////////////////////////////////////////////////
12160 -->
12161
12162 <interface
12163 name="IInternalSessionControl" extends="$unknown"
12164 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
12165 internal="yes"
12166 wsmap="suppress"
12167 >
12168 <method name="getPID">
12169 <desc>PID of the process that has created this Session object.
12170 </desc>
12171 <param name="pid" type="unsigned long" dir="return"/>
12172 </method>
12173
12174 <method name="getRemoteConsole">
12175 <desc>
12176 Returns the console object suitable for remote control.
12177
12178 <result name="VBOX_E_INVALID_VM_STATE">
12179 Session state prevents operation.
12180 </result>
12181 <result name="VBOX_E_INVALID_OBJECT_STATE">
12182 Session type prevents operation.
12183 </result>
12184
12185 </desc>
12186 <param name="console" type="IConsole" dir="return"/>
12187 </method>
12188
12189 <method name="assignMachine">
12190 <desc>
12191 Assigns the machine object associated with this direct-type
12192 session or informs the session that it will be a remote one
12193 (if @a machine == NULL).
12194
12195 <result name="VBOX_E_INVALID_VM_STATE">
12196 Session state prevents operation.
12197 </result>
12198 <result name="VBOX_E_INVALID_OBJECT_STATE">
12199 Session type prevents operation.
12200 </result>
12201
12202 </desc>
12203 <param name="machine" type="IMachine" dir="in"/>
12204 </method>
12205
12206 <method name="assignRemoteMachine">
12207 <desc>
12208 Assigns the machine and the (remote) console object associated with
12209 this remote-type session.
12210
12211 <result name="VBOX_E_INVALID_VM_STATE">
12212 Session state prevents operation.
12213 </result>
12214
12215 </desc>
12216 <param name="machine" type="IMachine" dir="in"/>
12217 <param name="console" type="IConsole" dir="in"/>
12218 </method>
12219
12220 <method name="updateMachineState">
12221 <desc>
12222 Updates the machine state in the VM process.
12223 Must be called only in certain cases
12224 (see the method implementation).
12225
12226 <result name="VBOX_E_INVALID_VM_STATE">
12227 Session state prevents operation.
12228 </result>
12229 <result name="VBOX_E_INVALID_OBJECT_STATE">
12230 Session type prevents operation.
12231 </result>
12232
12233 </desc>
12234 <param name="aMachineState" type="MachineState" dir="in"/>
12235 </method>
12236
12237 <method name="uninitialize">
12238 <desc>
12239 Uninitializes (closes) this session. Used by VirtualBox to close
12240 the corresponding remote session when the direct session dies
12241 or gets closed.
12242
12243 <result name="VBOX_E_INVALID_VM_STATE">
12244 Session state prevents operation.
12245 </result>
12246
12247 </desc>
12248 </method>
12249
12250 <method name="onDVDDriveChange">
12251 <desc>
12252 Triggered when settings of the DVD drive object of the
12253 associated virtual machine have changed.
12254
12255 <result name="VBOX_E_INVALID_VM_STATE">
12256 Session state prevents operation.
12257 </result>
12258 <result name="VBOX_E_INVALID_OBJECT_STATE">
12259 Session type prevents operation.
12260 </result>
12261
12262 </desc>
12263 </method>
12264
12265 <method name="onFloppyDriveChange">
12266 <desc>
12267 Triggered when settings of the floppy drive object of the
12268 associated virtual machine have changed.
12269
12270 <result name="VBOX_E_INVALID_VM_STATE">
12271 Session state prevents operation.
12272 </result>
12273 <result name="VBOX_E_INVALID_OBJECT_STATE">
12274 Session type prevents operation.
12275 </result>
12276
12277 </desc>
12278 </method>
12279
12280 <method name="onNetworkAdapterChange">
12281 <desc>
12282 Triggered when settings of a network adapter of the
12283 associated virtual machine have changed.
12284
12285 <result name="VBOX_E_INVALID_VM_STATE">
12286 Session state prevents operation.
12287 </result>
12288 <result name="VBOX_E_INVALID_OBJECT_STATE">
12289 Session type prevents operation.
12290 </result>
12291
12292 </desc>
12293 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12294 </method>
12295
12296 <method name="onSerialPortChange">
12297 <desc>
12298 Triggered when settings of a serial port of the
12299 associated virtual machine have changed.
12300
12301 <result name="VBOX_E_INVALID_VM_STATE">
12302 Session state prevents operation.
12303 </result>
12304 <result name="VBOX_E_INVALID_OBJECT_STATE">
12305 Session type prevents operation.
12306 </result>
12307
12308 </desc>
12309 <param name="serialPort" type="ISerialPort" dir="in"/>
12310 </method>
12311
12312 <method name="onParallelPortChange">
12313 <desc>
12314 Triggered when settings of a parallel port of the
12315 associated virtual machine have changed.
12316
12317 <result name="VBOX_E_INVALID_VM_STATE">
12318 Session state prevents operation.
12319 </result>
12320 <result name="VBOX_E_INVALID_OBJECT_STATE">
12321 Session type prevents operation.
12322 </result>
12323
12324 </desc>
12325 <param name="parallelPort" type="IParallelPort" dir="in"/>
12326 </method>
12327
12328 <method name="onStorageControllerChange">
12329 <desc>
12330 Triggered when settings of a storage controller of the
12331 associated virtual machine have changed.
12332
12333 <result name="VBOX_E_INVALID_VM_STATE">
12334 Session state prevents operation.
12335 </result>
12336 <result name="VBOX_E_INVALID_OBJECT_STATE">
12337 Session type prevents operation.
12338 </result>
12339
12340 </desc>
12341 </method>
12342
12343 <method name="onVRDPServerChange">
12344 <desc>
12345 Triggered when settings of the VRDP server object of the
12346 associated virtual machine have changed.
12347
12348 <result name="VBOX_E_INVALID_VM_STATE">
12349 Session state prevents operation.
12350 </result>
12351 <result name="VBOX_E_INVALID_OBJECT_STATE">
12352 Session type prevents operation.
12353 </result>
12354
12355 </desc>
12356 </method>
12357
12358 <method name="onUSBControllerChange">
12359 <desc>
12360 Triggered when settings of the USB controller object of the
12361 associated virtual machine have changed.
12362
12363 <result name="VBOX_E_INVALID_VM_STATE">
12364 Session state prevents operation.
12365 </result>
12366 <result name="VBOX_E_INVALID_OBJECT_STATE">
12367 Session type prevents operation.
12368 </result>
12369
12370 </desc>
12371 </method>
12372
12373 <method name="onSharedFolderChange">
12374 <desc>
12375 Triggered when a permanent (global or machine) shared folder has been
12376 created or removed.
12377 <note>
12378 We don't pass shared folder parameters in this notification because
12379 the order in which parallel notifications are delivered is not defined,
12380 therefore it could happen that these parameters were outdated by the
12381 time of processing this notification.
12382 </note>
12383
12384 <result name="VBOX_E_INVALID_VM_STATE">
12385 Session state prevents operation.
12386 </result>
12387 <result name="VBOX_E_INVALID_OBJECT_STATE">
12388 Session type prevents operation.
12389 </result>
12390
12391 </desc>
12392 <param name="global" type="boolean" dir="in"/>
12393 </method>
12394
12395 <method name="onUSBDeviceAttach">
12396 <desc>
12397 Triggered when a request to capture a USB device (as a result
12398 of matched USB filters or direct call to
12399 <link to="IConsole::attachUSBDevice"/>) has completed.
12400 A @c null @a error object means success, otherwise it
12401 describes a failure.
12402
12403 <result name="VBOX_E_INVALID_VM_STATE">
12404 Session state prevents operation.
12405 </result>
12406 <result name="VBOX_E_INVALID_OBJECT_STATE">
12407 Session type prevents operation.
12408 </result>
12409
12410 </desc>
12411 <param name="device" type="IUSBDevice" dir="in"/>
12412 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12413 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12414 </method>
12415
12416 <method name="onUSBDeviceDetach">
12417 <desc>
12418 Triggered when a request to release the USB device (as a result
12419 of machine termination or direct call to
12420 <link to="IConsole::detachUSBDevice"/>) has completed.
12421 A @c null @a error object means success, otherwise it
12422
12423 <result name="VBOX_E_INVALID_VM_STATE">
12424 Session state prevents operation.
12425 </result>
12426 <result name="VBOX_E_INVALID_OBJECT_STATE">
12427 Session type prevents operation.
12428 </result>
12429
12430 </desc>
12431 <param name="id" type="uuid" dir="in"/>
12432 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12433 </method>
12434
12435 <method name="onShowWindow">
12436 <desc>
12437 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12438 <link to="IMachine::showConsoleWindow"/> in order to notify
12439 console callbacks
12440 <link to="IConsoleCallback::onCanShowWindow"/>
12441 and <link to="IConsoleCallback::onShowWindow"/>.
12442
12443 <result name="VBOX_E_INVALID_OBJECT_STATE">
12444 Session type prevents operation.
12445 </result>
12446
12447 </desc>
12448 <param name="check" type="boolean" dir="in"/>
12449 <param name="canShow" type="boolean" dir="out"/>
12450 <param name="winId" type="unsigned long long" dir="out"/>
12451 </method>
12452
12453 <method name="accessGuestProperty">
12454 <desc>
12455 Called by <link to="IMachine::getGuestProperty"/> and by
12456 <link to="IMachine::setGuestProperty"/> in order to read and
12457 modify guest properties.
12458
12459 <result name="VBOX_E_INVALID_VM_STATE">
12460 Machine session is not open.
12461 </result>
12462 <result name="VBOX_E_INVALID_OBJECT_STATE">
12463 Session type is not direct.
12464 </result>
12465
12466 </desc>
12467 <param name="name" type="wstring" dir="in"/>
12468 <param name="value" type="wstring" dir="in"/>
12469 <param name="flags" type="wstring" dir="in"/>
12470 <param name="isSetter" type="boolean" dir="in"/>
12471 <param name="retValue" type="wstring" dir="out"/>
12472 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12473 <param name="retFlags" type="wstring" dir="out"/>
12474 </method>
12475
12476 <method name="enumerateGuestProperties">
12477 <desc>
12478 Return a list of the guest properties matching a set of patterns along
12479 with their values, time stamps and flags.
12480
12481 <result name="VBOX_E_INVALID_VM_STATE">
12482 Machine session is not open.
12483 </result>
12484 <result name="VBOX_E_INVALID_OBJECT_STATE">
12485 Session type is not direct.
12486 </result>
12487
12488 </desc>
12489 <param name="patterns" type="wstring" dir="in">
12490 <desc>
12491 The patterns to match the properties against as a comma-separated
12492 string. If this is empty, all properties currently set will be
12493 returned.
12494 </desc>
12495 </param>
12496 <param name="key" type="wstring" dir="out" safearray="yes">
12497 <desc>
12498 The key names of the properties returned.
12499 </desc>
12500 </param>
12501 <param name="value" type="wstring" dir="out" safearray="yes">
12502 <desc>
12503 The values of the properties returned. The array entries match the
12504 corresponding entries in the @a key array.
12505 </desc>
12506 </param>
12507 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12508 <desc>
12509 The time stamps of the properties returned. The array entries match
12510 the corresponding entries in the @a key array.
12511 </desc>
12512 </param>
12513 <param name="flags" type="wstring" dir="out" safearray="yes">
12514 <desc>
12515 The flags of the properties returned. The array entries match the
12516 corresponding entries in the @a key array.
12517 </desc>
12518 </param>
12519 </method>
12520
12521 </interface>
12522
12523 <interface
12524 name="ISession" extends="$dispatched"
12525 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12526 wsmap="managed"
12527 >
12528 <desc>
12529 The ISession interface represents a serialization primitive for virtual
12530 machines.
12531
12532 With VirtualBox, every time one wishes to manipulate a virtual machine
12533 (e.g. change its settings or start execution), a session object is
12534 required. Such an object must be passed to one of the session methods
12535 that open the given session, which then initiates the machine manipulation.
12536
12537 A session serves several purposes: it identifies to the inter-process VirtualBox
12538 code which process is currently working with the virtual machine, and it ensures
12539 that there are no incompatible requests from several processes for the
12540 same virtual machine. Session objects can therefore be thought of as mutex
12541 semaphores that lock virtual machines to prevent conflicting accesses from
12542 several processes.
12543
12544 How sessions objects are used depends on whether you use the Main API
12545 via COM or via the webservice:
12546
12547 <ul>
12548 <li>When using the COM API directly, an object of the Session class from the
12549 VirtualBox type library needs to be created. In regular COM C++ client code,
12550 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12551 This object will then act as a local session object in further calls to open
12552 a session.
12553 </li>
12554
12555 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12556 one session object automatically when <link to="IWebsessionManager::logon" />
12557 is called. A managed object reference to that session object can be retrieved by
12558 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12559 reference can then be used to open sessions.
12560 </li>
12561 </ul>
12562
12563 Sessions are mainly used in two variations:
12564
12565 <ul>
12566 <li>
12567 To start a virtual machine in a separate process, one would call
12568 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12569 object as its first parameter. This session then identifies the caller
12570 and lets him control the started machine (for example, pause machine
12571 execution or power it down) as well as be notified about machine
12572 execution state changes.
12573 </li>
12574
12575 <li>To alter machine settings, or to start machine execution within the
12576 current process, one needs to open a direct session for the machine first by
12577 calling <link to="IVirtualBox::openSession"/>. While a direct session
12578 is open within one process, no any other process may open another direct
12579 session for the same machine. This prevents the machine from being changed
12580 by other processes while it is running or while the machine is being configured.
12581 </li>
12582 </ul>
12583
12584 One also can attach to an existing direct session already opened by
12585 another process (for example, in order to send a control request to the
12586 virtual machine such as the pause or the reset request). This is done by
12587 calling <link to="IVirtualBox::openExistingSession"/>.
12588
12589 <note>
12590 Unless you are trying to write a new VirtualBox front-end that
12591 performs direct machine execution (like the VirtualBox or VBoxSDL
12592 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12593 session opened by <link to="IVirtualBox::openSession"/> and use this
12594 session only to change virtual machine settings. If you simply want to
12595 start virtual machine execution using one of the existing front-ends
12596 (for example the VirtualBox GUI or headless server), simply use
12597 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12598 will power up the machine automatically for you.
12599 </note>
12600 </desc>
12601
12602 <attribute name="state" type="SessionState" readonly="yes">
12603 <desc>Current state of this session.</desc>
12604 </attribute>
12605
12606 <attribute name="type" type="SessionType" readonly="yes">
12607 <desc>
12608 Type of this session. The value of this attribute is valid only
12609 if the session is currently open (i.e. its #state is
12610 SessionType_SessionOpen), otherwise an error will be returned.
12611 </desc>
12612 </attribute>
12613
12614 <attribute name="machine" type="IMachine" readonly="yes">
12615 <desc>Machine object associated with this session.</desc>
12616 </attribute>
12617
12618 <attribute name="console" type="IConsole" readonly="yes">
12619 <desc>Console object associated with this session.</desc>
12620 </attribute>
12621
12622 <method name="close">
12623 <desc>
12624 Closes a session that was previously opened.
12625
12626 It is recommended that every time an "open session" method (such as
12627 <link to="IVirtualBox::openRemoteSession" /> or
12628 <link to="IVirtualBox::openSession" />) has been called to
12629 manipulate a virtual machine, the caller invoke
12630 ISession::close() when it's done doing so. Since sessions are
12631 serialization primitives much like ordinary mutexes, they are
12632 best used the same way: for each "open" call, there should be
12633 a matching "close" call, even when errors occur.
12634
12635 Otherwise, if a direct session for a machine opened with
12636 <link to="IVirtualBox::openSession"/> is not explicitly closed
12637 when the application terminates, the state of the machine will
12638 be set to <link to="MachineState_Aborted" /> on the server.
12639
12640 Generally, it is recommended to close all open sessions explicitly
12641 before terminating the application (regardless of the reason for
12642 the termination).
12643
12644 <note>
12645 Do not expect the session state (<link to="ISession::state" />
12646 to return to "Closed" immediately after you invoke
12647 ISession::close(), particularly if you have started a remote
12648 session to execute the VM in a new process. The session state will
12649 automatically return to "Closed" once the VM is no longer executing,
12650 which can of course take a very long time.
12651 </note>
12652
12653 <result name="E_UNEXPECTED">
12654 Session is not open.
12655 </result>
12656
12657 </desc>
12658 </method>
12659
12660 </interface>
12661
12662 <!--
12663 // IStorageController
12664 /////////////////////////////////////////////////////////////////////////
12665 -->
12666
12667 <enum
12668 name="StorageBus"
12669 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12670 >
12671 <desc>
12672 The connection type of the storage controller.
12673 </desc>
12674 <const name="Null" value="0">
12675 <desc><tt>null</tt> value. Never used by the API.</desc>
12676 </const>
12677 <const name="IDE" value="1"/>
12678 <const name="SATA" value="2"/>
12679 <const name="SCSI" value="3"/>
12680 </enum>
12681
12682 <enum
12683 name="StorageControllerType"
12684 uuid="685387db-a837-4320-a258-08f46a22f62a"
12685 >
12686 <desc>
12687 Storage controller type.
12688 </desc>
12689
12690 <const name="Null" value="0">
12691 <desc><tt>null</tt> value. Never used by the API.</desc>
12692 </const>
12693 <const name="LsiLogic" value="1"/>
12694 <const name="BusLogic" value="2"/>
12695 <const name="IntelAhci" value="3"/>
12696 <const name="PIIX3" value="4"/>
12697 <const name="PIIX4" value="5"/>
12698 <const name="ICH6" value="6"/>
12699 </enum>
12700
12701 <interface
12702 name="IStorageController" extends="$unknown"
12703 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12704 wsmap="managed"
12705 >
12706 <desc>
12707 Represents a storage controller that is attached to a virtual machine
12708 (<link to="IMachine" />). Just as hard disks are attached to storage
12709 controllers in a real computer, virtual hard disks (represented by
12710 <link to="IHardDisk" />) are attached to virtual storage controllers,
12711 represented by this interface.
12712
12713 VirtualBox supports three types of virtual storage controller hardware:
12714 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12715 these three is used, certain sub-types are available and can be
12716 selected in <link to="#controllerType" />.
12717 </desc>
12718
12719 <attribute name="name" type="wstring" readonly="yes">
12720 <desc>
12721 Name of the storage controller, as originally specified with
12722 <link to="IMachine::addStorageController" />. This then uniquely
12723 identifies this controller with other method calls such as
12724 <link to="IMachine::attachHardDisk" />.
12725 </desc>
12726 </attribute>
12727
12728 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12729 <desc>
12730 Maximum number of devices which can be attached to one port.
12731 </desc>
12732 </attribute>
12733
12734 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12735 <desc>
12736 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12737 </desc>
12738 </attribute>
12739
12740 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12741 <desc>
12742 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12743 </desc>
12744 </attribute>
12745
12746 <attribute name="instance" type="unsigned long">
12747 <desc>
12748 The instance number of the device in the running VM.
12749 </desc>
12750 </attribute>
12751
12752 <attribute name="portCount" type="unsigned long">
12753 <desc>
12754 The number of currently usable ports on the controller.
12755 The minimum and maximum number of ports for one controller are
12756 stored in <link to="IStorageController::minPortCount"/>
12757 and <link to="IStorageController::maxPortCount"/>.
12758 </desc>
12759 </attribute>
12760
12761 <attribute name="bus" type="StorageBus" readonly="yes">
12762 <desc>
12763 The connection type of the storage controller.
12764 </desc>
12765 </attribute>
12766
12767 <attribute name="controllerType" type="StorageControllerType">
12768 <desc>
12769 Type of the virtual storage controller. Depending on this value,
12770 VirtualBox will provide a different virtual storage controller hardware
12771 to the guest.
12772
12773 For SCSI controllers, the default type is LsiLogic.
12774 </desc>
12775 </attribute>
12776
12777 <method name="GetIDEEmulationPort">
12778 <desc>
12779 Gets the corresponding port number which is emulated as an IDE device.
12780
12781 <result name="E_INVALIDARG">
12782 The @a devicePosition is not in the range 0 to 3.
12783 </result>
12784 <result name="E_NOTIMPL">
12785 The storage controller type is not SATAIntelAhci.
12786 </result>
12787
12788 </desc>
12789 <param name="devicePosition" type="long" dir="in"/>
12790 <param name="portNumber" type="long" dir="return"/>
12791 </method>
12792
12793 <method name="SetIDEEmulationPort">
12794 <desc>
12795 Sets the port number which is emulated as an IDE device.
12796
12797 <result name="E_INVALIDARG">
12798 The @a devicePosition is not in the range 0 to 3 or the
12799 @a portNumber is not in the range 0 to 29.
12800 </result>
12801 <result name="E_NOTIMPL">
12802 The storage controller type is not SATAIntelAhci.
12803 </result>
12804
12805 </desc>
12806 <param name="devicePosition" type="long" dir="in"/>
12807 <param name="portNumber" type="long" dir="in"/>
12808 </method>
12809
12810 </interface>
12811
12812<if target="wsdl">
12813
12814 <!--
12815 // IManagedObjectRef
12816 /////////////////////////////////////////////////////////////////////////
12817 -->
12818
12819 <interface
12820 name="IManagedObjectRef" extends="$unknown"
12821 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12822 internal="yes"
12823 wsmap="managed"
12824 wscpp="hardcoded"
12825 >
12826 <desc>
12827 Managed object reference.
12828
12829 Only within the webservice, a managed object reference (which is really
12830 an opaque number) allows a webservice client to address an object
12831 that lives in the address space of the webservice server.
12832
12833 Behind each managed object reference, there is a COM object that lives
12834 in the webservice server's address space. The COM object is not freed
12835 until the managed object reference is released, either by an explicit
12836 call to <link to="IManagedObjectRef::release" /> or by logging off from
12837 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12838 all objects created during the webservice session.
12839
12840 Whenever a method call of the VirtualBox API returns a COM object, the
12841 webservice representation of that method will instead return a
12842 managed object reference, which can then be used to invoke methods
12843 on that object.
12844 </desc>
12845
12846 <method name="getInterfaceName">
12847 <desc>
12848 Returns the name of the interface that this managed object represents,
12849 for example, "IMachine", as a string.
12850 </desc>
12851 <param name="return" type="wstring" dir="return"/>
12852 </method>
12853
12854 <method name="release">
12855 <desc>
12856 Releases this managed object reference and frees the resources that
12857 were allocated for it in the webservice server process. After calling
12858 this method, the identifier of the reference can no longer be used.
12859 </desc>
12860 </method>
12861
12862 </interface>
12863
12864 <!--
12865 // IWebsessionManager
12866 /////////////////////////////////////////////////////////////////////////
12867 -->
12868
12869 <interface
12870 name="IWebsessionManager" extends="$unknown"
12871 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12872 internal="yes"
12873 wsmap="global"
12874 wscpp="hardcoded"
12875 >
12876 <desc>
12877 Websession manager. This provides essential services
12878 to webservice clients.
12879 </desc>
12880 <method name="logon">
12881 <desc>
12882 Logs a new client onto the webservice and returns a managed object reference to
12883 the IVirtualBox instance, which the client can then use as a basis to further
12884 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12885 interface, in one way or the other.
12886 </desc>
12887 <param name="username" type="wstring" dir="in"/>
12888 <param name="password" type="wstring" dir="in"/>
12889 <param name="return" type="IVirtualBox" dir="return"/>
12890 </method>
12891
12892 <method name="getSessionObject">
12893 <desc>
12894 Returns a managed object reference to the internal ISession object that was created
12895 for this web service session when the client logged on.
12896
12897 <see>ISession</see>
12898 </desc>
12899 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12900 <param name="return" type="ISession" dir="return"/>
12901 </method>
12902
12903 <method name="logoff">
12904 <desc>
12905 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12906 and destroys all resources associated with the session (most importantly, all
12907 managed objects created in the server while the session was active).
12908 </desc>
12909 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12910 </method>
12911
12912 </interface>
12913
12914</if>
12915
12916 <!--
12917 // IPerformanceCollector & friends
12918 /////////////////////////////////////////////////////////////////////////
12919 -->
12920
12921 <interface
12922 name="IPerformanceMetric" extends="$unknown"
12923 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12924 >
12925 <desc>
12926 The IPerformanceMetric interface represents parameters of the given
12927 performance metric.
12928 </desc>
12929
12930 <attribute name="metricName" type="wstring" readonly="yes">
12931 <desc>
12932 Name of the metric.
12933 </desc>
12934 </attribute>
12935
12936 <attribute name="object" type="$unknown" readonly="yes">
12937 <desc>
12938 Object this metric belongs to.
12939 </desc>
12940 </attribute>
12941
12942 <attribute name="description" type="wstring" readonly="yes">
12943 <desc>
12944 Textual description of the metric.
12945 </desc>
12946 </attribute>
12947
12948 <attribute name="period" type="unsigned long" readonly="yes">
12949 <desc>
12950 Time interval between samples, measured in seconds.
12951 </desc>
12952 </attribute>
12953
12954 <attribute name="count" type="unsigned long" readonly="yes">
12955 <desc>
12956 Number of recent samples retained by the performance collector for this
12957 metric.
12958
12959 When the collected sample count exceeds this number, older samples
12960 are discarded.
12961 </desc>
12962 </attribute>
12963
12964 <attribute name="unit" type="wstring" readonly="yes">
12965 <desc>
12966 Unit of measurement.
12967 </desc>
12968 </attribute>
12969
12970 <attribute name="minimumValue" type="long" readonly="yes">
12971 <desc>
12972 Minimum possible value of this metric.
12973 </desc>
12974 </attribute>
12975
12976 <attribute name="maximumValue" type="long" readonly="yes">
12977 <desc>
12978 Maximum possible value of this metric.
12979 </desc>
12980 </attribute>
12981 </interface>
12982
12983 <interface
12984 name="IPerformanceCollector" extends="$unknown"
12985 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12986 wsmap="managed"
12987 >
12988 <desc>
12989 The IPerformanceCollector interface represents a service that collects and
12990 stores performance metrics data.
12991
12992 Performance metrics are associated with objects like IHost and
12993 IMachine. Each object has a distinct set of performance metrics.
12994 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12995
12996 Metric data are collected at the specified intervals and are retained
12997 internally. The interval and the number of samples retained can be set
12998 with <link to="IPerformanceCollector::setupMetrics" />.
12999
13000 Metrics are organized hierarchically, each level separated by slash (/).
13001 General scheme for metric name is
13002 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
13003 metric name stands for: CPU category, Load metric, User submetric, average
13004 aggregate. An aggregate function is computed over all retained data. Valid
13005 aggregate functions are:
13006
13007 <ul>
13008 <li>avg -- average</li>
13009 <li>min -- minimum</li>
13010 <li>max -- maximum</li>
13011 </ul>
13012
13013 "Category/Metric" together form base metric name. A base metric is the
13014 smallest unit for which a sampling interval and the number of retained
13015 samples can be set. Only base metrics can be enabled and disabled. All
13016 sub-metrics are collected when their base metric is collected.
13017 Collected values for any set of sub-metrics can be queried with
13018 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
13019 metric parameters, querying metric data, enabling or disabling metrics
13020 wildcards can be used in metric names to specify a subset of metrics. For
13021 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13022 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13023 values without aggregates <tt>*:</tt> can be used.
13024
13025 The valid names for base metrics are:
13026
13027 <ul>
13028 <li>CPU/Load</li>
13029 <li>CPU/MHz</li>
13030 <li>RAM/Usage</li>
13031 </ul>
13032
13033 The general sequence for collecting and retrieving the metrics is:
13034 <ul>
13035 <li>
13036 Obtain an instance of IPerformanceCollector with
13037 <link to="IVirtualBox::performanceCollector" />
13038 </li>
13039 <li>
13040 Allocate and populate an array with references to objects the metrics
13041 will be collected for. Use references to IHost and IMachine objects.
13042 </li>
13043 <li>
13044 Allocate and populate an array with base metric names the data will be
13045 collected for.
13046 </li>
13047 <li>
13048 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13049 metric data will be collected and stored.
13050 </li>
13051 <li>
13052 Wait for the data to get collected.
13053 </li>
13054 <li>
13055 Allocate and populate an array with references to objects the metric
13056 values will be queried for. You can re-use the object array used for
13057 setting base metrics.
13058 </li>
13059 <li>
13060 Allocate and populate an array with metric names the data will be
13061 collected for. Note that metric names differ from base metric names.
13062 </li>
13063 <li>
13064 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13065 have been collected so far are returned. Note that the values are still
13066 retained internally and data collection continues.
13067 </li>
13068 </ul>
13069
13070 For an example of usage refer to the following files in VirtualBox SDK:
13071 <ul>
13072 <li>
13073 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13074 </li>
13075 <li>
13076 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13077 </li>
13078 </ul>
13079 </desc>
13080
13081 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13082 <desc>
13083 Array of unique names of metrics.
13084
13085 This array represents all metrics supported by the performance
13086 collector. Individual objects do not necessarily support all of them.
13087 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13088 list of supported metrics for a particular object.
13089 </desc>
13090 </attribute>
13091
13092 <method name="getMetrics">
13093 <desc>
13094 Returns parameters of specified metrics for a set of objects.
13095 <note>
13096 @c Null metrics array means all metrics. @c Null object array means
13097 all existing objects.
13098 </note>
13099 </desc>
13100 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13101 <desc>
13102 Metric name filter. Currently, only a comma-separated list of metrics
13103 is supported.
13104 </desc>
13105 </param>
13106 <param name="objects" type="$unknown" dir="in" safearray="yes">
13107 <desc>
13108 Set of objects to return metric parameters for.
13109 </desc>
13110 </param>
13111 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13112 <desc>
13113 Array of returned metric parameters.
13114 </desc>
13115 </param>
13116 </method>
13117
13118 <method name="setupMetrics">
13119 <desc>
13120 Sets parameters of specified base metrics for a set of objects. Returns
13121 an array of <link to="IPerformanceMetric" /> describing the metrics have
13122 been affected.
13123 <note>
13124 @c Null or empty metric name array means all metrics. @c Null or empty
13125 object array means all existing objects. If metric name array contains
13126 a single element and object array contains many, the single metric
13127 name array element is applied to each object array element to form
13128 metric/object pairs.
13129 </note>
13130 </desc>
13131 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13132 <desc>
13133 Metric name filter. Comma-separated list of metrics with wildcard
13134 support.
13135 </desc>
13136 </param>
13137 <param name="objects" type="$unknown" dir="in" safearray="yes">
13138 <desc>
13139 Set of objects to setup metric parameters for.
13140 </desc>
13141 </param>
13142 <param name="period" type="unsigned long" dir="in">
13143 <desc>
13144 Time interval in seconds between two consecutive samples of performance
13145 data.
13146 </desc>
13147 </param>
13148 <param name="count" type="unsigned long" dir="in">
13149 <desc>
13150 Number of samples to retain in performance data history. Older samples
13151 get discarded.
13152 </desc>
13153 </param>
13154 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13155 <desc>
13156 Array of metrics that have been modified by the call to this method.
13157 </desc>
13158 </param>
13159 </method>
13160
13161 <method name="enableMetrics">
13162 <desc>
13163 Turns on collecting specified base metrics. Returns an array of
13164 <link to="IPerformanceMetric" /> describing the metrics have been
13165 affected.
13166 <note>
13167 @c Null or empty metric name array means all metrics. @c Null or empty
13168 object array means all existing objects. If metric name array contains
13169 a single element and object array contains many, the single metric
13170 name array element is applied to each object array element to form
13171 metric/object pairs.
13172 </note>
13173 </desc>
13174 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13175 <desc>
13176 Metric name filter. Comma-separated list of metrics with wildcard
13177 support.
13178 </desc>
13179 </param>
13180 <param name="objects" type="$unknown" dir="in" safearray="yes">
13181 <desc>
13182 Set of objects to enable metrics for.
13183 </desc>
13184 </param>
13185 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13186 <desc>
13187 Array of metrics that have been modified by the call to this method.
13188 </desc>
13189 </param>
13190 </method>
13191
13192 <method name="disableMetrics">
13193 <desc>
13194 Turns off collecting specified base metrics. Returns an array of
13195 <link to="IPerformanceMetric" /> describing the metrics have been
13196 affected.
13197 <note>
13198 @c Null or empty metric name array means all metrics. @c Null or empty
13199 object array means all existing objects. If metric name array contains
13200 a single element and object array contains many, the single metric
13201 name array element is applied to each object array element to form
13202 metric/object pairs.
13203 </note>
13204 </desc>
13205 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13206 <desc>
13207 Metric name filter. Comma-separated list of metrics with wildcard
13208 support.
13209 </desc>
13210 </param>
13211 <param name="objects" type="$unknown" dir="in" safearray="yes">
13212 <desc>
13213 Set of objects to disable metrics for.
13214 </desc>
13215 </param>
13216 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13217 <desc>
13218 Array of metrics that have been modified by the call to this method.
13219 </desc>
13220 </param>
13221 </method>
13222
13223 <method name="queryMetricsData">
13224 <desc>
13225 Queries collected metrics data for a set of objects.
13226
13227 The data itself and related metric information are returned in seven
13228 parallel and one flattened array of arrays. Elements of
13229 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13230 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13231 the same index describe one set of values corresponding to a single
13232 metric.
13233
13234 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13235 start and length of a sub-array is indicated by
13236 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13237 value for metric <tt>metricNames[i]</tt> is at
13238 <tt>returnData[returnIndices[i]]</tt>.
13239
13240 <note>
13241 @c Null or empty metric name array means all metrics. @c Null or empty
13242 object array means all existing objects. If metric name array contains
13243 a single element and object array contains many, the single metric
13244 name array element is applied to each object array element to form
13245 metric/object pairs.
13246 </note>
13247 <note>
13248 Data collection continues behind the scenes after call to
13249 @c queryMetricsData. The return data can be seen as the snapshot of
13250 the current state at the time of @c queryMetricsData call. The
13251 internally kept metric values are not cleared by the call. This makes
13252 possible querying different subsets of metrics or aggregates with
13253 subsequent calls. If periodic querying is needed it is highly
13254 suggested to query the values with @c interval*count period to avoid
13255 confusion. This way a completely new set of data values will be
13256 provided by each query.
13257 </note>
13258 </desc>
13259 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13260 <desc>
13261 Metric name filter. Comma-separated list of metrics with wildcard
13262 support.
13263 </desc>
13264 </param>
13265 <param name="objects" type="$unknown" dir="in" safearray="yes">
13266 <desc>
13267 Set of objects to query metrics for.
13268 </desc>
13269 </param>
13270 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13271 <desc>
13272 Names of metrics returned in @c returnData.
13273 </desc>
13274 </param>
13275 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13276 <desc>
13277 Objects associated with metrics returned in @c returnData.
13278 </desc>
13279 </param>
13280 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13281 <desc>
13282 Units of measurement for each returned metric.
13283 </desc>
13284 </param>
13285 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13286 <desc>
13287 Divisor that should be applied to return values in order to get
13288 floating point values. For example:
13289 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13290 will retrieve the floating point value of i-th sample of the first
13291 metric.
13292 </desc>
13293 </param>
13294 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13295 <desc>
13296 Sequence numbers of the first elements of value sequences of particular metrics
13297 returned in @c returnData. For aggregate metrics it is the sequence number of
13298 the sample the aggregate started calculation from.
13299 </desc>
13300 </param>
13301 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13302 <desc>
13303 Indices of the first elements of value sequences of particular metrics
13304 returned in @c returnData.
13305 </desc>
13306 </param>
13307 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13308 <desc>
13309 Lengths of value sequences of particular metrics.
13310 </desc>
13311 </param>
13312 <param name="returnData" type="long" dir="return" safearray="yes">
13313 <desc>
13314 Flattened array of all metric data containing sequences of values for
13315 each metric.
13316 </desc>
13317 </param>
13318 </method>
13319
13320 </interface>
13321
13322 <module name="VBoxSVC" context="LocalServer">
13323 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13324 namespace="virtualbox.org">
13325 <interface name="IVirtualBox" default="yes"/>
13326 </class>
13327 </module>
13328
13329 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13330 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13331 namespace="virtualbox.org">
13332 <interface name="ISession" default="yes"/>
13333 </class>
13334 </module>
13335
13336</library>
13337
13338</idl>
13339
13340<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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