VirtualBox

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

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

Main: rework IProgress internals to optionally handle weighted operations; rename some internal IProgress methods; change percentage APIs to use ULONGs instead of LONGs

  • Property svn:eol-style set to native
File size: 491.2 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 sate 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 sate 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 (nver 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="#settingsFilePath"/>) in case of auto-conversion, and then
2760 calls <link to="#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="#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="path" type="wstring" dir="in">
3237 <desc>
3238 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3239 on whether the appliance is distributed as a set of files or as a single file, respectively).
3240 </desc>
3241 </param>
3242 <param name="aProgress" type="IProgress" dir="return">
3243 <desc></desc>
3244 </param>
3245 </method>
3246
3247 <method name="getWarnings">
3248 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3249
3250 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3251 <desc></desc>
3252 </param>
3253 </method>
3254
3255 </interface>
3256
3257 <enum
3258 name="VirtualSystemDescriptionType"
3259 uuid="325e7fec-ce06-4174-9654-98f99478d03f"
3260 >
3261 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3262 a configuration value.</desc>
3263
3264 <const name="Ignore" value="1" />
3265 <const name="OS" value="2" />
3266 <const name="Name" value="3" />
3267 <const name="Description" value="4" />
3268 <const name="License" value="5" />
3269 <const name="CPU" value="6" />
3270 <const name="Memory" value="7" />
3271 <const name="HardDiskControllerIDE" value="8" />
3272 <const name="HardDiskControllerSATA" value="9" />
3273 <const name="HardDiskControllerSCSI" value="10" />
3274 <const name="HardDiskImage" value="11" />
3275 <const name="Floppy" value="12" />
3276 <const name="CDROM" value="13" />
3277 <const name="NetworkAdapter" value="14" />
3278 <const name="USBController" value="15" />
3279 <const name="SoundCard" value="16" />
3280
3281 </enum>
3282
3283 <enum
3284 name="VirtualSystemDescriptionValueType"
3285 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3286 >
3287 <desc>Used with <link to="GetValuesByType" /> to describe the value
3288 type to fetch.</desc>
3289
3290 <const name="Reference" value="1" />
3291 <const name="Original" value="2" />
3292 <const name="Auto" value="3" />
3293 <const name="ExtraConfig" value="4" />
3294
3295 </enum>
3296
3297 <interface
3298 name="IVirtualSystemDescription" extends="$unknown"
3299 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3300 wsmap="managed"
3301 >
3302
3303 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3304 After <link to="IAppliance::interpret" /> has been called, that array contains
3305 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3306 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3307 into VirtualBox.
3308 </desc>
3309
3310 <attribute name="count" type="unsigned long" readonly="yes">
3311 <desc>Return the number of virtual system description entries.</desc>
3312 </attribute>
3313
3314 <method name="getDescription">
3315 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3316 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3317
3318 The list below identifies the value sets that are possible depending on the
3319 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3320 the array item with the same index in aOvfValues[] will contain the original value as contained
3321 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3322 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3323 the aExtraConfigValues[] array item may also be used.
3324
3325 <ul>
3326 <li>
3327 "OS": the guest operating system type. There must be exactly one such array item on import. The
3328 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3329 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3330 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3331 (see <link to="CIMOSType" />).
3332 </li>
3333 <li>
3334 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3335 if none is present on import, then an automatic name will be created from the operating system
3336 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3337 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3338 <link to="IMachine" /> name that does not exist yet.
3339 </li>
3340 <li>
3341 "Description": an arbitrary description.
3342 </li>
3343 <li>
3344 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3345 code to display such a license for agreement; the Main API does not enforce any such policy.
3346 </li>
3347 <li>
3348 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3349 </li>
3350 <li>
3351 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3352 is present on import, then VirtualBox will set a meaningful default based on the operating system
3353 type.
3354 </li>
3355 <li>
3356 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3357 has no value in aOvfValues[] or aVboxValues[].
3358 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3359 type can use to specify which hard disk controller a virtual disk should be connected to.
3360 </li>
3361 <li>
3362 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3363 has no value in aOvfValues[] or aVboxValues[].
3364 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3365 </li>
3366 <li>
3367 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3368 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3369 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3370 </li>
3371 <li>
3372 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3373 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3374
3375 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3376 a path since the image file should be in the same location as the OVF file itself), whereas the
3377 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3378 hard disk image. This means that on import the image will be copied and converted from the
3379 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3380 On import, the target image will also be registered with VirtualBox.
3381
3382 The matching item in the aExtraConfigValues[] array must contain a string of the following
3383 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3384 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3385 the image to. That number must be the index of an array item with one of the hard disk controller
3386 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3387 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3388 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3389 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3390 SCSI conrollers, the channel can range from 0-29.
3391 </li>
3392 <li>
3393 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3394 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3395 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3396 </li>
3397 <li>
3398 "USBController": a USB controller. There can be at most one such item. If and only if such an
3399 item ispresent, USB support will be enabled for the new virtual machine.
3400 </li>
3401 <li>
3402 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3403 present, sound support will be enabled for the new virtual machine. Note that the virtual
3404 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3405 may be different from the virtual soundcard expected by the appliance.
3406 </li>
3407 </ul>
3408
3409 </desc>
3410
3411 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3412 <desc></desc>
3413 </param>
3414
3415 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3416 <desc></desc>
3417 </param>
3418
3419 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3420 <desc></desc>
3421 </param>
3422
3423 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3424 <desc></desc>
3425 </param>
3426
3427 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3428 <desc></desc>
3429 </param>
3430
3431 </method>
3432
3433 <method name="getDescriptionByType">
3434 <desc>This is the same as <link to="getDescription" /> except that you can specify which types
3435 should be returned.</desc>
3436
3437 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3438 <desc></desc>
3439 </param>
3440
3441 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3442 <desc></desc>
3443 </param>
3444
3445 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3446 <desc></desc>
3447 </param>
3448
3449 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3450 <desc></desc>
3451 </param>
3452
3453 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3454 <desc></desc>
3455 </param>
3456
3457 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3458 <desc></desc>
3459 </param>
3460
3461 </method>
3462
3463 <method name="getValuesByType">
3464 <desc>This is the same as <link to="getDescriptionByType" /> except that you can specify which
3465 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3466 values.</desc>
3467
3468 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3469 <desc></desc>
3470 </param>
3471
3472 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3473 <desc></desc>
3474 </param>
3475
3476 <param name="aValues" type="wstring" dir="return" safearray="yes">
3477 <desc></desc>
3478 </param>
3479
3480 </method>
3481
3482 <method name="setFinalValues">
3483 <desc>
3484 This method allows the appliance's user to change the configuration for the virtual
3485 system descriptions. For each array item returned from <link to="getDescription" />,
3486 you must pass in one boolean value and one configuration value.
3487
3488 Each item in the boolean array determines whether the particular configuration item
3489 should be enabled.
3490 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3491 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3492 and SoundCard.
3493
3494 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3495 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3496 the configuration remains unchanged. Please see the documentation for getDescription()
3497 for valid configuration values for the individual array item types. If the
3498 corresponding item in the aEnabled array is false, the configuration value is ignored.
3499 </desc>
3500
3501 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3502 <desc></desc>
3503 </param>
3504
3505 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3506 <desc></desc>
3507 </param>
3508
3509 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3510 <desc></desc>
3511 </param>
3512 </method>
3513
3514 <method name="addDescription">
3515 <desc>
3516 This method adds an additional description entry to the stack of already
3517 available descriptions for this virtual system. This is handy for writing
3518 values which aren't directly supported by VirtualBox. One example would
3519 be the License type of <link to="VirtualSystemDescriptionType" />.
3520 </desc>
3521
3522 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3523 <desc></desc>
3524 </param>
3525
3526 <param name="aVboxValue" type="wstring" dir="in">
3527 <desc></desc>
3528 </param>
3529
3530 <param name="aExtraConfigValue" type="wstring" dir="in">
3531 <desc></desc>
3532 </param>
3533 </method>
3534 </interface>
3535
3536
3537 <!--
3538 // IMachine
3539 /////////////////////////////////////////////////////////////////////////
3540 -->
3541
3542 <interface
3543 name="IInternalMachineControl" extends="$unknown"
3544 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3545 internal="yes"
3546 wsmap="suppress"
3547 >
3548 <method name="updateState">
3549 <desc>
3550 Updates the VM state.
3551 <note>
3552 This operation will also update the settings file with
3553 the correct information about the saved state file
3554 and delete this file from disk when appropriate.
3555 </note>
3556 </desc>
3557 <param name="state" type="MachineState" dir="in"/>
3558 </method>
3559
3560 <method name="getIPCId">
3561 <param name="id" type="wstring" dir="return"/>
3562 </method>
3563
3564 <method name="runUSBDeviceFilters">
3565 <desc>
3566 Asks the server to run USB devices filters of the associated
3567 machine against the given USB device and tell if there is
3568 a match.
3569 <note>
3570 Intended to be used only for remote USB devices. Local
3571 ones don't require to call this method (this is done
3572 implicitly by the Host and USBProxyService).
3573 </note>
3574 </desc>
3575 <param name="device" type="IUSBDevice" dir="in"/>
3576 <param name="matched" type="boolean" dir="out"/>
3577 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3578 </method>
3579
3580 <method name="captureUSBDevice">
3581 <desc>
3582 Requests a capture of the given host USB device.
3583 When the request is completed, the VM process will
3584 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3585 notification.
3586 </desc>
3587 <param name="id" type="uuid" dir="in"/>
3588 </method>
3589
3590 <method name="detachUSBDevice">
3591 <desc>
3592 Notification that a VM is going to detach (done = false) or has
3593 already detached (done = true) the given USB device.
3594 When the done = true request is completed, the VM process will
3595 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3596 notification.
3597 <note>
3598 In the done = true case, the server must run its own filters
3599 and filters of all VMs but this one on the detached device
3600 as if it were just attached to the host computer.
3601 </note>
3602 </desc>
3603 <param name="id" type="uuid" dir="in"/>
3604 <param name="done" type="boolean" dir="in"/>
3605 </method>
3606
3607 <method name="autoCaptureUSBDevices">
3608 <desc>
3609 Requests a capture all matching USB devices attached to the host.
3610 When the request is completed, the VM process will
3611 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3612 notification per every captured device.
3613 </desc>
3614 </method>
3615
3616 <method name="detachAllUSBDevices">
3617 <desc>
3618 Notification that a VM that is being powered down. The done
3619 parameter indicates whether which stage of the power down
3620 we're at. When done = false the VM is announcing its
3621 intentions, while when done = true the VM is reporting
3622 what it has done.
3623 <note>
3624 In the done = true case, the server must run its own filters
3625 and filters of all VMs but this one on all detach devices as
3626 if they were just attached to the host computer.
3627 </note>
3628 </desc>
3629 <param name="done" type="boolean" dir="in"/>
3630 </method>
3631
3632 <method name="onSessionEnd">
3633 <desc>
3634 Triggered by the given session object when the session is about
3635 to close normally.
3636 </desc>
3637 <param name="session" type="ISession" dir="in">
3638 <desc>Session that is being closed</desc>
3639 </param>
3640 <param name="progress" type="IProgress" dir="return">
3641 <desc>
3642 Used to wait until the corresponding machine is actually
3643 dissociated from the given session on the server.
3644 Returned only when this session is a direct one.
3645 </desc>
3646 </param>
3647 </method>
3648
3649 <method name="beginSavingState">
3650 <desc>
3651 Called by the VM process to inform the server it wants to
3652 save the current state and stop the VM execution.
3653 </desc>
3654 <param name="progress" type="IProgress" dir="in">
3655 <desc>
3656 Progress object created by the VM process to wait until
3657 the state is saved.
3658 </desc>
3659 </param>
3660 <param name="stateFilePath" type="wstring" dir="out">
3661 <desc>
3662 File path the VM process must save the execution state to.
3663 </desc>
3664 </param>
3665 </method>
3666
3667 <method name="endSavingState">
3668 <desc>
3669 Called by the VM process to inform the server that saving
3670 the state previously requested by #beginSavingState is either
3671 successfully finished or there was a failure.
3672
3673 <result name="VBOX_E_FILE_ERROR">
3674 Settings file not accessible.
3675 </result>
3676 <result name="VBOX_E_XML_ERROR">
3677 Could not parse the settings file.
3678 </result>
3679
3680 </desc>
3681
3682 <param name="success" type="boolean" dir="in">
3683 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3684 otherwise.
3685 </desc>
3686 </param>
3687 </method>
3688
3689 <method name="adoptSavedState">
3690 <desc>
3691 Gets called by IConsole::adoptSavedState.
3692 <result name="VBOX_E_FILE_ERROR">
3693 Invalid saved state file path.
3694 </result>
3695 </desc>
3696 <param name="savedStateFile" type="wstring" dir="in">
3697 <desc>Path to the saved state file to adopt.</desc>
3698 </param>
3699 </method>
3700
3701 <method name="beginTakingSnapshot">
3702 <desc>
3703 Called by the VM process to inform the server it wants to
3704 take a snapshot.
3705
3706 <result name="VBOX_E_FILE_ERROR">
3707 Settings file not accessible.
3708 </result>
3709 <result name="VBOX_E_XML_ERROR">
3710 Could not parse the settings file.
3711 </result>
3712 </desc>
3713 <param name="initiator" type="IConsole" dir="in">
3714 <desc>The console object that initiated this call.</desc>
3715 </param>
3716 <param name="name" type="wstring" dir="in">
3717 <desc>Snapshot name.</desc>
3718 </param>
3719 <param name="description" type="wstring" dir="in">
3720 <desc>Snapshot description.</desc>
3721 </param>
3722 <param name="progress" type="IProgress" dir="in">
3723 <desc>
3724 Progress object created by the VM process to wait until
3725 the state is saved (only for online snapshots).
3726 </desc>
3727 </param>
3728 <param name="stateFilePath" type="wstring" dir="out">
3729 <desc>
3730 File path the VM process must save the execution state to.
3731 </desc>
3732 </param>
3733 <param name="serverProgress" type="IProgress" dir="out">
3734 <desc>
3735 Progress object created by the server process to wait until
3736 the snapshot is taken (VDI diff creation, etc.).
3737 </desc>
3738 </param>
3739 </method>
3740
3741 <method name="endTakingSnapshot">
3742 <desc>
3743 Called by the VM process to inform the server that the snapshot
3744 previously requested by #beginTakingSnapshot is either
3745 successfully taken or there was a failure.
3746 </desc>
3747
3748 <param name="success" type="boolean" dir="in">
3749 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3750 </param>
3751 </method>
3752
3753 <method name="discardSnapshot">
3754 <desc>
3755 Gets called by IConsole::discardSnapshot.
3756 <result name="VBOX_E_INVALID_OBJECT_STATE">
3757 Snapshot has more than one child snapshot.
3758 </result>
3759 </desc>
3760 <param name="initiator" type="IConsole" dir="in">
3761 <desc>The console object that initiated this call.</desc>
3762 </param>
3763 <param name="id" type="uuid" dir="in">
3764 <desc>UUID of the snapshot to discard.</desc>
3765 </param>
3766 <param name="machineState" type="MachineState" dir="out">
3767 <desc>New machine state after this operation is started.</desc>
3768 </param>
3769 <param name="progress" type="IProgress" dir="return">
3770 <desc>Progress object to track the operation completion.</desc>
3771 </param>
3772 </method>
3773
3774 <method name="discardCurrentState">
3775 <desc>
3776 Gets called by IConsole::discardCurrentState.
3777 <result name="VBOX_E_INVALID_OBJECT_STATE">
3778 Virtual machine does not have any snapshot.
3779 </result>
3780 </desc>
3781 <param name="initiator" type="IConsole" dir="in">
3782 <desc>The console object that initiated this call.</desc>
3783 </param>
3784 <param name="machineState" type="MachineState" dir="out">
3785 <desc>New machine state after this operation is started.</desc>
3786 </param>
3787 <param name="progress" type="IProgress" dir="return">
3788 <desc>Progress object to track the operation completion.</desc>
3789 </param>
3790 </method>
3791
3792 <method name="discardCurrentSnapshotAndState">
3793 <desc>
3794 Gets called by IConsole::discardCurrentSnapshotAndState.
3795 <result name="VBOX_E_INVALID_OBJECT_STATE">
3796 Virtual machine does not have any snapshot.
3797 </result>
3798 </desc>
3799 <param name="initiator" type="IConsole" dir="in">
3800 <desc>The console object that initiated this call.</desc>
3801 </param>
3802 <param name="machineState" type="MachineState" dir="out">
3803 <desc>New machine state after this operation is started.</desc>
3804 </param>
3805 <param name="progress" type="IProgress" dir="return">
3806 <desc>Progress object to track the operation completion.</desc>
3807 </param>
3808 </method>
3809
3810 <method name="pullGuestProperties">
3811 <desc>
3812 Get the list of the guest properties matching a set of patterns along
3813 with their values, time stamps and flags and give responsibility for
3814 managing properties to the console.
3815 </desc>
3816 <param name="name" type="wstring" dir="out" safearray="yes">
3817 <desc>
3818 The names of the properties returned.
3819 </desc>
3820 </param>
3821 <param name="value" type="wstring" dir="out" safearray="yes">
3822 <desc>
3823 The values of the properties returned. The array entries match the
3824 corresponding entries in the @a name array.
3825 </desc>
3826 </param>
3827 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3828 <desc>
3829 The time stamps of the properties returned. The array entries match
3830 the corresponding entries in the @a name array.
3831 </desc>
3832 </param>
3833 <param name="flags" type="wstring" dir="out" safearray="yes">
3834 <desc>
3835 The flags of the properties returned. The array entries match the
3836 corresponding entries in the @a name array.
3837 </desc>
3838 </param>
3839 </method>
3840
3841 <method name="pushGuestProperties">
3842 <desc>
3843 Set the list of the guest properties matching a set of patterns along
3844 with their values, time stamps and flags and return responsibility for
3845 managing properties to IMachine.
3846 </desc>
3847 <param name="name" type="wstring" dir="in" safearray="yes">
3848 <desc>
3849 The names of the properties.
3850 </desc>
3851 </param>
3852 <param name="value" type="wstring" dir="in" safearray="yes">
3853 <desc>
3854 The values of the properties. The array entries match the
3855 corresponding entries in the @a name array.
3856 </desc>
3857 </param>
3858 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3859 <desc>
3860 The time stamps of the properties. The array entries match
3861 the corresponding entries in the @a name array.
3862 </desc>
3863 </param>
3864 <param name="flags" type="wstring" dir="in" safearray="yes">
3865 <desc>
3866 The flags of the properties. The array entries match the
3867 corresponding entries in the @a name array.
3868 </desc>
3869 </param>
3870 </method>
3871 <method name="pushGuestProperty">
3872 <desc>
3873 Update a single guest property in IMachine.
3874 </desc>
3875 <param name="name" type="wstring" dir="in">
3876 <desc>
3877 The name of the property to be updated.
3878 </desc>
3879 </param>
3880 <param name="value" type="wstring" dir="in">
3881 <desc>
3882 The value of the property.
3883 </desc>
3884 </param>
3885 <param name="timestamp" type="unsigned long long" dir="in">
3886 <desc>
3887 The timestamp of the property.
3888 </desc>
3889 </param>
3890 <param name="flags" type="wstring" dir="in">
3891 <desc>
3892 The flags of the property.
3893 </desc>
3894 </param>
3895 </method>
3896
3897 <method name="lockMedia">
3898 <desc>
3899 Locks all media attached to the machine for writing and parents of
3900 attahced different hard disks (if any) for reading. This operation is
3901 atomic so that if it fails no media is actually locked.
3902
3903 This method is intended to be called when the machine is in Starting or
3904 Restoring state. The locked media will be automatically unlocked when
3905 the machine is powered off or crashed.
3906 </desc>
3907 </method>
3908 </interface>
3909
3910 <interface
3911 name="IBIOSSettings" extends="$unknown"
3912 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3913 wsmap="managed"
3914 >
3915 <desc>
3916 The IBIOSSettings interface represents BIOS settings of the virtual
3917 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3918 </desc>
3919 <attribute name="logoFadeIn" type="boolean">
3920 <desc>Fade in flag for BIOS logo animation.</desc>
3921 </attribute>
3922
3923 <attribute name="logoFadeOut" type="boolean">
3924 <desc>Fade out flag for BIOS logo animation.</desc>
3925 </attribute>
3926
3927 <attribute name="logoDisplayTime" type="unsigned long">
3928 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3929 </attribute>
3930
3931 <attribute name="logoImagePath" type="wstring">
3932 <desc>Local file system path for external BIOS image.</desc>
3933 </attribute>
3934
3935 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3936 <desc>Mode of the BIOS boot device menu.</desc>
3937 </attribute>
3938
3939 <attribute name="ACPIEnabled" type="boolean">
3940 <desc>ACPI support flag.</desc>
3941 </attribute>
3942
3943 <attribute name="IOAPICEnabled" type="boolean">
3944 <desc>
3945 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3946 and support IRQs above 15.
3947 </desc>
3948 </attribute>
3949
3950 <attribute name="timeOffset" type="long long">
3951 <desc>
3952 Offset in milliseconds from the host system time. This allows for
3953 guests running with a different system date/time than the host.
3954 It is equivalent to setting the system date/time in the BIOS except
3955 it is not an absolute value but a relative one. Guest Additions
3956 time synchronization honors this offset.
3957 </desc>
3958 </attribute>
3959
3960 <attribute name="PXEDebugEnabled" type="boolean">
3961 <desc>
3962 PXE debug logging flag. If set, VirtualBox will write extensive
3963 PXE trace information to the release log.
3964 </desc>
3965 </attribute>
3966
3967 </interface>
3968
3969 <interface
3970 name="IMachine" extends="$unknown"
3971 uuid="13420cbb-175a-4456-85d0-301126dfdec7"
3972 wsmap="managed"
3973 >
3974 <desc>
3975 The IMachine interface represents a virtual machine, or guest, created
3976 in VirtualBox.
3977
3978 This interface is used in two contexts. First of all, a collection of
3979 objects implementing this interface is stored in the
3980 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3981 machines that are currently registered with this VirtualBox
3982 installation. Also, once a session has been opened for the given virtual
3983 machine (e.g. the virtual machine is running), the machine object
3984 associated with the open session can be queried from the session object;
3985 see <link to="ISession"/> for details.
3986
3987 The main role of this interface is to expose the settings of the virtual
3988 machine and provide methods to change various aspects of the virtual
3989 machine's configuration. For machine objects stored in the
3990 <link to="IVirtualBox::machines"/> collection, all attributes are
3991 read-only unless explicitly stated otherwise in individual attribute
3992 and method descriptions. In order to change a machine setting, a session
3993 for this machine must be opened using one of
3994 <link to="IVirtualBox::openSession"/>,
3995 <link to="IVirtualBox::openRemoteSession"/> or
3996 <link to="IVirtualBox::openExistingSession"/> methods. After the
3997 session has been successfully opened, a mutable machine object needs to
3998 be queried from the session object and then the desired settings changes
3999 can be applied to the returned object using IMachine attributes and
4000 methods. See the ISession interface description for more information
4001 about sessions.
4002
4003 Note that the IMachine interface does not provide methods to control
4004 virtual machine execution (such as start the machine, or power it
4005 down) -- these methods are grouped in a separate IConsole
4006 interface. Refer to the IConsole interface description to get more
4007 information about this topic.
4008
4009 <see>ISession, IConsole</see>
4010 </desc>
4011
4012 <attribute name="parent" type="IVirtualBox" readonly="yes">
4013 <desc>Associated parent object.</desc>
4014 </attribute>
4015
4016 <attribute name="accessible" type="boolean" readonly="yes">
4017 <desc>
4018 Whether this virtual machine is currently accessible or not.
4019
4020 The machine is considered to be inaccessible when:
4021 <ul>
4022 <li>It is a registered virtual machine, and
4023 </li>
4024 <li>Its settings file is inaccessible (for example, it is
4025 located on a network share that is not accessible during
4026 VirtualBox startup, or becomes inaccessible later, or if
4027 the settings file can be read but is invalid).
4028 </li>
4029 </ul>
4030
4031 Otherwise, the value of this property is always <tt>true</tt>.
4032
4033 Every time this property is read, the accessibility state of
4034 this machine is re-evaluated. If the returned value is |false|,
4035 the <link to="#accessError"/> property may be used to get the
4036 detailed error information describing the reason of
4037 inaccessibility.
4038
4039 When the machine is inaccessible, only the following properties
4040 can be used on it:
4041 <ul>
4042 <li><link to="#parent"/></li>
4043 <li><link to="#id"/></li>
4044 <li><link to="#settingsFilePath"/></li>
4045 <li><link to="#accessible"/></li>
4046 <li><link to="#accessError"/></li>
4047 </ul>
4048
4049 An attempt to access any other property or method will return
4050 an error.
4051
4052 The only possible action you can perform on an inaccessible
4053 machine is to unregister it using the
4054 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4055 for the accessibility state once more by querying this
4056 property).
4057
4058 <note>
4059 In the current implementation, once this property returns
4060 <tt>true</tt>, the machine will never become inaccessible
4061 later, even if its settings file cannot be successfully
4062 read/written any more (at least, until the VirtualBox
4063 server is restarted). This limitation may be removed in
4064 future releases.
4065 </note>
4066 </desc>
4067 </attribute>
4068
4069 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4070 <desc>
4071 Error information describing the reason of machine
4072 inaccessibility.
4073
4074 Reading this property is only valid after the last call to
4075 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
4076 machine is currently unaccessible). Otherwise, a null
4077 IVirtualBoxErrorInfo object will be returned.
4078 </desc>
4079 </attribute>
4080
4081 <attribute name="name" type="wstring">
4082 <desc>
4083 Name of the virtual machine.
4084
4085 Besides being used for human-readable identification purposes
4086 everywhere in VirtualBox, the virtual machine name is also used
4087 as a name of the machine's settings file and as a name of the
4088 subdirectory this settings file resides in. Thus, every time you
4089 change the value of this property, the settings file will be
4090 renamed once you call <link to="#saveSettings"/> to confirm the
4091 change. The containing subdirectory will be also renamed, but
4092 only if it has exactly the same name as the settings file
4093 itself prior to changing this property (for backward compatibility
4094 with previous API releases). The above implies the following
4095 limitations:
4096 <ul>
4097 <li>The machine name cannot be empty.</li>
4098 <li>The machine name can contain only characters that are valid
4099 file name characters according to the rules of the file
4100 system used to store VirtualBox configuration.</li>
4101 <li>You cannot have two or more machines with the same name
4102 if they use the same subdirectory for storing the machine
4103 settings files.</li>
4104 <li>You cannot change the name of the machine if it is running,
4105 or if any file in the directory containing the settings file
4106 is being used by another running machine or by any other
4107 process in the host operating system at a time when
4108 <link to="#saveSettings"/> is called.
4109 </li>
4110 </ul>
4111 If any of the above limitations are hit, <link to="#saveSettings"/>
4112 will return an appropriate error message explaining the exact
4113 reason and the changes you made to this machine will not be
4114 saved.
4115 <note>
4116 For "legacy" machines created using the
4117 <link to="IVirtualBox::createLegacyMachine"/> call,
4118 the above naming limitations do not apply because the
4119 machine name does not affect the settings file name.
4120 The settings file name remains the same as it was specified
4121 during machine creation and never changes.
4122 </note>
4123 </desc>
4124 </attribute>
4125
4126 <attribute name="description" type="wstring">
4127 <desc>
4128 Description of the virtual machine.
4129
4130 The description attribute can contain any text and is
4131 typically used to describe the hardware and software
4132 configuration of the virtual machine in detail (i.e. network
4133 settings, versions of the installed software and so on).
4134 </desc>
4135 </attribute>
4136
4137 <attribute name="id" type="uuid" readonly="yes">
4138 <desc>UUID of the virtual machine.</desc>
4139 </attribute>
4140
4141 <attribute name="OSTypeId" type="wstring">
4142 <desc>
4143 User-defined identifier of the Guest OS type.
4144 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4145 an IGuestOSType object representing details about the given
4146 Guest OS type.
4147 <note>
4148 This value may differ from the value returned by
4149 <link to="IGuest::OSTypeId"/> if Guest Additions are
4150 installed to the guest OS.
4151 </note>
4152 </desc>
4153 </attribute>
4154
4155 <attribute name="HardwareVersion" type="wstring">
4156 <desc>Hardware version identifier. Internal use only for now.</desc>
4157 </attribute>
4158
4159 <attribute name="CPUCount" type="unsigned long">
4160 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
4161 </attribute>
4162
4163 <attribute name="memorySize" type="unsigned long">
4164 <desc>System memory size in megabytes.</desc>
4165 </attribute>
4166
4167 <attribute name="memoryBalloonSize" type="unsigned long">
4168 <desc>Initial memory balloon size in megabytes.</desc>
4169 </attribute>
4170
4171 <attribute name="statisticsUpdateInterval" type="unsigned long">
4172 <desc>Initial interval to update guest statistics in seconds.</desc>
4173 </attribute>
4174
4175 <attribute name="VRAMSize" type="unsigned long">
4176 <desc>Video memory size in megabytes.</desc>
4177 </attribute>
4178
4179 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4180 <desc>
4181 This setting determines whether VirtualBox allows guests to make use
4182 of the 3D graphics support available on the host. Currently limited
4183 to OpenGL only. </desc>
4184 </attribute>
4185
4186 <attribute name="monitorCount" type="unsigned long">
4187 <desc>
4188 Number of virtual monitors.
4189 <note>
4190 Only effective on Windows XP and later guests with
4191 Guest Additions installed.
4192 </note>
4193 </desc>
4194 </attribute>
4195
4196 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4197 <desc>Object containing all BIOS settings.</desc>
4198 </attribute>
4199
4200 <attribute name="HWVirtExEnabled" type="TSBool">
4201 <desc>
4202 This setting determines whether VirtualBox will try to make use of
4203 the host CPU's hardware virtualization extensions such as Intel VT-x
4204 and AMD-V. Note that in case such extensions are not available,
4205 they will not be used.
4206 </desc>
4207 </attribute>
4208
4209 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4210 <desc>
4211 This setting determines whether VirtualBox will try to make use of
4212 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4213 such extensions are not available, they will not be used.
4214 </desc>
4215 </attribute>
4216
4217 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4218 <desc>
4219 This setting determines whether VirtualBox will try to make use of
4220 the VPID extension of Intel VT-x. Note that in case such extensions are
4221 not available, they will not be used.
4222 </desc>
4223 </attribute>
4224
4225 <attribute name="PAEEnabled" type="boolean" default="false">
4226 <desc>
4227 This setting determines whether VirtualBox will expose the Physical Address
4228 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4229 is not available, it will not be reported.
4230 </desc>
4231 </attribute>
4232
4233 <attribute name="snapshotFolder" type="wstring">
4234 <desc>
4235 Full path to the directory used to store snapshot data
4236 (differencing hard disks and saved state files) of this machine.
4237
4238 The initial value of this property is
4239 <tt>&lt;</tt><link to="#settingsFilePath">
4240 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4241 <link to="#id">machine_uuid</link>
4242 <tt>&gt;</tt>.
4243
4244 Currently, it is an error to try to change this property on
4245 a machine that has snapshots (because this would require to
4246 move possibly large files to a different location).
4247 A separate method will be available for this purpose later.
4248
4249 <note>
4250 Setting this property to <tt>null</tt> will restore the
4251 initial value.
4252 </note>
4253 <note>
4254 When setting this property, the specified path can be
4255 absolute (full path) or relative to the directory where the
4256 <link to="#settingsFilePath">machine settings file</link>
4257 is located. When reading this property, a full path is
4258 always returned.
4259 </note>
4260 <note>
4261 The specified path may not exist, it will be created
4262 when necessary.
4263 </note>
4264 </desc>
4265 </attribute>
4266
4267 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4268 <desc>VRDP server object.</desc>
4269 </attribute>
4270
4271 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4272 <desc>Array of hard disks attached to this machine.</desc>
4273 </attribute>
4274
4275 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4276 <desc>Associated DVD drive object.</desc>
4277 </attribute>
4278
4279 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4280 <desc>Associated floppy drive object.</desc>
4281 </attribute>
4282
4283 <attribute name="USBController" type="IUSBController" readonly="yes">
4284 <desc>
4285 Associated USB controller object.
4286
4287 <note>
4288 This method may set a @ref com_warnings "warning result code".
4289 </note>
4290 <note>
4291 If USB functionality is not available in the given edition of
4292 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4293 </note>
4294 </desc>
4295 </attribute>
4296
4297 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4298 <desc>Associated audio adapter, always present.</desc>
4299 </attribute>
4300
4301 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4302 <desc>Array of storage controllers attached to this machine.</desc>
4303 </attribute>
4304
4305 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4306 <desc>
4307 Full name of the file containing machine settings data.
4308 </desc>
4309 </attribute>
4310
4311 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4312 <desc>
4313 Current version of the format of the settings file of this machine
4314 (<link to="#settingsFilePath"/>).
4315
4316 The version string has the following format:
4317 <pre>
4318 x.y-platform
4319 </pre>
4320 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4321 versions, and <tt>platform</tt> is the platform identifier.
4322
4323 The current version usually matches the value of the
4324 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4325 settings file was created by an older version of VirtualBox and there
4326 was a change of the settings file format since then.
4327
4328 Note that VirtualBox automatically converts settings files from older
4329 versions to the most recent version when reading them (usually at
4330 VirtualBox startup) but it doesn't save the changes back until
4331 you call a method that implicitly saves settings (such as
4332 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4333 explicitly. Therefore, if the value of this attribute differs from the
4334 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4335 means that the settings file was converted but the result of the
4336 conversion is not yet saved to disk.
4337
4338 The above feature may be used by interactive front-ends to inform users
4339 about the settings file format change and offer them to explicitly save
4340 all converted settings files (the global and VM-specific ones),
4341 optionally create backup copies of the old settings files before saving,
4342 etc.
4343
4344 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4345 </desc>
4346 </attribute>
4347
4348 <attribute name="settingsModified" type="boolean" readonly="yes">
4349 <desc>
4350 Whether the settings of this machine have been modified
4351 (but neither yet saved nor discarded).
4352 <note>
4353 Reading this property is only valid on instances returned
4354 by <link to="ISession::machine"/> and on new machines
4355 created by <link to="IVirtualBox::createMachine"/> or opened
4356 by <link to="IVirtualBox::openMachine"/> but not
4357 yet registered, or on unregistered machines after calling
4358 <link to="IVirtualBox::unregisterMachine"/>. For all other
4359 cases, the settings can never be modified.
4360 </note>
4361 <note>
4362 For newly created unregistered machines, the value of this
4363 property is always TRUE until <link to="#saveSettings"/>
4364 is called (no matter if any machine settings have been
4365 changed after the creation or not). For opened machines
4366 the value is set to FALSE (and then follows to normal rules).
4367 </note>
4368 </desc>
4369 </attribute>
4370
4371 <attribute name="sessionState" type="SessionState" readonly="yes">
4372 <desc>Current session state for this machine.</desc>
4373 </attribute>
4374
4375 <attribute name="sessionType" type="wstring" readonly="yes">
4376 <desc>
4377 Type of the session. If <link to="#sessionState"/> is
4378 SessionSpawning or SessionOpen, this attribute contains the
4379 same value as passed to the
4380 <link to="IVirtualBox::openRemoteSession"/> method in the
4381 @a type parameter. If the session was opened directly using
4382 <link to="IVirtualBox::openSession"/>, or if
4383 <link to="#sessionState"/> is SessionClosed, the value of this
4384 attribute is @c null.
4385 </desc>
4386 </attribute>
4387
4388 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4389 <desc>
4390 Identifier of the session process. This attribute contains the
4391 platform-dependent identifier of the process that has opened a
4392 direct session for this machine using the
4393 <link to="IVirtualBox::openSession"/> call. The returned value
4394 is only valid if <link to="#sessionState"/> is SessionOpen or
4395 SessionClosing (i.e. a session is currently open or being
4396 closed) by the time this property is read.
4397 </desc>
4398 </attribute>
4399
4400 <attribute name="state" type="MachineState" readonly="yes">
4401 <desc>Current execution state of this machine.</desc>
4402 </attribute>
4403
4404 <attribute name="lastStateChange" type="long long" readonly="yes">
4405 <desc>
4406 Time stamp of the last execution state change,
4407 in milliseconds since 1970-01-01 UTC.
4408 </desc>
4409 </attribute>
4410
4411 <attribute name="stateFilePath" type="wstring" readonly="yes">
4412 <desc>
4413 Full path to the file that stores the execution state of
4414 the machine when it is in the <link to="MachineState_Saved"/> state.
4415 <note>
4416 When the machine is not in the Saved state, this attribute
4417 <tt>null</tt>.
4418 </note>
4419 </desc>
4420 </attribute>
4421
4422 <attribute name="logFolder" type="wstring" readonly="yes">
4423 <desc>
4424 Full path to the folder that stores a set of rotated log files
4425 recorded during machine execution. The most recent log file is
4426 named <tt>VBox.log</tt>, the previous log file is
4427 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4428 in the current version).
4429 </desc>
4430 </attribute>
4431
4432 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4433 <desc>
4434 Current snapshot of this machine.
4435 <note>
4436 A <tt>null</tt> object is returned if the machine doesn't
4437 have snapshots.
4438 </note>
4439 <see><link to="ISnapshot"/></see>
4440 </desc>
4441 </attribute>
4442
4443 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4444 <desc>
4445 Number of snapshots taken on this machine. Zero means the
4446 machine doesn't have any snapshots.
4447 </desc>
4448 </attribute>
4449
4450 <attribute name="currentStateModified" type="boolean" readonly="yes">
4451 <desc>
4452 Returns <tt>true</tt> if the current state of the machine is not
4453 identical to the state stored in the current snapshot.
4454
4455 The current state is identical to the current snapshot right
4456 after one of the following calls are made:
4457 <ul>
4458 <li><link to="IConsole::discardCurrentState"/> or
4459 <link to="IConsole::discardCurrentSnapshotAndState"/>
4460 </li>
4461 <li><link to="IConsole::takeSnapshot"/> (issued on a
4462 powered off or saved machine, for which
4463 <link to="#settingsModified"/> returns <tt>false</tt>)
4464 </li>
4465 <li><link to="IMachine::setCurrentSnapshot"/>
4466 </li>
4467 </ul>
4468
4469 The current state remains identical until one of the following
4470 happens:
4471 <ul>
4472 <li>settings of the machine are changed</li>
4473 <li>the saved state is discarded</li>
4474 <li>the current snapshot is discarded</li>
4475 <li>an attempt to execute the machine is made</li>
4476 </ul>
4477
4478 <note>
4479 For machines that don't have snapshots, this property is
4480 always <tt>false</tt>.
4481 </note>
4482 </desc>
4483 </attribute>
4484
4485 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4486 <desc>
4487 Collection of shared folders for this machine (permanent shared
4488 folders). These folders are shared automatically at machine startup
4489 and available only to the guest OS installed within this machine.
4490
4491 New shared folders are added to the collection using
4492 <link to="#createSharedFolder"/>. Existing shared folders can be
4493 removed using <link to="#removeSharedFolder"/>.
4494 </desc>
4495 </attribute>
4496
4497 <attribute name="clipboardMode" type="ClipboardMode">
4498 <desc>
4499 Synchronization mode between the host OS clipboard
4500 and the guest OS clipboard.
4501 </desc>
4502 </attribute>
4503
4504 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4505 <desc>
4506 A comma-separated list of simple glob patterns. Changes to guest
4507 properties whose name matches one of the patterns will generate an
4508 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4509 </desc>
4510 </attribute>
4511
4512 <method name="setBootOrder">
4513 <desc>
4514 Puts the given device to the specified position in
4515 the boot order.
4516
4517 To indicate that no device is associated with the given position,
4518 <link to="DeviceType_Null"/> should be used.
4519
4520 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4521
4522 <result name="E_INVALIDARG">
4523 Boot @a position out of range.
4524 </result>
4525 <result name="E_NOTIMPL">
4526 Booting from USB @a device currently not supported.
4527 </result>
4528
4529 </desc>
4530 <param name="position" type="unsigned long" dir="in">
4531 <desc>
4532 Position in the boot order (<tt>1</tt> to the total number of
4533 devices the machine can boot from, as returned by
4534 <link to="ISystemProperties::maxBootPosition"/>).
4535 </desc>
4536 </param>
4537 <param name="device" type="DeviceType" dir="in">
4538 <desc>
4539 The type of the device used to boot at the given position.
4540 </desc>
4541 </param>
4542 </method>
4543
4544 <method name="getBootOrder" const="yes">
4545 <desc>
4546 Returns the device type that occupies the specified
4547 position in the boot order.
4548
4549 @todo [remove?]
4550 If the machine can have more than one device of the returned type
4551 (such as hard disks), then a separate method should be used to
4552 retrieve the individual device that occupies the given position.
4553
4554 If here are no devices at the given position, then
4555 <link to="DeviceType_Null"/> is returned.
4556
4557 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4558
4559 <result name="E_INVALIDARG">
4560 Boot @a position out of range.
4561 </result>
4562
4563 </desc>
4564 <param name="position" type="unsigned long" dir="in">
4565 <desc>
4566 Position in the boot order (<tt>1</tt> to the total number of
4567 devices the machine can boot from, as returned by
4568 <link to="ISystemProperties::maxBootPosition"/>).
4569 </desc>
4570 </param>
4571 <param name="device" type="DeviceType" dir="return">
4572 <desc>
4573 Device at the given position.
4574 </desc>
4575 </param>
4576 </method>
4577
4578 <method name="attachHardDisk">
4579 <desc>
4580 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4581 by the given UUID @a id) to the given hard disk controller
4582 (<link to="IStorageController" />, identified by @a name),
4583 at the indicated port and device.
4584
4585 For the IDE bus, the @a controllerPort parameter can be either
4586 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4587 respectively. For the primary controller of the IDE bus,
4588 @a device can be either @c 0 or @c 1, to specify the master or the
4589 slave device, respectively. For the secondary IDE controller, the
4590 device number must be @c 1 because VirtualBox reserves the
4591 secondary master for the CD-ROM drive.
4592
4593 For an SATA controller, @a controllerPort must be a number ranging
4594 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4595 be a number ranging from @c 0 to @c 15.
4596
4597 For both SCSI and SATA, the @a device parameter is unused and must
4598 be @c 0.
4599
4600 The specified device slot must not have another disk attached to it, or
4601 this method will fail.
4602
4603 See <link to="IHardDisk"/> for more detailed information about
4604 attaching hard disks.
4605
4606 <note>
4607 You cannot attach a hard disk to a running machine. Also, you cannot
4608 attach a hard disk to a newly created machine until this machine's
4609 settings are saved to disk using <link to="#saveSettings"/>.
4610 </note>
4611 <note>
4612 If the hard disk is being attached indirectly, a new differencing hard
4613 disk will implicitly be created for it and attached instead. If the
4614 changes made to the machine settings (including this indirect
4615 attachment) are later cancelled using <link to="#discardSettings"/>,
4616 this implicitly created differencing hard disk will implicitly
4617 be deleted.
4618 </note>
4619
4620 <result name="E_INVALIDARG">
4621 SATA device, SATA port, IDE port or IDE slot out of range.
4622 </result>
4623 <result name="VBOX_E_INVALID_OBJECT_STATE">
4624 Attempt to attach hard disk to an unregistered virtual machine.
4625 </result>
4626 <result name="VBOX_E_INVALID_VM_STATE">
4627 Invalid machine state.
4628 </result>
4629 <result name="VBOX_E_OBJECT_IN_USE">
4630 Hard disk already attached to this or another virtual machine.
4631 </result>
4632
4633 </desc>
4634 <param name="id" type="uuid" dir="in">
4635 <desc>UUID of the hard disk to attach.</desc>
4636 </param>
4637 <param name="name" type="wstring" dir="in">
4638 <desc>Name of the storage controller to attach the hard disk to.</desc>
4639 </param>
4640 <param name="controllerPort" type="long" dir="in">
4641 <desc>Port to attach the hard disk to.</desc>
4642 </param>
4643 <param name="device" type="long" dir="in">
4644 <desc>
4645 Device slot in the given port to attach the hard disk to.
4646 </desc>
4647 </param>
4648 </method>
4649
4650 <method name="getHardDisk" const="yes">
4651 <desc>
4652 Returns the virtual hard disk attached to a device slot of the specified
4653 bus.
4654
4655 Note that if the hard disk was indirectly attached by
4656 <link to="#attachHardDisk"/> to the given device slot then this
4657 method will return not the same object as passed to the
4658 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4659 more detailed information about attaching hard disks.
4660
4661 <result name="VBOX_E_OBJECT_NOT_FOUND">
4662 No hard disk attached to given slot/bus.
4663 </result>
4664
4665 </desc>
4666 <param name="name" type="wstring" dir="in">
4667 <desc>Name of the storage controller the hard disk is attached to.</desc>
4668 </param>
4669 <param name="controllerPort" type="long" dir="in">
4670 <desc>Port to query.</desc>
4671 </param>
4672 <param name="device" type="long" dir="in">
4673 <desc>Device slot in the given port to query.</desc>
4674 </param>
4675 <param name="hardDisk" type="IHardDisk" dir="return">
4676 <desc>Attached hard disk object.</desc>
4677 </param>
4678 </method>
4679
4680 <method name="detachHardDisk">
4681 <desc>
4682 Detaches the virtual hard disk attached to a device slot of the
4683 specified bus.
4684
4685 Detaching the hard disk from the virtual machine is deferred. This means
4686 that the hard disk remains associated with the machine when this method
4687 returns and gets actually de-associated only after a successful
4688 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4689 for more detailed information about attaching hard disks.
4690
4691 <note>
4692 You cannot detach the hard disk from a running machine.
4693 </note>
4694 <note>
4695 Detaching differencing hard disks implicitly created by <link
4696 to="#attachHardDisk"/> for the indirect attachment using this
4697 method will <b>not</b> implicitly delete them. The
4698 <link to="IHardDisk::deleteStorage"/> operation should be
4699 explicitly performed by the caller after the hard disk is successfully
4700 detached and the settings are saved with
4701 <link to="#saveSettings"/>, if it is the desired action.
4702 </note>
4703
4704 <result name="VBOX_E_INVALID_VM_STATE">
4705 Attempt to detach hard disk from a running virtual machine.
4706 </result>
4707 <result name="VBOX_E_OBJECT_NOT_FOUND">
4708 No hard disk attached to given slot/bus.
4709 </result>
4710 <result name="VBOX_E_NOT_SUPPORTED">
4711 Hard disk format does not support storage deletion.
4712 </result>
4713
4714 </desc>
4715 <param name="name" type="wstring" dir="in">
4716 <desc>name of the storage controller to detach the hard disk from.</desc>
4717 </param>
4718 <param name="controllerPort" type="long" dir="in">
4719 <desc>Port number to detach the hard disk from.</desc>
4720 </param>
4721 <param name="device" type="long" dir="in">
4722 <desc>Device slot number to detach the hard disk from.</desc>
4723 </param>
4724 </method>
4725
4726 <method name="getHardDiskAttachmentsOfController" const="yes">
4727 <desc>
4728 Returns an array of hard disk attachments which are attached to the
4729 the controller with the given name.
4730
4731 <result name="VBOX_E_OBJECT_NOT_FOUND">
4732 A storage controller with given name doesn't exist.
4733 </result>
4734 </desc>
4735 <param name="name" type="wstring" dir="in"/>
4736 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4737 </method>
4738
4739 <method name="getNetworkAdapter" const="yes">
4740 <desc>
4741 Returns the network adapter associated with the given slot.
4742 Slots are numbered sequentially, starting with zero. The total
4743 number of adapters per machine is defined by the
4744 <link to="ISystemProperties::networkAdapterCount"/> property,
4745 so the maximum slot number is one less than that property's value.
4746
4747 <result name="E_INVALIDARG">
4748 Invalid @a slot number.
4749 </result>
4750
4751 </desc>
4752 <param name="slot" type="unsigned long" dir="in"/>
4753 <param name="adapter" type="INetworkAdapter" dir="return"/>
4754 </method>
4755
4756 <method name="addStorageController">
4757 <desc>
4758 Adds a new storage controller (SCSI or SATA controller) to the
4759 machine and returns it as an instance of
4760 <link to="IStorageController" />.
4761
4762 @a name identifies the controller with subsequent calls such as
4763 <link to="#getStorageControllerByName" /> or
4764 <link to="#removeStorageController" /> or
4765 <link to="#attachHardDisk" />.
4766
4767 After the controller has been added, you can set its exact
4768 type by setting the <link to="IStorageController::controllerType" />.
4769
4770 <result name="VBOX_E_OBJECT_IN_USE">
4771 A storage controller with given name exists already.
4772 </result>
4773 <result name="E_INVALIDARG">
4774 Invalid @a controllerType.
4775 </result>
4776 </desc>
4777 <param name="name" type="wstring" dir="in"/>
4778 <param name="connectionType" type="StorageBus" dir="in"/>
4779 <param name="controller" type="IStorageController" dir="return"/>
4780 </method>
4781
4782 <method name="getStorageControllerByName" const="yes">
4783 <desc>
4784 Returns a storage controller with the given name.
4785
4786 <result name="VBOX_E_OBJECT_NOT_FOUND">
4787 A storage controller with given name doesn't exist.
4788 </result>
4789 </desc>
4790 <param name="name" type="wstring" dir="in"/>
4791 <param name="storageController" type="IStorageController" dir="return"/>
4792 </method>
4793
4794 <method name="removeStorageController">
4795 <desc>
4796 Removes a storage controller from the machine.
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 </method>
4804
4805 <method name="getSerialPort" const="yes">
4806 <desc>
4807 Returns the serial port associated with the given slot.
4808 Slots are numbered sequentially, starting with zero. The total
4809 number of serial ports per machine is defined by the
4810 <link to="ISystemProperties::serialPortCount"/> property,
4811 so the maximum slot number is one less than that property's value.
4812
4813 <result name="E_INVALIDARG">
4814 Invalid @a slot number.
4815 </result>
4816
4817 </desc>
4818 <param name="slot" type="unsigned long" dir="in"/>
4819 <param name="port" type="ISerialPort" dir="return"/>
4820 </method>
4821
4822 <method name="getParallelPort" const="yes">
4823 <desc>
4824 Returns the parallel port associated with the given slot.
4825 Slots are numbered sequentially, starting with zero. The total
4826 number of parallel ports per machine is defined by the
4827 <link to="ISystemProperties::parallelPortCount"/> property,
4828 so the maximum slot number is one less than that property's value.
4829
4830 <result name="E_INVALIDARG">
4831 Invalid @a slot number.
4832 </result>
4833
4834 </desc>
4835 <param name="slot" type="unsigned long" dir="in"/>
4836 <param name="port" type="IParallelPort" dir="return"/>
4837 </method>
4838
4839 <method name="getNextExtraDataKey">
4840 <desc>
4841 Returns the machine-specific extra data key name following the
4842 supplied key.
4843
4844 An error is returned if the supplied @a key does not exist. @c NULL is
4845 returned in @a nextKey if the supplied key is the last key. When
4846 supplying @c NULL for the @a key, the first key item is returned in
4847 @a nextKey (if there is any). @a nextValue is an optional parameter and
4848 if supplied, the next key's value is returned in it.
4849
4850 <result name="VBOX_E_OBJECT_NOT_FOUND">
4851 Extra data @a key not found.
4852 </result>
4853
4854 </desc>
4855 <param name="key" type="wstring" dir="in">
4856 <desc>Name of the data key to follow.</desc>
4857 </param>
4858 <param name="nextKey" type="wstring" dir="out">
4859 <desc>Name of the next data key.</desc>
4860 </param>
4861 <param name="nextValue" type="wstring" dir="out">
4862 <desc>Value of the next data key.</desc>
4863 </param>
4864 </method>
4865
4866 <method name="getExtraData">
4867 <desc>
4868 Returns associated machine-specific extra data.
4869
4870 If the requested data @a key does not exist, this function will
4871 succeed and return @c NULL in the @a value argument.
4872
4873 <result name="VBOX_E_FILE_ERROR">
4874 Settings file not accessible.
4875 </result>
4876 <result name="VBOX_E_XML_ERROR">
4877 Could not parse the settings file.
4878 </result>
4879
4880 </desc>
4881 <param name="key" type="wstring" dir="in">
4882 <desc>Name of the data key to get.</desc>
4883 </param>
4884 <param name="value" type="wstring" dir="return">
4885 <desc>Value of the requested data key.</desc>
4886 </param>
4887 </method>
4888
4889 <method name="setExtraData">
4890 <desc>
4891 Sets associated machine-specific extra data.
4892
4893 If you pass @c NULL as a key @a value, the given @a key will be
4894 deleted.
4895
4896 <note>
4897 Before performing the actual data change, this method will ask all
4898 registered callbacks using the
4899 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4900 notification for a permission. If one of the callbacks refuses the
4901 new value, the change will not be performed.
4902 </note>
4903 <note>
4904 On success, the
4905 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4906 is called to inform all registered callbacks about a successful data
4907 change.
4908 </note>
4909 <note>
4910 This method can be called outside the machine session and therefore
4911 it's a caller's responsibility to handle possible race conditions
4912 when several clients change the same key at the same time.
4913 </note>
4914
4915 <result name="VBOX_E_FILE_ERROR">
4916 Settings file not accessible.
4917 </result>
4918 <result name="VBOX_E_XML_ERROR">
4919 Could not parse the settings file.
4920 </result>
4921
4922 </desc>
4923 <param name="key" type="wstring" dir="in">
4924 <desc>Name of the data key to set.</desc>
4925 </param>
4926 <param name="value" type="wstring" dir="in">
4927 <desc>Value to assign to the key.</desc>
4928 </param>
4929 </method>
4930
4931 <method name="saveSettings">
4932 <desc>
4933 Saves any changes to machine settings made since the session
4934 has been opened or a new machine has been created, or since the
4935 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4936 For registered machines, new settings become visible to all
4937 other VirtualBox clients after successful invocation of this
4938 method.
4939 <note>
4940 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4941 notification event after the configuration has been successfully
4942 saved (only for registered machines).
4943 </note>
4944 <note>
4945 Calling this method is only valid on instances returned
4946 by <link to="ISession::machine"/> and on new machines
4947 created by <link to="IVirtualBox::createMachine"/> but not
4948 yet registered, or on unregistered machines after calling
4949 <link to="IVirtualBox::unregisterMachine"/>.
4950 </note>
4951
4952 <result name="VBOX_E_FILE_ERROR">
4953 Settings file not accessible.
4954 </result>
4955 <result name="VBOX_E_XML_ERROR">
4956 Could not parse the settings file.
4957 </result>
4958 <result name="E_ACCESSDENIED">
4959 Modification request refused.
4960 </result>
4961
4962 </desc>
4963 </method>
4964
4965 <method name="saveSettingsWithBackup">
4966 <desc>
4967 Creates a backup copy of the machine settings file (<link
4968 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4969 <link to="#saveSettings"/>.
4970
4971 Note that the backup copy is created <b>only</b> if the settings file
4972 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4973 details). Otherwise, this call is fully equivalent to
4974 <link to="#saveSettings"/> and no backup copying is done.
4975
4976 The backup copy is created in the same directory where the original
4977 settings file is located. It is given the following file name:
4978 <pre>
4979 original.xml.x.y-platform.bak
4980 </pre>
4981 where <tt>original.xml</tt> is the original settings file name
4982 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4983 format of the settings file (before auto-conversion).
4984
4985 If the given backup file already exists, this method will try to add the
4986 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4987 0 to 9) and copy it again until it succeeds. If all suffixes are
4988 occupied, or if any other copy error occurs, this method will return a
4989 failure.
4990
4991 If the copy operation succeeds, the @a bakFileName return argument will
4992 receive a full path to the created backup file (for informational
4993 purposes). Note that this will happen even if the subsequent
4994 <link to="#saveSettings"/> call performed by this method after the
4995 copy operation, fails.
4996
4997 <note>
4998 The VirtualBox API never calls this method. It is intended purely for
4999 the purposes of creating backup copies of the settings files by
5000 front-ends before saving the results of the automatically performed
5001 settings conversion to disk.
5002 </note>
5003
5004 <see>settingsFileVersion</see>
5005
5006 <result name="VBOX_E_FILE_ERROR">
5007 Settings file not accessible.
5008 </result>
5009 <result name="VBOX_E_XML_ERROR">
5010 Could not parse the settings file.
5011 </result>
5012 <result name="VBOX_E_INVALID_VM_STATE">
5013 Virtual machine is not mutable.
5014 </result>
5015 <result name="E_ACCESSDENIED">
5016 Modification request refused.
5017 </result>
5018
5019 </desc>
5020 <param name="bakFileName" type="wstring" dir="return">
5021 <desc>Full path to the created backup copy.</desc>
5022 </param>
5023 </method>
5024
5025 <method name="discardSettings">
5026 <desc>
5027 Discards any changes to the machine settings made since the session
5028 has been opened or since the last call to <link to="#saveSettings"/>
5029 or <link to="#discardSettings"/>.
5030 <note>
5031 Calling this method is only valid on instances returned
5032 by <link to="ISession::machine"/> and on new machines
5033 created by <link to="IVirtualBox::createMachine"/> or
5034 opened by <link to="IVirtualBox::openMachine"/> but not
5035 yet registered, or on unregistered machines after calling
5036 <link to="IVirtualBox::unregisterMachine"/>.
5037 </note>
5038
5039 <result name="VBOX_E_INVALID_VM_STATE">
5040 Virtual machine is not mutable.
5041 </result>
5042
5043 </desc>
5044 </method>
5045
5046 <method name="deleteSettings">
5047 <desc>
5048 Deletes the settings file of this machine from disk.
5049 The machine must not be registered in order for this operation
5050 to succeed.
5051 <note>
5052 <link to="#settingsModified"/> will return TRUE after this
5053 method successfully returns.
5054 </note>
5055 <note>
5056 Calling this method is only valid on instances returned
5057 by <link to="ISession::machine"/> and on new machines
5058 created by <link to="IVirtualBox::createMachine"/> or
5059 opened by <link to="IVirtualBox::openMachine"/> but not
5060 yet registered, or on unregistered machines after calling
5061 <link to="IVirtualBox::unregisterMachine"/>.
5062 </note>
5063 <note>
5064 The deleted machine settings file can be restored (saved again)
5065 by calling <link to="#saveSettings"/>.
5066 </note>
5067
5068 <result name="VBOX_E_INVALID_VM_STATE">
5069 Cannot delete settings of a registered machine or
5070 machine not mutable.
5071 </result>
5072 <result name="VBOX_E_IPRT_ERROR">
5073 Could not delete the settings file.
5074 </result>
5075
5076 </desc>
5077 </method>
5078
5079 <method name="export">
5080 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5081 steps required to export VirtualBox machines to OVF.
5082 </desc>
5083
5084 <param name="aAppliance" type="IAppliance" dir="in">
5085 <desc>Appliance to export this machine to.</desc>
5086 </param>
5087 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5088 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5089 </param>
5090 </method >
5091
5092 <method name="getSnapshot">
5093 <desc>
5094 Returns a snapshot of this machine with the given UUID.
5095 A <tt>null</tt> UUID can be used to obtain the first snapshot
5096 taken on this machine. This is useful if you want to traverse
5097 the whole tree of snapshots starting from the root.
5098
5099 <result name="VBOX_E_OBJECT_NOT_FOUND">
5100 Virtual machine has no snapshots or snapshot not found.
5101 </result>
5102
5103 </desc>
5104 <param name="id" type="uuid" dir="in">
5105 <desc>UUID of the snapshot to get</desc>
5106 </param>
5107 <param name="snapshot" type="ISnapshot" dir="return">
5108 <desc>Snapshot object with the given UUID.</desc>
5109 </param>
5110 </method>
5111
5112 <method name="findSnapshot">
5113 <desc>
5114 Returns a snapshot of this machine with the given name.
5115
5116 <result name="VBOX_E_OBJECT_NOT_FOUND">
5117 Virtual machine has no snapshots or snapshot not found.
5118 </result>
5119
5120 </desc>
5121 <param name="name" type="wstring" dir="in">
5122 <desc>Name of the snapshot to find</desc>
5123 </param>
5124 <param name="snapshot" type="ISnapshot" dir="return">
5125 <desc>Snapshot object with the given name.</desc>
5126 </param>
5127 </method>
5128
5129 <method name="setCurrentSnapshot">
5130 <desc>
5131 Sets the current snapshot of this machine.
5132 <note>
5133 In the current implementation, this operation is not
5134 implemented.
5135 </note>
5136 </desc>
5137 <param name="id" type="uuid" dir="in">
5138 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5139 </param>
5140 </method>
5141
5142 <method name="createSharedFolder">
5143 <desc>
5144 Creates a new permanent shared folder by associating the given logical
5145 name with the given host path, adds it to the collection of shared
5146 folders and starts sharing it. Refer to the description of
5147 <link to="ISharedFolder"/> to read more about logical names.
5148
5149 <result name="VBOX_E_OBJECT_IN_USE">
5150 Shared folder already exists.
5151 </result>
5152 <result name="VBOX_E_FILE_ERROR">
5153 Shared folder @a hostPath not accessible.
5154 </result>
5155
5156 </desc>
5157 <param name="name" type="wstring" dir="in">
5158 <desc>Unique logical name of the shared folder.</desc>
5159 </param>
5160 <param name="hostPath" type="wstring" dir="in">
5161 <desc>Full path to the shared folder in the host file system.</desc>
5162 </param>
5163 <param name="writable" type="boolean" dir="in">
5164 <desc>Whether the share is writable or readonly</desc>
5165 </param>
5166 </method>
5167
5168 <method name="removeSharedFolder">
5169 <desc>
5170 Removes the permanent shared folder with the given name previously
5171 created by <link to="#createSharedFolder"/> from the collection of
5172 shared folders and stops sharing it.
5173
5174 <result name="VBOX_E_INVALID_VM_STATE">
5175 Virtual machine is not mutable.
5176 </result>
5177 <result name="VBOX_E_OBJECT_NOT_FOUND">
5178 Shared folder @a name does not exist.
5179 </result>
5180
5181 </desc>
5182 <param name="name" type="wstring" dir="in">
5183 <desc>Logical name of the shared folder to remove.</desc>
5184 </param>
5185 </method>
5186
5187 <method name="canShowConsoleWindow">
5188 <desc>
5189 Returns @c true if the VM console process can activate the
5190 console window and bring it to foreground on the desktop of
5191 the host PC.
5192 <note>
5193 This method will fail if a session for this machine is not
5194 currently open.
5195 </note>
5196
5197 <result name="VBOX_E_INVALID_VM_STATE">
5198 Machine session is not open.
5199 </result>
5200
5201 </desc>
5202 <param name="canShow" type="boolean" dir="return">
5203 <desc>
5204 @c true if the console window can be shown and @c
5205 false otherwise.
5206 </desc>
5207 </param>
5208 </method>
5209
5210 <method name="showConsoleWindow">
5211 <desc>
5212 Activates the console window and brings it to foreground on
5213 the desktop of the host PC. Many modern window managers on
5214 many platforms implement some sort of focus stealing
5215 prevention logic, so that it may be impossible to activate
5216 a window without the help of the currently active
5217 application. In this case, this method will return a non-zero
5218 identifier that represents the top-level window of the VM
5219 console process. The caller, if it represents a currently
5220 active process, is responsible to use this identifier (in a
5221 platform-dependent manner) to perform actual window
5222 activation.
5223 <note>
5224 This method will fail if a session for this machine is not
5225 currently open.
5226 </note>
5227
5228 <result name="VBOX_E_INVALID_VM_STATE">
5229 Machine session is not open.
5230 </result>
5231
5232 </desc>
5233 <param name="winId" type="unsigned long long" dir="return">
5234 <desc>
5235 Platform-dependent identifier of the top-level VM console
5236 window, or zero if this method has performed all actions
5237 necessary to implement the <i>show window</i> semantics for
5238 the given platform and/or VirtualBox front-end.
5239 </desc>
5240 </param>
5241 </method>
5242
5243 <method name="getGuestProperty">
5244 <desc>
5245 Reads an entry from the machine's guest property store.
5246
5247 <result name="VBOX_E_INVALID_VM_STATE">
5248 Machine session is not open.
5249 </result>
5250
5251 </desc>
5252 <param name="name" type="wstring" dir="in">
5253 <desc>
5254 The name of the property to read.
5255 </desc>
5256 </param>
5257 <param name="value" type="wstring" dir="out">
5258 <desc>
5259 The value of the property. If the property does not exist then this
5260 will be empty.
5261 </desc>
5262 </param>
5263 <param name="timestamp" type="unsigned long long" dir="out">
5264 <desc>
5265 The time at which the property was last modified, as seen by the
5266 server process.
5267 </desc>
5268 </param>
5269 <param name="flags" type="wstring" dir="out">
5270 <desc>
5271 Additional property parameters, passed as a comma-separated list of
5272 "name=value" type entries.
5273 </desc>
5274 </param>
5275 </method>
5276
5277 <method name="getGuestPropertyValue">
5278 <desc>
5279 Reads a value from the machine's guest property store.
5280
5281 <result name="VBOX_E_INVALID_VM_STATE">
5282 Machine session is not open.
5283 </result>
5284
5285 </desc>
5286 <param name="property" type="wstring" dir="in">
5287 <desc>
5288 The name of the property to read.
5289 </desc>
5290 </param>
5291 <param name="value" type="wstring" dir="return">
5292 <desc>
5293 The value of the property. If the property does not exist then this
5294 will be empty.
5295 </desc>
5296 </param>
5297 </method>
5298
5299 <method name="getGuestPropertyTimestamp">
5300 <desc>
5301 Reads a property timestamp from the machine's guest property store.
5302
5303 <result name="VBOX_E_INVALID_VM_STATE">
5304 Machine session is not open.
5305 </result>
5306
5307 </desc>
5308 <param name="property" type="wstring" dir="in">
5309 <desc>
5310 The name of the property to read.
5311 </desc>
5312 </param>
5313 <param name="value" type="unsigned long long" dir="return">
5314 <desc>
5315 The timestamp. If the property does not exist then this will be
5316 empty.
5317 </desc>
5318 </param>
5319 </method>
5320
5321 <method name="setGuestProperty">
5322 <desc>
5323 Sets, changes or deletes an entry in the machine's guest property
5324 store.
5325
5326 <result name="E_ACCESSDENIED">
5327 Property cannot be changed.
5328 </result>
5329 <result name="E_INVALIDARG">
5330 Invalid @a flags.
5331 </result>
5332 <result name="VBOX_E_INVALID_VM_STATE">
5333 Virtual machine is not mutable or session not open.
5334 </result>
5335 <result name="VBOX_E_INVALID_OBJECT_STATE">
5336 Cannot set transient property when machine not running.
5337 </result>
5338
5339 </desc>
5340 <param name="property" type="wstring" dir="in">
5341 <desc>
5342 The name of the property to set, change or delete.
5343 </desc>
5344 </param>
5345 <param name="value" type="wstring" dir="in">
5346 <desc>
5347 The new value of the property to set, change or delete. If the
5348 property does not yet exist and value is non-empty, it will be
5349 created. If the value is empty, the key will be deleted if it
5350 exists.
5351 </desc>
5352 </param>
5353 <param name="flags" type="wstring" dir="in">
5354 <desc>
5355 Additional property parameters, passed as a comma-separated list of
5356 "name=value" type entries.
5357 </desc>
5358 </param>
5359 </method>
5360
5361 <method name="setGuestPropertyValue">
5362 <desc>
5363 Sets, changes or deletes a value in the machine's guest property
5364 store. The flags field will be left unchanged or created empty for a
5365 new property.
5366
5367 <result name="E_ACCESSDENIED">
5368 Property cannot be changed.
5369 </result>
5370 <result name="VBOX_E_INVALID_VM_STATE">
5371 Virtual machine is not mutable or session not open.
5372 </result>
5373 <result name="VBOX_E_INVALID_OBJECT_STATE">
5374 Cannot set transient property when machine not running.
5375 </result>
5376 </desc>
5377
5378 <param name="property" type="wstring" dir="in">
5379 <desc>
5380 The name of the property to set, change or delete.
5381 </desc>
5382 </param>
5383 <param name="value" type="wstring" dir="in">
5384 <desc>
5385 The new value of the property to set, change or delete. If the
5386 property does not yet exist and value is non-empty, it will be
5387 created. If value is empty, the property will be deleted if it
5388 exists.
5389 </desc>
5390 </param>
5391 </method>
5392
5393 <method name="enumerateGuestProperties">
5394 <desc>
5395 Return a list of the guest properties matching a set of patterns along
5396 with their values, time stamps and flags.
5397 </desc>
5398 <param name="patterns" type="wstring" dir="in">
5399 <desc>
5400 The patterns to match the properties against, separated by '|'
5401 characters. If this is empty or NULL, all properties will match.
5402 </desc>
5403 </param>
5404 <param name="name" type="wstring" dir="out" safearray="yes">
5405 <desc>
5406 The names of the properties returned.
5407 </desc>
5408 </param>
5409 <param name="value" type="wstring" dir="out" safearray="yes">
5410 <desc>
5411 The values of the properties returned. The array entries match the
5412 corresponding entries in the @a name array.
5413 </desc>
5414 </param>
5415 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5416 <desc>
5417 The time stamps of the properties returned. The array entries match
5418 the corresponding entries in the @a name array.
5419 </desc>
5420 </param>
5421 <param name="flags" type="wstring" dir="out" safearray="yes">
5422 <desc>
5423 The flags of the properties returned. The array entries match the
5424 corresponding entries in the @a name array.
5425 </desc>
5426 </param>
5427 </method>
5428</interface>
5429
5430 <!--
5431 // IConsole
5432 /////////////////////////////////////////////////////////////////////////
5433 -->
5434
5435 <interface
5436 name="IConsoleCallback" extends="$unknown"
5437 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5438 wsmap="suppress"
5439 >
5440
5441 <method name="onMousePointerShapeChange">
5442 <desc>
5443 Notification when the guest mouse pointer shape has
5444 changed. The new shape data is given.
5445 </desc>
5446 <param name="visible" type="boolean" dir="in">
5447 <desc>
5448 Flag whether the pointer is visible.
5449 </desc>
5450 </param>
5451 <param name="alpha" type="boolean" dir="in">
5452 <desc>
5453 Flag whether the pointer has an alpha channel.
5454 </desc>
5455 </param>
5456 <param name="xHot" type="unsigned long" dir="in">
5457 <desc>
5458 The pointer hot spot x coordinate.
5459 </desc>
5460 </param>
5461 <param name="yHot" type="unsigned long" dir="in">
5462 <desc>
5463 The pointer hot spot y coordinate.
5464 </desc>
5465 </param>
5466 <param name="width" type="unsigned long" dir="in">
5467 <desc>
5468 Width of the pointer shape in pixels.
5469 </desc>
5470 </param>
5471 <param name="height" type="unsigned long" dir="in">
5472 <desc>
5473 Height of the pointer shape in pixels.
5474 </desc>
5475 </param>
5476 <param name="shape" type="octet" mod="ptr" dir="in">
5477 <desc>
5478 Address of the shape buffer.
5479
5480 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5481 followed by a 32-bpp XOR (color) mask.
5482
5483 For pointers without alpha channel the XOR mask pixels are 32
5484 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5485 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5486
5487 An AND mask is used for pointers with alpha channel, so if the
5488 callback does not support alpha, the pointer could be
5489 displayed as a normal color pointer.
5490
5491 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5492 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5493 height</tt>. The padding bits at the end of each scanline are
5494 undefined.
5495
5496 The XOR mask follows the AND mask on the next 4-byte aligned
5497 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5498 Bytes in the gap between the AND and the XOR mask are undefined.
5499 The XOR mask scanlines have no gap between them and the size of
5500 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5501
5502 <note>
5503 If @a shape is 0, only the pointer visibility is changed.
5504 </note>
5505 </desc>
5506 </param>
5507 </method>
5508
5509 <method name="onMouseCapabilityChange">
5510 <desc>
5511 Notification when the mouse capabilities reported by the
5512 guest have changed. The new capabilities are passed.
5513 </desc>
5514 <param name="supportsAbsolute" type="boolean" dir="in"/>
5515 <param name="needsHostCursor" type="boolean" dir="in"/>
5516 </method>
5517
5518 <method name="onKeyboardLedsChange">
5519 <desc>
5520 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5521 to alter the state of the keyboard LEDs.
5522 </desc>
5523 <param name="numLock" type="boolean" dir="in"/>
5524 <param name="capsLock" type="boolean" dir="in"/>
5525 <param name="scrollLock" type="boolean" dir="in"/>
5526 </method>
5527
5528 <method name="onStateChange">
5529 <desc>
5530 Notification when the execution state of the machine has changed.
5531 The new state will be given.
5532 </desc>
5533 <param name="state" type="MachineState" dir="in"/>
5534 </method>
5535
5536 <method name="onAdditionsStateChange">
5537 <desc>
5538 Notification when a Guest Additions property changes.
5539 Interested callees should query IGuest attributes to
5540 find out what has changed.
5541 </desc>
5542 </method>
5543
5544 <method name="onDVDDriveChange">
5545 <desc>
5546 Notification when a property of the
5547 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5548 Interested callees should use IDVDDrive methods to find out what has
5549 changed.
5550 </desc>
5551 </method>
5552
5553 <method name="onFloppyDriveChange">
5554 <desc>
5555 Notification when a property of the
5556 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5557 Interested callees should use IFloppyDrive methods to find out what
5558 has changed.
5559 </desc>
5560 </method>
5561
5562 <method name="onNetworkAdapterChange">
5563 <desc>
5564 Notification when a property of one of the
5565 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5566 changes. Interested callees should use INetworkAdapter methods and
5567 attributes to find out what has changed.
5568 </desc>
5569 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5570 <desc>Network adapter that is subject to change.</desc>
5571 </param>
5572 </method>
5573
5574 <method name="onSerialPortChange">
5575 <desc>
5576 Notification when a property of one of the
5577 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5578 Interested callees should use ISerialPort methods and attributes
5579 to find out what has changed.
5580 </desc>
5581 <param name="serialPort" type="ISerialPort" dir="in">
5582 <desc>Serial port that is subject to change.</desc>
5583 </param>
5584 </method>
5585
5586 <method name="onParallelPortChange">
5587 <desc>
5588 Notification when a property of one of the
5589 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5590 changes. Interested callees should use ISerialPort methods and
5591 attributes to find out what has changed.
5592 </desc>
5593 <param name="parallelPort" type="IParallelPort" dir="in">
5594 <desc>Parallel port that is subject to change.</desc>
5595 </param>
5596 </method>
5597
5598 <method name="onStorageControllerChange">
5599 <desc>
5600 Notification when a property of one of the
5601 virtual <link to="IMachine::getStorageControllers">storage controllers</link>
5602 changes. Interested callees should use query the corresponding collections
5603 to find out what has changed.
5604 </desc>
5605 </method>
5606
5607 <method name="onVRDPServerChange">
5608 <desc>
5609 Notification when a property of the
5610 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5611 Interested callees should use IVRDPServer methods and attributes to
5612 find out what has changed.
5613 </desc>
5614 </method>
5615
5616 <method name="onUSBControllerChange">
5617 <desc>
5618 Notification when a property of the virtual
5619 <link to="IMachine::USBController">USB controller</link> changes.
5620 Interested callees should use IUSBController methods and attributes to
5621 find out what has changed.
5622 </desc>
5623 </method>
5624
5625 <method name="onUSBDeviceStateChange">
5626 <desc>
5627 Notification when a USB device is attached to or detached from
5628 the virtual USB controller.
5629
5630 This notification is sent as a result of the indirect
5631 request to attach the device because it matches one of the
5632 machine USB filters, or as a result of the direct request
5633 issued by <link to="IConsole::attachUSBDevice"/> or
5634 <link to="IConsole::detachUSBDevice"/>.
5635
5636 This notification is sent in case of both a succeeded and a
5637 failed request completion. When the request succeeds, the
5638 @a error parameter is @c null, and the given device has been
5639 already added to (when @a attached is @c true) or removed from
5640 (when @a attached is @c false) the collection represented by
5641 <link to="IConsole::USBDevices"/>. On failure, the collection
5642 doesn't change and the @a error parameter represents the error
5643 message describing the failure.
5644
5645 </desc>
5646 <param name="device" type="IUSBDevice" dir="in">
5647 <desc>Device that is subject to state change.</desc>
5648 </param>
5649 <param name="attached" type="boolean" dir="in">
5650 <desc>
5651 <tt>true</tt> if the device was attached
5652 and <tt>false</tt> otherwise.
5653 </desc>
5654 </param>
5655 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5656 <desc>
5657 <tt>null</tt> on success or an error message object on
5658 failure.
5659 </desc>
5660 </param>
5661 </method>
5662
5663 <method name="onSharedFolderChange">
5664 <desc>
5665 Notification when a shared folder is added or removed.
5666 The @a scope argument defines one of three scopes:
5667 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5668 (<link to="Scope_Global">Global</link>),
5669 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5670 the machine (<link to="Scope_Machine">Machine</link>) or <link
5671 to="IConsole::sharedFolders">transient shared folders</link> of the
5672 machine (<link to="Scope_Session">Session</link>). Interested callees
5673 should use query the corresponding collections to find out what has
5674 changed.
5675 </desc>
5676 <param name="scope" type="Scope" dir="in">
5677 <desc>Scope of the notification.</desc>
5678 </param>
5679 </method>
5680
5681 <method name="onRuntimeError">
5682 <desc>
5683 Notification when an error happens during the virtual
5684 machine execution.
5685
5686 There are three kinds of runtime errors:
5687 <ul>
5688 <li><i>fatal</i></li>
5689 <li><i>non-fatal with retry</i></li>
5690 <li><i>non-fatal warnings</i></li>
5691 </ul>
5692
5693 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5694 to <tt>true</tt>. In case of fatal errors, the virtual machine
5695 execution is always paused before calling this notification, and
5696 the notification handler is supposed either to immediately save
5697 the virtual machine state using <link to="IConsole::saveState"/>
5698 or power it off using <link to="IConsole::powerDown"/>.
5699 Resuming the execution can lead to unpredictable results.
5700
5701 <b>Non-fatal</b> errors and warnings are indicated by the
5702 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5703 is in the Paused state by the time the error notification is
5704 received, it means that the user can <i>try to resume</i> the machine
5705 execution after attempting to solve the problem that caused the
5706 error. In this case, the notification handler is supposed
5707 to show an appropriate message to the user (depending on the
5708 value of the @a id parameter) that offers several actions such
5709 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5710 wants to retry, the notification handler should continue
5711 the machine execution using the <link to="IConsole::resume"/>
5712 call. If the machine execution is not Paused during this
5713 notification, then it means this notification is a <i>warning</i>
5714 (for example, about a fatal condition that can happen very soon);
5715 no immediate action is required from the user, the machine
5716 continues its normal execution.
5717
5718 Note that in either case the notification handler
5719 <b>must not</b> perform any action directly on a thread
5720 where this notification is called. Everything it is allowed to
5721 do is to post a message to another thread that will then talk
5722 to the user and take the corresponding action.
5723
5724 Currently, the following error identifiers are known:
5725 <ul>
5726 <li><tt>"HostMemoryLow"</tt></li>
5727 <li><tt>"HostAudioNotResponding"</tt></li>
5728 <li><tt>"VDIStorageFull"</tt></li>
5729 </ul>
5730
5731 <note>
5732 This notification is not designed to be implemented by
5733 more than one callback at a time. If you have multiple
5734 IConsoleCallback instances registered on the given
5735 IConsole object, make sure you simply do nothing but
5736 return @c S_OK from all but one of them that does actual
5737 user notification and performs necessary actions.
5738 </note>
5739
5740 </desc>
5741 <param name="fatal" type="boolean" dir="in">
5742 <desc>Whether the error is fatal or not</desc>
5743 </param>
5744 <param name="id" type="wstring" dir="in">
5745 <desc>Error identifier</desc>
5746 </param>
5747 <param name="message" type="wstring" dir="in">
5748 <desc>Optional error message</desc>
5749 </param>
5750 </method>
5751
5752 <method name="onCanShowWindow">
5753 <desc>
5754 Notification when a call to
5755 <link to="IMachine::canShowConsoleWindow"/> is made by a
5756 front-end to check if a subsequent call to
5757 <link to="IMachine::showConsoleWindow"/> can succeed.
5758
5759 The callee should give an answer appropriate to the current
5760 machine state in the @a canShow argument. This answer must
5761 remain valid at least until the next
5762 <link to="IConsole::state">machine state</link> change.
5763
5764 <note>
5765 This notification is not designed to be implemented by
5766 more than one callback at a time. If you have multiple
5767 IConsoleCallback instances registered on the given
5768 IConsole object, make sure you simply do nothing but
5769 return @c true and @c S_OK from all but one of them that
5770 actually manages console window activation.
5771 </note>
5772 </desc>
5773 <param name="canShow" type="boolean" dir="return">
5774 <desc>
5775 @c true if the console window can be shown and @c
5776 false otherwise.
5777 </desc>
5778 </param>
5779 </method>
5780
5781 <method name="onShowWindow">
5782 <desc>
5783 Notification when a call to
5784 <link to="IMachine::showConsoleWindow"/>
5785 requests the console window to be activated and brought to
5786 foreground on the desktop of the host PC.
5787
5788 This notification should cause the VM console process to
5789 perform the requested action as described above. If it is
5790 impossible to do it at a time of this notification, this
5791 method should return a failure.
5792
5793 Note that many modern window managers on many platforms
5794 implement some sort of focus stealing prevention logic, so
5795 that it may be impossible to activate a window without the
5796 help of the currently active application (which is supposedly
5797 an initiator of this notification). In this case, this method
5798 must return a non-zero identifier that represents the
5799 top-level window of the VM console process. The caller, if it
5800 represents a currently active process, is responsible to use
5801 this identifier (in a platform-dependent manner) to perform
5802 actual window activation.
5803
5804 This method must set @a winId to zero if it has performed all
5805 actions necessary to complete the request and the console
5806 window is now active and in foreground, to indicate that no
5807 further action is required on the caller's side.
5808
5809 <note>
5810 This notification is not designed to be implemented by
5811 more than one callback at a time. If you have multiple
5812 IConsoleCallback instances registered on the given
5813 IConsole object, make sure you simply do nothing but
5814 return @c S_OK from all but one of them that actually
5815 manages console window activation.
5816 </note>
5817 </desc>
5818 <param name="winId" type="unsigned long long" dir="return">
5819 <desc>
5820 Platform-dependent identifier of the top-level VM console
5821 window, or zero if this method has performed all actions
5822 necessary to implement the <i>show window</i> semantics for
5823 the given platform and/or this VirtualBox front-end.
5824 </desc>
5825 </param>
5826 </method>
5827
5828 </interface>
5829
5830 <interface
5831 name="IRemoteDisplayInfo" extends="$unknown"
5832 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5833 wsmap="struct"
5834 >
5835 <desc>
5836 Contains information about the remote display (VRDP) capabilities and status.
5837 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5838 </desc>
5839
5840 <attribute name="active" type="boolean" readonly="yes">
5841 <desc>
5842 Whether the remote display connection is active.
5843 </desc>
5844 </attribute>
5845
5846 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5847 <desc>
5848 How many times a client connected.
5849 </desc>
5850 </attribute>
5851
5852 <attribute name="beginTime" type="long long" readonly="yes">
5853 <desc>
5854 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5855 </desc>
5856 </attribute>
5857
5858 <attribute name="endTime" type="long long" readonly="yes">
5859 <desc>
5860 When the last connection was terminated or the current time, if
5861 connection is still active, in milliseconds since 1970-01-01 UTC.
5862 </desc>
5863 </attribute>
5864
5865 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5866 <desc>
5867 How many bytes were sent in last or current, if still active, connection.
5868 </desc>
5869 </attribute>
5870
5871 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5872 <desc>
5873 How many bytes were sent in all connections.
5874 </desc>
5875 </attribute>
5876
5877 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5878 <desc>
5879 How many bytes were received in last or current, if still active, connection.
5880 </desc>
5881 </attribute>
5882
5883 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5884 <desc>
5885 How many bytes were received in all connections.
5886 </desc>
5887 </attribute>
5888
5889 <attribute name="user" type="wstring" readonly="yes">
5890 <desc>
5891 Login user name supplied by the client.
5892 </desc>
5893 </attribute>
5894
5895 <attribute name="domain" type="wstring" readonly="yes">
5896 <desc>
5897 Login domain name supplied by the client.
5898 </desc>
5899 </attribute>
5900
5901 <attribute name="clientName" type="wstring" readonly="yes">
5902 <desc>
5903 The client name supplied by the client.
5904 </desc>
5905 </attribute>
5906
5907 <attribute name="clientIP" type="wstring" readonly="yes">
5908 <desc>
5909 The IP address of the client.
5910 </desc>
5911 </attribute>
5912
5913 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5914 <desc>
5915 The client software version number.
5916 </desc>
5917 </attribute>
5918
5919 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5920 <desc>
5921 Public key exchange method used when connection was established.
5922 Values: 0 - RDP4 public key exchange scheme.
5923 1 - X509 certificates were sent to client.
5924 </desc>
5925 </attribute>
5926
5927 </interface>
5928
5929 <interface
5930 name="IConsole" extends="$unknown"
5931 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5932 wsmap="managed"
5933 >
5934 <desc>
5935 The IConsole interface represents an interface to control virtual
5936 machine execution.
5937
5938 The console object that implements the IConsole interface is obtained
5939 from a session object after the session for the given machine has been
5940 opened using one of <link to="IVirtualBox::openSession"/>,
5941 <link to="IVirtualBox::openRemoteSession"/> or
5942 <link to="IVirtualBox::openExistingSession"/> methods.
5943
5944 Methods of the IConsole interface allow the caller to query the current
5945 virtual machine execution state, pause the machine or power it down, save
5946 the machine state or take a snapshot, attach and detach removable media
5947 and so on.
5948
5949 <see>ISession</see>
5950 </desc>
5951
5952 <attribute name="machine" type="IMachine" readonly="yes">
5953 <desc>
5954 Machine object this console is sessioned with.
5955 <note>
5956 This is a convenience property, it has the same value as
5957 <link to="ISession::machine"/> of the corresponding session
5958 object.
5959 </note>
5960 </desc>
5961 </attribute>
5962
5963 <attribute name="state" type="MachineState" readonly="yes">
5964 <desc>
5965 Current execution state of the machine.
5966 <note>
5967 This property always returns the same value as the corresponding
5968 property of the IMachine object this console is sessioned with.
5969 For the process that owns (executes) the VM, this is the
5970 preferable way of querying the VM state, because no IPC
5971 calls are made.
5972 </note>
5973 </desc>
5974 </attribute>
5975
5976 <attribute name="guest" type="IGuest" readonly="yes">
5977 <desc>Guest object.</desc>
5978 </attribute>
5979
5980 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5981 <desc>
5982 Virtual keyboard object.
5983 <note>
5984 If the machine is not running, any attempt to use
5985 the returned object will result in an error.
5986 </note>
5987 </desc>
5988 </attribute>
5989
5990 <attribute name="mouse" type="IMouse" readonly="yes">
5991 <desc>
5992 Virtual mouse object.
5993 <note>
5994 If the machine is not running, any attempt to use
5995 the returned object will result in an error.
5996 </note>
5997 </desc>
5998 </attribute>
5999
6000 <attribute name="display" type="IDisplay" readonly="yes">
6001 <desc>Virtual display object.
6002 <note>
6003 If the machine is not running, any attempt to use
6004 the returned object will result in an error.
6005 </note>
6006 </desc>
6007 </attribute>
6008
6009 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6010 <desc>Debugging interface.</desc>
6011 </attribute>
6012
6013 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6014 <desc>
6015 Collection of USB devices currently attached to the virtual
6016 USB controller.
6017 <note>
6018 The collection is empty if the machine is not running.
6019 </note>
6020 </desc>
6021 </attribute>
6022
6023 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6024 <desc>
6025 List of USB devices currently attached to the remote VRDP client.
6026 Once a new device is physically attached to the remote host computer,
6027 it appears in this list and remains there until detached.
6028 </desc>
6029 </attribute>
6030
6031 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6032 <desc>
6033 Collection of shared folders for the current session. These folders
6034 are called transient shared folders because they are available to the
6035 guest OS running inside the associated virtual machine only for the
6036 duration of the session (as opposed to
6037 <link to="IMachine::sharedFolders"/> which represent permanent shared
6038 folders). When the session is closed (e.g. the machine is powered down),
6039 these folders are automatically discarded.
6040
6041 New shared folders are added to the collection using
6042 <link to="#createSharedFolder"/>. Existing shared folders can be
6043 removed using <link to="#removeSharedFolder"/>.
6044 </desc>
6045 </attribute>
6046
6047 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6048 <desc>
6049 Interface that provides information on Remote Display (VRDP) connection.
6050 </desc>
6051 </attribute>
6052
6053 <method name="powerUp">
6054 <desc>
6055 Starts the virtual machine execution using the current machine
6056 state (that is, its current execution state, current settings and
6057 current hard disks).
6058
6059 If the machine is powered off or aborted, the execution will
6060 start from the beginning (as if the real hardware were just
6061 powered on).
6062
6063 If the machine is in the <link to="MachineState_Saved"/> state,
6064 it will continue its execution the point where the state has
6065 been saved.
6066
6067 <note>
6068 Unless you are trying to write a new VirtualBox front-end that
6069 performs direct machine execution (like the VirtualBox or VBoxSDL
6070 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6071 session opened by <link to="IVirtualBox::openSession"/> and use this
6072 session only to change virtual machine settings. If you simply want to
6073 start virtual machine execution using one of the existing front-ends
6074 (for example the VirtualBox GUI or headless server), simply use
6075 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6076 power up the machine automatically for you.
6077 </note>
6078
6079 <see>#saveState</see>
6080 <result name="VBOX_E_INVALID_VM_STATE">
6081 Virtual machine already running.
6082 </result>
6083 <result name="VBOX_E_HOST_ERROR">
6084 Host interface does not exist or name not set.
6085 </result>
6086 <result name="VBOX_E_FILE_ERROR">
6087 Invalid saved state file.
6088 </result>
6089 </desc>
6090 <param name="progress" type="IProgress" dir="return">
6091 <desc>Progress object to track the operation completion.</desc>
6092 </param>
6093 </method>
6094
6095 <method name="powerUpPaused">
6096 <desc>
6097 Identical to powerUp except that the VM will enter the
6098 <link to="MachineState_Paused"/> state, instead of
6099 <link to="MachineState_Running"/>.
6100
6101 <see>#powerUp</see>
6102 <result name="VBOX_E_INVALID_VM_STATE">
6103 Virtual machine already running.
6104 </result>
6105 <result name="VBOX_E_HOST_ERROR">
6106 Host interface does not exist or name not set.
6107 </result>
6108 <result name="VBOX_E_FILE_ERROR">
6109 Invalid saved state file.
6110 </result>
6111 </desc>
6112 <param name="progress" type="IProgress" dir="return">
6113 <desc>Progress object to track the operation completion.</desc>
6114 </param>
6115 </method>
6116
6117 <method name="powerDown">
6118 <desc>
6119 Stops the virtual machine execution.
6120 After this operation completes, the machine will go to the
6121 PoweredOff state.
6122
6123 @deprecated This method will be removed in VirtualBox 2.1 where the
6124 powerDownAsync() method will take its name. Do not use this method in
6125 the code.
6126 <result name="VBOX_E_INVALID_VM_STATE">
6127 Virtual machine must be Running, Paused or Stuck to be powered down.
6128 </result>
6129 <result name="VBOX_E_VM_ERROR">
6130 Unable to power off or destroy virtual machine.
6131 </result>
6132 </desc>
6133 </method>
6134
6135 <method name="powerDownAsync">
6136 <desc>
6137 Initiates the power down procedure to stop the virtual machine
6138 execution.
6139
6140 The completion of the power down procedure is tracked using the returned
6141 IProgress object. After the operation is complete, the machine will go
6142 to the PoweredOff state.
6143
6144 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
6145 where the original powerDown() method will be removed. You will need to
6146 rename "powerDownAsync" to "powerDown" in your sources to make them
6147 build with version 2.1.
6148 <result name="VBOX_E_INVALID_VM_STATE">
6149 Virtual machine must be Running, Paused or Stuck to be powered down.
6150 </result>
6151 </desc>
6152 <param name="progress" type="IProgress" dir="return">
6153 <desc>Progress object to track the operation completion.</desc>
6154 </param>
6155 </method>
6156
6157 <method name="reset">
6158 <desc>Resets the virtual machine.
6159 <result name="VBOX_E_INVALID_VM_STATE">
6160 Virtual machine not in Running state.
6161 </result>
6162 <result name="VBOX_E_VM_ERROR">
6163 Virtual machine error in reset operation.
6164 </result>
6165 </desc>
6166 </method>
6167
6168 <method name="pause">
6169 <desc>Pauses the virtual machine execution.
6170 <result name="VBOX_E_INVALID_VM_STATE">
6171 Virtual machine not in Running state.
6172 </result>
6173 <result name="VBOX_E_VM_ERROR">
6174 Virtual machine error in suspend operation.
6175 </result>
6176 </desc>
6177 </method>
6178
6179 <method name="resume">
6180 <desc>Resumes the virtual machine execution.
6181 <result name="VBOX_E_INVALID_VM_STATE">
6182 Virtual machine not in Paused state.
6183 </result>
6184 <result name="VBOX_E_VM_ERROR">
6185 Virtual machine error in resume operation.
6186 </result>
6187 </desc>
6188 </method>
6189
6190 <method name="powerButton">
6191 <desc>Sends the ACPI power button event to the guest.
6192 <result name="VBOX_E_INVALID_VM_STATE">
6193 Virtual machine not in Running state.
6194 </result>
6195 <result name="VBOX_E_PDM_ERROR">
6196 Controlled power off failed.
6197 </result>
6198 </desc>
6199 </method>
6200
6201 <method name="sleepButton">
6202 <desc>Sends the ACPI sleep button event to the guest.
6203 <result name="VBOX_E_INVALID_VM_STATE">
6204 Virtual machine not in Running state.
6205 </result>
6206 <result name="VBOX_E_PDM_ERROR">
6207 Sending sleep button event failed.
6208 </result>
6209 </desc>
6210 </method>
6211
6212 <method name="getPowerButtonHandled">
6213 <desc>Checks if the last power button event was handled by guest.
6214 <result name="VBOX_E_PDM_ERROR">
6215 Checking if the event was handled by the guest OS failed.
6216 </result>
6217 </desc>
6218 <param name="handled" type="boolean" dir="return"/>
6219 </method>
6220
6221 <method name="getGuestEnteredACPIMode">
6222 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6223 G1 (sleeping). If this method returns false, the guest will
6224 most likely not respond to external ACPI events.
6225 <result name="VBOX_E_INVALID_VM_STATE">
6226 Virtual machine not in Running state.
6227 </result>
6228 </desc>
6229 <param name="entered" type="boolean" dir="return"/>
6230 </method>
6231
6232 <method name="saveState">
6233 <desc>
6234 Saves the current execution state of a running virtual machine
6235 and stops its execution.
6236
6237 After this operation completes, the machine will go to the
6238 Saved state. Next time it is powered up, this state will
6239 be restored and the machine will continue its execution from
6240 the place where it was saved.
6241
6242 This operation differs from taking a snapshot to the effect
6243 that it doesn't create new differencing hard disks. Also, once
6244 the machine is powered up from the state saved using this method,
6245 the saved state is deleted, so it will be impossible to return
6246 to this state later.
6247
6248 <note>
6249 On success, this method implicitly calls
6250 <link to="IMachine::saveSettings"/> to save all current machine
6251 settings (including runtime changes to the DVD drive, etc.).
6252 Together with the impossibility to change any VM settings when it is
6253 in the Saved state, this guarantees adequate hardware
6254 configuration of the machine when it is restored from the saved
6255 state file.
6256 </note>
6257
6258 <note>
6259 The machine must be in the Running or Paused state, otherwise
6260 the operation will fail.
6261 </note>
6262 <result name="VBOX_E_INVALID_VM_STATE">
6263 Virtual machine state neither Running nor Paused.
6264 </result>
6265 <result name="VBOX_E_FILE_ERROR">
6266 Failed to create directory for saved state file.
6267 </result>
6268
6269 <see><link to="#takeSnapshot"/></see>
6270 </desc>
6271 <param name="progress" type="IProgress" dir="return">
6272 <desc>Progress object to track the operation completion.</desc>
6273 </param>
6274 </method>
6275
6276 <method name="adoptSavedState">
6277 <desc>
6278 Associates the given saved state file to the virtual machine.
6279
6280 On success, the machine will go to the Saved state. Next time it is
6281 powered up, it will be restored from the adopted saved state and
6282 continue execution from the place where the saved state file was
6283 created.
6284
6285 The specified saved state file path may be absolute or relative to the
6286 folder the VM normally saves the state to (usually,
6287 <link to="IMachine::snapshotFolder"/>).
6288
6289 <note>
6290 It's a caller's responsibility to make sure the given saved state
6291 file is compatible with the settings of this virtual machine that
6292 represent its virtual hardware (memory size, hard disk configuration
6293 etc.). If there is a mismatch, the behavior of the virtual machine
6294 is undefined.
6295 </note>
6296 <result name="VBOX_E_INVALID_VM_STATE">
6297 Virtual machine state neither PoweredOff nor Aborted.
6298 </result>
6299 </desc>
6300 <param name="savedStateFile" type="wstring" dir="in">
6301 <desc>Path to the saved state file to adopt.</desc>
6302 </param>
6303 </method>
6304
6305 <method name="discardSavedState">
6306 <desc>
6307 Discards (deletes) the saved state of the virtual machine
6308 previously created by <link to="#saveState"/>. Next time the
6309 machine is powered up, a clean boot will occur.
6310 <note>
6311 This operation is equivalent to resetting or powering off
6312 the machine without doing a proper shutdown in the guest OS.
6313 </note>
6314 <result name="VBOX_E_INVALID_VM_STATE">
6315 Virtual machine not in state Saved.
6316 </result>
6317 </desc>
6318 </method>
6319
6320 <method name="getDeviceActivity">
6321 <desc>
6322 Gets the current activity type of a given device or device group.
6323 <result name="E_INVALIDARG">
6324 Invalid device type.
6325 </result>
6326 </desc>
6327 <param name="type" type="DeviceType" dir="in"/>
6328 <param name="activity" type="DeviceActivity" dir="return"/>
6329 </method>
6330
6331 <method name="attachUSBDevice">
6332 <desc>
6333 Attaches a host USB device with the given UUID to the
6334 USB controller of the virtual machine.
6335
6336 The device needs to be in one of the following states:
6337 <link to="USBDeviceState_Busy"/>,
6338 <link to="USBDeviceState_Available"/> or
6339 <link to="USBDeviceState_Held"/>,
6340 otherwise an error is immediately returned.
6341
6342 When the device state is
6343 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6344 be returned if the host computer refuses to release it for some reason.
6345
6346 <see>IUSBController::deviceFilters, USBDeviceState</see>
6347 <result name="VBOX_E_INVALID_VM_STATE">
6348 Virtual machine state neither Running nor Paused.
6349 </result>
6350 <result name="VBOX_E_PDM_ERROR">
6351 Virtual machine does not have a USB controller.
6352 </result>
6353 </desc>
6354 <param name="id" type="uuid" dir="in">
6355 <desc>UUID of the host USB device to attach.</desc>
6356 </param>
6357 </method>
6358
6359 <method name="detachUSBDevice">
6360 <desc>
6361 Detaches an USB device with the given UUID from the USB controller
6362 of the virtual machine.
6363
6364 After this method succeeds, the VirtualBox server re-initiates
6365 all USB filters as if the device were just physically attached
6366 to the host, but filters of this machine are ignored to avoid
6367 a possible automatic re-attachment.
6368
6369 <see>IUSBController::deviceFilters, USBDeviceState</see>
6370
6371 <result name="VBOX_E_PDM_ERROR">
6372 Virtual machine does not have a USB controller.
6373 </result>
6374 <result name="E_INVALIDARG">
6375 USB device not attached to this virtual machine.
6376 </result>
6377 </desc>
6378 <param name="id" type="uuid" dir="in">
6379 <desc>UUID of the USB device to detach.</desc>
6380 </param>
6381 <param name="device" type="IUSBDevice" dir="return">
6382 <desc>Detached USB device.</desc>
6383 </param>
6384 </method>
6385
6386 <method name="findUSBDeviceByAddress">
6387 <desc>
6388 Searches for a USB device with the given host address.
6389
6390 <result name="VBOX_E_OBJECT_NOT_FOUND">
6391 Given @c name does not correspond to any USB device.
6392 </result>
6393
6394 <see>IUSBDevice::address</see>
6395 </desc>
6396 <param name="name" type="wstring" dir="in">
6397 <desc>
6398 Address of the USB device (as assigned by the host) to
6399 search for.
6400 </desc>
6401 </param>
6402 <param name="device" type="IUSBDevice" dir="return">
6403 <desc>Found USB device object.</desc>
6404 </param>
6405 </method>
6406
6407 <method name="findUSBDeviceById">
6408 <desc>
6409 Searches for a USB device with the given UUID.
6410
6411 <result name="VBOX_E_OBJECT_NOT_FOUND">
6412 Given @c id does not correspond to any USB device.
6413 </result>
6414
6415 <see>IUSBDevice::id</see>
6416 </desc>
6417 <param name="id" type="uuid" dir="in">
6418 <desc>UUID of the USB device to search for.</desc>
6419 </param>
6420 <param name="device" type="IUSBDevice" dir="return">
6421 <desc>Found USB device object.</desc>
6422 </param>
6423 </method>
6424
6425 <method name="createSharedFolder">
6426 <desc>
6427 Creates a transient new shared folder by associating the given logical
6428 name with the given host path, adds it to the collection of shared
6429 folders and starts sharing it. Refer to the description of
6430 <link to="ISharedFolder"/> to read more about logical names.
6431
6432 <result name="VBOX_E_INVALID_VM_STATE">
6433 Virtual machine in Saved state or currently changing state.
6434 </result>
6435 <result name="VBOX_E_FILE_ERROR">
6436 Shared folder already exists or not accessible.
6437 </result>
6438 </desc>
6439 <param name="name" type="wstring" dir="in">
6440 <desc>Unique logical name of the shared folder.</desc>
6441 </param>
6442 <param name="hostPath" type="wstring" dir="in">
6443 <desc>Full path to the shared folder in the host file system.</desc>
6444 </param>
6445 <param name="writable" type="boolean" dir="in">
6446 <desc>Whether the share is writable or readonly</desc>
6447 </param>
6448 </method>
6449
6450 <method name="removeSharedFolder">
6451 <desc>
6452 Removes a transient shared folder with the given name previously
6453 created by <link to="#createSharedFolder"/> from the collection of
6454 shared folders and stops sharing it.
6455 <result name="VBOX_E_INVALID_VM_STATE">
6456 Virtual machine in Saved state or currently changing state.
6457 </result>
6458 <result name="VBOX_E_FILE_ERROR">
6459 Shared folder does not exists.
6460 </result>
6461 </desc>
6462 <param name="name" type="wstring" dir="in">
6463 <desc>Logical name of the shared folder to remove.</desc>
6464 </param>
6465 </method>
6466
6467 <method name="takeSnapshot">
6468 <desc>
6469 Saves the current execution state and all settings of the
6470 machine and creates differencing images for all
6471 normal (non-independent) hard disks.
6472
6473 This method can be called for a PoweredOff, Saved, Running or
6474 Paused virtual machine. When the machine is PoweredOff, an
6475 offline <link to="ISnapshot">snapshot</link> is created,
6476 in all other cases -- an online snapshot.
6477
6478 The taken snapshot is always based on the
6479 <link to="IMachine::currentSnapshot">current
6480 snapshot</link> of the associated virtual machine and becomes
6481 a new current snapshot.
6482
6483 <note>
6484 This method implicitly calls <link to="IMachine::saveSettings"/> to
6485 save all current machine settings before taking an offline snapshot.
6486 </note>
6487
6488 <see>ISnapshot, <link to="#saveState"/></see>
6489 <result name="VBOX_E_INVALID_VM_STATE">
6490 Virtual machine currently changing state.
6491 </result>
6492 </desc>
6493 <param name="name" type="wstring" dir="in">
6494 <desc>Short name for the snapshot.</desc>
6495 </param>
6496 <param name="description" type="wstring" dir="in">
6497 <desc>Optional description of the snapshot.</desc>
6498 </param>
6499 <param name="progress" type="IProgress" dir="return">
6500 <desc>Progress object to track the operation completion.</desc>
6501 </param>
6502 </method>
6503
6504 <method name="discardSnapshot">
6505 <desc>
6506
6507 Starts discarding the specified snapshot. The execution state
6508 and settings of the associated machine stored in the snapshot
6509 will be deleted. The contents of all differencing hard disks of
6510 this snapshot will be merged with the contents of their
6511 dependent child hard disks to keep the, disks valid (in other
6512 words, all changes represented by hard disks being discarded
6513 will be propagated to their child hard disks). After that, this
6514 snapshot's differencing hard disks will be deleted. The parent
6515 of this snapshot will become a new parent for all its child
6516 snapshots.
6517
6518 If the discarded snapshot is the current one, its parent
6519 snapshot will become a new current snapshot. The current machine
6520 state is not directly affected in this case, except that
6521 currently attached differencing hard disks based on hard disks
6522 of the discarded snapshot will be also merged as described
6523 above.
6524
6525 If the discarded snapshot is the first one (the root snapshot)
6526 and it has exactly one child snapshot, this child snapshot will
6527 become the first snapshot after discarding. If there are no
6528 children at all (i.e. the first snapshot is the only snapshot of
6529 the machine), both the current and the first snapshot of the
6530 machine will be set to null. In all other cases, the first
6531 snapshot cannot be discarded.
6532
6533 You cannot discard the snapshot if it
6534 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6535 hard disks that have differencing hard disks based on them. Snapshots of
6536 such kind can be discarded only when every normal hard disk has either
6537 no children at all or exactly one child. In the former case, the normal
6538 hard disk simply becomes unused (i.e. not attached to any VM). In the
6539 latter case, it receives all the changes stored in the child hard disk,
6540 and then it replaces the child hard disk in the configuration of the
6541 corresponding snapshot or machine.
6542
6543 Also, you cannot discard the snapshot if it stores hard disks
6544 (of any type) having differencing child hard disks that belong
6545 to other machines. Such snapshots can be only discarded after
6546 you discard all snapshots of other machines containing "foreign"
6547 child disks, or detach these "foreign" child disks from machines
6548 they are attached to.
6549
6550 One particular example of the snapshot storing normal hard disks
6551 is the first snapshot of a virtual machine that had normal hard
6552 disks attached when taking the snapshot. Be careful when
6553 discarding such snapshots because this implicitly commits
6554 changes (made since the snapshot being discarded has been taken)
6555 to normal hard disks (as described above), which may be not what
6556 you want.
6557
6558 The virtual machine is put to
6559 the <link to="MachineState_Discarding">Discarding</link> state until
6560 the discard operation is completed.
6561
6562 <note>
6563 The machine must not be running, otherwise the operation
6564 will fail.
6565 </note>
6566
6567 <note>
6568 Child hard disks of all normal hard disks of the discarded snapshot
6569 must be accessible (see <link to="IMedium::state"/>) for this
6570 operation to succeed. In particular, this means that all virtual
6571 machines, whose hard disks are directly or indirectly based on the
6572 hard disks of discarded snapshot, must be powered off.
6573 </note>
6574 <note>
6575 Merging hard disk contents can be very time and disk space
6576 consuming, if these disks are big in size and have many
6577 children. However, if the snapshot being discarded is the last
6578 (head) snapshot on the branch, the operation will be rather
6579 quick.
6580 </note>
6581 <note>
6582 Note that discarding the current snapshot
6583 will implicitly call <link to="IMachine::saveSettings"/> to
6584 make all current machine settings permanent.
6585 </note>
6586 <result name="VBOX_E_INVALID_VM_STATE">
6587 Virtual machine is running.
6588 </result>
6589 </desc>
6590 <param name="id" type="uuid" dir="in">
6591 <desc>UUID of the snapshot to discard.</desc>
6592 </param>
6593 <param name="progress" type="IProgress" dir="return">
6594 <desc>Progress object to track the operation completion.</desc>
6595 </param>
6596 </method>
6597
6598 <method name="discardCurrentState">
6599 <desc>
6600 This operation is similar to <link to="#discardSnapshot"/> but
6601 affects the current machine state. This means that the state stored in
6602 the current snapshot will become a new current state, and all current
6603 settings of the machine and changes stored in differencing hard disks
6604 will be lost.
6605
6606 After this operation is successfully completed, new empty differencing
6607 hard disks are created for all normal hard disks of the machine.
6608
6609 If the current snapshot of the machine is an online snapshot, the
6610 machine will go to the <link to="MachineState_Saved"> saved
6611 state</link>, so that the next time it is powered on, the execution
6612 state will be restored from the current snapshot.
6613
6614 <note>
6615 The machine must not be running, otherwise the operation will fail.
6616 </note>
6617
6618 <note>
6619 If the machine state is <link to="MachineState_Saved">Saved</link>
6620 prior to this operation, the saved state file will be implicitly
6621 discarded (as if <link to="IConsole::discardSavedState"/> were
6622 called).
6623 </note>
6624
6625 <result name="VBOX_E_INVALID_VM_STATE">
6626 Virtual machine is running.
6627 </result>
6628 </desc>
6629 <param name="progress" type="IProgress" dir="return">
6630 <desc>Progress object to track the operation completion.</desc>
6631 </param>
6632 </method>
6633
6634 <method name="discardCurrentSnapshotAndState">
6635 <desc>
6636
6637 This method is equivalent to
6638 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6639 (currentSnapshot.id(), progress) followed by
6640 <link to="#discardCurrentState"/>.
6641
6642 As a result, the machine will be fully restored from the
6643 snapshot preceding the current snapshot, while both the current
6644 snapshot and the current machine state will be discarded.
6645
6646 If the current snapshot is the first snapshot of the machine (i.e. it
6647 has the only snapshot), the current machine state will be
6648 discarded <b>before</b> discarding the snapshot. In other words, the
6649 machine will be restored from its last snapshot, before discarding
6650 it. This differs from performing a single
6651 <link to="#discardSnapshot"/> call (note that no
6652 <link to="#discardCurrentState"/> will be possible after it)
6653 to the effect that the latter will preserve the current state instead of
6654 discarding it.
6655
6656 Unless explicitly mentioned otherwise, all remarks and
6657 limitations of the above two methods also apply to this method.
6658
6659 <note>
6660 The machine must not be running, otherwise the operation
6661 will fail.
6662 </note>
6663
6664 <note>
6665 If the machine state is <link to="MachineState_Saved">Saved</link>
6666 prior to this operation, the saved state file will be implicitly
6667 discarded (as if <link to="#discardSavedState"/> were
6668 called).
6669 </note>
6670
6671 <note>
6672 This method is more efficient than calling both of the above
6673 methods separately: it requires less IPC calls and provides
6674 a single progress object.
6675 </note>
6676
6677 <result name="VBOX_E_INVALID_VM_STATE">
6678 Virtual machine is running.
6679 </result>
6680 </desc>
6681 <param name="progress" type="IProgress" dir="return">
6682 <desc>Progress object to track the operation completion.</desc>
6683 </param>
6684 </method>
6685
6686 <method name="registerCallback">
6687 <desc>
6688 Registers a new console callback on this instance. The methods of the
6689 callback interface will be called by this instance when the appropriate
6690 event occurs.
6691 </desc>
6692 <param name="callback" type="IConsoleCallback" dir="in"/>
6693 </method>
6694
6695 <method name="unregisterCallback">
6696 <desc>
6697 Unregisters the console callback previously registered using
6698 <link to="#registerCallback"/>.
6699 <result name="E_INVALIDARG">
6700 Given @a callback handler is not registered.
6701 </result>
6702 </desc>
6703 <param name="callback" type="IConsoleCallback" dir="in"/>
6704 </method>
6705 </interface>
6706
6707 <!--
6708 // IHost
6709 /////////////////////////////////////////////////////////////////////////
6710 -->
6711
6712 <interface
6713 name="IHostDVDDrive" extends="$unknown"
6714 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6715 wsmap="managed"
6716 >
6717 <desc>
6718 The IHostDVDDrive interface represents the physical CD/DVD drive
6719 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6720 </desc>
6721
6722 <attribute name="name" type="wstring" readonly="yes">
6723 <desc>
6724 Returns the platform-specific device identifier.
6725 On DOS-like platforms, it is a drive name (e.g. R:).
6726 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6727 </desc>
6728 </attribute>
6729 <attribute name="description" type="wstring" readonly="yes">
6730 <desc>
6731 Returns a human readable description for the drive. This
6732 description usually contains the product and vendor name. A
6733 @c null string is returned if the description is not available.
6734 </desc>
6735 </attribute>
6736 <attribute name="udi" type="wstring" readonly="yes">
6737 <desc>
6738 Returns the unique device identifier for the drive. This
6739 attribute is reserved for future use instead of
6740 <link to="#name"/>. Currently it is not used and may return
6741 @c null on some platforms.
6742 </desc>
6743 </attribute>
6744
6745 </interface>
6746
6747 <interface
6748 name="IHostFloppyDrive" extends="$unknown"
6749 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6750 wsmap="managed"
6751 >
6752 <desc>
6753 The IHostFloppyDrive interface represents the physical floppy drive
6754 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6755 </desc>
6756 <attribute name="name" type="wstring" readonly="yes">
6757 <desc>
6758 Returns the platform-specific device identifier.
6759 On DOS-like platforms, it is a drive name (e.g. A:).
6760 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6761 </desc>
6762 </attribute>
6763 <attribute name="description" type="wstring" readonly="yes">
6764 <desc>
6765 Returns a human readable description for the drive. This
6766 description usually contains the product and vendor name. A
6767 @c null string is returned if the description is not available.
6768 </desc>
6769 </attribute>
6770 <attribute name="udi" type="wstring" readonly="yes">
6771 <desc>
6772 Returns the unique device identifier for the drive. This
6773 attribute is reserved for future use instead of
6774 <link to="#name"/>. Currently it is not used and may return
6775 @c null on some platforms.
6776 </desc>
6777 </attribute>
6778 </interface>
6779
6780 <enum
6781 name="HostNetworkInterfaceMediumType"
6782 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6783 >
6784 <desc>
6785 Type of encapsulation. Ethernet encapsulation includes both wired and
6786 wireless Ethernet connections.
6787 <see>IHostNetworkInterface</see>
6788 </desc>
6789
6790 <const name="Unknown" value="0">
6791 <desc>
6792 The type of interface cannot be determined.
6793 </desc>
6794 </const>
6795 <const name="Ethernet" value="1">
6796 <desc>
6797 Ethernet frame encapsulation.
6798 </desc>
6799 </const>
6800 <const name="PPP" value="2">
6801 <desc>
6802 Point-to-point protocol encapsulation.
6803 </desc>
6804 </const>
6805 <const name="SLIP" value="3">
6806 <desc>
6807 Serial line IP encapsulation.
6808 </desc>
6809 </const>
6810 </enum>
6811
6812 <enum
6813 name="HostNetworkInterfaceStatus"
6814 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6815 >
6816 <desc>
6817 Current status of the interface.
6818 <see>IHostNetworkInterface</see>
6819 </desc>
6820
6821 <const name="Unknown" value="0">
6822 <desc>
6823 The state of interface cannot be determined.
6824 </desc>
6825 </const>
6826 <const name="Up" value="1">
6827 <desc>
6828 The interface is fully operational.
6829 </desc>
6830 </const>
6831 <const name="Down" value="2">
6832 <desc>
6833 The interface is not functioning.
6834 </desc>
6835 </const>
6836 </enum>
6837
6838 <enum
6839 name="HostNetworkInterfaceType"
6840 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6841 >
6842 <desc>
6843 Network interface type.
6844 </desc>
6845 <const name="Bridged" value="1"/>
6846 <const name="HostOnly" value="2"/>
6847 </enum>
6848
6849 <interface
6850 name="IHostNetworkInterface" extends="$unknown"
6851 uuid="88adaf3f-166b-4542-9457-0f1323507fae"
6852 wsmap="managed"
6853 >
6854 <desc>
6855 Reprents one of host's network interfaces. IP V6 address and network
6856 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6857 separated by colons.
6858 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6859 </desc>
6860 <attribute name="name" type="wstring" readonly="yes">
6861 <desc>Returns the host network interface name.</desc>
6862 </attribute>
6863
6864 <attribute name="id" type="uuid" readonly="yes">
6865 <desc>Returns the interface UUID.</desc>
6866 </attribute>
6867
6868 <attribute name="networkName" type="wstring" readonly="yes">
6869 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6870 </attribute>
6871
6872 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6873 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6874 </attribute>
6875
6876 <attribute name="IPAddress" type="wstring" readonly="yes">
6877 <desc>Returns the IP V4 address of the interface.</desc>
6878 </attribute>
6879
6880 <attribute name="networkMask" type="wstring" readonly="yes">
6881 <desc>Returns the network mask of the interface.</desc>
6882 </attribute>
6883
6884 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6885 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6886 </attribute>
6887
6888 <attribute name="IPV6Address" type="wstring" readonly="yes">
6889 <desc>Returns the IP V6 address of the interface.</desc>
6890 </attribute>
6891
6892 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6893 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6894 </attribute>
6895
6896 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6897 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6898 </attribute>
6899
6900 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6901 <desc>Type of protocol encapsulation used.</desc>
6902 </attribute>
6903
6904 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6905 <desc>Status of the interface.</desc>
6906 </attribute>
6907
6908 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6909 <desc>specifies the host interface type.</desc>
6910 </attribute>
6911
6912 <method name="enableStaticIpConfig">
6913 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6914 <param name="IPAddress" type="wstring" dir="in">
6915 <desc>
6916 IP address.
6917 </desc>
6918 </param>
6919 <param name="networkMask" type="wstring" dir="in">
6920 <desc>
6921 network mask.
6922 </desc>
6923 </param>
6924 </method>
6925
6926 <method name="enableStaticIpConfigV6">
6927 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6928 <param name="IPV6Address" type="wstring" dir="in">
6929 <desc>
6930 IP address.
6931 </desc>
6932 </param>
6933 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6934 <desc>
6935 network mask.
6936 </desc>
6937 </param>
6938 </method>
6939
6940 <method name="enableDynamicIpConfig">
6941 <desc>enables the dynamic IP configuration.</desc>
6942 </method>
6943
6944 <method name="dhcpRediscover">
6945 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6946 </method>
6947
6948 </interface>
6949
6950 <interface
6951 name="IHost" extends="$unknown"
6952 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6953 wsmap="managed"
6954 >
6955 <desc>
6956 The IHost interface represents the physical machine that this VirtualBox
6957 installation runs on.
6958
6959 An object implementing this interface is returned by the
6960 <link to="IVirtualBox::host" /> attribute. This interface contains
6961 read-only information about the host's physical hardware (such as what
6962 processors and disks are available, what the host operating system is,
6963 and so on) and also allows for manipulating some of the host's hardware,
6964 such as global USB device filters and host interface networking.
6965
6966 </desc>
6967 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6968 <desc>List of DVD drives available on the host.</desc>
6969 </attribute>
6970
6971 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6972 <desc>List of floppy drives available on the host.</desc>
6973 </attribute>
6974
6975 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6976 <desc>
6977 List of USB devices currently attached to the host.
6978 Once a new device is physically attached to the host computer,
6979 it appears in this list and remains there until detached.
6980
6981 <note>
6982 This method may set a @ref com_warnings "warning result code".
6983 </note>
6984 <note>
6985 If USB functionality is not available in the given edition of
6986 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6987 </note>
6988 </desc>
6989 </attribute>
6990
6991 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6992 <desc>
6993 List of USB device filters in action.
6994 When a new device is physically attached to the host computer,
6995 filters from this list are applied to it (in order they are stored
6996 in the list). The first matched filter will determine the
6997 <link to="IHostUSBDeviceFilter::action">action</link>
6998 performed on the device.
6999
7000 Unless the device is ignored by these filters, filters of all
7001 currently running virtual machines
7002 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7003
7004 <note>
7005 This method may set a @ref com_warnings "warning result code".
7006 </note>
7007 <note>
7008 If USB functionality is not available in the given edition of
7009 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7010 </note>
7011
7012 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7013 </desc>
7014 </attribute>
7015
7016 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7017 <desc>List of host network interfaces currently defined on the host.</desc>
7018 </attribute>
7019
7020 <attribute name="processorCount" type="unsigned long" readonly="yes">
7021 <desc>Number of (logical) CPUs installed in the host system.</desc>
7022 </attribute>
7023
7024 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7025 <desc>Number of (logical) CPUs online in the host system.</desc>
7026 </attribute>
7027
7028 <method name="getProcessorSpeed">
7029 <desc>Query the (approximate) maximum speed of a specified host CPU in
7030 Megahertz.
7031 </desc>
7032 <param name="cpuId" type="unsigned long" dir="in">
7033 <desc>
7034 Identifier of the CPU.
7035 </desc>
7036 </param>
7037 <param name="speed" type="unsigned long" dir="return">
7038 <desc>
7039 Speed value. 0 is returned if value is not known or @a cpuId is
7040 invalid.
7041 </desc>
7042 </param>
7043 </method>
7044
7045 <method name="getProcessorFeature">
7046 <desc>Query whether a CPU feature is supported or not.</desc>
7047 <param name="feature" type="ProcessorFeature" dir="in">
7048 <desc>
7049 CPU Feature identifier.
7050 </desc>
7051 </param>
7052 <param name="supported" type="boolean" dir="return">
7053 <desc>
7054 Feature is supported or not.
7055 </desc>
7056 </param>
7057 </method>
7058
7059 <method name="getProcessorDescription">
7060 <desc>Query the model string of a specified host CPU.
7061 <note>
7062 This function is not implemented in the current version of the
7063 product.
7064 </note>
7065 </desc>
7066 <param name="cpuId" type="unsigned long" dir="in">
7067 <desc>
7068 Identifier of the CPU.
7069 </desc>
7070 </param>
7071 <param name="description" type="wstring" dir="return">
7072 <desc>
7073 Model string. A NULL string is returned if value is not known or
7074 @a cpuId is invalid.
7075 </desc>
7076 </param>
7077 </method>
7078
7079 <attribute name="memorySize" type="unsigned long" readonly="yes">
7080 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7081 </attribute>
7082
7083 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7084 <desc>Available system memory in the host system.</desc>
7085 </attribute>
7086
7087 <attribute name="operatingSystem" type="wstring" readonly="yes">
7088 <desc>Name of the host system's operating system.</desc>
7089 </attribute>
7090
7091 <attribute name="OSVersion" type="wstring" readonly="yes">
7092 <desc>Host operating system's version string.</desc>
7093 </attribute>
7094
7095 <attribute name="UTCTime" type="long long" readonly="yes">
7096 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7097 </attribute>
7098
7099<if target="midl">
7100 <method name="createHostOnlyNetworkInterface">
7101 <desc>
7102 Creates a new adapter for Host Only Networking.
7103 <result name="E_INVALIDARG">
7104 Host network interface @a name already exists.
7105 </result>
7106 </desc>
7107 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7108 <desc>
7109 Created host interface object.
7110 </desc>
7111 </param>
7112 <param name="progress" type="IProgress" dir="return">
7113 <desc>
7114 Progress object to track the operation completion.
7115 </desc>
7116 </param>
7117 </method>
7118 <method name="removeHostOnlyNetworkInterface">
7119 <desc>
7120 Removes the given Host Only Networking interface.
7121 <result name="VBOX_E_OBJECT_NOT_FOUND">
7122 No host network interface matching @a id found.
7123 </result>
7124 </desc>
7125 <param name="id" type="uuid" dir="in">
7126 <desc>
7127 Adapter GUID.
7128 </desc>
7129 </param>
7130 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7131 <desc>
7132 Removed host interface object.
7133 </desc>
7134 </param>
7135 <param name="progress" type="IProgress" dir="return">
7136 <desc>
7137 Progress object to track the operation completion.
7138 </desc>
7139 </param>
7140 </method>
7141</if>
7142
7143 <method name="createUSBDeviceFilter">
7144 <desc>
7145 Creates a new USB device filter. All attributes except
7146 the filter name are set to <tt>null</tt> (any match),
7147 <i>active</i> is <tt>false</tt> (the filter is not active).
7148
7149 The created filter can be added to the list of filters using
7150 <link to="#insertUSBDeviceFilter"/>.
7151
7152 <see>#USBDeviceFilters</see>
7153 </desc>
7154 <param name="name" type="wstring" dir="in">
7155 <desc>
7156 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7157 for more info.
7158 </desc>
7159 </param>
7160 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7161 <desc>Created filter object.</desc>
7162 </param>
7163 </method>
7164
7165 <method name="insertUSBDeviceFilter">
7166 <desc>
7167 Inserts the given USB device to the specified position
7168 in the list of filters.
7169
7170 Positions are numbered starting from <tt>0</tt>. If the specified
7171 position is equal to or greater than the number of elements in
7172 the list, the filter is added at the end of the collection.
7173
7174 <note>
7175 Duplicates are not allowed, so an attempt to insert a
7176 filter that is already in the list, will return an
7177 error.
7178 </note>
7179 <note>
7180 This method may set a @ref com_warnings "warning result code".
7181 </note>
7182 <note>
7183 If USB functionality is not available in the given edition of
7184 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7185 </note>
7186
7187 <see>#USBDeviceFilters</see>
7188
7189 <result name="VBOX_E_INVALID_OBJECT_STATE">
7190 USB device filter is not created within this VirtualBox instance.
7191 </result>
7192 <result name="E_INVALIDARG">
7193 USB device filter already in list.
7194 </result>
7195
7196 </desc>
7197 <param name="position" type="unsigned long" dir="in">
7198 <desc>Position to insert the filter to.</desc>
7199 </param>
7200 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7201 <desc>USB device filter to insert.</desc>
7202 </param>
7203 </method>
7204
7205 <method name="removeUSBDeviceFilter">
7206 <desc>
7207 Removes a USB device filter from the specified position in the
7208 list of filters.
7209
7210 Positions are numbered starting from <tt>0</tt>. Specifying a
7211 position equal to or greater than the number of elements in
7212 the list will produce an error.
7213
7214 <note>
7215 This method may set a @ref com_warnings "warning result code".
7216 </note>
7217 <note>
7218 If USB functionality is not available in the given edition of
7219 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7220 </note>
7221
7222 <see>#USBDeviceFilters</see>
7223
7224 <result name="E_INVALIDARG">
7225 USB device filter list empty or invalid @a position.
7226 </result>
7227
7228 </desc>
7229 <param name="position" type="unsigned long" dir="in">
7230 <desc>Position to remove the filter from.</desc>
7231 </param>
7232 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7233 <desc>Removed USB device filter.</desc>
7234 </param>
7235 </method>
7236
7237 <method name="findHostDVDDrive">
7238 <desc>
7239 Searches for a host DVD drive with the given @c name.
7240
7241 <result name="VBOX_E_OBJECT_NOT_FOUND">
7242 Given @c name does not correspond to any host drive.
7243 </result>
7244
7245 </desc>
7246 <param name="name" type="wstring" dir="in">
7247 <desc>Name of the host drive to search for</desc>
7248 </param>
7249 <param name="drive" type="IHostDVDDrive" dir="return">
7250 <desc>Found host drive object</desc>
7251 </param>
7252 </method>
7253
7254 <method name="findHostFloppyDrive">
7255 <desc>
7256 Searches for a host floppy drive with the given @c name.
7257
7258 <result name="VBOX_E_OBJECT_NOT_FOUND">
7259 Given @c name does not correspond to any host floppy drive.
7260 </result>
7261
7262 </desc>
7263 <param name="name" type="wstring" dir="in">
7264 <desc>Name of the host floppy drive to search for</desc>
7265 </param>
7266 <param name="drive" type="IHostFloppyDrive" dir="return">
7267 <desc>Found host floppy drive object</desc>
7268 </param>
7269 </method>
7270
7271 <method name="findHostNetworkInterfaceByName">
7272 <desc>
7273 Searches through all host network interfaces for an interface with
7274 the given @c name.
7275 <note>
7276 The method returns an error if the given @c name does not
7277 correspond to any host network interface.
7278 </note>
7279 </desc>
7280 <param name="name" type="wstring" dir="in">
7281 <desc>Name of the host network interface to search for.</desc>
7282 </param>
7283 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7284 <desc>Found host network interface object.</desc>
7285 </param>
7286 </method>
7287 <method name="findHostNetworkInterfaceById">
7288 <desc>
7289 Searches through all host network interfaces for an interface with
7290 the given GUID.
7291 <note>
7292 The method returns an error if the given GUID does not
7293 correspond to any host network interface.
7294 </note>
7295 </desc>
7296 <param name="id" type="uuid" dir="in">
7297 <desc>GUID of the host network interface to search for.</desc>
7298 </param>
7299 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7300 <desc>Found host network interface object.</desc>
7301 </param>
7302 </method>
7303 <method name="findHostNetworkInterfacesOfType">
7304 <desc>
7305 Searches through all host network interfaces and returns a list of interfaces of the specified type
7306 </desc>
7307 <param name="type" type="HostNetworkInterfaceType" dir="in">
7308 <desc>type of the host network interfaces to search for.</desc>
7309 </param>
7310 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7311 <desc>Found host network interface objects.</desc>
7312 </param>
7313 </method>
7314
7315 <method name="findUSBDeviceById">
7316 <desc>
7317 Searches for a USB device with the given UUID.
7318
7319 <result name="VBOX_E_OBJECT_NOT_FOUND">
7320 Given @id does not correspond to any USB device.
7321 </result>
7322
7323 <see>IHostUSBDevice::id</see>
7324 </desc>
7325 <param name="id" type="uuid" dir="in">
7326 <desc>UUID of the USB device to search for.</desc>
7327 </param>
7328 <param name="device" type="IHostUSBDevice" dir="return">
7329 <desc>Found USB device object.</desc>
7330 </param>
7331 </method>
7332
7333 <method name="findUSBDeviceByAddress">
7334 <desc>
7335 Searches for a USB device with the given host address.
7336
7337 <result name="VBOX_E_OBJECT_NOT_FOUND">
7338 Given @c name does not correspond to any USB device.
7339 </result>
7340
7341 <see>IHostUSBDevice::address</see>
7342 </desc>
7343 <param name="name" type="wstring" dir="in">
7344 <desc>
7345 Address of the USB device (as assigned by the host) to
7346 search for.
7347 </desc>
7348 </param>
7349 <param name="device" type="IHostUSBDevice" dir="return">
7350 <desc>Found USB device object.</desc>
7351 </param>
7352 </method>
7353
7354 </interface>
7355
7356 <!--
7357 // ISystemProperties
7358 /////////////////////////////////////////////////////////////////////////
7359 -->
7360
7361 <interface
7362 name="ISystemProperties"
7363 extends="$unknown"
7364 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7365 wsmap="managed"
7366 >
7367 <desc>
7368 The ISystemProperties interface represents global properties of the given
7369 VirtualBox installation.
7370
7371 These properties define limits and default values for various attributes
7372 and parameters. Most of the properties are read-only, but some can be
7373 changed by a user.
7374 </desc>
7375
7376 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7377 <desc>Minimum guest system memory in Megabytes.</desc>
7378 </attribute>
7379
7380 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7381 <desc>Maximum guest system memory in Megabytes.</desc>
7382 </attribute>
7383
7384 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7385 <desc>Minimum guest video memory in Megabytes.</desc>
7386 </attribute>
7387
7388 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7389 <desc>Maximum guest video memory in Megabytes.</desc>
7390 </attribute>
7391
7392 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7393 <desc>Minimum CPU count.</desc>
7394 </attribute>
7395
7396 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7397 <desc>Maximum CPU count.</desc>
7398 </attribute>
7399
7400 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7401 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7402 </attribute>
7403
7404 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7405 <desc>
7406 Number of network adapters associated with every
7407 <link to="IMachine"/> instance.
7408 </desc>
7409 </attribute>
7410
7411 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7412 <desc>
7413 Number of serial ports associated with every
7414 <link to="IMachine"/> instance.
7415 </desc>
7416 </attribute>
7417
7418 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7419 <desc>
7420 Number of parallel ports associated with every
7421 <link to="IMachine"/> instance.
7422 </desc>
7423 </attribute>
7424
7425 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7426 <desc>
7427 Maximum device position in the boot order. This value corresponds
7428 to the total number of devices a machine can boot from, to make it
7429 possible to include all possible devices to the boot list.
7430 <see><link to="IMachine::setBootOrder"/></see>
7431 </desc>
7432 </attribute>
7433
7434 <attribute name="defaultMachineFolder" type="wstring">
7435 <desc>
7436 Full path to the default directory used to create new or open
7437 existing machines when a settings file name contains no
7438 path.
7439
7440 The initial value of this property is
7441 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7442 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7443
7444 <note>
7445 Setting this property to <tt>null</tt> will restore the
7446 initial value.
7447 </note>
7448 <note>
7449 When settings this property, the specified path can be
7450 absolute (full path) or relative
7451 to the <link to="IVirtualBox::homeFolder">
7452 VirtualBox home directory</link>.
7453 When reading this property, a full path is
7454 always returned.
7455 </note>
7456 <note>
7457 The specified path may not exist, it will be created
7458 when necessary.
7459 </note>
7460
7461 <see>
7462 <link to="IVirtualBox::createMachine"/>,
7463 <link to="IVirtualBox::openMachine"/>
7464 </see>
7465 </desc>
7466 </attribute>
7467
7468 <attribute name="defaultHardDiskFolder" type="wstring">
7469 <desc>
7470 Full path to the default directory used to create new or open existing
7471 virtual disks.
7472
7473 This path is used when the storage unit of a hard disk is a regular file
7474 in the host's file system and only a file name that contains no path is
7475 given.
7476
7477 The initial value of this property is
7478 <tt>&lt;</tt>
7479 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7480 <tt>&gt;/HardDisks</tt>.
7481
7482 <note>
7483 Setting this property to <tt>null</tt> will restore the
7484 initial value.
7485 </note>
7486 <note>
7487 When settings this property, the specified path can be relative
7488 to the
7489 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7490 absolute. When reading this property, a full path is
7491 always returned.
7492 </note>
7493 <note>
7494 The specified path may not exist, it will be created
7495 when necessary.
7496 </note>
7497
7498 <see>
7499 IHardDisk,
7500 <link to="IVirtualBox::createHardDisk"/>,
7501 <link to="IVirtualBox::openHardDisk"/>,
7502 <link to="IMedium::location"/>
7503 </see>
7504 </desc>
7505 </attribute>
7506
7507 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7508 <desc>
7509 List of all hard disk storage formats supported by this VirtualBox
7510 installation.
7511
7512 Keep in mind that the hard disk format identifier
7513 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7514 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7515 hard disk format is a case-insensitive string. This means that, for
7516 example, all of the following strings:
7517 <pre>
7518 "VDI"
7519 "vdi"
7520 "VdI"</pre>
7521 refer to the same hard disk format.
7522
7523 Note that the virtual hard disk framework is backend-based, therefore
7524 the list of supported formats depends on what backends are currently
7525 installed.
7526
7527 <see>
7528 <link to="IHardDiskFormat"/>,
7529 </see>
7530 </desc>
7531 </attribute>
7532
7533 <attribute name="defaultHardDiskFormat" type="wstring">
7534 <desc>
7535 Identifier of the default hard disk format used by VirtualBox.
7536
7537 The hard disk format set by this attribute is used by VirtualBox
7538 when the hard disk format was not specified explicitly. One example is
7539 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7540 format argument. A more complex example is implicit creation of
7541 differencing hard disks when taking a snapshot of a virtual machine:
7542 this operation will try to use a format of the parent hard disk first
7543 and if this format does not support differencing hard disks the default
7544 format specified by this argument will be used.
7545
7546 The list of supported hard disk formats may be obtained by the
7547 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7548 format must have a capability to create differencing hard disks;
7549 otherwise opeartions that create hard disks implicitly may fail
7550 unexpectedly.
7551
7552 The initial value of this property is <tt>VDI</tt> in the current
7553 version of the VirtualBox product, but may change in the future.
7554
7555 <note>
7556 Setting this property to <tt>null</tt> will restore the
7557 initial value.
7558 </note>
7559
7560 <see>
7561 <link to="#hardDiskFormats"/>,
7562 <link to="IHardDiskFormat::id"/>,
7563 <link to="IVirtualBox::createHardDisk"/>
7564 </see>
7565 </desc>
7566 </attribute>
7567
7568 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7569 <desc>
7570 Library that provides authentication for VRDP clients. The library
7571 is used if a virtual machine's authentication type is set to "external"
7572 in the VM RemoteDisplay configuration.
7573
7574 The system library extension (".DLL" or ".so") must be omitted.
7575 A full path can be specified; if not, then the library must reside on the
7576 system's default library path.
7577
7578 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7579 of that name in one of the default VirtualBox library directories.
7580
7581 For details about VirtualBox authentication libraries and how to implement
7582 them, please refer to the VirtualBox manual.
7583
7584 <note>
7585 Setting this property to <tt>null</tt> will restore the
7586 initial value.
7587 </note>
7588 </desc>
7589 </attribute>
7590
7591 <attribute name="webServiceAuthLibrary" type="wstring">
7592 <desc>
7593 Library that provides authentication for webservice clients. The library
7594 is used if a virtual machine's authentication type is set to "external"
7595 in the VM RemoteDisplay configuration and will be called from
7596 within the <link to="IWebsessionManager::logon" /> implementation.
7597
7598 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7599 there is no per-VM setting for this, as the webservice is a global
7600 resource (if it is running). Only for this setting (for the webservice),
7601 setting this value to a literal "null" string disables authentication,
7602 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7603 no matter what user name and password are supplied.
7604
7605 The initial value of this property is <tt>VRDPAuth</tt>,
7606 meaning that the webservice will use the same authentication
7607 library that is used by default for VBoxVRDP (again, see
7608 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7609 The format and calling convention of authentication libraries
7610 is the same for the webservice as it is for VBoxVRDP.
7611
7612 </desc>
7613 </attribute>
7614
7615 <attribute name="HWVirtExEnabled" type="boolean">
7616 <desc>
7617 This specifies the default value for hardware virtualization
7618 extensions. If enabled, virtual machines will make use of
7619 hardware virtualization extensions such as Intel VT-x and
7620 AMD-V by default. This value can be overridden by each VM
7621 using their <link to="IMachine::HWVirtExEnabled" /> property.
7622 </desc>
7623 </attribute>
7624
7625 <attribute name="LogHistoryCount" type="unsigned long">
7626 <desc>
7627 This value specifies how many old release log files are kept.
7628 </desc>
7629 </attribute>
7630 </interface>
7631
7632 <!--
7633 // IGuest
7634 /////////////////////////////////////////////////////////////////////////
7635 -->
7636
7637 <interface
7638 name="IGuestOSType" extends="$unknown"
7639 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7640 wsmap="struct"
7641 >
7642 <desc>
7643 </desc>
7644
7645 <attribute name="familyId" type="wstring" readonly="yes">
7646 <desc>Guest OS family identifier string.</desc>
7647 </attribute>
7648
7649 <attribute name="familyDescription" type="wstring" readonly="yes">
7650 <desc>Human readable description of the guest OS family.</desc>
7651 </attribute>
7652
7653 <attribute name="id" type="wstring" readonly="yes">
7654 <desc>Guest OS identifier string.</desc>
7655 </attribute>
7656
7657 <attribute name="description" type="wstring" readonly="yes">
7658 <desc>Human readable description of the guest OS.</desc>
7659 </attribute>
7660
7661 <attribute name="is64Bit" type="boolean" readonly="yes">
7662 <desc>Returns @c true if the given OS is 64-bit</desc>
7663 </attribute>
7664
7665 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7666 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7667 </attribute>
7668
7669 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7670 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7671 </attribute>
7672
7673 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7674 <desc>Recommended RAM size in Megabytes.</desc>
7675 </attribute>
7676
7677 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7678 <desc>Recommended video RAM size in Megabytes.</desc>
7679 </attribute>
7680
7681 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7682 <desc>Recommended hard disk size in Megabytes.</desc>
7683 </attribute>
7684
7685 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7686 <desc>Returns recommended network adapter for this OS type.</desc>
7687 </attribute>
7688 </interface>
7689
7690 <interface
7691 name="IGuest" extends="$unknown"
7692 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7693
7694 wsmap="suppress"
7695 >
7696 <desc>
7697 The IGuest interface represents information about the operating system
7698 running inside the virtual machine. Used in
7699 <link to="IConsole::guest"/>.
7700
7701 IGuest provides information about the guest operating system, whether
7702 Guest Additions are installed and other OS-specific virtual machine
7703 properties.
7704 </desc>
7705
7706 <attribute name="OSTypeId" type="wstring" readonly="yes">
7707 <desc>
7708 Identifier of the Guest OS type as reported by the Guest
7709 Additions.
7710 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7711 an IGuestOSType object representing details about the given
7712 Guest OS type.
7713 <note>
7714 If Guest Additions are not installed, this value will be
7715 the same as <link to="IMachine::OSTypeId"/>.
7716 </note>
7717 </desc>
7718 </attribute>
7719
7720 <attribute name="additionsActive" type="boolean" readonly="yes">
7721 <desc>
7722 Flag whether the Guest Additions are installed and active
7723 in which case their version will be returned by the
7724 <link to="#additionsVersion"/> property.
7725 </desc>
7726 </attribute>
7727
7728 <attribute name="additionsVersion" type="wstring" readonly="yes">
7729 <desc>
7730 Version of the Guest Additions (3 decimal numbers separated
7731 by dots) or empty when the Additions are not installed. The
7732 Additions may also report a version but yet not be active as
7733 the version might be refused by VirtualBox (incompatible) or
7734 other failures occurred.
7735 </desc>
7736 </attribute>
7737
7738 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7739 <desc>
7740 Flag whether seamless guest display rendering (seamless desktop
7741 integration) is supported.
7742 </desc>
7743 </attribute>
7744
7745 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7746 <desc>
7747 Flag whether the guest is in graphics mode. If it is not, then
7748 seamless rendering will not work, resize hints are not immediately
7749 acted on and guest display resizes are probably not initiated by
7750 the guest additions.
7751 </desc>
7752 </attribute>
7753
7754 <attribute name="memoryBalloonSize" type="unsigned long">
7755 <desc>Guest system memory balloon size in megabytes.</desc>
7756 </attribute>
7757
7758 <attribute name="statisticsUpdateInterval" type="unsigned long">
7759 <desc>Interval to update guest statistics in seconds.</desc>
7760 </attribute>
7761
7762 <method name="setCredentials">
7763 <desc>
7764 Store login credentials that can be queried by guest operating
7765 systems with Additions installed. The credentials are transient
7766 to the session and the guest may also choose to erase them. Note
7767 that the caller cannot determine whether the guest operating system
7768 has queried or made use of the credentials.
7769
7770 <result name="VBOX_E_VM_ERROR">
7771 VMM device is not available.
7772 </result>
7773
7774 </desc>
7775 <param name="userName" type="wstring" dir="in">
7776 <desc>User name string, can be empty</desc>
7777 </param>
7778 <param name="password" type="wstring" dir="in">
7779 <desc>Password string, can be empty</desc>
7780 </param>
7781 <param name="domain" type="wstring" dir="in">
7782 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7783 </param>
7784 <param name="allowInteractiveLogon" type="boolean" dir="in">
7785 <desc>
7786 Flag whether the guest should alternatively allow the user to
7787 interactively specify different credentials. This flag might
7788 not be supported by all versions of the Additions.
7789 </desc>
7790 </param>
7791 </method>
7792
7793 <method name="getStatistic">
7794 <desc>
7795 Query specified guest statistics as reported by the VirtualBox Additions.
7796 </desc>
7797 <param name="cpuId" type="unsigned long" dir="in">
7798 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7799 </param>
7800 <param name="statistic" type="GuestStatisticType" dir="in">
7801 <desc>Statistic type.</desc>
7802 </param>
7803 <param name="statVal" type="unsigned long" dir="out">
7804 <desc>Statistics value</desc>
7805 </param>
7806 </method>
7807
7808 </interface>
7809
7810
7811 <!--
7812 // IProgress
7813 /////////////////////////////////////////////////////////////////////////
7814 -->
7815
7816 <interface
7817 name="IProgress" extends="$unknown"
7818 uuid="ee1aa091-fda8-47a9-8f1c-4bba002a3229"
7819 wsmap="managed"
7820 >
7821 <desc>
7822 The IProgress interface allows for monitoring the progress of
7823 an asynchronous tasks within VirtualBox.
7824
7825 An instance of this is returned every time VirtualBox starts
7826 an asynchronous task (in other words, a separate thread) which
7827 continues to run after a method call returns. For example,
7828 <link to="IConsole::saveState" />, which saves the state of
7829 a running virtual machine, can take a long time to complete.
7830 To be able to display a progress bar, a user interface such as
7831 the VirtualBox graphical user interface can use the IProgress
7832 object returned by that method.
7833
7834 Note that IProgress is a "read-only" interface in the sense
7835 that only the VirtualBox internals behind the Main API can
7836 create and manipulate progress objects, whereas client code
7837 can only use the IProgress object to monitor a task's
7838 progress and, if <link to="#cancelable" /> is true,
7839 cancel the task by calling <link to="#cancel" />.
7840
7841 A task represented by IProgress can consist of one or more
7842 sub-operations that run sequentially, one by one (see
7843 <link to="#operation" /> and <link to="#operationCount" />).
7844 Every operation is identified by a number (starting from 0)
7845 and has a separate description.
7846
7847 You can find the individual percentage of completion of the current
7848 operation in <link to="#operationPercent" /> and the
7849 percentage of completion of the task as a whole
7850 in <link to="#percent" />.
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="completed" type="boolean" readonly="yes">
7882 <desc>Whether the task has been completed.</desc>
7883 </attribute>
7884
7885 <attribute name="canceled" type="boolean" readonly="yes">
7886 <desc>Whether the task has been canceled.</desc>
7887 </attribute>
7888
7889 <attribute name="resultCode" type="result" readonly="yes">
7890 <desc>
7891 Result code of the progress task.
7892 Valid only if <link to="#completed"/> is true.
7893 </desc>
7894 </attribute>
7895
7896 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7897 <desc>
7898 Extended information about the unsuccessful result of the
7899 progress operation. May be NULL if no extended information
7900 is available.
7901 Valid only if <link to="#completed"/> is true and
7902 <link to="#resultCode"/> indicates a failure.
7903 </desc>
7904 </attribute>
7905
7906 <attribute name="operationCount" type="unsigned long" readonly="yes">
7907 <desc>
7908 Number of sub-operations this task is divided into.
7909 Every task consists of at least one suboperation.
7910 </desc>
7911 </attribute>
7912
7913 <attribute name="operation" type="unsigned long" readonly="yes">
7914 <desc>Number of the sub-operation being currently executed.</desc>
7915 </attribute>
7916
7917 <attribute name="operationDescription" type="wstring" readonly="yes">
7918 <desc>
7919 Description of the sub-operation being currently executed.
7920 </desc>
7921 </attribute>
7922
7923 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7924 <desc>Progress value of the current sub-operation only, in percent.</desc>
7925 </attribute>
7926
7927 <method name="waitForCompletion">
7928 <desc>
7929 Waits until the task is done (including all sub-operations)
7930 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7931
7932 <result name="VBOX_E_IPRT_ERROR">
7933 Failed to wait for task completion.
7934 </result>
7935 </desc>
7936
7937 <param name="timeout" type="long" dir="in">
7938 </param>
7939 </method>
7940
7941 <method name="waitForOperationCompletion">
7942 <desc>
7943 Waits until the given operation is done with a given timeout in
7944 milliseconds; specify -1 for an indefinite wait.
7945
7946 <result name="VBOX_E_IPRT_ERROR">
7947 Failed to wait for operation completion.
7948 </result>
7949
7950 </desc>
7951 <param name="operation" type="unsigned long" dir="in">
7952 <desc>
7953 Number of the operation to wait for.
7954 Must be less than <link to="#operationCount"/>.
7955 </desc>
7956 </param>
7957 <param name="timeout" type="long" dir="in">
7958 </param>
7959 </method>
7960
7961 <method name="cancel">
7962 <desc>
7963 Cancels the task.
7964 <note>
7965 If <link to="#cancelable"/> is <tt>false</tt>, then
7966 this method will fail.
7967 </note>
7968
7969 <result name="VBOX_E_INVALID_OBJECT_STATE">
7970 Operation cannot be canceled.
7971 </result>
7972
7973 </desc>
7974 </method>
7975
7976 </interface>
7977
7978
7979 <!--
7980 // ISnapshot
7981 /////////////////////////////////////////////////////////////////////////
7982 -->
7983
7984 <interface
7985 name="ISnapshot" extends="$unknown"
7986 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
7987 wsmap="managed"
7988 >
7989 <desc>
7990 The ISnapshot interface represents a snapshot of the virtual
7991 machine.
7992
7993 The <i>snapshot</i> stores all the information about a virtual
7994 machine necessary to bring it to exactly the same state as it was at
7995 the time of taking the snapshot. The snapshot includes:
7996
7997 <ul>
7998 <li>all settings of the virtual machine (i.e. its hardware
7999 configuration: RAM size, attached hard disks, etc.)
8000 </li>
8001 <li>the execution state of the virtual machine (memory contents,
8002 CPU state, etc.).
8003 </li>
8004 </ul>
8005
8006 Snapshots can be <i>offline</i> (taken when the VM is powered off)
8007 or <i>online</i> (taken when the VM is running). The execution
8008 state of the offline snapshot is called a <i>zero execution state</i>
8009 (it doesn't actually contain any information about memory contents
8010 or the CPU state, assuming that all hardware is just powered off).
8011
8012 <h3>Snapshot branches</h3>
8013
8014 Snapshots can be chained. Chained snapshots form a branch where
8015 every next snapshot is based on the previous one. This chaining is
8016 mostly related to hard disk branching (see <link to="IHardDisk"/>
8017 description). This means that every time a new snapshot is created,
8018 a new differencing hard disk is implicitly created for all normal
8019 hard disks attached to the given virtual machine. This allows to
8020 fully restore hard disk contents when the machine is later reverted
8021 to a particular snapshot.
8022
8023 In the current implementation, multiple snapshot branches within one
8024 virtual machine are not allowed. Every machine has a single branch,
8025 and <link to="IConsole::takeSnapshot"/> operation adds a new
8026 snapshot to the top of that branch.
8027
8028 Existing snapshots can be discarded using
8029 <link to="IConsole::discardSnapshot"/>.
8030
8031 <h3>Current snapshot</h3>
8032
8033 Every virtual machine has a current snapshot, identified by
8034 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
8035 a base for the <i>current machine state</i> (see below), to the effect
8036 that all normal hard disks of the machine and its execution
8037 state are based on this snapshot.
8038
8039 In the current implementation, the current snapshot is always the
8040 last taken snapshot (i.e. the head snapshot on the branch) and it
8041 cannot be changed.
8042
8043 The current snapshot is <tt>null</tt> if the machine doesn't have
8044 snapshots at all; in this case the current machine state is just
8045 current settings of this machine plus its current execution state.
8046
8047 <h3>Current machine state</h3>
8048
8049 The current machine state is what represented by IMachine instances got
8050 directly from IVirtualBox
8051 using <link
8052 to="IVirtualBox::getMachine">getMachine()</link>, <link
8053 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
8054 to instances returned by <link to="ISnapshot::machine"/>). This state
8055 is always used when the machine is <link to="IConsole::powerUp"> powered
8056 on</link>.
8057
8058 The current machine state also includes the current execution state.
8059 If the machine is being currently executed
8060 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
8061 and above), its execution state is just what's happening now.
8062 If it is powered off (<link to="MachineState_PoweredOff"/> or
8063 <link to="MachineState_Aborted"/>), it has a zero execution state.
8064 If the machine is saved (<link to="MachineState_Saved"/>), its
8065 execution state is what saved in the execution state file
8066 (<link to="IMachine::stateFilePath"/>).
8067
8068 If the machine is in the saved state, then, next time it is powered
8069 on, its execution state will be fully restored from the saved state
8070 file and the execution will continue from the point where the state
8071 was saved.
8072
8073 Similarly to snapshots, the current machine state can be discarded
8074 using <link to="IConsole::discardCurrentState"/>.
8075
8076 <h3>Taking and discarding snapshots</h3>
8077
8078 The table below briefly explains the meaning of every snapshot
8079 operation:
8080
8081 <table>
8082 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
8083
8084 <tr><td><link to="IConsole::takeSnapshot"/></td>
8085
8086 <td>Save the current state of the virtual machine, including all
8087 settings, contents of normal hard disks and the current modifications
8088 to immutable hard disks (for online snapshots)</td>
8089
8090 <td>The current state is not changed (the machine will continue
8091 execution if it is being executed when the snapshot is
8092 taken)</td></tr>
8093
8094 <tr><td><link to="IConsole::discardSnapshot"/></td>
8095
8096 <td>Forget the state of the virtual machine stored in the snapshot:
8097 dismiss all saved settings and delete the saved execution state (for
8098 online snapshots)</td>
8099
8100 <td>Other snapshots (including child snapshots, if any) and the
8101 current state are not directly affected</td></tr>
8102
8103 <tr><td><link to="IConsole::discardCurrentState"/></td>
8104
8105 <td>Restore the current state of the virtual machine from the state
8106 stored in the current snapshot, including all settings and hard disk
8107 contents</td>
8108
8109 <td>The current state of the machine existed prior to this operation
8110 is lost</td></tr>
8111
8112 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
8113
8114 <td>Completely revert the virtual machine to the state it was in
8115 before the current snapshot has been taken</td>
8116
8117 <td>The current state, as well as the current snapshot, are
8118 lost</td></tr>
8119
8120 </table>
8121
8122 </desc>
8123
8124 <attribute name="id" type="uuid" readonly="yes">
8125 <desc>UUID of the snapshot.</desc>
8126 </attribute>
8127
8128 <attribute name="name" type="wstring">
8129 <desc>Short name of the snapshot.</desc>
8130 </attribute>
8131
8132 <attribute name="description" type="wstring">
8133 <desc>Optional description of the snapshot.</desc>
8134 </attribute>
8135
8136 <attribute name="timeStamp" type="long long" readonly="yes">
8137 <desc>
8138 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8139 </desc>
8140 </attribute>
8141
8142 <attribute name="online" type="boolean" readonly="yes">
8143 <desc>
8144 <tt>true</tt> if this snapshot is an online snapshot and
8145 <tt>false</tt> otherwise.
8146
8147 <note>
8148 When this attribute is <tt>true</tt>, the
8149 <link to="IMachine::stateFilePath"/> attribute of the
8150 <link to="#machine"/> object associated with this snapshot
8151 will point to the saved state file. Otherwise, it will be
8152 <tt>null</tt>.
8153 </note>
8154 </desc>
8155 </attribute>
8156
8157 <attribute name="machine" type="IMachine" readonly="yes">
8158 <desc>
8159 Virtual machine this snapshot is taken on. This object
8160 stores all settings the machine had when taking this snapshot.
8161 <note>
8162 The returned machine object is immutable, i.e. no
8163 any settings can be changed.
8164 </note>
8165 </desc>
8166 </attribute>
8167
8168 <attribute name="parent" type="ISnapshot" readonly="yes">
8169 <desc>
8170 Parent snapshot (a snapshot this one is based on).
8171 <note>
8172 It's not an error to read this attribute on a snapshot
8173 that doesn't have a parent -- a null object will be
8174 returned to indicate this.
8175 </note>
8176 </desc>
8177 </attribute>
8178
8179 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8180 <desc>
8181 Child snapshots (all snapshots having this one as a parent).
8182 <note>
8183 In the current implementation, there can be only one
8184 child snapshot, or no children at all, meaning this is the
8185 last (head) snapshot.
8186 </note>
8187 </desc>
8188 </attribute>
8189
8190 </interface>
8191
8192
8193 <!--
8194 // IMedia
8195 /////////////////////////////////////////////////////////////////////////
8196 -->
8197
8198 <enum
8199 name="MediaState"
8200 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8201 >
8202 <desc>
8203 Virtual media state.
8204 <see>IMedia</see>
8205 </desc>
8206
8207 <const name="NotCreated" value="0">
8208 <desc>
8209 Associated media storage does not exist (either was not created yet or
8210 was deleted).
8211 </desc>
8212 </const>
8213 <const name="Created" value="1">
8214 <desc>
8215 Associated storage exists and accessible.
8216 </desc>
8217 </const>
8218 <const name="LockedRead" value="2">
8219 <desc>
8220 Media is locked for reading, no data modification is possible.
8221 </desc>
8222 </const>
8223 <const name="LockedWrite" value="3">
8224 <desc>
8225 Media is locked for writing, no concurrent data reading or modification
8226 is possible.
8227 </desc>
8228 </const>
8229 <const name="Inaccessible" value="4">
8230 <desc>
8231 Associated media storage is not accessible.
8232 </desc>
8233 </const>
8234 <const name="Creating" value="5">
8235 <desc>
8236 Associated media storage is being created.
8237 </desc>
8238 </const>
8239 <const name="Deleting" value="6">
8240 <desc>
8241 Associated media storage is being deleted.
8242 </desc>
8243 </const>
8244 </enum>
8245
8246 <interface
8247 name="IMedium" extends="$unknown"
8248 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
8249 wsmap="managed"
8250 >
8251 <desc>
8252 The IMedium interface is a common interface for all objects representing
8253 virtual media such as hard disks, CD/DVD images and floppy images.
8254
8255 Each medium is associated with a storage unit (such as a file on the host
8256 computer or a network resource) that holds actual data. The location of
8257 the storage unit is represented by the #location attribute. The value of
8258 this attribute is media type dependent.
8259
8260 The exact media type may be determined by querying the appropriate
8261 interface such as:
8262 <ul>
8263 <li>IHardDisk (virtual hard disks)</li>
8264 <li>IDVDImage (standard CD/DVD ISO image files)</li>
8265 <li>IFloppyImage (raw floppy image files)</li>
8266 </ul>
8267
8268 Existing media are opened using the following methods, depending on the
8269 media type:
8270 <ul>
8271 <li><link to="IVirtualBox::openHardDisk"/></li>
8272 <li><link to="IVirtualBox::openDVDImage"/></li>
8273 <li><link to="IVirtualBox::openFloppyImage"/></li>
8274 </ul>
8275
8276 New hard disk media are created using the
8277 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8278 images are created outside VirtualBox, usually by storing a copy
8279 of the real medium of the corresponding type in a regular file.
8280
8281 <h3>Known Media</h3>
8282
8283 When an existing medium gets opened for the first time, it gets
8284 automatically remembered by the given VirtualBox installation or, in other
8285 words, becomes a <i>known medium</i>. Known media are stored in the media
8286 registry transparently maintained by VirtualBox and stored in settings
8287 files so that this registry is preserved when VirtualBox is not running.
8288
8289 Newly created virtual hard disks get remembered only when the associated
8290 storage unit is actually created (see IHardDisk for more details).
8291
8292 All known media can be enumerated using
8293 <link to="IVirtualBox::hardDisks"/>,
8294 <link to="IVirtualBox::DVDImages"/> and
8295 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8296 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8297 and similar methods or by location using
8298 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8299
8300 Only known media can be attached to virtual machines.
8301
8302 Removing known media from the media registry is performed when the given
8303 medium is closed using the <link to="#close"/> method or when its
8304 associated storage unit is deleted (only for hard disks).
8305
8306 <h3>Accessibility Checks</h3>
8307
8308 The given medium (with the created storage unit) is considered to be
8309 <i>accessible</i> when its storage unit can be read.
8310 Accessible media are indicated by the <link to="MediaState_Created"/>
8311 value of the <link to="#state"/> attribute. When the storage unit cannot
8312 be read (for example, because it is located on a disconnected network
8313 resource, or was accidentally deleted outside VirtualBox), the medium is
8314 considered to be <i>inaccessible</i> which is indicated by the
8315 <link to="MediaState_Inaccessible"/> state. The details about the reason
8316 of being inaccessible can be obtained using the
8317 <link to="#lastAccessError"/> attribute.
8318
8319 A new accessibility check is performed each time the <link to="#state"/>
8320 attribute is read. Please note that this check may take long time (several
8321 seconds or even minutes, depending on the storage unit location and
8322 format), and will block the calling thread until finished. For this
8323 reason, it is recommended to never read this attribute on the main UI
8324 thread to avoid making the UI unresponsive.
8325
8326 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8327 created for the first time), all known media are in the
8328 <link to="MediaState_Inaccessible"/> state but the value of the <link
8329 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
8330 accessibility check is made on startup. This is done to make the
8331 VirtualBox object ready for serving requests as
8332 fast as possible and let the end-user application decide if it needs to
8333 check media accessibility right away or not.
8334 </desc>
8335
8336 <attribute name="id" type="uuid" readonly="yes">
8337 <desc>
8338 UUID of the medium. For a newly created medium, this value is a randomly
8339 generated UUID.
8340
8341 <note>
8342 For media in one of MediaState_NotCreated, MediaState_Creating or
8343 MediaState_Deleting states, the value of this property is undefined
8344 and will most likely be an empty UUID.
8345 </note>
8346 </desc>
8347 </attribute>
8348
8349 <attribute name="description" type="wstring">
8350 <desc>
8351 Optional description of the medium. For newly created media, the value
8352 of this attribute value is <tt>null</tt>.
8353
8354 Media types that don't support this attribute will return E_NOTIMPL in
8355 attempt to get or set this attribute's value.
8356
8357 <note>
8358 For some storage types, reading this attribute may return an outdated
8359 (last known) value when <link to="#state"/> is <link
8360 to="MediaState_Inaccessible"/> or <link
8361 to="MediaState_LockedWrite"/> because the value of this attribute is
8362 stored within the storage unit itself. Also note that changing the
8363 attribute value is not possible in such case, as well as when the
8364 medium is the <link to="MediaState_LockedRead"/> state.
8365 </note>
8366 </desc>
8367 </attribute>
8368
8369 <attribute name="state" type="MediaState" readonly="yes">
8370 <desc>
8371 Current media state. Inspect <link to="MediaState"/> values for details.
8372
8373 Reading this attribute may take a long time because an accessibility
8374 check of the storage unit is performed each time the attribute is read.
8375 This check may cause a significant delay if the storage unit of the
8376 given medium is, for example, a file located on a network share which is
8377 not currently accessible due to connectivity problems -- the call will
8378 not return until a timeout interval defined by the host OS for this
8379 operation expires.
8380
8381 If the last known state of the medium is <link to="MediaState_Created"/>
8382 and the accessibility check fails then the state would be set to
8383 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8384 may be used to get more details about the failure. If the state of the
8385 medium is <link to="MediaState_LockedRead"/> or
8386 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8387 non-null value of <link to="#lastAccessError"/> will indicate a failed
8388 accessibility check in this case.
8389
8390 Note that not all media states are applicable to all media types.
8391 For example, states <link to="MediaState_NotCreated"/>,
8392 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8393 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8394 IFloppyImage media.
8395 </desc>
8396 </attribute>
8397
8398 <attribute name="location" type="wstring">
8399 <desc>
8400 Location of the storage unit holding media data.
8401
8402 The format of the location string is media type specific. For media
8403 types using regular files in a host's file system, the location
8404 string is the full file name.
8405
8406 Some media types may support changing the storage unit location by
8407 simply changing the value of this property. If this operation is not
8408 supported, the implementation will return E_NOTIMPL in attempt to set
8409 this attribute's value.
8410
8411 When setting a value of the location attribute which is a regular file
8412 in the host's file system, the given file name may be either relative to
8413 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8414 absolute. Note that if the given location specification does not contain
8415 the file extension part then a proper default extension will be
8416 automatically appended by the implementation depending on the media type.
8417 </desc>
8418 </attribute>
8419
8420 <attribute name="name" type="wstring" readonly="yes">
8421 <desc>
8422 Name of the storage unit holding media data.
8423
8424 The returned string is a short version of the <link to="#location"/>
8425 attribute that is suitable for representing the medium in situations
8426 where the full location specification is too long (such as lists
8427 and comboboxes in GUI frontends). This string is also used by frontends
8428 to sort the media list alphabetically when needed.
8429
8430 For example, for locations that are regular files in the host's file
8431 system, the value of this attribute is just the file name (+ extension),
8432 without the path specification.
8433
8434 Note that as opposed to the <link to="#location"/> attribute, the name
8435 attribute will not necessary be unique for a list of media of the
8436 given type and format.
8437 </desc>
8438 </attribute>
8439
8440 <attribute name="size" type="unsigned long long" readonly="yes">
8441 <desc>
8442 Physical size of the storage unit used to hold media data (in bytes).
8443
8444 <note>
8445 For media whose <link to="#state"/> is <link
8446 to="MediaState_Inaccessible"/>, the value of this property is the
8447 last known size. For <link to="MediaState_NotCreated"/> media,
8448 the returned value is zero.
8449 </note>
8450 </desc>
8451 </attribute>
8452
8453 <attribute name="lastAccessError" type="wstring" readonly="yes">
8454 <desc>
8455 Text message that represents the result of the last accessibility
8456 check.
8457
8458 Accessibility checks are performed each time the <link to="#state"/>
8459 attribute is read. A @c null string is returned if the last
8460 accessibility check was successful. A non-null string indicates a
8461 failure and should normally describe a reason of the failure (for
8462 example, a file read error).
8463 </desc>
8464 </attribute>
8465
8466 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8467 <desc>
8468 Array of UUIDs of all machines this medium is attached to.
8469
8470 A <tt>null</tt> array is returned if this medium is not attached to any
8471 machine or to any machine's snapshot.
8472
8473 <note>
8474 The returned array will include a machine even if this medium is not
8475 attached to that machine in the current state but attached to it in
8476 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8477 details.
8478 </note>
8479 </desc>
8480 </attribute>
8481
8482 <method name="getSnapshotIds">
8483 <desc>
8484 Returns an array of UUIDs of all snapshots of the given machine where
8485 this medium is attached to.
8486
8487 If the medium is attached to the machine in the current state, then the
8488 first element in the array will always be the ID of the queried machine
8489 (i.e. the value equal to the @c machineId argument), followed by
8490 snapshot IDs (if any).
8491
8492 If the medium is not attached to the machine in the current state, then
8493 the array will contain only snapshot IDs.
8494
8495 The returned array may be <tt>null</tt> if this medium is not attached
8496 to the given machine at all, neither in the current state nor in one of
8497 the snapshots.
8498 </desc>
8499 <param name="machineId" type="uuid" dir="in">
8500 <desc>
8501 UUID of the machine to query.
8502 </desc>
8503 </param>
8504 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8505 <desc>
8506 Array of snapshot UUIDs of the given machine using this medium.
8507 </desc>
8508 </param>
8509 </method>
8510
8511 <method name="lockRead">
8512 <desc>
8513 Locks this medium for reading.
8514
8515 The read lock is shared: many clients can simultaneously lock the
8516 same media for reading unless it is already locked for writing (see
8517 <link to="#lockWrite"/>) in which case an error is returned.
8518
8519 When the medium is locked for reading, it cannot be modified
8520 from within VirtualBox. This means that any method that changes
8521 the properties of this medium or contents of the storage unit
8522 will return an error (unless explicitly stated otherwise) and
8523 that an attempt to start a virtual machine that wants to modify
8524 the medium will also fail.
8525
8526 When the virtual machine is started up, it locks for reading all
8527 media it uses in read-only mode. If some media cannot be locked
8528 for reading, the startup procedure will fail.
8529
8530 The medium locked for reading must be unlocked using the <link
8531 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8532 can be nested and must be followed by the same number of paired
8533 <link to="#unlockRead"/> calls.
8534
8535 This method sets the media state to <link
8536 to="MediaState_LockedRead"/> on success. The state prior to
8537 this call must be <link to="MediaState_Created"/>, <link
8538 to="MediaState_Inaccessible"/> or <link
8539 to="MediaState_LockedRead"/>. As you can see, inaccessible
8540 media can be locked too. This is not an error; this method
8541 performs a logical lock that prevents modifications of this
8542 media through the VirtualBox API, not a physical lock of the
8543 underlying storage unit.
8544
8545 This method returns the current state of the medium
8546 <b>before</b> the operation.
8547
8548 <result name="VBOX_E_INVALID_OBJECT_STATE">
8549 Invalid media state (e.g. not created, locked, inaccessible,
8550 creating, deleting).
8551 </result>
8552
8553 </desc>
8554 <param name="state" type="MediaState" dir="return">
8555 <desc>
8556 State of the medium after the operation.
8557 </desc>
8558 </param>
8559 </method>
8560
8561 <method name="unlockRead">
8562 <desc>
8563 Cancels the read lock previously set by <link to="#lockRead"/>.
8564
8565 For both, success and failure, this method returns the current state
8566 of the medium <b>after</b> the operation.
8567
8568 See <link to="#lockRead"/> for more details.
8569
8570 <result name="VBOX_E_INVALID_OBJECT_STATE">
8571 Medium not locked for reading.
8572 </result>
8573
8574 </desc>
8575 <param name="state" type="MediaState" dir="return">
8576 <desc>
8577 State of the medium after the operation.
8578 </desc>
8579 </param>
8580 </method>
8581
8582 <method name="lockWrite">
8583 <desc>
8584 Locks this medium for writing.
8585
8586 The write lock, as opposed to <link to="#lockRead"/>, is
8587 exclusive: there may be only one client holding a write lock
8588 and there may be no read locks while the write lock is held.
8589
8590 When the medium is locked for writing, it cannot be modified
8591 from within VirtualBox and it is not guaranteed that the values
8592 of its properties are up-to-date. Any method that changes the
8593 properties of this medium or contents of the storage unit will
8594 return an error (unless explicitly stated otherwise) and an
8595 attempt to start a virtual machine wanting to modify or to
8596 read the medium will fail.
8597
8598 When the virtual machine is started up, it locks for writing all
8599 media it uses to write data to. If any medium could not be locked
8600 for writing, the startup procedure will fail.
8601
8602 The medium locked for writing must be unlocked using the <link
8603 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8604 can <b>not</b> be nested and must be followed by a<link
8605 to="#unlockWrite"/> call before the next lockWrite call.
8606
8607 This method sets the media state to <link
8608 to="MediaState_LockedWrite"/> on success. The state prior to
8609 this call must be <link to="MediaState_Created"/> or <link
8610 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8611 media can be locked too. This is not an error; this method
8612 performs a logical lock preventing modifications of this
8613 media through the VirtualBox API, not a physical lock of the
8614 underlying storage unit.
8615
8616 For both, success and failure, this method returns the current
8617 state of the medium <b>before</b> the operation.
8618
8619 <result name="VBOX_E_INVALID_OBJECT_STATE">
8620 Invalid media state (e.g. not created, locked, inaccessible,
8621 creating, deleting).
8622 </result>
8623
8624 </desc>
8625 <param name="state" type="MediaState" dir="return">
8626 <desc>
8627 State of the medium after the operation.
8628 </desc>
8629 </param>
8630 </method>
8631
8632 <method name="unlockWrite">
8633 <desc>
8634 Cancels the write lock previously set by <link to="#lockWrite"/>.
8635
8636 For both, success and failure, this method returns the current
8637 state of the medium <b>after</b> the operation.
8638
8639 See <link to="#lockWrite"/> for more details.
8640
8641 <result name="VBOX_E_INVALID_OBJECT_STATE">
8642 Medium not locked for writing.
8643 </result>
8644
8645 </desc>
8646 <param name="state" type="MediaState" dir="return">
8647 <desc>
8648 State of the medium after the operation.
8649 </desc>
8650 </param>
8651 </method>
8652
8653 <method name="close">
8654 <desc>
8655 Closes this medium.
8656
8657 The hard disk must not be attached to any known virtual machine
8658 and must not have any known child hard disks, otherwise the
8659 operation will fail.
8660
8661 When the hard disk is successfully closed, it gets removed from
8662 the list of remembered hard disks, but its storage unit is not
8663 deleted. In particular, this means that this hard disk can be
8664 later opened again using the <link
8665 to="IVirtualBox::openHardDisk"/> call.
8666
8667 Note that after this method successfully returns, the given hard
8668 disk object becomes uninitialized. This means that any attempt
8669 to call any of its methods or attributes will fail with the
8670 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8671
8672 <result name="VBOX_E_INVALID_OBJECT_STATE">
8673 Invalid media state (other than not created, created or
8674 inaccessible).
8675 </result>
8676 <result name="VBOX_E_OBJECT_IN_USE">
8677 Medium attached to virtual machine.
8678 </result>
8679 <result name="VBOX_E_FILE_ERROR">
8680 Settings file not accessible.
8681 </result>
8682 <result name="VBOX_E_XML_ERROR">
8683 Could not parse the settings file.
8684 </result>
8685
8686 </desc>
8687 </method>
8688
8689 </interface>
8690
8691
8692 <!--
8693 // IHardDisk
8694 /////////////////////////////////////////////////////////////////////////
8695 -->
8696
8697 <enum
8698 name="HardDiskType"
8699 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8700 >
8701 <desc>
8702 Virtual hard disk type.
8703 <see>IHardDisk</see>
8704 </desc>
8705
8706 <const name="Normal" value="0">
8707 <desc>
8708 Normal hard disk (attached directly or indirectly, preserved
8709 when taking snapshots).
8710 </desc>
8711 </const>
8712 <const name="Immutable" value="1">
8713 <desc>
8714 Immutable hard disk (attached indirectly, changes are wiped out
8715 after powering off the virtual machine).
8716 </desc>
8717 </const>
8718 <const name="Writethrough" value="2">
8719 <desc>
8720 Write through hard disk (attached directly, ignored when
8721 taking snapshots).
8722 </desc>
8723 </const>
8724 </enum>
8725
8726 <enum
8727 name="HardDiskVariant"
8728 uuid="99334b63-7ed0-4f61-8a7e-7ec3e20dd912"
8729 >
8730 <desc>
8731 Virtual hard disk image variant. More than one flag may be set.
8732 <see>IHardDisk</see>
8733 </desc>
8734
8735 <const name="Standard" value="0">
8736 <desc>
8737 No particular variant requested, results in using the backend default.
8738 </desc>
8739 </const>
8740 <const name="VmdkSplit2G" value="0x01">
8741 <desc>
8742 VMDK image split in chunks of less than 2GByte.
8743 </desc>
8744 </const>
8745 <const name="VmdkStreamOptimized" value="0x04">
8746 <desc>
8747 VMDK streamOptimized image. Special import/export format which is
8748 read-only/append-only.
8749 </desc>
8750 </const>
8751 <const name="Fixed" value="0x1000">
8752 <desc>
8753 Fixed image. Only allowed for base images.
8754 </desc>
8755 </const>
8756 <const name="Diff" value="0x2000">
8757 <desc>
8758 Fixed image. Only allowed for base images.
8759 </desc>
8760 </const>
8761 </enum>
8762
8763 <interface
8764 name="IHardDiskAttachment" extends="$unknown"
8765 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8766 wsmap="struct"
8767 >
8768 <desc>
8769 The IHardDiskAttachment interface represents a hard disk attachment of a
8770 virtual machine.
8771
8772 Every hard disk attachment specifies a slot of the virtual hard disk
8773 controller and a virtual hard disk attached to this slot.
8774
8775 The array of hard disk attachments is returned by
8776 <link to="IMachine::hardDiskAttachments"/>.
8777 </desc>
8778 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8779 <desc>Hard disk object associated with this attachment.</desc>
8780 </attribute>
8781
8782 <attribute name="controller" type="wstring" readonly="yes">
8783 <desc>Interface bus of this attachment.</desc>
8784 </attribute>
8785
8786 <attribute name="port" type="long" readonly="yes">
8787 <desc>Port number of this attachment.</desc>
8788 </attribute>
8789
8790 <attribute name="device" type="long" readonly="yes">
8791 <desc>Device slot number of this attachment.</desc>
8792 </attribute>
8793
8794 </interface>
8795
8796 <interface
8797 name="IHardDisk" extends="IMedium"
8798 uuid="3498d065-dee6-48bf-bcc5-47018fee4f42"
8799 wsmap="managed"
8800 >
8801 <desc>
8802 The IHardDisk interface represents a virtual hard disk drive
8803 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8804
8805 Virtual hard disk objects virtualize the hard disk hardware and look like
8806 regular hard disks for the guest OS running inside the virtual machine.
8807
8808 <h3>Hard Disk Types</h3>
8809
8810 There are three types of hard disks:
8811 <link to="HardDiskType_Normal">Normal</link>,
8812 <link to="HardDiskType_Immutable">Immutable</link> and
8813 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8814 hard disk defines how the hard disk is attached to a virtual machine and
8815 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8816 machine with the attached hard disk is taken. The type of the hard disk is
8817 defined by the <link to="#type"/> attribute.
8818
8819 All hard disks can be also divided in two big groups: <i>base</i> hard
8820 disks and <i>differencing</i> hard disks. A base hard disk contains all
8821 sectors of the hard disk data in its storage unit and therefore can be
8822 used independently. On the contrary, a differencing hard disk contains
8823 only some part of the hard disk data (a subset of sectors) and needs
8824 another hard disk to get access to the missing sectors of data. This
8825 another hard disk is called a <i>parent</i> hard disk and defines a hard
8826 disk to which this differencing hard disk is known to be <i>linked to</i>.
8827 The parent hard disk may be itself a differencing hard disk. This
8828 way, differencing hard disks form a linked hard disk chain. This chain
8829 always ends with the base hard disk which is sometimes referred to as the
8830 root hard disk of this chain. Note that several differencing hard disks
8831 may be linked to the same parent hard disk. This way, all known hard disks
8832 form a hard disk tree which is based on their parent-child relationship.
8833
8834 Differencing hard disks can be distinguished from base hard disks by
8835 querying the <link to="#parent"/> attribute: base hard disks do not have
8836 parents they would depend on, so the value of this attribute is always
8837 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8838 the hard disk tree (from the child hard disk to its parent). It is also
8839 possible to walk down the tree using the <link to="#children"/>
8840 attribute.
8841
8842 Note that the type of all differencing hard disks is
8843 <link to="HardDiskType_Normal">Normal</link>; all other values are
8844 meaningless for them. Base hard disks may be of any type.
8845
8846 <h3>Creating Hard Disks</h3>
8847
8848 New base hard disks are created using
8849 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8850 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8851 disks are usually implicitly created by VirtualBox when needed but may
8852 also be created explicitly using <link to="#createDiffStorage"/>.
8853
8854 After the hard disk is successfully created (including the storage unit)
8855 or opened, it becomes a known hard disk (remembered in the internal media
8856 registry). Known hard disks can be attached to a virtual machine, accessed
8857 through <link to="IVirtualBox::getHardDisk"/> and
8858 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8859 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8860
8861 The following methods, besides <link to="IMedium::close"/>,
8862 automatically remove the hard disk from the media registry:
8863 <ul>
8864 <li><link to="#deleteStorage"/></li>
8865 <li><link to="#mergeTo"/></li>
8866 </ul>
8867
8868 If the storage unit of the hard disk is a regular file in the host's
8869 file system then the rules stated in the description of the
8870 <link to="IMedium::location"/> attribute apply when setting its value. In
8871 addition, a plain file name without any path may be given, in which case
8872 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8873 folder</link> will be prepended to it.
8874
8875 <h4>Automatic composition of the file name part</h4>
8876
8877 Another extension to the <link to="IMedium::location"/> attribute is that
8878 there is a possibility to cause VirtualBox to compose a unique value for
8879 the file name part of the location using the UUID of the hard disk. This
8880 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8881 e.g. before the storage unit is created, and works as follows. You set the
8882 value of the <link to="IMedium::location"/> attribute to a location
8883 specification which only contains the path specification but not the file
8884 name part and ends with either a forward slash or a backslash character.
8885 In response, VirtualBox will generate a new UUID for the hard disk and
8886 compose the file name using the following pattern:
8887 <pre>
8888 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8889 </pre>
8890 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8891 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8892 is the default extension for the storage format of this hard disk. After
8893 that, you may call any of the methods that create a new hard disk storage
8894 unit and they will use the generated UUID and file name.
8895
8896 <h3>Attaching Hard Disks</h3>
8897
8898 Hard disks are attached to virtual machines using the
8899 <link to="IMachine::attachHardDisk"/> method and detached using the
8900 <link to="IMachine::detachHardDisk"/> method. Depending on their
8901 <link to="#type"/>, hard disks are attached either
8902 <i>directly</i> or <i>indirectly</i>.
8903
8904 When a hard disk is being attached directly, it is associated with the
8905 virtual machine and used for hard disk operations when the machine is
8906 running. When a hard disk is being attached indirectly, a new differencing
8907 hard disk linked to it is implicitly created and this differencing hard
8908 disk is associated with the machine and used for hard disk operations.
8909 This also means that if <link to="IMachine::attachHardDisk"/> performs
8910 a direct attachment then the same hard disk will be returned in response
8911 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8912 an indirect attachment is performed then
8913 <link to="IMachine::getHardDisk"/> will return the implicitly created
8914 differencing hard disk, not the original one passed to <link
8915 to="IMachine::attachHardDisk"/>. The following table shows the
8916 dependency of the attachment type on the hard disk type:
8917
8918 <table>
8919 <tr>
8920 <th>Hard Disk Type</th>
8921 <th>Direct or Indirect?</th>
8922 </tr>
8923 <tr>
8924 <td>Normal (Base)</td>
8925 <td>
8926 Normal base hard disks that do not have children (i.e. differencing
8927 hard disks linked to them) and that are not already attached to
8928 virtual machines in snapshots are attached <b>directly</b>.
8929 Otherwise, they are attached <b>indirectly</b> because having
8930 dependent children or being part of the snapshot makes it impossible
8931 to modify hard disk contents without breaking the integrity of the
8932 dependent party. The <link to="#readOnly"/> attribute allows to
8933 quickly determine the kind of the attachment for the given hard
8934 disk. Note that if a normal base hard disk is to be indirectly
8935 attached to a virtual machine with snapshots then a special
8936 procedure called <i>smart attachment</i> is performed (see below).
8937 </td>
8938 </tr>
8939 <tr>
8940 <td>Normal (Differencing)</td>
8941 <td>
8942 Differencing hard disks are like normal base hard disks: attached
8943 <b>directly</b> if they do not have children and are not attached to
8944 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8945 that the smart attachment procedure is never performed for
8946 differencing hard disks.
8947 </td>
8948 </tr>
8949 <tr>
8950 <td>Immutable</td>
8951 <td>
8952 Immutable hard disks are always attached <b>indirectly</b> because
8953 they are designed to be non-writable. If an immutable hard disk is
8954 attached to a virtual machine with snapshots then a special
8955 procedure called smart attachment is performed (see below).
8956 </td>
8957 </tr>
8958 <tr>
8959 <td>Writethrough</td>
8960 <td>
8961 Writethrough hard disks are always attached <b>directly</b>, also as
8962 designed. This also means that writethrough hard disks cannot have
8963 other hard disks linked to them at all.
8964 </td>
8965 </tr>
8966 </table>
8967
8968 Note that the same hard disk, regardless of its type, may be attached to
8969 more than one virtual machine at a time. In this case, the machine that is
8970 started first gains exclusive access to the hard disk and attempts to
8971 start other machines having this hard disk attached will fail until the
8972 first machine is powered down.
8973
8974 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8975 that the given hard disk remains associated with the given machine after a
8976 successful <link to="IMachine::detachHardDisk"/> call until
8977 <link to="IMachine::saveSettings"/> is called to save all changes to
8978 machine settings to disk. This deferring is necessary to guarantee that
8979 the hard disk configuration may be restored at any time by a call to
8980 <link to="IMachine::discardSettings"/> before the settings
8981 are saved (committed).
8982
8983 Note that if <link to="IMachine::discardSettings"/> is called after
8984 indirectly attaching some hard disks to the machine but before a call to
8985 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8986 all differencing hard disks implicitly created by
8987 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8988 Such implicitly created hard disks will also be immediately deleted when
8989 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8990 call if it is made before <link to="IMachine::saveSettings"/>. This
8991 implicit deletion is safe because newly created differencing hard
8992 disks do not contain any user data.
8993
8994 However, keep in mind that detaching differencing hard disks that were
8995 implicitly created by <link to="IMachine::attachHardDisk"/>
8996 before the last <link to="IMachine::saveSettings"/> call will
8997 <b>not</b> implicitly delete them as they may already contain some data
8998 (for example, as a result of virtual machine execution). If these hard
8999 disks are no more necessary, the caller can always delete them explicitly
9000 using <link to="#deleteStorage"/> after they are actually de-associated
9001 from this machine by the <link to="IMachine::saveSettings"/> call.
9002
9003 <h3>Smart Attachment</h3>
9004
9005 When normal base or immutable hard disks are indirectly attached to a
9006 virtual machine then some additional steps are performed to make sure the
9007 virtual machine will have the most recent "view" of the hard disk being
9008 attached. These steps include walking through the machine's snapshots
9009 starting from the current one and going through ancestors up to the first
9010 snapshot. Hard disks attached to the virtual machine in all
9011 of the encountered snapshots are checked whether they are descendants of
9012 the given normal base or immutable hard disk. The first found child (which
9013 is the differencing hard disk) will be used instead of the normal base or
9014 immutable hard disk as a parent for creating a new differencing hard disk
9015 that will be actually attached to the machine. And only if no descendants
9016 are found or if the virtual machine does not have any snapshots then the
9017 normal base or immutable hard disk will be used itself as a parent for
9018 this differencing hard disk.
9019
9020 It is easier to explain what smart attachment does using the
9021 following example:
9022 <pre>
9023BEFORE attaching B.vdi: AFTER attaching B.vdi:
9024
9025Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9026 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9027 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9028 Snapshot 4 (none) Snapshot 4 (none)
9029 CurState (none) CurState (D3->D2.vdi)
9030
9031 NOT
9032 ...
9033 CurState (D3->B.vdi)
9034 </pre>
9035 The first column is the virtual machine configuration before the base hard
9036 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9037 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9038 mean that the hard disk that is actually attached to the machine is a
9039 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9040 another hard disk, <tt>B.vdi</tt>.
9041
9042 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9043 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9044 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9045 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9046 it cannot be attached directly and needs an indirect attachment (i.e.
9047 implicit creation of a new differencing hard disk). Due to the smart
9048 attachment procedure, the new differencing hard disk
9049 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9050 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9051 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9052 machine.
9053
9054 Note that if there is more than one descendant hard disk of the given base
9055 hard disk found in a snapshot, and there is an exact device, channel and
9056 bus match, then this exact match will be used. Otherwise, the youngest
9057 descendant will be picked up.
9058
9059 There is one more important aspect of the smart attachment procedure which
9060 is not related to snapshots at all. Before walking through the snapshots
9061 as described above, the backup copy of the current list of hard disk
9062 attachment is searched for descendants. This backup copy is created when
9063 the hard disk configuration is changed for the first time after the last
9064 <link to="IMachine::saveSettings"/> call and used by
9065 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9066 changes. When such a descendant is found in this backup copy, it will be
9067 simply re-attached back, without creating a new differencing hard disk for
9068 it. This optimization is necessary to make it possible to re-attach the
9069 base or immutable hard disk to a different bus, channel or device slot
9070 without losing the contents of the differencing hard disk actually
9071 attached to the machine in place of it.
9072 </desc>
9073
9074 <attribute name="format" type="wstring" readonly="yes">
9075 <desc>
9076 Storage format of this hard disk.
9077
9078 The value of this attribute is a string that specifies a backend used to
9079 store hard disk data. The storage format is defined when you create a
9080 new hard disk or automatically detected when you open an existing hard
9081 disk medium, and cannot be changed later.
9082
9083 The list of all storage formats supported by this VirtualBox
9084 installation can be obtained using
9085 <link to="ISystemProperties::hardDiskFormats"/>.
9086 </desc>
9087 </attribute>
9088
9089 <attribute name="type" type="HardDiskType">
9090 <desc>
9091 Type (role) of this hard disk.
9092
9093 The following constraints apply when changing the value of this
9094 attribute:
9095 <ul>
9096 <li>If a hard disk is attached to a virtual machine (either in the
9097 current state or in one of the snapshots), its type cannot be
9098 changed.
9099 </li>
9100 <li>As long as the hard disk has children, its type cannot be set
9101 to <link to="HardDiskType_Writethrough"/>.
9102 </li>
9103 <li>The type of all differencing hard disks is
9104 <link to="HardDiskType_Normal"/> and cannot be changed.
9105 </li>
9106 </ul>
9107
9108 The type of a newly created or opened hard disk is set to
9109 <link to="HardDiskType_Normal"/>.
9110 </desc>
9111 </attribute>
9112
9113 <attribute name="parent" type="IHardDisk" readonly="yes">
9114 <desc>
9115 Parent of this hard disk (a hard disk this hard disk is directly based
9116 on).
9117
9118 Only differencing hard disks have parents. For base (non-differencing)
9119 hard disks, <tt>null</tt> is returned.
9120 </desc>
9121 </attribute>
9122
9123 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9124 <desc>
9125 Children of this hard disk (all differencing hard disks directly based
9126 on this hard disk). A <tt>null</tt> array is returned if this hard disk
9127 does not have any children.
9128 </desc>
9129 </attribute>
9130
9131 <attribute name="root" type="IHardDisk" readonly="yes">
9132 <desc>
9133 Root hard disk of this hard disk.
9134
9135 If this is a differencing hard disk, its root hard disk is the base hard
9136 disk the given hard disk branch starts from. For all other types of hard
9137 disks, this property returns the hard disk object itself (i.e. the same
9138 object this property is read on).
9139 </desc>
9140 </attribute>
9141
9142 <attribute name="readOnly" type="boolean" readonly="yes">
9143 <desc>
9144 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
9145 otherwise.
9146
9147 A hard disk is considered to be read-only when its contents cannot be
9148 modified without breaking the integrity of other parties that depend on
9149 this hard disk such as its child hard disks or snapshots of virtual
9150 machines where this hard disk is attached to these machines. If there
9151 are no children and no such snapshots then there is no dependency and
9152 the hard disk is not read-only.
9153
9154 The value of this attribute can be used to determine the kind of the
9155 attachment that will take place when attaching this hard disk to a
9156 virtual machine. If the value is <tt>false</tt> then the hard disk will
9157 be attached directly. If the value is <tt>true</tt> then the hard disk
9158 will be attached indirectly by creating a new differencing child hard
9159 disk for that. See the interface description for more information.
9160
9161 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9162 disks are always read-only while all
9163 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9164 always not.
9165
9166 <note>
9167 The read-only condition represented by this attribute is related to
9168 the hard disk type and usage, not to the current
9169 <link to="IMedium::state">media state</link> and not to the read-only
9170 state of the storage unit.
9171 </note>
9172 </desc>
9173 </attribute>
9174
9175 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9176 <desc>
9177 Logical size of this hard disk (in megabytes), as reported to the
9178 guest OS running inside the virtual machine this disk is
9179 attached to. The logical size is defined when the hard disk is created
9180 and cannot be changed later.
9181
9182 <note>
9183 Reading this property on a differencing hard disk will return the size
9184 of its <link to="#root"/> hard disk.
9185 </note>
9186 <note>
9187 For hard disks whose state is <link to="#state"/> is <link
9188 to="MediaState_Inaccessible"/>, the value of this property is the
9189 last known logical size. For <link to="MediaState_NotCreated"/> hard
9190 disks, the returned value is zero.
9191 </note>
9192 </desc>
9193 </attribute>
9194
9195 <attribute name="autoReset" type="boolean">
9196 <desc>
9197 Whether this differencing hard disk will be automatically reset each
9198 time a virtual machine it is attached to is powered up.
9199
9200 See <link to="#reset()"/> for more information about resetting
9201 differencing hard disks.
9202
9203 <note>
9204 Reading this property on a base (non-differencing) hard disk will
9205 always <tt>false</tt>. Changing the value of this property in this
9206 case is not supported.
9207 </note>
9208
9209 <result name="VBOX_E_NOT_SUPPORTED">
9210 This is not a differencing hard disk (when changing the attribute
9211 value).
9212 </result>
9213 </desc>
9214 </attribute>
9215
9216 <!-- storage methods -->
9217
9218 <method name="getProperty">
9219 <desc>
9220 Returns the value of the custom hard disk property with the given name.
9221
9222 The list of all properties supported by the given hard disk format can
9223 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9224
9225 Note that if this method returns a <tt>null</tt> @a value, the requested
9226 property is supported but currently not assigned any value.
9227
9228 <result name="VBOX_E_OBJECT_NOT_FOUND">
9229 Requested property does not exist (not supported by the format).
9230 </result>
9231 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9232 </desc>
9233 <param name="name" type="wstring" dir="in">
9234 <desc>Name of the property to get.</desc>
9235 </param>
9236 <param name="value" type="wstring" dir="return">
9237 <desc>Current property value.</desc>
9238 </param>
9239 </method>
9240
9241 <method name="setProperty">
9242 <desc>
9243 Sets the value of the custom hard disk property with the given name.
9244
9245 The list of all properties supported by the given hard disk format can
9246 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9247
9248 Note that setting the property value to <tt>null</tt> is equivalent to
9249 deleting the existing value. A default value (if it is defined for this
9250 property) will be used by the format backend in this case.
9251
9252 <result name="VBOX_E_OBJECT_NOT_FOUND">
9253 Requested property does not exist (not supported by the format).
9254 </result>
9255 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9256 </desc>
9257 <param name="name" type="wstring" dir="in">
9258 <desc>Name of the property to set.</desc>
9259 </param>
9260 <param name="value" type="wstring" dir="in">
9261 <desc>Property value to set.</desc>
9262 </param>
9263 </method>
9264
9265 <method name="getProperties">
9266 <desc>
9267 Returns values for a group of properties in one call.
9268
9269 The names of the properties to get are specified using the @a names
9270 argument which is a list of comma-separated property names or
9271 <tt>null</tt> if all properties are to be returned. Note that currently
9272 the value of this argument is ignored and the method always returns all
9273 existing properties.
9274
9275 The list of all properties supported by the given hard disk format can
9276 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9277
9278 The method returns two arrays, the array of property names corresponding
9279 to the @a names argument and the current values of these properties.
9280 Both arrays have the same number of elements with each elemend at the
9281 given index in the first array corresponds to an element at the same
9282 index in the second array.
9283
9284 Note that for properties that do not have assigned values,
9285 <tt>null</tt> is returned at the appropriate index in the
9286 @a returnValues array.
9287
9288 </desc>
9289 <param name="names" type="wstring" dir="in">
9290 <desc>
9291 Names of properties to get.
9292 </desc>
9293 </param>
9294 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9295 <desc>Names of returned properties.</desc>
9296 </param>
9297 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9298 <desc>Values of returned properties.</desc>
9299 </param>
9300 </method>
9301
9302 <method name="setProperties">
9303 <desc>
9304 Sets values for a group of properties in one call.
9305
9306 The names of the properties to set are passed in the @a names
9307 array along with the new values for them in the @a values array. Both
9308 arrays have the same number of elements with each elemend at the given
9309 index in the first array corresponding to an element at the same index
9310 in the second array.
9311
9312 If there is at least one property name in @a names that is not valid,
9313 the method will fail before changing the values of any other properties
9314 from the @a names array.
9315
9316 Using this method over <link to="#setProperty"/> is preferred if you
9317 need to set several properties at once since it will result into less
9318 IPC calls.
9319
9320 The list of all properties supported by the given hard disk format can
9321 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9322
9323 Note that setting the property value to <tt>null</tt> is equivalent to
9324 deleting the existing value. A default value (if it is defined for this
9325 property) will be used by the format backend in this case.
9326 </desc>
9327 <param name="names" type="wstring" safearray="yes" dir="in">
9328 <desc>Names of properties to set.</desc>
9329 </param>
9330 <param name="values" type="wstring" safearray="yes" dir="in">
9331 <desc>Values of properties to set.</desc>
9332 </param>
9333 </method>
9334
9335 <!-- storage methods -->
9336
9337 <method name="createBaseStorage">
9338 <desc>
9339 Starts creating a hard disk storage unit (fixed/dynamic, according
9340 to the variant flags) in in the background. The previous storage unit
9341 created for this object, if any, must first be deleted using
9342 <link to="#deleteStorage"/>, otherwise the operation will fail.
9343
9344 Before the operation starts, the hard disk is placed in
9345 <link to="MediaState_Creating"/> state. If the create operation
9346 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9347 state.
9348
9349 After the returned progress object reports that the operation has
9350 successfully completed, the media state will be set to <link
9351 to="MediaState_Created"/>, the hard disk will be remembered by this
9352 VirtualBox installation and may be attached to virtual machines.
9353
9354 <result name="VBOX_E_NOT_SUPPORTED">
9355 The variant of storage creation operation is not supported. See <link
9356 to="IHardDiskFormat::capabilities"/>.
9357 </result>
9358 </desc>
9359 <param name="logicalSize" type="unsigned long long" dir="in">
9360 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9361 </param>
9362 <param name="variant" type="HardDiskVariant" dir="in">
9363 <desc>Exact image variant which should be created.</desc>
9364 </param>
9365 <param name="progress" type="IProgress" dir="return">
9366 <desc>Progress object to track the operation completion.</desc>
9367 </param>
9368 </method>
9369
9370 <method name="deleteStorage">
9371 <desc>
9372 Starts deleting the storage unit of this hard disk.
9373
9374 The hard disk must not be attached to any known virtual machine and must
9375 not have any known child hard disks, otherwise the operation will fail.
9376 It will also fail if there is no storage unit to delete or if deletion
9377 is already in progress, or if the hard disk is being in use (locked for
9378 read or for write) or inaccessible. Therefore, the only valid state for
9379 this operation to succeed is <link to="MediaState_Created"/>.
9380
9381 Before the operation starts, the hard disk is placed to
9382 <link to="MediaState_Deleting"/> state and gets removed from the list
9383 of remembered hard disks (media registry). If the delete operation
9384 fails, the media will be remembered again and placed back to
9385 <link to="MediaState_Created"/> state.
9386
9387 After the returned progress object reports that the operation is
9388 complete, the media state will be set to
9389 <link to="MediaState_NotCreated"/> and you will be able to use one of
9390 the storage creation methods to create it again.
9391
9392 <see>#close()</see>
9393
9394 <result name="VBOX_E_OBJECT_IN_USE">
9395 Hard disk is attached to a virtual machine.
9396 </result>
9397 <result name="VBOX_E_NOT_SUPPORTED">
9398 Storage deletion is not allowed because neither of storage creation
9399 operations are supported. See
9400 <link to="IHardDiskFormat::capabilities"/>.
9401 </result>
9402
9403 <note>
9404 If the deletion operation fails, it is not guaranteed that the storage
9405 unit still exists. You may check the <link to="IMedium::state"/> value
9406 to answer this question.
9407 </note>
9408 </desc>
9409 <param name="progress" type="IProgress" dir="return">
9410 <desc>Progress object to track the operation completion.</desc>
9411 </param>
9412 </method>
9413
9414 <!-- diff methods -->
9415
9416 <method name="createDiffStorage">
9417 <desc>
9418 Starts creating an empty differencing storage unit based on this hard
9419 disk in the format and at the location defined by the @a target
9420 argument.
9421
9422 The target hard disk must be in <link to="MediaState_NotCreated"/>
9423 state (i.e. must not have an existing storage unit). Upon successful
9424 completion, this operation will set the type of the target hard disk to
9425 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9426 represent the differencing hard disk data in the given format (according
9427 to the storage format of the target object).
9428
9429 After the returned progress object reports that the operation is
9430 successfully complete, the target hard disk gets remembered by this
9431 VirtualBox installation and may be attached to virtual machines.
9432
9433 <note>
9434 The hard disk will be set to <link to="MediaState_LockedRead"/>
9435 state for the duration of this operation.
9436 </note>
9437 <result name="VBOX_E_OBJECT_IN_USE">
9438 Hard disk not in NotCreated state.
9439 </result>
9440 </desc>
9441 <param name="target" type="IHardDisk" dir="in">
9442 <desc>Target hard disk.</desc>
9443 </param>
9444 <param name="variant" type="HardDiskVariant" dir="in">
9445 <desc>Exact image variant which should be created.</desc>
9446 </param>
9447 <param name="progress" type="IProgress" dir="return">
9448 <desc>Progress object to track the operation completion.</desc>
9449 </param>
9450 </method>
9451
9452 <method name="mergeTo">
9453 <desc>
9454 Starts merging the contents of this hard disk and all intermediate
9455 differencing hard disks in the chain to the given target hard disk.
9456
9457 The target hard disk must be either a descendant of this hard disk or
9458 its ancestor (otherwise this method will immediately return a failure).
9459 It follows that there are two logical directions of the merge operation:
9460 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9461 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9462 chain:
9463
9464 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9465
9466 Here, calling this method on the <tt>Base</tt> hard disk object with
9467 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9468 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9469 merge. Note that in both cases the contents of the resulting hard disk
9470 will be the same, the only difference is the hard disk object that takes
9471 the result of the merge operation. In case of the forward merge in the
9472 above example, the result will be written to <tt>Diff_2</tt>; in case of
9473 the backward merge, the result will be written to <tt>Base</tt>. In
9474 other words, the result of the operation is always stored in the target
9475 hard disk.
9476
9477 Upon successful operation completion, the storage units of all hard
9478 disks in the chain between this (source) hard disk and the target hard
9479 disk, including the source hard disk itself, will be automatically
9480 deleted and the relevant hard disk objects (including this hard disk)
9481 will become uninitialized. This means that any attempt to call any of
9482 their methods or attributes will fail with the
9483 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9484 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9485 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9486 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9487 disk itself since it will no longer be based on any other hard disk.
9488
9489 Considering the above, all of the following conditions must be met in
9490 order for the merge operation to succeed:
9491 <ul>
9492 <li>
9493 Neither this (source) hard disk nor any intermediate
9494 differencing hard disk in the chain between it and the target
9495 hard disk is attached to any virtual machine.
9496 </li>
9497 <li>
9498 Neither the source hard disk nor the target hard disk is an
9499 <link to="HardDiskType_Immutable"/> hard disk.
9500 </li>
9501 <li>
9502 The part of the hard disk tree from the source hard disk to the
9503 target hard disk is a linear chain, i.e. all hard disks in this
9504 chain have exactly one child which is the next hard disk in this
9505 chain. The only exception from this rule is the target hard disk in
9506 the forward merge operation; it is allowed to have any number of
9507 child hard disks because the merge operation will hot change its
9508 logical contents (as it is seen by the guest OS or by children).
9509 </li>
9510 <li>
9511 None of the involved hard disks are in
9512 <link to="MediaState_LockedRead"/> or
9513 <link to="MediaState_LockedWrite"/> state.
9514 </li>
9515 </ul>
9516
9517 <note>
9518 This (source) hard disk and all intermediates will be placed to <link
9519 to="MediaState_Deleting"/> state and the target hard disk will be
9520 placed to <link to="MediaState_LockedWrite"/> state and for the
9521 duration of this operation.
9522 </note>
9523 </desc>
9524 <param name="targetId" type="uuid" dir="in">
9525 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9526 </param>
9527 <param name="progress" type="IProgress" dir="return">
9528 <desc>Progress object to track the operation completion.</desc>
9529 </param>
9530 </method>
9531
9532 <!-- clone methods -->
9533
9534 <method name="cloneTo">
9535 <desc>
9536 Starts creating a clone of this hard disk in the format and at the
9537 location defined by the @a target argument.
9538
9539 The target hard disk must be in <link to="MediaState_NotCreated"/>
9540 state (i.e. must not have an existing storage unit). Upon successful
9541 completion, the cloned hard disk will contain exactly the same sector
9542 data as the hard disk being cloned, except that a new UUID for the clone
9543 will be randomly generated.
9544
9545 After the returned progress object reports that the operation is
9546 successfully complete, the target hard disk gets remembered by this
9547 VirtualBox installation and may be attached to virtual machines.
9548
9549 <note>
9550 If the cloned hard disk is a differencing hard disk, it will inherit
9551 parent dependency of the original hard disk.
9552 </note>
9553 <note>
9554 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9555 state for the duration of this operation.
9556 </note>
9557 </desc>
9558 <param name="target" type="IHardDisk" dir="in">
9559 <desc>Target hard disk.</desc>
9560 </param>
9561 <param name="variant" type="HardDiskVariant" dir="in">
9562 <desc>Exact image variant which should be created.</desc>
9563 </param>
9564 <param name="progress" type="IProgress" dir="return">
9565 <desc>Progress object to track the operation completion.</desc>
9566 </param>
9567 </method>
9568
9569 <method name="flattenTo">
9570 <desc>
9571 Starts creating a deep (independent) clone of this hard disk in the
9572 format and at the location defined by the @a target argument.
9573
9574 This operation is similar to <link to="#cloneTo"/> except that when
9575 applied to a differencing hard disk, it will also copy missing hard disk
9576 data from all parent hard disks it is linked to. This will make the
9577 created clone an independent base hard disk that contains all hard disk
9578 data and does not need any other hard disks to operate.
9579
9580 After the returned progress object reports that the operation is
9581 successfully complete, the target hard disk gets remembered by this
9582 VirtualBox installation and may be attached to virtual machines.
9583
9584 <note>
9585 For base hard disks, this operation is identical to
9586 <link to="#cloneTo"/>.
9587 </note>
9588 <note>
9589 This hard disk and all its parent hard disks will be placed to <link
9590 to="MediaState_LockedRead"/> state for the duration of this
9591 operation.
9592 </note>
9593 </desc>
9594 <param name="target" type="IHardDisk" dir="in">
9595 <desc>Target hard disk.</desc>
9596 </param>
9597 <param name="variant" type="HardDiskVariant" dir="in">
9598 <desc>Exact image variant which should be created.</desc>
9599 </param>
9600 <param name="progress" type="IProgress" dir="return">
9601 <desc>Progress object to track the operation completion.</desc>
9602 </param>
9603 </method>
9604
9605 <!-- other methods -->
9606
9607 <method name="compact">
9608 <desc>
9609 Starts compacting of this hard disk. This means that the disk is
9610 transformed into a possibly more compact storage representation.
9611 This potentially creates temporary images, which can require a
9612 substantial amount of additional disk space.
9613
9614 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9615 state and all its parent hard disks (if any) will be placed to
9616 <link to="MediaState_LockedRead"/> state for the duration of this
9617 operation.
9618 </desc>
9619 <param name="progress" type="IProgress" dir="return">
9620 <desc>Progress object to track the operation completion.</desc>
9621 </param>
9622 </method>
9623
9624 <method name="reset">
9625 <desc>
9626 Starts erasing the contents of this differencing hard disk.
9627
9628 This operation will reset the differencing hard disk to its initial
9629 state when it does not contain any sector data and any read operation is
9630 redirected to its parent hard disk.
9631
9632 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9633 for the duration of this operation.
9634
9635 <result name="VBOX_E_NOT_SUPPORTED">
9636 This is not a differencing hard disk.
9637 </result>
9638 <result name="VBOX_E_INVALID_OBJECT_STATE">
9639 Hard disk is not in <link to="MediaState_Created"/> or
9640 <link to="MediaState_Inaccessible"/> state.
9641 </result>
9642 </desc>
9643 <param name="progress" type="IProgress" dir="return">
9644 <desc>Progress object to track the operation completion.</desc>
9645 </param>
9646 </method>
9647
9648 </interface>
9649
9650
9651 <!--
9652 // IHardDiskFormat
9653 /////////////////////////////////////////////////////////////////////////
9654 -->
9655
9656 <enum
9657 name="DataType"
9658 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9659 >
9660 <const name="Int32" value="0"/>
9661 <const name="Int8" value="1"/>
9662 <const name="String" value="2"/>
9663 </enum>
9664
9665 <enum
9666 name="DataFlags"
9667 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9668 >
9669 <const name="None" value="0x00"/>
9670 <const name="Mandatory" value="0x01"/>
9671 <const name="Expert" value="0x02"/>
9672 <const name="Array" value="0x04"/>
9673 <const name="FlagMask" value="0x07"/>
9674 </enum>
9675
9676 <enum
9677 name="HardDiskFormatCapabilities"
9678 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9679 >
9680 <desc>
9681 Hard disk format capability flags.
9682 </desc>
9683
9684 <const name="Uuid" value="0x01">
9685 <desc>
9686 Supports UUIDs as expected by VirtualBox code.
9687 </desc>
9688 </const>
9689
9690 <const name="CreateFixed" value="0x02">
9691 <desc>
9692 Supports creating fixed size images, allocating all space instantly.
9693 </desc>
9694 </const>
9695
9696 <const name="CreateDynamic" value="0x04">
9697 <desc>
9698 Supports creating dynamically growing images, allocating space on
9699 demand.
9700 </desc>
9701 </const>
9702
9703 <const name="CreateSplit2G" value="0x08">
9704 <desc>
9705 Supports creating images split in chunks of a bit less than 2 GBytes.
9706 </desc>
9707 </const>
9708
9709 <const name="Differencing" value="0x10">
9710 <desc>
9711 Supports being used as a format for differencing hard disks (see <link
9712 to="IHardDisk::createDiffStorage"/>).
9713 </desc>
9714 </const>
9715
9716 <const name="Asynchronous" value="0x20">
9717 <desc>
9718 Supports asynchronous I/O operations for at least some configurations.
9719 </desc>
9720 </const>
9721
9722 <const name="File" value="0x40">
9723 <desc>
9724 The format backend operates on files (the <link to="IMedium::location"/>
9725 attribute of the hard disk specifies a file used to store hard disk
9726 data; for a list of supported file extensions see
9727 <link to="IHardDiskFormat::fileExtensions"/>).
9728 </desc>
9729 </const>
9730
9731 <const name="Properties" value="0x80">
9732 <desc>
9733 The format backend uses the property interface to configure the storage
9734 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9735 method is used to get access to properties supported by the given hard
9736 disk format).
9737 </desc>
9738 </const>
9739
9740 <const name="CapabilityMask" value="0xFF"/>
9741 </enum>
9742
9743 <interface
9744 name="IHardDiskFormat" extends="$unknown"
9745 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9746 wsmap="managed"
9747 >
9748 <desc>
9749 The IHardDiskFormat interface represents a virtual hard disk format.
9750
9751 Each hard disk format has an associated backend which is used to handle
9752 hard disks stored in this format. This interface provides information
9753 about the properties of the associated backend.
9754
9755 Each hard disk format is identified by a string represented by the
9756 <link to="#id"/> attribute. This string is used in calls like
9757 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9758 format.
9759
9760 The list of all supported hard disk formats can be obtained using
9761 <link to="ISystemProperties::hardDiskFormats"/>.
9762
9763 <see>IHardDisk</see>
9764 </desc>
9765
9766 <attribute name="id" type="wstring" readonly="yes">
9767 <desc>
9768 Identifier of this format.
9769
9770 The format identifier is a non-null non-empty ASCII string. Note that
9771 this string is case-insensitive. This means that, for example, all of
9772 the following strings:
9773 <pre>
9774 "VDI"
9775 "vdi"
9776 "VdI"</pre>
9777 refer to the same hard disk format.
9778
9779 This string is used in methods of other interfaces where it is necessary
9780 to specify a hard disk format, such as
9781 <link to="IVirtualBox::createHardDisk"/>.
9782 </desc>
9783 </attribute>
9784
9785 <attribute name="name" type="wstring" readonly="yes">
9786 <desc>
9787 Human readable description of this format.
9788
9789 Mainly for use in file open dialogs.
9790 </desc>
9791 </attribute>
9792
9793 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9794 <desc>
9795 Array of strings containing the supported file extensions.
9796
9797 The first extension in the array is the extension preferred by the
9798 backend. It is recommended to use this extension when specifying a
9799 location of the storage unit for a new hard disk.
9800
9801 Note that some backends do not work on files, so this array may be
9802 empty.
9803
9804 <see>IHardDiskFormat::capabilities</see>
9805 </desc>
9806 </attribute>
9807
9808 <attribute name="capabilities" type="unsigned long" readonly="yes">
9809 <desc>
9810 Capabilities of the format as a set of bit flags.
9811
9812 For the meaning of individual capability flags see
9813 <link to="HardDiskFormatCapabilities"/>.
9814 </desc>
9815 </attribute>
9816
9817 <method name="describeProperties">
9818 <desc>
9819 Returns several arrays describing the properties supported by this
9820 format.
9821
9822 An element with the given index in each array describes one
9823 property. Thus, the number of elements in each returned array is the
9824 same and corresponds to the number of supported properties.
9825
9826 The returned arrays are filled in only if the
9827 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9828 All arguments must be non-NULL.
9829
9830 <see>DataType</see>
9831 <see>DataFlags</see>
9832 </desc>
9833
9834 <param name="names" type="wstring" safearray="yes" dir="out">
9835 <desc>Array of property names.</desc>
9836 </param>
9837 <param name="description" type="wstring" safearray="yes" dir="out">
9838 <desc>Array of property descriptions.</desc>
9839 </param>
9840 <param name="types" type="DataType" safearray="yes" dir="out">
9841 <desc>Array of property types.</desc>
9842 </param>
9843 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9844 <desc>Array of property flags.</desc>
9845 </param>
9846 <param name="defaults" type="wstring" safearray="yes" dir="out">
9847 <desc>Array of default property values.</desc>
9848 </param>
9849 </method>
9850
9851 </interface>
9852
9853
9854 <!--
9855 // IFloppyImage
9856 /////////////////////////////////////////////////////////////////////////
9857 -->
9858
9859 <interface
9860 name="IFloppyImage" extends="IMedium"
9861 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9862 wsmap="managed"
9863 >
9864 <desc>
9865 The IFloppyImage interface represents a medium containing the image
9866 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9867 </desc>
9868
9869 </interface>
9870
9871
9872 <!--
9873 // IDVDImage
9874 /////////////////////////////////////////////////////////////////////////
9875 -->
9876
9877 <interface
9878 name="IDVDImage" extends="IMedium"
9879 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9880 wsmap="managed"
9881 >
9882 <desc>
9883 The IDVDImage interface represents a medium containing the image
9884 of a CD or DVD disk in the ISO format.
9885
9886 This is a subclass of <link to="IMedium" />; see remarks there.
9887 </desc>
9888
9889 </interface>
9890
9891
9892 <!--
9893 // IDVDDrive
9894 /////////////////////////////////////////////////////////////////////////
9895 -->
9896
9897 <interface
9898 name="IDVDDrive" extends="$unknown"
9899 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9900 wsmap="managed"
9901 >
9902 <desc>
9903 The IDVDDrive interface represents the virtual CD/DVD drive of the
9904 virtual machine. An object of this type is returned by
9905 <link to="IMachine::DVDDrive"/>.
9906 </desc>
9907
9908 <attribute name="state" type="DriveState" readonly="yes">
9909 <desc>Current drive state.</desc>
9910 </attribute>
9911
9912 <attribute name="passthrough" type="boolean">
9913 <desc>
9914 When a host drive is mounted and passthrough is enabled
9915 the guest OS will be able to directly send SCSI commands to
9916 the host drive. This enables the guest OS to use CD/DVD writers
9917 but is potentially dangerous.
9918 </desc>
9919 </attribute>
9920
9921 <method name="mountImage">
9922 <desc>Mounts a CD/DVD image with the specified UUID.
9923
9924 <result name="VBOX_E_FILE_ERROR">
9925 Invalid image file location.
9926 </result>
9927 <result name="VBOX_E_OBJECT_NOT_FOUND">
9928 Could not find a CD/DVD image matching @a imageId.
9929 </result>
9930 <result name="VBOX_E_INVALID_OBJECT_STATE">
9931 Invalid media state.
9932 </result>
9933
9934 </desc>
9935 <param name="imageId" type="uuid" dir="in"/>
9936 </method>
9937
9938 <method name="captureHostDrive">
9939 <desc>Captures the specified host CD/DVD drive.</desc>
9940 <param name="drive" type="IHostDVDDrive" dir="in"/>
9941 </method>
9942
9943 <method name="unmount">
9944 <desc>Unmounts the currently mounted image or host drive.</desc>
9945 </method>
9946
9947 <method name="getImage">
9948 <desc>Returns the currently mounted CD/DVD image.</desc>
9949 <param name="image" type="IDVDImage" dir="return"/>
9950 </method>
9951
9952 <method name="getHostDrive">
9953 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9954 <param name="drive" type="IHostDVDDrive" dir="return"/>
9955 </method>
9956
9957 </interface>
9958
9959
9960 <!--
9961 // IFloppyDrive
9962 /////////////////////////////////////////////////////////////////////////
9963 -->
9964
9965 <interface
9966 name="IFloppyDrive" extends="$unknown"
9967 uuid="159412cd-bab8-452e-8097-218a020825a6"
9968 wsmap="managed"
9969 >
9970 <desc>
9971 The IFloppyDrive interface represents the virtual floppy drive of the
9972 virtual machine. An object of this type is returned by
9973 <link to="IMachine::floppyDrive" />.
9974 </desc>
9975
9976 <attribute name="enabled" type="boolean">
9977 <desc>
9978 Flag whether the floppy drive is enabled. If it is disabled,
9979 the floppy drive will not be reported to the guest OS.
9980 </desc>
9981 </attribute>
9982
9983 <attribute name="state" type="DriveState" readonly="yes">
9984 <desc>Current drive state.</desc>
9985 </attribute>
9986
9987 <method name="mountImage">
9988 <desc>Mounts a floppy image with the specified UUID.
9989
9990 <result name="VBOX_E_FILE_ERROR">
9991 Invalid image file location.
9992 </result>
9993 <result name="VBOX_E_OBJECT_NOT_FOUND">
9994 Could not find a floppy image matching @a imageID.
9995 </result>
9996 <result name="VBOX_E_INVALID_OBJECT_STATE">
9997 Invalid media state.
9998 </result>
9999
10000 </desc>
10001 <param name="imageId" type="uuid" dir="in"/>
10002 </method>
10003
10004 <method name="captureHostDrive">
10005 <desc>Captures the specified host floppy drive.</desc>
10006 <param name="drive" type="IHostFloppyDrive" dir="in"/>
10007 </method>
10008
10009 <method name="unmount">
10010 <desc>Unmounts the currently mounted image or host drive.</desc>
10011 </method>
10012
10013 <method name="getImage">
10014 <desc>Returns the currently mounted floppy image.</desc>
10015 <param name="image" type="IFloppyImage" dir="return"/>
10016 </method>
10017
10018 <method name="getHostDrive">
10019 <desc>Returns the currently mounted host floppy drive.</desc>
10020 <param name="drive" type="IHostFloppyDrive" dir="return"/>
10021 </method>
10022
10023 </interface>
10024
10025
10026 <!--
10027 // IKeyboard
10028 /////////////////////////////////////////////////////////////////////////
10029 -->
10030
10031 <interface
10032 name="IKeyboard" extends="$unknown"
10033 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10034 wsmap="managed"
10035 >
10036 <desc>
10037 The IKeyboard interface represents the virtual machine's keyboard. Used
10038 in <link to="IConsole::keyboard"/>.
10039
10040 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10041 to the virtual machine.
10042
10043 </desc>
10044 <method name="putScancode">
10045 <desc>Sends a scancode to the keyboard.
10046
10047 <result name="VBOX_E_IPRT_ERROR">
10048 Could not send scan code to virtual keyboard.
10049 </result>
10050
10051 </desc>
10052 <param name="scancode" type="long" dir="in"/>
10053 </method>
10054
10055 <method name="putScancodes">
10056 <desc>Sends an array of scancodes to the keyboard.
10057
10058 <result name="VBOX_E_IPRT_ERROR">
10059 Could not send all scan codes to virtual keyboard.
10060 </result>
10061
10062 </desc>
10063 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10064 <param name="codesStored" type="unsigned long" dir="return"/>
10065 </method>
10066
10067 <method name="putCAD">
10068 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10069 function is nothing special, it is just a convenience function
10070 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10071
10072 <result name="VBOX_E_IPRT_ERROR">
10073 Could not send all scan codes to virtual keyboard.
10074 </result>
10075
10076 </desc>
10077 </method>
10078
10079 </interface>
10080
10081
10082 <!--
10083 // IMouse
10084 /////////////////////////////////////////////////////////////////////////
10085 -->
10086
10087 <enum
10088 name="MouseButtonState"
10089 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
10090 >
10091 <desc>
10092 Mouse button state.
10093 </desc>
10094
10095 <const name="LeftButton" value="0x01"/>
10096 <const name="RightButton" value="0x02"/>
10097 <const name="MiddleButton" value="0x04"/>
10098 <const name="WheelUp" value="0x08"/>
10099 <const name="WheelDown" value="0x10"/>
10100 <const name="MouseStateMask" value="0x1F"/>
10101 </enum>
10102
10103 <interface
10104 name="IMouse" extends="$unknown"
10105 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
10106 wsmap="managed"
10107 >
10108 <desc>
10109 The IMouse interface represents the virtual machine's mouse. Used in
10110 <link to="IConsole::mouse"/>.
10111
10112 Through this interface, the virtual machine's virtual mouse can be
10113 controlled.
10114 </desc>
10115
10116 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10117 <desc>
10118 Whether the guest OS supports absolute mouse pointer positioning
10119 or not.
10120 <note>
10121 VirtualBox Guest Tools need to be installed to the guest OS
10122 in order to enable absolute mouse positioning support.
10123 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10124 callback to be instantly informed about changes of this attribute
10125 during virtual machine execution.
10126 </note>
10127 <see><link to="#putMouseEventAbsolute"/></see>
10128 </desc>
10129 </attribute>
10130
10131 <method name="putMouseEvent">
10132 <desc>
10133 Initiates a mouse event using relative pointer movements
10134 along x and y axis.
10135
10136 <result name="E_ACCESSDENIED">
10137 Console not powered up.
10138 </result>
10139 <result name="VBOX_E_IPRT_ERROR">
10140 Could not send mouse event to virtual mouse.
10141 </result>
10142
10143 </desc>
10144
10145 <param name="dx" type="long" dir="in">
10146 <desc>
10147 Amount of pixels the mouse should move to the right.
10148 Negative values move the mouse to the left.
10149 </desc>
10150 </param>
10151 <param name="dy" type="long" dir="in">
10152 <desc>
10153 Amount of pixels the mouse should move downwards.
10154 Negative values move the mouse upwards.
10155 </desc>
10156 </param>
10157 <param name="dz" type="long" dir="in">
10158 <desc>
10159 Amount of mouse wheel moves.
10160 Positive values describe clockwise wheel rotations,
10161 negative values describe counterclockwise rotations.
10162 </desc>
10163 </param>
10164 <param name="buttonState" type="long" dir="in">
10165 <desc>
10166 The current state of mouse buttons. Every bit represents
10167 a mouse button as follows:
10168 <table>
10169 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10170 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10171 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10172 </table>
10173 A value of <tt>1</tt> means the corresponding button is pressed.
10174 otherwise it is released.
10175 </desc>
10176 </param>
10177 </method>
10178
10179 <method name="putMouseEventAbsolute">
10180 <desc>
10181 Positions the mouse pointer using absolute x and y coordinates.
10182 These coordinates are expressed in pixels and
10183 start from <tt>[1,1]</tt> which corresponds to the top left
10184 corner of the virtual display.
10185
10186 <result name="E_ACCESSDENIED">
10187 Console not powered up.
10188 </result>
10189 <result name="VBOX_E_IPRT_ERROR">
10190 Could not send mouse event to virtual mouse.
10191 </result>
10192
10193 <note>
10194 This method will have effect only if absolute mouse
10195 positioning is supported by the guest OS.
10196 </note>
10197
10198 <see><link to="#absoluteSupported"/></see>
10199 </desc>
10200
10201 <param name="x" type="long" dir="in">
10202 <desc>
10203 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
10204 </desc>
10205 </param>
10206 <param name="y" type="long" dir="in">
10207 <desc>
10208 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
10209 </desc>
10210 </param>
10211 <param name="dz" type="long" dir="in">
10212 <desc>
10213 Amount of mouse wheel moves.
10214 Positive values describe clockwise wheel rotations,
10215 negative values describe counterclockwise rotations.
10216 </desc>
10217 </param>
10218 <param name="buttonState" type="long" dir="in">
10219 <desc>
10220 The current state of mouse buttons. Every bit represents
10221 a mouse button as follows:
10222 <table>
10223 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10224 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10225 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10226 </table>
10227 A value of <tt>1</tt> means the corresponding button is pressed.
10228 otherwise it is released.
10229 </desc>
10230 </param>
10231 </method>
10232
10233 </interface>
10234
10235 <!--
10236 // IDisplay
10237 /////////////////////////////////////////////////////////////////////////
10238 -->
10239
10240 <enum
10241 name="FramebufferAccelerationOperation"
10242 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
10243 >
10244 <desc>
10245 Frame buffer acceleration operation.
10246 </desc>
10247
10248 <const name="SolidFillAcceleration" value="1"/>
10249 <const name="ScreenCopyAcceleration" value="2"/>
10250 </enum>
10251
10252 <enum
10253 name="FramebufferPixelFormat"
10254 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10255 >
10256 <desc>
10257 Format of the video memory buffer. Constants represented by this enum can
10258 be used to test for particular values of <link
10259 to="IFramebuffer::pixelFormat"/>. See also <link
10260 to="IFramebuffer::requestResize"/>.
10261
10262 See also www.fourcc.org for more information about FOURCC pixel formats.
10263 </desc>
10264
10265 <const name="Opaque" value="0">
10266 <desc>
10267 Unknown buffer format (the user may not assume any particular format of
10268 the buffer).
10269 </desc>
10270 </const>
10271 <const name="FOURCC_RGB" value="0x32424752">
10272 <desc>
10273 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10274 bit layout).
10275 </desc>
10276 </const>
10277 </enum>
10278
10279 <interface
10280 name="IFramebuffer" extends="$unknown"
10281 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
10282 wsmap="suppress"
10283 >
10284 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10285 <desc>Address of the start byte of the frame buffer.</desc>
10286 </attribute>
10287
10288 <attribute name="width" type="unsigned long" readonly="yes">
10289 <desc>Frame buffer width, in pixels.</desc>
10290 </attribute>
10291
10292 <attribute name="height" type="unsigned long" readonly="yes">
10293 <desc>Frame buffer height, in pixels.</desc>
10294 </attribute>
10295
10296 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10297 <desc>
10298 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10299 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10300 are: 8, 15, 16, 24 and 32.
10301 </desc>
10302 </attribute>
10303
10304 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10305 <desc>
10306 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10307 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10308 size of the scan line must be aligned to 32 bits.
10309 </desc>
10310 </attribute>
10311
10312 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10313 <desc>
10314 Frame buffer pixel format. It's either one of the values defined by <link
10315 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10316 <note>
10317 This attribute must never return <link
10318 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10319 <link to="#address"/> points to must be always known.
10320 </note>
10321 </desc>
10322 </attribute>
10323
10324 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10325 <desc>
10326 Defines whether this frame buffer uses the virtual video card's memory
10327 buffer (guest VRAM) directly or not. See <link
10328 to="IFramebuffer::requestResize"/> for more information.
10329 </desc>
10330 </attribute>
10331
10332 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10333 <desc>
10334 Hint from the frame buffer about how much of the standard
10335 screen height it wants to use for itself. This information is
10336 exposed to the guest through the VESA BIOS and VMMDev interface
10337 so that it can use it for determining its video mode table. It
10338 is not guaranteed that the guest respects the value.
10339 </desc>
10340 </attribute>
10341
10342 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10343 <desc>
10344 An alpha-blended overlay which is superposed over the frame buffer.
10345 The initial purpose is to allow the display of icons providing
10346 information about the VM state, including disk activity, in front
10347 ends which do not have other means of doing that. The overlay is
10348 designed to controlled exclusively by IDisplay. It has no locking
10349 of its own, and any changes made to it are not guaranteed to be
10350 visible until the affected portion of IFramebuffer is updated. The
10351 overlay can be created lazily the first time it is requested. This
10352 attribute can also return NULL to signal that the overlay is not
10353 implemented.
10354 </desc>
10355 </attribute>
10356
10357 <attribute name="winId" type="unsigned long long" readonly="yes">
10358 <desc>
10359 Platform-dependent identifier of the window where context of this
10360 frame buffer is drawn, or zero if there's no such window.
10361 </desc>
10362 </attribute>
10363
10364 <method name="lock">
10365 <desc>
10366 Locks the frame buffer.
10367 Gets called by the IDisplay object where this frame buffer is
10368 bound to.
10369 </desc>
10370 </method>
10371
10372 <method name="unlock">
10373 <desc>
10374 Unlocks the frame buffer.
10375 Gets called by the IDisplay object where this frame buffer is
10376 bound to.
10377 </desc>
10378 </method>
10379
10380 <method name="notifyUpdate">
10381 <desc>
10382 Informs about an update.
10383 Gets called by the display object where this buffer is
10384 registered.
10385 </desc>
10386 <param name="x" type="unsigned long" dir="in"/>
10387 <param name="y" type="unsigned long" dir="in"/>
10388 <param name="width" type="unsigned long" dir="in"/>
10389 <param name="height" type="unsigned long" dir="in"/>
10390 <param name="finished" type="boolean" dir="return"/>
10391 </method>
10392
10393 <method name="requestResize">
10394 <desc>
10395 Requests a size and pixel format change.
10396
10397 There are two modes of working with the video buffer of the virtual
10398 machine. The <i>indirect</i> mode implies that the IFramebuffer
10399 implementation allocates a memory buffer for the requested display mode
10400 and provides it to the virtual machine. In <i>direct</i> mode, the
10401 IFramebuffer implementation uses the memory buffer allocated and owned
10402 by the virtual machine. This buffer represents the video memory of the
10403 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10404 usually faster because the implementation gets a raw pointer to the
10405 guest VRAM buffer which it can directly use for visualizing the contents
10406 of the virtual display, as opposed to the indirect mode where the
10407 contents of guest VRAM are copied to the memory buffer provided by
10408 the implementation every time a display update occurs.
10409
10410 It is important to note that the direct mode is really fast only when
10411 the implementation uses the given guest VRAM buffer directly, for
10412 example, by blitting it to the window representing the virtual machine's
10413 display, which saves at least one copy operation comparing to the
10414 indirect mode. However, using the guest VRAM buffer directly is not
10415 always possible: the format and the color depth of this buffer may be
10416 not supported by the target window, or it may be unknown (opaque) as in
10417 case of text or non-linear multi-plane VGA video modes. In this case,
10418 the indirect mode (that is always available) should be used as a
10419 fallback: when the guest VRAM contents are copied to the
10420 implementation-provided memory buffer, color and format conversion is
10421 done automatically by the underlying code.
10422
10423 The @a pixelFormat parameter defines whether the direct mode is
10424 available or not. If @a pixelFormat is <link
10425 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10426 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10427 @a bytesPerLine parameters must be ignored and the implementation must use
10428 the indirect mode (where it provides its own buffer in one of the
10429 supported formats). In all other cases, @a pixelFormat together with
10430 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10431 buffer pointed to by the @a VRAM parameter and the implementation is
10432 free to choose which mode to use. To indicate that this frame buffer uses
10433 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10434 attribute must return <tt>true</tt> and <link to="#address"/> must
10435 return exactly the same address that is passed in the @a VRAM parameter
10436 of this method; otherwise it is assumed that the indirect strategy is
10437 chosen.
10438
10439 The @a width and @a height parameters represent the size of the
10440 requested display mode in both modes. In case of indirect mode, the
10441 provided memory buffer should be big enough to store data of the given
10442 display mode. In case of direct mode, it is guaranteed that the given
10443 @a VRAM buffer contains enough space to represent the display mode of the
10444 given size. Note that this frame buffer's <link to="#width"/> and <link
10445 to="#height"/> attributes must return exactly the same values as
10446 passed to this method after the resize is completed (see below).
10447
10448 The @a finished output parameter determines if the implementation has
10449 finished resizing the frame buffer or not. If, for some reason, the
10450 resize cannot be finished immediately during this call, @a finished
10451 must be set to @c false, and the implementation must call
10452 <link to="IDisplay::resizeCompleted"/> after it has returned from
10453 this method as soon as possible. If @a finished is @c false, the
10454 machine will not call any frame buffer methods until
10455 <link to="IDisplay::resizeCompleted"/> is called.
10456
10457 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10458 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10459 this frame buffer must return exactly the same values as specified in the
10460 parameters of this method, after the resize is completed. If the
10461 indirect mode is chosen, these attributes must return values describing
10462 the format of the implementation's own memory buffer <link
10463 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10464 value must always correlate with <link to="#pixelFormat"/>. Note that
10465 the <link to="#pixelFormat"/> attribute must never return <link
10466 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10467
10468 <note>
10469 This method is called by the IDisplay object under the
10470 <link to="#lock"/> provided by this IFramebuffer
10471 implementation. If this method returns @c false in @a finished, then
10472 this lock is not released until
10473 <link to="IDisplay::resizeCompleted"/> is called.
10474 </note>
10475 </desc>
10476 <param name="screenId" type="unsigned long" dir="in">
10477 <desc>
10478 Logical screen number. Must be used in the corresponding call to
10479 <link to="IDisplay::resizeCompleted"/> if this call is made.
10480 </desc>
10481 </param>
10482 <param name="pixelFormat" type="unsigned long" dir="in">
10483 <desc>
10484 Pixel format of the memory buffer pointed to by @a VRAM.
10485 See also <link to="FramebufferPixelFormat"/>.
10486 </desc>
10487 </param>
10488 <param name="VRAM" type="octet" mod="ptr" dir="in">
10489 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10490 </param>
10491 <param name="bitsPerPixel" type="unsigned long" dir="in">
10492 <desc>Color depth, bits per pixel.</desc>
10493 </param>
10494 <param name="bytesPerLine" type="unsigned long" dir="in">
10495 <desc>Size of one scan line, in bytes.</desc>
10496 </param>
10497 <param name="width" type="unsigned long" dir="in">
10498 <desc>Width of the guest display, in pixels.</desc>
10499 </param>
10500 <param name="height" type="unsigned long" dir="in">
10501 <desc>Height of the guest display, in pixels.</desc>
10502 </param>
10503 <param name="finished" type="boolean" dir="return">
10504 <desc>
10505 Can the VM start using the new frame buffer immediately
10506 after this method returns or it should wait for
10507 <link to="IDisplay::resizeCompleted"/>.
10508 </desc>
10509 </param>
10510 </method>
10511
10512 <method name="operationSupported">
10513 <desc>
10514 Returns whether the given acceleration operation is supported
10515 by the IFramebuffer implementation. If not, the display object
10516 will not attempt to call the corresponding IFramebuffer entry
10517 point. Even if an operation is indicated as supported, the
10518 IFramebuffer implementation always has the option to return non
10519 supported from the corresponding acceleration method in which
10520 case the operation will be performed by the display engine. This
10521 allows for reduced IFramebuffer implementation complexity where
10522 only common cases are handled.
10523 </desc>
10524 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10525 <param name="supported" type="boolean" dir="return"/>
10526 </method>
10527
10528 <method name="videoModeSupported">
10529 <desc>
10530 Returns whether the frame buffer implementation is willing to
10531 support a given video mode. In case it is not able to render
10532 the video mode (or for some reason not willing), it should
10533 return false. Usually this method is called when the guest
10534 asks the VMM device whether a given video mode is supported
10535 so the information returned is directly exposed to the guest.
10536 It is important that this method returns very quickly.
10537 </desc>
10538 <param name="width" type="unsigned long" dir="in"/>
10539 <param name="height" type="unsigned long" dir="in"/>
10540 <param name="bpp" type="unsigned long" dir="in"/>
10541 <param name="supported" type="boolean" dir="return"/>
10542 </method>
10543
10544 <method name="solidFill">
10545 <desc>
10546 Fills the specified rectangle on screen with a solid color.
10547 </desc>
10548 <param name="x" type="unsigned long" dir="in"/>
10549 <param name="y" type="unsigned long" dir="in"/>
10550 <param name="width" type="unsigned long" dir="in"/>
10551 <param name="height" type="unsigned long" dir="in"/>
10552 <param name="color" type="unsigned long" dir="in"/>
10553 <param name="handled" type="boolean" dir="return"/>
10554 </method>
10555
10556 <method name="copyScreenBits">
10557 <desc>
10558 Copies specified rectangle on the screen.
10559 </desc>
10560 <param name="xDst" type="unsigned long" dir="in"/>
10561 <param name="yDst" type="unsigned long" dir="in"/>
10562 <param name="xSrc" type="unsigned long" dir="in"/>
10563 <param name="ySrc" type="unsigned long" dir="in"/>
10564 <param name="width" type="unsigned long" dir="in"/>
10565 <param name="height" type="unsigned long" dir="in"/>
10566 <param name="handled" type="boolean" dir="return"/>
10567 </method>
10568
10569 <method name="getVisibleRegion">
10570 <desc>
10571 Returns the visible region of this frame buffer.
10572
10573 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10574 @a count parameter is ignored and the number of elements necessary to
10575 describe the current visible region is returned in @a countCopied.
10576
10577 If @a rectangles is not <tt>NULL</tt> but @a count is less
10578 than the required number of elements to store region data, the method
10579 will report a failure. If @a count is equal or greater than the
10580 required number of elements, then the actual number of elements copied
10581 to the provided array will be returned in @a countCopied.
10582
10583 <note>
10584 The address of the provided array must be in the process space of
10585 this IFramebuffer object.
10586 </note>
10587 <note>
10588 Method not yet implemented.
10589 </note>
10590 </desc>
10591 <param name="rectangles" type="octet" mod="ptr" dir="in">
10592 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10593 </param>
10594 <param name="count" type="unsigned long" dir="in">
10595 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10596 </param>
10597 <param name="countCopied" type="unsigned long" dir="return">
10598 <desc>Number of elements copied to the @a rectangles array.</desc>
10599 </param>
10600 </method>
10601
10602 <method name="setVisibleRegion">
10603 <desc>
10604 Suggests a new visible region to this frame buffer. This region
10605 represents the area of the VM display which is a union of regions of
10606 all top-level windows of the guest operating system running inside the
10607 VM (if the Guest Additions for this system support this
10608 functionality). This information may be used by the frontends to
10609 implement the seamless desktop integration feature.
10610
10611 <note>
10612 The address of the provided array must be in the process space of
10613 this IFramebuffer object.
10614 </note>
10615 <note>
10616 The IFramebuffer implementation must make a copy of the provided
10617 array of rectangles.
10618 </note>
10619 <note>
10620 Method not yet implemented.
10621 </note>
10622 </desc>
10623 <param name="rectangles" type="octet" mod="ptr" dir="in">
10624 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10625 </param>
10626 <param name="count" type="unsigned long" dir="in">
10627 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10628 </param>
10629 </method>
10630
10631 </interface>
10632
10633 <interface
10634 name="IFramebufferOverlay" extends="IFramebuffer"
10635 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10636 wsmap="suppress"
10637 >
10638 <desc>
10639 The IFramebufferOverlay interface represents an alpha blended overlay
10640 for displaying status icons above an IFramebuffer. It is always created
10641 not visible, so that it must be explicitly shown. It only covers a
10642 portion of the IFramebuffer, determined by its width, height and
10643 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10644 that order) format, and may be written to directly. Do re-read the
10645 width though, after setting it, as it may be adjusted (increased) to
10646 make it more suitable for the front end.
10647 </desc>
10648 <attribute name="x" type="unsigned long" readonly="yes">
10649 <desc>X position of the overlay, relative to the frame buffer.</desc>
10650 </attribute>
10651
10652 <attribute name="y" type="unsigned long" readonly="yes">
10653 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10654 </attribute>
10655
10656 <attribute name="visible" type="boolean" readonly="no">
10657 <desc>
10658 Whether the overlay is currently visible.
10659 </desc>
10660 </attribute>
10661
10662 <attribute name="alpha" type="unsigned long" readonly="no">
10663 <desc>
10664 The global alpha value for the overlay. This may or may not be
10665 supported by a given front end.
10666 </desc>
10667 </attribute>
10668
10669 <method name="move">
10670 <desc>
10671 Changes the overlay's position relative to the IFramebuffer.
10672 </desc>
10673 <param name="x" type="unsigned long" dir="in"/>
10674 <param name="y" type="unsigned long" dir="in"/>
10675 </method>
10676
10677 </interface>
10678
10679 <interface
10680 name="IDisplay" extends="$unknown"
10681 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10682 wsmap="suppress"
10683 >
10684 <desc>
10685 The IDisplay interface represents the virtual machine's display.
10686
10687 The object implementing this interface is contained in each
10688 <link to="IConsole::display"/> attribute and represents the visual
10689 output of the virtual machine.
10690
10691 The virtual display supports pluggable output targets represented by the
10692 IFramebuffer interface. Examples of the output target are a window on
10693 the host computer or an RDP session's display on a remote computer.
10694 </desc>
10695 <attribute name="width" type="unsigned long" readonly="yes">
10696 <desc>Current display width.</desc>
10697 </attribute>
10698
10699 <attribute name="height" type="unsigned long" readonly="yes">
10700 <desc>Current display height.</desc>
10701 </attribute>
10702
10703 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10704 <desc>
10705 Current guest display color depth. Note that this may differ
10706 from <link to="IFramebuffer::bitsPerPixel"/>.
10707 </desc>
10708 </attribute>
10709
10710 <method name="setupInternalFramebuffer">
10711 <desc>
10712 Prepares an internally managed frame buffer.
10713 </desc>
10714 <param name="depth" type="unsigned long" dir="in"/>
10715 </method>
10716
10717 <method name="lockFramebuffer">
10718 <desc>
10719 Requests access to the internal frame buffer.
10720
10721 <result name="VBOX_E_NOT_SUPPORTED">
10722 Attempt to lock a non-internal frame buffer.
10723 </result>
10724
10725 </desc>
10726 <param name="address" type="octet" mod="ptr" dir="return"/>
10727 </method>
10728
10729 <method name="unlockFramebuffer">
10730 <desc>
10731 Releases access to the internal frame buffer.
10732
10733 <result name="VBOX_E_NOT_SUPPORTED">
10734 Attempt to unlock a non-internal frame buffer.
10735 </result>
10736
10737 </desc>
10738 </method>
10739
10740 <method name="registerExternalFramebuffer">
10741 <desc>
10742 Registers an external frame buffer.
10743 </desc>
10744 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10745 </method>
10746
10747 <method name="setFramebuffer">
10748 <desc>
10749 Sets the framebuffer for given screen.
10750 </desc>
10751 <param name="screenId" type="unsigned long" dir="in"/>
10752 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10753 </method>
10754
10755 <method name="getFramebuffer">
10756 <desc>
10757 Queries the framebuffer for given screen.
10758 </desc>
10759 <param name="screenId" type="unsigned long" dir="in"/>
10760 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10761 <param name="xOrigin" type="long" dir="out"/>
10762 <param name="yOrigin" type="long" dir="out"/>
10763 </method>
10764
10765 <method name="setVideoModeHint">
10766 <desc>
10767 Asks VirtualBox to request the given video mode from
10768 the guest. This is just a hint and it cannot be guaranteed
10769 that the requested resolution will be used. Guest Additions
10770 are required for the request to be seen by guests. The caller
10771 should issue the request and wait for a resolution change and
10772 after a timeout retry.
10773
10774 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10775 parameters means that the corresponding values should be taken from the
10776 current video mode (i.e. left unchanged).
10777
10778 If the guest OS supports multi-monitor configuration then the @a display
10779 parameter specifies the number of the guest display to send the hint to:
10780 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10781 so on. If the multi-monitor configuration is not supported, @a display
10782 must be <tt>0</tt>.
10783
10784 <result name="E_INVALIDARG">
10785 The @a display is not associated with any monitor.
10786 </result>
10787
10788 </desc>
10789 <param name="width" type="unsigned long" dir="in"/>
10790 <param name="height" type="unsigned long" dir="in"/>
10791 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10792 <param name="display" type="unsigned long" dir="in"/>
10793 </method>
10794
10795 <method name="setSeamlessMode">
10796 <desc>
10797 Enables or disables seamless guest display rendering (seamless desktop
10798 integration) mode.
10799 <note>
10800 Calling this method has no effect if <link
10801 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10802 </note>
10803 </desc>
10804 <param name="enabled" type="boolean" dir="in"/>
10805 </method>
10806
10807 <method name="takeScreenShot">
10808 <desc>
10809 Takes a screen shot of the requested size and copies it to the
10810 32-bpp buffer allocated by the caller.
10811
10812 <result name="E_NOTIMPL">
10813 Feature not implemented.
10814 </result>
10815 <result name="VBOX_E_IPRT_ERROR">
10816 Could not take a screenshot.
10817 </result>
10818
10819 </desc>
10820 <param name="address" type="octet" mod="ptr" dir="in"/>
10821 <param name="width" type="unsigned long" dir="in"/>
10822 <param name="height" type="unsigned long" dir="in"/>
10823 </method>
10824
10825 <method name="drawToScreen">
10826 <desc>
10827 Draws a 32-bpp image of the specified size from the given buffer
10828 to the given point on the VM display.
10829
10830 <result name="E_NOTIMPL">
10831 Feature not implemented.
10832 </result>
10833 <result name="VBOX_E_IPRT_ERROR">
10834 Could not draw to screen.
10835 </result>
10836
10837 </desc>
10838 <param name="address" type="octet" mod="ptr" dir="in"/>
10839 <param name="x" type="unsigned long" dir="in"/>
10840 <param name="y" type="unsigned long" dir="in"/>
10841 <param name="width" type="unsigned long" dir="in"/>
10842 <param name="height" type="unsigned long" dir="in"/>
10843 </method>
10844
10845 <method name="invalidateAndUpdate">
10846 <desc>
10847 Does a full invalidation of the VM display and instructs the VM
10848 to update it.
10849
10850 <result name="VBOX_E_IPRT_ERROR">
10851 Could not invalidate and update screen.
10852 </result>
10853
10854 </desc>
10855 </method>
10856
10857 <method name="resizeCompleted">
10858 <desc>
10859 Signals that a framebuffer has completed the resize operation.
10860
10861 <result name="VBOX_E_NOT_SUPPORTED">
10862 Operation only valid for external frame buffers.
10863 </result>
10864
10865 </desc>
10866 <param name="screenId" type="unsigned long" dir="in"/>
10867 </method>
10868
10869 <method name="updateCompleted">
10870 <desc>
10871 Signals that a framebuffer has completed the update operation.
10872
10873 <result name="VBOX_E_NOT_SUPPORTED">
10874 Operation only valid for external frame buffers.
10875 </result>
10876
10877 </desc>
10878 </method>
10879
10880 </interface>
10881
10882 <!--
10883 // INetworkAdapter
10884 /////////////////////////////////////////////////////////////////////////
10885 -->
10886
10887 <enum
10888 name="NetworkAttachmentType"
10889 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10890 >
10891 <desc>
10892 Network attachment type.
10893 </desc>
10894
10895 <const name="Null" value="0">
10896 <desc>Null value, also means "not attached".</desc>
10897 </const>
10898 <const name="NAT" value="1"/>
10899 <const name="Bridged" value="2"/>
10900 <const name="Internal" value="3"/>
10901 <const name="HostOnly" value="4"/>
10902 </enum>
10903
10904 <enum
10905 name="NetworkAdapterType"
10906 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10907 >
10908 <desc>
10909 Network adapter type.
10910 </desc>
10911
10912 <const name="Null" value="0">
10913 <desc>Null value (never used by the API).</desc>
10914 </const>
10915 <const name="Am79C970A" value="1"/>
10916 <const name="Am79C973" value="2"/>
10917 <const name="I82540EM" value="3"/>
10918 <const name="I82543GC" value="4"/>
10919 </enum>
10920
10921 <interface
10922 name="INetworkAdapter" extends="$unknown"
10923 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10924 wsmap="managed"
10925 >
10926 <desc>
10927 Represents a virtual network adapter that is attached to a virtual machine.
10928 Each virtual machine has a fixed number of network adapter slots with one
10929 instance of this attached to each of them. Call
10930 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10931 is attached to a given slot in a given machine.
10932
10933 Each network adapter can be in one of five attachment modes, which are
10934 represented by the <link to="NetworkAttachmentType" /> enumeration;
10935 see the <link to="#attachmentType" /> attribute.
10936 </desc>
10937
10938 <attribute name="adapterType" type="NetworkAdapterType">
10939 <desc>
10940 Type of the virtual network adapter. Depending on this value,
10941 VirtualBox will provide a different virtual network hardware
10942 to the guest.
10943 </desc>
10944 </attribute>
10945
10946 <attribute name="slot" type="unsigned long" readonly="yes">
10947 <desc>
10948 Slot number this adapter is plugged into. Corresponds to
10949 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10950 to obtain this instance.
10951 </desc>
10952 </attribute>
10953
10954 <attribute name="enabled" type="boolean">
10955 <desc>
10956 Flag whether the network adapter is present in the
10957 guest system. If disabled, the virtual guest hardware will
10958 not contain this network adapter. Can only be changed when
10959 the VM is not running.
10960 </desc>
10961 </attribute>
10962
10963 <attribute name="MACAddress" type="wstring">
10964 <desc>
10965 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10966 it to NULL, VirtualBox will generate a unique MAC address.
10967 </desc>
10968 </attribute>
10969
10970 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10971
10972 <attribute name="hostInterface" type="wstring">
10973 <desc>
10974 Name of the host network interface the VM is attached to.
10975 </desc>
10976 </attribute>
10977
10978 <attribute name="internalNetwork" type="wstring">
10979 <desc>
10980 Name of the internal network the VM is attached to.
10981 </desc>
10982 </attribute>
10983
10984 <attribute name="NATNetwork" type="wstring">
10985 <desc>
10986 Name of the NAT network the VM is attached to.
10987 </desc>
10988 </attribute>
10989
10990 <attribute name="cableConnected" type="boolean">
10991 <desc>
10992 Flag whether the adapter reports the cable as connected or not.
10993 It can be used to report offline situations to a VM.
10994 </desc>
10995 </attribute>
10996
10997 <attribute name="lineSpeed" type="unsigned long">
10998 <desc>
10999 Line speed reported by custom drivers, in units of 1 kbps.
11000 </desc>
11001 </attribute>
11002
11003 <attribute name="traceEnabled" type="boolean">
11004 <desc>
11005 Flag whether network traffic from/to the network card should be traced.
11006 Can only be toggled when the VM is turned off.
11007 </desc>
11008 </attribute>
11009
11010 <attribute name="traceFile" type="wstring">
11011 <desc>
11012 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11013 will be used.
11014 </desc>
11015 </attribute>
11016
11017 <method name="attachToNAT">
11018 <desc>
11019 Attach the network adapter to the Network Address Translation (NAT) interface.
11020 </desc>
11021 </method>
11022
11023 <method name="attachToBridgedInterface">
11024 <desc>
11025 Attach the network adapter to a bridged host interface.
11026 </desc>
11027 </method>
11028
11029 <method name="attachToInternalNetwork">
11030 <desc>
11031 Attach the network adapter to an internal network.
11032 </desc>
11033 </method>
11034
11035 <method name="attachToHostOnlyInterface">
11036 <desc>
11037 Attach the network adapter to the host-only network.
11038 </desc>
11039 </method>
11040
11041 <method name="detach">
11042 <desc>
11043 Detach the network adapter
11044 </desc>
11045 </method>
11046 </interface>
11047
11048
11049 <!--
11050 // ISerialPort
11051 /////////////////////////////////////////////////////////////////////////
11052 -->
11053
11054 <enum
11055 name="PortMode"
11056 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
11057 >
11058 <desc>
11059 The PortMode enumeration represents possible communication modes for
11060 the virtual serial port device.
11061 </desc>
11062
11063 <const name="Disconnected" value="0">
11064 <desc>Virtual device is not attached to any real host device.</desc>
11065 </const>
11066 <const name="HostPipe" value="1">
11067 <desc>Virtual device is attached to a host pipe.</desc>
11068 </const>
11069 <const name="HostDevice" value="2">
11070 <desc>Virtual device is attached to a host device.</desc>
11071 </const>
11072 </enum>
11073
11074 <interface
11075 name="ISerialPort" extends="$unknown"
11076 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11077 wsmap="managed"
11078 >
11079
11080 <desc>
11081 The ISerialPort interface represents the virtual serial port device.
11082
11083 The virtual serial port device acts like an ordinary serial port
11084 inside the virtual machine. This device communicates to the real
11085 serial port hardware in one of two modes: host pipe or host device.
11086
11087 In host pipe mode, the #path attribute specifies the path to the pipe on
11088 the host computer that represents a serial port. The #server attribute
11089 determines if this pipe is created by the virtual machine process at
11090 machine startup or it must already exist before starting machine
11091 execution.
11092
11093 In host device mode, the #path attribute specifies the name of the
11094 serial port device on the host computer.
11095
11096 There is also a third communication mode: the disconnected mode. In this
11097 mode, the guest OS running inside the virtual machine will be able to
11098 detect the serial port, but all port write operations will be discarded
11099 and all port read operations will return no data.
11100
11101 <see>IMachine::getSerialPort</see>
11102 </desc>
11103
11104 <attribute name="slot" type="unsigned long" readonly="yes">
11105 <desc>
11106 Slot number this serial port is plugged into. Corresponds to
11107 the value you pass to <link to="IMachine::getSerialPort"/>
11108 to obtain this instance.
11109 </desc>
11110 </attribute>
11111
11112 <attribute name="enabled" type="boolean">
11113 <desc>
11114 Flag whether the serial port is enabled. If disabled,
11115 the serial port will not be reported to the guest OS.
11116 </desc>
11117 </attribute>
11118
11119 <attribute name="IOBase" type="unsigned long">
11120 <desc>Base I/O address of the serial port.</desc>
11121 </attribute>
11122
11123 <attribute name="IRQ" type="unsigned long">
11124 <desc>IRQ number of the serial port.</desc>
11125 </attribute>
11126
11127 <attribute name="hostMode" type="PortMode">
11128 <desc>
11129 How is this port connected to the host.
11130 <note>
11131 Changing this attribute may fail if the conditions for
11132 <link to="#path"/> are not met.
11133 </note>
11134 </desc>
11135 </attribute>
11136
11137 <attribute name="server" type="boolean">
11138 <desc>
11139 Flag whether this serial port acts as a server (creates a new pipe on
11140 the host) or as a client (uses the existing pipe). This attribute is
11141 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11142 </desc>
11143 </attribute>
11144
11145 <attribute name="path" type="wstring">
11146 <desc>
11147 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
11148 PortMode_HostPipe, or the host serial device name when
11149 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
11150 cases, setting a @c null or an empty string as the attribute's value
11151 will result into an error. Otherwise, the value of this property is
11152 ignored.
11153 </desc>
11154 </attribute>
11155
11156 </interface>
11157
11158 <!--
11159 // IParallelPort
11160 /////////////////////////////////////////////////////////////////////////
11161 -->
11162
11163 <interface
11164 name="IParallelPort" extends="$unknown"
11165 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11166 wsmap="managed"
11167 >
11168
11169 <desc>
11170 The IParallelPort interface represents the virtual parallel port device.
11171
11172 The virtual parallel port device acts like an ordinary parallel port
11173 inside the virtual machine. This device communicates to the real
11174 parallel port hardware using the name of the parallel device on the host
11175 computer specified in the #path attribute.
11176
11177 Each virtual parallel port device is assigned a base I/O address and an
11178 IRQ number that will be reported to the guest operating system and used
11179 to operate the given parallel port from within the virtual machine.
11180
11181 <see>IMachine::getParallelPort</see>
11182 </desc>
11183
11184 <attribute name="slot" type="unsigned long" readonly="yes">
11185 <desc>
11186 Slot number this parallel port is plugged into. Corresponds to
11187 the value you pass to <link to="IMachine::getParallelPort"/>
11188 to obtain this instance.
11189 </desc>
11190 </attribute>
11191
11192 <attribute name="enabled" type="boolean">
11193 <desc>
11194 Flag whether the parallel port is enabled. If disabled,
11195 the parallel port will not be reported to the guest OS.
11196 </desc>
11197 </attribute>
11198
11199 <attribute name="IOBase" type="unsigned long">
11200 <desc>Base I/O address of the parallel port.</desc>
11201 </attribute>
11202
11203 <attribute name="IRQ" type="unsigned long">
11204 <desc>IRQ number of the parallel port.</desc>
11205 </attribute>
11206
11207 <attribute name="path" type="wstring">
11208 <desc>
11209 Host parallel device name. If this parallel port is enabled, setting a
11210 @c null or an empty string as this attribute's value will result into
11211 an error.
11212 </desc>
11213 </attribute>
11214
11215 </interface>
11216
11217
11218 <!--
11219 // IMachineDebugger
11220 /////////////////////////////////////////////////////////////////////////
11221 -->
11222
11223 <interface
11224 name="IMachineDebugger" extends="$unknown"
11225 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11226 wsmap="suppress"
11227 >
11228 <method name="resetStats">
11229 <desc>
11230 Reset VM statistics.
11231 </desc>
11232 <param name="pattern" type="wstring" dir="in">
11233 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11234 </param>
11235 </method>
11236
11237 <method name="dumpStats">
11238 <desc>
11239 Dumps VM statistics.
11240 </desc>
11241 <param name="pattern" type="wstring" dir="in">
11242 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11243 </param>
11244 </method>
11245
11246 <method name="getStats">
11247 <desc>
11248 Get the VM statistics in a XMLish format.
11249 </desc>
11250 <param name="pattern" type="wstring" dir="in">
11251 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11252 </param>
11253 <param name="withDescriptions" type="boolean" dir="in">
11254 <desc>Whether to include the descriptions.</desc>
11255 </param>
11256 <param name="stats" type="wstring" dir="out">
11257 <desc>The XML document containing the statistics.</desc>
11258 </param>
11259 </method>
11260
11261 <method name="injectNMI">
11262 <desc>
11263 Inject an NMI into a running VT-x/AMD-V VM.
11264 </desc>
11265 </method>
11266
11267 <attribute name="singlestep" type="boolean">
11268 <desc>Switch for enabling singlestepping.</desc>
11269 </attribute>
11270
11271 <attribute name="recompileUser" type="boolean">
11272 <desc>Switch for forcing code recompilation for user mode code.</desc>
11273 </attribute>
11274
11275 <attribute name="recompileSupervisor" type="boolean">
11276 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11277 </attribute>
11278
11279 <attribute name="PATMEnabled" type="boolean">
11280 <desc>Switch for enabling and disabling the PATM component.</desc>
11281 </attribute>
11282
11283 <attribute name="CSAMEnabled" type="boolean">
11284 <desc>Switch for enabling and disabling the CSAM component.</desc>
11285 </attribute>
11286
11287 <attribute name="logEnabled" type="boolean">
11288 <desc>Switch for enabling and disabling logging.</desc>
11289 </attribute>
11290
11291 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11292 <desc>
11293 Flag indicating whether the VM is currently making use of CPU hardware
11294 virtualization extensions.
11295 </desc>
11296 </attribute>
11297
11298 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11299 <desc>
11300 Flag indicating whether the VM is currently making use of the nested paging
11301 CPU hardware virtualization extension.
11302 </desc>
11303 </attribute>
11304
11305 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11306 <desc>
11307 Flag indicating whether the VM is currently making use of the VPID
11308 VT-x extension.
11309 </desc>
11310 </attribute>
11311
11312 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11313 <desc>
11314 Flag indicating whether the VM is currently making use of the Physical
11315 Address Extension CPU feature.
11316 </desc>
11317 </attribute>
11318
11319 <attribute name="virtualTimeRate" type="unsigned long">
11320 <desc>
11321 The rate at which the virtual time runs expressed as a percentage.
11322 The accepted range is 2% to 20000%.
11323 </desc>
11324 </attribute>
11325
11326 <!-- @todo method for setting log flags, groups and destination! -->
11327
11328 <attribute name="VM" type="unsigned long long" readonly="yes">
11329 <desc>
11330 Gets the VM handle. This is only for internal use while
11331 we carve the details of this interface.
11332 </desc>
11333 </attribute>
11334
11335 </interface>
11336
11337 <!--
11338 // IUSBController
11339 /////////////////////////////////////////////////////////////////////////
11340 -->
11341
11342 <interface
11343 name="IUSBController" extends="$unknown"
11344 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11345 wsmap="managed"
11346 >
11347 <attribute name="enabled" type="boolean">
11348 <desc>
11349 Flag whether the USB controller is present in the
11350 guest system. If disabled, the virtual guest hardware will
11351 not contain any USB controller. Can only be changed when
11352 the VM is powered off.
11353 </desc>
11354 </attribute>
11355
11356 <attribute name="enabledEhci" type="boolean">
11357 <desc>
11358 Flag whether the USB EHCI controller is present in the
11359 guest system. If disabled, the virtual guest hardware will
11360 not contain a USB EHCI controller. Can only be changed when
11361 the VM is powered off.
11362 </desc>
11363 </attribute>
11364
11365 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11366 <desc>
11367 USB standard version which the controller implements.
11368 This is a BCD which means that the major version is in the
11369 high byte and minor version is in the low byte.
11370 </desc>
11371 </attribute>
11372
11373 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11374 <desc>
11375 List of USB device filters associated with the machine.
11376
11377 If the machine is currently running, these filters are activated
11378 every time a new (supported) USB device is attached to the host
11379 computer that was not ignored by global filters
11380 (<link to="IHost::USBDeviceFilters"/>).
11381
11382 These filters are also activated when the machine is powered up.
11383 They are run against a list of all currently available USB
11384 devices (in states
11385 <link to="USBDeviceState_Available"/>,
11386 <link to="USBDeviceState_Busy"/>,
11387 <link to="USBDeviceState_Held"/>) that were not previously
11388 ignored by global filters.
11389
11390 If at least one filter matches the USB device in question, this
11391 device is automatically captured (attached to) the virtual USB
11392 controller of this machine.
11393
11394 <see>IUSBDeviceFilter, ::IUSBController</see>
11395 </desc>
11396 </attribute>
11397
11398 <method name="createDeviceFilter">
11399 <desc>
11400 Creates a new USB device filter. All attributes except
11401 the filter name are set to <tt>null</tt> (any match),
11402 <i>active</i> is <tt>false</tt> (the filter is not active).
11403
11404 The created filter can then be added to the list of filters using
11405 <link to="#insertDeviceFilter"/>.
11406
11407 <result name="VBOX_E_INVALID_VM_STATE">
11408 The virtual machine is not mutable.
11409 </result>
11410
11411 <see>#deviceFilters</see>
11412 </desc>
11413 <param name="name" type="wstring" dir="in">
11414 <desc>
11415 Filter name. See <link to="IUSBDeviceFilter::name"/>
11416 for more info.
11417 </desc>
11418 </param>
11419 <param name="filter" type="IUSBDeviceFilter" dir="return">
11420 <desc>Created filter object.</desc>
11421 </param>
11422 </method>
11423
11424 <method name="insertDeviceFilter">
11425 <desc>
11426 Inserts the given USB device to the specified position
11427 in the list of filters.
11428
11429 Positions are numbered starting from <tt>0</tt>. If the specified
11430 position is equal to or greater than the number of elements in
11431 the list, the filter is added to the end of the collection.
11432
11433 <note>
11434 Duplicates are not allowed, so an attempt to insert a
11435 filter that is already in the collection, will return an
11436 error.
11437 </note>
11438
11439 <result name="VBOX_E_INVALID_VM_STATE">
11440 Virtual machine is not mutable.
11441 </result>
11442 <result name="E_INVALIDARG">
11443 USB device filter not created within this VirtualBox instance.
11444 </result>
11445 <result name="VBOX_E_INVALID_OBJECT_STATE">
11446 USB device filter already in list.
11447 </result>
11448
11449 <see>#deviceFilters</see>
11450 </desc>
11451 <param name="position" type="unsigned long" dir="in">
11452 <desc>Position to insert the filter to.</desc>
11453 </param>
11454 <param name="filter" type="IUSBDeviceFilter" dir="in">
11455 <desc>USB device filter to insert.</desc>
11456 </param>
11457 </method>
11458
11459 <method name="removeDeviceFilter">
11460 <desc>
11461 Removes a USB device filter from the specified position in the
11462 list of filters.
11463
11464 Positions are numbered starting from <tt>0</tt>. Specifying a
11465 position equal to or greater than the number of elements in
11466 the list will produce an error.
11467
11468 <see>#deviceFilters</see>
11469
11470 <result name="VBOX_E_INVALID_VM_STATE">
11471 Virtual machine is not mutable.
11472 </result>
11473 <result name="E_INVALIDARG">
11474 USB device filter list empty or invalid @a position.
11475 </result>
11476
11477 </desc>
11478 <param name="position" type="unsigned long" dir="in">
11479 <desc>Position to remove the filter from.</desc>
11480 </param>
11481 <param name="filter" type="IUSBDeviceFilter" dir="return">
11482 <desc>Removed USB device filter.</desc>
11483 </param>
11484 </method>
11485
11486 </interface>
11487
11488
11489 <!--
11490 // IUSBDevice
11491 /////////////////////////////////////////////////////////////////////////
11492 -->
11493
11494 <interface
11495 name="IUSBDevice" extends="$unknown"
11496 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11497 wsmap="managed"
11498 >
11499 <desc>
11500 The IUSBDevice interface represents a virtual USB device attached to the
11501 virtual machine.
11502
11503 A collection of objects implementing this interface is stored in the
11504 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11505 attached to a running virtual machine's USB controller.
11506 </desc>
11507
11508 <attribute name="id" type="uuid" readonly="yes">
11509 <desc>
11510 Unique USB device ID. This ID is built from #vendorId,
11511 #productId, #revision and #serialNumber.
11512 </desc>
11513 </attribute>
11514
11515 <attribute name="vendorId" type="unsigned short" readonly="yes">
11516 <desc>Vendor ID.</desc>
11517 </attribute>
11518
11519 <attribute name="productId" type="unsigned short" readonly="yes">
11520 <desc>Product ID.</desc>
11521 </attribute>
11522
11523 <attribute name="revision" type="unsigned short" readonly="yes">
11524 <desc>
11525 Product revision number. This is a packed BCD represented as
11526 unsigned short. The high byte is the integer part and the low
11527 byte is the decimal.
11528 </desc>
11529 </attribute>
11530
11531 <attribute name="manufacturer" type="wstring" readonly="yes">
11532 <desc>Manufacturer string.</desc>
11533 </attribute>
11534
11535 <attribute name="product" type="wstring" readonly="yes">
11536 <desc>Product string.</desc>
11537 </attribute>
11538
11539 <attribute name="serialNumber" type="wstring" readonly="yes">
11540 <desc>Serial number string.</desc>
11541 </attribute>
11542
11543 <attribute name="address" type="wstring" readonly="yes">
11544 <desc>Host specific address of the device.</desc>
11545 </attribute>
11546
11547 <attribute name="port" type="unsigned short" readonly="yes">
11548 <desc>
11549 Host USB port number the device is physically
11550 connected to.
11551 </desc>
11552 </attribute>
11553
11554 <attribute name="version" type="unsigned short" readonly="yes">
11555 <desc>
11556 The major USB version of the device - 1 or 2.
11557 </desc>
11558 </attribute>
11559
11560 <attribute name="portVersion" type="unsigned short" readonly="yes">
11561 <desc>
11562 The major USB version of the host USB port the device is
11563 physically connected to - 1 or 2. For devices not connected to
11564 anything this will have the same value as the version attribute.
11565 </desc>
11566 </attribute>
11567
11568 <attribute name="remote" type="boolean" readonly="yes">
11569 <desc>
11570 Whether the device is physically connected to a remote VRDP
11571 client or to a local host machine.
11572 </desc>
11573 </attribute>
11574
11575 </interface>
11576
11577
11578 <!--
11579 // IUSBDeviceFilter
11580 /////////////////////////////////////////////////////////////////////////
11581 -->
11582
11583 <interface
11584 name="IUSBDeviceFilter" extends="$unknown"
11585 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11586 wsmap="managed"
11587 >
11588 <desc>
11589 The IUSBDeviceFilter interface represents an USB device filter used
11590 to perform actions on a group of USB devices.
11591
11592 This type of filters is used by running virtual machines to
11593 automatically capture selected USB devices once they are physically
11594 attached to the host computer.
11595
11596 A USB device is matched to the given device filter if and only if all
11597 attributes of the device match the corresponding attributes of the
11598 filter (that is, attributes are joined together using the logical AND
11599 operation). On the other hand, all together, filters in the list of
11600 filters carry the semantics of the logical OR operation. So if it is
11601 desirable to create a match like "this vendor id OR this product id",
11602 one needs to create two filters and specify "any match" (see below)
11603 for unused attributes.
11604
11605 All filter attributes used for matching are strings. Each string
11606 is an expression representing a set of values of the corresponding
11607 device attribute, that will match the given filter. Currently, the
11608 following filtering expressions are supported:
11609
11610 <ul>
11611 <li><i>Interval filters</i>. Used to specify valid intervals for
11612 integer device attributes (Vendor ID, Product ID and Revision).
11613 The format of the string is:
11614
11615 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11616
11617 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11618 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11619 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11620 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11621 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11622 possible integer is assumed.
11623 </li>
11624 <li><i>Boolean filters</i>. Used to specify acceptable values for
11625 boolean device attributes. The format of the string is:
11626
11627 <tt>true|false|yes|no|0|1</tt>
11628
11629 </li>
11630 <li><i>Exact match</i>. Used to specify a single value for the given
11631 device attribute. Any string that doesn't start with <tt>int:</tt>
11632 represents the exact match. String device attributes are compared to
11633 this string including case of symbols. Integer attributes are first
11634 converted to a string (see individual filter attributes) and then
11635 compared ignoring case.
11636
11637 </li>
11638 <li><i>Any match</i>. Any value of the corresponding device attribute
11639 will match the given filter. An empty or <tt>null</tt> string is
11640 used to construct this type of filtering expressions.
11641
11642 </li>
11643 </ul>
11644
11645 <note>
11646 On the Windows host platform, interval filters are not currently
11647 available. Also all string filter attributes
11648 (<link to="#manufacturer"/>, <link to="#product"/>,
11649 <link to="#serialNumber"/>) are ignored, so they behave as
11650 <i>any match</i> no matter what string expression is specified.
11651 </note>
11652
11653 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11654 </desc>
11655
11656 <attribute name="name" type="wstring">
11657 <desc>
11658 Visible name for this filter.
11659 This name is used to visually distinguish one filter from another,
11660 so it can neither be <tt>null</tt> nor an empty string.
11661 </desc>
11662 </attribute>
11663
11664 <attribute name="active" type="boolean">
11665 <desc>Whether this filter active or has been temporarily disabled.</desc>
11666 </attribute>
11667
11668 <attribute name="vendorId" type="wstring">
11669 <desc>
11670 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11671 The string representation for the <i>exact matching</i>
11672 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11673 (including leading zeroes).
11674 </desc>
11675 </attribute>
11676
11677 <attribute name="productId" type="wstring">
11678 <desc>
11679 <link to="IUSBDevice::productId">Product ID</link> filter.
11680 The string representation for the <i>exact matching</i>
11681 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11682 (including leading zeroes).
11683 </desc>
11684 </attribute>
11685
11686 <attribute name="revision" type="wstring">
11687 <desc>
11688 <link to="IUSBDevice::productId">Product revision number</link>
11689 filter. The string representation for the <i>exact matching</i>
11690 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11691 of the integer part of the revision, and <tt>F</tt> is the
11692 decimal digit of its fractional part (including leading and
11693 trailing zeros).
11694 Note that for interval filters, it's best to use the hexadecimal
11695 form, because the revision is stored as a 16 bit packed BCD value;
11696 so the expression <tt>int:0x0100-0x0199</tt> will match any
11697 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11698 </desc>
11699 </attribute>
11700
11701 <attribute name="manufacturer" type="wstring">
11702 <desc>
11703 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11704 </desc>
11705 </attribute>
11706
11707 <attribute name="product" type="wstring">
11708 <desc>
11709 <link to="IUSBDevice::product">Product</link> filter.
11710 </desc>
11711 </attribute>
11712
11713 <attribute name="serialNumber" type="wstring">
11714 <desc>
11715 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11716 </desc>
11717 </attribute>
11718
11719 <attribute name="port" type="wstring">
11720 <desc>
11721 <link to="IUSBDevice::port">Host USB port</link> filter.
11722 </desc>
11723 </attribute>
11724
11725 <attribute name="remote" type="wstring">
11726 <desc>
11727 <link to="IUSBDevice::remote">Remote state</link> filter.
11728 <note>
11729 This filter makes sense only for machine USB filters,
11730 i.e. it is ignored by IHostUSBDeviceFilter objects.
11731 </note>
11732 </desc>
11733 </attribute>
11734
11735 <attribute name="maskedInterfaces" type="unsigned long">
11736 <desc>
11737 This is an advanced option for hiding one or more USB interfaces
11738 from the guest. The value is a bit mask where the bits that are set
11739 means the corresponding USB interface should be hidden, masked off
11740 if you like.
11741 This feature only works on Linux hosts.
11742 </desc>
11743 </attribute>
11744
11745 </interface>
11746
11747
11748 <!--
11749 // IHostUSBDevice
11750 /////////////////////////////////////////////////////////////////////////
11751 -->
11752
11753 <enum
11754 name="USBDeviceState"
11755 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11756 >
11757 <desc>
11758 USB device state. This enumeration represents all possible states
11759 of the USB device physically attached to the host computer regarding
11760 its state on the host computer and availability to guest computers
11761 (all currently running virtual machines).
11762
11763 Once a supported USB device is attached to the host, global USB
11764 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11765 either ignore the device, or put it to USBDeviceState_Held state, or do
11766 nothing. Unless the device is ignored by global filters, filters of all
11767 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11768 activated that can put it to USBDeviceState_Captured state.
11769
11770 If the device was ignored by global filters, or didn't match
11771 any filters at all (including guest ones), it is handled by the host
11772 in a normal way. In this case, the device state is determined by
11773 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11774 or USBDeviceState_Available, depending on the current device usage.
11775
11776 Besides auto-capturing based on filters, the device can be manually
11777 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11778 state is USBDeviceState_Busy, USBDeviceState_Available or
11779 USBDeviceState_Held.
11780
11781 <note>
11782 Due to differences in USB stack implementations in Linux and Win32,
11783 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11784 only to the Linux version of the product. This also means that (<link
11785 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11786 device state is USBDeviceState_Held.
11787 </note>
11788
11789 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11790 </desc>
11791
11792 <const name="NotSupported" value="0">
11793 <desc>
11794 Not supported by the VirtualBox server, not available to guests.
11795 </desc>
11796 </const>
11797 <const name="Unavailable" value="1">
11798 <desc>
11799 Being used by the host computer exclusively,
11800 not available to guests.
11801 </desc>
11802 </const>
11803 <const name="Busy" value="2">
11804 <desc>
11805 Being used by the host computer, potentially available to guests.
11806 </desc>
11807 </const>
11808 <const name="Available" value="3">
11809 <desc>
11810 Not used by the host computer, available to guests (the host computer
11811 can also start using the device at any time).
11812 </desc>
11813 </const>
11814 <const name="Held" value="4">
11815 <desc>
11816 Held by the VirtualBox server (ignored by the host computer),
11817 available to guests.
11818 </desc>
11819 </const>
11820 <const name="Captured" value="5">
11821 <desc>
11822 Captured by one of the guest computers, not available
11823 to anybody else.
11824 </desc>
11825 </const>
11826 </enum>
11827
11828 <interface
11829 name="IHostUSBDevice" extends="IUSBDevice"
11830 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11831 wsmap="managed"
11832 >
11833 <desc>
11834 The IHostUSBDevice interface represents a physical USB device attached
11835 to the host computer.
11836
11837 Besides properties inherited from IUSBDevice, this interface adds the
11838 <link to="#state"/> property that holds the current state of the USB
11839 device.
11840
11841 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11842 </desc>
11843
11844 <attribute name="state" type="USBDeviceState" readonly="yes">
11845 <desc>
11846 Current state of the device.
11847 </desc>
11848 </attribute>
11849
11850 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11851
11852 </interface>
11853
11854
11855 <!--
11856 // IHostUSBDeviceFilter
11857 /////////////////////////////////////////////////////////////////////////
11858 -->
11859
11860 <enum
11861 name="USBDeviceFilterAction"
11862 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11863 >
11864 <desc>
11865 Actions for host USB device filters.
11866 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11867 </desc>
11868
11869 <const name="Null" value="0">
11870 <desc>Null value (never used by the API).</desc>
11871 </const>
11872 <const name="Ignore" value="1">
11873 <desc>Ignore the matched USB device.</desc>
11874 </const>
11875 <const name="Hold" value="2">
11876 <desc>Hold the matched USB device.</desc>
11877 </const>
11878 </enum>
11879
11880 <interface
11881 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11882 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11883 wsmap="managed"
11884 >
11885 <desc>
11886 The IHostUSBDeviceFilter interface represents a global filter for a
11887 physical USB device used by the host computer. Used indirectly in
11888 <link to="IHost::USBDeviceFilters"/>.
11889
11890 Using filters of this type, the host computer determines the initial
11891 state of the USB device after it is physically attached to the
11892 host's USB controller.
11893
11894 <note>
11895 The <link to="#remote"/> attribute is ignored by this type of
11896 filters, because it makes sense only for
11897 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11898 </note>
11899
11900 <see>IHost::USBDeviceFilters</see>
11901 </desc>
11902
11903 <attribute name="action" type="USBDeviceFilterAction">
11904 <desc>
11905 Action performed by the host when an attached USB device
11906 matches this filter.
11907 </desc>
11908 </attribute>
11909
11910 </interface>
11911
11912 <!--
11913 // IAudioAdapter
11914 /////////////////////////////////////////////////////////////////////////
11915 -->
11916
11917 <enum
11918 name="AudioDriverType"
11919 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11920 >
11921 <desc>
11922 Host audio driver type.
11923 </desc>
11924
11925 <const name="Null" value="0">
11926 <desc>Null value, also means "dummy audio driver".</desc>
11927 </const>
11928 <const name="WinMM" value="1"/>
11929 <const name="OSS" value="2"/>
11930 <const name="ALSA" value="3"/>
11931 <const name="DirectSound" value="4"/>
11932 <const name="CoreAudio" value="5"/>
11933 <const name="MMPM" value="6"/>
11934 <const name="Pulse" value="7"/>
11935 <const name="SolAudio" value="8"/>
11936 </enum>
11937
11938 <enum
11939 name="AudioControllerType"
11940 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11941 >
11942 <desc>
11943 Virtual audio controller type.
11944 </desc>
11945
11946 <const name="AC97" value="0"/>
11947 <const name="SB16" value="1"/>
11948 </enum>
11949
11950 <interface
11951 name="IAudioAdapter" extends="$unknown"
11952 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11953 wsmap="managed"
11954 >
11955 <desc>
11956 The IAudioAdapter interface represents the virtual audio adapter of
11957 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11958 </desc>
11959 <attribute name="enabled" type="boolean">
11960 <desc>
11961 Flag whether the audio adapter is present in the
11962 guest system. If disabled, the virtual guest hardware will
11963 not contain any audio adapter. Can only be changed when
11964 the VM is not running.
11965 </desc>
11966 </attribute>
11967 <attribute name="audioController" type="AudioControllerType">
11968 <desc>
11969 The audio hardware we emulate.
11970 </desc>
11971 </attribute>
11972 <attribute name="audioDriver" type="AudioDriverType">
11973 <desc>
11974 Audio driver the adapter is connected to. This setting
11975 can only be changed when the VM is not running.
11976 </desc>
11977 </attribute>
11978 </interface>
11979
11980 <!--
11981 // IVRDPServer
11982 /////////////////////////////////////////////////////////////////////////
11983 -->
11984
11985 <enum
11986 name="VRDPAuthType"
11987 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11988 >
11989 <desc>
11990 VRDP authentication type.
11991 </desc>
11992
11993 <const name="Null" value="0">
11994 <desc>Null value, also means "no authentication".</desc>
11995 </const>
11996 <const name="External" value="1"/>
11997 <const name="Guest" value="2"/>
11998 </enum>
11999
12000 <interface
12001 name="IVRDPServer" extends="$unknown"
12002 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
12003 wsmap="managed"
12004 >
12005 <attribute name="enabled" type="boolean">
12006 <desc>VRDP server status.</desc>
12007 </attribute>
12008
12009 <attribute name="port" type="unsigned long">
12010 <desc>
12011 VRDP server port number.
12012 <note>
12013 Setting the value of this property to <tt>0</tt> will reset the port
12014 number to the default value which is
12015 currently <tt>3389</tt>. Reading this property will always return a
12016 real port number, even after it has been set to <tt>0</tt> (in which
12017 case the default port is returned).
12018 </note>
12019 </desc>
12020 </attribute>
12021
12022 <attribute name="netAddress" type="wstring">
12023 <desc>VRDP server address.</desc>
12024 </attribute>
12025
12026 <attribute name="authType" type="VRDPAuthType">
12027 <desc>VRDP authentication method.</desc>
12028 </attribute>
12029
12030 <attribute name="authTimeout" type="unsigned long">
12031 <desc>Timeout for guest authentication. Milliseconds.</desc>
12032 </attribute>
12033
12034 <attribute name="allowMultiConnection" type="boolean">
12035 <desc>
12036 Flag whether multiple simultaneous connections to the VM are permitted.
12037 Note that this will be replaced by a more powerful mechanism in the future.
12038 </desc>
12039 </attribute>
12040
12041 <attribute name="reuseSingleConnection" type="boolean">
12042 <desc>
12043 Flag whether the existing connection must be dropped and a new connection
12044 must be established by the VRDP server, when a new client connects in single
12045 connection mode.
12046 </desc>
12047 </attribute>
12048
12049 </interface>
12050
12051
12052 <!--
12053 // ISharedFolder
12054 /////////////////////////////////////////////////////////////////////////
12055 -->
12056
12057 <interface
12058 name="ISharedFolder" extends="$unknown"
12059 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12060 wsmap="struct"
12061 >
12062 <desc>
12063 The ISharedFolder interface represents a folder in the host computer's
12064 file system accessible from the guest OS running inside a virtual
12065 machine using an associated logical name.
12066
12067 There are three types of shared folders:
12068 <ul>
12069 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12070 folders available to all virtual machines.</li>
12071 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12072 VM-specific shared folders available to the given virtual machine at
12073 startup.</li>
12074 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12075 VM-specific shared folders created in the session context (for
12076 example, when the virtual machine is running) and automatically
12077 discarded when the session is closed (the VM is powered off).</li>
12078 </ul>
12079
12080 Logical names of shared folders must be unique within the given scope
12081 (global, permanent or transient). However, they do not need to be unique
12082 across scopes. In this case, the definition of the shared folder in a
12083 more specific scope takes precedence over definitions in all other
12084 scopes. The order of precedence is (more specific to more general):
12085 <ol>
12086 <li>Transient definitions</li>
12087 <li>Permanent definitions</li>
12088 <li>Global definitions</li>
12089 </ol>
12090
12091 For example, if MyMachine has a shared folder named
12092 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12093 transient shared folder named <tt>C_DRIVE</tt> (that points
12094 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12095 of <tt>C_DRIVE</tt> in the guest OS so
12096 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12097 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12098 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12099 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12100 to <tt>C:\\</tt> if it still exists.
12101
12102 Note that permanent and transient shared folders of different machines
12103 are in different name spaces, so they don't overlap and don't need to
12104 have unique logical names.
12105
12106 <note>
12107 Global shared folders are not implemented in the current version of the
12108 product.
12109 </note>
12110 </desc>
12111
12112 <attribute name="name" type="wstring" readonly="yes">
12113 <desc>Logical name of the shared folder.</desc>
12114 </attribute>
12115
12116 <attribute name="hostPath" type="wstring" readonly="yes">
12117 <desc>Full path to the shared folder in the host file system.</desc>
12118 </attribute>
12119
12120 <attribute name="accessible" type="boolean" readonly="yes">
12121 <desc>
12122 Whether the folder defined by the host path is currently
12123 accessible or not.
12124 For example, the folder can be unaccessible if it is placed
12125 on the network share that is not available by the time
12126 this property is read.
12127 </desc>
12128 </attribute>
12129
12130 <attribute name="writable" type="boolean" readonly="yes">
12131 <desc>
12132 Whether the folder defined by the host path is writable or
12133 not.
12134 </desc>
12135 </attribute>
12136
12137 <attribute name="lastAccessError" type="wstring" readonly="yes">
12138 <desc>
12139 Text message that represents the result of the last accessibility
12140 check.
12141
12142 Accessibility checks are performed each time the <link to="#accessible"/>
12143 attribute is read. A @c null string is returned if the last
12144 accessibility check was successful. A non-null string indicates a
12145 failure and should normally describe a reason of the failure (for
12146 example, a file read error).
12147 </desc>
12148 </attribute>
12149
12150 </interface>
12151
12152 <!--
12153 // ISession
12154 /////////////////////////////////////////////////////////////////////////
12155 -->
12156
12157 <interface
12158 name="IInternalSessionControl" extends="$unknown"
12159 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
12160 internal="yes"
12161 wsmap="suppress"
12162 >
12163 <method name="getPID">
12164 <desc>PID of the process that has created this Session object.
12165 </desc>
12166 <param name="pid" type="unsigned long" dir="return"/>
12167 </method>
12168
12169 <method name="getRemoteConsole">
12170 <desc>
12171 Returns the console object suitable for remote control.
12172
12173 <result name="VBOX_E_INVALID_VM_STATE">
12174 Session state prevents operation.
12175 </result>
12176 <result name="VBOX_E_INVALID_OBJECT_STATE">
12177 Session type prevents operation.
12178 </result>
12179
12180 </desc>
12181 <param name="console" type="IConsole" dir="return"/>
12182 </method>
12183
12184 <method name="assignMachine">
12185 <desc>
12186 Assigns the machine object associated with this direct-type
12187 session or informs the session that it will be a remote one
12188 (if @a machine == NULL).
12189
12190 <result name="VBOX_E_INVALID_VM_STATE">
12191 Session state prevents operation.
12192 </result>
12193 <result name="VBOX_E_INVALID_OBJECT_STATE">
12194 Session type prevents operation.
12195 </result>
12196
12197 </desc>
12198 <param name="machine" type="IMachine" dir="in"/>
12199 </method>
12200
12201 <method name="assignRemoteMachine">
12202 <desc>
12203 Assigns the machine and the (remote) console object associated with
12204 this remote-type session.
12205
12206 <result name="VBOX_E_INVALID_VM_STATE">
12207 Session state prevents operation.
12208 </result>
12209
12210 </desc>
12211 <param name="machine" type="IMachine" dir="in"/>
12212 <param name="console" type="IConsole" dir="in"/>
12213 </method>
12214
12215 <method name="updateMachineState">
12216 <desc>
12217 Updates the machine state in the VM process.
12218 Must be called only in certain cases
12219 (see the method implementation).
12220
12221 <result name="VBOX_E_INVALID_VM_STATE">
12222 Session state prevents operation.
12223 </result>
12224 <result name="VBOX_E_INVALID_OBJECT_STATE">
12225 Session type prevents operation.
12226 </result>
12227
12228 </desc>
12229 <param name="aMachineState" type="MachineState" dir="in"/>
12230 </method>
12231
12232 <method name="uninitialize">
12233 <desc>
12234 Uninitializes (closes) this session. Used by VirtualBox to close
12235 the corresponding remote session when the direct session dies
12236 or gets closed.
12237
12238 <result name="VBOX_E_INVALID_VM_STATE">
12239 Session state prevents operation.
12240 </result>
12241
12242 </desc>
12243 </method>
12244
12245 <method name="onDVDDriveChange">
12246 <desc>
12247 Triggered when settings of the DVD drive object of the
12248 associated virtual machine have changed.
12249
12250 <result name="VBOX_E_INVALID_VM_STATE">
12251 Session state prevents operation.
12252 </result>
12253 <result name="VBOX_E_INVALID_OBJECT_STATE">
12254 Session type prevents operation.
12255 </result>
12256
12257 </desc>
12258 </method>
12259
12260 <method name="onFloppyDriveChange">
12261 <desc>
12262 Triggered when settings of the floppy drive object of the
12263 associated virtual machine have changed.
12264
12265 <result name="VBOX_E_INVALID_VM_STATE">
12266 Session state prevents operation.
12267 </result>
12268 <result name="VBOX_E_INVALID_OBJECT_STATE">
12269 Session type prevents operation.
12270 </result>
12271
12272 </desc>
12273 </method>
12274
12275 <method name="onNetworkAdapterChange">
12276 <desc>
12277 Triggered when settings of a network adapter of the
12278 associated virtual machine have changed.
12279
12280 <result name="VBOX_E_INVALID_VM_STATE">
12281 Session state prevents operation.
12282 </result>
12283 <result name="VBOX_E_INVALID_OBJECT_STATE">
12284 Session type prevents operation.
12285 </result>
12286
12287 </desc>
12288 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12289 </method>
12290
12291 <method name="onSerialPortChange">
12292 <desc>
12293 Triggered when settings of a serial port of the
12294 associated virtual machine have changed.
12295
12296 <result name="VBOX_E_INVALID_VM_STATE">
12297 Session state prevents operation.
12298 </result>
12299 <result name="VBOX_E_INVALID_OBJECT_STATE">
12300 Session type prevents operation.
12301 </result>
12302
12303 </desc>
12304 <param name="serialPort" type="ISerialPort" dir="in"/>
12305 </method>
12306
12307 <method name="onParallelPortChange">
12308 <desc>
12309 Triggered when settings of a parallel port of the
12310 associated virtual machine have changed.
12311
12312 <result name="VBOX_E_INVALID_VM_STATE">
12313 Session state prevents operation.
12314 </result>
12315 <result name="VBOX_E_INVALID_OBJECT_STATE">
12316 Session type prevents operation.
12317 </result>
12318
12319 </desc>
12320 <param name="parallelPort" type="IParallelPort" dir="in"/>
12321 </method>
12322
12323 <method name="onStorageControllerChange">
12324 <desc>
12325 Triggered when settings of a storage controller of the
12326 associated virtual machine have changed.
12327
12328 <result name="VBOX_E_INVALID_VM_STATE">
12329 Session state prevents operation.
12330 </result>
12331 <result name="VBOX_E_INVALID_OBJECT_STATE">
12332 Session type prevents operation.
12333 </result>
12334
12335 </desc>
12336 </method>
12337
12338 <method name="onVRDPServerChange">
12339 <desc>
12340 Triggered when settings of the VRDP server object of the
12341 associated virtual machine have changed.
12342
12343 <result name="VBOX_E_INVALID_VM_STATE">
12344 Session state prevents operation.
12345 </result>
12346 <result name="VBOX_E_INVALID_OBJECT_STATE">
12347 Session type prevents operation.
12348 </result>
12349
12350 </desc>
12351 </method>
12352
12353 <method name="onUSBControllerChange">
12354 <desc>
12355 Triggered when settings of the USB controller object of the
12356 associated virtual machine have changed.
12357
12358 <result name="VBOX_E_INVALID_VM_STATE">
12359 Session state prevents operation.
12360 </result>
12361 <result name="VBOX_E_INVALID_OBJECT_STATE">
12362 Session type prevents operation.
12363 </result>
12364
12365 </desc>
12366 </method>
12367
12368 <method name="onSharedFolderChange">
12369 <desc>
12370 Triggered when a permanent (global or machine) shared folder has been
12371 created or removed.
12372 <note>
12373 We don't pass shared folder parameters in this notification because
12374 the order in which parallel notifications are delivered is not defined,
12375 therefore it could happen that these parameters were outdated by the
12376 time of processing this notification.
12377 </note>
12378
12379 <result name="VBOX_E_INVALID_VM_STATE">
12380 Session state prevents operation.
12381 </result>
12382 <result name="VBOX_E_INVALID_OBJECT_STATE">
12383 Session type prevents operation.
12384 </result>
12385
12386 </desc>
12387 <param name="global" type="boolean" dir="in"/>
12388 </method>
12389
12390 <method name="onUSBDeviceAttach">
12391 <desc>
12392 Triggered when a request to capture a USB device (as a result
12393 of matched USB filters or direct call to
12394 <link to="IConsole::attachUSBDevice"/>) has completed.
12395 A @c null @a error object means success, otherwise it
12396 describes a failure.
12397
12398 <result name="VBOX_E_INVALID_VM_STATE">
12399 Session state prevents operation.
12400 </result>
12401 <result name="VBOX_E_INVALID_OBJECT_STATE">
12402 Session type prevents operation.
12403 </result>
12404
12405 </desc>
12406 <param name="device" type="IUSBDevice" dir="in"/>
12407 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12408 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12409 </method>
12410
12411 <method name="onUSBDeviceDetach">
12412 <desc>
12413 Triggered when a request to release the USB device (as a result
12414 of machine termination or direct call to
12415 <link to="IConsole::detachUSBDevice"/>) has completed.
12416 A @c null @a error object means success, otherwise it
12417
12418 <result name="VBOX_E_INVALID_VM_STATE">
12419 Session state prevents operation.
12420 </result>
12421 <result name="VBOX_E_INVALID_OBJECT_STATE">
12422 Session type prevents operation.
12423 </result>
12424
12425 </desc>
12426 <param name="id" type="uuid" dir="in"/>
12427 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12428 </method>
12429
12430 <method name="onShowWindow">
12431 <desc>
12432 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12433 <link to="IMachine::showConsoleWindow"/> in order to notify
12434 console callbacks
12435 <link to="IConsoleCallback::onCanShowWindow"/>
12436 and <link to="IConsoleCallback::onShowWindow"/>.
12437
12438 <result name="VBOX_E_INVALID_OBJECT_STATE">
12439 Session type prevents operation.
12440 </result>
12441
12442 </desc>
12443 <param name="check" type="boolean" dir="in"/>
12444 <param name="canShow" type="boolean" dir="out"/>
12445 <param name="winId" type="unsigned long long" dir="out"/>
12446 </method>
12447
12448 <method name="accessGuestProperty">
12449 <desc>
12450 Called by <link to="IMachine::getGuestProperty"/> and by
12451 <link to="IMachine::setGuestProperty"/> in order to read and
12452 modify guest properties.
12453
12454 <result name="VBOX_E_INVALID_VM_STATE">
12455 Machine session is not open.
12456 </result>
12457 <result name="VBOX_E_INVALID_OBJECT_STATE">
12458 Session type is not direct.
12459 </result>
12460
12461 </desc>
12462 <param name="name" type="wstring" dir="in"/>
12463 <param name="value" type="wstring" dir="in"/>
12464 <param name="flags" type="wstring" dir="in"/>
12465 <param name="isSetter" type="boolean" dir="in"/>
12466 <param name="retValue" type="wstring" dir="out"/>
12467 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12468 <param name="retFlags" type="wstring" dir="out"/>
12469 </method>
12470
12471 <method name="enumerateGuestProperties">
12472 <desc>
12473 Return a list of the guest properties matching a set of patterns along
12474 with their values, time stamps and flags.
12475
12476 <result name="VBOX_E_INVALID_VM_STATE">
12477 Machine session is not open.
12478 </result>
12479 <result name="VBOX_E_INVALID_OBJECT_STATE">
12480 Session type is not direct.
12481 </result>
12482
12483 </desc>
12484 <param name="patterns" type="wstring" dir="in">
12485 <desc>
12486 The patterns to match the properties against as a comma-separated
12487 string. If this is empty, all properties currently set will be
12488 returned.
12489 </desc>
12490 </param>
12491 <param name="key" type="wstring" dir="out" safearray="yes">
12492 <desc>
12493 The key names of the properties returned.
12494 </desc>
12495 </param>
12496 <param name="value" type="wstring" dir="out" safearray="yes">
12497 <desc>
12498 The values of the properties returned. The array entries match the
12499 corresponding entries in the @a key array.
12500 </desc>
12501 </param>
12502 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12503 <desc>
12504 The time stamps of the properties returned. The array entries match
12505 the corresponding entries in the @a key array.
12506 </desc>
12507 </param>
12508 <param name="flags" type="wstring" dir="out" safearray="yes">
12509 <desc>
12510 The flags of the properties returned. The array entries match the
12511 corresponding entries in the @a key array.
12512 </desc>
12513 </param>
12514 </method>
12515
12516 </interface>
12517
12518 <interface
12519 name="ISession" extends="$dispatched"
12520 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12521 wsmap="managed"
12522 >
12523 <desc>
12524 The ISession interface represents a serialization primitive for virtual
12525 machines.
12526
12527 With VirtualBox, every time one wishes to manipulate a virtual machine
12528 (e.g. change its settings or start execution), a session object is
12529 required. Such an object must be passed to one of the session methods
12530 that open the given session, which then initiates the machine manipulation.
12531
12532 A session serves several purposes: it identifies to the inter-process VirtualBox
12533 code which process is currently working with the virtual machine, and it ensures
12534 that there are no incompatible requests from several processes for the
12535 same virtual machine. Session objects can therefore be thought of as mutex
12536 semaphores that lock virtual machines to prevent conflicting accesses from
12537 several processes.
12538
12539 How sessions objects are used depends on whether you use the Main API
12540 via COM or via the webservice:
12541
12542 <ul>
12543 <li>When using the COM API directly, an object of the Session class from the
12544 VirtualBox type library needs to be created. In regular COM C++ client code,
12545 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12546 This object will then act as a local session object in further calls to open
12547 a session.
12548 </li>
12549
12550 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12551 one session object automatically when <link to="IWebsessionManager::logon" />
12552 is called. A managed object reference to that session object can be retrieved by
12553 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12554 reference can then be used to open sessions.
12555 </li>
12556 </ul>
12557
12558 Sessions are mainly used in two variations:
12559
12560 <ul>
12561 <li>
12562 To start a virtual machine in a separate process, one would call
12563 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12564 object as its first parameter. This session then identifies the caller
12565 and lets him control the started machine (for example, pause machine
12566 execution or power it down) as well as be notified about machine
12567 execution state changes.
12568 </li>
12569
12570 <li>To alter machine settings, or to start machine execution within the
12571 current process, one needs to open a direct session for the machine first by
12572 calling <link to="IVirtualBox::openSession"/>. While a direct session
12573 is open within one process, no any other process may open another direct
12574 session for the same machine. This prevents the machine from being changed
12575 by other processes while it is running or while the machine is being configured.
12576 </li>
12577 </ul>
12578
12579 One also can attach to an existing direct session already opened by
12580 another process (for example, in order to send a control request to the
12581 virtual machine such as the pause or the reset request). This is done by
12582 calling <link to="IVirtualBox::openExistingSession"/>.
12583
12584 <note>
12585 Unless you are trying to write a new VirtualBox front-end that
12586 performs direct machine execution (like the VirtualBox or VBoxSDL
12587 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12588 session opened by <link to="IVirtualBox::openSession"/> and use this
12589 session only to change virtual machine settings. If you simply want to
12590 start virtual machine execution using one of the existing front-ends
12591 (for example the VirtualBox GUI or headless server), simply use
12592 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12593 will power up the machine automatically for you.
12594 </note>
12595 </desc>
12596
12597 <attribute name="state" type="SessionState" readonly="yes">
12598 <desc>Current state of this session.</desc>
12599 </attribute>
12600
12601 <attribute name="type" type="SessionType" readonly="yes">
12602 <desc>
12603 Type of this session. The value of this attribute is valid only
12604 if the session is currently open (i.e. its #state is
12605 SessionType_SessionOpen), otherwise an error will be returned.
12606 </desc>
12607 </attribute>
12608
12609 <attribute name="machine" type="IMachine" readonly="yes">
12610 <desc>Machine object associated with this session.</desc>
12611 </attribute>
12612
12613 <attribute name="console" type="IConsole" readonly="yes">
12614 <desc>Console object associated with this session.</desc>
12615 </attribute>
12616
12617 <method name="close">
12618 <desc>
12619 Closes a session that was previously opened.
12620
12621 It is recommended that every time an "open session" method (such as
12622 <link to="IVirtualBox::openRemoteSession" /> or
12623 <link to="IVirtualBox::openSession" />) has been called to
12624 manipulate a virtual machine, the caller invoke
12625 ISession::close() when it's done doing so. Since sessions are
12626 serialization primitives much like ordinary mutexes, they are
12627 best used the same way: for each "open" call, there should be
12628 a matching "close" call, even when errors occur.
12629
12630 Otherwise, if a direct session for a machine opened with
12631 <link to="IVirtualBox::openSession"/> is not explicitly closed
12632 when the application terminates, the state of the machine will
12633 be set to <link to="MachineState_Aborted" /> on the server.
12634
12635 Generally, it is recommended to close all open sessions explicitly
12636 before terminating the application (regardless of the reason for
12637 the termination).
12638
12639 <note>
12640 Do not expect the session state (<link to="ISession::state" />
12641 to return to "Closed" immediately after you invoke
12642 ISession::close(), particularly if you have started a remote
12643 session to execute the VM in a new process. The session state will
12644 automatically return to "Closed" once the VM is no longer executing,
12645 which can of course take a very long time.
12646 </note>
12647
12648 <result name="E_UNEXPECTED">
12649 Session is not open.
12650 </result>
12651
12652 </desc>
12653 </method>
12654
12655 </interface>
12656
12657 <!--
12658 // IStorageController
12659 /////////////////////////////////////////////////////////////////////////
12660 -->
12661
12662 <enum
12663 name="StorageBus"
12664 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12665 >
12666 <desc>
12667 The connection type of the storage controller.
12668 </desc>
12669 <const name="Null" value="0">
12670 <desc><tt>null</tt> value. Never used by the API.</desc>
12671 </const>
12672 <const name="IDE" value="1"/>
12673 <const name="SATA" value="2"/>
12674 <const name="SCSI" value="3"/>
12675 </enum>
12676
12677 <enum
12678 name="StorageControllerType"
12679 uuid="685387db-a837-4320-a258-08f46a22f62a"
12680 >
12681 <desc>
12682 Storage controller type.
12683 </desc>
12684
12685 <const name="Null" value="0">
12686 <desc><tt>null</tt> value. Never used by the API.</desc>
12687 </const>
12688 <const name="LsiLogic" value="1"/>
12689 <const name="BusLogic" value="2"/>
12690 <const name="IntelAhci" value="3"/>
12691 <const name="PIIX3" value="4"/>
12692 <const name="PIIX4" value="5"/>
12693 <const name="ICH6" value="6"/>
12694 </enum>
12695
12696 <interface
12697 name="IStorageController" extends="$unknown"
12698 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12699 wsmap="managed"
12700 >
12701 <desc>
12702 Represents a storage controller that is attached to a virtual machine
12703 (<link to="IMachine" />). Just as hard disks are attached to storage
12704 controllers in a real computer, virtual hard disks (represented by
12705 <link to="IHardDisk" />) are attached to virtual storage controllers,
12706 represented by this interface.
12707
12708 VirtualBox supports three types of virtual storage controller hardware:
12709 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12710 these three is used, certain sub-types are available and can be
12711 selected in <link to="#controllerType" />.
12712 </desc>
12713
12714 <attribute name="name" type="wstring" readonly="yes">
12715 <desc>
12716 Name of the storage controller, as originally specified with
12717 <link to="IMachine::addStorageController" />. This then uniquely
12718 identifies this controller with other method calls such as
12719 <link to="IMachine::attachHardDisk" />.
12720 </desc>
12721 </attribute>
12722
12723 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12724 <desc>
12725 Maximum number of devices which can be attached to one port.
12726 </desc>
12727 </attribute>
12728
12729 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12730 <desc>
12731 Minimum number of ports which can be set with
12732 <link to="IStorageController::SetPortCount"/>.
12733 </desc>
12734 </attribute>
12735
12736 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12737 <desc>
12738 Maximum number of ports which can be set with
12739 <link to="IStorageController::SetPortCount"/>.
12740 </desc>
12741 </attribute>
12742
12743 <attribute name="instance" type="unsigned long">
12744 <desc>
12745 The instance number of the device in the running VM.
12746 </desc>
12747 </attribute>
12748
12749 <attribute name="portCount" type="unsigned long">
12750 <desc>
12751 The number of currently usable ports on the controller.
12752 The minimum and maximum number of ports for one controller type can
12753 be determined with <link to="IStorageController::GetMinPortCount"/>
12754 and <link to="IStorageController::GetMaxPortCount"/>..
12755 </desc>
12756 </attribute>
12757
12758 <attribute name="bus" type="StorageBus" readonly="yes">
12759 <desc>
12760 The connection type of the storage controller.
12761 </desc>
12762 </attribute>
12763
12764 <attribute name="controllerType" type="StorageControllerType">
12765 <desc>
12766 Type of the virtual storage controller. Depending on this value,
12767 VirtualBox will provide a different virtual storage controller hardware
12768 to the guest.
12769
12770 For SCSI controllers, the default type is LsiLogic.
12771 </desc>
12772 </attribute>
12773
12774 <method name="GetIDEEmulationPort">
12775 <desc>
12776 Gets the corresponding port number which is emulated as an IDE device.
12777
12778 <result name="E_INVALIDARG">
12779 The @a devicePosition is not in the range 0 to 3.
12780 </result>
12781 <result name="E_NOTIMPL">
12782 The storage controller type is not SATAIntelAhci.
12783 </result>
12784
12785 </desc>
12786 <param name="devicePosition" type="long" dir="in"/>
12787 <param name="portNumber" type="long" dir="return"/>
12788 </method>
12789
12790 <method name="SetIDEEmulationPort">
12791 <desc>
12792 Sets the port number which is emulated as an IDE device.
12793
12794 <result name="E_INVALIDARG">
12795 The @a devicePosition is not in the range 0 to 3 or the
12796 @a portNumber is not in the range 0 to 29.
12797 </result>
12798 <result name="E_NOTIMPL">
12799 The storage controller type is not SATAIntelAhci.
12800 </result>
12801
12802 </desc>
12803 <param name="devicePosition" type="long" dir="in"/>
12804 <param name="portNumber" type="long" dir="in"/>
12805 </method>
12806
12807 </interface>
12808
12809<if target="wsdl">
12810
12811 <!--
12812 // IManagedObjectRef
12813 /////////////////////////////////////////////////////////////////////////
12814 -->
12815
12816 <interface
12817 name="IManagedObjectRef" extends="$unknown"
12818 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12819 internal="yes"
12820 wsmap="managed"
12821 wscpp="hardcoded"
12822 >
12823 <desc>
12824 Managed object reference.
12825
12826 Only within the webservice, a managed object reference (which is really
12827 an opaque number) allows a webservice client to address an object
12828 that lives in the address space of the webservice server.
12829
12830 Behind each managed object reference, there is a COM object that lives
12831 in the webservice server's address space. The COM object is not freed
12832 until the managed object reference is released, either by an explicit
12833 call to <link to="IManagedObjectRef::release" /> or by logging off from
12834 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12835 all objects created during the webservice session.
12836
12837 Whenever a method call of the VirtualBox API returns a COM object, the
12838 webservice representation of that method will instead return a
12839 managed object reference, which can then be used to invoke methods
12840 on that object.
12841 </desc>
12842
12843 <method name="getInterfaceName">
12844 <desc>
12845 Returns the name of the interface that this managed object represents,
12846 for example, "IMachine", as a string.
12847 </desc>
12848 <param name="return" type="wstring" dir="return"/>
12849 </method>
12850
12851 <method name="release">
12852 <desc>
12853 Releases this managed object reference and frees the resources that
12854 were allocated for it in the webservice server process. After calling
12855 this method, the identifier of the reference can no longer be used.
12856 </desc>
12857 </method>
12858
12859 </interface>
12860
12861 <!--
12862 // IWebsessionManager
12863 /////////////////////////////////////////////////////////////////////////
12864 -->
12865
12866 <interface
12867 name="IWebsessionManager" extends="$unknown"
12868 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12869 internal="yes"
12870 wsmap="global"
12871 wscpp="hardcoded"
12872 >
12873 <desc>
12874 Websession manager. This provides essential services
12875 to webservice clients.
12876 </desc>
12877 <method name="logon">
12878 <desc>
12879 Logs a new client onto the webservice and returns a managed object reference to
12880 the IVirtualBox instance, which the client can then use as a basis to further
12881 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12882 interface, in one way or the other.
12883 </desc>
12884 <param name="username" type="wstring" dir="in"/>
12885 <param name="password" type="wstring" dir="in"/>
12886 <param name="return" type="IVirtualBox" dir="return"/>
12887 </method>
12888
12889 <method name="getSessionObject">
12890 <desc>
12891 Returns a managed object reference to the internal ISession object that was created
12892 for this web service session when the client logged on.
12893
12894 <see>ISession</see>
12895 </desc>
12896 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12897 <param name="return" type="ISession" dir="return"/>
12898 </method>
12899
12900 <method name="logoff">
12901 <desc>
12902 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12903 and destroys all resources associated with the session (most importantly, all
12904 managed objects created in the server while the session was active).
12905 </desc>
12906 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12907 </method>
12908
12909 </interface>
12910
12911</if>
12912
12913 <!--
12914 // IPerformanceCollector & friends
12915 /////////////////////////////////////////////////////////////////////////
12916 -->
12917
12918 <interface
12919 name="IPerformanceMetric" extends="$unknown"
12920 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12921 >
12922 <desc>
12923 The IPerformanceMetric interface represents parameters of the given
12924 performance metric.
12925 </desc>
12926
12927 <attribute name="metricName" type="wstring" readonly="yes">
12928 <desc>
12929 Name of the metric.
12930 </desc>
12931 </attribute>
12932
12933 <attribute name="object" type="$unknown" readonly="yes">
12934 <desc>
12935 Object this metric belongs to.
12936 </desc>
12937 </attribute>
12938
12939 <attribute name="description" type="wstring" readonly="yes">
12940 <desc>
12941 Textual description of the metric.
12942 </desc>
12943 </attribute>
12944
12945 <attribute name="period" type="unsigned long" readonly="yes">
12946 <desc>
12947 Time interval between samples, measured in seconds.
12948 </desc>
12949 </attribute>
12950
12951 <attribute name="count" type="unsigned long" readonly="yes">
12952 <desc>
12953 Number of recent samples retained by the performance collector for this
12954 metric.
12955
12956 When the collected sample count exceeds this number, older samples
12957 are discarded.
12958 </desc>
12959 </attribute>
12960
12961 <attribute name="unit" type="wstring" readonly="yes">
12962 <desc>
12963 Unit of measurement.
12964 </desc>
12965 </attribute>
12966
12967 <attribute name="minimumValue" type="long" readonly="yes">
12968 <desc>
12969 Minimum possible value of this metric.
12970 </desc>
12971 </attribute>
12972
12973 <attribute name="maximumValue" type="long" readonly="yes">
12974 <desc>
12975 Maximum possible value of this metric.
12976 </desc>
12977 </attribute>
12978 </interface>
12979
12980 <interface
12981 name="IPerformanceCollector" extends="$unknown"
12982 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12983 wsmap="managed"
12984 >
12985 <desc>
12986 The IPerformanceCollector interface represents a service that collects and
12987 stores performance metrics data.
12988
12989 Performance metrics are associated with objects like IHost and
12990 IMachine. Each object has a distinct set of performance metrics.
12991 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12992
12993 Metric data are collected at the specified intervals and are retained
12994 internally. The interval and the number of samples retained can be set
12995 with <link to="IPerformanceCollector::setupMetrics" />.
12996
12997 Metrics are organized hierarchically, each level separated by slash (/).
12998 General scheme for metric name is
12999 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
13000 metric name stands for: CPU category, Load metric, User submetric, average
13001 aggregate. An aggregate function is computed over all retained data. Valid
13002 aggregate functions are:
13003
13004 <ul>
13005 <li>avg -- average</li>
13006 <li>min -- minimum</li>
13007 <li>max -- maximum</li>
13008 </ul>
13009
13010 "Category/Metric" together form base metric name. A base metric is the
13011 smallest unit for which a sampling interval and the number of retained
13012 samples can be set. Only base metrics can be enabled and disabled. All
13013 sub-metrics are collected when their base metric is collected.
13014 Collected values for any set of sub-metrics can be queried with
13015 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
13016 metric parameters, querying metric data, enabling or disabling metrics
13017 wildcards can be used in metric names to specify a subset of metrics. For
13018 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13019 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13020 values without aggregates <tt>*:</tt> can be used.
13021
13022 The valid names for base metrics are:
13023
13024 <ul>
13025 <li>CPU/Load</li>
13026 <li>CPU/MHz</li>
13027 <li>RAM/Usage</li>
13028 </ul>
13029
13030 The general sequence for collecting and retrieving the metrics is:
13031 <ul>
13032 <li>
13033 Obtain an instance of IPerformanceCollector with
13034 <link to="IVirtualBox::performanceCollector" />
13035 </li>
13036 <li>
13037 Allocate and populate an array with references to objects the metrics
13038 will be collected for. Use references to IHost and IMachine objects.
13039 </li>
13040 <li>
13041 Allocate and populate an array with base metric names the data will be
13042 collected for.
13043 </li>
13044 <li>
13045 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13046 metric data will be collected and stored.
13047 </li>
13048 <li>
13049 Wait for the data to get collected.
13050 </li>
13051 <li>
13052 Allocate and populate an array with references to objects the metric
13053 values will be queried for. You can re-use the object array used for
13054 setting base metrics.
13055 </li>
13056 <li>
13057 Allocate and populate an array with metric names the data will be
13058 collected for. Note that metric names differ from base metric names.
13059 </li>
13060 <li>
13061 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13062 have been collected so far are returned. Note that the values are still
13063 retained internally and data collection continues.
13064 </li>
13065 </ul>
13066
13067 For an example of usage refer to the following files in VirtualBox SDK:
13068 <ul>
13069 <li>
13070 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13071 </li>
13072 <li>
13073 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13074 </li>
13075 </ul>
13076 </desc>
13077
13078 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13079 <desc>
13080 Array of unique names of metrics.
13081
13082 This array represents all metrics supported by the performance
13083 collector. Individual objects do not necessarily support all of them.
13084 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13085 list of supported metrics for a particular object.
13086 </desc>
13087 </attribute>
13088
13089 <method name="getMetrics">
13090 <desc>
13091 Returns parameters of specified metrics for a set of objects.
13092 <note>
13093 @c Null metrics array means all metrics. @c Null object array means
13094 all existing objects.
13095 </note>
13096 </desc>
13097 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13098 <desc>
13099 Metric name filter. Currently, only a comma-separated list of metrics
13100 is supported.
13101 </desc>
13102 </param>
13103 <param name="objects" type="$unknown" dir="in" safearray="yes">
13104 <desc>
13105 Set of objects to return metric parameters for.
13106 </desc>
13107 </param>
13108 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13109 <desc>
13110 Array of returned metric parameters.
13111 </desc>
13112 </param>
13113 </method>
13114
13115 <method name="setupMetrics">
13116 <desc>
13117 Sets parameters of specified base metrics for a set of objects. Returns
13118 an array of <link to="IPerformanceMetric" /> describing the metrics have
13119 been affected.
13120 <note>
13121 @c Null or empty metric name array means all metrics. @c Null or empty
13122 object array means all existing objects. If metric name array contains
13123 a single element and object array contains many, the single metric
13124 name array element is applied to each object array element to form
13125 metric/object pairs.
13126 </note>
13127 </desc>
13128 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13129 <desc>
13130 Metric name filter. Comma-separated list of metrics with wildcard
13131 support.
13132 </desc>
13133 </param>
13134 <param name="objects" type="$unknown" dir="in" safearray="yes">
13135 <desc>
13136 Set of objects to setup metric parameters for.
13137 </desc>
13138 </param>
13139 <param name="period" type="unsigned long" dir="in">
13140 <desc>
13141 Time interval in seconds between two consecutive samples of performance
13142 data.
13143 </desc>
13144 </param>
13145 <param name="count" type="unsigned long" dir="in">
13146 <desc>
13147 Number of samples to retain in performance data history. Older samples
13148 get discarded.
13149 </desc>
13150 </param>
13151 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13152 <desc>
13153 Array of metrics that have been modified by the call to this method.
13154 </desc>
13155 </param>
13156 </method>
13157
13158 <method name="enableMetrics">
13159 <desc>
13160 Turns on collecting specified base metrics. Returns an array of
13161 <link to="IPerformanceMetric" /> describing the metrics have been
13162 affected.
13163 <note>
13164 @c Null or empty metric name array means all metrics. @c Null or empty
13165 object array means all existing objects. If metric name array contains
13166 a single element and object array contains many, the single metric
13167 name array element is applied to each object array element to form
13168 metric/object pairs.
13169 </note>
13170 </desc>
13171 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13172 <desc>
13173 Metric name filter. Comma-separated list of metrics with wildcard
13174 support.
13175 </desc>
13176 </param>
13177 <param name="objects" type="$unknown" dir="in" safearray="yes">
13178 <desc>
13179 Set of objects to enable metrics for.
13180 </desc>
13181 </param>
13182 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13183 <desc>
13184 Array of metrics that have been modified by the call to this method.
13185 </desc>
13186 </param>
13187 </method>
13188
13189 <method name="disableMetrics">
13190 <desc>
13191 Turns off collecting specified base metrics. Returns an array of
13192 <link to="IPerformanceMetric" /> describing the metrics have been
13193 affected.
13194 <note>
13195 @c Null or empty metric name array means all metrics. @c Null or empty
13196 object array means all existing objects. If metric name array contains
13197 a single element and object array contains many, the single metric
13198 name array element is applied to each object array element to form
13199 metric/object pairs.
13200 </note>
13201 </desc>
13202 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13203 <desc>
13204 Metric name filter. Comma-separated list of metrics with wildcard
13205 support.
13206 </desc>
13207 </param>
13208 <param name="objects" type="$unknown" dir="in" safearray="yes">
13209 <desc>
13210 Set of objects to disable metrics for.
13211 </desc>
13212 </param>
13213 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13214 <desc>
13215 Array of metrics that have been modified by the call to this method.
13216 </desc>
13217 </param>
13218 </method>
13219
13220 <method name="queryMetricsData">
13221 <desc>
13222 Queries collected metrics data for a set of objects.
13223
13224 The data itself and related metric information are returned in seven
13225 parallel and one flattened array of arrays. Elements of
13226 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13227 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13228 the same index describe one set of values corresponding to a single
13229 metric.
13230
13231 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13232 start and length of a sub-array is indicated by
13233 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13234 value for metric <tt>metricNames[i]</tt> is at
13235 <tt>returnData[returnIndices[i]]</tt>.
13236
13237 <note>
13238 @c Null or empty metric name array means all metrics. @c Null or empty
13239 object array means all existing objects. If metric name array contains
13240 a single element and object array contains many, the single metric
13241 name array element is applied to each object array element to form
13242 metric/object pairs.
13243 </note>
13244 <note>
13245 Data collection continues behind the scenes after call to
13246 @c queryMetricsData. The return data can be seen as the snapshot of
13247 the current state at the time of @c queryMetricsData call. The
13248 internally kept metric values are not cleared by the call. This makes
13249 possible querying different subsets of metrics or aggregates with
13250 subsequent calls. If periodic querying is needed it is highly
13251 suggested to query the values with @c interval*count period to avoid
13252 confusion. This way a completely new set of data values will be
13253 provided by each query.
13254 </note>
13255 </desc>
13256 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13257 <desc>
13258 Metric name filter. Comma-separated list of metrics with wildcard
13259 support.
13260 </desc>
13261 </param>
13262 <param name="objects" type="$unknown" dir="in" safearray="yes">
13263 <desc>
13264 Set of objects to query metrics for.
13265 </desc>
13266 </param>
13267 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13268 <desc>
13269 Names of metrics returned in @c returnData.
13270 </desc>
13271 </param>
13272 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13273 <desc>
13274 Objects associated with metrics returned in @c returnData.
13275 </desc>
13276 </param>
13277 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13278 <desc>
13279 Units of measurement for each returned metric.
13280 </desc>
13281 </param>
13282 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13283 <desc>
13284 Divisor that should be applied to return values in order to get
13285 floating point values. For example:
13286 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13287 will retrieve the floating point value of i-th sample of the first
13288 metric.
13289 </desc>
13290 </param>
13291 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13292 <desc>
13293 Sequence numbers of the first elements of value sequences of particular metrics
13294 returned in @c returnData. For aggregate metrics it is the sequence number of
13295 the sample the aggregate started calculation from.
13296 </desc>
13297 </param>
13298 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13299 <desc>
13300 Indices of the first elements of value sequences of particular metrics
13301 returned in @c returnData.
13302 </desc>
13303 </param>
13304 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13305 <desc>
13306 Lengths of value sequences of particular metrics.
13307 </desc>
13308 </param>
13309 <param name="returnData" type="long" dir="return" safearray="yes">
13310 <desc>
13311 Flattened array of all metric data containing sequences of values for
13312 each metric.
13313 </desc>
13314 </param>
13315 </method>
13316
13317 </interface>
13318
13319 <module name="VBoxSVC" context="LocalServer">
13320 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13321 namespace="virtualbox.org">
13322 <interface name="IVirtualBox" default="yes"/>
13323 </class>
13324 </module>
13325
13326 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13327 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13328 namespace="virtualbox.org">
13329 <interface name="ISession" default="yes"/>
13330 </class>
13331 </module>
13332
13333</library>
13334
13335</idl>
13336
13337<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

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