VirtualBox

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

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

IMedium: improve wording; correct typos.

  • Property svn:eol-style set to native
File size: 486.0 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="MachineState"
363 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
364 >
365 <desc>
366 Virtual machine execution state.
367
368 This enumeration represents possible values of the <link
369 to="IMachine::state"/> attribute.
370
371 Below is the basic virtual machine state diagram. It shows how the state
372 changes during virtual machine execution. The text in square braces shows
373 a method of the IConsole interface that performs the given state
374 transition.
375
376 <pre>
377 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
378 V |
379 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
380 | | | | V |
381 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
382 | | ^ | ^ |
383 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
384 | ^ | | | |
385 | | +-----------------------------------------+-|-------------------+ +
386 | | | | |
387 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
388 | | | |
389 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
390 | | |
391 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
392 </pre>
393
394 Note that states to the right from PoweredOff, Aborted and Saved in the
395 above diagram are called <i>online VM states</i>. These states
396 represent the virtual machine which is being executed in a dedicated
397 process (usually with a GUI window attached to it where you can see the
398 activity of the virtual machine and interact with it). There are two
399 special pseudo-states, FirstOnline and LastOnline, that can be used in
400 relational expressions to detect if the given machine state is online or
401 not:
402
403 <pre>
404 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
405 machine.GetState() &lt;= MachineState_LastOnline)
406 {
407 ...the machine is being executed...
408 }
409 </pre>
410
411 When the virtual machine is in one of the online VM states (that is, being
412 executed), only a few machine settings can be modified. Methods working
413 with such settings contain an explicit note about that. An attempt to
414 change any oter setting or perform a modifying operation during this time
415 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
416
417 All online states except Running, Paused and Stuck are transitional: they
418 represent temporary conditions of the virtual machine that will last as
419 long as the operation that initiated such a condition.
420
421 The Stuck state is a special case. It means that execution of the machine
422 has reached the "Guru Meditation" condition. This condition indicates an
423 internal VMM (virtual machine manager) failure which may happen as a
424 result of either an unhandled low-level virtual hardware exception or one
425 of the recompiler exceptions (such as the <i>too-many-traps</i>
426 condition).
427
428 Note also that any online VM state may transit to the Aborted state. This
429 happens if the process that is executing the virtual machine terminates
430 unexpectedly (for example, crashes). Other than that, the Aborted state is
431 equivalent to PoweredOff.
432
433 There are also a few additional state diagrams that do not deal with
434 virtual machine execution and therefore are shown separately. The states
435 shown on these diagrams are called <i>offline VM states</i> (this includes
436 PoweredOff, Aborted and Saved too).
437
438 The first diagram shows what happens when a lengthy setup operation is
439 being executed (such as <link to="IMachine::attachHardDisk"/>).
440
441 <pre>
442 +-----------------------------------(same sate as before the call)------+
443 | |
444 +-&gt; PoweredOff --+ |
445 | | |
446 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
447 | |
448 +-&gt; Saved -------+
449 </pre>
450
451 The next two diagrams demonstrate the process of taking a snapshot of a
452 powered off virtual machine and performing one of the "discard..."
453 operations, respectively.
454
455 <pre>
456 +-----------------------------------(same sate as before the call)------+
457 | |
458 +-&gt; PoweredOff --+ |
459 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
460 +-&gt; Aborted -----+
461
462 +-&gt; PoweredOff --+
463 | |
464 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
465 | | [discardCurrentState()] |
466 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
467 | |
468 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
469 </pre>
470
471 Note that the Saving state is present in both the offline state group and
472 online state group. Currently, the only way to determine what group is
473 assumed in a particular case is to remember the previous machine state: if
474 it was Running or Paused, then Saving is an online state, otherwise it is
475 an offline state. This inconsistency may be removed in one of the future
476 versions of VirtualBox by adding a new state.
477
478 <note internal="yes">
479 For whoever decides to touch this enum: In order to keep the
480 comparisons involving FirstOnline and LastOnline pseudo-states valid,
481 the numeric values of these states must be correspondingly updated if
482 needed: for any online VM state, the condition
483 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
484 <tt>true</tt>. The same relates to transient states for which
485 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
486 <tt>true</tt>.
487 </note>
488 </desc>
489
490 <const name="Null" value="0">
491 <desc>Null value (nver used by the API).</desc>
492 </const>
493 <const name="PoweredOff" value="1">
494 <desc>
495 The machine is not running.
496 </desc>
497 </const>
498 <const name="Saved" value="2">
499 <desc>
500 The machine is not currently running, but the execution state of the machine
501 has been saved to an external file when it was running.
502 </desc>
503 </const>
504 <const name="Aborted" value="3">
505 <desc>
506 The process running the machine has terminated abnormally.
507 </desc>
508 </const>
509 <const name="Running" value="4">
510 <desc>
511 The machine is currently being executed.
512 <note internal="yes">
513 For whoever decides to touch this enum: In order to keep the
514 comparisons in the old source code valid, this state must immediately
515 precede the Paused state.
516 </note>
517 </desc>
518 </const>
519 <const name="Paused" value="5">
520 <desc>
521 Execution of the machine has been paused.
522 <note internal="yes">
523 For whoever decides to touch this enum: In order to keep the
524 comparisons in the old source code valid, this state must immediately
525 follow the Running state.
526 </note>
527 </desc>
528 </const>
529 <const name="Stuck" value="6">
530 <desc>
531 Execution of the machine has reached the "Guru Meditation"
532 condition.
533 </desc>
534 </const>
535 <const name="Starting" value="7">
536 <desc>
537 Machine is being started after powering it on from a
538 zero execution state.
539 </desc>
540 </const>
541 <const name="Stopping" value="8">
542 <desc>
543 Machine is being normally stopped powering it off, or after the guest OS
544 has initiated a shutdown sequence.
545 </desc>
546 </const>
547 <const name="Saving" value="9">
548 <desc>
549 Machine is saving its execution state to a file or an online
550 snapshot of the machine is being taken.
551 </desc>
552 </const>
553 <const name="Restoring" value="10">
554 <desc>
555 Execution state of the machine is being restored from a file
556 after powering it on from the saved execution state.
557 </desc>
558 </const>
559 <const name="Discarding" value="11">
560 <desc>
561 Snapshot of the machine is being discarded.
562 </desc>
563 </const>
564 <const name="SettingUp" value="12">
565 <desc>
566 Lengthy setup operation is in progress.
567 </desc>
568 </const>
569
570 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
571 <desc>
572 Pseudo-state: first online state (for use in relational expressions).
573 </desc>
574 </const>
575 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
576 <desc>
577 Pseudo-state: last online state (for use in relational expressions).
578 </desc>
579 </const>
580
581 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
582 <desc>
583 Pseudo-state: first transient state (for use in relational expressions).
584 </desc>
585 </const>
586 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
587 <desc>
588 Pseudo-state: last transient state (for use in relational expressions).
589 </desc>
590 </const>
591
592 </enum>
593
594 <enum
595 name="SessionState"
596 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
597 >
598 <desc>
599 Session state. This enumeration represents possible values of
600 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
601 attributes. See individual enumerator descriptions for the meaning for
602 every value.
603 </desc>
604
605 <const name="Null" value="0">
606 <desc>Null value (never used by the API).</desc>
607 </const>
608 <const name="Closed" value="1">
609 <desc>
610 The machine has no open sessions (<link to="IMachine::sessionState"/>);
611 the session is closed (<link to="ISession::state"/>)
612 </desc>
613 </const>
614 <const name="Open" value="2">
615 <desc>
616 The machine has an open direct session (<link to="IMachine::sessionState"/>);
617 the session is open (<link to="ISession::state"/>)
618 </desc>
619 </const>
620 <const name="Spawning" value="3">
621 <desc>
622 A new (direct) session is being opened for the machine
623 as a result of <link to="IVirtualBox::openRemoteSession"/>
624 call (<link to="IMachine::sessionState"/>);
625 the session is currently being opened
626 as a result of <link to="IVirtualBox::openRemoteSession"/>
627 call (<link to="ISession::state"/>)
628 </desc>
629 </const>
630 <const name="Closing" value="4">
631 <desc>
632 The direct session is being closed (<link to="IMachine::sessionState"/>);
633 the session is being closed (<link to="ISession::state"/>)
634 </desc>
635 </const>
636 </enum>
637
638 <enum
639 name="SessionType"
640 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
641 >
642 <desc>
643 Session type. This enumeration represents possible values of the
644 <link to="ISession::type"/> attribute.
645 </desc>
646
647 <const name="Null" value="0">
648 <desc>Null value (never used by the API).</desc>
649 </const>
650 <const name="Direct" value="1">
651 <desc>
652 Direct session
653 (opened by <link to="IVirtualBox::openSession"/>)
654 </desc>
655 </const>
656 <const name="Remote" value="2">
657 <desc>
658 Remote session
659 (opened by <link to="IVirtualBox::openRemoteSession"/>)
660 </desc>
661 </const>
662 <const name="Existing" value="3">
663 <desc>
664 Existing session
665 (opened by <link to="IVirtualBox::openExistingSession"/>)
666 </desc>
667 </const>
668 </enum>
669
670 <enum
671 name="DeviceType"
672 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
673 >
674 <desc>
675 Device type.
676 </desc>
677 <const name="Null" value="0">
678 <desc>
679 Null value, may also mean "no device" (not allowed for
680 <link to="IConsole::getDeviceActivity"/>).
681 </desc>
682 </const>
683 <const name="Floppy" value="1">
684 <desc>Floppy device.</desc>
685 </const>
686 <const name="DVD" value="2">
687 <desc>CD/DVD-ROM device.</desc>
688 </const>
689 <const name="HardDisk" value="3">
690 <desc>Hard disk device.</desc>
691 </const>
692 <const name="Network" value="4">
693 <desc>Network device.</desc>
694 </const>
695 <const name="USB" value="5">
696 <desc>USB device.</desc>
697 </const>
698 <const name="SharedFolder" value="6">
699 <desc>Shared folder device.</desc>
700 </const>
701 </enum>
702
703 <enum
704 name="DeviceActivity"
705 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
706 >
707 <desc>
708 Device activity for <link to="IConsole::getDeviceActivity"/>.
709 </desc>
710
711 <const name="Null" value="0"/>
712 <const name="Idle" value="1"/>
713 <const name="Reading" value="2"/>
714 <const name="Writing" value="3"/>
715 </enum>
716
717 <enum
718 name="ClipboardMode"
719 uuid="33364716-4008-4701-8f14-be0fa3d62950"
720 >
721 <desc>
722 Host-Guest clipboard interchange mode.
723 </desc>
724
725 <const name="Disabled" value="0"/>
726 <const name="HostToGuest" value="1"/>
727 <const name="GuestToHost" value="2"/>
728 <const name="Bidirectional" value="3"/>
729 </enum>
730
731 <enum
732 name="Scope"
733 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
734 >
735 <desc>
736 Scope of the operation.
737
738 A generic enumeration used in various methods to define the action or
739 argument scope.
740 </desc>
741
742 <const name="Global" value="0"/>
743 <const name="Machine" value="1"/>
744 <const name="Session" value="2"/>
745 </enum>
746
747 <enum
748 name="GuestStatisticType"
749 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
750 >
751 <desc>
752 Statistics type for <link to="IGuest::getStatistic"/>.
753 </desc>
754
755 <const name="CPULoad_Idle" value="0">
756 <desc>
757 Idle CPU load (0-100%) for last interval.
758 </desc>
759 </const>
760 <const name="CPULoad_Kernel" value="1">
761 <desc>
762 Kernel CPU load (0-100%) for last interval.
763 </desc>
764 </const>
765 <const name="CPULoad_User" value="2">
766 <desc>
767 User CPU load (0-100%) for last interval.
768 </desc>
769 </const>
770 <const name="Threads" value="3">
771 <desc>
772 Total number of threads in the system.
773 </desc>
774 </const>
775 <const name="Processes" value="4">
776 <desc>
777 Total number of processes in the system.
778 </desc>
779 </const>
780 <const name="Handles" value="5">
781 <desc>
782 Total number of handles in the system.
783 </desc>
784 </const>
785 <const name="MemoryLoad" value="6">
786 <desc>
787 Memory load (0-100%).
788 </desc>
789 </const>
790 <const name="PhysMemTotal" value="7">
791 <desc>
792 Total physical memory in megabytes.
793 </desc>
794 </const>
795 <const name="PhysMemAvailable" value="8">
796 <desc>
797 Free physical memory in megabytes.
798 </desc>
799 </const>
800 <const name="PhysMemBalloon" value="9">
801 <desc>
802 Ballooned physical memory in megabytes.
803 </desc>
804 </const>
805 <const name="MemCommitTotal" value="10">
806 <desc>
807 Total amount of memory in the committed state in megabytes.
808 </desc>
809 </const>
810 <const name="MemKernelTotal" value="11">
811 <desc>
812 Total amount of memory used by the guest OS's kernel in megabytes.
813 </desc>
814 </const>
815 <const name="MemKernelPaged" value="12">
816 <desc>
817 Total amount of paged memory used by the guest OS's kernel in megabytes.
818 </desc>
819 </const>
820 <const name="MemKernelNonpaged" value="13">
821 <desc>
822 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
823 </desc>
824 </const>
825 <const name="MemSystemCache" value="14">
826 <desc>
827 Total amount of memory used by the guest OS's system cache in megabytes.
828 </desc>
829 </const>
830 <const name="PageFileSize" value="15">
831 <desc>
832 Pagefile size in megabytes.
833 </desc>
834 </const>
835 <const name="SampleNumber" value="16">
836 <desc>
837 Statistics sample number
838 </desc>
839 </const>
840 <const name="MaxVal" value="17"/>
841 </enum>
842
843 <enum
844 name="BIOSBootMenuMode"
845 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
846 >
847 <desc>
848 BIOS boot menu mode.
849 </desc>
850
851 <const name="Disabled" value="0"/>
852 <const name="MenuOnly" value="1"/>
853 <const name="MessageAndMenu" value="2"/>
854 </enum>
855
856 <enum
857 name="DriveState"
858 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
859 >
860 <const name="Null" value="0">
861 <desc>Null value (never used by the API).</desc>
862 </const>
863 <const name="NotMounted" value="1"/>
864 <const name="ImageMounted" value="2"/>
865 <const name="HostDriveCaptured" value="3"/>
866 </enum>
867
868 <enum
869 name="ProcessorFeature"
870 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
871 >
872 <desc>
873 CPU features.
874 </desc>
875
876 <const name="HWVirtEx" value="0"/>
877 <const name="PAE" value="1"/>
878 <const name="LongMode" value="2"/>
879 </enum>
880
881
882 <!--
883 // IVirtualBoxErrorInfo
884 /////////////////////////////////////////////////////////////////////////
885 -->
886
887 <interface
888 name="IVirtualBoxErrorInfo" extends="$errorinfo"
889 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
890 supportsErrorInfo="no"
891 wsmap="suppress"
892 >
893 <desc>
894 The IVirtualBoxErrorInfo interface represents extended error information.
895
896 Extended error information can be set by VirtualBox components after
897 unsuccessful or partially successful method invocation. This information
898 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
899 and then shown to the client in addition to the plain 32-bit result code.
900
901 In MS COM, this interface extends the IErrorInfo interface,
902 in XPCOM, it extends the nsIException interface. In both cases,
903 it provides a set of common attributes to retrieve error
904 information.
905
906 Sometimes invocation of some component's method may involve methods of
907 other components that may also fail (independently of this method's
908 failure), or a series of non-fatal errors may precede a fatal error that
909 causes method failure. In cases like that, it may be desirable to preserve
910 information about all errors happened during method invocation and deliver
911 it to the caller. The <link to="#next"/> attribute is intended
912 specifically for this purpose and allows to represent a chain of errors
913 through a single IVirtualBoxErrorInfo object set after method invocation.
914
915 Note that errors are stored to a chain in the reverse order, i.e. the
916 initial error object you query right after method invocation is the last
917 error set by the callee, the object it points to in the @a next attribute
918 is the previous error and so on, up to the first error (which is the last
919 in the chain).
920 </desc>
921
922 <attribute name="resultCode" type="result" readonly="yes">
923 <desc>
924 Result code of the error.
925 Usually, it will be the same as the result code returned
926 by the method that provided this error information, but not
927 always. For example, on Win32, CoCreateInstance() will most
928 likely return E_NOINTERFACE upon unsuccessful component
929 instantiation attempt, but not the value the component factory
930 returned.
931 <note>
932 In MS COM, there is no equivalent.
933 In XPCOM, it is the same as nsIException::result.
934 </note>
935 </desc>
936 </attribute>
937
938 <attribute name="interfaceID" type="uuid" readonly="yes">
939 <desc>
940 UUID of the interface that defined the error.
941 <note>
942 In MS COM, it is the same as IErrorInfo::GetGUID.
943 In XPCOM, there is no equivalent.
944 </note>
945 </desc>
946 </attribute>
947
948 <attribute name="component" type="wstring" readonly="yes">
949 <desc>
950 Name of the component that generated the error.
951 <note>
952 In MS COM, it is the same as IErrorInfo::GetSource.
953 In XPCOM, there is no equivalent.
954 </note>
955 </desc>
956 </attribute>
957
958 <attribute name="text" type="wstring" readonly="yes">
959 <desc>
960 Text description of the error.
961 <note>
962 In MS COM, it is the same as IErrorInfo::GetDescription.
963 In XPCOM, it is the same as nsIException::message.
964 </note>
965 </desc>
966 </attribute>
967
968 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
969 <desc>
970 Next error object if there is any, or @c null otherwise.
971 <note>
972 In MS COM, there is no equivalent.
973 In XPCOM, it is the same as nsIException::inner.
974 </note>
975 </desc>
976 </attribute>
977
978 </interface>
979
980
981 <!--
982 // IVirtualBox
983 /////////////////////////////////////////////////////////////////////////
984 -->
985
986 <interface
987 name="IVirtualBoxCallback" extends="$unknown"
988 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
989 wsmap="suppress"
990 >
991 <method name="onMachineStateChange">
992 <desc>
993 The execution state of the given machine has changed.
994 <see>IMachine::state</see>
995 </desc>
996 <param name="machineId" type="uuid" dir="in">
997 <desc>ID of the machine this event relates to.</desc>
998 </param>
999 <param name="state" type="MachineState" dir="in">
1000 <desc>New execution state.</desc>
1001 </param>
1002 </method>
1003
1004 <method name="onMachineDataChange">
1005 <desc>
1006 Any of the settings of the given machine has changed.
1007 </desc>
1008 <param name="machineId" type="uuid" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 </method>
1012
1013 <method name="onExtraDataCanChange">
1014 <desc>
1015 Notification when someone tries to change extra data for
1016 either the given machine or (if null) global extra data.
1017 This gives the chance to veto against changes.
1018 </desc>
1019 <param name="machineId" type="uuid" dir="in">
1020 <desc>
1021 ID of the machine this event relates to
1022 (null ID for global extra data change requests).
1023 </desc>
1024 </param>
1025 <param name="key" type="wstring" dir="in">
1026 <desc>
1027 Extra data key for the attempted write.
1028 </desc>
1029 </param>
1030 <param name="value" type="wstring" dir="in">
1031 <desc>
1032 Extra data value for the given key.
1033 </desc>
1034 </param>
1035 <param name="error" type="wstring" dir="out">
1036 <desc>
1037 Optional error message describing the reason of the
1038 veto (ignored if this notification returns @c true).
1039 </desc>
1040 </param>
1041 <param name="allowChange" type="boolean" dir="return">
1042 <desc>
1043 Flag to indicate whether the callee agrees (@c true)
1044 or vetoes against the change (@c false).
1045 </desc>
1046 </param>
1047 </method>
1048
1049 <method name="onExtraDataChange">
1050 <desc>
1051 Notification when machine specific or global extra data
1052 has changed.
1053 </desc>
1054 <param name="machineId" type="uuid" dir="in">
1055 <desc>
1056 ID of the machine this event relates to.
1057 Null for global extra data changes.
1058 </desc>
1059 </param>
1060 <param name="key" type="wstring" dir="in">
1061 <desc>
1062 Extra data key that has changed.
1063 </desc>
1064 </param>
1065 <param name="value" type="wstring" dir="in">
1066 <desc>
1067 Extra data value for the given key.
1068 </desc>
1069 </param>
1070 </method>
1071
1072 <method name="onMediaRegistered">
1073 <desc>
1074 The given media was registered or unregistered
1075 within this VirtualBox installation.
1076
1077 The @a mediaType parameter describes what type of
1078 media the specified @a mediaId refers to. Possible
1079 values are:
1080
1081 <ul>
1082 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1083 that, if registered, can be obtained using the
1084 <link to="IVirtualBox::getHardDisk"/> call.</li>
1085 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1086 that, if registered, can be obtained using the
1087 <link to="IVirtualBox::getDVDImage"/> call.</li>
1088 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1089 that, if registered, can be obtained using the
1090 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1091 </ul>
1092
1093 Note that if this is a deregistration notification,
1094 there is no way to access the object representing the
1095 unregistered media. It is supposed that the
1096 application will do required cleanup based on the
1097 @a mediaId value.
1098 </desc>
1099 <param name="mediaId" type="uuid" dir="in">
1100 <desc>ID of the media this event relates to.</desc>
1101 </param>
1102 <param name="mediaType" type="DeviceType" dir="in">
1103 <desc>Type of the media this event relates to.</desc>
1104 </param>
1105 <param name="registered" type="boolean" dir="in">
1106 <desc>
1107 If true, the media was registered, otherwise it was
1108 unregistered.
1109 </desc>
1110 </param>
1111 </method>
1112
1113 <method name="onMachineRegistered">
1114 <desc>
1115 The given machine was registered or unregistered
1116 within this VirtualBox installation.
1117 </desc>
1118 <param name="machineId" type="uuid" dir="in">
1119 <desc>ID of the machine this event relates to.</desc>
1120 </param>
1121 <param name="registered" type="boolean" dir="in">
1122 <desc>
1123 If true, the machine was registered, otherwise it was
1124 unregistered.
1125 </desc>
1126 </param>
1127 </method>
1128
1129 <method name="onSessionStateChange">
1130 <desc>
1131 The state of the session for the given machine was changed.
1132 <see>IMachine::sessionState</see>
1133 </desc>
1134 <param name="machineId" type="uuid" dir="in">
1135 <desc>ID of the machine this event relates to.</desc>
1136 </param>
1137 <param name="state" type="SessionState" dir="in">
1138 <desc>New session state.</desc>
1139 </param>
1140 </method>
1141
1142 <method name="onSnapshotTaken">
1143 <desc>
1144 A new snapshot of the machine has been taken.
1145 <see>ISnapshot</see>
1146 </desc>
1147 <param name="machineId" type="uuid" dir="in">
1148 <desc>ID of the machine this event relates to.</desc>
1149 </param>
1150 <param name="snapshotId" type="uuid" dir="in">
1151 <desc>ID of the new snapshot.</desc>
1152 </param>
1153 </method>
1154
1155 <method name="onSnapshotDiscarded">
1156 <desc>
1157 Snapshot of the given machine has been discarded.
1158
1159 <note>
1160 This notification is delivered <b>after</b> the snapshot
1161 object has been uninitialized on the server (so that any
1162 attempt to call its methods will return an error).
1163 </note>
1164
1165 <see>ISnapshot</see>
1166 </desc>
1167 <param name="machineId" type="uuid" dir="in">
1168 <desc>ID of the machine this event relates to.</desc>
1169 </param>
1170 <param name="snapshotId" type="uuid" dir="in">
1171 <desc>
1172 ID of the discarded snapshot. <tt>null</tt> means the
1173 current machine state has been discarded (restored from
1174 the current snapshot).
1175 </desc>
1176 </param>
1177 </method>
1178
1179 <method name="onSnapshotChange">
1180 <desc>
1181 Snapshot properties (name and/or description) have been changed.
1182 <see>ISnapshot</see>
1183 </desc>
1184 <param name="machineId" type="uuid" dir="in">
1185 <desc>ID of the machine this event relates to.</desc>
1186 </param>
1187 <param name="snapshotId" type="uuid" dir="in">
1188 <desc>ID of the changed snapshot.</desc>
1189 </param>
1190 </method>
1191
1192 <method name="onGuestPropertyChange">
1193 <desc>
1194 Notification when a guest property has changed.
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>
1198 ID of the machine this event relates to.
1199 </desc>
1200 </param>
1201 <param name="name" type="wstring" dir="in">
1202 <desc>
1203 The name of the property that has changed.
1204 </desc>
1205 </param>
1206 <param name="value" type="wstring" dir="in">
1207 <desc>
1208 The new property value.
1209 </desc>
1210 </param>
1211 <param name="flags" type="wstring" dir="in">
1212 <desc>
1213 The new property flags.
1214 </desc>
1215 </param>
1216 </method>
1217
1218 </interface>
1219
1220 <interface
1221 name="IDHCPServer" extends="$unknown"
1222 uuid="fab58256-c76e-4ddd-8029-18343e5b0069"
1223 wsmap="managed"
1224 >
1225 <desc>
1226 The IDHCPServer interface represents the vbox dhcp server configuration.
1227
1228 To enumerate all the dhcp servers on the host, use the
1229 <link to="IVirtualBox::DHCPServers"/> attribute.
1230 </desc>
1231
1232 <attribute name="enabled" type="boolean">
1233 <desc>
1234 specifies if the dhcp server is enabled
1235 </desc>
1236 </attribute>
1237
1238 <attribute name="IPAddress" type="wstring" readonly="yes">
1239 <desc>
1240 specifies server IP
1241 </desc>
1242 </attribute>
1243
1244 <attribute name="networkMask" type="wstring" readonly="yes">
1245 <desc>
1246 specifies server network mask
1247 </desc>
1248 </attribute>
1249
1250 <attribute name="networkName" type="wstring" readonly="yes">
1251 <desc>
1252 specifies internal network name the server is used for
1253 </desc>
1254 </attribute>
1255
1256 <attribute name="lowerIP" type="wstring" readonly="yes">
1257 <desc>
1258 specifies from IP adrres in server address range
1259 </desc>
1260 </attribute>
1261
1262 <attribute name="upperIP" type="wstring" readonly="yes">
1263 <desc>
1264 specifies to IP adrres in server address range
1265 </desc>
1266 </attribute>
1267
1268 <method name="setConfiguration">
1269 <desc>
1270 configures the server
1271 <result name="E_INVALIDARG">
1272 invalid configuration supplied
1273 </result>
1274 </desc>
1275 <param name="IPAddress" type="wstring" dir="in">
1276 <desc>
1277 server IP address
1278 </desc>
1279 </param>
1280 <param name="networkMask" type="wstring" dir="in">
1281 <desc>
1282 server network mask
1283 </desc>
1284 </param>
1285 <param name="FromIPAddress" type="wstring" dir="in">
1286 <desc>
1287 server From IP address for address range
1288 </desc>
1289 </param>
1290 <param name="ToIPAddress" type="wstring" dir="in">
1291 <desc>
1292 server To IP address for address range
1293 </desc>
1294 </param>
1295 </method>
1296 </interface>
1297
1298 <interface
1299 name="IVirtualBox" extends="$dispatched"
1300 uuid="779264f4-65ed-48ed-be39-518ca549e296"
1301 wsmap="managed"
1302 >
1303 <desc>
1304 The IVirtualBox interface represents the main interface exposed by the
1305 product that provides virtual machine management.
1306
1307 An instance of IVirtualBox is required for the product to do anything
1308 useful. Even though the interface does not expose this, internally,
1309 IVirtualBox is implemented as a singleton and actually lives in the
1310 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1311 IVirtualBox can track the state of all virtual machines on a particular
1312 host, regardless of which frontend started them.
1313
1314 To enumerate all the virtual machines on the host, use the
1315 <link to="IVirtualBox::machines"/> attribute.
1316 </desc>
1317
1318 <attribute name="version" type="wstring" readonly="yes">
1319 <desc>
1320 A string representing the version number of the product. The
1321 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1322 last number represents the build number and will frequently change.
1323 </desc>
1324 </attribute>
1325
1326 <attribute name="revision" type="unsigned long" readonly="yes">
1327 <desc>
1328 The internal build revision number of the product.
1329 </desc>
1330 </attribute>
1331
1332 <attribute name="packageType" type="wstring" readonly="yes">
1333 <desc>
1334 A string representing the package type of this product. The
1335 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1336 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1337 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1338 this.
1339 </desc>
1340 </attribute>
1341
1342 <attribute name="homeFolder" type="wstring" readonly="yes">
1343 <desc>
1344 Full path to the directory where the global settings file,
1345 <tt>VirtualBox.xml</tt>, is stored.
1346
1347 In this version of VirtualBox, the value of this property is
1348 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1349 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1350 as determined by the host OS), and cannot be changed.
1351
1352 This path is also used as the base to resolve relative paths in
1353 places where relative paths are allowed (unless otherwise
1354 expressly indicated).
1355 </desc>
1356 </attribute>
1357
1358 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1359 <desc>
1360 Full name of the global settings file.
1361 The value of this property corresponds to the value of
1362 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1363 </desc>
1364 </attribute>
1365
1366 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1367 <desc>
1368 Current version of the format of the global VirtualBox settings file
1369 (<tt>VirtualBox.xml</tt>).
1370
1371 The version string has the following format:
1372 <pre>
1373 x.y-platform
1374 </pre>
1375 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1376 versions, and <tt>platform</tt> is the platform identifier.
1377
1378 The current version usually matches the value of the
1379 <link to="#settingsFormatVersion"/> attribute unless the
1380 settings file was created by an older version of VirtualBox and there
1381 was a change of the settings file format since then.
1382
1383 Note that VirtualBox automatically converts settings files from older
1384 versions to the most recent version when reading them (usually at
1385 VirtualBox startup) but it doesn't save the changes back until
1386 you call a method that implicitly saves settings (such as
1387 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1388 explicitly. Therefore, if the value of this attribute differs from the
1389 value of <link to="#settingsFormatVersion"/>, then it
1390 means that the settings file was converted but the result of the
1391 conversion is not yet saved to disk.
1392
1393 The above feature may be used by interactive front-ends to inform users
1394 about the settings file format change and offer them to explicitly save
1395 all converted settings files (the global and VM-specific ones),
1396 optionally create backup copies of the old settings files before saving,
1397 etc.
1398
1399 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1404 <desc>
1405 Most recent version of the settings file format.
1406
1407 The version string has the following format:
1408 <pre>
1409 x.y-platform
1410 </pre>
1411 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1412 versions, and <tt>platform</tt> is the platform identifier.
1413
1414 VirtualBox uses this version of the format when saving settings files
1415 (either as a result of method calls that require to save settings or as
1416 a result of an explicit call to <link to="#saveSettings"/>).
1417
1418 <see>settingsFileVersion</see>
1419 </desc>
1420 </attribute>
1421
1422 <attribute name="host" type="IHost" readonly="yes">
1423 <desc>Associated host object.</desc>
1424 </attribute>
1425
1426 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1427 <desc>Associated system information object.</desc>
1428 </attribute>
1429
1430 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1431 <desc>
1432 Array of machine objects registered within this VirtualBox instance.
1433 </desc>
1434 </attribute>
1435
1436 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1437 <desc>
1438 Array of hard disk objects known to this VirtualBox installation.
1439
1440 This array contains only base (root) hard disks. All differencing
1441 hard disks of the given base hard disk can be enumerated using
1442 <link to="IHardDisk::children"/>.
1443 </desc>
1444 </attribute>
1445
1446 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1447 <desc>
1448 Array of CD/DVD image objects registered with this VirtualBox instance.
1449 </desc>
1450 </attribute>
1451
1452 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1453 <desc>
1454 Array of floppy image objects registered with this VirtualBox instance.
1455 </desc>
1456 </attribute>
1457
1458 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1459
1460 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1461
1462 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1463 <desc>
1464 Collection of global shared folders. Global shared folders are
1465 available to all virtual machines.
1466
1467 New shared folders are added to the collection using
1468 <link to="#createSharedFolder"/>. Existing shared folders can be
1469 removed using <link to="#removeSharedFolder"/>.
1470
1471 <note>
1472 In the current version of the product, global shared folders are not
1473 implemented and therefore this collection is always empty.
1474 </note>
1475 </desc>
1476 </attribute>
1477
1478 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1479 <desc>
1480 Associated performance collector object.
1481 </desc>
1482 </attribute>
1483
1484 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1485 <desc>
1486 dhcp server settings.
1487 </desc>
1488 </attribute>
1489
1490 <method name="createMachine">
1491 <desc>
1492 Creates a new virtual machine.
1493
1494 The new machine is created unregistered, with the initial configuration
1495 set according to the specified guest OS type. A typical sequence of
1496 actions to create a new virtual machine is as follows:
1497
1498 <ol>
1499 <li>
1500 Call this method to have a new machine created. The returned machine
1501 object will be "mutable" allowing to change any machine property.
1502 </li>
1503
1504 <li>
1505 Configure the machine using the appropriate attributes and methods.
1506 </li>
1507
1508 <li>
1509 Call <link to="IMachine::saveSettings" /> to write the settings
1510 to the machine's XML settings file. The configuration of the newly
1511 created machine will not be saved to disk until this method is
1512 called.
1513 </li>
1514
1515 <li>
1516 Call <link to="#registerMachine" /> to add the machine to the list
1517 of machines known to VirtualBox.
1518 </li>
1519 </ol>
1520
1521 You should specify valid name for the newly created machine when calling
1522 this method. See the <link to="IMachine::name"/> attribute description
1523 for more details about the machine name.
1524
1525 The specified guest OS type identifier must match an ID of one of known
1526 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1527 array.
1528
1529 Every machine has a <i>settings file</i> that is used to store
1530 the machine configuration. This file is stored in a directory called the
1531 <i>machine settings subfolder</i>. Both the settings subfolder and file
1532 will have a name that corresponds to the name of the virtual machine.
1533 You can specify where to create the machine setting subfolder using the
1534 @a baseFolder argument. The base folder can be absolute (full path) or
1535 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1536 directory</link>.
1537
1538 If @a baseFolder is a null or empty string (which is recommended), the
1539 <link to="ISystemProperties::defaultMachineFolder">default machine
1540 settings folder</link> will be used as a base folder for the created
1541 machine. Otherwise the given base folder will be used. In either case,
1542 the full path to the resulting settings file has the following
1543 structure:
1544 <pre>
1545 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1546 </pre>
1547
1548 Note that if the resulting settings file already exists, this method
1549 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1550
1551 Optionally, you may specify an UUID of to assign to the created machine.
1552 However, this is not recommended and you should normally pass an empty
1553 (null) UUID to this method so that a new UUID will be automatically
1554 generated for every created machine. You can use UUID
1555 00000000-0000-0000-0000-000000000000 as null value.
1556
1557 <note>
1558 There is no way to change the name of the settings file or
1559 subfolder of the created machine directly.
1560 </note>
1561
1562 <result name="VBOX_E_OBJECT_NOT_FOUND">
1563 @a osTypeId is invalid.
1564 </result>
1565 <result name="VBOX_E_FILE_ERROR">
1566 Resulting settings file name is invalid or the settings file already
1567 exists or could not be created due to an I/O error.
1568 </result>
1569 <result name="E_INVALIDARG">
1570 @a name is empty or null.
1571 </result>
1572 </desc>
1573
1574 <param name="name" type="wstring" dir="in">
1575 <desc>Machine name.</desc>
1576 </param>
1577 <param name="osTypeId" type="wstring" dir="in">
1578 <desc>Guest OS Type ID.</desc>
1579 </param>
1580 <param name="baseFolder" type="wstring" dir="in">
1581 <desc>Base machine folder (optional).</desc>
1582 </param>
1583 <param name="id" type="uuid" dir="in">
1584 <desc>Machine UUID (optional).</desc>
1585 </param>
1586 <param name="machine" type="IMachine" dir="return">
1587 <desc>Created machine object.</desc>
1588 </param>
1589 </method>
1590
1591 <method name="createLegacyMachine">
1592 <desc>
1593 Creates a new virtual machine in "legacy" mode, using the specified
1594 settings file to store machine settings.
1595
1596 As opposed to machines created by <link to="#createMachine"/>,
1597 the settings file of the machine created in "legacy" mode is not
1598 automatically renamed when the machine name is changed -- it will always
1599 remain the same as specified in this method call.
1600
1601 The specified settings file name can be absolute (full path) or relative
1602 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1603 directory</link>. If the file name doesn't contain an extension, the
1604 default extension (.xml) will be appended.
1605
1606 Note that the configuration of the newly created machine is not
1607 saved to disk (and therefore no settings file is created)
1608 until <link to="IMachine::saveSettings"/> is called. If the
1609 specified settings file already exists, this method
1610 will fail with <link to="VBOX_E_FILE_ERROR"/>..
1611
1612 See <link to="#createMachine"/> for more information.
1613
1614 @deprecated This method may be removed later. Use <link
1615 to="IVirtualBox::createMachine"/> instead.
1616
1617 <note>
1618 There is no way to change the name of the settings file
1619 of the machine created in "legacy" mode.
1620 </note>
1621
1622 <result name="VBOX_E_OBJECT_NOT_FOUND">
1623 @a osTypeId is invalid.
1624 </result>
1625 <result name="VBOX_E_FILE_ERROR">
1626 @a settingsFile is invalid or the settings file already exists or
1627 could not be created due to an I/O error.
1628 </result>
1629 <result name="E_INVALIDARG">
1630 @a name or @a settingsFile is empty or null.
1631 </result>
1632 </desc>
1633
1634 <param name="name" type="wstring" dir="in">
1635 <desc>Machine name.</desc>
1636 </param>
1637 <param name="osTypeId" type="wstring" dir="in">
1638 <desc>Machine OS Type ID.</desc>
1639 </param>
1640 <param name="settingsFile" type="wstring" dir="in">
1641 <desc>Name of the machine settings file.</desc>
1642 </param>
1643 <param name="id" type="uuid" dir="in">
1644 <desc>Machine UUID (optional).</desc>
1645 </param>
1646 <param name="machine" type="IMachine" dir="return">
1647 <desc>Created machine object.</desc>
1648 </param>
1649 </method>
1650
1651 <method name="openMachine">
1652 <desc>
1653 Opens a virtual machine from the existing settings file.
1654 The opened machine remains unregistered until you call
1655 <link to="#registerMachine"/>.
1656
1657 The specified settings file name can be absolute
1658 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1659 VirtualBox home directory</link>. This file must exist
1660 and must be a valid machine settings file whose contents
1661 will be used to construct the machine object.
1662
1663 @deprecated Will be removed soon.
1664 <result name="VBOX_E_FILE_ERROR">
1665 Settings file name invalid, not found or sharing violation.
1666 </result>
1667 </desc>
1668 <param name="settingsFile" type="wstring" dir="in">
1669 <desc>
1670 Name of the machine settings file.
1671 </desc>
1672 </param>
1673 <param name="machine" type="IMachine" dir="return">
1674 <desc>Opened machine object.</desc>
1675 </param>
1676 <note>
1677 <link to="IMachine::settingsModified"/> will return
1678 false for the created machine, until any of machine settings
1679 are changed.
1680 </note>
1681 </method>
1682
1683 <method name="registerMachine">
1684 <desc>
1685
1686 Registers the machine previously created using
1687 <link to="#createMachine"/> or opened using
1688 <link to="#openMachine"/> within this VirtualBox installation. After
1689 successful method invocation, the
1690 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1691 to all registered callbacks.
1692
1693 <note>
1694 This method implicitly calls <link to="IMachine::saveSettings"/>
1695 to save all current machine settings before registering it.
1696 </note>
1697
1698 <result name="VBOX_E_OBJECT_NOT_FOUND">
1699 No matching virtual machine found.
1700 </result>
1701 <result name="VBOX_E_INVALID_OBJECT_STATE">
1702 Virtual machine was not created within this VirtualBox instance.
1703 </result>
1704
1705 </desc>
1706 <param name="machine" type="IMachine" dir="in"/>
1707 </method>
1708
1709 <method name="getMachine">
1710 <desc>
1711 Attempts to find a virtual machine given its UUID.
1712 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1713 instead.
1714
1715 <result name="VBOX_E_OBJECT_NOT_FOUND">
1716 Could not find registered machine matching @a id.
1717 </result>
1718
1719 </desc>
1720 <param name="id" type="uuid" dir="in"/>
1721 <param name="machine" type="IMachine" dir="return"/>
1722 </method>
1723
1724 <method name="findMachine">
1725 <desc>
1726 Attempts to find a virtual machine given its name.
1727 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1728 instead.
1729
1730 <result name="VBOX_E_OBJECT_NOT_FOUND">
1731 Could not find registered machine matching @a name.
1732 </result>
1733
1734 </desc>
1735 <param name="name" type="wstring" dir="in"/>
1736 <param name="machine" type="IMachine" dir="return"/>
1737 </method>
1738
1739 <method name="unregisterMachine">
1740 <desc>
1741
1742 Unregisters the machine previously registered using
1743 <link to="#registerMachine"/>. After successful method invocation, the
1744 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1745 to all registered callbacks.
1746
1747 <note>
1748 The specified machine must not be in the Saved state, have an open
1749 (or a spawning) direct session associated with it, have snapshots or
1750 have hard disks attached.
1751 </note>
1752
1753 <note>
1754 This method implicitly calls <link to="IMachine::saveSettings"/> to
1755 save all current machine settings before unregistering it.
1756 </note>
1757
1758 <note>
1759 If the given machine is inaccessible (see
1760 <link to="IMachine::accessible"/>), it will be unregistered and
1761 fully uninitialized right afterwards. As a result, the returned
1762 machine object will be unusable and an attempt to call
1763 <b>any</b> method will return the "Object not ready" error.
1764 </note>
1765
1766 <result name="VBOX_E_OBJECT_NOT_FOUND">
1767 Could not find registered machine matching @a id.
1768 </result>
1769 <result name="VBOX_E_INVALID_VM_STATE">
1770 Machine is in Saved state.
1771 </result>
1772 <result name="VBOX_E_INVALID_OBJECT_STATE">
1773 Machine has snapshot or open session or hard disk attached.
1774 </result>
1775
1776 </desc>
1777 <param name="id" type="uuid" dir="in">
1778 <desc>UUID of the machine to unregister.</desc>
1779 </param>
1780 <param name="machine" type="IMachine" dir="return">
1781 <desc>Unregistered machine object.</desc>
1782 </param>
1783 </method>
1784
1785 <method name="createAppliance">
1786 <desc>
1787 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1788 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1789 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1790 </desc>
1791 <param name="appliance" type="IAppliance" dir="return">
1792 <desc>New appliance.</desc>
1793 </param>
1794 </method>
1795
1796 <method name="createHardDisk">
1797 <desc>
1798 Creates a new base hard disk object that will use the given storage
1799 format and location for hard disk data.
1800
1801 Note that the actual storage unit is not created by this method. In
1802 order to do it, and before you are able to attach the created hard disk
1803 to virtual machines, you must call one of the following methods to
1804 allocate a format-specific storage unit at the specified location:
1805 <ul>
1806 <li><link to="IHardDisk::createBaseStorage"/></li>
1807 <li><link to="IHardDisk::createDiffStorage"/></li>
1808 </ul>
1809
1810 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1811 remain uninitialized until the hard disk storage unit is successfully
1812 created by one of the above methods.
1813
1814 After the storage unit is successfully created, the hard disk gets
1815 remembered by this VirtualBox installation and will be accessible
1816 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1817 methods. Remembered root (base) hard disks are also returned as part of
1818 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1819
1820 The list of all storage formats supported by this VirtualBox
1821 installation can be obtained using
1822 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1823 attribute is empty or <tt>null</tt> then the default storage format
1824 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1825 be used for creating a storage unit of the hard disk.
1826
1827 Note that the format of the location string is storage format specific.
1828 See <link to="IMedium::location"/>, IHardDisk and
1829 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1830
1831 <result name="VBOX_E_OBJECT_NOT_FOUND">
1832 @a format identifier is invalid. See
1833 <link to="ISystemProperties::hardDiskFormats"/>.
1834 </result>
1835 <result name="VBOX_E_FILE_ERROR">
1836 @a location is a not valid file name (for file-based formats only).
1837 </result>
1838 <result name="E_INVALIDARG">
1839 @a format is a null or empty string.
1840 </result>
1841 </desc>
1842 <param name="format" type="wstring" dir="in">
1843 <desc>
1844 Identifier of the storage format to use for the new hard disk.
1845 </desc>
1846 </param>
1847 <param name="location" type="wstring" dir="in">
1848 <desc>
1849 Location of the storage unit for the new hard disk.
1850 </desc>
1851 </param>
1852 <param name="hardDisk" type="IHardDisk" dir="return">
1853 <desc>Created hard disk object.</desc>
1854 </param>
1855 </method>
1856
1857 <method name="openHardDisk">
1858 <desc>
1859 Opens a hard disk from an existing location.
1860
1861 After the hard disk is successfully opened by this method, it gets
1862 remembered by (known to) this VirtualBox installation and will be
1863 accessible through <link to="#getHardDisk"/> and
1864 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1865 are also returned as part of the <link to="#hardDisks"/> array and can
1866 be attached to virtual machines. See IHardDisk for more details.
1867
1868 If a differencing hard disk is to be opened by this method, the
1869 operation will succeed only if its parent hard disk and all ancestors,
1870 if any, are already known to this VirtualBox installation (for example,
1871 were opened by this method before).
1872
1873 This method tries to guess the storage format of the specified hard disk
1874 by reading hard disk data at the specified location.
1875
1876 Note that the format of the location string is storage format specific.
1877 See <link to="IMedium::location"/>, IHardDisk and
1878 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1879
1880
1881 <result name="VBOX_E_FILE_ERROR">
1882 Invalid hard disk storage file location.
1883 </result>
1884 <result name="VBOX_E_IPRT_ERROR">
1885 Could not get hard disk storage format.
1886 </result>
1887 <result name="E_INVALIDARG">
1888 Invalid hard disk storage format.
1889 </result>
1890
1891 </desc>
1892 <param name="location" type="wstring" dir="in">
1893 <desc>
1894 Location of the storage unit that contains hard disk data in one of
1895 the supported storage formats.
1896 </desc>
1897 </param>
1898 <param name="hardDisk" type="IHardDisk" dir="return">
1899 <desc>Opened hard disk object.</desc>
1900 </param>
1901 </method>
1902
1903 <method name="getHardDisk" const="yes">
1904 <desc>
1905 Returns a hard disk with the given UUID.
1906
1907 The hard disk with the given UUID must be known to this VirtualBox
1908 installation, i.e. it must be previously created by
1909 <link to="#createHardDisk"/> or opened by <link
1910 to="#openHardDisk"/>, or attached to some known virtual machine.
1911
1912 <result name="VBOX_E_OBJECT_NOT_FOUND">
1913 No hard disk object matching @a id found.
1914 </result>
1915
1916 </desc>
1917 <param name="id" type="uuid" dir="in">
1918 <desc>UUID of the hard disk to look for.</desc>
1919 </param>
1920 <param name="hardDisk" type="IHardDisk" dir="return">
1921 <desc>Found hard disk object.</desc>
1922 </param>
1923 </method>
1924
1925 <method name="findHardDisk">
1926 <desc>
1927 Returns a hard disk that uses the given location to store hard
1928 disk data.
1929
1930 The given hard disk must be known to this VirtualBox installation, i.e.
1931 it must be previously created by
1932 <link to="#createHardDisk"/> or opened by <link
1933 to="#openHardDisk"/>, or attached to some known virtual machine.
1934
1935 The search is done by comparing the value of the @a location argument to
1936 the <link to="IHardDisk::location"/> attribute of each known hard
1937 disk.
1938
1939 For locations represented by file names in the host's file system, the
1940 requested location can be a path relative to the
1941 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1942 only a file name without any path is given, the
1943 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
1944 folder</link> will be prepended to the file name before searching. Note
1945 that on case sensitive file systems, a case sensitive comparison is
1946 performed, otherwise the case of symbols in the file path is ignored.
1947
1948 <result name="VBOX_E_OBJECT_NOT_FOUND">
1949 No hard disk object matching @a location found.
1950 </result>
1951
1952 </desc>
1953 <param name="location" type="wstring" dir="in">
1954 <desc>Location string to search for.</desc>
1955 </param>
1956 <param name="hardDisk" type="IHardDisk" dir="return">
1957 <desc>Found hard disk object.</desc>
1958 </param>
1959 </method>
1960
1961 <method name="openDVDImage">
1962 <desc>
1963 Opens a CD/DVD image contained in the specified file of the supported
1964 format and assigns it the given UUID.
1965
1966 After the image is successfully opened by this method, it gets
1967 remembered by (known to) this VirtualBox installation and will be
1968 accessible through <link to="#getDVDImage"/> and
1969 <link to="#findDVDImage"/> methods. Remembered images are also
1970 returned as part of the <link to="#DVDImages"/> array and can be mounted
1971 to virtual machines. See IMedium for more details.
1972
1973 See <link to="IMedium::location"/> to get more details about the format
1974 of the location string.
1975
1976 <note>
1977 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
1978 </note>
1979
1980 <result name="VBOX_E_INVALID_OBJECT_STATE">
1981 CD/DVD image already exists in the media registry.
1982 </result>
1983
1984 </desc>
1985 <param name="location" type="wstring" dir="in">
1986 <desc>
1987 Full path to the file that contains a valid CD/DVD image.
1988 </desc>
1989 </param>
1990 <param name="id" type="uuid" dir="in">
1991 <desc>
1992 UUID to assign to the given image within this VirtualBox installation.
1993 If an empty (null) UUID is specified, the system will randomly
1994 generate a new UUID.
1995 </desc>
1996 </param>
1997 <param name="image" type="IDVDImage" dir="return">
1998 <desc>Opened CD/DVD image object.</desc>
1999 </param>
2000 </method>
2001
2002 <method name="getDVDImage">
2003 <desc>
2004 Returns a CD/DVD image with the given UUID.
2005
2006 The image with the given UUID must be known to this VirtualBox
2007 installation, i.e. it must be previously opened by <link
2008 to="#openDVDImage"/>, or mounted to some known virtual machine.
2009
2010 <result name="VBOX_E_OBJECT_NOT_FOUND">
2011 No matching DVD image found in the media registry.
2012 </result>
2013
2014 </desc>
2015 <param name="id" type="uuid" dir="in">
2016 <desc>UUID of the image to look for.</desc>
2017 </param>
2018 <param name="image" type="IDVDImage" dir="return">
2019 <desc>Found CD/DVD image object.</desc>
2020 </param>
2021 </method>
2022
2023 <method name="findDVDImage">
2024 <desc>
2025 Returns a CD/DVD image with the given image location.
2026
2027 The image with the given UUID must be known to this VirtualBox
2028 installation, i.e. it must be previously opened by <link
2029 to="#openDVDImage"/>, or mounted to some known virtual machine.
2030
2031 The search is done by comparing the value of the @a location argument to
2032 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2033
2034 The requested location can be a path relative to the
2035 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2036 only a file name without any path is given, the
2037 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2038 folder</link> will be prepended to the file name before searching. Note
2039 that on case sensitive file systems, a case sensitive comparison is
2040 performed, otherwise the case in the file path is ignored.
2041
2042 <result name="VBOX_E_FILE_ERROR">
2043 Invalid image file location.
2044 </result>
2045 <result name="VBOX_E_OBJECT_NOT_FOUND">
2046 No matching DVD image found in the media registry.
2047 </result>
2048
2049 </desc>
2050 <param name="location" type="wstring" dir="in">
2051 <desc>CD/DVD image file path to look for.</desc>
2052 </param>
2053 <param name="image" type="IDVDImage" dir="return">
2054 <desc>Found CD/DVD image object.</desc>
2055 </param>
2056 </method>
2057
2058 <method name="openFloppyImage">
2059 <desc>
2060 Opens a floppy image contained in the specified file of the supported
2061 format and assigns it the given UUID.
2062
2063 After the image is successfully opened by this method, it gets
2064 remembered by (known to) this VirtualBox installation and will be
2065 accessible through <link to="#getFloppyImage"/> and
2066 <link to="#findFloppyImage"/> methods. Remembered images are also
2067 returned as part of the <link to="#floppyImages"/> array and can be
2068 mounted to virtual machines. See IMedium for more details.
2069
2070 See <link to="IMedium::location"/> to get more details about the format
2071 of the location string.
2072
2073 <result name="VBOX_E_FILE_ERROR">
2074 Floppy image specified by @a location not accessible.
2075 </result>
2076 <result name="VBOX_E_INVALID_OBJECT_STATE">
2077 Floppy image already exists in the media registry.
2078 </result>
2079
2080 <note>
2081 Currently, only raw floppy images are supported by VirtualBox.
2082 </note>
2083 </desc>
2084 <param name="location" type="wstring" dir="in">
2085 <desc>
2086 Full path to the file that contains a valid floppy image.
2087 </desc>
2088 </param>
2089 <param name="id" type="uuid" dir="in">
2090 <desc>
2091 UUID to assign to the given image file within this VirtualBox
2092 installation. If an empty (null) UUID is specified, the system will
2093 randomly generate a new UUID.
2094 </desc>
2095 </param>
2096 <param name="image" type="IFloppyImage" dir="return">
2097 <desc>Opened floppy image object.</desc>
2098 </param>
2099 </method>
2100
2101 <method name="getFloppyImage">
2102 <desc>
2103 Returns a floppy image with the given UUID.
2104
2105 The image with the given UUID must be known to this VirtualBox
2106 installation, i.e. it must be previously opened by <link
2107 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2108
2109 <result name="VBOX_E_OBJECT_NOT_FOUND">
2110 No matching floppy image found in the media registry.
2111 </result>
2112
2113 </desc>
2114 <param name="id" type="uuid" dir="in">
2115 <desc>UUID of the image to look for.</desc>
2116 </param>
2117 <param name="image" type="IFloppyImage" dir="return">
2118 <desc>Found floppy image object.</desc>
2119 </param>
2120 </method>
2121
2122 <method name="findFloppyImage">
2123 <desc>
2124 Returns a floppy image with the given image location.
2125
2126 The image with the given UUID must be known to this VirtualBox
2127 installation, i.e. it must be previously opened by <link
2128 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2129
2130 The search is done by comparing the value of the @a location argument to
2131 the <link to="IMedium::location"/> attribute of each known floppy image.
2132
2133 The requested location can be a path relative to the
2134 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2135 only a file name without any path is given, the
2136 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2137 folder</link> will be prepended to the file name before searching. Note
2138 that on case sensitive file systems, a case sensitive comparison is
2139 performed, otherwise the case of symbols in the file path is ignored.
2140
2141 <result name="VBOX_E_FILE_ERROR">
2142 Invalid image file location.
2143 </result>
2144 <result name="VBOX_E_OBJECT_NOT_FOUND">
2145 No matching floppy image found in the media registry.
2146 </result>
2147
2148 </desc>
2149 <param name="location" type="wstring" dir="in">
2150 <desc>Floppy image file path to look for.</desc>
2151 </param>
2152 <param name="image" type="IFloppyImage" dir="return">
2153 <desc>Found floppy image object.</desc>
2154 </param>
2155 </method>
2156
2157 <method name="getGuestOSType">
2158 <desc>
2159 Returns an object describing the specified guest OS type.
2160
2161 The requested guest OS type is specified using a string which is a
2162 mnemonic identifier of the guest operating system, such as
2163 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2164 particular virtual machine can be read or set using the
2165 <link to="IMachine::OSTypeId"/> attribute.
2166
2167 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2168 available guest OS type objects. Each object has an
2169 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2170 the guest OS this object describes.
2171
2172 <result name="E_INVALIDARG">
2173 @a id is not a valid Guest OS type.
2174 </result>
2175
2176 </desc>
2177 <param name="id" type="wstring" dir="in">
2178 <desc>Guest OS type ID string.</desc>
2179 </param>
2180 <param name="type" type="IGuestOSType" dir="return">
2181 <desc>Guest OS type object.</desc>
2182 </param>
2183 </method>
2184
2185 <method name="createSharedFolder">
2186 <desc>
2187 Creates a new global shared folder by associating the given logical
2188 name with the given host path, adds it to the collection of shared
2189 folders and starts sharing it. Refer to the description of
2190 <link to="ISharedFolder"/> to read more about logical names.
2191 <note>
2192 In the current implementation, this operation is not
2193 implemented.
2194 </note>
2195 </desc>
2196 <param name="name" type="wstring" dir="in">
2197 <desc>Unique logical name of the shared folder.</desc>
2198 </param>
2199 <param name="hostPath" type="wstring" dir="in">
2200 <desc>Full path to the shared folder in the host file system.</desc>
2201 </param>
2202 <param name="writable" type="boolean" dir="in">
2203 <desc>Whether the share is writable or readonly</desc>
2204 </param>
2205 </method>
2206
2207 <method name="removeSharedFolder">
2208 <desc>
2209 Removes the global shared folder with the given name previously
2210 created by <link to="#createSharedFolder"/> from the collection of
2211 shared folders and stops sharing it.
2212 <note>
2213 In the current implementation, this operation is not
2214 implemented.
2215 </note>
2216 </desc>
2217 <param name="name" type="wstring" dir="in">
2218 <desc>Logical name of the shared folder to remove.</desc>
2219 </param>
2220 </method>
2221
2222 <method name="getNextExtraDataKey">
2223 <desc>
2224 Returns the global extra data key name following the supplied key.
2225
2226 An error is returned if the supplied @a key does not exist. @c NULL is
2227 returned in @a nextKey if the supplied key is the last key. When
2228 supplying @c NULL or an empty string for the @a key, the first key item
2229 is returned in @a nextKey (if there is any). @a nextValue is an optional
2230 parameter and if supplied, the next key's value is returned in it.
2231
2232 <result name="VBOX_E_OBJECT_NOT_FOUND">
2233 Extra data @a key not found.
2234 </result>
2235
2236 </desc>
2237 <param name="key" type="wstring" dir="in">
2238 <desc>Name of the data key to follow.</desc>
2239 </param>
2240 <param name="nextKey" type="wstring" dir="out">
2241 <desc>Name of the next data key.</desc>
2242 </param>
2243 <param name="nextValue" type="wstring" dir="out">
2244 <desc>Value of the next data key.</desc>
2245 </param>
2246 </method>
2247
2248 <method name="getExtraData">
2249 <desc>
2250 Returns associated global extra data.
2251
2252 If the requested data @a key does not exist, this function will
2253 succeed and return @c NULL in the @a value argument.
2254
2255 <result name="VBOX_E_FILE_ERROR">
2256 Settings file not accessible.
2257 </result>
2258 <result name="VBOX_E_XML_ERROR">
2259 Could not parse the settings file.
2260 </result>
2261
2262 </desc>
2263 <param name="key" type="wstring" dir="in">
2264 <desc>Name of the data key to get.</desc>
2265 </param>
2266 <param name="value" type="wstring" dir="return">
2267 <desc>Value of the requested data key.</desc>
2268 </param>
2269 </method>
2270
2271 <method name="setExtraData">
2272 <desc>
2273 Sets associated global extra data.
2274
2275 If you pass @c NULL as a key @a value, the given @a key will be
2276 deleted.
2277
2278 <note>
2279 Before performing the actual data change, this method will ask all
2280 registered callbacks using the
2281 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2282 notification for a permission. If one of the callbacks refuses the
2283 new value, the change will not be performed.
2284 </note>
2285 <note>
2286 On success, the
2287 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2288 is called to inform all registered callbacks about a successful data
2289 change.
2290 </note>
2291
2292 <result name="VBOX_E_FILE_ERROR">
2293 Settings file not accessible.
2294 </result>
2295 <result name="VBOX_E_XML_ERROR">
2296 Could not parse the settings file.
2297 </result>
2298 <result name="E_ACCESSDENIED">
2299 Modification request refused.
2300 </result>
2301
2302 </desc>
2303 <param name="key" type="wstring" dir="in">
2304 <desc>Name of the data key to set.</desc>
2305 </param>
2306 <param name="value" type="wstring" dir="in">
2307 <desc>Value to assign to the key.</desc>
2308 </param>
2309 </method>
2310
2311 <method name="openSession">
2312 <desc>
2313 Opens a new direct session with the given virtual machine.
2314
2315 A direct session acts as a local lock on the given VM.
2316 There can be only one direct session open at a time for every
2317 virtual machine, protecting the VM from being manipulated by
2318 conflicting actions from different processes. Only after a
2319 direct session has been opened, one can change all VM settings
2320 and execute the VM in the process space of the session object.
2321
2322 Sessions therefore can be compared to mutex semaphores that
2323 lock a given VM for modification and execution.
2324 See <link to="ISession">ISession</link> for details.
2325
2326 <note>Unless you are writing a new VM frontend, you will not
2327 want to execute a VM in the current process. To spawn a new
2328 process that executes a VM, use
2329 <link to="IVirtualBox::openRemoteSession" />
2330 instead.</note>
2331
2332 Upon successful return, the session object can be used to
2333 get access to the machine and to the VM console.
2334
2335 In VirtualBox terminology, the machine becomes "mutable" after
2336 a session has been opened. Note that the "mutable" machine
2337 object, on which you may invoke IMachine methods to change its
2338 settings, will be a different object from the immutable IMachine
2339 objects returned by various IVirtualBox methods. To obtain a
2340 mutable IMachine object (upon which you can invoke settings methods),
2341 use the <link to="ISession::machine" /> attribute.
2342
2343 One must always call <link to="ISession::close" /> to release the
2344 lock on the machine, or the machine's state will eventually be
2345 set to "Aborted".
2346
2347 In other words, to change settings on a machine, the following
2348 sequence is typically performed:
2349
2350 <ol>
2351 <li>Call this method (openSession) to have a machine locked for
2352 the current session.</li>
2353
2354 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2355
2356 <li>Change the settings of the machine.</li>
2357
2358 <li>Call <link to="IMachine::saveSettings" />.</li>
2359
2360 <li>Close the session by calling <link to="ISession::close"/>.</li>
2361 </ol>
2362
2363 <result name="E_UNEXPECTED">
2364 Virtual machine not registered.
2365 </result>
2366 <result name="E_ACCESSDENIED">
2367 Process not started by OpenRemoteSession.
2368 </result>
2369 <result name="VBOX_E_OBJECT_NOT_FOUND">
2370 No matching virtual machine found.
2371 </result>
2372 <result name="VBOX_E_INVALID_OBJECT_STATE">
2373 Session already open or being opened.
2374 </result>
2375 <result name="VBOX_E_VM_ERROR">
2376 Failed to assign machine to session.
2377 </result>
2378
2379 </desc>
2380 <param name="session" type="ISession" dir="in">
2381 <desc>
2382 Session object that will represent the opened session after
2383 successful method invocation. This object must not represent
2384 the already open session.
2385 <note>
2386 This session will be automatically closed if the
2387 VirtualBox server is terminated for some reason.
2388 </note>
2389 </desc>
2390 </param>
2391 <param name="machineId" type="uuid" dir="in">
2392 <desc>ID of the virtual machine to open a session with.</desc>
2393 </param>
2394 </method>
2395
2396 <method name="openRemoteSession">
2397 <desc>
2398 Spawns a new process that executes a virtual machine (called a
2399 "remote session").
2400
2401 Opening a remote session causes the VirtualBox server to start a new
2402 process that opens a direct session with the given VM. As a result, the
2403 VM is locked by that direct session in the new process, preventing
2404 conflicting changes from other processes. Since sessions act as locks
2405 that prevent conflicting changes, one cannot open a remote session
2406 for a VM that already has another open session (direct or remote), or
2407 is currently in the process of opening one (see <link
2408 to="IMachine::sessionState"/>).
2409
2410 While the remote session still provides some level of control over the
2411 VM execution to the caller (using the <link to="IConsole" /> interface),
2412 not all VM settings are available for modification within the remote
2413 session context.
2414
2415 This operation can take some time (a new VM is started in a new process,
2416 for which memory and other resources need to be set up). Because of this,
2417 an <link to="IProgress" /> is returned to allow the caller to wait for this
2418 asynchronous operation to be completed. Until then, the remote session
2419 object remains in the closed state, and accessing the machine or its
2420 console through it is invalid. It is recommended to use
2421 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2422 completion.
2423
2424 As with all <link to="ISession" /> objects, it is recommended to call
2425 <link to="ISession::close" /> on the local session object once openRemoteSession()
2426 has been called. However, the session's state (see <link to="ISession::state" />)
2427 will not return to "Closed" until the remote session has also closed (i.e.
2428 until the VM is no longer running). In that case, however, the state of
2429 the session will automatically change back to "Closed".
2430
2431 Currently supported session types (values of the @a type
2432 argument) are:
2433 <ul>
2434 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2435 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2436 </ul>
2437
2438 The @a environment argument is a string containing definitions of
2439 environment variables in the following format:
2440 @code
2441 NAME[=VALUE]\n
2442 NAME[=VALUE]\n
2443 ...
2444 @endcode
2445 where <tt>\\n</tt> is the new line character. These environment
2446 variables will be appended to the environment of the VirtualBox server
2447 process. If an environment variable exists both in the server process
2448 and in this list, the value from this list takes precedence over the
2449 server's variable. If the value of the environment variable is
2450 omitted, this variable will be removed from the resulting environment.
2451 If the environment string is @c null, the server environment is
2452 inherited by the started process as is.
2453
2454 <see>openExistingSession</see>
2455
2456 <result name="E_UNEXPECTED">
2457 Virtual machine not registered.
2458 </result>
2459 <result name="E_INVALIDARG">
2460 Invalid session type @a type.
2461 </result>
2462 <result name="VBOX_E_OBJECT_NOT_FOUND">
2463 No machine matching @a machineId found.
2464 </result>
2465 <result name="VBOX_E_INVALID_OBJECT_STATE">
2466 Session already open or being opened.
2467 </result>
2468 <result name="VBOX_E_IPRT_ERROR">
2469 Launching process for machine failed.
2470 </result>
2471 <result name="VBOX_E_VM_ERROR">
2472 Failed to assign machine to session.
2473 </result>
2474
2475 </desc>
2476 <param name="session" type="ISession" dir="in">
2477 <desc>
2478 Session object that will represent the opened remote session
2479 after successful method invocation (this object must not
2480 represent an already open session).
2481 </desc>
2482 </param>
2483 <param name="machineId" type="uuid" dir="in">
2484 <desc>ID of the virtual machine to open a session with.</desc>
2485 </param>
2486 <param name="type" type="wstring" dir="in">
2487 <desc>
2488 Type of the remote session (case sensitive).
2489 </desc>
2490 </param>
2491 <param name="environment" type="wstring" dir="in">
2492 <desc>
2493 Environment to pass to the opened session (may be @c null).
2494 </desc>
2495 </param>
2496 <param name="progress" type="IProgress" dir="return">
2497 <desc>Progress object to track the operation completion.</desc>
2498 </param>
2499 </method>
2500
2501 <method name="openExistingSession">
2502 <desc>
2503 Opens a new remote session with the virtual machine for
2504 which a direct session is already open.
2505
2506 The remote session provides some level of control over the VM
2507 execution (using the IConsole interface) to the caller; however,
2508 within the remote session context, not all VM settings are available
2509 for modification.
2510
2511 As opposed to <link to="#openRemoteSession"/>, the number of
2512 remote sessions opened this way is not limited by the API
2513
2514 <note>
2515 It is an error to open a remote session with the machine that
2516 doesn't have an open direct session.
2517 </note>
2518
2519 <result name="E_UNEXPECTED">
2520 Virtual machine not registered.
2521 </result>
2522 <result name="VBOX_E_OBJECT_NOT_FOUND">
2523 No machine matching @a machineId found.
2524 </result>
2525 <result name="VBOX_E_INVALID_OBJECT_STATE">
2526 Session already open or being opened.
2527 </result>
2528 <result name="VBOX_E_INVALID_SESSION_STATE">
2529 Direct session state not Open.
2530 </result>
2531 <result name="VBOX_E_VM_ERROR">
2532 Failed to get console object from direct session or assign
2533 machine to session.
2534 </result>
2535
2536 <see>openRemoteSession</see>
2537 </desc>
2538 <param name="session" type="ISession" dir="in">
2539 <desc>
2540 Session object that will represent the open remote session
2541 after successful method invocation. This object must not
2542 represent an already open session.
2543 <note>
2544 This session will be automatically closed when the peer
2545 (direct) session dies or gets closed.
2546 </note>
2547 </desc>
2548 </param>
2549 <param name="machineId" type="uuid" dir="in">
2550 <desc>ID of the virtual machine to open a session with.</desc>
2551 </param>
2552 </method>
2553
2554 <method name="registerCallback">
2555 <desc>
2556 Registers a new global VirtualBox callback. The methods of the given
2557 callback object will be called by VirtualBox when an appropriate
2558 event occurs.
2559
2560 <result name="E_INVALIDARG">
2561 A @c NULL callback cannot be registered.
2562 </result>
2563
2564 </desc>
2565 <param name="callback" type="IVirtualBoxCallback" dir="in">
2566 <desc>Callback object to register.</desc>
2567 </param>
2568 </method>
2569
2570 <method name="unregisterCallback">
2571 <desc>
2572 Unregisters the previously registered global VirtualBox callback.
2573
2574 <result name="E_INVALIDARG">
2575 Specified @a callback not registered.
2576 </result>
2577
2578 </desc>
2579 <param name="callback" type="IVirtualBoxCallback" dir="in">
2580 <desc>Callback object to unregister.</desc>
2581 </param>
2582 </method>
2583
2584 <method name="waitForPropertyChange">
2585 <desc>
2586 Blocks the caller until any of the properties represented by the
2587 @a what argument changes the value or until the given timeout interval
2588 expires.
2589
2590 The @a what argument is a comma separated list of property masks that
2591 describe properties the caller is interested in. The property mask is
2592 a string in the following format:
2593
2594 <pre>
2595 [[group.]subgroup.]name
2596 </pre>
2597
2598 where @c name is the property name and @c group, @c subgroup are zero
2599 or more property group specifiers. Each element (group or name) in
2600 the property mask may be either a Latin string or an asterisk symbol
2601 (@c "*") which is used to match any string for the given element. A
2602 property mask that doesn't contain asterisk symbols represents a
2603 single fully qualified property name.
2604
2605 Groups in the fully qualified property name go from more generic (the
2606 left-most part) to more specific (the right-most part). The first
2607 element is usually a name of the object the property belongs to. The
2608 second element may be either a property name, or a child object name,
2609 or an index if the preceding element names an object which is one of
2610 many objects of the same type. This way, property names form a
2611 hierarchy of properties. Here are some examples of property names:
2612
2613 <table>
2614 <tr>
2615 <td><tt>VirtualBox.version</tt></td>
2616 <td><link to="IVirtualBox::version"/> property</td>
2617 </tr>
2618 <tr>
2619 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2620 <td><link to="IMachine::name"/> property of the machine with the
2621 given UUID</td>
2622 </tr>
2623 </table>
2624
2625 Most property names directly correspond to the properties of objects
2626 (components) provided by the VirtualBox library and may be used to
2627 track changes to these properties. However, there may be
2628 pseudo-property names that don't correspond to any existing object's
2629 property directly, as well as there may be object properties that
2630 don't have a corresponding property name that is understood by this
2631 method, and therefore changes to such properties cannot be
2632 tracked. See individual object's property descriptions to get a
2633 fully qualified property name that can be used with this method (if
2634 any).
2635
2636 There is a special property mask @c "*" (i.e. a string consisting of a
2637 single asterisk symbol) that can be used to match all properties.
2638 Below are more examples of property masks:
2639
2640 <table>
2641 <tr>
2642 <td><tt>VirtualBox.*</tt></td>
2643 <td>Track all properties of the VirtualBox object</td>
2644 </tr>
2645 <tr>
2646 <td><tt>Machine.*.name</tt></td>
2647 <td>Track changes to the <link to="IMachine::name"/> property of
2648 all registered virtual machines</td>
2649 </tr>
2650 </table>
2651
2652 <note>
2653 This function is not implemented in the current version of the
2654 product.
2655 </note>
2656 </desc>
2657 <param name="what" type="wstring" dir="in">
2658 <desc>Comma separated list of property masks.</desc>
2659 </param>
2660 <param name="timeout" type="unsigned long" dir="in">
2661 <desc>
2662 Wait timeout in milliseconds.
2663 Specify -1 for an indefinite wait.
2664 </desc>
2665 </param>
2666 <param name="changed" type="wstring" dir="out">
2667 <desc>
2668 Comma separated list of properties that have been changed and caused
2669 this method to return to the caller.
2670 </desc>
2671 </param>
2672 <param name="values" type="wstring" dir="out">
2673 <desc>Reserved, not currently used.</desc>
2674 </param>
2675 </method>
2676
2677 <method name="saveSettings">
2678 <desc>
2679 Saves the global settings to the global settings file
2680 (<link to="#settingsFilePath"/>).
2681
2682 This method is only useful for explicitly saving the global settings
2683 file after it has been auto-converted from the old format to the most
2684 recent format (see <link to="#settingsFileVersion"/> for details).
2685 Normally, the global settings file is implicitly saved when a global
2686 setting is changed.
2687
2688 <result name="VBOX_E_FILE_ERROR">
2689 Settings file not accessible.
2690 </result>
2691 <result name="VBOX_E_XML_ERROR">
2692 Could not parse the settings file.
2693 </result>
2694
2695 </desc>
2696 </method>
2697
2698 <method name="saveSettingsWithBackup">
2699 <desc>
2700 Creates a backup copy of the global settings file
2701 (<link to="#settingsFilePath"/>) in case of auto-conversion, and then
2702 calls <link to="#saveSettings"/>.
2703
2704 Note that the backup copy is created <b>only</b> if the settings file
2705 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2706 details). Otherwise, this call is fully equivalent to
2707 <link to="#saveSettings"/> and no backup copying is done.
2708
2709 The backup copy is created in the same directory where the original
2710 settings file is located. It is given the following file name:
2711 <pre>
2712 original.xml.x.y-platform.bak
2713 </pre>
2714 where <tt>original.xml</tt> is the original settings file name
2715 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2716 format of the settings file (before auto-conversion).
2717
2718 If the given backup file already exists, this method will try to add the
2719 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2720 0 to 9) and copy it again until it succeeds. If all suffixes are
2721 occupied, or if any other copy error occurs, this method will return a
2722 failure.
2723
2724 If the copy operation succeeds, the @a bakFileName return argument will
2725 receive a full path to the created backup file (for informational
2726 purposes). Note that this will happen even if the subsequent
2727 <link to="#saveSettings"/> call performed by this method after the
2728 copy operation, fails.
2729
2730 <note>
2731 The VirtualBox API never calls this method. It is intended purely for
2732 the purposes of creating backup copies of the settings files by
2733 front-ends before saving the results of the automatically performed
2734 settings conversion to disk.
2735 </note>
2736
2737 <see>settingsFileVersion</see>
2738
2739 <result name="VBOX_E_FILE_ERROR">
2740 Settings file not accessible.
2741 </result>
2742 <result name="VBOX_E_XML_ERROR">
2743 Could not parse the settings file.
2744 </result>
2745 <result name="VBOX_E_IPRT_ERROR">
2746 Could not copy the settings file.
2747 </result>
2748
2749 </desc>
2750 <param name="bakFileName" type="wstring" dir="return">
2751 <desc>Full path to the created backup copy.</desc>
2752 </param>
2753 </method>
2754
2755 <!--method name="createDHCPServerForInterface">
2756 <desc>
2757 Creates a dhcp server settings to be used for the given interface
2758 <result name="E_INVALIDARG">
2759 Host network interface @a name already exists.
2760 </result>
2761 </desc>
2762 <param name="interface" type="IHostNetworkInterface" dir="in">
2763 <desc>Network Interface</desc>
2764 </param>
2765 <param name="server" type="IDHCPServer" dir="out">
2766 <desc>Dhcp server settings</desc>
2767 </param>
2768 </method-->
2769
2770 <method name="createDHCPServer">
2771 <desc>
2772 Creates a dhcp server settings to be used for the given internal network name
2773 <result name="E_INVALIDARG">
2774 Host network interface @a name already exists.
2775 </result>
2776 </desc>
2777 <param name="name" type="wstring" dir="in">
2778 <desc>server name</desc>
2779 </param>
2780 <param name="server" type="IDHCPServer" dir="return">
2781 <desc>Dhcp server settings</desc>
2782 </param>
2783 </method>
2784
2785 <method name="findDHCPServerByNetworkName">
2786 <desc>
2787 Searches a dhcp server settings to be used for the given internal network name
2788 <result name="E_INVALIDARG">
2789 Host network interface @a name already exists.
2790 </result>
2791
2792 </desc>
2793 <param name="name" type="wstring" dir="in">
2794 <desc>server name</desc>
2795 </param>
2796 <param name="server" type="IDHCPServer" dir="return">
2797 <desc>Dhcp server settings</desc>
2798 </param>
2799 </method>
2800
2801 <!--method name="findDHCPServerForInterface">
2802 <desc>
2803 Searches a dhcp server settings to be used for the given interface
2804 <result name="E_INVALIDARG">
2805 Host network interface @a name already exists.
2806 </result>
2807 </desc>
2808 <param name="interface" type="IHostNetworkInterface" dir="in">
2809 <desc>Network Interface</desc>
2810 </param>
2811 <param name="server" type="IDHCPServer" dir="out">
2812 <desc>Dhcp server settings</desc>
2813 </param>
2814 </method-->
2815
2816 <method name="removeDHCPServer">
2817 <desc>
2818 Removes the dhcp server settings
2819 <result name="E_INVALIDARG">
2820 Host network interface @a name already exists.
2821 </result>
2822 </desc>
2823 <param name="server" type="IDHCPServer" dir="in">
2824 <desc>Dhcp server settings to be removed</desc>
2825 </param>
2826 </method>
2827
2828 </interface>
2829
2830 <!--
2831 // IAppliance
2832 /////////////////////////////////////////////////////////////////////////
2833 -->
2834
2835 <enum
2836 name="CIMOSType"
2837 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2838 >
2839 <desc>
2840 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2841 </desc>
2842
2843 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2844 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2845 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2846 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2847 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2848 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2849 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2850 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2851 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2852 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2853 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2854 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2855 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2856 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2857 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2858 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2859 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2860 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2861 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2862 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2863 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2864 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2865 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2866 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2867 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2868 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2869 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2870 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2871 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2872 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2873 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2874 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2875 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2876 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2877 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2878 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2879 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2880 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2881 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2882 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2883 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2884 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2885 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2886 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2887 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2888 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2889 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2890 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2891 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2892 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2893 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2894 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2895 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2896 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2897 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2898 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2899 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2900 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2901 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2902 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2903 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2904 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2905 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2906 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2907 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2908 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2909 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2910 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2911 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2912 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2913 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2914 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2915 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2916 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2917 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2918 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2919 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2920 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2921 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2922 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2923 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2924 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2925 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2926 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2927 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2928 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2929 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2930 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2931 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2932 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2933 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2934 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2935 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
2936 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
2937 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
2938 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
2939 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
2940 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
2941 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
2942 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
2943 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
2944 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
2945 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
2946 </enum>
2947
2948 <enum
2949 name="OVFResourceType"
2950 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
2951 >
2952 <desc>
2953 OVF resource type (as listed with CIM_ResourceAllocationSettingData; see for example
2954 http://msdn.microsoft.com/en-us/library/cc136877(VS.85).aspx).
2955 </desc>
2956
2957 <const name="Other" value="1" />
2958 <const name="ComputerSystem" value="2" />
2959 <const name="Processor" value="3" />
2960 <const name="Memory" value="4" />
2961 <const name="IDEController" value="5" />
2962 <const name="ParallelSCSIHBA" value="6" />
2963 <const name="FCHBA" value="7" />
2964 <const name="iSCSIHBA" value="8" />
2965 <const name="IBHCA" value="9" />
2966 <const name="EthernetAdapter" value="10" />
2967 <const name="OtherNetworkAdapter" value="11" />
2968 <const name="IOSlot" value="12" />
2969 <const name="IODevice" value="13" />
2970 <const name="FloppyDrive" value="14" />
2971 <const name="CDDrive" value="15" />
2972 <const name="DVDDrive" value="16" />
2973 <const name="HardDisk" value="17" />
2974 <const name="OtherStorageDevice" value="20" />
2975 <const name="USBController" value="23" />
2976 <const name="SoundCard" value="35" />
2977 </enum>
2978
2979 <interface
2980 name="IAppliance" extends="$unknown"
2981 uuid="a7a71c1f-20d3-4483-95c0-7357dda77f50"
2982 wsmap="managed"
2983 >
2984 <desc>
2985 Represents a platform-independent appliance in OVF format. An instance of this is returned
2986 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2987 appliances with VirtualBox.
2988
2989 The OVF standard suggests two different physical file formats:
2990
2991 <ol>
2992 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
2993 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
2994 this descriptor file references other files, as OVF appliances distributed as a set of
2995 files most likely do, those files must be in the same directory as the descriptor file.</li>
2996
2997 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
2998 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2999 files and optionally other files.
3000
3001 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3002 be added with a later version.</li>
3003 </ol>
3004
3005 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3006 <link to="IMachine" /> involves the following sequence of API calls:
3007
3008 <ol>
3009 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3010 </li>
3011
3012 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3013 would like to import. So long as this file is syntactically valid, this will succeed
3014 and return an instance of IAppliance that contains the parsed data from the OVF file.
3015 </li>
3016
3017 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3018 contents of the IAppliance attributes accordingly. These can be inspected by a
3019 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3020 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3021 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3022 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3023 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3024 The GUI can then give the user the option to confirm and/or change these suggestions.
3025 </li>
3026
3027 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3028 virtual system to override the suggestions made by the interpret() routine.
3029 </li>
3030
3031 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3032 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3033 virtual system descriptions.
3034 </li>
3035 </ol>
3036
3037 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3038
3039 <ol>
3040 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3041 an empty IAppliance object.
3042 </li>
3043
3044 <li>For each machine you would like to export, call <link to="IMachine::export" />
3045 with the IAppliance object you just created. This creates an instance of
3046 <link to="IVirtualSystemDescription" /> inside the appliance.
3047 </li>
3048
3049 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3050 virtual system to override the suggestions made by the export() routine.
3051 </li>
3052
3053 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3054 file written.</li>
3055 </ol>
3056
3057 </desc>
3058
3059 <attribute name="path" type="wstring" readonly="yes">
3060 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3061 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3062 <link to="#write" /> (for export).
3063 This attribute is empty until one of these methods has been called.
3064 </desc>
3065 </attribute>
3066
3067 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3068 <desc>
3069 Array of virtual disk definitions. One such description exists for each
3070 disk definition in the OVF; each string array item represents one such piece of
3071 disk information, with the information fields separated by tab (\t) characters.
3072
3073 The caller should be prepared for additional fields being appended to
3074 this string in future versions of VirtualBox and therefore check for
3075 the number of tabs in the strings returned.
3076
3077 In the current version, the following eight fields are returned per string
3078 in the array:
3079
3080 <ol>
3081 <li>Disk ID (unique string identifier given to disk)</li>
3082
3083 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3084
3085 <li>Populated size (optional unsigned integer indicating the current size of the
3086 disk; can be approximate; -1 if unspecified)</li>
3087
3088 <li>Format (string identifying the disk format, typically
3089 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3090
3091 <li>Reference (where to find the disk image, typically a file name; if empty,
3092 then the disk should be created on import)</li>
3093
3094 <li>Image size (optional unsigned integer indicating the size of the image,
3095 which need not necessarily be the same as the values specified above, since
3096 the image may be compressed or sparse; -1 if not specified)</li>
3097
3098 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3099 presently unsupported and always -1)</li>
3100
3101 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3102 </ol>
3103 </desc>
3104 </attribute>
3105
3106 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3107 <desc> Array of virtual system descriptions. One such description is created
3108 for each virtual system found in the OVF.
3109 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3110 (for export) has been called.
3111 </desc>
3112 </attribute>
3113
3114 <method name="read">
3115 <desc>
3116 Reads an OVF file into the appliance object.
3117
3118 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3119 mere fact that this method returns successfully does not mean that VirtualBox supports all
3120 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3121 </desc>
3122 <param name="file" type="wstring" dir="in">
3123 <desc>
3124 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3125 on whether the appliance is distributed as a set of files or as a single file, respectively).
3126 </desc>
3127 </param>
3128 </method>
3129
3130 <method name="interpret">
3131 <desc>
3132 Interprets the OVF data that was read when the appliance was constructed. After
3133 calling this method, one can inspect the
3134 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3135 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3136 the appliance.
3137
3138 Calling this method is the second step of importing an appliance into VirtualBox;
3139 see <link to="IAppliance" /> for an overview.
3140
3141 After calling this method, one should call <link to="#getWarnings" /> to find out
3142 if problems were encountered during the processing which might later lead to
3143 errors.
3144 </desc>
3145 </method>
3146
3147 <method name="importMachines">
3148 <desc>
3149 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3150 and other interfaces that match the information contained in the appliance as
3151 closely as possible, as represented by the import instructions in the
3152 <link to="#virtualSystemDescriptions" /> array.
3153
3154 Calling this method is the final step of importing an appliance into VirtualBox;
3155 see <link to="IAppliance" /> for an overview.
3156
3157 Since importing the appliance will most probably involve copying and converting
3158 disk images, which can take a long time, this method operates asynchronously and
3159 returns an IProgress object to allow the caller to monitor the progress.
3160 </desc>
3161
3162 <param name="aProgress" type="IProgress" dir="return">
3163 <desc></desc>
3164 </param>
3165 </method>
3166
3167 <method name="write">
3168 <desc>
3169 Writes the contents of the appliance exports into a new OVF file.
3170
3171 Calling this method is the final step of exporting an appliance from VirtualBox;
3172 see <link to="IAppliance" /> for an overview.
3173
3174 Since exporting the appliance will most probably involve copying and converting
3175 disk images, which can take a long time, this method operates asynchronously and
3176 returns an IProgress object to allow the caller to monitor the progress.
3177 </desc>
3178 <param name="path" type="wstring" dir="in">
3179 <desc>
3180 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3181 on whether the appliance is distributed as a set of files or as a single file, respectively).
3182 </desc>
3183 </param>
3184 <param name="aProgress" type="IProgress" dir="return">
3185 <desc></desc>
3186 </param>
3187 </method>
3188
3189 <method name="getWarnings">
3190 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3191
3192 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3193 <desc></desc>
3194 </param>
3195 </method>
3196
3197 </interface>
3198
3199 <enum
3200 name="VirtualSystemDescriptionType"
3201 uuid="8ac36d00-bb7c-4a35-a835-3f004b27427b"
3202 >
3203 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3204 a configuration value.</desc>
3205
3206 <const name="Ignore" value="1" />
3207 <const name="OS" value="2" />
3208 <const name="Name" value="3" />
3209 <const name="Description" value="4" />
3210 <const name="CPU" value="5" />
3211 <const name="Memory" value="6" />
3212 <const name="HardDiskControllerIDE" value="7" />
3213 <const name="HardDiskControllerSATA" value="8" />
3214 <const name="HardDiskControllerSCSI" value="9" />
3215 <const name="HardDiskImage" value="10" />
3216 <const name="Floppy" value="11" />
3217 <const name="CDROM" value="12" />
3218 <const name="NetworkAdapter" value="13" />
3219 <const name="USBController" value="14" />
3220 <const name="SoundCard" value="15" />
3221
3222 </enum>
3223
3224 <interface
3225 name="IVirtualSystemDescription" extends="$unknown"
3226 uuid="c2e9f5b5-522c-47e5-be55-0d20b46a95d9"
3227 wsmap="managed"
3228 >
3229
3230 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3231 After <link to="IAppliance::interpret" /> has been called, that array contains
3232 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3233 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3234 into VirtualBox.
3235 </desc>
3236
3237 <attribute name="count" type="unsigned long" readonly="yes">
3238 <desc>Return the number of virtual system description entries.</desc>
3239 </attribute>
3240
3241 <method name="getDescription">
3242 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3243 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3244
3245 The list below identifies the value sets that are possible depending on the
3246 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3247 the array item with the same index in aOvfValues[] will contain the original value as contained
3248 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3249 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3250 the aExtraConfigValues[] array item may also be used.
3251
3252 <ul>
3253 <li>
3254 "OS": the guest operating system type. There must be exactly one such array item on import. The
3255 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3256 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3257 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3258 (see <link to="CIMOSType" />).
3259 </li>
3260 <li>
3261 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3262 if none is present on import, then an automatic name will be created from the operating system
3263 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3264 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3265 <link to="IMachine" /> name that does not exist yet.
3266 </li>
3267 <li>
3268 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3269 </li>
3270 <li>
3271 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3272 is present on import, then VirtualBox will set a meaningful default based on the operating system
3273 type.
3274 </li>
3275 <li>
3276 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3277 has no value in aOvfValues[] or aVboxValues[].
3278 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3279 type can use to specify which hard disk controller a virtual disk should be connected to.
3280 </li>
3281 <li>
3282 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3283 has no value in aOvfValues[] or aVboxValues[].
3284 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3285 </li>
3286 <li>
3287 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3288 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3289 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3290 </li>
3291 <li>
3292 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3293 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3294
3295 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3296 a path since the image file should be in the same location as the OVF file itself), whereas the
3297 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3298 hard disk image. This means that on import the image will be copied and converted from the
3299 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3300 On import, the target image will also be registered with VirtualBox.
3301
3302 The matching item in the aExtraConfigValues[] array must contain a string of the following
3303 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3304 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3305 the image to. That number must be the index of an array item with one of the hard disk controller
3306 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3307 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3308 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3309 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3310 SCSI conrollers, the channel can range from 0-29.
3311 </li>
3312 <li>
3313 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3314 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3315 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3316 </li>
3317 <li>
3318 "USBController": a USB controller. There can be at most one such item. If and only if such an
3319 item ispresent, USB support will be enabled for the new virtual machine.
3320 </li>
3321 <li>
3322 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3323 present, sound support will be enabled for the new virtual machine. Note that the virtual
3324 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3325 may be different from the virtual soundcard expected by the appliance.
3326 </li>
3327 </ul>
3328
3329 </desc>
3330
3331 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3332 <desc></desc>
3333 </param>
3334
3335 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3336 <desc></desc>
3337 </param>
3338
3339 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3340 <desc></desc>
3341 </param>
3342
3343 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3344 <desc></desc>
3345 </param>
3346
3347 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3348 <desc></desc>
3349 </param>
3350
3351 </method>
3352
3353 <method name="getDescriptionByType">
3354 <desc>This is the same as <link to="getDescription" /> except that you can specify which types
3355 should be returned.</desc>
3356
3357 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3358 <desc></desc>
3359 </param>
3360
3361 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3362 <desc></desc>
3363 </param>
3364
3365 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3366 <desc></desc>
3367 </param>
3368
3369 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3370 <desc></desc>
3371 </param>
3372
3373 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3374 <desc></desc>
3375 </param>
3376
3377 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3378 <desc></desc>
3379 </param>
3380
3381 </method>
3382
3383 <method name="setFinalValues">
3384 <desc>
3385 This method allows the appliance's user to change the configuration for the virtual
3386 system descriptions. For each array item returned from <link to="getDescription" />,
3387 you must pass in one boolean value and one configuration value.
3388
3389 Each item in the boolean array determines whether the particular configuration item
3390 should be enabled.
3391 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3392 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3393 and SoundCard.
3394
3395 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3396 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3397 the configuration remains unchanged. Please see the documentation for getDescription()
3398 for valid configuration values for the individual array item types. If the
3399 corresponding item in the aEnabled array is false, the configuration value is ignored.
3400 </desc>
3401
3402 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3403 <desc></desc>
3404 </param>
3405
3406 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3407 <desc></desc>
3408 </param>
3409
3410 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3411 <desc></desc>
3412 </param>
3413 </method>
3414 </interface>
3415
3416
3417 <!--
3418 // IMachine
3419 /////////////////////////////////////////////////////////////////////////
3420 -->
3421
3422 <interface
3423 name="IInternalMachineControl" extends="$unknown"
3424 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3425 internal="yes"
3426 wsmap="suppress"
3427 >
3428 <method name="updateState">
3429 <desc>
3430 Updates the VM state.
3431 <note>
3432 This operation will also update the settings file with
3433 the correct information about the saved state file
3434 and delete this file from disk when appropriate.
3435 </note>
3436 </desc>
3437 <param name="state" type="MachineState" dir="in"/>
3438 </method>
3439
3440 <method name="getIPCId">
3441 <param name="id" type="wstring" dir="return"/>
3442 </method>
3443
3444 <method name="runUSBDeviceFilters">
3445 <desc>
3446 Asks the server to run USB devices filters of the associated
3447 machine against the given USB device and tell if there is
3448 a match.
3449 <note>
3450 Intended to be used only for remote USB devices. Local
3451 ones don't require to call this method (this is done
3452 implicitly by the Host and USBProxyService).
3453 </note>
3454 </desc>
3455 <param name="device" type="IUSBDevice" dir="in"/>
3456 <param name="matched" type="boolean" dir="out"/>
3457 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3458 </method>
3459
3460 <method name="captureUSBDevice">
3461 <desc>
3462 Requests a capture of the given host USB device.
3463 When the request is completed, the VM process will
3464 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3465 notification.
3466 </desc>
3467 <param name="id" type="uuid" dir="in"/>
3468 </method>
3469
3470 <method name="detachUSBDevice">
3471 <desc>
3472 Notification that a VM is going to detach (done = false) or has
3473 already detached (done = true) the given USB device.
3474 When the done = true request is completed, the VM process will
3475 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3476 notification.
3477 <note>
3478 In the done = true case, the server must run its own filters
3479 and filters of all VMs but this one on the detached device
3480 as if it were just attached to the host computer.
3481 </note>
3482 </desc>
3483 <param name="id" type="uuid" dir="in"/>
3484 <param name="done" type="boolean" dir="in"/>
3485 </method>
3486
3487 <method name="autoCaptureUSBDevices">
3488 <desc>
3489 Requests a capture all matching USB devices attached to the host.
3490 When the request is completed, the VM process will
3491 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3492 notification per every captured device.
3493 </desc>
3494 </method>
3495
3496 <method name="detachAllUSBDevices">
3497 <desc>
3498 Notification that a VM that is being powered down. The done
3499 parameter indicates whether which stage of the power down
3500 we're at. When done = false the VM is announcing its
3501 intentions, while when done = true the VM is reporting
3502 what it has done.
3503 <note>
3504 In the done = true case, the server must run its own filters
3505 and filters of all VMs but this one on all detach devices as
3506 if they were just attached to the host computer.
3507 </note>
3508 </desc>
3509 <param name="done" type="boolean" dir="in"/>
3510 </method>
3511
3512 <method name="onSessionEnd">
3513 <desc>
3514 Triggered by the given session object when the session is about
3515 to close normally.
3516 </desc>
3517 <param name="session" type="ISession" dir="in">
3518 <desc>Session that is being closed</desc>
3519 </param>
3520 <param name="progress" type="IProgress" dir="return">
3521 <desc>
3522 Used to wait until the corresponding machine is actually
3523 dissociated from the given session on the server.
3524 Returned only when this session is a direct one.
3525 </desc>
3526 </param>
3527 </method>
3528
3529 <method name="beginSavingState">
3530 <desc>
3531 Called by the VM process to inform the server it wants to
3532 save the current state and stop the VM execution.
3533 </desc>
3534 <param name="progress" type="IProgress" dir="in">
3535 <desc>
3536 Progress object created by the VM process to wait until
3537 the state is saved.
3538 </desc>
3539 </param>
3540 <param name="stateFilePath" type="wstring" dir="out">
3541 <desc>
3542 File path the VM process must save the execution state to.
3543 </desc>
3544 </param>
3545 </method>
3546
3547 <method name="endSavingState">
3548 <desc>
3549 Called by the VM process to inform the server that saving
3550 the state previously requested by #beginSavingState is either
3551 successfully finished or there was a failure.
3552
3553 <result name="VBOX_E_FILE_ERROR">
3554 Settings file not accessible.
3555 </result>
3556 <result name="VBOX_E_XML_ERROR">
3557 Could not parse the settings file.
3558 </result>
3559
3560 </desc>
3561
3562 <param name="success" type="boolean" dir="in">
3563 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3564 otherwise.
3565 </desc>
3566 </param>
3567 </method>
3568
3569 <method name="adoptSavedState">
3570 <desc>
3571 Gets called by IConsole::adoptSavedState.
3572 <result name="VBOX_E_FILE_ERROR">
3573 Invalid saved state file path.
3574 </result>
3575 </desc>
3576 <param name="savedStateFile" type="wstring" dir="in">
3577 <desc>Path to the saved state file to adopt.</desc>
3578 </param>
3579 </method>
3580
3581 <method name="beginTakingSnapshot">
3582 <desc>
3583 Called by the VM process to inform the server it wants to
3584 take a snapshot.
3585
3586 <result name="VBOX_E_FILE_ERROR">
3587 Settings file not accessible.
3588 </result>
3589 <result name="VBOX_E_XML_ERROR">
3590 Could not parse the settings file.
3591 </result>
3592 </desc>
3593 <param name="initiator" type="IConsole" dir="in">
3594 <desc>The console object that initiated this call.</desc>
3595 </param>
3596 <param name="name" type="wstring" dir="in">
3597 <desc>Snapshot name.</desc>
3598 </param>
3599 <param name="description" type="wstring" dir="in">
3600 <desc>Snapshot description.</desc>
3601 </param>
3602 <param name="progress" type="IProgress" dir="in">
3603 <desc>
3604 Progress object created by the VM process to wait until
3605 the state is saved (only for online snapshots).
3606 </desc>
3607 </param>
3608 <param name="stateFilePath" type="wstring" dir="out">
3609 <desc>
3610 File path the VM process must save the execution state to.
3611 </desc>
3612 </param>
3613 <param name="serverProgress" type="IProgress" dir="out">
3614 <desc>
3615 Progress object created by the server process to wait until
3616 the snapshot is taken (VDI diff creation, etc.).
3617 </desc>
3618 </param>
3619 </method>
3620
3621 <method name="endTakingSnapshot">
3622 <desc>
3623 Called by the VM process to inform the server that the snapshot
3624 previously requested by #beginTakingSnapshot is either
3625 successfully taken or there was a failure.
3626 </desc>
3627
3628 <param name="success" type="boolean" dir="in">
3629 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3630 </param>
3631 </method>
3632
3633 <method name="discardSnapshot">
3634 <desc>
3635 Gets called by IConsole::discardSnapshot.
3636 <result name="VBOX_E_INVALID_OBJECT_STATE">
3637 Snapshot has more than one child snapshot.
3638 </result>
3639 </desc>
3640 <param name="initiator" type="IConsole" dir="in">
3641 <desc>The console object that initiated this call.</desc>
3642 </param>
3643 <param name="id" type="uuid" dir="in">
3644 <desc>UUID of the snapshot to discard.</desc>
3645 </param>
3646 <param name="machineState" type="MachineState" dir="out">
3647 <desc>New machine state after this operation is started.</desc>
3648 </param>
3649 <param name="progress" type="IProgress" dir="return">
3650 <desc>Progress object to track the operation completion.</desc>
3651 </param>
3652 </method>
3653
3654 <method name="discardCurrentState">
3655 <desc>
3656 Gets called by IConsole::discardCurrentState.
3657 <result name="VBOX_E_INVALID_OBJECT_STATE">
3658 Virtual machine does not have any snapshot.
3659 </result>
3660 </desc>
3661 <param name="initiator" type="IConsole" dir="in">
3662 <desc>The console object that initiated this call.</desc>
3663 </param>
3664 <param name="machineState" type="MachineState" dir="out">
3665 <desc>New machine state after this operation is started.</desc>
3666 </param>
3667 <param name="progress" type="IProgress" dir="return">
3668 <desc>Progress object to track the operation completion.</desc>
3669 </param>
3670 </method>
3671
3672 <method name="discardCurrentSnapshotAndState">
3673 <desc>
3674 Gets called by IConsole::discardCurrentSnapshotAndState.
3675 <result name="VBOX_E_INVALID_OBJECT_STATE">
3676 Virtual machine does not have any snapshot.
3677 </result>
3678 </desc>
3679 <param name="initiator" type="IConsole" dir="in">
3680 <desc>The console object that initiated this call.</desc>
3681 </param>
3682 <param name="machineState" type="MachineState" dir="out">
3683 <desc>New machine state after this operation is started.</desc>
3684 </param>
3685 <param name="progress" type="IProgress" dir="return">
3686 <desc>Progress object to track the operation completion.</desc>
3687 </param>
3688 </method>
3689
3690 <method name="pullGuestProperties">
3691 <desc>
3692 Get the list of the guest properties matching a set of patterns along
3693 with their values, time stamps and flags and give responsibility for
3694 managing properties to the console.
3695 </desc>
3696 <param name="name" type="wstring" dir="out" safearray="yes">
3697 <desc>
3698 The names of the properties returned.
3699 </desc>
3700 </param>
3701 <param name="value" type="wstring" dir="out" safearray="yes">
3702 <desc>
3703 The values of the properties returned. The array entries match the
3704 corresponding entries in the @a name array.
3705 </desc>
3706 </param>
3707 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3708 <desc>
3709 The time stamps of the properties returned. The array entries match
3710 the corresponding entries in the @a name array.
3711 </desc>
3712 </param>
3713 <param name="flags" type="wstring" dir="out" safearray="yes">
3714 <desc>
3715 The flags of the properties returned. The array entries match the
3716 corresponding entries in the @a name array.
3717 </desc>
3718 </param>
3719 </method>
3720
3721 <method name="pushGuestProperties">
3722 <desc>
3723 Set the list of the guest properties matching a set of patterns along
3724 with their values, time stamps and flags and return responsibility for
3725 managing properties to IMachine.
3726 </desc>
3727 <param name="name" type="wstring" dir="in" safearray="yes">
3728 <desc>
3729 The names of the properties.
3730 </desc>
3731 </param>
3732 <param name="value" type="wstring" dir="in" safearray="yes">
3733 <desc>
3734 The values of the properties. The array entries match the
3735 corresponding entries in the @a name array.
3736 </desc>
3737 </param>
3738 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3739 <desc>
3740 The time stamps of the properties. The array entries match
3741 the corresponding entries in the @a name array.
3742 </desc>
3743 </param>
3744 <param name="flags" type="wstring" dir="in" safearray="yes">
3745 <desc>
3746 The flags of the properties. The array entries match the
3747 corresponding entries in the @a name array.
3748 </desc>
3749 </param>
3750 </method>
3751 <method name="pushGuestProperty">
3752 <desc>
3753 Update a single guest property in IMachine.
3754 </desc>
3755 <param name="name" type="wstring" dir="in">
3756 <desc>
3757 The name of the property to be updated.
3758 </desc>
3759 </param>
3760 <param name="value" type="wstring" dir="in">
3761 <desc>
3762 The value of the property.
3763 </desc>
3764 </param>
3765 <param name="timestamp" type="unsigned long long" dir="in">
3766 <desc>
3767 The timestamp of the property.
3768 </desc>
3769 </param>
3770 <param name="flags" type="wstring" dir="in">
3771 <desc>
3772 The flags of the property.
3773 </desc>
3774 </param>
3775 </method>
3776
3777 <method name="lockMedia">
3778 <desc>
3779 Locks all media attached to the machine for writing and parents of
3780 attahced different hard disks (if any) for reading. This operation is
3781 atomic so that if it fails no media is actually locked.
3782
3783 This method is intended to be called when the machine is in Starting or
3784 Restoring state. The locked media will be automatically unlocked when
3785 the machine is powered off or crashed.
3786 </desc>
3787 </method>
3788 </interface>
3789
3790 <interface
3791 name="IBIOSSettings" extends="$unknown"
3792 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3793 wsmap="managed"
3794 >
3795 <desc>
3796 The IBIOSSettings interface represents BIOS settings of the virtual
3797 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3798 </desc>
3799 <attribute name="logoFadeIn" type="boolean">
3800 <desc>Fade in flag for BIOS logo animation.</desc>
3801 </attribute>
3802
3803 <attribute name="logoFadeOut" type="boolean">
3804 <desc>Fade out flag for BIOS logo animation.</desc>
3805 </attribute>
3806
3807 <attribute name="logoDisplayTime" type="unsigned long">
3808 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3809 </attribute>
3810
3811 <attribute name="logoImagePath" type="wstring">
3812 <desc>Local file system path for external BIOS image.</desc>
3813 </attribute>
3814
3815 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3816 <desc>Mode of the BIOS boot device menu.</desc>
3817 </attribute>
3818
3819 <attribute name="ACPIEnabled" type="boolean">
3820 <desc>ACPI support flag.</desc>
3821 </attribute>
3822
3823 <attribute name="IOAPICEnabled" type="boolean">
3824 <desc>
3825 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3826 and support IRQs above 15.
3827 </desc>
3828 </attribute>
3829
3830 <attribute name="timeOffset" type="long long">
3831 <desc>
3832 Offset in milliseconds from the host system time. This allows for
3833 guests running with a different system date/time than the host.
3834 It is equivalent to setting the system date/time in the BIOS except
3835 it is not an absolute value but a relative one. Guest Additions
3836 time synchronization honors this offset.
3837 </desc>
3838 </attribute>
3839
3840 <attribute name="PXEDebugEnabled" type="boolean">
3841 <desc>
3842 PXE debug logging flag. If set, VirtualBox will write extensive
3843 PXE trace information to the release log.
3844 </desc>
3845 </attribute>
3846
3847 </interface>
3848
3849 <interface
3850 name="IMachine" extends="$unknown"
3851 uuid="dcf6a64c-1466-4b5a-b822-9db04133dc74"
3852 wsmap="managed"
3853 >
3854 <desc>
3855 The IMachine interface represents a virtual machine, or guest, created
3856 in VirtualBox.
3857
3858 This interface is used in two contexts. First of all, a collection of
3859 objects implementing this interface is stored in the
3860 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3861 machines that are currently registered with this VirtualBox
3862 installation. Also, once a session has been opened for the given virtual
3863 machine (e.g. the virtual machine is running), the machine object
3864 associated with the open session can be queried from the session object;
3865 see <link to="ISession"/> for details.
3866
3867 The main role of this interface is to expose the settings of the virtual
3868 machine and provide methods to change various aspects of the virtual
3869 machine's configuration. For machine objects stored in the
3870 <link to="IVirtualBox::machines"/> collection, all attributes are
3871 read-only unless explicitly stated otherwise in individual attribute
3872 and method descriptions. In order to change a machine setting, a session
3873 for this machine must be opened using one of
3874 <link to="IVirtualBox::openSession"/>,
3875 <link to="IVirtualBox::openRemoteSession"/> or
3876 <link to="IVirtualBox::openExistingSession"/> methods. After the
3877 session has been successfully opened, a mutable machine object needs to
3878 be queried from the session object and then the desired settings changes
3879 can be applied to the returned object using IMachine attributes and
3880 methods. See the ISession interface description for more information
3881 about sessions.
3882
3883 Note that the IMachine interface does not provide methods to control
3884 virtual machine execution (such as start the machine, or power it
3885 down) -- these methods are grouped in a separate IConsole
3886 interface. Refer to the IConsole interface description to get more
3887 information about this topic.
3888
3889 <see>ISession, IConsole</see>
3890 </desc>
3891
3892 <attribute name="parent" type="IVirtualBox" readonly="yes">
3893 <desc>Associated parent object.</desc>
3894 </attribute>
3895
3896 <attribute name="accessible" type="boolean" readonly="yes">
3897 <desc>
3898 Whether this virtual machine is currently accessible or not.
3899
3900 The machine is considered to be inaccessible when:
3901 <ul>
3902 <li>It is a registered virtual machine, and
3903 </li>
3904 <li>Its settings file is inaccessible (for example, it is
3905 located on a network share that is not accessible during
3906 VirtualBox startup, or becomes inaccessible later, or if
3907 the settings file can be read but is invalid).
3908 </li>
3909 </ul>
3910
3911 Otherwise, the value of this property is always <tt>true</tt>.
3912
3913 Every time this property is read, the accessibility state of
3914 this machine is re-evaluated. If the returned value is |false|,
3915 the <link to="#accessError"/> property may be used to get the
3916 detailed error information describing the reason of
3917 inaccessibility.
3918
3919 When the machine is inaccessible, only the following properties
3920 can be used on it:
3921 <ul>
3922 <li><link to="#parent"/></li>
3923 <li><link to="#id"/></li>
3924 <li><link to="#settingsFilePath"/></li>
3925 <li><link to="#accessible"/></li>
3926 <li><link to="#accessError"/></li>
3927 </ul>
3928
3929 An attempt to access any other property or method will return
3930 an error.
3931
3932 The only possible action you can perform on an inaccessible
3933 machine is to unregister it using the
3934 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
3935 for the accessibility state once more by querying this
3936 property).
3937
3938 <note>
3939 In the current implementation, once this property returns
3940 <tt>true</tt>, the machine will never become inaccessible
3941 later, even if its settings file cannot be successfully
3942 read/written any more (at least, until the VirtualBox
3943 server is restarted). This limitation may be removed in
3944 future releases.
3945 </note>
3946 </desc>
3947 </attribute>
3948
3949 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3950 <desc>
3951 Error information describing the reason of machine
3952 inaccessibility.
3953
3954 Reading this property is only valid after the last call to
3955 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
3956 machine is currently unaccessible). Otherwise, a null
3957 IVirtualBoxErrorInfo object will be returned.
3958 </desc>
3959 </attribute>
3960
3961 <attribute name="name" type="wstring">
3962 <desc>
3963 Name of the virtual machine.
3964
3965 Besides being used for human-readable identification purposes
3966 everywhere in VirtualBox, the virtual machine name is also used
3967 as a name of the machine's settings file and as a name of the
3968 subdirectory this settings file resides in. Thus, every time you
3969 change the value of this property, the settings file will be
3970 renamed once you call <link to="#saveSettings"/> to confirm the
3971 change. The containing subdirectory will be also renamed, but
3972 only if it has exactly the same name as the settings file
3973 itself prior to changing this property (for backward compatibility
3974 with previous API releases). The above implies the following
3975 limitations:
3976 <ul>
3977 <li>The machine name cannot be empty.</li>
3978 <li>The machine name can contain only characters that are valid
3979 file name characters according to the rules of the file
3980 system used to store VirtualBox configuration.</li>
3981 <li>You cannot have two or more machines with the same name
3982 if they use the same subdirectory for storing the machine
3983 settings files.</li>
3984 <li>You cannot change the name of the machine if it is running,
3985 or if any file in the directory containing the settings file
3986 is being used by another running machine or by any other
3987 process in the host operating system at a time when
3988 <link to="#saveSettings"/> is called.
3989 </li>
3990 </ul>
3991 If any of the above limitations are hit, <link to="#saveSettings"/>
3992 will return an appropriate error message explaining the exact
3993 reason and the changes you made to this machine will not be
3994 saved.
3995 <note>
3996 For "legacy" machines created using the
3997 <link to="IVirtualBox::createLegacyMachine"/> call,
3998 the above naming limitations do not apply because the
3999 machine name does not affect the settings file name.
4000 The settings file name remains the same as it was specified
4001 during machine creation and never changes.
4002 </note>
4003 </desc>
4004 </attribute>
4005
4006 <attribute name="description" type="wstring">
4007 <desc>
4008 Description of the virtual machine.
4009
4010 The description attribute can contain any text and is
4011 typically used to describe the hardware and software
4012 configuration of the virtual machine in detail (i.e. network
4013 settings, versions of the installed software and so on).
4014 </desc>
4015 </attribute>
4016
4017 <attribute name="id" type="uuid" readonly="yes">
4018 <desc>UUID of the virtual machine.</desc>
4019 </attribute>
4020
4021 <attribute name="OSTypeId" type="wstring">
4022 <desc>
4023 User-defined identifier of the Guest OS type.
4024 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4025 an IGuestOSType object representing details about the given
4026 Guest OS type.
4027 <note>
4028 This value may differ from the value returned by
4029 <link to="IGuest::OSTypeId"/> if Guest Additions are
4030 installed to the guest OS.
4031 </note>
4032 </desc>
4033 </attribute>
4034
4035 <attribute name="HardwareVersion" type="wstring">
4036 <desc>Hardware version identifier. Internal use only for now.</desc>
4037 </attribute>
4038
4039 <attribute name="CPUCount" type="unsigned long">
4040 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
4041 </attribute>
4042
4043 <attribute name="memorySize" type="unsigned long">
4044 <desc>System memory size in megabytes.</desc>
4045 </attribute>
4046
4047 <attribute name="memoryBalloonSize" type="unsigned long">
4048 <desc>Initial memory balloon size in megabytes.</desc>
4049 </attribute>
4050
4051 <attribute name="statisticsUpdateInterval" type="unsigned long">
4052 <desc>Initial interval to update guest statistics in seconds.</desc>
4053 </attribute>
4054
4055 <attribute name="VRAMSize" type="unsigned long">
4056 <desc>Video memory size in megabytes.</desc>
4057 </attribute>
4058
4059 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4060 <desc>
4061 This setting determines whether VirtualBox allows guests to make use
4062 of the 3D graphics support available on the host. Currently limited
4063 to OpenGL only. </desc>
4064 </attribute>
4065
4066 <attribute name="monitorCount" type="unsigned long">
4067 <desc>
4068 Number of virtual monitors.
4069 <note>
4070 Only effective on Windows XP and later guests with
4071 Guest Additions installed.
4072 </note>
4073 </desc>
4074 </attribute>
4075
4076 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4077 <desc>Object containing all BIOS settings.</desc>
4078 </attribute>
4079
4080 <attribute name="HWVirtExEnabled" type="TSBool">
4081 <desc>
4082 This setting determines whether VirtualBox will try to make use of
4083 the host CPU's hardware virtualization extensions such as Intel VT-x
4084 and AMD-V. Note that in case such extensions are not available,
4085 they will not be used.
4086 </desc>
4087 </attribute>
4088
4089 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4090 <desc>
4091 This setting determines whether VirtualBox will try to make use of
4092 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4093 such extensions are not available, they will not be used.
4094 </desc>
4095 </attribute>
4096
4097 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4098 <desc>
4099 This setting determines whether VirtualBox will try to make use of
4100 the VPID extension of Intel VT-x. Note that in case such extensions are
4101 not available, they will not be used.
4102 </desc>
4103 </attribute>
4104
4105 <attribute name="PAEEnabled" type="boolean" default="false">
4106 <desc>
4107 This setting determines whether VirtualBox will expose the Physical Address
4108 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4109 is not available, it will not be reported.
4110 </desc>
4111 </attribute>
4112
4113 <attribute name="snapshotFolder" type="wstring">
4114 <desc>
4115 Full path to the directory used to store snapshot data
4116 (differencing hard disks and saved state files) of this machine.
4117
4118 The initial value of this property is
4119 <tt>&lt;</tt><link to="#settingsFilePath">
4120 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4121 <link to="#id">machine_uuid</link>
4122 <tt>&gt;</tt>.
4123
4124 Currently, it is an error to try to change this property on
4125 a machine that has snapshots (because this would require to
4126 move possibly large files to a different location).
4127 A separate method will be available for this purpose later.
4128
4129 <note>
4130 Setting this property to <tt>null</tt> will restore the
4131 initial value.
4132 </note>
4133 <note>
4134 When setting this property, the specified path can be
4135 absolute (full path) or relative to the directory where the
4136 <link to="#settingsFilePath">machine settings file</link>
4137 is located. When reading this property, a full path is
4138 always returned.
4139 </note>
4140 <note>
4141 The specified path may not exist, it will be created
4142 when necessary.
4143 </note>
4144 </desc>
4145 </attribute>
4146
4147 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4148 <desc>VRDP server object.</desc>
4149 </attribute>
4150
4151 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4152 <desc>Array of hard disks attached to this machine.</desc>
4153 </attribute>
4154
4155 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4156 <desc>Associated DVD drive object.</desc>
4157 </attribute>
4158
4159 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4160 <desc>Associated floppy drive object.</desc>
4161 </attribute>
4162
4163 <attribute name="USBController" type="IUSBController" readonly="yes">
4164 <desc>
4165 Associated USB controller object.
4166
4167 <note>
4168 This method may set a @ref com_warnings "warning result code".
4169 </note>
4170 <note>
4171 If USB functionality is not available in the given edition of
4172 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4173 </note>
4174 </desc>
4175 </attribute>
4176
4177 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4178 <desc>Associated audio adapter, always present.</desc>
4179 </attribute>
4180
4181 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4182 <desc>Array of storage controllers attached to this machine.</desc>
4183 </attribute>
4184
4185 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4186 <desc>
4187 Full name of the file containing machine settings data.
4188 </desc>
4189 </attribute>
4190
4191 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4192 <desc>
4193 Current version of the format of the settings file of this machine
4194 (<link to="#settingsFilePath"/>).
4195
4196 The version string has the following format:
4197 <pre>
4198 x.y-platform
4199 </pre>
4200 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4201 versions, and <tt>platform</tt> is the platform identifier.
4202
4203 The current version usually matches the value of the
4204 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4205 settings file was created by an older version of VirtualBox and there
4206 was a change of the settings file format since then.
4207
4208 Note that VirtualBox automatically converts settings files from older
4209 versions to the most recent version when reading them (usually at
4210 VirtualBox startup) but it doesn't save the changes back until
4211 you call a method that implicitly saves settings (such as
4212 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4213 explicitly. Therefore, if the value of this attribute differs from the
4214 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4215 means that the settings file was converted but the result of the
4216 conversion is not yet saved to disk.
4217
4218 The above feature may be used by interactive front-ends to inform users
4219 about the settings file format change and offer them to explicitly save
4220 all converted settings files (the global and VM-specific ones),
4221 optionally create backup copies of the old settings files before saving,
4222 etc.
4223
4224 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4225 </desc>
4226 </attribute>
4227
4228 <attribute name="settingsModified" type="boolean" readonly="yes">
4229 <desc>
4230 Whether the settings of this machine have been modified
4231 (but neither yet saved nor discarded).
4232 <note>
4233 Reading this property is only valid on instances returned
4234 by <link to="ISession::machine"/> and on new machines
4235 created by <link to="IVirtualBox::createMachine"/> or opened
4236 by <link to="IVirtualBox::openMachine"/> but not
4237 yet registered, or on unregistered machines after calling
4238 <link to="IVirtualBox::unregisterMachine"/>. For all other
4239 cases, the settings can never be modified.
4240 </note>
4241 <note>
4242 For newly created unregistered machines, the value of this
4243 property is always TRUE until <link to="#saveSettings"/>
4244 is called (no matter if any machine settings have been
4245 changed after the creation or not). For opened machines
4246 the value is set to FALSE (and then follows to normal rules).
4247 </note>
4248 </desc>
4249 </attribute>
4250
4251 <attribute name="sessionState" type="SessionState" readonly="yes">
4252 <desc>Current session state for this machine.</desc>
4253 </attribute>
4254
4255 <attribute name="sessionType" type="wstring" readonly="yes">
4256 <desc>
4257 Type of the session. If <link to="#sessionState"/> is
4258 SessionSpawning or SessionOpen, this attribute contains the
4259 same value as passed to the
4260 <link to="IVirtualBox::openRemoteSession"/> method in the
4261 @a type parameter. If the session was opened directly using
4262 <link to="IVirtualBox::openSession"/>, or if
4263 <link to="#sessionState"/> is SessionClosed, the value of this
4264 attribute is @c null.
4265 </desc>
4266 </attribute>
4267
4268 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4269 <desc>
4270 Identifier of the session process. This attribute contains the
4271 platform-dependent identifier of the process that has opened a
4272 direct session for this machine using the
4273 <link to="IVirtualBox::openSession"/> call. The returned value
4274 is only valid if <link to="#sessionState"/> is SessionOpen or
4275 SessionClosing (i.e. a session is currently open or being
4276 closed) by the time this property is read.
4277 </desc>
4278 </attribute>
4279
4280 <attribute name="state" type="MachineState" readonly="yes">
4281 <desc>Current execution state of this machine.</desc>
4282 </attribute>
4283
4284 <attribute name="lastStateChange" type="long long" readonly="yes">
4285 <desc>
4286 Time stamp of the last execution state change,
4287 in milliseconds since 1970-01-01 UTC.
4288 </desc>
4289 </attribute>
4290
4291 <attribute name="stateFilePath" type="wstring" readonly="yes">
4292 <desc>
4293 Full path to the file that stores the execution state of
4294 the machine when it is in the <link to="MachineState_Saved"/> state.
4295 <note>
4296 When the machine is not in the Saved state, this attribute
4297 <tt>null</tt>.
4298 </note>
4299 </desc>
4300 </attribute>
4301
4302 <attribute name="logFolder" type="wstring" readonly="yes">
4303 <desc>
4304 Full path to the folder that stores a set of rotated log files
4305 recorded during machine execution. The most recent log file is
4306 named <tt>VBox.log</tt>, the previous log file is
4307 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4308 in the current version).
4309 </desc>
4310 </attribute>
4311
4312 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4313 <desc>
4314 Current snapshot of this machine.
4315 <note>
4316 A <tt>null</tt> object is returned if the machine doesn't
4317 have snapshots.
4318 </note>
4319 <see><link to="ISnapshot"/></see>
4320 </desc>
4321 </attribute>
4322
4323 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4324 <desc>
4325 Number of snapshots taken on this machine. Zero means the
4326 machine doesn't have any snapshots.
4327 </desc>
4328 </attribute>
4329
4330 <attribute name="currentStateModified" type="boolean" readonly="yes">
4331 <desc>
4332 Returns <tt>true</tt> if the current state of the machine is not
4333 identical to the state stored in the current snapshot.
4334
4335 The current state is identical to the current snapshot right
4336 after one of the following calls are made:
4337 <ul>
4338 <li><link to="IConsole::discardCurrentState"/> or
4339 <link to="IConsole::discardCurrentSnapshotAndState"/>
4340 </li>
4341 <li><link to="IConsole::takeSnapshot"/> (issued on a
4342 powered off or saved machine, for which
4343 <link to="#settingsModified"/> returns <tt>false</tt>)
4344 </li>
4345 <li><link to="IMachine::setCurrentSnapshot"/>
4346 </li>
4347 </ul>
4348
4349 The current state remains identical until one of the following
4350 happens:
4351 <ul>
4352 <li>settings of the machine are changed</li>
4353 <li>the saved state is discarded</li>
4354 <li>the current snapshot is discarded</li>
4355 <li>an attempt to execute the machine is made</li>
4356 </ul>
4357
4358 <note>
4359 For machines that don't have snapshots, this property is
4360 always <tt>false</tt>.
4361 </note>
4362 </desc>
4363 </attribute>
4364
4365 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4366 <desc>
4367 Collection of shared folders for this machine (permanent shared
4368 folders). These folders are shared automatically at machine startup
4369 and available only to the guest OS installed within this machine.
4370
4371 New shared folders are added to the collection using
4372 <link to="#createSharedFolder"/>. Existing shared folders can be
4373 removed using <link to="#removeSharedFolder"/>.
4374 </desc>
4375 </attribute>
4376
4377 <attribute name="clipboardMode" type="ClipboardMode">
4378 <desc>
4379 Synchronization mode between the host OS clipboard
4380 and the guest OS clipboard.
4381 </desc>
4382 </attribute>
4383
4384 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4385 <desc>
4386 A comma-separated list of simple glob patterns. Changes to guest
4387 properties whose name matches one of the patterns will generate an
4388 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4389 </desc>
4390 </attribute>
4391
4392 <method name="setBootOrder">
4393 <desc>
4394 Puts the given device to the specified position in
4395 the boot order.
4396
4397 To indicate that no device is associated with the given position,
4398 <link to="DeviceType_Null"/> should be used.
4399
4400 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4401
4402 <result name="E_INVALIDARG">
4403 Boot @a position out of range.
4404 </result>
4405 <result name="E_NOTIMPL">
4406 Booting from USB @a device currently not supported.
4407 </result>
4408
4409 </desc>
4410 <param name="position" type="unsigned long" dir="in">
4411 <desc>
4412 Position in the boot order (<tt>1</tt> to the total number of
4413 devices the machine can boot from, as returned by
4414 <link to="ISystemProperties::maxBootPosition"/>).
4415 </desc>
4416 </param>
4417 <param name="device" type="DeviceType" dir="in">
4418 <desc>
4419 The type of the device used to boot at the given position.
4420 </desc>
4421 </param>
4422 </method>
4423
4424 <method name="getBootOrder" const="yes">
4425 <desc>
4426 Returns the device type that occupies the specified
4427 position in the boot order.
4428
4429 @todo [remove?]
4430 If the machine can have more than one device of the returned type
4431 (such as hard disks), then a separate method should be used to
4432 retrieve the individual device that occupies the given position.
4433
4434 If here are no devices at the given position, then
4435 <link to="DeviceType_Null"/> is returned.
4436
4437 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4438
4439 <result name="E_INVALIDARG">
4440 Boot @a position out of range.
4441 </result>
4442
4443 </desc>
4444 <param name="position" type="unsigned long" dir="in">
4445 <desc>
4446 Position in the boot order (<tt>1</tt> to the total number of
4447 devices the machine can boot from, as returned by
4448 <link to="ISystemProperties::maxBootPosition"/>).
4449 </desc>
4450 </param>
4451 <param name="device" type="DeviceType" dir="return">
4452 <desc>
4453 Device at the given position.
4454 </desc>
4455 </param>
4456 </method>
4457
4458 <method name="attachHardDisk">
4459 <desc>
4460 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4461 by the given UUID @a id) to the given hard disk controller
4462 (<link to="IStorageController" />, identified by @a name),
4463 at the indicated port and device.
4464
4465 For the IDE bus, the @a controllerPort parameter can be either
4466 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4467 respectively. For the primary controller of the IDE bus,
4468 @a device can be either @c 0 or @c 1, to specify the master or the
4469 slave device, respectively. For the secondary IDE controller, the
4470 device number must be @c 1 because VirtualBox reserves the
4471 secondary master for the CD-ROM drive.
4472
4473 For an SATA controller, @a controllerPort must be a number ranging
4474 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4475 be a number ranging from @c 0 to @c 15.
4476
4477 For both SCSI and SATA, the @a device parameter is unused and must
4478 be @c 0.
4479
4480 The specified device slot must not have another disk attached to it, or
4481 this method will fail.
4482
4483 See <link to="IHardDisk"/> for more detailed information about
4484 attaching hard disks.
4485
4486 <note>
4487 You cannot attach a hard disk to a running machine. Also, you cannot
4488 attach a hard disk to a newly created machine until this machine's
4489 settings are saved to disk using <link to="#saveSettings"/>.
4490 </note>
4491 <note>
4492 If the hard disk is being attached indirectly, a new differencing hard
4493 disk will implicitly be created for it and attached instead. If the
4494 changes made to the machine settings (including this indirect
4495 attachment) are later cancelled using <link to="#discardSettings"/>,
4496 this implicitly created differencing hard disk will implicitly
4497 be deleted.
4498 </note>
4499
4500 <result name="E_INVALIDARG">
4501 SATA device, SATA port, IDE port or IDE slot out of range.
4502 </result>
4503 <result name="VBOX_E_INVALID_OBJECT_STATE">
4504 Attempt to attach hard disk to an unregistered virtual machine.
4505 </result>
4506 <result name="VBOX_E_INVALID_VM_STATE">
4507 Invalid machine state.
4508 </result>
4509 <result name="VBOX_E_OBJECT_IN_USE">
4510 Hard disk already attached to this or another virtual machine.
4511 </result>
4512
4513 </desc>
4514 <param name="id" type="uuid" dir="in">
4515 <desc>UUID of the hard disk to attach.</desc>
4516 </param>
4517 <param name="name" type="wstring" dir="in">
4518 <desc>Name of the storage controller to attach the hard disk to.</desc>
4519 </param>
4520 <param name="controllerPort" type="long" dir="in">
4521 <desc>Port to attach the hard disk to.</desc>
4522 </param>
4523 <param name="device" type="long" dir="in">
4524 <desc>
4525 Device slot in the given port to attach the hard disk to.
4526 </desc>
4527 </param>
4528 </method>
4529
4530 <method name="getHardDisk" const="yes">
4531 <desc>
4532 Returns the virtual hard disk attached to a device slot of the specified
4533 bus.
4534
4535 Note that if the hard disk was indirectly attached by
4536 <link to="#attachHardDisk"/> to the given device slot then this
4537 method will return not the same object as passed to the
4538 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4539 more detailed information about attaching hard disks.
4540
4541 <result name="VBOX_E_OBJECT_NOT_FOUND">
4542 No hard disk attached to given slot/bus.
4543 </result>
4544
4545 </desc>
4546 <param name="name" type="wstring" dir="in">
4547 <desc>Name of the storage controller the hard disk is attached to.</desc>
4548 </param>
4549 <param name="controllerPort" type="long" dir="in">
4550 <desc>Port to query.</desc>
4551 </param>
4552 <param name="device" type="long" dir="in">
4553 <desc>Device slot in the given port to query.</desc>
4554 </param>
4555 <param name="hardDisk" type="IHardDisk" dir="return">
4556 <desc>Attached hard disk object.</desc>
4557 </param>
4558 </method>
4559
4560 <method name="detachHardDisk">
4561 <desc>
4562 Detaches the virtual hard disk attached to a device slot of the
4563 specified bus.
4564
4565 Detaching the hard disk from the virtual machine is deferred. This means
4566 that the hard disk remains associated with the machine when this method
4567 returns and gets actually de-associated only after a successful
4568 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4569 for more detailed information about attaching hard disks.
4570
4571 <note>
4572 You cannot detach the hard disk from a running machine.
4573 </note>
4574 <note>
4575 Detaching differencing hard disks implicitly created by <link
4576 to="#attachHardDisk"/> for the indirect attachment using this
4577 method will <b>not</b> implicitly delete them. The
4578 <link to="IHardDisk::deleteStorage"/> operation should be
4579 explicitly performed by the caller after the hard disk is successfully
4580 detached and the settings are saved with
4581 <link to="#saveSettings"/>, if it is the desired action.
4582 </note>
4583
4584 <result name="VBOX_E_INVALID_VM_STATE">
4585 Attempt to detach hard disk from a running virtual machine.
4586 </result>
4587 <result name="VBOX_E_OBJECT_NOT_FOUND">
4588 No hard disk attached to given slot/bus.
4589 </result>
4590 <result name="VBOX_E_NOT_SUPPORTED">
4591 Hard disk format does not support storage deletion.
4592 </result>
4593
4594 </desc>
4595 <param name="name" type="wstring" dir="in">
4596 <desc>name of the storage controller to detach the hard disk from.</desc>
4597 </param>
4598 <param name="controllerPort" type="long" dir="in">
4599 <desc>Port number to detach the hard disk from.</desc>
4600 </param>
4601 <param name="device" type="long" dir="in">
4602 <desc>Device slot number to detach the hard disk from.</desc>
4603 </param>
4604 </method>
4605
4606 <method name="getHardDiskAttachmentsOfController" const="yes">
4607 <desc>
4608 Returns an array of hard disk attachments which are attached to the
4609 the controller with the given name.
4610
4611 <result name="VBOX_E_OBJECT_NOT_FOUND">
4612 A storage controller with given name doesn't exist.
4613 </result>
4614 </desc>
4615 <param name="name" type="wstring" dir="in"/>
4616 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4617 </method>
4618
4619 <method name="getNetworkAdapter" const="yes">
4620 <desc>
4621 Returns the network adapter associated with the given slot.
4622 Slots are numbered sequentially, starting with zero. The total
4623 number of adapters per machine is defined by the
4624 <link to="ISystemProperties::networkAdapterCount"/> property,
4625 so the maximum slot number is one less than that property's value.
4626
4627 <result name="E_INVALIDARG">
4628 Invalid @a slot number.
4629 </result>
4630
4631 </desc>
4632 <param name="slot" type="unsigned long" dir="in"/>
4633 <param name="adapter" type="INetworkAdapter" dir="return"/>
4634 </method>
4635
4636 <method name="addStorageController">
4637 <desc>
4638 Adds a new storage controller (SCSI or SATA controller) to the
4639 machine and returns it as an instance of
4640 <link to="IStorageController" />.
4641
4642 @a name identifies the controller with subsequent calls such as
4643 <link to="#getStorageControllerByName" /> or
4644 <link to="#removeStorageController" /> or
4645 <link to="#attachHardDisk" />.
4646
4647 After the controller has been added, you can set its exact
4648 type by setting the <link to="IStorageController::controllerType" />.
4649
4650 <result name="VBOX_E_OBJECT_IN_USE">
4651 A storage controller with given name exists already.
4652 </result>
4653 <result name="E_INVALIDARG">
4654 Invalid @a controllerType.
4655 </result>
4656 </desc>
4657 <param name="name" type="wstring" dir="in"/>
4658 <param name="connectionType" type="StorageBus" dir="in"/>
4659 <param name="controller" type="IStorageController" dir="return"/>
4660 </method>
4661
4662 <method name="getStorageControllerByName" const="yes">
4663 <desc>
4664 Returns a storage controller with the given name.
4665
4666 <result name="VBOX_E_OBJECT_NOT_FOUND">
4667 A storage controller with given name doesn't exist.
4668 </result>
4669 </desc>
4670 <param name="name" type="wstring" dir="in"/>
4671 <param name="storageController" type="IStorageController" dir="return"/>
4672 </method>
4673
4674 <method name="removeStorageController">
4675 <desc>
4676 Removes a storage controller from the machine.
4677
4678 <result name="VBOX_E_OBJECT_NOT_FOUND">
4679 A storage controller with given name doesn't exist.
4680 </result>
4681 </desc>
4682 <param name="name" type="wstring" dir="in"/>
4683 </method>
4684
4685 <method name="getSerialPort" const="yes">
4686 <desc>
4687 Returns the serial port associated with the given slot.
4688 Slots are numbered sequentially, starting with zero. The total
4689 number of serial ports per machine is defined by the
4690 <link to="ISystemProperties::serialPortCount"/> property,
4691 so the maximum slot number is one less than that property's value.
4692
4693 <result name="E_INVALIDARG">
4694 Invalid @a slot number.
4695 </result>
4696
4697 </desc>
4698 <param name="slot" type="unsigned long" dir="in"/>
4699 <param name="port" type="ISerialPort" dir="return"/>
4700 </method>
4701
4702 <method name="getParallelPort" const="yes">
4703 <desc>
4704 Returns the parallel port associated with the given slot.
4705 Slots are numbered sequentially, starting with zero. The total
4706 number of parallel ports per machine is defined by the
4707 <link to="ISystemProperties::parallelPortCount"/> property,
4708 so the maximum slot number is one less than that property's value.
4709
4710 <result name="E_INVALIDARG">
4711 Invalid @a slot number.
4712 </result>
4713
4714 </desc>
4715 <param name="slot" type="unsigned long" dir="in"/>
4716 <param name="port" type="IParallelPort" dir="return"/>
4717 </method>
4718
4719 <method name="getNextExtraDataKey">
4720 <desc>
4721 Returns the machine-specific extra data key name following the
4722 supplied key.
4723
4724 An error is returned if the supplied @a key does not exist. @c NULL is
4725 returned in @a nextKey if the supplied key is the last key. When
4726 supplying @c NULL for the @a key, the first key item is returned in
4727 @a nextKey (if there is any). @a nextValue is an optional parameter and
4728 if supplied, the next key's value is returned in it.
4729
4730 <result name="VBOX_E_OBJECT_NOT_FOUND">
4731 Extra data @a key not found.
4732 </result>
4733
4734 </desc>
4735 <param name="key" type="wstring" dir="in">
4736 <desc>Name of the data key to follow.</desc>
4737 </param>
4738 <param name="nextKey" type="wstring" dir="out">
4739 <desc>Name of the next data key.</desc>
4740 </param>
4741 <param name="nextValue" type="wstring" dir="out">
4742 <desc>Value of the next data key.</desc>
4743 </param>
4744 </method>
4745
4746 <method name="getExtraData">
4747 <desc>
4748 Returns associated machine-specific extra data.
4749
4750 If the requested data @a key does not exist, this function will
4751 succeed and return @c NULL in the @a value argument.
4752
4753 <result name="VBOX_E_FILE_ERROR">
4754 Settings file not accessible.
4755 </result>
4756 <result name="VBOX_E_XML_ERROR">
4757 Could not parse the settings file.
4758 </result>
4759
4760 </desc>
4761 <param name="key" type="wstring" dir="in">
4762 <desc>Name of the data key to get.</desc>
4763 </param>
4764 <param name="value" type="wstring" dir="return">
4765 <desc>Value of the requested data key.</desc>
4766 </param>
4767 </method>
4768
4769 <method name="setExtraData">
4770 <desc>
4771 Sets associated machine-specific extra data.
4772
4773 If you pass @c NULL as a key @a value, the given @a key will be
4774 deleted.
4775
4776 <note>
4777 Before performing the actual data change, this method will ask all
4778 registered callbacks using the
4779 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4780 notification for a permission. If one of the callbacks refuses the
4781 new value, the change will not be performed.
4782 </note>
4783 <note>
4784 On success, the
4785 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4786 is called to inform all registered callbacks about a successful data
4787 change.
4788 </note>
4789 <note>
4790 This method can be called outside the machine session and therefore
4791 it's a caller's responsibility to handle possible race conditions
4792 when several clients change the same key at the same time.
4793 </note>
4794
4795 <result name="VBOX_E_FILE_ERROR">
4796 Settings file not accessible.
4797 </result>
4798 <result name="VBOX_E_XML_ERROR">
4799 Could not parse the settings file.
4800 </result>
4801
4802 </desc>
4803 <param name="key" type="wstring" dir="in">
4804 <desc>Name of the data key to set.</desc>
4805 </param>
4806 <param name="value" type="wstring" dir="in">
4807 <desc>Value to assign to the key.</desc>
4808 </param>
4809 </method>
4810
4811 <method name="saveSettings">
4812 <desc>
4813 Saves any changes to machine settings made since the session
4814 has been opened or a new machine has been created, or since the
4815 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4816 For registered machines, new settings become visible to all
4817 other VirtualBox clients after successful invocation of this
4818 method.
4819 <note>
4820 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4821 notification event after the configuration has been successfully
4822 saved (only for registered machines).
4823 </note>
4824 <note>
4825 Calling this method is only valid on instances returned
4826 by <link to="ISession::machine"/> and on new machines
4827 created by <link to="IVirtualBox::createMachine"/> but not
4828 yet registered, or on unregistered machines after calling
4829 <link to="IVirtualBox::unregisterMachine"/>.
4830 </note>
4831
4832 <result name="VBOX_E_FILE_ERROR">
4833 Settings file not accessible.
4834 </result>
4835 <result name="VBOX_E_XML_ERROR">
4836 Could not parse the settings file.
4837 </result>
4838 <result name="E_ACCESSDENIED">
4839 Modification request refused.
4840 </result>
4841
4842 </desc>
4843 </method>
4844
4845 <method name="saveSettingsWithBackup">
4846 <desc>
4847 Creates a backup copy of the machine settings file (<link
4848 to="#settingsFilePath"/>) in case of auto-conversion, and then calls
4849 <link to="#saveSettings"/>.
4850
4851 Note that the backup copy is created <b>only</b> if the settings file
4852 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4853 details). Otherwise, this call is fully equivalent to
4854 <link to="#saveSettings"/> and no backup copying is done.
4855
4856 The backup copy is created in the same directory where the original
4857 settings file is located. It is given the following file name:
4858 <pre>
4859 original.xml.x.y-platform.bak
4860 </pre>
4861 where <tt>original.xml</tt> is the original settings file name
4862 (excluding path), and <tt>x.y-platform</tt> is the version of the old
4863 format of the settings file (before auto-conversion).
4864
4865 If the given backup file already exists, this method will try to add the
4866 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
4867 0 to 9) and copy it again until it succeeds. If all suffixes are
4868 occupied, or if any other copy error occurs, this method will return a
4869 failure.
4870
4871 If the copy operation succeeds, the @a bakFileName return argument will
4872 receive a full path to the created backup file (for informational
4873 purposes). Note that this will happen even if the subsequent
4874 <link to="#saveSettings"/> call performed by this method after the
4875 copy operation, fails.
4876
4877 <note>
4878 The VirtualBox API never calls this method. It is intended purely for
4879 the purposes of creating backup copies of the settings files by
4880 front-ends before saving the results of the automatically performed
4881 settings conversion to disk.
4882 </note>
4883
4884 <see>settingsFileVersion</see>
4885
4886 <result name="VBOX_E_FILE_ERROR">
4887 Settings file not accessible.
4888 </result>
4889 <result name="VBOX_E_XML_ERROR">
4890 Could not parse the settings file.
4891 </result>
4892 <result name="VBOX_E_INVALID_VM_STATE">
4893 Virtual machine is not mutable.
4894 </result>
4895 <result name="E_ACCESSDENIED">
4896 Modification request refused.
4897 </result>
4898
4899 </desc>
4900 <param name="bakFileName" type="wstring" dir="return">
4901 <desc>Full path to the created backup copy.</desc>
4902 </param>
4903 </method>
4904
4905 <method name="discardSettings">
4906 <desc>
4907 Discards any changes to the machine settings made since the session
4908 has been opened or since the last call to <link to="#saveSettings"/>
4909 or <link to="#discardSettings"/>.
4910 <note>
4911 Calling this method is only valid on instances returned
4912 by <link to="ISession::machine"/> and on new machines
4913 created by <link to="IVirtualBox::createMachine"/> or
4914 opened by <link to="IVirtualBox::openMachine"/> but not
4915 yet registered, or on unregistered machines after calling
4916 <link to="IVirtualBox::unregisterMachine"/>.
4917 </note>
4918
4919 <result name="VBOX_E_INVALID_VM_STATE">
4920 Virtual machine is not mutable.
4921 </result>
4922
4923 </desc>
4924 </method>
4925
4926 <method name="deleteSettings">
4927 <desc>
4928 Deletes the settings file of this machine from disk.
4929 The machine must not be registered in order for this operation
4930 to succeed.
4931 <note>
4932 <link to="#settingsModified"/> will return TRUE after this
4933 method successfully returns.
4934 </note>
4935 <note>
4936 Calling this method is only valid on instances returned
4937 by <link to="ISession::machine"/> and on new machines
4938 created by <link to="IVirtualBox::createMachine"/> or
4939 opened by <link to="IVirtualBox::openMachine"/> but not
4940 yet registered, or on unregistered machines after calling
4941 <link to="IVirtualBox::unregisterMachine"/>.
4942 </note>
4943 <note>
4944 The deleted machine settings file can be restored (saved again)
4945 by calling <link to="#saveSettings"/>.
4946 </note>
4947
4948 <result name="VBOX_E_INVALID_VM_STATE">
4949 Cannot delete settings of a registered machine or
4950 machine not mutable.
4951 </result>
4952 <result name="VBOX_E_IPRT_ERROR">
4953 Could not delete the settings file.
4954 </result>
4955
4956 </desc>
4957 </method>
4958
4959 <method name="export">
4960 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
4961 steps required to export VirtualBox machines to OVF.
4962 </desc>
4963
4964 <param name="appliance" type="IAppliance" dir="in">
4965 <desc>Appliance to export this machine to.</desc>
4966 </param>
4967 </method >
4968
4969 <method name="getSnapshot">
4970 <desc>
4971 Returns a snapshot of this machine with the given UUID.
4972 A <tt>null</tt> UUID can be used to obtain the first snapshot
4973 taken on this machine. This is useful if you want to traverse
4974 the whole tree of snapshots starting from the root.
4975
4976 <result name="VBOX_E_OBJECT_NOT_FOUND">
4977 Virtual machine has no snapshots or snapshot not found.
4978 </result>
4979
4980 </desc>
4981 <param name="id" type="uuid" dir="in">
4982 <desc>UUID of the snapshot to get</desc>
4983 </param>
4984 <param name="snapshot" type="ISnapshot" dir="return">
4985 <desc>Snapshot object with the given UUID.</desc>
4986 </param>
4987 </method>
4988
4989 <method name="findSnapshot">
4990 <desc>
4991 Returns a snapshot of this machine with the given name.
4992
4993 <result name="VBOX_E_OBJECT_NOT_FOUND">
4994 Virtual machine has no snapshots or snapshot not found.
4995 </result>
4996
4997 </desc>
4998 <param name="name" type="wstring" dir="in">
4999 <desc>Name of the snapshot to find</desc>
5000 </param>
5001 <param name="snapshot" type="ISnapshot" dir="return">
5002 <desc>Snapshot object with the given name.</desc>
5003 </param>
5004 </method>
5005
5006 <method name="setCurrentSnapshot">
5007 <desc>
5008 Sets the current snapshot of this machine.
5009 <note>
5010 In the current implementation, this operation is not
5011 implemented.
5012 </note>
5013 </desc>
5014 <param name="id" type="uuid" dir="in">
5015 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5016 </param>
5017 </method>
5018
5019 <method name="createSharedFolder">
5020 <desc>
5021 Creates a new permanent shared folder by associating the given logical
5022 name with the given host path, adds it to the collection of shared
5023 folders and starts sharing it. Refer to the description of
5024 <link to="ISharedFolder"/> to read more about logical names.
5025
5026 <result name="VBOX_E_OBJECT_IN_USE">
5027 Shared folder already exists.
5028 </result>
5029 <result name="VBOX_E_FILE_ERROR">
5030 Shared folder @a hostPath not accessible.
5031 </result>
5032
5033 </desc>
5034 <param name="name" type="wstring" dir="in">
5035 <desc>Unique logical name of the shared folder.</desc>
5036 </param>
5037 <param name="hostPath" type="wstring" dir="in">
5038 <desc>Full path to the shared folder in the host file system.</desc>
5039 </param>
5040 <param name="writable" type="boolean" dir="in">
5041 <desc>Whether the share is writable or readonly</desc>
5042 </param>
5043 </method>
5044
5045 <method name="removeSharedFolder">
5046 <desc>
5047 Removes the permanent shared folder with the given name previously
5048 created by <link to="#createSharedFolder"/> from the collection of
5049 shared folders and stops sharing it.
5050
5051 <result name="VBOX_E_INVALID_VM_STATE">
5052 Virtual machine is not mutable.
5053 </result>
5054 <result name="VBOX_E_OBJECT_NOT_FOUND">
5055 Shared folder @a name does not exist.
5056 </result>
5057
5058 </desc>
5059 <param name="name" type="wstring" dir="in">
5060 <desc>Logical name of the shared folder to remove.</desc>
5061 </param>
5062 </method>
5063
5064 <method name="canShowConsoleWindow">
5065 <desc>
5066 Returns @c true if the VM console process can activate the
5067 console window and bring it to foreground on the desktop of
5068 the host PC.
5069 <note>
5070 This method will fail if a session for this machine is not
5071 currently open.
5072 </note>
5073
5074 <result name="VBOX_E_INVALID_VM_STATE">
5075 Machine session is not open.
5076 </result>
5077
5078 </desc>
5079 <param name="canShow" type="boolean" dir="return">
5080 <desc>
5081 @c true if the console window can be shown and @c
5082 false otherwise.
5083 </desc>
5084 </param>
5085 </method>
5086
5087 <method name="showConsoleWindow">
5088 <desc>
5089 Activates the console window and brings it to foreground on
5090 the desktop of the host PC. Many modern window managers on
5091 many platforms implement some sort of focus stealing
5092 prevention logic, so that it may be impossible to activate
5093 a window without the help of the currently active
5094 application. In this case, this method will return a non-zero
5095 identifier that represents the top-level window of the VM
5096 console process. The caller, if it represents a currently
5097 active process, is responsible to use this identifier (in a
5098 platform-dependent manner) to perform actual window
5099 activation.
5100 <note>
5101 This method will fail if a session for this machine is not
5102 currently open.
5103 </note>
5104
5105 <result name="VBOX_E_INVALID_VM_STATE">
5106 Machine session is not open.
5107 </result>
5108
5109 </desc>
5110 <param name="winId" type="unsigned long long" dir="return">
5111 <desc>
5112 Platform-dependent identifier of the top-level VM console
5113 window, or zero if this method has performed all actions
5114 necessary to implement the <i>show window</i> semantics for
5115 the given platform and/or VirtualBox front-end.
5116 </desc>
5117 </param>
5118 </method>
5119
5120 <method name="getGuestProperty">
5121 <desc>
5122 Reads an entry from the machine's guest property store.
5123
5124 <result name="VBOX_E_INVALID_VM_STATE">
5125 Machine session is not open.
5126 </result>
5127
5128 </desc>
5129 <param name="name" type="wstring" dir="in">
5130 <desc>
5131 The name of the property to read.
5132 </desc>
5133 </param>
5134 <param name="value" type="wstring" dir="out">
5135 <desc>
5136 The value of the property. If the property does not exist then this
5137 will be empty.
5138 </desc>
5139 </param>
5140 <param name="timestamp" type="unsigned long long" dir="out">
5141 <desc>
5142 The time at which the property was last modified, as seen by the
5143 server process.
5144 </desc>
5145 </param>
5146 <param name="flags" type="wstring" dir="out">
5147 <desc>
5148 Additional property parameters, passed as a comma-separated list of
5149 "name=value" type entries.
5150 </desc>
5151 </param>
5152 </method>
5153
5154 <method name="getGuestPropertyValue">
5155 <desc>
5156 Reads a value from the machine's guest property store.
5157
5158 <result name="VBOX_E_INVALID_VM_STATE">
5159 Machine session is not open.
5160 </result>
5161
5162 </desc>
5163 <param name="property" type="wstring" dir="in">
5164 <desc>
5165 The name of the property to read.
5166 </desc>
5167 </param>
5168 <param name="value" type="wstring" dir="return">
5169 <desc>
5170 The value of the property. If the property does not exist then this
5171 will be empty.
5172 </desc>
5173 </param>
5174 </method>
5175
5176 <method name="getGuestPropertyTimestamp">
5177 <desc>
5178 Reads a property timestamp from the machine's guest property store.
5179
5180 <result name="VBOX_E_INVALID_VM_STATE">
5181 Machine session is not open.
5182 </result>
5183
5184 </desc>
5185 <param name="property" type="wstring" dir="in">
5186 <desc>
5187 The name of the property to read.
5188 </desc>
5189 </param>
5190 <param name="value" type="unsigned long long" dir="return">
5191 <desc>
5192 The timestamp. If the property does not exist then this will be
5193 empty.
5194 </desc>
5195 </param>
5196 </method>
5197
5198 <method name="setGuestProperty">
5199 <desc>
5200 Sets, changes or deletes an entry in the machine's guest property
5201 store.
5202
5203 <result name="E_ACCESSDENIED">
5204 Property cannot be changed.
5205 </result>
5206 <result name="E_INVALIDARG">
5207 Invalid @a flags.
5208 </result>
5209 <result name="VBOX_E_INVALID_VM_STATE">
5210 Virtual machine is not mutable or session not open.
5211 </result>
5212 <result name="VBOX_E_INVALID_OBJECT_STATE">
5213 Cannot set transient property when machine not running.
5214 </result>
5215
5216 </desc>
5217 <param name="property" type="wstring" dir="in">
5218 <desc>
5219 The name of the property to set, change or delete.
5220 </desc>
5221 </param>
5222 <param name="value" type="wstring" dir="in">
5223 <desc>
5224 The new value of the property to set, change or delete. If the
5225 property does not yet exist and value is non-empty, it will be
5226 created. If the value is empty, the key will be deleted if it
5227 exists.
5228 </desc>
5229 </param>
5230 <param name="flags" type="wstring" dir="in">
5231 <desc>
5232 Additional property parameters, passed as a comma-separated list of
5233 "name=value" type entries.
5234 </desc>
5235 </param>
5236 </method>
5237
5238 <method name="setGuestPropertyValue">
5239 <desc>
5240 Sets, changes or deletes a value in the machine's guest property
5241 store. The flags field will be left unchanged or created empty for a
5242 new property.
5243
5244 <result name="E_ACCESSDENIED">
5245 Property cannot be changed.
5246 </result>
5247 <result name="VBOX_E_INVALID_VM_STATE">
5248 Virtual machine is not mutable or session not open.
5249 </result>
5250 <result name="VBOX_E_INVALID_OBJECT_STATE">
5251 Cannot set transient property when machine not running.
5252 </result>
5253 </desc>
5254
5255 <param name="property" type="wstring" dir="in">
5256 <desc>
5257 The name of the property to set, change or delete.
5258 </desc>
5259 </param>
5260 <param name="value" type="wstring" dir="in">
5261 <desc>
5262 The new value of the property to set, change or delete. If the
5263 property does not yet exist and value is non-empty, it will be
5264 created. If value is empty, the property will be deleted if it
5265 exists.
5266 </desc>
5267 </param>
5268 </method>
5269
5270 <method name="enumerateGuestProperties">
5271 <desc>
5272 Return a list of the guest properties matching a set of patterns along
5273 with their values, time stamps and flags.
5274 </desc>
5275 <param name="patterns" type="wstring" dir="in">
5276 <desc>
5277 The patterns to match the properties against, separated by '|'
5278 characters. If this is empty or NULL, all properties will match.
5279 </desc>
5280 </param>
5281 <param name="name" type="wstring" dir="out" safearray="yes">
5282 <desc>
5283 The names of the properties returned.
5284 </desc>
5285 </param>
5286 <param name="value" type="wstring" dir="out" safearray="yes">
5287 <desc>
5288 The values of the properties returned. The array entries match the
5289 corresponding entries in the @a name array.
5290 </desc>
5291 </param>
5292 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5293 <desc>
5294 The time stamps of the properties returned. The array entries match
5295 the corresponding entries in the @a name array.
5296 </desc>
5297 </param>
5298 <param name="flags" type="wstring" dir="out" safearray="yes">
5299 <desc>
5300 The flags of the properties returned. The array entries match the
5301 corresponding entries in the @a name array.
5302 </desc>
5303 </param>
5304 </method>
5305</interface>
5306
5307 <!--
5308 // IConsole
5309 /////////////////////////////////////////////////////////////////////////
5310 -->
5311
5312 <interface
5313 name="IConsoleCallback" extends="$unknown"
5314 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5315 wsmap="suppress"
5316 >
5317
5318 <method name="onMousePointerShapeChange">
5319 <desc>
5320 Notification when the guest mouse pointer shape has
5321 changed. The new shape data is given.
5322 </desc>
5323 <param name="visible" type="boolean" dir="in">
5324 <desc>
5325 Flag whether the pointer is visible.
5326 </desc>
5327 </param>
5328 <param name="alpha" type="boolean" dir="in">
5329 <desc>
5330 Flag whether the pointer has an alpha channel.
5331 </desc>
5332 </param>
5333 <param name="xHot" type="unsigned long" dir="in">
5334 <desc>
5335 The pointer hot spot x coordinate.
5336 </desc>
5337 </param>
5338 <param name="yHot" type="unsigned long" dir="in">
5339 <desc>
5340 The pointer hot spot y coordinate.
5341 </desc>
5342 </param>
5343 <param name="width" type="unsigned long" dir="in">
5344 <desc>
5345 Width of the pointer shape in pixels.
5346 </desc>
5347 </param>
5348 <param name="height" type="unsigned long" dir="in">
5349 <desc>
5350 Height of the pointer shape in pixels.
5351 </desc>
5352 </param>
5353 <param name="shape" type="octet" mod="ptr" dir="in">
5354 <desc>
5355 Address of the shape buffer.
5356
5357 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5358 followed by a 32-bpp XOR (color) mask.
5359
5360 For pointers without alpha channel the XOR mask pixels are 32
5361 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5362 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5363
5364 An AND mask is used for pointers with alpha channel, so if the
5365 callback does not support alpha, the pointer could be
5366 displayed as a normal color pointer.
5367
5368 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5369 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5370 height</tt>. The padding bits at the end of each scanline are
5371 undefined.
5372
5373 The XOR mask follows the AND mask on the next 4-byte aligned
5374 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5375 Bytes in the gap between the AND and the XOR mask are undefined.
5376 The XOR mask scanlines have no gap between them and the size of
5377 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5378
5379 <note>
5380 If @a shape is 0, only the pointer visibility is changed.
5381 </note>
5382 </desc>
5383 </param>
5384 </method>
5385
5386 <method name="onMouseCapabilityChange">
5387 <desc>
5388 Notification when the mouse capabilities reported by the
5389 guest have changed. The new capabilities are passed.
5390 </desc>
5391 <param name="supportsAbsolute" type="boolean" dir="in"/>
5392 <param name="needsHostCursor" type="boolean" dir="in"/>
5393 </method>
5394
5395 <method name="onKeyboardLedsChange">
5396 <desc>
5397 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5398 to alter the state of the keyboard LEDs.
5399 </desc>
5400 <param name="numLock" type="boolean" dir="in"/>
5401 <param name="capsLock" type="boolean" dir="in"/>
5402 <param name="scrollLock" type="boolean" dir="in"/>
5403 </method>
5404
5405 <method name="onStateChange">
5406 <desc>
5407 Notification when the execution state of the machine has changed.
5408 The new state will be given.
5409 </desc>
5410 <param name="state" type="MachineState" dir="in"/>
5411 </method>
5412
5413 <method name="onAdditionsStateChange">
5414 <desc>
5415 Notification when a Guest Additions property changes.
5416 Interested callees should query IGuest attributes to
5417 find out what has changed.
5418 </desc>
5419 </method>
5420
5421 <method name="onDVDDriveChange">
5422 <desc>
5423 Notification when a property of the
5424 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5425 Interested callees should use IDVDDrive methods to find out what has
5426 changed.
5427 </desc>
5428 </method>
5429
5430 <method name="onFloppyDriveChange">
5431 <desc>
5432 Notification when a property of the
5433 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5434 Interested callees should use IFloppyDrive methods to find out what
5435 has changed.
5436 </desc>
5437 </method>
5438
5439 <method name="onNetworkAdapterChange">
5440 <desc>
5441 Notification when a property of one of the
5442 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5443 changes. Interested callees should use INetworkAdapter methods and
5444 attributes to find out what has changed.
5445 </desc>
5446 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5447 <desc>Network adapter that is subject to change.</desc>
5448 </param>
5449 </method>
5450
5451 <method name="onSerialPortChange">
5452 <desc>
5453 Notification when a property of one of the
5454 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5455 Interested callees should use ISerialPort methods and attributes
5456 to find out what has changed.
5457 </desc>
5458 <param name="serialPort" type="ISerialPort" dir="in">
5459 <desc>Serial port that is subject to change.</desc>
5460 </param>
5461 </method>
5462
5463 <method name="onParallelPortChange">
5464 <desc>
5465 Notification when a property of one of the
5466 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5467 changes. Interested callees should use ISerialPort methods and
5468 attributes to find out what has changed.
5469 </desc>
5470 <param name="parallelPort" type="IParallelPort" dir="in">
5471 <desc>Parallel port that is subject to change.</desc>
5472 </param>
5473 </method>
5474
5475 <method name="onStorageControllerChange">
5476 <desc>
5477 Notification when a property of one of the
5478 virtual <link to="IMachine::getStorageControllers">storage controllers</link>
5479 changes. Interested callees should use query the corresponding collections
5480 to find out what has changed.
5481 </desc>
5482 </method>
5483
5484 <method name="onVRDPServerChange">
5485 <desc>
5486 Notification when a property of the
5487 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5488 Interested callees should use IVRDPServer methods and attributes to
5489 find out what has changed.
5490 </desc>
5491 </method>
5492
5493 <method name="onUSBControllerChange">
5494 <desc>
5495 Notification when a property of the virtual
5496 <link to="IMachine::USBController">USB controller</link> changes.
5497 Interested callees should use IUSBController methods and attributes to
5498 find out what has changed.
5499 </desc>
5500 </method>
5501
5502 <method name="onUSBDeviceStateChange">
5503 <desc>
5504 Notification when a USB device is attached to or detached from
5505 the virtual USB controller.
5506
5507 This notification is sent as a result of the indirect
5508 request to attach the device because it matches one of the
5509 machine USB filters, or as a result of the direct request
5510 issued by <link to="IConsole::attachUSBDevice"/> or
5511 <link to="IConsole::detachUSBDevice"/>.
5512
5513 This notification is sent in case of both a succeeded and a
5514 failed request completion. When the request succeeds, the
5515 @a error parameter is @c null, and the given device has been
5516 already added to (when @a attached is @c true) or removed from
5517 (when @a attached is @c false) the collection represented by
5518 <link to="IConsole::USBDevices"/>. On failure, the collection
5519 doesn't change and the @a error parameter represents the error
5520 message describing the failure.
5521
5522 </desc>
5523 <param name="device" type="IUSBDevice" dir="in">
5524 <desc>Device that is subject to state change.</desc>
5525 </param>
5526 <param name="attached" type="boolean" dir="in">
5527 <desc>
5528 <tt>true</tt> if the device was attached
5529 and <tt>false</tt> otherwise.
5530 </desc>
5531 </param>
5532 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5533 <desc>
5534 <tt>null</tt> on success or an error message object on
5535 failure.
5536 </desc>
5537 </param>
5538 </method>
5539
5540 <method name="onSharedFolderChange">
5541 <desc>
5542 Notification when a shared folder is added or removed.
5543 The @a scope argument defines one of three scopes:
5544 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5545 (<link to="Scope_Global">Global</link>),
5546 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5547 the machine (<link to="Scope_Machine">Machine</link>) or <link
5548 to="IConsole::sharedFolders">transient shared folders</link> of the
5549 machine (<link to="Scope_Session">Session</link>). Interested callees
5550 should use query the corresponding collections to find out what has
5551 changed.
5552 </desc>
5553 <param name="scope" type="Scope" dir="in">
5554 <desc>Scope of the notification.</desc>
5555 </param>
5556 </method>
5557
5558 <method name="onRuntimeError">
5559 <desc>
5560 Notification when an error happens during the virtual
5561 machine execution.
5562
5563 There are three kinds of runtime errors:
5564 <ul>
5565 <li><i>fatal</i></li>
5566 <li><i>non-fatal with retry</i></li>
5567 <li><i>non-fatal warnings</i></li>
5568 </ul>
5569
5570 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5571 to <tt>true</tt>. In case of fatal errors, the virtual machine
5572 execution is always paused before calling this notification, and
5573 the notification handler is supposed either to immediately save
5574 the virtual machine state using <link to="IConsole::saveState"/>
5575 or power it off using <link to="IConsole::powerDown"/>.
5576 Resuming the execution can lead to unpredictable results.
5577
5578 <b>Non-fatal</b> errors and warnings are indicated by the
5579 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5580 is in the Paused state by the time the error notification is
5581 received, it means that the user can <i>try to resume</i> the machine
5582 execution after attempting to solve the problem that caused the
5583 error. In this case, the notification handler is supposed
5584 to show an appropriate message to the user (depending on the
5585 value of the @a id parameter) that offers several actions such
5586 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5587 wants to retry, the notification handler should continue
5588 the machine execution using the <link to="IConsole::resume"/>
5589 call. If the machine execution is not Paused during this
5590 notification, then it means this notification is a <i>warning</i>
5591 (for example, about a fatal condition that can happen very soon);
5592 no immediate action is required from the user, the machine
5593 continues its normal execution.
5594
5595 Note that in either case the notification handler
5596 <b>must not</b> perform any action directly on a thread
5597 where this notification is called. Everything it is allowed to
5598 do is to post a message to another thread that will then talk
5599 to the user and take the corresponding action.
5600
5601 Currently, the following error identifiers are known:
5602 <ul>
5603 <li><tt>"HostMemoryLow"</tt></li>
5604 <li><tt>"HostAudioNotResponding"</tt></li>
5605 <li><tt>"VDIStorageFull"</tt></li>
5606 </ul>
5607
5608 <note>
5609 This notification is not designed to be implemented by
5610 more than one callback at a time. If you have multiple
5611 IConsoleCallback instances registered on the given
5612 IConsole object, make sure you simply do nothing but
5613 return @c S_OK from all but one of them that does actual
5614 user notification and performs necessary actions.
5615 </note>
5616
5617 </desc>
5618 <param name="fatal" type="boolean" dir="in">
5619 <desc>Whether the error is fatal or not</desc>
5620 </param>
5621 <param name="id" type="wstring" dir="in">
5622 <desc>Error identifier</desc>
5623 </param>
5624 <param name="message" type="wstring" dir="in">
5625 <desc>Optional error message</desc>
5626 </param>
5627 </method>
5628
5629 <method name="onCanShowWindow">
5630 <desc>
5631 Notification when a call to
5632 <link to="IMachine::canShowConsoleWindow"/> is made by a
5633 front-end to check if a subsequent call to
5634 <link to="IMachine::showConsoleWindow"/> can succeed.
5635
5636 The callee should give an answer appropriate to the current
5637 machine state in the @a canShow argument. This answer must
5638 remain valid at least until the next
5639 <link to="IConsole::state">machine state</link> change.
5640
5641 <note>
5642 This notification is not designed to be implemented by
5643 more than one callback at a time. If you have multiple
5644 IConsoleCallback instances registered on the given
5645 IConsole object, make sure you simply do nothing but
5646 return @c true and @c S_OK from all but one of them that
5647 actually manages console window activation.
5648 </note>
5649 </desc>
5650 <param name="canShow" type="boolean" dir="return">
5651 <desc>
5652 @c true if the console window can be shown and @c
5653 false otherwise.
5654 </desc>
5655 </param>
5656 </method>
5657
5658 <method name="onShowWindow">
5659 <desc>
5660 Notification when a call to
5661 <link to="IMachine::showConsoleWindow"/>
5662 requests the console window to be activated and brought to
5663 foreground on the desktop of the host PC.
5664
5665 This notification should cause the VM console process to
5666 perform the requested action as described above. If it is
5667 impossible to do it at a time of this notification, this
5668 method should return a failure.
5669
5670 Note that many modern window managers on many platforms
5671 implement some sort of focus stealing prevention logic, so
5672 that it may be impossible to activate a window without the
5673 help of the currently active application (which is supposedly
5674 an initiator of this notification). In this case, this method
5675 must return a non-zero identifier that represents the
5676 top-level window of the VM console process. The caller, if it
5677 represents a currently active process, is responsible to use
5678 this identifier (in a platform-dependent manner) to perform
5679 actual window activation.
5680
5681 This method must set @a winId to zero if it has performed all
5682 actions necessary to complete the request and the console
5683 window is now active and in foreground, to indicate that no
5684 further action is required on the caller's side.
5685
5686 <note>
5687 This notification is not designed to be implemented by
5688 more than one callback at a time. If you have multiple
5689 IConsoleCallback instances registered on the given
5690 IConsole object, make sure you simply do nothing but
5691 return @c S_OK from all but one of them that actually
5692 manages console window activation.
5693 </note>
5694 </desc>
5695 <param name="winId" type="unsigned long long" dir="return">
5696 <desc>
5697 Platform-dependent identifier of the top-level VM console
5698 window, or zero if this method has performed all actions
5699 necessary to implement the <i>show window</i> semantics for
5700 the given platform and/or this VirtualBox front-end.
5701 </desc>
5702 </param>
5703 </method>
5704
5705 </interface>
5706
5707 <interface
5708 name="IRemoteDisplayInfo" extends="$unknown"
5709 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5710 wsmap="struct"
5711 >
5712 <desc>
5713 Contains information about the remote display (VRDP) capabilities and status.
5714 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5715 </desc>
5716
5717 <attribute name="active" type="boolean" readonly="yes">
5718 <desc>
5719 Whether the remote display connection is active.
5720 </desc>
5721 </attribute>
5722
5723 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5724 <desc>
5725 How many times a client connected.
5726 </desc>
5727 </attribute>
5728
5729 <attribute name="beginTime" type="long long" readonly="yes">
5730 <desc>
5731 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5732 </desc>
5733 </attribute>
5734
5735 <attribute name="endTime" type="long long" readonly="yes">
5736 <desc>
5737 When the last connection was terminated or the current time, if
5738 connection is still active, in milliseconds since 1970-01-01 UTC.
5739 </desc>
5740 </attribute>
5741
5742 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5743 <desc>
5744 How many bytes were sent in last or current, if still active, connection.
5745 </desc>
5746 </attribute>
5747
5748 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5749 <desc>
5750 How many bytes were sent in all connections.
5751 </desc>
5752 </attribute>
5753
5754 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5755 <desc>
5756 How many bytes were received in last or current, if still active, connection.
5757 </desc>
5758 </attribute>
5759
5760 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5761 <desc>
5762 How many bytes were received in all connections.
5763 </desc>
5764 </attribute>
5765
5766 <attribute name="user" type="wstring" readonly="yes">
5767 <desc>
5768 Login user name supplied by the client.
5769 </desc>
5770 </attribute>
5771
5772 <attribute name="domain" type="wstring" readonly="yes">
5773 <desc>
5774 Login domain name supplied by the client.
5775 </desc>
5776 </attribute>
5777
5778 <attribute name="clientName" type="wstring" readonly="yes">
5779 <desc>
5780 The client name supplied by the client.
5781 </desc>
5782 </attribute>
5783
5784 <attribute name="clientIP" type="wstring" readonly="yes">
5785 <desc>
5786 The IP address of the client.
5787 </desc>
5788 </attribute>
5789
5790 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5791 <desc>
5792 The client software version number.
5793 </desc>
5794 </attribute>
5795
5796 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5797 <desc>
5798 Public key exchange method used when connection was established.
5799 Values: 0 - RDP4 public key exchange scheme.
5800 1 - X509 certificates were sent to client.
5801 </desc>
5802 </attribute>
5803
5804 </interface>
5805
5806 <interface
5807 name="IConsole" extends="$unknown"
5808 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5809 wsmap="managed"
5810 >
5811 <desc>
5812 The IConsole interface represents an interface to control virtual
5813 machine execution.
5814
5815 The console object that implements the IConsole interface is obtained
5816 from a session object after the session for the given machine has been
5817 opened using one of <link to="IVirtualBox::openSession"/>,
5818 <link to="IVirtualBox::openRemoteSession"/> or
5819 <link to="IVirtualBox::openExistingSession"/> methods.
5820
5821 Methods of the IConsole interface allow the caller to query the current
5822 virtual machine execution state, pause the machine or power it down, save
5823 the machine state or take a snapshot, attach and detach removable media
5824 and so on.
5825
5826 <see>ISession</see>
5827 </desc>
5828
5829 <attribute name="machine" type="IMachine" readonly="yes">
5830 <desc>
5831 Machine object this console is sessioned with.
5832 <note>
5833 This is a convenience property, it has the same value as
5834 <link to="ISession::machine"/> of the corresponding session
5835 object.
5836 </note>
5837 </desc>
5838 </attribute>
5839
5840 <attribute name="state" type="MachineState" readonly="yes">
5841 <desc>
5842 Current execution state of the machine.
5843 <note>
5844 This property always returns the same value as the corresponding
5845 property of the IMachine object this console is sessioned with.
5846 For the process that owns (executes) the VM, this is the
5847 preferable way of querying the VM state, because no IPC
5848 calls are made.
5849 </note>
5850 </desc>
5851 </attribute>
5852
5853 <attribute name="guest" type="IGuest" readonly="yes">
5854 <desc>Guest object.</desc>
5855 </attribute>
5856
5857 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5858 <desc>
5859 Virtual keyboard object.
5860 <note>
5861 If the machine is not running, any attempt to use
5862 the returned object will result in an error.
5863 </note>
5864 </desc>
5865 </attribute>
5866
5867 <attribute name="mouse" type="IMouse" readonly="yes">
5868 <desc>
5869 Virtual mouse object.
5870 <note>
5871 If the machine is not running, any attempt to use
5872 the returned object will result in an error.
5873 </note>
5874 </desc>
5875 </attribute>
5876
5877 <attribute name="display" type="IDisplay" readonly="yes">
5878 <desc>Virtual display object.
5879 <note>
5880 If the machine is not running, any attempt to use
5881 the returned object will result in an error.
5882 </note>
5883 </desc>
5884 </attribute>
5885
5886 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5887 <desc>Debugging interface.</desc>
5888 </attribute>
5889
5890 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5891 <desc>
5892 Collection of USB devices currently attached to the virtual
5893 USB controller.
5894 <note>
5895 The collection is empty if the machine is not running.
5896 </note>
5897 </desc>
5898 </attribute>
5899
5900 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5901 <desc>
5902 List of USB devices currently attached to the remote VRDP client.
5903 Once a new device is physically attached to the remote host computer,
5904 it appears in this list and remains there until detached.
5905 </desc>
5906 </attribute>
5907
5908 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5909 <desc>
5910 Collection of shared folders for the current session. These folders
5911 are called transient shared folders because they are available to the
5912 guest OS running inside the associated virtual machine only for the
5913 duration of the session (as opposed to
5914 <link to="IMachine::sharedFolders"/> which represent permanent shared
5915 folders). When the session is closed (e.g. the machine is powered down),
5916 these folders are automatically discarded.
5917
5918 New shared folders are added to the collection using
5919 <link to="#createSharedFolder"/>. Existing shared folders can be
5920 removed using <link to="#removeSharedFolder"/>.
5921 </desc>
5922 </attribute>
5923
5924 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5925 <desc>
5926 Interface that provides information on Remote Display (VRDP) connection.
5927 </desc>
5928 </attribute>
5929
5930 <method name="powerUp">
5931 <desc>
5932 Starts the virtual machine execution using the current machine
5933 state (that is, its current execution state, current settings and
5934 current hard disks).
5935
5936 If the machine is powered off or aborted, the execution will
5937 start from the beginning (as if the real hardware were just
5938 powered on).
5939
5940 If the machine is in the <link to="MachineState_Saved"/> state,
5941 it will continue its execution the point where the state has
5942 been saved.
5943
5944 <note>
5945 Unless you are trying to write a new VirtualBox front-end that
5946 performs direct machine execution (like the VirtualBox or VBoxSDL
5947 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
5948 session opened by <link to="IVirtualBox::openSession"/> and use this
5949 session only to change virtual machine settings. If you simply want to
5950 start virtual machine execution using one of the existing front-ends
5951 (for example the VirtualBox GUI or headless server), simply use
5952 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
5953 power up the machine automatically for you.
5954 </note>
5955
5956 <see>#saveState</see>
5957 <result name="VBOX_E_INVALID_VM_STATE">
5958 Virtual machine already running.
5959 </result>
5960 <result name="VBOX_E_HOST_ERROR">
5961 Host interface does not exist or name not set.
5962 </result>
5963 <result name="VBOX_E_FILE_ERROR">
5964 Invalid saved state file.
5965 </result>
5966 </desc>
5967 <param name="progress" type="IProgress" dir="return">
5968 <desc>Progress object to track the operation completion.</desc>
5969 </param>
5970 </method>
5971
5972 <method name="powerUpPaused">
5973 <desc>
5974 Identical to powerUp except that the VM will enter the
5975 <link to="MachineState_Paused"/> state, instead of
5976 <link to="MachineState_Running"/>.
5977
5978 <see>#powerUp</see>
5979 <result name="VBOX_E_INVALID_VM_STATE">
5980 Virtual machine already running.
5981 </result>
5982 <result name="VBOX_E_HOST_ERROR">
5983 Host interface does not exist or name not set.
5984 </result>
5985 <result name="VBOX_E_FILE_ERROR">
5986 Invalid saved state file.
5987 </result>
5988 </desc>
5989 <param name="progress" type="IProgress" dir="return">
5990 <desc>Progress object to track the operation completion.</desc>
5991 </param>
5992 </method>
5993
5994 <method name="powerDown">
5995 <desc>
5996 Stops the virtual machine execution.
5997 After this operation completes, the machine will go to the
5998 PoweredOff state.
5999
6000 @deprecated This method will be removed in VirtualBox 2.1 where the
6001 powerDownAsync() method will take its name. Do not use this method in
6002 the code.
6003 <result name="VBOX_E_INVALID_VM_STATE">
6004 Virtual machine must be Running, Paused or Stuck to be powered down.
6005 </result>
6006 <result name="VBOX_E_VM_ERROR">
6007 Unable to power off or destroy virtual machine.
6008 </result>
6009 </desc>
6010 </method>
6011
6012 <method name="powerDownAsync">
6013 <desc>
6014 Initiates the power down procedure to stop the virtual machine
6015 execution.
6016
6017 The completion of the power down procedure is tracked using the returned
6018 IProgress object. After the operation is complete, the machine will go
6019 to the PoweredOff state.
6020
6021 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
6022 where the original powerDown() method will be removed. You will need to
6023 rename "powerDownAsync" to "powerDown" in your sources to make them
6024 build with version 2.1.
6025 <result name="VBOX_E_INVALID_VM_STATE">
6026 Virtual machine must be Running, Paused or Stuck to be powered down.
6027 </result>
6028 </desc>
6029 <param name="progress" type="IProgress" dir="return">
6030 <desc>Progress object to track the operation completion.</desc>
6031 </param>
6032 </method>
6033
6034 <method name="reset">
6035 <desc>Resets the virtual machine.
6036 <result name="VBOX_E_INVALID_VM_STATE">
6037 Virtual machine not in Running state.
6038 </result>
6039 <result name="VBOX_E_VM_ERROR">
6040 Virtual machine error in reset operation.
6041 </result>
6042 </desc>
6043 </method>
6044
6045 <method name="pause">
6046 <desc>Pauses the virtual machine execution.
6047 <result name="VBOX_E_INVALID_VM_STATE">
6048 Virtual machine not in Running state.
6049 </result>
6050 <result name="VBOX_E_VM_ERROR">
6051 Virtual machine error in suspend operation.
6052 </result>
6053 </desc>
6054 </method>
6055
6056 <method name="resume">
6057 <desc>Resumes the virtual machine execution.
6058 <result name="VBOX_E_INVALID_VM_STATE">
6059 Virtual machine not in Paused state.
6060 </result>
6061 <result name="VBOX_E_VM_ERROR">
6062 Virtual machine error in resume operation.
6063 </result>
6064 </desc>
6065 </method>
6066
6067 <method name="powerButton">
6068 <desc>Sends the ACPI power button event to the guest.
6069 <result name="VBOX_E_INVALID_VM_STATE">
6070 Virtual machine not in Running state.
6071 </result>
6072 <result name="VBOX_E_PDM_ERROR">
6073 Controlled power off failed.
6074 </result>
6075 </desc>
6076 </method>
6077
6078 <method name="sleepButton">
6079 <desc>Sends the ACPI sleep button event to the guest.
6080 <result name="VBOX_E_INVALID_VM_STATE">
6081 Virtual machine not in Running state.
6082 </result>
6083 <result name="VBOX_E_PDM_ERROR">
6084 Sending sleep button event failed.
6085 </result>
6086 </desc>
6087 </method>
6088
6089 <method name="getPowerButtonHandled">
6090 <desc>Checks if the last power button event was handled by guest.
6091 <result name="VBOX_E_PDM_ERROR">
6092 Checking if the event was handled by the guest OS failed.
6093 </result>
6094 </desc>
6095 <param name="handled" type="boolean" dir="return"/>
6096 </method>
6097
6098 <method name="getGuestEnteredACPIMode">
6099 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6100 G1 (sleeping). If this method returns false, the guest will
6101 most likely not respond to external ACPI events.
6102 <result name="VBOX_E_INVALID_VM_STATE">
6103 Virtual machine not in Running state.
6104 </result>
6105 </desc>
6106 <param name="entered" type="boolean" dir="return"/>
6107 </method>
6108
6109 <method name="saveState">
6110 <desc>
6111 Saves the current execution state of a running virtual machine
6112 and stops its execution.
6113
6114 After this operation completes, the machine will go to the
6115 Saved state. Next time it is powered up, this state will
6116 be restored and the machine will continue its execution from
6117 the place where it was saved.
6118
6119 This operation differs from taking a snapshot to the effect
6120 that it doesn't create new differencing hard disks. Also, once
6121 the machine is powered up from the state saved using this method,
6122 the saved state is deleted, so it will be impossible to return
6123 to this state later.
6124
6125 <note>
6126 On success, this method implicitly calls
6127 <link to="IMachine::saveSettings"/> to save all current machine
6128 settings (including runtime changes to the DVD drive, etc.).
6129 Together with the impossibility to change any VM settings when it is
6130 in the Saved state, this guarantees adequate hardware
6131 configuration of the machine when it is restored from the saved
6132 state file.
6133 </note>
6134
6135 <note>
6136 The machine must be in the Running or Paused state, otherwise
6137 the operation will fail.
6138 </note>
6139 <result name="VBOX_E_INVALID_VM_STATE">
6140 Virtual machine state neither Running nor Paused.
6141 </result>
6142 <result name="VBOX_E_FILE_ERROR">
6143 Failed to create directory for saved state file.
6144 </result>
6145
6146 <see><link to="#takeSnapshot"/></see>
6147 </desc>
6148 <param name="progress" type="IProgress" dir="return">
6149 <desc>Progress object to track the operation completion.</desc>
6150 </param>
6151 </method>
6152
6153 <method name="adoptSavedState">
6154 <desc>
6155 Associates the given saved state file to the virtual machine.
6156
6157 On success, the machine will go to the Saved state. Next time it is
6158 powered up, it will be restored from the adopted saved state and
6159 continue execution from the place where the saved state file was
6160 created.
6161
6162 The specified saved state file path may be absolute or relative to the
6163 folder the VM normally saves the state to (usually,
6164 <link to="IMachine::snapshotFolder"/>).
6165
6166 <note>
6167 It's a caller's responsibility to make sure the given saved state
6168 file is compatible with the settings of this virtual machine that
6169 represent its virtual hardware (memory size, hard disk configuration
6170 etc.). If there is a mismatch, the behavior of the virtual machine
6171 is undefined.
6172 </note>
6173 <result name="VBOX_E_INVALID_VM_STATE">
6174 Virtual machine state neither PoweredOff nor Aborted.
6175 </result>
6176 </desc>
6177 <param name="savedStateFile" type="wstring" dir="in">
6178 <desc>Path to the saved state file to adopt.</desc>
6179 </param>
6180 </method>
6181
6182 <method name="discardSavedState">
6183 <desc>
6184 Discards (deletes) the saved state of the virtual machine
6185 previously created by <link to="#saveState"/>. Next time the
6186 machine is powered up, a clean boot will occur.
6187 <note>
6188 This operation is equivalent to resetting or powering off
6189 the machine without doing a proper shutdown in the guest OS.
6190 </note>
6191 <result name="VBOX_E_INVALID_VM_STATE">
6192 Virtual machine not in state Saved.
6193 </result>
6194 </desc>
6195 </method>
6196
6197 <method name="getDeviceActivity">
6198 <desc>
6199 Gets the current activity type of a given device or device group.
6200 <result name="E_INVALIDARG">
6201 Invalid device type.
6202 </result>
6203 </desc>
6204 <param name="type" type="DeviceType" dir="in"/>
6205 <param name="activity" type="DeviceActivity" dir="return"/>
6206 </method>
6207
6208 <method name="attachUSBDevice">
6209 <desc>
6210 Attaches a host USB device with the given UUID to the
6211 USB controller of the virtual machine.
6212
6213 The device needs to be in one of the following states:
6214 <link to="USBDeviceState_Busy"/>,
6215 <link to="USBDeviceState_Available"/> or
6216 <link to="USBDeviceState_Held"/>,
6217 otherwise an error is immediately returned.
6218
6219 When the device state is
6220 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6221 be returned if the host computer refuses to release it for some reason.
6222
6223 <see>IUSBController::deviceFilters, USBDeviceState</see>
6224 <result name="VBOX_E_INVALID_VM_STATE">
6225 Virtual machine state neither Running nor Paused.
6226 </result>
6227 <result name="VBOX_E_PDM_ERROR">
6228 Virtual machine does not have a USB controller.
6229 </result>
6230 </desc>
6231 <param name="id" type="uuid" dir="in">
6232 <desc>UUID of the host USB device to attach.</desc>
6233 </param>
6234 </method>
6235
6236 <method name="detachUSBDevice">
6237 <desc>
6238 Detaches an USB device with the given UUID from the USB controller
6239 of the virtual machine.
6240
6241 After this method succeeds, the VirtualBox server re-initiates
6242 all USB filters as if the device were just physically attached
6243 to the host, but filters of this machine are ignored to avoid
6244 a possible automatic re-attachment.
6245
6246 <see>IUSBController::deviceFilters, USBDeviceState</see>
6247
6248 <result name="VBOX_E_PDM_ERROR">
6249 Virtual machine does not have a USB controller.
6250 </result>
6251 <result name="E_INVALIDARG">
6252 USB device not attached to this virtual machine.
6253 </result>
6254 </desc>
6255 <param name="id" type="uuid" dir="in">
6256 <desc>UUID of the USB device to detach.</desc>
6257 </param>
6258 <param name="device" type="IUSBDevice" dir="return">
6259 <desc>Detached USB device.</desc>
6260 </param>
6261 </method>
6262
6263 <method name="findUSBDeviceByAddress">
6264 <desc>
6265 Searches for a USB device with the given host address.
6266
6267 <result name="VBOX_E_OBJECT_NOT_FOUND">
6268 Given @c name does not correspond to any USB device.
6269 </result>
6270
6271 <see>IUSBDevice::address</see>
6272 </desc>
6273 <param name="name" type="wstring" dir="in">
6274 <desc>
6275 Address of the USB device (as assigned by the host) to
6276 search for.
6277 </desc>
6278 </param>
6279 <param name="device" type="IUSBDevice" dir="return">
6280 <desc>Found USB device object.</desc>
6281 </param>
6282 </method>
6283
6284 <method name="findUSBDeviceById">
6285 <desc>
6286 Searches for a USB device with the given UUID.
6287
6288 <result name="VBOX_E_OBJECT_NOT_FOUND">
6289 Given @c id does not correspond to any USB device.
6290 </result>
6291
6292 <see>IUSBDevice::id</see>
6293 </desc>
6294 <param name="id" type="uuid" dir="in">
6295 <desc>UUID of the USB device to search for.</desc>
6296 </param>
6297 <param name="device" type="IUSBDevice" dir="return">
6298 <desc>Found USB device object.</desc>
6299 </param>
6300 </method>
6301
6302 <method name="createSharedFolder">
6303 <desc>
6304 Creates a transient new shared folder by associating the given logical
6305 name with the given host path, adds it to the collection of shared
6306 folders and starts sharing it. Refer to the description of
6307 <link to="ISharedFolder"/> to read more about logical names.
6308
6309 <result name="VBOX_E_INVALID_VM_STATE">
6310 Virtual machine in Saved state or currently changing state.
6311 </result>
6312 <result name="VBOX_E_FILE_ERROR">
6313 Shared folder already exists or not accessible.
6314 </result>
6315 </desc>
6316 <param name="name" type="wstring" dir="in">
6317 <desc>Unique logical name of the shared folder.</desc>
6318 </param>
6319 <param name="hostPath" type="wstring" dir="in">
6320 <desc>Full path to the shared folder in the host file system.</desc>
6321 </param>
6322 <param name="writable" type="boolean" dir="in">
6323 <desc>Whether the share is writable or readonly</desc>
6324 </param>
6325 </method>
6326
6327 <method name="removeSharedFolder">
6328 <desc>
6329 Removes a transient shared folder with the given name previously
6330 created by <link to="#createSharedFolder"/> from the collection of
6331 shared folders and stops sharing it.
6332 <result name="VBOX_E_INVALID_VM_STATE">
6333 Virtual machine in Saved state or currently changing state.
6334 </result>
6335 <result name="VBOX_E_FILE_ERROR">
6336 Shared folder does not exists.
6337 </result>
6338 </desc>
6339 <param name="name" type="wstring" dir="in">
6340 <desc>Logical name of the shared folder to remove.</desc>
6341 </param>
6342 </method>
6343
6344 <method name="takeSnapshot">
6345 <desc>
6346 Saves the current execution state and all settings of the
6347 machine and creates differencing images for all
6348 normal (non-independent) hard disks.
6349
6350 This method can be called for a PoweredOff, Saved, Running or
6351 Paused virtual machine. When the machine is PoweredOff, an
6352 offline <link to="ISnapshot">snapshot</link> is created,
6353 in all other cases -- an online snapshot.
6354
6355 The taken snapshot is always based on the
6356 <link to="IMachine::currentSnapshot">current
6357 snapshot</link> of the associated virtual machine and becomes
6358 a new current snapshot.
6359
6360 <note>
6361 This method implicitly calls <link to="IMachine::saveSettings"/> to
6362 save all current machine settings before taking an offline snapshot.
6363 </note>
6364
6365 <see>ISnapshot, <link to="#saveState"/></see>
6366 <result name="VBOX_E_INVALID_VM_STATE">
6367 Virtual machine currently changing state.
6368 </result>
6369 </desc>
6370 <param name="name" type="wstring" dir="in">
6371 <desc>Short name for the snapshot.</desc>
6372 </param>
6373 <param name="description" type="wstring" dir="in">
6374 <desc>Optional description of the snapshot.</desc>
6375 </param>
6376 <param name="progress" type="IProgress" dir="return">
6377 <desc>Progress object to track the operation completion.</desc>
6378 </param>
6379 </method>
6380
6381 <method name="discardSnapshot">
6382 <desc>
6383
6384 Starts discarding the specified snapshot. The execution state
6385 and settings of the associated machine stored in the snapshot
6386 will be deleted. The contents of all differencing hard disks of
6387 this snapshot will be merged with the contents of their
6388 dependent child hard disks to keep the, disks valid (in other
6389 words, all changes represented by hard disks being discarded
6390 will be propagated to their child hard disks). After that, this
6391 snapshot's differencing hard disks will be deleted. The parent
6392 of this snapshot will become a new parent for all its child
6393 snapshots.
6394
6395 If the discarded snapshot is the current one, its parent
6396 snapshot will become a new current snapshot. The current machine
6397 state is not directly affected in this case, except that
6398 currently attached differencing hard disks based on hard disks
6399 of the discarded snapshot will be also merged as described
6400 above.
6401
6402 If the discarded snapshot is the first one (the root snapshot)
6403 and it has exactly one child snapshot, this child snapshot will
6404 become the first snapshot after discarding. If there are no
6405 children at all (i.e. the first snapshot is the only snapshot of
6406 the machine), both the current and the first snapshot of the
6407 machine will be set to null. In all other cases, the first
6408 snapshot cannot be discarded.
6409
6410 You cannot discard the snapshot if it
6411 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6412 hard disks that have differencing hard disks based on them. Snapshots of
6413 such kind can be discarded only when every normal hard disk has either
6414 no children at all or exactly one child. In the former case, the normal
6415 hard disk simply becomes unused (i.e. not attached to any VM). In the
6416 latter case, it receives all the changes stored in the child hard disk,
6417 and then it replaces the child hard disk in the configuration of the
6418 corresponding snapshot or machine.
6419
6420 Also, you cannot discard the snapshot if it stores hard disks
6421 (of any type) having differencing child hard disks that belong
6422 to other machines. Such snapshots can be only discarded after
6423 you discard all snapshots of other machines containing "foreign"
6424 child disks, or detach these "foreign" child disks from machines
6425 they are attached to.
6426
6427 One particular example of the snapshot storing normal hard disks
6428 is the first snapshot of a virtual machine that had normal hard
6429 disks attached when taking the snapshot. Be careful when
6430 discarding such snapshots because this implicitly commits
6431 changes (made since the snapshot being discarded has been taken)
6432 to normal hard disks (as described above), which may be not what
6433 you want.
6434
6435 The virtual machine is put to
6436 the <link to="MachineState_Discarding">Discarding</link> state until
6437 the discard operation is completed.
6438
6439 <note>
6440 The machine must not be running, otherwise the operation
6441 will fail.
6442 </note>
6443
6444 <note>
6445 Child hard disks of all normal hard disks of the discarded snapshot
6446 must be accessible (see <link to="IMedium::state"/>) for this
6447 operation to succeed. In particular, this means that all virtual
6448 machines, whose hard disks are directly or indirectly based on the
6449 hard disks of discarded snapshot, must be powered off.
6450 </note>
6451 <note>
6452 Merging hard disk contents can be very time and disk space
6453 consuming, if these disks are big in size and have many
6454 children. However, if the snapshot being discarded is the last
6455 (head) snapshot on the branch, the operation will be rather
6456 quick.
6457 </note>
6458 <note>
6459 Note that discarding the current snapshot
6460 will implicitly call <link to="IMachine::saveSettings"/> to
6461 make all current machine settings permanent.
6462 </note>
6463 <result name="VBOX_E_INVALID_VM_STATE">
6464 Virtual machine is running.
6465 </result>
6466 </desc>
6467 <param name="id" type="uuid" dir="in">
6468 <desc>UUID of the snapshot to discard.</desc>
6469 </param>
6470 <param name="progress" type="IProgress" dir="return">
6471 <desc>Progress object to track the operation completion.</desc>
6472 </param>
6473 </method>
6474
6475 <method name="discardCurrentState">
6476 <desc>
6477 This operation is similar to <link to="#discardSnapshot"/> but
6478 affects the current machine state. This means that the state stored in
6479 the current snapshot will become a new current state, and all current
6480 settings of the machine and changes stored in differencing hard disks
6481 will be lost.
6482
6483 After this operation is successfully completed, new empty differencing
6484 hard disks are created for all normal hard disks of the machine.
6485
6486 If the current snapshot of the machine is an online snapshot, the
6487 machine will go to the <link to="MachineState_Saved"> saved
6488 state</link>, so that the next time it is powered on, the execution
6489 state will be restored from the current snapshot.
6490
6491 <note>
6492 The machine must not be running, otherwise the operation will fail.
6493 </note>
6494
6495 <note>
6496 If the machine state is <link to="MachineState_Saved">Saved</link>
6497 prior to this operation, the saved state file will be implicitly
6498 discarded (as if <link to="IConsole::discardSavedState"/> were
6499 called).
6500 </note>
6501
6502 <result name="VBOX_E_INVALID_VM_STATE">
6503 Virtual machine is running.
6504 </result>
6505 </desc>
6506 <param name="progress" type="IProgress" dir="return">
6507 <desc>Progress object to track the operation completion.</desc>
6508 </param>
6509 </method>
6510
6511 <method name="discardCurrentSnapshotAndState">
6512 <desc>
6513
6514 This method is equivalent to
6515 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6516 (currentSnapshot.id(), progress) followed by
6517 <link to="#discardCurrentState"/>.
6518
6519 As a result, the machine will be fully restored from the
6520 snapshot preceding the current snapshot, while both the current
6521 snapshot and the current machine state will be discarded.
6522
6523 If the current snapshot is the first snapshot of the machine (i.e. it
6524 has the only snapshot), the current machine state will be
6525 discarded <b>before</b> discarding the snapshot. In other words, the
6526 machine will be restored from its last snapshot, before discarding
6527 it. This differs from performing a single
6528 <link to="#discardSnapshot"/> call (note that no
6529 <link to="#discardCurrentState"/> will be possible after it)
6530 to the effect that the latter will preserve the current state instead of
6531 discarding it.
6532
6533 Unless explicitly mentioned otherwise, all remarks and
6534 limitations of the above two methods also apply to this method.
6535
6536 <note>
6537 The machine must not be running, otherwise the operation
6538 will fail.
6539 </note>
6540
6541 <note>
6542 If the machine state is <link to="MachineState_Saved">Saved</link>
6543 prior to this operation, the saved state file will be implicitly
6544 discarded (as if <link to="#discardSavedState"/> were
6545 called).
6546 </note>
6547
6548 <note>
6549 This method is more efficient than calling both of the above
6550 methods separately: it requires less IPC calls and provides
6551 a single progress object.
6552 </note>
6553
6554 <result name="VBOX_E_INVALID_VM_STATE">
6555 Virtual machine is running.
6556 </result>
6557 </desc>
6558 <param name="progress" type="IProgress" dir="return">
6559 <desc>Progress object to track the operation completion.</desc>
6560 </param>
6561 </method>
6562
6563 <method name="registerCallback">
6564 <desc>
6565 Registers a new console callback on this instance. The methods of the
6566 callback interface will be called by this instance when the appropriate
6567 event occurs.
6568 </desc>
6569 <param name="callback" type="IConsoleCallback" dir="in"/>
6570 </method>
6571
6572 <method name="unregisterCallback">
6573 <desc>
6574 Unregisters the console callback previously registered using
6575 <link to="#registerCallback"/>.
6576 <result name="E_INVALIDARG">
6577 Given @a callback handler is not registered.
6578 </result>
6579 </desc>
6580 <param name="callback" type="IConsoleCallback" dir="in"/>
6581 </method>
6582 </interface>
6583
6584 <!--
6585 // IHost
6586 /////////////////////////////////////////////////////////////////////////
6587 -->
6588
6589 <interface
6590 name="IHostDVDDrive" extends="$unknown"
6591 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6592 wsmap="managed"
6593 >
6594 <desc>
6595 The IHostDVDDrive interface represents the physical CD/DVD drive
6596 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6597 </desc>
6598
6599 <attribute name="name" type="wstring" readonly="yes">
6600 <desc>
6601 Returns the platform-specific device identifier.
6602 On DOS-like platforms, it is a drive name (e.g. R:).
6603 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6604 </desc>
6605 </attribute>
6606 <attribute name="description" type="wstring" readonly="yes">
6607 <desc>
6608 Returns a human readable description for the drive. This
6609 description usually contains the product and vendor name. A
6610 @c null string is returned if the description is not available.
6611 </desc>
6612 </attribute>
6613 <attribute name="udi" type="wstring" readonly="yes">
6614 <desc>
6615 Returns the unique device identifier for the drive. This
6616 attribute is reserved for future use instead of
6617 <link to="#name"/>. Currently it is not used and may return
6618 @c null on some platforms.
6619 </desc>
6620 </attribute>
6621
6622 </interface>
6623
6624 <interface
6625 name="IHostFloppyDrive" extends="$unknown"
6626 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6627 wsmap="managed"
6628 >
6629 <desc>
6630 The IHostFloppyDrive interface represents the physical floppy drive
6631 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6632 </desc>
6633 <attribute name="name" type="wstring" readonly="yes">
6634 <desc>
6635 Returns the platform-specific device identifier.
6636 On DOS-like platforms, it is a drive name (e.g. A:).
6637 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6638 </desc>
6639 </attribute>
6640 <attribute name="description" type="wstring" readonly="yes">
6641 <desc>
6642 Returns a human readable description for the drive. This
6643 description usually contains the product and vendor name. A
6644 @c null string is returned if the description is not available.
6645 </desc>
6646 </attribute>
6647 <attribute name="udi" type="wstring" readonly="yes">
6648 <desc>
6649 Returns the unique device identifier for the drive. This
6650 attribute is reserved for future use instead of
6651 <link to="#name"/>. Currently it is not used and may return
6652 @c null on some platforms.
6653 </desc>
6654 </attribute>
6655 </interface>
6656
6657 <enum
6658 name="HostNetworkInterfaceMediumType"
6659 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6660 >
6661 <desc>
6662 Type of encapsulation. Ethernet encapsulation includes both wired and
6663 wireless Ethernet connections.
6664 <see>IHostNetworkInterface</see>
6665 </desc>
6666
6667 <const name="Unknown" value="0">
6668 <desc>
6669 The type of interface cannot be determined.
6670 </desc>
6671 </const>
6672 <const name="Ethernet" value="1">
6673 <desc>
6674 Ethernet frame encapsulation.
6675 </desc>
6676 </const>
6677 <const name="PPP" value="2">
6678 <desc>
6679 Point-to-point protocol encapsulation.
6680 </desc>
6681 </const>
6682 <const name="SLIP" value="3">
6683 <desc>
6684 Serial line IP encapsulation.
6685 </desc>
6686 </const>
6687 </enum>
6688
6689 <enum
6690 name="HostNetworkInterfaceStatus"
6691 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6692 >
6693 <desc>
6694 Current status of the interface.
6695 <see>IHostNetworkInterface</see>
6696 </desc>
6697
6698 <const name="Unknown" value="0">
6699 <desc>
6700 The state of interface cannot be determined.
6701 </desc>
6702 </const>
6703 <const name="Up" value="1">
6704 <desc>
6705 The interface is fully operational.
6706 </desc>
6707 </const>
6708 <const name="Down" value="2">
6709 <desc>
6710 The interface is not functioning.
6711 </desc>
6712 </const>
6713 </enum>
6714
6715 <enum
6716 name="HostNetworkInterfaceType"
6717 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6718 >
6719 <desc>
6720 Network interface type.
6721 </desc>
6722 <const name="Bridged" value="1"/>
6723 <const name="HostOnly" value="2"/>
6724 </enum>
6725
6726 <interface
6727 name="IHostNetworkInterface" extends="$unknown"
6728 uuid="88adaf3f-166b-4542-9457-0f1323507fae"
6729 wsmap="managed"
6730 >
6731 <desc>
6732 Reprents one of host's network interfaces. IP V6 address and network
6733 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6734 separated by colons.
6735 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6736 </desc>
6737 <attribute name="name" type="wstring" readonly="yes">
6738 <desc>Returns the host network interface name.</desc>
6739 </attribute>
6740
6741 <attribute name="id" type="uuid" readonly="yes">
6742 <desc>Returns the interface UUID.</desc>
6743 </attribute>
6744
6745 <attribute name="networkName" type="wstring" readonly="yes">
6746 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6747 </attribute>
6748
6749 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6750 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6751 </attribute>
6752
6753 <attribute name="IPAddress" type="wstring" readonly="yes">
6754 <desc>Returns the IP V4 address of the interface.</desc>
6755 </attribute>
6756
6757 <attribute name="networkMask" type="wstring" readonly="yes">
6758 <desc>Returns the network mask of the interface.</desc>
6759 </attribute>
6760
6761 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6762 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6763 </attribute>
6764
6765 <attribute name="IPV6Address" type="wstring" readonly="yes">
6766 <desc>Returns the IP V6 address of the interface.</desc>
6767 </attribute>
6768
6769 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6770 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6771 </attribute>
6772
6773 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6774 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6775 </attribute>
6776
6777 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6778 <desc>Type of protocol encapsulation used.</desc>
6779 </attribute>
6780
6781 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6782 <desc>Status of the interface.</desc>
6783 </attribute>
6784
6785 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6786 <desc>specifies the host interface type.</desc>
6787 </attribute>
6788
6789 <method name="enableStaticIpConfig">
6790 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6791 <param name="IPAddress" type="wstring" dir="in">
6792 <desc>
6793 IP address.
6794 </desc>
6795 </param>
6796 <param name="networkMask" type="wstring" dir="in">
6797 <desc>
6798 network mask.
6799 </desc>
6800 </param>
6801 </method>
6802
6803 <method name="enableStaticIpConfigV6">
6804 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6805 <param name="IPV6Address" type="wstring" dir="in">
6806 <desc>
6807 IP address.
6808 </desc>
6809 </param>
6810 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6811 <desc>
6812 network mask.
6813 </desc>
6814 </param>
6815 </method>
6816
6817 <method name="enableDynamicIpConfig">
6818 <desc>enables the dynamic IP configuration.</desc>
6819 </method>
6820
6821 <method name="dhcpRediscover">
6822 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6823 </method>
6824
6825 </interface>
6826
6827 <interface
6828 name="IHost" extends="$unknown"
6829 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6830 wsmap="managed"
6831 >
6832 <desc>
6833 The IHost interface represents the physical machine that this VirtualBox
6834 installation runs on.
6835
6836 An object implementing this interface is returned by the
6837 <link to="IVirtualBox::host" /> attribute. This interface contains
6838 read-only information about the host's physical hardware (such as what
6839 processors and disks are available, what the host operating system is,
6840 and so on) and also allows for manipulating some of the host's hardware,
6841 such as global USB device filters and host interface networking.
6842
6843 </desc>
6844 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6845 <desc>List of DVD drives available on the host.</desc>
6846 </attribute>
6847
6848 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6849 <desc>List of floppy drives available on the host.</desc>
6850 </attribute>
6851
6852 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6853 <desc>
6854 List of USB devices currently attached to the host.
6855 Once a new device is physically attached to the host computer,
6856 it appears in this list and remains there until detached.
6857
6858 <note>
6859 This method may set a @ref com_warnings "warning result code".
6860 </note>
6861 <note>
6862 If USB functionality is not available in the given edition of
6863 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6864 </note>
6865 </desc>
6866 </attribute>
6867
6868 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6869 <desc>
6870 List of USB device filters in action.
6871 When a new device is physically attached to the host computer,
6872 filters from this list are applied to it (in order they are stored
6873 in the list). The first matched filter will determine the
6874 <link to="IHostUSBDeviceFilter::action">action</link>
6875 performed on the device.
6876
6877 Unless the device is ignored by these filters, filters of all
6878 currently running virtual machines
6879 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6880
6881 <note>
6882 This method may set a @ref com_warnings "warning result code".
6883 </note>
6884 <note>
6885 If USB functionality is not available in the given edition of
6886 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6887 </note>
6888
6889 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6890 </desc>
6891 </attribute>
6892
6893 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6894 <desc>List of host network interfaces currently defined on the host.</desc>
6895 </attribute>
6896
6897 <attribute name="processorCount" type="unsigned long" readonly="yes">
6898 <desc>Number of (logical) CPUs installed in the host system.</desc>
6899 </attribute>
6900
6901 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6902 <desc>Number of (logical) CPUs online in the host system.</desc>
6903 </attribute>
6904
6905 <method name="getProcessorSpeed">
6906 <desc>Query the (approximate) maximum speed of a specified host CPU in
6907 Megahertz.
6908 </desc>
6909 <param name="cpuId" type="unsigned long" dir="in">
6910 <desc>
6911 Identifier of the CPU.
6912 </desc>
6913 </param>
6914 <param name="speed" type="unsigned long" dir="return">
6915 <desc>
6916 Speed value. 0 is returned if value is not known or @a cpuId is
6917 invalid.
6918 </desc>
6919 </param>
6920 </method>
6921
6922 <method name="getProcessorFeature">
6923 <desc>Query whether a CPU feature is supported or not.</desc>
6924 <param name="feature" type="ProcessorFeature" dir="in">
6925 <desc>
6926 CPU Feature identifier.
6927 </desc>
6928 </param>
6929 <param name="supported" type="boolean" dir="return">
6930 <desc>
6931 Feature is supported or not.
6932 </desc>
6933 </param>
6934 </method>
6935
6936 <method name="getProcessorDescription">
6937 <desc>Query the model string of a specified host CPU.
6938 <note>
6939 This function is not implemented in the current version of the
6940 product.
6941 </note>
6942 </desc>
6943 <param name="cpuId" type="unsigned long" dir="in">
6944 <desc>
6945 Identifier of the CPU.
6946 </desc>
6947 </param>
6948 <param name="description" type="wstring" dir="return">
6949 <desc>
6950 Model string. A NULL string is returned if value is not known or
6951 @a cpuId is invalid.
6952 </desc>
6953 </param>
6954 </method>
6955
6956 <attribute name="memorySize" type="unsigned long" readonly="yes">
6957 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6958 </attribute>
6959
6960 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6961 <desc>Available system memory in the host system.</desc>
6962 </attribute>
6963
6964 <attribute name="operatingSystem" type="wstring" readonly="yes">
6965 <desc>Name of the host system's operating system.</desc>
6966 </attribute>
6967
6968 <attribute name="OSVersion" type="wstring" readonly="yes">
6969 <desc>Host operating system's version string.</desc>
6970 </attribute>
6971
6972 <attribute name="UTCTime" type="long long" readonly="yes">
6973 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6974 </attribute>
6975
6976<if target="midl">
6977 <method name="createHostOnlyNetworkInterface">
6978 <desc>
6979 Creates a new adapter for Host Only Networking.
6980 <result name="E_INVALIDARG">
6981 Host network interface @a name already exists.
6982 </result>
6983 </desc>
6984 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6985 <desc>
6986 Created host interface object.
6987 </desc>
6988 </param>
6989 <param name="progress" type="IProgress" dir="return">
6990 <desc>
6991 Progress object to track the operation completion.
6992 </desc>
6993 </param>
6994 </method>
6995 <method name="removeHostOnlyNetworkInterface">
6996 <desc>
6997 Removes the given Host Only Networking interface.
6998 <result name="VBOX_E_OBJECT_NOT_FOUND">
6999 No host network interface matching @a id found.
7000 </result>
7001 </desc>
7002 <param name="id" type="uuid" dir="in">
7003 <desc>
7004 Adapter GUID.
7005 </desc>
7006 </param>
7007 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7008 <desc>
7009 Removed host interface object.
7010 </desc>
7011 </param>
7012 <param name="progress" type="IProgress" dir="return">
7013 <desc>
7014 Progress object to track the operation completion.
7015 </desc>
7016 </param>
7017 </method>
7018</if>
7019
7020 <method name="createUSBDeviceFilter">
7021 <desc>
7022 Creates a new USB device filter. All attributes except
7023 the filter name are set to <tt>null</tt> (any match),
7024 <i>active</i> is <tt>false</tt> (the filter is not active).
7025
7026 The created filter can be added to the list of filters using
7027 <link to="#insertUSBDeviceFilter"/>.
7028
7029 <see>#USBDeviceFilters</see>
7030 </desc>
7031 <param name="name" type="wstring" dir="in">
7032 <desc>
7033 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7034 for more info.
7035 </desc>
7036 </param>
7037 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7038 <desc>Created filter object.</desc>
7039 </param>
7040 </method>
7041
7042 <method name="insertUSBDeviceFilter">
7043 <desc>
7044 Inserts the given USB device to the specified position
7045 in the list of filters.
7046
7047 Positions are numbered starting from <tt>0</tt>. If the specified
7048 position is equal to or greater than the number of elements in
7049 the list, the filter is added at the end of the collection.
7050
7051 <note>
7052 Duplicates are not allowed, so an attempt to insert a
7053 filter that is already in the list, will return an
7054 error.
7055 </note>
7056 <note>
7057 This method may set a @ref com_warnings "warning result code".
7058 </note>
7059 <note>
7060 If USB functionality is not available in the given edition of
7061 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7062 </note>
7063
7064 <see>#USBDeviceFilters</see>
7065
7066 <result name="VBOX_E_INVALID_OBJECT_STATE">
7067 USB device filter is not created within this VirtualBox instance.
7068 </result>
7069 <result name="E_INVALIDARG">
7070 USB device filter already in list.
7071 </result>
7072
7073 </desc>
7074 <param name="position" type="unsigned long" dir="in">
7075 <desc>Position to insert the filter to.</desc>
7076 </param>
7077 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7078 <desc>USB device filter to insert.</desc>
7079 </param>
7080 </method>
7081
7082 <method name="removeUSBDeviceFilter">
7083 <desc>
7084 Removes a USB device filter from the specified position in the
7085 list of filters.
7086
7087 Positions are numbered starting from <tt>0</tt>. Specifying a
7088 position equal to or greater than the number of elements in
7089 the list will produce an error.
7090
7091 <note>
7092 This method may set a @ref com_warnings "warning result code".
7093 </note>
7094 <note>
7095 If USB functionality is not available in the given edition of
7096 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7097 </note>
7098
7099 <see>#USBDeviceFilters</see>
7100
7101 <result name="E_INVALIDARG">
7102 USB device filter list empty or invalid @a position.
7103 </result>
7104
7105 </desc>
7106 <param name="position" type="unsigned long" dir="in">
7107 <desc>Position to remove the filter from.</desc>
7108 </param>
7109 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7110 <desc>Removed USB device filter.</desc>
7111 </param>
7112 </method>
7113
7114 <method name="findHostDVDDrive">
7115 <desc>
7116 Searches for a host DVD drive with the given @c name.
7117
7118 <result name="VBOX_E_OBJECT_NOT_FOUND">
7119 Given @c name does not correspond to any host drive.
7120 </result>
7121
7122 </desc>
7123 <param name="name" type="wstring" dir="in">
7124 <desc>Name of the host drive to search for</desc>
7125 </param>
7126 <param name="drive" type="IHostDVDDrive" dir="return">
7127 <desc>Found host drive object</desc>
7128 </param>
7129 </method>
7130
7131 <method name="findHostFloppyDrive">
7132 <desc>
7133 Searches for a host floppy drive with the given @c name.
7134
7135 <result name="VBOX_E_OBJECT_NOT_FOUND">
7136 Given @c name does not correspond to any host floppy drive.
7137 </result>
7138
7139 </desc>
7140 <param name="name" type="wstring" dir="in">
7141 <desc>Name of the host floppy drive to search for</desc>
7142 </param>
7143 <param name="drive" type="IHostFloppyDrive" dir="return">
7144 <desc>Found host floppy drive object</desc>
7145 </param>
7146 </method>
7147
7148 <method name="findHostNetworkInterfaceByName">
7149 <desc>
7150 Searches through all host network interfaces for an interface with
7151 the given @c name.
7152 <note>
7153 The method returns an error if the given @c name does not
7154 correspond to any host network interface.
7155 </note>
7156 </desc>
7157 <param name="name" type="wstring" dir="in">
7158 <desc>Name of the host network interface to search for.</desc>
7159 </param>
7160 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7161 <desc>Found host network interface object.</desc>
7162 </param>
7163 </method>
7164 <method name="findHostNetworkInterfaceById">
7165 <desc>
7166 Searches through all host network interfaces for an interface with
7167 the given GUID.
7168 <note>
7169 The method returns an error if the given GUID does not
7170 correspond to any host network interface.
7171 </note>
7172 </desc>
7173 <param name="id" type="uuid" dir="in">
7174 <desc>GUID of the host network interface to search for.</desc>
7175 </param>
7176 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7177 <desc>Found host network interface object.</desc>
7178 </param>
7179 </method>
7180 <method name="findHostNetworkInterfacesOfType">
7181 <desc>
7182 Searches through all host network interfaces and returns a list of interfaces of the specified type
7183 </desc>
7184 <param name="type" type="HostNetworkInterfaceType" dir="in">
7185 <desc>type of the host network interfaces to search for.</desc>
7186 </param>
7187 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7188 <desc>Found host network interface objects.</desc>
7189 </param>
7190 </method>
7191
7192 <method name="findUSBDeviceById">
7193 <desc>
7194 Searches for a USB device with the given UUID.
7195
7196 <result name="VBOX_E_OBJECT_NOT_FOUND">
7197 Given @id does not correspond to any USB device.
7198 </result>
7199
7200 <see>IHostUSBDevice::id</see>
7201 </desc>
7202 <param name="id" type="uuid" dir="in">
7203 <desc>UUID of the USB device to search for.</desc>
7204 </param>
7205 <param name="device" type="IHostUSBDevice" dir="return">
7206 <desc>Found USB device object.</desc>
7207 </param>
7208 </method>
7209
7210 <method name="findUSBDeviceByAddress">
7211 <desc>
7212 Searches for a USB device with the given host address.
7213
7214 <result name="VBOX_E_OBJECT_NOT_FOUND">
7215 Given @c name does not correspond to any USB device.
7216 </result>
7217
7218 <see>IHostUSBDevice::address</see>
7219 </desc>
7220 <param name="name" type="wstring" dir="in">
7221 <desc>
7222 Address of the USB device (as assigned by the host) to
7223 search for.
7224 </desc>
7225 </param>
7226 <param name="device" type="IHostUSBDevice" dir="return">
7227 <desc>Found USB device object.</desc>
7228 </param>
7229 </method>
7230
7231 </interface>
7232
7233 <!--
7234 // ISystemProperties
7235 /////////////////////////////////////////////////////////////////////////
7236 -->
7237
7238 <interface
7239 name="ISystemProperties"
7240 extends="$unknown"
7241 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7242 wsmap="managed"
7243 >
7244 <desc>
7245 The ISystemProperties interface represents global properties of the given
7246 VirtualBox installation.
7247
7248 These properties define limits and default values for various attributes
7249 and parameters. Most of the properties are read-only, but some can be
7250 changed by a user.
7251 </desc>
7252
7253 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7254 <desc>Minimum guest system memory in Megabytes.</desc>
7255 </attribute>
7256
7257 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7258 <desc>Maximum guest system memory in Megabytes.</desc>
7259 </attribute>
7260
7261 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7262 <desc>Minimum guest video memory in Megabytes.</desc>
7263 </attribute>
7264
7265 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7266 <desc>Maximum guest video memory in Megabytes.</desc>
7267 </attribute>
7268
7269 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7270 <desc>Minimum CPU count.</desc>
7271 </attribute>
7272
7273 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7274 <desc>Maximum CPU count.</desc>
7275 </attribute>
7276
7277 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7278 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7279 </attribute>
7280
7281 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7282 <desc>
7283 Number of network adapters associated with every
7284 <link to="IMachine"/> instance.
7285 </desc>
7286 </attribute>
7287
7288 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7289 <desc>
7290 Number of serial ports associated with every
7291 <link to="IMachine"/> instance.
7292 </desc>
7293 </attribute>
7294
7295 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7296 <desc>
7297 Number of parallel ports associated with every
7298 <link to="IMachine"/> instance.
7299 </desc>
7300 </attribute>
7301
7302 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7303 <desc>
7304 Maximum device position in the boot order. This value corresponds
7305 to the total number of devices a machine can boot from, to make it
7306 possible to include all possible devices to the boot list.
7307 <see><link to="IMachine::setBootOrder"/></see>
7308 </desc>
7309 </attribute>
7310
7311 <attribute name="defaultMachineFolder" type="wstring">
7312 <desc>
7313 Full path to the default directory used to create new or open
7314 existing machines when a settings file name contains no
7315 path.
7316
7317 The initial value of this property is
7318 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7319 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7320
7321 <note>
7322 Setting this property to <tt>null</tt> will restore the
7323 initial value.
7324 </note>
7325 <note>
7326 When settings this property, the specified path can be
7327 absolute (full path) or relative
7328 to the <link to="IVirtualBox::homeFolder">
7329 VirtualBox home directory</link>.
7330 When reading this property, a full path is
7331 always returned.
7332 </note>
7333 <note>
7334 The specified path may not exist, it will be created
7335 when necessary.
7336 </note>
7337
7338 <see>
7339 <link to="IVirtualBox::createMachine"/>,
7340 <link to="IVirtualBox::openMachine"/>
7341 </see>
7342 </desc>
7343 </attribute>
7344
7345 <attribute name="defaultHardDiskFolder" type="wstring">
7346 <desc>
7347 Full path to the default directory used to create new or open existing
7348 virtual disks.
7349
7350 This path is used when the storage unit of a hard disk is a regular file
7351 in the host's file system and only a file name that contains no path is
7352 given.
7353
7354 The initial value of this property is
7355 <tt>&lt;</tt>
7356 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7357 <tt>&gt;/HardDisks</tt>.
7358
7359 <note>
7360 Setting this property to <tt>null</tt> will restore the
7361 initial value.
7362 </note>
7363 <note>
7364 When settings this property, the specified path can be relative
7365 to the
7366 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7367 absolute. When reading this property, a full path is
7368 always returned.
7369 </note>
7370 <note>
7371 The specified path may not exist, it will be created
7372 when necessary.
7373 </note>
7374
7375 <see>
7376 IHardDisk,
7377 <link to="IVirtualBox::createHardDisk"/>,
7378 <link to="IVirtualBox::openHardDisk"/>,
7379 <link to="IMedium::location"/>
7380 </see>
7381 </desc>
7382 </attribute>
7383
7384 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7385 <desc>
7386 List of all hard disk storage formats supported by this VirtualBox
7387 installation.
7388
7389 Keep in mind that the hard disk format identifier
7390 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7391 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7392 hard disk format is a case-insensitive string. This means that, for
7393 example, all of the following strings:
7394 <pre>
7395 "VDI"
7396 "vdi"
7397 "VdI"</pre>
7398 refer to the same hard disk format.
7399
7400 Note that the virtual hard disk framework is backend-based, therefore
7401 the list of supported formats depends on what backends are currently
7402 installed.
7403
7404 <see>
7405 <link to="IHardDiskFormat"/>,
7406 </see>
7407 </desc>
7408 </attribute>
7409
7410 <attribute name="defaultHardDiskFormat" type="wstring">
7411 <desc>
7412 Identifier of the default hard disk format used by VirtualBox.
7413
7414 The hard disk format set by this attribute is used by VirtualBox
7415 when the hard disk format was not specified explicitly. One example is
7416 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7417 format argument. A more complex example is implicit creation of
7418 differencing hard disks when taking a snapshot of a virtual machine:
7419 this operation will try to use a format of the parent hard disk first
7420 and if this format does not support differencing hard disks the default
7421 format specified by this argument will be used.
7422
7423 The list of supported hard disk formats may be obtained by the
7424 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7425 format must have a capability to create differencing hard disks;
7426 otherwise opeartions that create hard disks implicitly may fail
7427 unexpectedly.
7428
7429 The initial value of this property is <tt>VDI</tt> in the current
7430 version of the VirtualBox product, but may change in the future.
7431
7432 <note>
7433 Setting this property to <tt>null</tt> will restore the
7434 initial value.
7435 </note>
7436
7437 <see>
7438 <link to="#hardDiskFormats"/>,
7439 <link to="IHardDiskFormat::id"/>,
7440 <link to="IVirtualBox::createHardDisk"/>
7441 </see>
7442 </desc>
7443 </attribute>
7444
7445 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7446 <desc>
7447 Library that provides authentication for VRDP clients. The library
7448 is used if a virtual machine's authentication type is set to "external"
7449 in the VM RemoteDisplay configuration.
7450
7451 The system library extension (".DLL" or ".so") must be omitted.
7452 A full path can be specified; if not, then the library must reside on the
7453 system's default library path.
7454
7455 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7456 of that name in one of the default VirtualBox library directories.
7457
7458 For details about VirtualBox authentication libraries and how to implement
7459 them, please refer to the VirtualBox manual.
7460
7461 <note>
7462 Setting this property to <tt>null</tt> will restore the
7463 initial value.
7464 </note>
7465 </desc>
7466 </attribute>
7467
7468 <attribute name="webServiceAuthLibrary" type="wstring">
7469 <desc>
7470 Library that provides authentication for webservice clients. The library
7471 is used if a virtual machine's authentication type is set to "external"
7472 in the VM RemoteDisplay configuration and will be called from
7473 within the <link to="IWebsessionManager::logon" /> implementation.
7474
7475 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7476 there is no per-VM setting for this, as the webservice is a global
7477 resource (if it is running). Only for this setting (for the webservice),
7478 setting this value to a literal "null" string disables authentication,
7479 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7480 no matter what user name and password are supplied.
7481
7482 The initial value of this property is <tt>VRDPAuth</tt>,
7483 meaning that the webservice will use the same authentication
7484 library that is used by default for VBoxVRDP (again, see
7485 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7486 The format and calling convention of authentication libraries
7487 is the same for the webservice as it is for VBoxVRDP.
7488
7489 </desc>
7490 </attribute>
7491
7492 <attribute name="HWVirtExEnabled" type="boolean">
7493 <desc>
7494 This specifies the default value for hardware virtualization
7495 extensions. If enabled, virtual machines will make use of
7496 hardware virtualization extensions such as Intel VT-x and
7497 AMD-V by default. This value can be overridden by each VM
7498 using their <link to="IMachine::HWVirtExEnabled" /> property.
7499 </desc>
7500 </attribute>
7501
7502 <attribute name="LogHistoryCount" type="unsigned long">
7503 <desc>
7504 This value specifies how many old release log files are kept.
7505 </desc>
7506 </attribute>
7507 </interface>
7508
7509 <!--
7510 // IGuest
7511 /////////////////////////////////////////////////////////////////////////
7512 -->
7513
7514 <interface
7515 name="IGuestOSType" extends="$unknown"
7516 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7517 wsmap="struct"
7518 >
7519 <desc>
7520 </desc>
7521
7522 <attribute name="familyId" type="wstring" readonly="yes">
7523 <desc>Guest OS family identifier string.</desc>
7524 </attribute>
7525
7526 <attribute name="familyDescription" type="wstring" readonly="yes">
7527 <desc>Human readable description of the guest OS family.</desc>
7528 </attribute>
7529
7530 <attribute name="id" type="wstring" readonly="yes">
7531 <desc>Guest OS identifier string.</desc>
7532 </attribute>
7533
7534 <attribute name="description" type="wstring" readonly="yes">
7535 <desc>Human readable description of the guest OS.</desc>
7536 </attribute>
7537
7538 <attribute name="is64Bit" type="boolean" readonly="yes">
7539 <desc>Returns @c true if the given OS is 64-bit</desc>
7540 </attribute>
7541
7542 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7543 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7544 </attribute>
7545
7546 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7547 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7548 </attribute>
7549
7550 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7551 <desc>Recommended RAM size in Megabytes.</desc>
7552 </attribute>
7553
7554 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7555 <desc>Recommended video RAM size in Megabytes.</desc>
7556 </attribute>
7557
7558 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7559 <desc>Recommended hard disk size in Megabytes.</desc>
7560 </attribute>
7561
7562 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7563 <desc>Returns recommended network adapter for this OS type.</desc>
7564 </attribute>
7565 </interface>
7566
7567 <interface
7568 name="IGuest" extends="$unknown"
7569 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7570
7571 wsmap="suppress"
7572 >
7573 <desc>
7574 The IGuest interface represents information about the operating system
7575 running inside the virtual machine. Used in
7576 <link to="IConsole::guest"/>.
7577
7578 IGuest provides information about the guest operating system, whether
7579 Guest Additions are installed and other OS-specific virtual machine
7580 properties.
7581 </desc>
7582
7583 <attribute name="OSTypeId" type="wstring" readonly="yes">
7584 <desc>
7585 Identifier of the Guest OS type as reported by the Guest
7586 Additions.
7587 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7588 an IGuestOSType object representing details about the given
7589 Guest OS type.
7590 <note>
7591 If Guest Additions are not installed, this value will be
7592 the same as <link to="IMachine::OSTypeId"/>.
7593 </note>
7594 </desc>
7595 </attribute>
7596
7597 <attribute name="additionsActive" type="boolean" readonly="yes">
7598 <desc>
7599 Flag whether the Guest Additions are installed and active
7600 in which case their version will be returned by the
7601 <link to="#additionsVersion"/> property.
7602 </desc>
7603 </attribute>
7604
7605 <attribute name="additionsVersion" type="wstring" readonly="yes">
7606 <desc>
7607 Version of the Guest Additions (3 decimal numbers separated
7608 by dots) or empty when the Additions are not installed. The
7609 Additions may also report a version but yet not be active as
7610 the version might be refused by VirtualBox (incompatible) or
7611 other failures occurred.
7612 </desc>
7613 </attribute>
7614
7615 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7616 <desc>
7617 Flag whether seamless guest display rendering (seamless desktop
7618 integration) is supported.
7619 </desc>
7620 </attribute>
7621
7622 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7623 <desc>
7624 Flag whether the guest is in graphics mode. If it is not, then
7625 seamless rendering will not work, resize hints are not immediately
7626 acted on and guest display resizes are probably not initiated by
7627 the guest additions.
7628 </desc>
7629 </attribute>
7630
7631 <attribute name="memoryBalloonSize" type="unsigned long">
7632 <desc>Guest system memory balloon size in megabytes.</desc>
7633 </attribute>
7634
7635 <attribute name="statisticsUpdateInterval" type="unsigned long">
7636 <desc>Interval to update guest statistics in seconds.</desc>
7637 </attribute>
7638
7639 <method name="setCredentials">
7640 <desc>
7641 Store login credentials that can be queried by guest operating
7642 systems with Additions installed. The credentials are transient
7643 to the session and the guest may also choose to erase them. Note
7644 that the caller cannot determine whether the guest operating system
7645 has queried or made use of the credentials.
7646
7647 <result name="VBOX_E_VM_ERROR">
7648 VMM device is not available.
7649 </result>
7650
7651 </desc>
7652 <param name="userName" type="wstring" dir="in">
7653 <desc>User name string, can be empty</desc>
7654 </param>
7655 <param name="password" type="wstring" dir="in">
7656 <desc>Password string, can be empty</desc>
7657 </param>
7658 <param name="domain" type="wstring" dir="in">
7659 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7660 </param>
7661 <param name="allowInteractiveLogon" type="boolean" dir="in">
7662 <desc>
7663 Flag whether the guest should alternatively allow the user to
7664 interactively specify different credentials. This flag might
7665 not be supported by all versions of the Additions.
7666 </desc>
7667 </param>
7668 </method>
7669
7670 <method name="getStatistic">
7671 <desc>
7672 Query specified guest statistics as reported by the VirtualBox Additions.
7673 </desc>
7674 <param name="cpuId" type="unsigned long" dir="in">
7675 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7676 </param>
7677 <param name="statistic" type="GuestStatisticType" dir="in">
7678 <desc>Statistic type.</desc>
7679 </param>
7680 <param name="statVal" type="unsigned long" dir="out">
7681 <desc>Statistics value</desc>
7682 </param>
7683 </method>
7684
7685 </interface>
7686
7687
7688 <!--
7689 // IProgress
7690 /////////////////////////////////////////////////////////////////////////
7691 -->
7692
7693 <interface
7694 name="IProgress" extends="$unknown"
7695 uuid="d3aa5417-6103-41fc-9e54-01ee1d08f42f"
7696 wsmap="managed"
7697 >
7698 <desc>
7699 The IProgress interface represents a task progress object that allows
7700 to wait for the completion of some asynchronous task.
7701
7702 The task consists of one or more operations that run sequentially,
7703 one by one. There is an individual percentage of completion of the
7704 current operation and the percentage of completion of the task as a
7705 whole. Similarly, you can wait for the completion of a particular
7706 operation or for the completion of the whole task.
7707
7708 Every operation is identified by a number (starting from 0)
7709 and has a separate description.
7710 </desc>
7711
7712 <attribute name="id" type="uuid" readonly="yes">
7713 <desc>ID of the task.</desc>
7714 </attribute>
7715
7716 <attribute name="description" type="wstring" readonly="yes">
7717 <desc>Description of the task.</desc>
7718 </attribute>
7719
7720 <attribute name="initiator" type="$unknown" readonly="yes">
7721 <desc>Initiator of the task.</desc>
7722 </attribute>
7723
7724 <attribute name="cancelable" type="boolean" readonly="yes">
7725 <desc>Whether the task can be interrupted.</desc>
7726 </attribute>
7727
7728 <attribute name="percent" type="long" readonly="yes">
7729 <desc>
7730 Current task progress value in percent.
7731 This value depends on how many operations are already complete.
7732 </desc>
7733 </attribute>
7734
7735 <attribute name="completed" type="boolean" readonly="yes">
7736 <desc>Whether the task has been completed.</desc>
7737 </attribute>
7738
7739 <attribute name="canceled" type="boolean" readonly="yes">
7740 <desc>Whether the task has been canceled.</desc>
7741 </attribute>
7742
7743 <attribute name="resultCode" type="result" readonly="yes">
7744 <desc>
7745 Result code of the progress task.
7746 Valid only if <link to="#completed"/> is true.
7747 </desc>
7748 </attribute>
7749
7750 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7751 <desc>
7752 Extended information about the unsuccessful result of the
7753 progress operation. May be NULL when no extended information
7754 is available.
7755 Valid only if <link to="#completed"/> is true and
7756 <link to="#resultCode"/> indicates a failure.
7757 </desc>
7758 </attribute>
7759
7760 <attribute name="operationCount" type="unsigned long" readonly="yes">
7761 <desc>
7762 Number of operations this task is divided into.
7763 Every task consists of at least one operation.
7764 </desc>
7765 </attribute>
7766
7767 <attribute name="operation" type="unsigned long" readonly="yes">
7768 <desc>Number of the operation being currently executed.</desc>
7769 </attribute>
7770
7771 <attribute name="operationDescription" type="wstring" readonly="yes">
7772 <desc>
7773 Description of the operation being currently executed.
7774 </desc>
7775 </attribute>
7776
7777 <attribute name="operationPercent" type="long" readonly="yes">
7778 <desc>Current operation progress value in percent.</desc>
7779 </attribute>
7780
7781 <method name="waitForCompletion">
7782 <desc>
7783 Waits until the task is done (including all operations) with a
7784 given timeout.
7785
7786 <result name="VBOX_E_IPRT_ERROR">
7787 Failed to wait for task completion.
7788 </result>
7789
7790 </desc>
7791 <param name="timeout" type="long" dir="in">
7792 <desc>
7793 Timeout value in milliseconds.
7794 Specify -1 for an indefinite wait.
7795 </desc>
7796 </param>
7797 </method>
7798
7799 <method name="waitForOperationCompletion">
7800 <desc>
7801 Waits until the given operation is done with a given timeout.
7802
7803 <result name="VBOX_E_IPRT_ERROR">
7804 Failed to wait for operation completion.
7805 </result>
7806
7807 </desc>
7808 <param name="operation" type="unsigned long" dir="in">
7809 <desc>
7810 Number of the operation to wait for.
7811 Must be less than <link to="#operationCount"/>.
7812 </desc>
7813 </param>
7814 <param name="timeout" type="long" dir="in">
7815 <desc>
7816 Timeout value in milliseconds.
7817 Specify -1 for an indefinite wait.
7818 </desc>
7819 </param>
7820 </method>
7821
7822 <method name="cancel">
7823 <desc>
7824 Cancels the task.
7825 <note>
7826 If <link to="#cancelable"/> is <tt>false</tt>, then
7827 this method will fail.
7828 </note>
7829
7830 <result name="VBOX_E_INVALID_OBJECT_STATE">
7831 Operation cannot be canceled.
7832 </result>
7833
7834 </desc>
7835 </method>
7836
7837 </interface>
7838
7839
7840 <!--
7841 // ISnapshot
7842 /////////////////////////////////////////////////////////////////////////
7843 -->
7844
7845 <interface
7846 name="ISnapshot" extends="$unknown"
7847 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
7848 wsmap="managed"
7849 >
7850 <desc>
7851 The ISnapshot interface represents a snapshot of the virtual
7852 machine.
7853
7854 The <i>snapshot</i> stores all the information about a virtual
7855 machine necessary to bring it to exactly the same state as it was at
7856 the time of taking the snapshot. The snapshot includes:
7857
7858 <ul>
7859 <li>all settings of the virtual machine (i.e. its hardware
7860 configuration: RAM size, attached hard disks, etc.)
7861 </li>
7862 <li>the execution state of the virtual machine (memory contents,
7863 CPU state, etc.).
7864 </li>
7865 </ul>
7866
7867 Snapshots can be <i>offline</i> (taken when the VM is powered off)
7868 or <i>online</i> (taken when the VM is running). The execution
7869 state of the offline snapshot is called a <i>zero execution state</i>
7870 (it doesn't actually contain any information about memory contents
7871 or the CPU state, assuming that all hardware is just powered off).
7872
7873 <h3>Snapshot branches</h3>
7874
7875 Snapshots can be chained. Chained snapshots form a branch where
7876 every next snapshot is based on the previous one. This chaining is
7877 mostly related to hard disk branching (see <link to="IHardDisk"/>
7878 description). This means that every time a new snapshot is created,
7879 a new differencing hard disk is implicitly created for all normal
7880 hard disks attached to the given virtual machine. This allows to
7881 fully restore hard disk contents when the machine is later reverted
7882 to a particular snapshot.
7883
7884 In the current implementation, multiple snapshot branches within one
7885 virtual machine are not allowed. Every machine has a single branch,
7886 and <link to="IConsole::takeSnapshot"/> operation adds a new
7887 snapshot to the top of that branch.
7888
7889 Existing snapshots can be discarded using
7890 <link to="IConsole::discardSnapshot"/>.
7891
7892 <h3>Current snapshot</h3>
7893
7894 Every virtual machine has a current snapshot, identified by
7895 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
7896 a base for the <i>current machine state</i> (see below), to the effect
7897 that all normal hard disks of the machine and its execution
7898 state are based on this snapshot.
7899
7900 In the current implementation, the current snapshot is always the
7901 last taken snapshot (i.e. the head snapshot on the branch) and it
7902 cannot be changed.
7903
7904 The current snapshot is <tt>null</tt> if the machine doesn't have
7905 snapshots at all; in this case the current machine state is just
7906 current settings of this machine plus its current execution state.
7907
7908 <h3>Current machine state</h3>
7909
7910 The current machine state is what represented by IMachine instances got
7911 directly from IVirtualBox
7912 using <link
7913 to="IVirtualBox::getMachine">getMachine()</link>, <link
7914 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
7915 to instances returned by <link to="ISnapshot::machine"/>). This state
7916 is always used when the machine is <link to="IConsole::powerUp"> powered
7917 on</link>.
7918
7919 The current machine state also includes the current execution state.
7920 If the machine is being currently executed
7921 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
7922 and above), its execution state is just what's happening now.
7923 If it is powered off (<link to="MachineState_PoweredOff"/> or
7924 <link to="MachineState_Aborted"/>), it has a zero execution state.
7925 If the machine is saved (<link to="MachineState_Saved"/>), its
7926 execution state is what saved in the execution state file
7927 (<link to="IMachine::stateFilePath"/>).
7928
7929 If the machine is in the saved state, then, next time it is powered
7930 on, its execution state will be fully restored from the saved state
7931 file and the execution will continue from the point where the state
7932 was saved.
7933
7934 Similarly to snapshots, the current machine state can be discarded
7935 using <link to="IConsole::discardCurrentState"/>.
7936
7937 <h3>Taking and discarding snapshots</h3>
7938
7939 The table below briefly explains the meaning of every snapshot
7940 operation:
7941
7942 <table>
7943 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
7944
7945 <tr><td><link to="IConsole::takeSnapshot"/></td>
7946
7947 <td>Save the current state of the virtual machine, including all
7948 settings, contents of normal hard disks and the current modifications
7949 to immutable hard disks (for online snapshots)</td>
7950
7951 <td>The current state is not changed (the machine will continue
7952 execution if it is being executed when the snapshot is
7953 taken)</td></tr>
7954
7955 <tr><td><link to="IConsole::discardSnapshot"/></td>
7956
7957 <td>Forget the state of the virtual machine stored in the snapshot:
7958 dismiss all saved settings and delete the saved execution state (for
7959 online snapshots)</td>
7960
7961 <td>Other snapshots (including child snapshots, if any) and the
7962 current state are not directly affected</td></tr>
7963
7964 <tr><td><link to="IConsole::discardCurrentState"/></td>
7965
7966 <td>Restore the current state of the virtual machine from the state
7967 stored in the current snapshot, including all settings and hard disk
7968 contents</td>
7969
7970 <td>The current state of the machine existed prior to this operation
7971 is lost</td></tr>
7972
7973 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
7974
7975 <td>Completely revert the virtual machine to the state it was in
7976 before the current snapshot has been taken</td>
7977
7978 <td>The current state, as well as the current snapshot, are
7979 lost</td></tr>
7980
7981 </table>
7982
7983 </desc>
7984
7985 <attribute name="id" type="uuid" readonly="yes">
7986 <desc>UUID of the snapshot.</desc>
7987 </attribute>
7988
7989 <attribute name="name" type="wstring">
7990 <desc>Short name of the snapshot.</desc>
7991 </attribute>
7992
7993 <attribute name="description" type="wstring">
7994 <desc>Optional description of the snapshot.</desc>
7995 </attribute>
7996
7997 <attribute name="timeStamp" type="long long" readonly="yes">
7998 <desc>
7999 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8000 </desc>
8001 </attribute>
8002
8003 <attribute name="online" type="boolean" readonly="yes">
8004 <desc>
8005 <tt>true</tt> if this snapshot is an online snapshot and
8006 <tt>false</tt> otherwise.
8007
8008 <note>
8009 When this attribute is <tt>true</tt>, the
8010 <link to="IMachine::stateFilePath"/> attribute of the
8011 <link to="#machine"/> object associated with this snapshot
8012 will point to the saved state file. Otherwise, it will be
8013 <tt>null</tt>.
8014 </note>
8015 </desc>
8016 </attribute>
8017
8018 <attribute name="machine" type="IMachine" readonly="yes">
8019 <desc>
8020 Virtual machine this snapshot is taken on. This object
8021 stores all settings the machine had when taking this snapshot.
8022 <note>
8023 The returned machine object is immutable, i.e. no
8024 any settings can be changed.
8025 </note>
8026 </desc>
8027 </attribute>
8028
8029 <attribute name="parent" type="ISnapshot" readonly="yes">
8030 <desc>
8031 Parent snapshot (a snapshot this one is based on).
8032 <note>
8033 It's not an error to read this attribute on a snapshot
8034 that doesn't have a parent -- a null object will be
8035 returned to indicate this.
8036 </note>
8037 </desc>
8038 </attribute>
8039
8040 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8041 <desc>
8042 Child snapshots (all snapshots having this one as a parent).
8043 <note>
8044 In the current implementation, there can be only one
8045 child snapshot, or no children at all, meaning this is the
8046 last (head) snapshot.
8047 </note>
8048 </desc>
8049 </attribute>
8050
8051 </interface>
8052
8053
8054 <!--
8055 // IMedia
8056 /////////////////////////////////////////////////////////////////////////
8057 -->
8058
8059 <enum
8060 name="MediaState"
8061 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8062 >
8063 <desc>
8064 Virtual media state.
8065 <see>IMedia</see>
8066 </desc>
8067
8068 <const name="NotCreated" value="0">
8069 <desc>
8070 Associated media storage does not exist (either was not created yet or
8071 was deleted).
8072 </desc>
8073 </const>
8074 <const name="Created" value="1">
8075 <desc>
8076 Associated storage exists and accessible.
8077 </desc>
8078 </const>
8079 <const name="LockedRead" value="2">
8080 <desc>
8081 Media is locked for reading, no data modification is possible.
8082 </desc>
8083 </const>
8084 <const name="LockedWrite" value="3">
8085 <desc>
8086 Media is locked for writing, no concurrent data reading or modification
8087 is possible.
8088 </desc>
8089 </const>
8090 <const name="Inaccessible" value="4">
8091 <desc>
8092 Associated media storage is not accessible.
8093 </desc>
8094 </const>
8095 <const name="Creating" value="5">
8096 <desc>
8097 Associated media storage is being created.
8098 </desc>
8099 </const>
8100 <const name="Deleting" value="6">
8101 <desc>
8102 Associated media storage is being deleted.
8103 </desc>
8104 </const>
8105 </enum>
8106
8107 <interface
8108 name="IMedium" extends="$unknown"
8109 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
8110 wsmap="managed"
8111 >
8112 <desc>
8113 The IMedium interface is a common interface for all objects representing
8114 virtual media such as hard disks, CD/DVD images and floppy images.
8115
8116 Each medium is associated with a storage unit (such as a file on the host
8117 computer or a network resource) that holds actual data. The location of
8118 the storage unit is represented by the #location attribute. The value of
8119 this attribute is media type dependent.
8120
8121 The exact media type may be determined by querying the appropriate
8122 interface such as:
8123 <ul>
8124 <li>IHardDisk (virtual hard disks)</li>
8125 <li>IDVDImage (standard CD/DVD ISO image files)</li>
8126 <li>IFloppyImage (raw floppy image files)</li>
8127 </ul>
8128
8129 Existing media are opened using the following methods, depending on the
8130 media type:
8131 <ul>
8132 <li><link to="IVirtualBox::openHardDisk"/></li>
8133 <li><link to="IVirtualBox::openDVDImage"/></li>
8134 <li><link to="IVirtualBox::openFloppyImage"/></li>
8135 </ul>
8136
8137 New hard disk media are created using the
8138 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8139 images are created outside VirtualBox, usually by storing a copy
8140 of the real medium of the corresponding type in a regular file.
8141
8142 <h3>Known Media</h3>
8143
8144 When an existing medium gets opened for the first time, it gets
8145 automatically remembered by the given VirtualBox installation or, in other
8146 words, becomes a <i>known medium</i>. Known media are stored in the media
8147 registry transparently maintained by VirtualBox and stored in settings
8148 files so that this registry is preserved when VirtualBox is not running.
8149
8150 Newly created virtual hard disks get remembered only when the associated
8151 storage unit is actually created (see IHardDisk for more details).
8152
8153 All known media can be enumerated using
8154 <link to="IVirtualBox::hardDisks"/>,
8155 <link to="IVirtualBox::DVDImages"/> and
8156 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8157 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8158 and similar methods or by location using
8159 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8160
8161 Only known media can be attached to virtual machines.
8162
8163 Removing known media from the media registry is performed when the given
8164 medium is closed using the <link to="#close"/> method or when its
8165 associated storage unit is deleted (only for hard disks).
8166
8167 <h3>Accessibility Checks</h3>
8168
8169 The given medium (with the created storage unit) is considered to be
8170 <i>accessible</i> when its storage unit can be read.
8171 Accessible media are indicated by the <link to="MediaState_Created"/>
8172 value of the <link to="#state"/> attribute. When the storage unit cannot
8173 be read (for example, because it is located on a disconnected network
8174 resource, or was accidentally deleted outside VirtualBox), the medium is
8175 considered to be <i>inaccessible</i> which is indicated by the
8176 <link to="MediaState_Inaccessible"/> state. The details about the reason
8177 of being inaccessible can be obtained using the
8178 <link to="#lastAccessError"/> attribute.
8179
8180 A new accessibility check is performed each time the <link to="#state"/>
8181 attribute is read. Please note that this check may take long time (several
8182 seconds or even minutes, depending on the storage unit location and
8183 format), and will block the calling thread until finished. For this
8184 reason, it is recommended to never read this attribute on the main UI
8185 thread to avoid making the UI unresponsive.
8186
8187 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8188 created for the first time), all known media are in the
8189 <link to="MediaState_Inaccessible"/> state but the value of the <link
8190 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
8191 accessibility check is made on startup. This is done to make the
8192 VirtualBox object ready for serving requests as
8193 fast as possible and let the end-user application decide if it needs to
8194 check media accessibility right away or not.
8195 </desc>
8196
8197 <attribute name="id" type="uuid" readonly="yes">
8198 <desc>
8199 UUID of the medium. For a newly created medium, this value is a randomly
8200 generated UUID.
8201
8202 <note>
8203 For media in one of MediaState_NotCreated, MediaState_Creating or
8204 MediaState_Deleting states, the value of this property is undefined
8205 and will most likely be an empty UUID.
8206 </note>
8207 </desc>
8208 </attribute>
8209
8210 <attribute name="description" type="wstring">
8211 <desc>
8212 Optional description of the medium. For newly created media, the value
8213 of this attribute value is <tt>null</tt>.
8214
8215 Media types that don't support this attribute will return E_NOTIMPL in
8216 attempt to get or set this attribute's value.
8217
8218 <note>
8219 For some storage types, reading this attribute may return an outdated
8220 (last known) value when <link to="#state"/> is <link
8221 to="MediaState_Inaccessible"/> or <link
8222 to="MediaState_LockedWrite"/> because the value of this attribute is
8223 stored within the storage unit itself. Also note that changing the
8224 attribute value is not possible in such case, as well as when the
8225 medium is the <link to="MediaState_LockedRead"/> state.
8226 </note>
8227 </desc>
8228 </attribute>
8229
8230 <attribute name="state" type="MediaState" readonly="yes">
8231 <desc>
8232 Current media state. Inspect <link to="MediaState"/> values for details.
8233
8234 Reading this attribute may take a long time because an accessibility
8235 check of the storage unit is performed each time the attribute is read.
8236 This check may cause a significant delay if the storage unit of the
8237 given medium is, for example, a file located on a network share which is
8238 not currently accessible due to connectivity problems -- the call will
8239 not return until a timeout interval defined by the host OS for this
8240 operation expires.
8241
8242 If the last known state of the medium is <link to="MediaState_Created"/>
8243 and the accessibility check fails then the state would be set to
8244 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8245 may be used to get more details about the failure. If the state of the
8246 medium is <link to="MediaState_LockedRead"/> or
8247 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8248 non-null value of <link to="#lastAccessError"/> will indicate a failed
8249 accessibility check in this case.
8250
8251 Note that not all media states are applicable to all media types.
8252 For example, states <link to="MediaState_NotCreated"/>,
8253 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8254 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8255 IFloppyImage media.
8256 </desc>
8257 </attribute>
8258
8259 <attribute name="location" type="wstring">
8260 <desc>
8261 Location of the storage unit holding media data.
8262
8263 The format of the location string is media type specific. For media
8264 types using regular files in a host's file system, the location
8265 string is the full file name.
8266
8267 Some media types may support changing the storage unit location by
8268 simply changing the value of this property. If this operation is not
8269 supported, the implementation will return E_NOTIMPL in attempt to set
8270 this attribute's value.
8271
8272 When setting a value of the location attribute which is a regular file
8273 in the host's file system, the given file name may be either relative to
8274 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8275 absolute. Note that if the given location specification does not contain
8276 the file extension part then a proper default extension will be
8277 automatically appended by the implementation depending on the media type.
8278 </desc>
8279 </attribute>
8280
8281 <attribute name="name" type="wstring" readonly="yes">
8282 <desc>
8283 Name of the storage unit holding media data.
8284
8285 The returned string is a short version of the <link to="#location"/>
8286 attribute that is suitable for representing the medium in situations
8287 where the full location specification is too long (such as lists
8288 and comboboxes in GUI frontends). This string is also used by frontends
8289 to sort the media list alphabetically when needed.
8290
8291 For example, for locations that are regular files in the host's file
8292 system, the value of this attribute is just the file name (+ extension),
8293 without the path specification.
8294
8295 Note that as opposed to the <link to="#location"/> attribute, the name
8296 attribute will not necessary be unique for a list of media of the
8297 given type and format.
8298 </desc>
8299 </attribute>
8300
8301 <attribute name="size" type="unsigned long long" readonly="yes">
8302 <desc>
8303 Physical size of the storage unit used to hold media data (in bytes).
8304
8305 <note>
8306 For media whose <link to="#state"/> is <link
8307 to="MediaState_Inaccessible"/>, the value of this property is the
8308 last known size. For <link to="MediaState_NotCreated"/> media,
8309 the returned value is zero.
8310 </note>
8311 </desc>
8312 </attribute>
8313
8314 <attribute name="lastAccessError" type="wstring" readonly="yes">
8315 <desc>
8316 Text message that represents the result of the last accessibility
8317 check.
8318
8319 Accessibility checks are performed each time the <link to="#state"/>
8320 attribute is read. A @c null string is returned if the last
8321 accessibility check was successful. A non-null string indicates a
8322 failure and should normally describe a reason of the failure (for
8323 example, a file read error).
8324 </desc>
8325 </attribute>
8326
8327 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8328 <desc>
8329 Array of UUIDs of all machines this medium is attached to.
8330
8331 A <tt>null</tt> array is returned if this medium is not attached to any
8332 machine or to any machine's snapshot.
8333
8334 <note>
8335 The returned array will include a machine even if this medium is not
8336 attached to that machine in the current state but attached to it in
8337 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8338 details.
8339 </note>
8340 </desc>
8341 </attribute>
8342
8343 <method name="getSnapshotIds">
8344 <desc>
8345 Returns an array of UUIDs of all snapshots of the given machine where
8346 this medium is attached to.
8347
8348 If the medium is attached to the machine in the current state, then the
8349 first element in the array will always be the ID of the queried machine
8350 (i.e. the value equal to the @c machineId argument), followed by
8351 snapshot IDs (if any).
8352
8353 If the medium is not attached to the machine in the current state, then
8354 the array will contain only snapshot IDs.
8355
8356 The returned array may be <tt>null</tt> if this medium is not attached
8357 to the given machine at all, neither in the current state nor in one of
8358 the snapshots.
8359 </desc>
8360 <param name="machineId" type="uuid" dir="in">
8361 <desc>
8362 UUID of the machine to query.
8363 </desc>
8364 </param>
8365 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8366 <desc>
8367 Array of snapshot UUIDs of the given machine using this medium.
8368 </desc>
8369 </param>
8370 </method>
8371
8372 <method name="lockRead">
8373 <desc>
8374 Locks this medium for reading.
8375
8376 The read lock is shared: many clients can simultaneously lock the
8377 same media for reading unless it is already locked for writing (see
8378 <link to="#lockWrite"/>) in which case an error is returned.
8379
8380 When the medium is locked for reading, it cannot be modified
8381 from within VirtualBox. This means that any method that changes
8382 the properties of this medium or contents of the storage unit
8383 will return an error (unless explicitly stated otherwise) and
8384 that an attempt to start a virtual machine that wants to modify
8385 the medium will also fail.
8386
8387 When the virtual machine is started up, it locks for reading all
8388 media it uses in read-only mode. If some media cannot be locked
8389 for reading, the startup procedure will fail.
8390
8391 The medium locked for reading must be unlocked using the <link
8392 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8393 can be nested and must be followed by the same number of paired
8394 <link to="#unlockRead"/> calls.
8395
8396 This method sets the media state to <link
8397 to="MediaState_LockedRead"/> on success. The state prior to
8398 this call must be <link to="MediaState_Created"/>, <link
8399 to="MediaState_Inaccessible"/> or <link
8400 to="MediaState_LockedRead"/>. As you can see, inaccessible
8401 media can be locked too. This is not an error; this method
8402 performs a logical lock that prevents modifications of this
8403 media through the VirtualBox API, not a physical lock of the
8404 underlying storage unit.
8405
8406 This method returns the current state of the medium
8407 <b>before</b> the operation.
8408
8409 <result name="VBOX_E_INVALID_OBJECT_STATE">
8410 Invalid media state (e.g. not created, locked, inaccessible,
8411 creating, deleting).
8412 </result>
8413
8414 </desc>
8415 <param name="state" type="MediaState" dir="return">
8416 <desc>
8417 State of the medium after the operation.
8418 </desc>
8419 </param>
8420 </method>
8421
8422 <method name="unlockRead">
8423 <desc>
8424 Cancels the read lock previously set by <link to="#lockRead"/>.
8425
8426 For both, success and failure, this method returns the current state
8427 of the medium <b>after</b> the operation.
8428
8429 See <link to="#lockRead"/> for more details.
8430
8431 <result name="VBOX_E_INVALID_OBJECT_STATE">
8432 Medium not locked for reading.
8433 </result>
8434
8435 </desc>
8436 <param name="state" type="MediaState" dir="return">
8437 <desc>
8438 State of the medium after the operation.
8439 </desc>
8440 </param>
8441 </method>
8442
8443 <method name="lockWrite">
8444 <desc>
8445 Locks this medium for writing.
8446
8447 The write lock, as opposed to <link to="#lockRead"/>, is
8448 exclusive: there may be only one client holding a write lock
8449 and there may be no read locks while the write lock is held.
8450
8451 When the medium is locked for writing, it cannot be modified
8452 from within VirtualBox and it is not guaranteed that the values
8453 of its properties are up-to-date. Any method that changes the
8454 properties of this medium or contents of the storage unit will
8455 return an error (unless explicitly stated otherwise) and an
8456 attempt to start a virtual machine wanting to modify or to
8457 read the medium will fail.
8458
8459 When the virtual machine is started up, it locks for writing all
8460 media it uses to write data to. If any medium could not be locked
8461 for writing, the startup procedure will fail.
8462
8463 The medium locked for writing must be unlocked using the <link
8464 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8465 can <b>not</b> be nested and must be followed by a<link
8466 to="#unlockWrite"/> call before the next lockWrite call.
8467
8468 This method sets the media state to <link
8469 to="MediaState_LockedWrite"/> on success. The state prior to
8470 this call must be <link to="MediaState_Created"/> or <link
8471 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8472 media can be locked too. This is not an error; this method
8473 performs a logical lock preventing modifications of this
8474 media through the VirtualBox API, not a physical lock of the
8475 underlying storage unit.
8476
8477 For both, success and failure, this method returns the current
8478 state of the medium <b>before</b> the operation.
8479
8480 <result name="VBOX_E_INVALID_OBJECT_STATE">
8481 Invalid media state (e.g. not created, locked, inaccessible,
8482 creating, deleting).
8483 </result>
8484
8485 </desc>
8486 <param name="state" type="MediaState" dir="return">
8487 <desc>
8488 State of the medium after the operation.
8489 </desc>
8490 </param>
8491 </method>
8492
8493 <method name="unlockWrite">
8494 <desc>
8495 Cancels the write lock previously set by <link to="#lockWrite"/>.
8496
8497 For both, success and failure, this method returns the current
8498 state of the medium <b>after</b> the operation.
8499
8500 See <link to="#lockWrite"/> for more details.
8501
8502 <result name="VBOX_E_INVALID_OBJECT_STATE">
8503 Medium not locked for writing.
8504 </result>
8505
8506 </desc>
8507 <param name="state" type="MediaState" dir="return">
8508 <desc>
8509 State of the medium after the operation.
8510 </desc>
8511 </param>
8512 </method>
8513
8514 <method name="close">
8515 <desc>
8516 Closes this medium.
8517
8518 The hard disk must not be attached to any known virtual machine
8519 and must not have any known child hard disks, otherwise the
8520 operation will fail.
8521
8522 When the hard disk is successfully closed, it gets removed from
8523 the list of remembered hard disks, but its storage unit is not
8524 deleted. In particular, this means that this hard disk can be
8525 later opened again using the <link
8526 to="IVirtualBox::openHardDisk"/> call.
8527
8528 Note that after this method successfully returns, the given hard
8529 disk object becomes uninitialized. This means that any attempt
8530 to call any of its methods or attributes will fail with the
8531 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8532
8533 <result name="VBOX_E_INVALID_OBJECT_STATE">
8534 Invalid media state (other than not created, created or
8535 inaccessible).
8536 </result>
8537 <result name="VBOX_E_OBJECT_IN_USE">
8538 Medium attached to virtual machine.
8539 </result>
8540 <result name="VBOX_E_FILE_ERROR">
8541 Settings file not accessible.
8542 </result>
8543 <result name="VBOX_E_XML_ERROR">
8544 Could not parse the settings file.
8545 </result>
8546
8547 </desc>
8548 </method>
8549
8550 </interface>
8551
8552
8553 <!--
8554 // IHardDisk
8555 /////////////////////////////////////////////////////////////////////////
8556 -->
8557
8558 <enum
8559 name="HardDiskType"
8560 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8561 >
8562 <desc>
8563 Virtual hard disk type.
8564 <see>IHardDisk</see>
8565 </desc>
8566
8567 <const name="Normal" value="0">
8568 <desc>
8569 Normal hard disk (attached directly or indirectly, preserved
8570 when taking snapshots).
8571 </desc>
8572 </const>
8573 <const name="Immutable" value="1">
8574 <desc>
8575 Immutable hard disk (attached indirectly, changes are wiped out
8576 after powering off the virtual machine).
8577 </desc>
8578 </const>
8579 <const name="Writethrough" value="2">
8580 <desc>
8581 Write through hard disk (attached directly, ignored when
8582 taking snapshots).
8583 </desc>
8584 </const>
8585 </enum>
8586
8587 <enum
8588 name="HardDiskVariant"
8589 uuid="99334b63-7ed0-4f61-8a7e-7ec3e20dd912"
8590 >
8591 <desc>
8592 Virtual hard disk image variant. More than one flag may be set.
8593 <see>IHardDisk</see>
8594 </desc>
8595
8596 <const name="Standard" value="0">
8597 <desc>
8598 No particular variant requested, results in using the backend default.
8599 </desc>
8600 </const>
8601 <const name="VmdkSplit2G" value="0x01">
8602 <desc>
8603 VMDK image split in chunks of less than 2GByte.
8604 </desc>
8605 </const>
8606 <const name="VmdkStreamOptimized" value="0x04">
8607 <desc>
8608 VMDK streamOptimized image. Special import/export format which is
8609 read-only/append-only.
8610 </desc>
8611 </const>
8612 <const name="Fixed" value="0x1000">
8613 <desc>
8614 Fixed image. Only allowed for base images.
8615 </desc>
8616 </const>
8617 <const name="Diff" value="0x2000">
8618 <desc>
8619 Fixed image. Only allowed for base images.
8620 </desc>
8621 </const>
8622 </enum>
8623
8624 <interface
8625 name="IHardDiskAttachment" extends="$unknown"
8626 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8627 wsmap="struct"
8628 >
8629 <desc>
8630 The IHardDiskAttachment interface represents a hard disk attachment of a
8631 virtual machine.
8632
8633 Every hard disk attachment specifies a slot of the virtual hard disk
8634 controller and a virtual hard disk attached to this slot.
8635
8636 The array of hard disk attachments is returned by
8637 <link to="IMachine::hardDiskAttachments"/>.
8638 </desc>
8639 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8640 <desc>Hard disk object associated with this attachment.</desc>
8641 </attribute>
8642
8643 <attribute name="controller" type="wstring" readonly="yes">
8644 <desc>Interface bus of this attachment.</desc>
8645 </attribute>
8646
8647 <attribute name="port" type="long" readonly="yes">
8648 <desc>Port number of this attachment.</desc>
8649 </attribute>
8650
8651 <attribute name="device" type="long" readonly="yes">
8652 <desc>Device slot number of this attachment.</desc>
8653 </attribute>
8654
8655 </interface>
8656
8657 <interface
8658 name="IHardDisk" extends="IMedium"
8659 uuid="3498d065-dee6-48bf-bcc5-47018fee4f42"
8660 wsmap="managed"
8661 >
8662 <desc>
8663 The IHardDisk interface represents a virtual hard disk drive
8664 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8665
8666 Virtual hard disk objects virtualize the hard disk hardware and look like
8667 regular hard disks for the guest OS running inside the virtual machine.
8668
8669 <h3>Hard Disk Types</h3>
8670
8671 There are three types of hard disks:
8672 <link to="HardDiskType_Normal">Normal</link>,
8673 <link to="HardDiskType_Immutable">Immutable</link> and
8674 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8675 hard disk defines how the hard disk is attached to a virtual machine and
8676 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8677 machine with the attached hard disk is taken. The type of the hard disk is
8678 defined by the <link to="#type"/> attribute.
8679
8680 All hard disks can be also divided in two big groups: <i>base</i> hard
8681 disks and <i>differencing</i> hard disks. A base hard disk contains all
8682 sectors of the hard disk data in its storage unit and therefore can be
8683 used independently. On the contrary, a differencing hard disk contains
8684 only some part of the hard disk data (a subset of sectors) and needs
8685 another hard disk to get access to the missing sectors of data. This
8686 another hard disk is called a <i>parent</i> hard disk and defines a hard
8687 disk to which this differencing hard disk is known to be <i>linked to</i>.
8688 The parent hard disk may be itself a differencing hard disk. This
8689 way, differencing hard disks form a linked hard disk chain. This chain
8690 always ends with the base hard disk which is sometimes referred to as the
8691 root hard disk of this chain. Note that several differencing hard disks
8692 may be linked to the same parent hard disk. This way, all known hard disks
8693 form a hard disk tree which is based on their parent-child relationship.
8694
8695 Differencing hard disks can be distinguished from base hard disks by
8696 querying the <link to="#parent"/> attribute: base hard disks do not have
8697 parents they would depend on, so the value of this attribute is always
8698 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8699 the hard disk tree (from the child hard disk to its parent). It is also
8700 possible to walk down the tree using the <link to="#children"/>
8701 attribute.
8702
8703 Note that the type of all differencing hard disks is
8704 <link to="HardDiskType_Normal">Normal</link>; all other values are
8705 meaningless for them. Base hard disks may be of any type.
8706
8707 <h3>Creating Hard Disks</h3>
8708
8709 New base hard disks are created using
8710 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8711 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8712 disks are usually implicitly created by VirtualBox when needed but may
8713 also be created explicitly using <link to="#createDiffStorage"/>.
8714
8715 After the hard disk is successfully created (including the storage unit)
8716 or opened, it becomes a known hard disk (remembered in the internal media
8717 registry). Known hard disks can be attached to a virtual machine, accessed
8718 through <link to="IVirtualBox::getHardDisk"/> and
8719 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8720 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8721
8722 The following methods, besides <link to="IMedium::close"/>,
8723 automatically remove the hard disk from the media registry:
8724 <ul>
8725 <li><link to="#deleteStorage"/></li>
8726 <li><link to="#mergeTo"/></li>
8727 </ul>
8728
8729 If the storage unit of the hard disk is a regular file in the host's
8730 file system then the rules stated in the description of the
8731 <link to="IMedium::location"/> attribute apply when setting its value. In
8732 addition, a plain file name without any path may be given, in which case
8733 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8734 folder</link> will be prepended to it.
8735
8736 <h4>Automatic composition of the file name part</h4>
8737
8738 Another extension to the <link to="IMedium::location"/> attribute is that
8739 there is a possibility to cause VirtualBox to compose a unique value for
8740 the file name part of the location using the UUID of the hard disk. This
8741 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8742 e.g. before the storage unit is created, and works as follows. You set the
8743 value of the <link to="IMedium::location"/> attribute to a location
8744 specification which only contains the path specification but not the file
8745 name part and ends with either a forward slash or a backslash character.
8746 In response, VirtualBox will generate a new UUID for the hard disk and
8747 compose the file name using the following pattern:
8748 <pre>
8749 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8750 </pre>
8751 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8752 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8753 is the default extension for the storage format of this hard disk. After
8754 that, you may call any of the methods that create a new hard disk storage
8755 unit and they will use the generated UUID and file name.
8756
8757 <h3>Attaching Hard Disks</h3>
8758
8759 Hard disks are attached to virtual machines using the
8760 <link to="IMachine::attachHardDisk"/> method and detached using the
8761 <link to="IMachine::detachHardDisk"/> method. Depending on their
8762 <link to="#type"/>, hard disks are attached either
8763 <i>directly</i> or <i>indirectly</i>.
8764
8765 When a hard disk is being attached directly, it is associated with the
8766 virtual machine and used for hard disk operations when the machine is
8767 running. When a hard disk is being attached indirectly, a new differencing
8768 hard disk linked to it is implicitly created and this differencing hard
8769 disk is associated with the machine and used for hard disk operations.
8770 This also means that if <link to="IMachine::attachHardDisk"/> performs
8771 a direct attachment then the same hard disk will be returned in response
8772 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8773 an indirect attachment is performed then
8774 <link to="IMachine::getHardDisk"/> will return the implicitly created
8775 differencing hard disk, not the original one passed to <link
8776 to="IMachine::attachHardDisk"/>. The following table shows the
8777 dependency of the attachment type on the hard disk type:
8778
8779 <table>
8780 <tr>
8781 <th>Hard Disk Type</th>
8782 <th>Direct or Indirect?</th>
8783 </tr>
8784 <tr>
8785 <td>Normal (Base)</td>
8786 <td>
8787 Normal base hard disks that do not have children (i.e. differencing
8788 hard disks linked to them) and that are not already attached to
8789 virtual machines in snapshots are attached <b>directly</b>.
8790 Otherwise, they are attached <b>indirectly</b> because having
8791 dependent children or being part of the snapshot makes it impossible
8792 to modify hard disk contents without breaking the integrity of the
8793 dependent party. The <link to="#readOnly"/> attribute allows to
8794 quickly determine the kind of the attachment for the given hard
8795 disk. Note that if a normal base hard disk is to be indirectly
8796 attached to a virtual machine with snapshots then a special
8797 procedure called <i>smart attachment</i> is performed (see below).
8798 </td>
8799 </tr>
8800 <tr>
8801 <td>Normal (Differencing)</td>
8802 <td>
8803 Differencing hard disks are like normal base hard disks: attached
8804 <b>directly</b> if they do not have children and are not attached to
8805 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8806 that the smart attachment procedure is never performed for
8807 differencing hard disks.
8808 </td>
8809 </tr>
8810 <tr>
8811 <td>Immutable</td>
8812 <td>
8813 Immutable hard disks are always attached <b>indirectly</b> because
8814 they are designed to be non-writable. If an immutable hard disk is
8815 attached to a virtual machine with snapshots then a special
8816 procedure called smart attachment is performed (see below).
8817 </td>
8818 </tr>
8819 <tr>
8820 <td>Writethrough</td>
8821 <td>
8822 Writethrough hard disks are always attached <b>directly</b>, also as
8823 designed. This also means that writethrough hard disks cannot have
8824 other hard disks linked to them at all.
8825 </td>
8826 </tr>
8827 </table>
8828
8829 Note that the same hard disk, regardless of its type, may be attached to
8830 more than one virtual machine at a time. In this case, the machine that is
8831 started first gains exclusive access to the hard disk and attempts to
8832 start other machines having this hard disk attached will fail until the
8833 first machine is powered down.
8834
8835 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8836 that the given hard disk remains associated with the given machine after a
8837 successful <link to="IMachine::detachHardDisk"/> call until
8838 <link to="IMachine::saveSettings"/> is called to save all changes to
8839 machine settings to disk. This deferring is necessary to guarantee that
8840 the hard disk configuration may be restored at any time by a call to
8841 <link to="IMachine::discardSettings"/> before the settings
8842 are saved (committed).
8843
8844 Note that if <link to="IMachine::discardSettings"/> is called after
8845 indirectly attaching some hard disks to the machine but before a call to
8846 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8847 all differencing hard disks implicitly created by
8848 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
8849 Such implicitly created hard disks will also be immediately deleted when
8850 detached explicitly using the <link to="IMachine::detachHardDisk"/>
8851 call if it is made before <link to="IMachine::saveSettings"/>. This
8852 implicit deletion is safe because newly created differencing hard
8853 disks do not contain any user data.
8854
8855 However, keep in mind that detaching differencing hard disks that were
8856 implicitly created by <link to="IMachine::attachHardDisk"/>
8857 before the last <link to="IMachine::saveSettings"/> call will
8858 <b>not</b> implicitly delete them as they may already contain some data
8859 (for example, as a result of virtual machine execution). If these hard
8860 disks are no more necessary, the caller can always delete them explicitly
8861 using <link to="#deleteStorage"/> after they are actually de-associated
8862 from this machine by the <link to="IMachine::saveSettings"/> call.
8863
8864 <h3>Smart Attachment</h3>
8865
8866 When normal base or immutable hard disks are indirectly attached to a
8867 virtual machine then some additional steps are performed to make sure the
8868 virtual machine will have the most recent "view" of the hard disk being
8869 attached. These steps include walking through the machine's snapshots
8870 starting from the current one and going through ancestors up to the first
8871 snapshot. Hard disks attached to the virtual machine in all
8872 of the encountered snapshots are checked whether they are descendants of
8873 the given normal base or immutable hard disk. The first found child (which
8874 is the differencing hard disk) will be used instead of the normal base or
8875 immutable hard disk as a parent for creating a new differencing hard disk
8876 that will be actually attached to the machine. And only if no descendants
8877 are found or if the virtual machine does not have any snapshots then the
8878 normal base or immutable hard disk will be used itself as a parent for
8879 this differencing hard disk.
8880
8881 It is easier to explain what smart attachment does using the
8882 following example:
8883 <pre>
8884BEFORE attaching B.vdi: AFTER attaching B.vdi:
8885
8886Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8887 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8888 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8889 Snapshot 4 (none) Snapshot 4 (none)
8890 CurState (none) CurState (D3->D2.vdi)
8891
8892 NOT
8893 ...
8894 CurState (D3->B.vdi)
8895 </pre>
8896 The first column is the virtual machine configuration before the base hard
8897 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8898 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8899 mean that the hard disk that is actually attached to the machine is a
8900 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8901 another hard disk, <tt>B.vdi</tt>.
8902
8903 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8904 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8905 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8906 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8907 it cannot be attached directly and needs an indirect attachment (i.e.
8908 implicit creation of a new differencing hard disk). Due to the smart
8909 attachment procedure, the new differencing hard disk
8910 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8911 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8912 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8913 machine.
8914
8915 Note that if there is more than one descendant hard disk of the given base
8916 hard disk found in a snapshot, and there is an exact device, channel and
8917 bus match, then this exact match will be used. Otherwise, the youngest
8918 descendant will be picked up.
8919
8920 There is one more important aspect of the smart attachment procedure which
8921 is not related to snapshots at all. Before walking through the snapshots
8922 as described above, the backup copy of the current list of hard disk
8923 attachment is searched for descendants. This backup copy is created when
8924 the hard disk configuration is changed for the first time after the last
8925 <link to="IMachine::saveSettings"/> call and used by
8926 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8927 changes. When such a descendant is found in this backup copy, it will be
8928 simply re-attached back, without creating a new differencing hard disk for
8929 it. This optimization is necessary to make it possible to re-attach the
8930 base or immutable hard disk to a different bus, channel or device slot
8931 without losing the contents of the differencing hard disk actually
8932 attached to the machine in place of it.
8933 </desc>
8934
8935 <attribute name="format" type="wstring" readonly="yes">
8936 <desc>
8937 Storage format of this hard disk.
8938
8939 The value of this attribute is a string that specifies a backend used to
8940 store hard disk data. The storage format is defined when you create a
8941 new hard disk or automatically detected when you open an existing hard
8942 disk medium, and cannot be changed later.
8943
8944 The list of all storage formats supported by this VirtualBox
8945 installation can be obtained using
8946 <link to="ISystemProperties::hardDiskFormats"/>.
8947 </desc>
8948 </attribute>
8949
8950 <attribute name="type" type="HardDiskType">
8951 <desc>
8952 Type (role) of this hard disk.
8953
8954 The following constraints apply when changing the value of this
8955 attribute:
8956 <ul>
8957 <li>If a hard disk is attached to a virtual machine (either in the
8958 current state or in one of the snapshots), its type cannot be
8959 changed.
8960 </li>
8961 <li>As long as the hard disk has children, its type cannot be set
8962 to <link to="HardDiskType_Writethrough"/>.
8963 </li>
8964 <li>The type of all differencing hard disks is
8965 <link to="HardDiskType_Normal"/> and cannot be changed.
8966 </li>
8967 </ul>
8968
8969 The type of a newly created or opened hard disk is set to
8970 <link to="HardDiskType_Normal"/>.
8971 </desc>
8972 </attribute>
8973
8974 <attribute name="parent" type="IHardDisk" readonly="yes">
8975 <desc>
8976 Parent of this hard disk (a hard disk this hard disk is directly based
8977 on).
8978
8979 Only differencing hard disks have parents. For base (non-differencing)
8980 hard disks, <tt>null</tt> is returned.
8981 </desc>
8982 </attribute>
8983
8984 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
8985 <desc>
8986 Children of this hard disk (all differencing hard disks directly based
8987 on this hard disk). A <tt>null</tt> array is returned if this hard disk
8988 does not have any children.
8989 </desc>
8990 </attribute>
8991
8992 <attribute name="root" type="IHardDisk" readonly="yes">
8993 <desc>
8994 Root hard disk of this hard disk.
8995
8996 If this is a differencing hard disk, its root hard disk is the base hard
8997 disk the given hard disk branch starts from. For all other types of hard
8998 disks, this property returns the hard disk object itself (i.e. the same
8999 object this property is read on).
9000 </desc>
9001 </attribute>
9002
9003 <attribute name="readOnly" type="boolean" readonly="yes">
9004 <desc>
9005 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
9006 otherwise.
9007
9008 A hard disk is considered to be read-only when its contents cannot be
9009 modified without breaking the integrity of other parties that depend on
9010 this hard disk such as its child hard disks or snapshots of virtual
9011 machines where this hard disk is attached to these machines. If there
9012 are no children and no such snapshots then there is no dependency and
9013 the hard disk is not read-only.
9014
9015 The value of this attribute can be used to determine the kind of the
9016 attachment that will take place when attaching this hard disk to a
9017 virtual machine. If the value is <tt>false</tt> then the hard disk will
9018 be attached directly. If the value is <tt>true</tt> then the hard disk
9019 will be attached indirectly by creating a new differencing child hard
9020 disk for that. See the interface description for more information.
9021
9022 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9023 disks are always read-only while all
9024 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9025 always not.
9026
9027 <note>
9028 The read-only condition represented by this attribute is related to
9029 the hard disk type and usage, not to the current
9030 <link to="IMedium::state">media state</link> and not to the read-only
9031 state of the storage unit.
9032 </note>
9033 </desc>
9034 </attribute>
9035
9036 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9037 <desc>
9038 Logical size of this hard disk (in megabytes), as reported to the
9039 guest OS running inside the virtual machine this disk is
9040 attached to. The logical size is defined when the hard disk is created
9041 and cannot be changed later.
9042
9043 <note>
9044 Reading this property on a differencing hard disk will return the size
9045 of its <link to="#root"/> hard disk.
9046 </note>
9047 <note>
9048 For hard disks whose state is <link to="#state"/> is <link
9049 to="MediaState_Inaccessible"/>, the value of this property is the
9050 last known logical size. For <link to="MediaState_NotCreated"/> hard
9051 disks, the returned value is zero.
9052 </note>
9053 </desc>
9054 </attribute>
9055
9056 <attribute name="autoReset" type="boolean">
9057 <desc>
9058 Whether this differencing hard disk will be automatically reset each
9059 time a virtual machine it is attached to is powered up.
9060
9061 See <link to="#reset()"/> for more information about resetting
9062 differencing hard disks.
9063
9064 <note>
9065 Reading this property on a base (non-differencing) hard disk will
9066 always <tt>false</tt>. Changing the value of this property in this
9067 case is not supported.
9068 </note>
9069
9070 <result name="VBOX_E_NOT_SUPPORTED">
9071 This is not a differencing hard disk (when changing the attribute
9072 value).
9073 </result>
9074 </desc>
9075 </attribute>
9076
9077 <!-- storage methods -->
9078
9079 <method name="getProperty">
9080 <desc>
9081 Returns the value of the custom hard disk property with the given name.
9082
9083 The list of all properties supported by the given hard disk format can
9084 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9085
9086 Note that if this method returns a <tt>null</tt> @a value, the requested
9087 property is supported but currently not assigned any value.
9088
9089 <result name="VBOX_E_OBJECT_NOT_FOUND">
9090 Requested property does not exist (not supported by the format).
9091 </result>
9092 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9093 </desc>
9094 <param name="name" type="wstring" dir="in">
9095 <desc>Name of the property to get.</desc>
9096 </param>
9097 <param name="value" type="wstring" dir="return">
9098 <desc>Current property value.</desc>
9099 </param>
9100 </method>
9101
9102 <method name="setProperty">
9103 <desc>
9104 Sets the value of the custom hard disk property with the given name.
9105
9106 The list of all properties supported by the given hard disk format can
9107 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9108
9109 Note that setting the property value to <tt>null</tt> is equivalent to
9110 deleting the existing value. A default value (if it is defined for this
9111 property) will be used by the format backend in this case.
9112
9113 <result name="VBOX_E_OBJECT_NOT_FOUND">
9114 Requested property does not exist (not supported by the format).
9115 </result>
9116 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9117 </desc>
9118 <param name="name" type="wstring" dir="in">
9119 <desc>Name of the property to set.</desc>
9120 </param>
9121 <param name="value" type="wstring" dir="in">
9122 <desc>Property value to set.</desc>
9123 </param>
9124 </method>
9125
9126 <method name="getProperties">
9127 <desc>
9128 Returns values for a group of properties in one call.
9129
9130 The names of the properties to get are specified using the @a names
9131 argument which is a list of comma-separated property names or
9132 <tt>null</tt> if all properties are to be returned. Note that currently
9133 the value of this argument is ignored and the method always returns all
9134 existing properties.
9135
9136 The list of all properties supported by the given hard disk format can
9137 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9138
9139 The method returns two arrays, the array of property names corresponding
9140 to the @a names argument and the current values of these properties.
9141 Both arrays have the same number of elements with each elemend at the
9142 given index in the first array corresponds to an element at the same
9143 index in the second array.
9144
9145 Note that for properties that do not have assigned values,
9146 <tt>null</tt> is returned at the appropriate index in the
9147 @a returnValues array.
9148
9149 </desc>
9150 <param name="names" type="wstring" dir="in">
9151 <desc>
9152 Names of properties to get.
9153 </desc>
9154 </param>
9155 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9156 <desc>Names of returned properties.</desc>
9157 </param>
9158 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9159 <desc>Values of returned properties.</desc>
9160 </param>
9161 </method>
9162
9163 <method name="setProperties">
9164 <desc>
9165 Sets values for a group of properties in one call.
9166
9167 The names of the properties to set are passed in the @a names
9168 array along with the new values for them in the @a values array. Both
9169 arrays have the same number of elements with each elemend at the given
9170 index in the first array corresponding to an element at the same index
9171 in the second array.
9172
9173 If there is at least one property name in @a names that is not valid,
9174 the method will fail before changing the values of any other properties
9175 from the @a names array.
9176
9177 Using this method over <link to="#setProperty"/> is preferred if you
9178 need to set several properties at once since it will result into less
9179 IPC calls.
9180
9181 The list of all properties supported by the given hard disk format can
9182 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9183
9184 Note that setting the property value to <tt>null</tt> is equivalent to
9185 deleting the existing value. A default value (if it is defined for this
9186 property) will be used by the format backend in this case.
9187 </desc>
9188 <param name="names" type="wstring" safearray="yes" dir="in">
9189 <desc>Names of properties to set.</desc>
9190 </param>
9191 <param name="values" type="wstring" safearray="yes" dir="in">
9192 <desc>Values of properties to set.</desc>
9193 </param>
9194 </method>
9195
9196 <!-- storage methods -->
9197
9198 <method name="createBaseStorage">
9199 <desc>
9200 Starts creating a hard disk storage unit (fixed/dynamic, according
9201 to the variant flags) in in the background. The previous storage unit
9202 created for this object, if any, must first be deleted using
9203 <link to="#deleteStorage"/>, otherwise the operation will fail.
9204
9205 Before the operation starts, the hard disk is placed in
9206 <link to="MediaState_Creating"/> state. If the create operation
9207 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9208 state.
9209
9210 After the returned progress object reports that the operation has
9211 successfully completed, the media state will be set to <link
9212 to="MediaState_Created"/>, the hard disk will be remembered by this
9213 VirtualBox installation and may be attached to virtual machines.
9214
9215 <result name="VBOX_E_NOT_SUPPORTED">
9216 The variant of storage creation operation is not supported. See <link
9217 to="IHardDiskFormat::capabilities"/>.
9218 </result>
9219 </desc>
9220 <param name="logicalSize" type="unsigned long long" dir="in">
9221 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9222 </param>
9223 <param name="variant" type="HardDiskVariant" dir="in">
9224 <desc>Exact image variant which should be created.</desc>
9225 </param>
9226 <param name="progress" type="IProgress" dir="return">
9227 <desc>Progress object to track the operation completion.</desc>
9228 </param>
9229 </method>
9230
9231 <method name="deleteStorage">
9232 <desc>
9233 Starts deleting the storage unit of this hard disk.
9234
9235 The hard disk must not be attached to any known virtual machine and must
9236 not have any known child hard disks, otherwise the operation will fail.
9237 It will also fail if there is no storage unit to delete or if deletion
9238 is already in progress, or if the hard disk is being in use (locked for
9239 read or for write) or inaccessible. Therefore, the only valid state for
9240 this operation to succeed is <link to="MediaState_Created"/>.
9241
9242 Before the operation starts, the hard disk is placed to
9243 <link to="MediaState_Deleting"/> state and gets removed from the list
9244 of remembered hard disks (media registry). If the delete operation
9245 fails, the media will be remembered again and placed back to
9246 <link to="MediaState_Created"/> state.
9247
9248 After the returned progress object reports that the operation is
9249 complete, the media state will be set to
9250 <link to="MediaState_NotCreated"/> and you will be able to use one of
9251 the storage creation methods to create it again.
9252
9253 <see>#close()</see>
9254
9255 <result name="VBOX_E_OBJECT_IN_USE">
9256 Hard disk is attached to a virtual machine.
9257 </result>
9258 <result name="VBOX_E_NOT_SUPPORTED">
9259 Storage deletion is not allowed because neither of storage creation
9260 operations are supported. See
9261 <link to="IHardDiskFormat::capabilities"/>.
9262 </result>
9263
9264 <note>
9265 If the deletion operation fails, it is not guaranteed that the storage
9266 unit still exists. You may check the <link to="IMedium::state"/> value
9267 to answer this question.
9268 </note>
9269 </desc>
9270 <param name="progress" type="IProgress" dir="return">
9271 <desc>Progress object to track the operation completion.</desc>
9272 </param>
9273 </method>
9274
9275 <!-- diff methods -->
9276
9277 <method name="createDiffStorage">
9278 <desc>
9279 Starts creating an empty differencing storage unit based on this hard
9280 disk in the format and at the location defined by the @a target
9281 argument.
9282
9283 The target hard disk must be in <link to="MediaState_NotCreated"/>
9284 state (i.e. must not have an existing storage unit). Upon successful
9285 completion, this operation will set the type of the target hard disk to
9286 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9287 represent the differencing hard disk data in the given format (according
9288 to the storage format of the target object).
9289
9290 After the returned progress object reports that the operation is
9291 successfully complete, the target hard disk gets remembered by this
9292 VirtualBox installation and may be attached to virtual machines.
9293
9294 <note>
9295 The hard disk will be set to <link to="MediaState_LockedRead"/>
9296 state for the duration of this operation.
9297 </note>
9298 <result name="VBOX_E_OBJECT_IN_USE">
9299 Hard disk not in NotCreated state.
9300 </result>
9301 </desc>
9302 <param name="target" type="IHardDisk" dir="in">
9303 <desc>Target hard disk.</desc>
9304 </param>
9305 <param name="variant" type="HardDiskVariant" dir="in">
9306 <desc>Exact image variant which should be created.</desc>
9307 </param>
9308 <param name="progress" type="IProgress" dir="return">
9309 <desc>Progress object to track the operation completion.</desc>
9310 </param>
9311 </method>
9312
9313 <method name="mergeTo">
9314 <desc>
9315 Starts merging the contents of this hard disk and all intermediate
9316 differencing hard disks in the chain to the given target hard disk.
9317
9318 The target hard disk must be either a descendant of this hard disk or
9319 its ancestor (otherwise this method will immediately return a failure).
9320 It follows that there are two logical directions of the merge operation:
9321 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9322 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9323 chain:
9324
9325 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9326
9327 Here, calling this method on the <tt>Base</tt> hard disk object with
9328 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9329 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9330 merge. Note that in both cases the contents of the resulting hard disk
9331 will be the same, the only difference is the hard disk object that takes
9332 the result of the merge operation. In case of the forward merge in the
9333 above example, the result will be written to <tt>Diff_2</tt>; in case of
9334 the backward merge, the result will be written to <tt>Base</tt>. In
9335 other words, the result of the operation is always stored in the target
9336 hard disk.
9337
9338 Upon successful operation completion, the storage units of all hard
9339 disks in the chain between this (source) hard disk and the target hard
9340 disk, including the source hard disk itself, will be automatically
9341 deleted and the relevant hard disk objects (including this hard disk)
9342 will become uninitialized. This means that any attempt to call any of
9343 their methods or attributes will fail with the
9344 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9345 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9346 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9347 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9348 disk itself since it will no longer be based on any other hard disk.
9349
9350 Considering the above, all of the following conditions must be met in
9351 order for the merge operation to succeed:
9352 <ul>
9353 <li>
9354 Neither this (source) hard disk nor any intermediate
9355 differencing hard disk in the chain between it and the target
9356 hard disk is attached to any virtual machine.
9357 </li>
9358 <li>
9359 Neither the source hard disk nor the target hard disk is an
9360 <link to="HardDiskType_Immutable"/> hard disk.
9361 </li>
9362 <li>
9363 The part of the hard disk tree from the source hard disk to the
9364 target hard disk is a linear chain, i.e. all hard disks in this
9365 chain have exactly one child which is the next hard disk in this
9366 chain. The only exception from this rule is the target hard disk in
9367 the forward merge operation; it is allowed to have any number of
9368 child hard disks because the merge operation will hot change its
9369 logical contents (as it is seen by the guest OS or by children).
9370 </li>
9371 <li>
9372 None of the involved hard disks are in
9373 <link to="MediaState_LockedRead"/> or
9374 <link to="MediaState_LockedWrite"/> state.
9375 </li>
9376 </ul>
9377
9378 <note>
9379 This (source) hard disk and all intermediates will be placed to <link
9380 to="MediaState_Deleting"/> state and the target hard disk will be
9381 placed to <link to="MediaState_LockedWrite"/> state and for the
9382 duration of this operation.
9383 </note>
9384 </desc>
9385 <param name="targetId" type="uuid" dir="in">
9386 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9387 </param>
9388 <param name="progress" type="IProgress" dir="return">
9389 <desc>Progress object to track the operation completion.</desc>
9390 </param>
9391 </method>
9392
9393 <!-- clone methods -->
9394
9395 <method name="cloneTo">
9396 <desc>
9397 Starts creating a clone of this hard disk in the format and at the
9398 location defined by the @a target argument.
9399
9400 The target hard disk must be in <link to="MediaState_NotCreated"/>
9401 state (i.e. must not have an existing storage unit). Upon successful
9402 completion, the cloned hard disk will contain exactly the same sector
9403 data as the hard disk being cloned, except that a new UUID for the clone
9404 will be randomly generated.
9405
9406 After the returned progress object reports that the operation is
9407 successfully complete, the target hard disk gets remembered by this
9408 VirtualBox installation and may be attached to virtual machines.
9409
9410 <note>
9411 If the cloned hard disk is a differencing hard disk, it will inherit
9412 parent dependency of the original hard disk.
9413 </note>
9414 <note>
9415 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9416 state for the duration of this operation.
9417 </note>
9418 </desc>
9419 <param name="target" type="IHardDisk" dir="in">
9420 <desc>Target hard disk.</desc>
9421 </param>
9422 <param name="variant" type="HardDiskVariant" dir="in">
9423 <desc>Exact image variant which should be created.</desc>
9424 </param>
9425 <param name="progress" type="IProgress" dir="return">
9426 <desc>Progress object to track the operation completion.</desc>
9427 </param>
9428 </method>
9429
9430 <method name="flattenTo">
9431 <desc>
9432 Starts creating a deep (independent) clone of this hard disk in the
9433 format and at the location defined by the @a target argument.
9434
9435 This operation is similar to <link to="#cloneTo"/> except that when
9436 applied to a differencing hard disk, it will also copy missing hard disk
9437 data from all parent hard disks it is linked to. This will make the
9438 created clone an independent base hard disk that contains all hard disk
9439 data and does not need any other hard disks to operate.
9440
9441 After the returned progress object reports that the operation is
9442 successfully complete, the target hard disk gets remembered by this
9443 VirtualBox installation and may be attached to virtual machines.
9444
9445 <note>
9446 For base hard disks, this operation is identical to
9447 <link to="#cloneTo"/>.
9448 </note>
9449 <note>
9450 This hard disk and all its parent hard disks will be placed to <link
9451 to="MediaState_LockedRead"/> state for the duration of this
9452 operation.
9453 </note>
9454 </desc>
9455 <param name="target" type="IHardDisk" dir="in">
9456 <desc>Target hard disk.</desc>
9457 </param>
9458 <param name="variant" type="HardDiskVariant" dir="in">
9459 <desc>Exact image variant which should be created.</desc>
9460 </param>
9461 <param name="progress" type="IProgress" dir="return">
9462 <desc>Progress object to track the operation completion.</desc>
9463 </param>
9464 </method>
9465
9466 <!-- other methods -->
9467
9468 <method name="compact">
9469 <desc>
9470 Starts compacting of this hard disk. This means that the disk is
9471 transformed into a possibly more compact storage representation.
9472 This potentially creates temporary images, which can require a
9473 substantial amount of additional disk space.
9474
9475 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9476 state and all its parent hard disks (if any) will be placed to
9477 <link to="MediaState_LockedRead"/> state for the duration of this
9478 operation.
9479 </desc>
9480 <param name="progress" type="IProgress" dir="return">
9481 <desc>Progress object to track the operation completion.</desc>
9482 </param>
9483 </method>
9484
9485 <method name="reset">
9486 <desc>
9487 Starts erasing the contents of this differencing hard disk.
9488
9489 This operation will reset the differencing hard disk to its initial
9490 state when it does not contain any sector data and any read operation is
9491 redirected to its parent hard disk.
9492
9493 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9494 for the duration of this operation.
9495
9496 <result name="VBOX_E_NOT_SUPPORTED">
9497 This is not a differencing hard disk.
9498 </result>
9499 <result name="VBOX_E_INVALID_OBJECT_STATE">
9500 Hard disk is not in <link to="MediaState_Created"/> or
9501 <link to="MediaState_Inaccessible"/> state.
9502 </result>
9503 </desc>
9504 <param name="progress" type="IProgress" dir="return">
9505 <desc>Progress object to track the operation completion.</desc>
9506 </param>
9507 </method>
9508
9509 </interface>
9510
9511
9512 <!--
9513 // IHardDiskFormat
9514 /////////////////////////////////////////////////////////////////////////
9515 -->
9516
9517 <enum
9518 name="DataType"
9519 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9520 >
9521 <const name="Int32" value="0"/>
9522 <const name="Int8" value="1"/>
9523 <const name="String" value="2"/>
9524 </enum>
9525
9526 <enum
9527 name="DataFlags"
9528 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9529 >
9530 <const name="None" value="0x00"/>
9531 <const name="Mandatory" value="0x01"/>
9532 <const name="Expert" value="0x02"/>
9533 <const name="Array" value="0x04"/>
9534 <const name="FlagMask" value="0x07"/>
9535 </enum>
9536
9537 <enum
9538 name="HardDiskFormatCapabilities"
9539 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9540 >
9541 <desc>
9542 Hard disk format capability flags.
9543 </desc>
9544
9545 <const name="Uuid" value="0x01">
9546 <desc>
9547 Supports UUIDs as expected by VirtualBox code.
9548 </desc>
9549 </const>
9550
9551 <const name="CreateFixed" value="0x02">
9552 <desc>
9553 Supports creating fixed size images, allocating all space instantly.
9554 </desc>
9555 </const>
9556
9557 <const name="CreateDynamic" value="0x04">
9558 <desc>
9559 Supports creating dynamically growing images, allocating space on
9560 demand.
9561 </desc>
9562 </const>
9563
9564 <const name="CreateSplit2G" value="0x08">
9565 <desc>
9566 Supports creating images split in chunks of a bit less than 2 GBytes.
9567 </desc>
9568 </const>
9569
9570 <const name="Differencing" value="0x10">
9571 <desc>
9572 Supports being used as a format for differencing hard disks (see <link
9573 to="IHardDisk::createDiffStorage"/>).
9574 </desc>
9575 </const>
9576
9577 <const name="Asynchronous" value="0x20">
9578 <desc>
9579 Supports asynchronous I/O operations for at least some configurations.
9580 </desc>
9581 </const>
9582
9583 <const name="File" value="0x40">
9584 <desc>
9585 The format backend operates on files (the <link to="IMedium::location"/>
9586 attribute of the hard disk specifies a file used to store hard disk
9587 data; for a list of supported file extensions see
9588 <link to="IHardDiskFormat::fileExtensions"/>).
9589 </desc>
9590 </const>
9591
9592 <const name="Properties" value="0x80">
9593 <desc>
9594 The format backend uses the property interface to configure the storage
9595 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9596 method is used to get access to properties supported by the given hard
9597 disk format).
9598 </desc>
9599 </const>
9600
9601 <const name="CapabilityMask" value="0xFF"/>
9602 </enum>
9603
9604 <interface
9605 name="IHardDiskFormat" extends="$unknown"
9606 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9607 wsmap="managed"
9608 >
9609 <desc>
9610 The IHardDiskFormat interface represents a virtual hard disk format.
9611
9612 Each hard disk format has an associated backend which is used to handle
9613 hard disks stored in this format. This interface provides information
9614 about the properties of the associated backend.
9615
9616 Each hard disk format is identified by a string represented by the
9617 <link to="#id"/> attribute. This string is used in calls like
9618 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9619 format.
9620
9621 The list of all supported hard disk formats can be obtained using
9622 <link to="ISystemProperties::hardDiskFormats"/>.
9623
9624 <see>IHardDisk</see>
9625 </desc>
9626
9627 <attribute name="id" type="wstring" readonly="yes">
9628 <desc>
9629 Identifier of this format.
9630
9631 The format identifier is a non-null non-empty ASCII string. Note that
9632 this string is case-insensitive. This means that, for example, all of
9633 the following strings:
9634 <pre>
9635 "VDI"
9636 "vdi"
9637 "VdI"</pre>
9638 refer to the same hard disk format.
9639
9640 This string is used in methods of other interfaces where it is necessary
9641 to specify a hard disk format, such as
9642 <link to="IVirtualBox::createHardDisk"/>.
9643 </desc>
9644 </attribute>
9645
9646 <attribute name="name" type="wstring" readonly="yes">
9647 <desc>
9648 Human readable description of this format.
9649
9650 Mainly for use in file open dialogs.
9651 </desc>
9652 </attribute>
9653
9654 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9655 <desc>
9656 Array of strings containing the supported file extensions.
9657
9658 The first extension in the array is the extension preferred by the
9659 backend. It is recommended to use this extension when specifying a
9660 location of the storage unit for a new hard disk.
9661
9662 Note that some backends do not work on files, so this array may be
9663 empty.
9664
9665 <see>IHardDiskFormat::capabilities</see>
9666 </desc>
9667 </attribute>
9668
9669 <attribute name="capabilities" type="unsigned long" readonly="yes">
9670 <desc>
9671 Capabilities of the format as a set of bit flags.
9672
9673 For the meaning of individual capability flags see
9674 <link to="HardDiskFormatCapabilities"/>.
9675 </desc>
9676 </attribute>
9677
9678 <method name="describeProperties">
9679 <desc>
9680 Returns several arrays describing the properties supported by this
9681 format.
9682
9683 An element with the given index in each array describes one
9684 property. Thus, the number of elements in each returned array is the
9685 same and corresponds to the number of supported properties.
9686
9687 The returned arrays are filled in only if the
9688 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9689 All arguments must be non-NULL.
9690
9691 <see>DataType</see>
9692 <see>DataFlags</see>
9693 </desc>
9694
9695 <param name="names" type="wstring" safearray="yes" dir="out">
9696 <desc>Array of property names.</desc>
9697 </param>
9698 <param name="description" type="wstring" safearray="yes" dir="out">
9699 <desc>Array of property descriptions.</desc>
9700 </param>
9701 <param name="types" type="DataType" safearray="yes" dir="out">
9702 <desc>Array of property types.</desc>
9703 </param>
9704 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9705 <desc>Array of property flags.</desc>
9706 </param>
9707 <param name="defaults" type="wstring" safearray="yes" dir="out">
9708 <desc>Array of default property values.</desc>
9709 </param>
9710 </method>
9711
9712 </interface>
9713
9714
9715 <!--
9716 // IFloppyImage
9717 /////////////////////////////////////////////////////////////////////////
9718 -->
9719
9720 <interface
9721 name="IFloppyImage" extends="IMedium"
9722 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9723 wsmap="managed"
9724 >
9725 <desc>
9726 The IFloppyImage interface represents a medium containing the image
9727 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9728 </desc>
9729
9730 </interface>
9731
9732
9733 <!--
9734 // IDVDImage
9735 /////////////////////////////////////////////////////////////////////////
9736 -->
9737
9738 <interface
9739 name="IDVDImage" extends="IMedium"
9740 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9741 wsmap="managed"
9742 >
9743 <desc>
9744 The IDVDImage interface represents a medium containing the image
9745 of a CD or DVD disk in the ISO format.
9746
9747 This is a subclass of <link to="IMedium" />; see remarks there.
9748 </desc>
9749
9750 </interface>
9751
9752
9753 <!--
9754 // IDVDDrive
9755 /////////////////////////////////////////////////////////////////////////
9756 -->
9757
9758 <interface
9759 name="IDVDDrive" extends="$unknown"
9760 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9761 wsmap="managed"
9762 >
9763 <desc>
9764 The IDVDDrive interface represents the virtual CD/DVD drive of the
9765 virtual machine. An object of this type is returned by
9766 <link to="IMachine::DVDDrive"/>.
9767 </desc>
9768
9769 <attribute name="state" type="DriveState" readonly="yes">
9770 <desc>Current drive state.</desc>
9771 </attribute>
9772
9773 <attribute name="passthrough" type="boolean">
9774 <desc>
9775 When a host drive is mounted and passthrough is enabled
9776 the guest OS will be able to directly send SCSI commands to
9777 the host drive. This enables the guest OS to use CD/DVD writers
9778 but is potentially dangerous.
9779 </desc>
9780 </attribute>
9781
9782 <method name="mountImage">
9783 <desc>Mounts a CD/DVD image with the specified UUID.
9784
9785 <result name="VBOX_E_FILE_ERROR">
9786 Invalid image file location.
9787 </result>
9788 <result name="VBOX_E_OBJECT_NOT_FOUND">
9789 Could not find a CD/DVD image matching @a imageId.
9790 </result>
9791 <result name="VBOX_E_INVALID_OBJECT_STATE">
9792 Invalid media state.
9793 </result>
9794
9795 </desc>
9796 <param name="imageId" type="uuid" dir="in"/>
9797 </method>
9798
9799 <method name="captureHostDrive">
9800 <desc>Captures the specified host CD/DVD drive.</desc>
9801 <param name="drive" type="IHostDVDDrive" dir="in"/>
9802 </method>
9803
9804 <method name="unmount">
9805 <desc>Unmounts the currently mounted image or host drive.</desc>
9806 </method>
9807
9808 <method name="getImage">
9809 <desc>Returns the currently mounted CD/DVD image.</desc>
9810 <param name="image" type="IDVDImage" dir="return"/>
9811 </method>
9812
9813 <method name="getHostDrive">
9814 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9815 <param name="drive" type="IHostDVDDrive" dir="return"/>
9816 </method>
9817
9818 </interface>
9819
9820
9821 <!--
9822 // IFloppyDrive
9823 /////////////////////////////////////////////////////////////////////////
9824 -->
9825
9826 <interface
9827 name="IFloppyDrive" extends="$unknown"
9828 uuid="159412cd-bab8-452e-8097-218a020825a6"
9829 wsmap="managed"
9830 >
9831 <desc>
9832 The IFloppyDrive interface represents the virtual floppy drive of the
9833 virtual machine. An object of this type is returned by
9834 <link to="IMachine::floppyDrive" />.
9835 </desc>
9836
9837 <attribute name="enabled" type="boolean">
9838 <desc>
9839 Flag whether the floppy drive is enabled. If it is disabled,
9840 the floppy drive will not be reported to the guest OS.
9841 </desc>
9842 </attribute>
9843
9844 <attribute name="state" type="DriveState" readonly="yes">
9845 <desc>Current drive state.</desc>
9846 </attribute>
9847
9848 <method name="mountImage">
9849 <desc>Mounts a floppy image with the specified UUID.
9850
9851 <result name="VBOX_E_FILE_ERROR">
9852 Invalid image file location.
9853 </result>
9854 <result name="VBOX_E_OBJECT_NOT_FOUND">
9855 Could not find a floppy image matching @a imageID.
9856 </result>
9857 <result name="VBOX_E_INVALID_OBJECT_STATE">
9858 Invalid media state.
9859 </result>
9860
9861 </desc>
9862 <param name="imageId" type="uuid" dir="in"/>
9863 </method>
9864
9865 <method name="captureHostDrive">
9866 <desc>Captures the specified host floppy drive.</desc>
9867 <param name="drive" type="IHostFloppyDrive" dir="in"/>
9868 </method>
9869
9870 <method name="unmount">
9871 <desc>Unmounts the currently mounted image or host drive.</desc>
9872 </method>
9873
9874 <method name="getImage">
9875 <desc>Returns the currently mounted floppy image.</desc>
9876 <param name="image" type="IFloppyImage" dir="return"/>
9877 </method>
9878
9879 <method name="getHostDrive">
9880 <desc>Returns the currently mounted host floppy drive.</desc>
9881 <param name="drive" type="IHostFloppyDrive" dir="return"/>
9882 </method>
9883
9884 </interface>
9885
9886
9887 <!--
9888 // IKeyboard
9889 /////////////////////////////////////////////////////////////////////////
9890 -->
9891
9892 <interface
9893 name="IKeyboard" extends="$unknown"
9894 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9895 wsmap="managed"
9896 >
9897 <desc>
9898 The IKeyboard interface represents the virtual machine's keyboard. Used
9899 in <link to="IConsole::keyboard"/>.
9900
9901 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9902 to the virtual machine.
9903
9904 </desc>
9905 <method name="putScancode">
9906 <desc>Sends a scancode to the keyboard.
9907
9908 <result name="VBOX_E_IPRT_ERROR">
9909 Could not send scan code to virtual keyboard.
9910 </result>
9911
9912 </desc>
9913 <param name="scancode" type="long" dir="in"/>
9914 </method>
9915
9916 <method name="putScancodes">
9917 <desc>Sends an array of scancodes to the keyboard.
9918
9919 <result name="VBOX_E_IPRT_ERROR">
9920 Could not send all scan codes to virtual keyboard.
9921 </result>
9922
9923 </desc>
9924 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9925 <param name="codesStored" type="unsigned long" dir="return"/>
9926 </method>
9927
9928 <method name="putCAD">
9929 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9930 function is nothing special, it is just a convenience function
9931 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9932
9933 <result name="VBOX_E_IPRT_ERROR">
9934 Could not send all scan codes to virtual keyboard.
9935 </result>
9936
9937 </desc>
9938 </method>
9939
9940 </interface>
9941
9942
9943 <!--
9944 // IMouse
9945 /////////////////////////////////////////////////////////////////////////
9946 -->
9947
9948 <enum
9949 name="MouseButtonState"
9950 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
9951 >
9952 <desc>
9953 Mouse button state.
9954 </desc>
9955
9956 <const name="LeftButton" value="0x01"/>
9957 <const name="RightButton" value="0x02"/>
9958 <const name="MiddleButton" value="0x04"/>
9959 <const name="WheelUp" value="0x08"/>
9960 <const name="WheelDown" value="0x10"/>
9961 <const name="MouseStateMask" value="0x1F"/>
9962 </enum>
9963
9964 <interface
9965 name="IMouse" extends="$unknown"
9966 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
9967 wsmap="managed"
9968 >
9969 <desc>
9970 The IMouse interface represents the virtual machine's mouse. Used in
9971 <link to="IConsole::mouse"/>.
9972
9973 Through this interface, the virtual machine's virtual mouse can be
9974 controlled.
9975 </desc>
9976
9977 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9978 <desc>
9979 Whether the guest OS supports absolute mouse pointer positioning
9980 or not.
9981 <note>
9982 VirtualBox Guest Tools need to be installed to the guest OS
9983 in order to enable absolute mouse positioning support.
9984 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9985 callback to be instantly informed about changes of this attribute
9986 during virtual machine execution.
9987 </note>
9988 <see><link to="#putMouseEventAbsolute"/></see>
9989 </desc>
9990 </attribute>
9991
9992 <method name="putMouseEvent">
9993 <desc>
9994 Initiates a mouse event using relative pointer movements
9995 along x and y axis.
9996
9997 <result name="E_ACCESSDENIED">
9998 Console not powered up.
9999 </result>
10000 <result name="VBOX_E_IPRT_ERROR">
10001 Could not send mouse event to virtual mouse.
10002 </result>
10003
10004 </desc>
10005
10006 <param name="dx" type="long" dir="in">
10007 <desc>
10008 Amount of pixels the mouse should move to the right.
10009 Negative values move the mouse to the left.
10010 </desc>
10011 </param>
10012 <param name="dy" type="long" dir="in">
10013 <desc>
10014 Amount of pixels the mouse should move downwards.
10015 Negative values move the mouse upwards.
10016 </desc>
10017 </param>
10018 <param name="dz" type="long" dir="in">
10019 <desc>
10020 Amount of mouse wheel moves.
10021 Positive values describe clockwise wheel rotations,
10022 negative values describe counterclockwise rotations.
10023 </desc>
10024 </param>
10025 <param name="buttonState" type="long" dir="in">
10026 <desc>
10027 The current state of mouse buttons. Every bit represents
10028 a mouse button as follows:
10029 <table>
10030 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10031 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10032 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10033 </table>
10034 A value of <tt>1</tt> means the corresponding button is pressed.
10035 otherwise it is released.
10036 </desc>
10037 </param>
10038 </method>
10039
10040 <method name="putMouseEventAbsolute">
10041 <desc>
10042 Positions the mouse pointer using absolute x and y coordinates.
10043 These coordinates are expressed in pixels and
10044 start from <tt>[1,1]</tt> which corresponds to the top left
10045 corner of the virtual display.
10046
10047 <result name="E_ACCESSDENIED">
10048 Console not powered up.
10049 </result>
10050 <result name="VBOX_E_IPRT_ERROR">
10051 Could not send mouse event to virtual mouse.
10052 </result>
10053
10054 <note>
10055 This method will have effect only if absolute mouse
10056 positioning is supported by the guest OS.
10057 </note>
10058
10059 <see><link to="#absoluteSupported"/></see>
10060 </desc>
10061
10062 <param name="x" type="long" dir="in">
10063 <desc>
10064 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
10065 </desc>
10066 </param>
10067 <param name="y" type="long" dir="in">
10068 <desc>
10069 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
10070 </desc>
10071 </param>
10072 <param name="dz" type="long" dir="in">
10073 <desc>
10074 Amount of mouse wheel moves.
10075 Positive values describe clockwise wheel rotations,
10076 negative values describe counterclockwise rotations.
10077 </desc>
10078 </param>
10079 <param name="buttonState" type="long" dir="in">
10080 <desc>
10081 The current state of mouse buttons. Every bit represents
10082 a mouse button as follows:
10083 <table>
10084 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10085 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10086 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10087 </table>
10088 A value of <tt>1</tt> means the corresponding button is pressed.
10089 otherwise it is released.
10090 </desc>
10091 </param>
10092 </method>
10093
10094 </interface>
10095
10096 <!--
10097 // IDisplay
10098 /////////////////////////////////////////////////////////////////////////
10099 -->
10100
10101 <enum
10102 name="FramebufferAccelerationOperation"
10103 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
10104 >
10105 <desc>
10106 Frame buffer acceleration operation.
10107 </desc>
10108
10109 <const name="SolidFillAcceleration" value="1"/>
10110 <const name="ScreenCopyAcceleration" value="2"/>
10111 </enum>
10112
10113 <enum
10114 name="FramebufferPixelFormat"
10115 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10116 >
10117 <desc>
10118 Format of the video memory buffer. Constants represented by this enum can
10119 be used to test for particular values of <link
10120 to="IFramebuffer::pixelFormat"/>. See also <link
10121 to="IFramebuffer::requestResize"/>.
10122
10123 See also www.fourcc.org for more information about FOURCC pixel formats.
10124 </desc>
10125
10126 <const name="Opaque" value="0">
10127 <desc>
10128 Unknown buffer format (the user may not assume any particular format of
10129 the buffer).
10130 </desc>
10131 </const>
10132 <const name="FOURCC_RGB" value="0x32424752">
10133 <desc>
10134 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10135 bit layout).
10136 </desc>
10137 </const>
10138 </enum>
10139
10140 <interface
10141 name="IFramebuffer" extends="$unknown"
10142 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
10143 wsmap="suppress"
10144 >
10145 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10146 <desc>Address of the start byte of the frame buffer.</desc>
10147 </attribute>
10148
10149 <attribute name="width" type="unsigned long" readonly="yes">
10150 <desc>Frame buffer width, in pixels.</desc>
10151 </attribute>
10152
10153 <attribute name="height" type="unsigned long" readonly="yes">
10154 <desc>Frame buffer height, in pixels.</desc>
10155 </attribute>
10156
10157 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10158 <desc>
10159 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10160 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10161 are: 8, 15, 16, 24 and 32.
10162 </desc>
10163 </attribute>
10164
10165 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10166 <desc>
10167 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10168 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10169 size of the scan line must be aligned to 32 bits.
10170 </desc>
10171 </attribute>
10172
10173 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10174 <desc>
10175 Frame buffer pixel format. It's either one of the values defined by <link
10176 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10177 <note>
10178 This attribute must never return <link
10179 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10180 <link to="#address"/> points to must be always known.
10181 </note>
10182 </desc>
10183 </attribute>
10184
10185 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10186 <desc>
10187 Defines whether this frame buffer uses the virtual video card's memory
10188 buffer (guest VRAM) directly or not. See <link
10189 to="IFramebuffer::requestResize"/> for more information.
10190 </desc>
10191 </attribute>
10192
10193 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10194 <desc>
10195 Hint from the frame buffer about how much of the standard
10196 screen height it wants to use for itself. This information is
10197 exposed to the guest through the VESA BIOS and VMMDev interface
10198 so that it can use it for determining its video mode table. It
10199 is not guaranteed that the guest respects the value.
10200 </desc>
10201 </attribute>
10202
10203 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10204 <desc>
10205 An alpha-blended overlay which is superposed over the frame buffer.
10206 The initial purpose is to allow the display of icons providing
10207 information about the VM state, including disk activity, in front
10208 ends which do not have other means of doing that. The overlay is
10209 designed to controlled exclusively by IDisplay. It has no locking
10210 of its own, and any changes made to it are not guaranteed to be
10211 visible until the affected portion of IFramebuffer is updated. The
10212 overlay can be created lazily the first time it is requested. This
10213 attribute can also return NULL to signal that the overlay is not
10214 implemented.
10215 </desc>
10216 </attribute>
10217
10218 <attribute name="winId" type="unsigned long long" readonly="yes">
10219 <desc>
10220 Platform-dependent identifier of the window where context of this
10221 frame buffer is drawn, or zero if there's no such window.
10222 </desc>
10223 </attribute>
10224
10225 <method name="lock">
10226 <desc>
10227 Locks the frame buffer.
10228 Gets called by the IDisplay object where this frame buffer is
10229 bound to.
10230 </desc>
10231 </method>
10232
10233 <method name="unlock">
10234 <desc>
10235 Unlocks the frame buffer.
10236 Gets called by the IDisplay object where this frame buffer is
10237 bound to.
10238 </desc>
10239 </method>
10240
10241 <method name="notifyUpdate">
10242 <desc>
10243 Informs about an update.
10244 Gets called by the display object where this buffer is
10245 registered.
10246 </desc>
10247 <param name="x" type="unsigned long" dir="in"/>
10248 <param name="y" type="unsigned long" dir="in"/>
10249 <param name="width" type="unsigned long" dir="in"/>
10250 <param name="height" type="unsigned long" dir="in"/>
10251 <param name="finished" type="boolean" dir="return"/>
10252 </method>
10253
10254 <method name="requestResize">
10255 <desc>
10256 Requests a size and pixel format change.
10257
10258 There are two modes of working with the video buffer of the virtual
10259 machine. The <i>indirect</i> mode implies that the IFramebuffer
10260 implementation allocates a memory buffer for the requested display mode
10261 and provides it to the virtual machine. In <i>direct</i> mode, the
10262 IFramebuffer implementation uses the memory buffer allocated and owned
10263 by the virtual machine. This buffer represents the video memory of the
10264 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10265 usually faster because the implementation gets a raw pointer to the
10266 guest VRAM buffer which it can directly use for visualizing the contents
10267 of the virtual display, as opposed to the indirect mode where the
10268 contents of guest VRAM are copied to the memory buffer provided by
10269 the implementation every time a display update occurs.
10270
10271 It is important to note that the direct mode is really fast only when
10272 the implementation uses the given guest VRAM buffer directly, for
10273 example, by blitting it to the window representing the virtual machine's
10274 display, which saves at least one copy operation comparing to the
10275 indirect mode. However, using the guest VRAM buffer directly is not
10276 always possible: the format and the color depth of this buffer may be
10277 not supported by the target window, or it may be unknown (opaque) as in
10278 case of text or non-linear multi-plane VGA video modes. In this case,
10279 the indirect mode (that is always available) should be used as a
10280 fallback: when the guest VRAM contents are copied to the
10281 implementation-provided memory buffer, color and format conversion is
10282 done automatically by the underlying code.
10283
10284 The @a pixelFormat parameter defines whether the direct mode is
10285 available or not. If @a pixelFormat is <link
10286 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10287 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10288 @a bytesPerLine parameters must be ignored and the implementation must use
10289 the indirect mode (where it provides its own buffer in one of the
10290 supported formats). In all other cases, @a pixelFormat together with
10291 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10292 buffer pointed to by the @a VRAM parameter and the implementation is
10293 free to choose which mode to use. To indicate that this frame buffer uses
10294 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10295 attribute must return <tt>true</tt> and <link to="#address"/> must
10296 return exactly the same address that is passed in the @a VRAM parameter
10297 of this method; otherwise it is assumed that the indirect strategy is
10298 chosen.
10299
10300 The @a width and @a height parameters represent the size of the
10301 requested display mode in both modes. In case of indirect mode, the
10302 provided memory buffer should be big enough to store data of the given
10303 display mode. In case of direct mode, it is guaranteed that the given
10304 @a VRAM buffer contains enough space to represent the display mode of the
10305 given size. Note that this frame buffer's <link to="#width"/> and <link
10306 to="#height"/> attributes must return exactly the same values as
10307 passed to this method after the resize is completed (see below).
10308
10309 The @a finished output parameter determines if the implementation has
10310 finished resizing the frame buffer or not. If, for some reason, the
10311 resize cannot be finished immediately during this call, @a finished
10312 must be set to @c false, and the implementation must call
10313 <link to="IDisplay::resizeCompleted"/> after it has returned from
10314 this method as soon as possible. If @a finished is @c false, the
10315 machine will not call any frame buffer methods until
10316 <link to="IDisplay::resizeCompleted"/> is called.
10317
10318 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10319 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10320 this frame buffer must return exactly the same values as specified in the
10321 parameters of this method, after the resize is completed. If the
10322 indirect mode is chosen, these attributes must return values describing
10323 the format of the implementation's own memory buffer <link
10324 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10325 value must always correlate with <link to="#pixelFormat"/>. Note that
10326 the <link to="#pixelFormat"/> attribute must never return <link
10327 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10328
10329 <note>
10330 This method is called by the IDisplay object under the
10331 <link to="#lock"/> provided by this IFramebuffer
10332 implementation. If this method returns @c false in @a finished, then
10333 this lock is not released until
10334 <link to="IDisplay::resizeCompleted"/> is called.
10335 </note>
10336 </desc>
10337 <param name="screenId" type="unsigned long" dir="in">
10338 <desc>
10339 Logical screen number. Must be used in the corresponding call to
10340 <link to="IDisplay::resizeCompleted"/> if this call is made.
10341 </desc>
10342 </param>
10343 <param name="pixelFormat" type="unsigned long" dir="in">
10344 <desc>
10345 Pixel format of the memory buffer pointed to by @a VRAM.
10346 See also <link to="FramebufferPixelFormat"/>.
10347 </desc>
10348 </param>
10349 <param name="VRAM" type="octet" mod="ptr" dir="in">
10350 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10351 </param>
10352 <param name="bitsPerPixel" type="unsigned long" dir="in">
10353 <desc>Color depth, bits per pixel.</desc>
10354 </param>
10355 <param name="bytesPerLine" type="unsigned long" dir="in">
10356 <desc>Size of one scan line, in bytes.</desc>
10357 </param>
10358 <param name="width" type="unsigned long" dir="in">
10359 <desc>Width of the guest display, in pixels.</desc>
10360 </param>
10361 <param name="height" type="unsigned long" dir="in">
10362 <desc>Height of the guest display, in pixels.</desc>
10363 </param>
10364 <param name="finished" type="boolean" dir="return">
10365 <desc>
10366 Can the VM start using the new frame buffer immediately
10367 after this method returns or it should wait for
10368 <link to="IDisplay::resizeCompleted"/>.
10369 </desc>
10370 </param>
10371 </method>
10372
10373 <method name="operationSupported">
10374 <desc>
10375 Returns whether the given acceleration operation is supported
10376 by the IFramebuffer implementation. If not, the display object
10377 will not attempt to call the corresponding IFramebuffer entry
10378 point. Even if an operation is indicated as supported, the
10379 IFramebuffer implementation always has the option to return non
10380 supported from the corresponding acceleration method in which
10381 case the operation will be performed by the display engine. This
10382 allows for reduced IFramebuffer implementation complexity where
10383 only common cases are handled.
10384 </desc>
10385 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10386 <param name="supported" type="boolean" dir="return"/>
10387 </method>
10388
10389 <method name="videoModeSupported">
10390 <desc>
10391 Returns whether the frame buffer implementation is willing to
10392 support a given video mode. In case it is not able to render
10393 the video mode (or for some reason not willing), it should
10394 return false. Usually this method is called when the guest
10395 asks the VMM device whether a given video mode is supported
10396 so the information returned is directly exposed to the guest.
10397 It is important that this method returns very quickly.
10398 </desc>
10399 <param name="width" type="unsigned long" dir="in"/>
10400 <param name="height" type="unsigned long" dir="in"/>
10401 <param name="bpp" type="unsigned long" dir="in"/>
10402 <param name="supported" type="boolean" dir="return"/>
10403 </method>
10404
10405 <method name="solidFill">
10406 <desc>
10407 Fills the specified rectangle on screen with a solid color.
10408 </desc>
10409 <param name="x" type="unsigned long" dir="in"/>
10410 <param name="y" type="unsigned long" dir="in"/>
10411 <param name="width" type="unsigned long" dir="in"/>
10412 <param name="height" type="unsigned long" dir="in"/>
10413 <param name="color" type="unsigned long" dir="in"/>
10414 <param name="handled" type="boolean" dir="return"/>
10415 </method>
10416
10417 <method name="copyScreenBits">
10418 <desc>
10419 Copies specified rectangle on the screen.
10420 </desc>
10421 <param name="xDst" type="unsigned long" dir="in"/>
10422 <param name="yDst" type="unsigned long" dir="in"/>
10423 <param name="xSrc" type="unsigned long" dir="in"/>
10424 <param name="ySrc" type="unsigned long" dir="in"/>
10425 <param name="width" type="unsigned long" dir="in"/>
10426 <param name="height" type="unsigned long" dir="in"/>
10427 <param name="handled" type="boolean" dir="return"/>
10428 </method>
10429
10430 <method name="getVisibleRegion">
10431 <desc>
10432 Returns the visible region of this frame buffer.
10433
10434 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10435 @a count parameter is ignored and the number of elements necessary to
10436 describe the current visible region is returned in @a countCopied.
10437
10438 If @a rectangles is not <tt>NULL</tt> but @a count is less
10439 than the required number of elements to store region data, the method
10440 will report a failure. If @a count is equal or greater than the
10441 required number of elements, then the actual number of elements copied
10442 to the provided array will be returned in @a countCopied.
10443
10444 <note>
10445 The address of the provided array must be in the process space of
10446 this IFramebuffer object.
10447 </note>
10448 <note>
10449 Method not yet implemented.
10450 </note>
10451 </desc>
10452 <param name="rectangles" type="octet" mod="ptr" dir="in">
10453 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10454 </param>
10455 <param name="count" type="unsigned long" dir="in">
10456 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10457 </param>
10458 <param name="countCopied" type="unsigned long" dir="return">
10459 <desc>Number of elements copied to the @a rectangles array.</desc>
10460 </param>
10461 </method>
10462
10463 <method name="setVisibleRegion">
10464 <desc>
10465 Suggests a new visible region to this frame buffer. This region
10466 represents the area of the VM display which is a union of regions of
10467 all top-level windows of the guest operating system running inside the
10468 VM (if the Guest Additions for this system support this
10469 functionality). This information may be used by the frontends to
10470 implement the seamless desktop integration feature.
10471
10472 <note>
10473 The address of the provided array must be in the process space of
10474 this IFramebuffer object.
10475 </note>
10476 <note>
10477 The IFramebuffer implementation must make a copy of the provided
10478 array of rectangles.
10479 </note>
10480 <note>
10481 Method not yet implemented.
10482 </note>
10483 </desc>
10484 <param name="rectangles" type="octet" mod="ptr" dir="in">
10485 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10486 </param>
10487 <param name="count" type="unsigned long" dir="in">
10488 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10489 </param>
10490 </method>
10491
10492 </interface>
10493
10494 <interface
10495 name="IFramebufferOverlay" extends="IFramebuffer"
10496 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10497 wsmap="suppress"
10498 >
10499 <desc>
10500 The IFramebufferOverlay interface represents an alpha blended overlay
10501 for displaying status icons above an IFramebuffer. It is always created
10502 not visible, so that it must be explicitly shown. It only covers a
10503 portion of the IFramebuffer, determined by its width, height and
10504 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10505 that order) format, and may be written to directly. Do re-read the
10506 width though, after setting it, as it may be adjusted (increased) to
10507 make it more suitable for the front end.
10508 </desc>
10509 <attribute name="x" type="unsigned long" readonly="yes">
10510 <desc>X position of the overlay, relative to the frame buffer.</desc>
10511 </attribute>
10512
10513 <attribute name="y" type="unsigned long" readonly="yes">
10514 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10515 </attribute>
10516
10517 <attribute name="visible" type="boolean" readonly="no">
10518 <desc>
10519 Whether the overlay is currently visible.
10520 </desc>
10521 </attribute>
10522
10523 <attribute name="alpha" type="unsigned long" readonly="no">
10524 <desc>
10525 The global alpha value for the overlay. This may or may not be
10526 supported by a given front end.
10527 </desc>
10528 </attribute>
10529
10530 <method name="move">
10531 <desc>
10532 Changes the overlay's position relative to the IFramebuffer.
10533 </desc>
10534 <param name="x" type="unsigned long" dir="in"/>
10535 <param name="y" type="unsigned long" dir="in"/>
10536 </method>
10537
10538 </interface>
10539
10540 <interface
10541 name="IDisplay" extends="$unknown"
10542 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10543 wsmap="suppress"
10544 >
10545 <desc>
10546 The IDisplay interface represents the virtual machine's display.
10547
10548 The object implementing this interface is contained in each
10549 <link to="IConsole::display"/> attribute and represents the visual
10550 output of the virtual machine.
10551
10552 The virtual display supports pluggable output targets represented by the
10553 IFramebuffer interface. Examples of the output target are a window on
10554 the host computer or an RDP session's display on a remote computer.
10555 </desc>
10556 <attribute name="width" type="unsigned long" readonly="yes">
10557 <desc>Current display width.</desc>
10558 </attribute>
10559
10560 <attribute name="height" type="unsigned long" readonly="yes">
10561 <desc>Current display height.</desc>
10562 </attribute>
10563
10564 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10565 <desc>
10566 Current guest display color depth. Note that this may differ
10567 from <link to="IFramebuffer::bitsPerPixel"/>.
10568 </desc>
10569 </attribute>
10570
10571 <method name="setupInternalFramebuffer">
10572 <desc>
10573 Prepares an internally managed frame buffer.
10574 </desc>
10575 <param name="depth" type="unsigned long" dir="in"/>
10576 </method>
10577
10578 <method name="lockFramebuffer">
10579 <desc>
10580 Requests access to the internal frame buffer.
10581
10582 <result name="VBOX_E_NOT_SUPPORTED">
10583 Attempt to lock a non-internal frame buffer.
10584 </result>
10585
10586 </desc>
10587 <param name="address" type="octet" mod="ptr" dir="return"/>
10588 </method>
10589
10590 <method name="unlockFramebuffer">
10591 <desc>
10592 Releases access to the internal frame buffer.
10593
10594 <result name="VBOX_E_NOT_SUPPORTED">
10595 Attempt to unlock a non-internal frame buffer.
10596 </result>
10597
10598 </desc>
10599 </method>
10600
10601 <method name="registerExternalFramebuffer">
10602 <desc>
10603 Registers an external frame buffer.
10604 </desc>
10605 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10606 </method>
10607
10608 <method name="setFramebuffer">
10609 <desc>
10610 Sets the framebuffer for given screen.
10611 </desc>
10612 <param name="screenId" type="unsigned long" dir="in"/>
10613 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10614 </method>
10615
10616 <method name="getFramebuffer">
10617 <desc>
10618 Queries the framebuffer for given screen.
10619 </desc>
10620 <param name="screenId" type="unsigned long" dir="in"/>
10621 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10622 <param name="xOrigin" type="long" dir="out"/>
10623 <param name="yOrigin" type="long" dir="out"/>
10624 </method>
10625
10626 <method name="setVideoModeHint">
10627 <desc>
10628 Asks VirtualBox to request the given video mode from
10629 the guest. This is just a hint and it cannot be guaranteed
10630 that the requested resolution will be used. Guest Additions
10631 are required for the request to be seen by guests. The caller
10632 should issue the request and wait for a resolution change and
10633 after a timeout retry.
10634
10635 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10636 parameters means that the corresponding values should be taken from the
10637 current video mode (i.e. left unchanged).
10638
10639 If the guest OS supports multi-monitor configuration then the @a display
10640 parameter specifies the number of the guest display to send the hint to:
10641 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10642 so on. If the multi-monitor configuration is not supported, @a display
10643 must be <tt>0</tt>.
10644
10645 <result name="E_INVALIDARG">
10646 The @a display is not associated with any monitor.
10647 </result>
10648
10649 </desc>
10650 <param name="width" type="unsigned long" dir="in"/>
10651 <param name="height" type="unsigned long" dir="in"/>
10652 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10653 <param name="display" type="unsigned long" dir="in"/>
10654 </method>
10655
10656 <method name="setSeamlessMode">
10657 <desc>
10658 Enables or disables seamless guest display rendering (seamless desktop
10659 integration) mode.
10660 <note>
10661 Calling this method has no effect if <link
10662 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10663 </note>
10664 </desc>
10665 <param name="enabled" type="boolean" dir="in"/>
10666 </method>
10667
10668 <method name="takeScreenShot">
10669 <desc>
10670 Takes a screen shot of the requested size and copies it to the
10671 32-bpp buffer allocated by the caller.
10672
10673 <result name="E_NOTIMPL">
10674 Feature not implemented.
10675 </result>
10676 <result name="VBOX_E_IPRT_ERROR">
10677 Could not take a screenshot.
10678 </result>
10679
10680 </desc>
10681 <param name="address" type="octet" mod="ptr" dir="in"/>
10682 <param name="width" type="unsigned long" dir="in"/>
10683 <param name="height" type="unsigned long" dir="in"/>
10684 </method>
10685
10686 <method name="drawToScreen">
10687 <desc>
10688 Draws a 32-bpp image of the specified size from the given buffer
10689 to the given point on the VM display.
10690
10691 <result name="E_NOTIMPL">
10692 Feature not implemented.
10693 </result>
10694 <result name="VBOX_E_IPRT_ERROR">
10695 Could not draw to screen.
10696 </result>
10697
10698 </desc>
10699 <param name="address" type="octet" mod="ptr" dir="in"/>
10700 <param name="x" type="unsigned long" dir="in"/>
10701 <param name="y" type="unsigned long" dir="in"/>
10702 <param name="width" type="unsigned long" dir="in"/>
10703 <param name="height" type="unsigned long" dir="in"/>
10704 </method>
10705
10706 <method name="invalidateAndUpdate">
10707 <desc>
10708 Does a full invalidation of the VM display and instructs the VM
10709 to update it.
10710
10711 <result name="VBOX_E_IPRT_ERROR">
10712 Could not invalidate and update screen.
10713 </result>
10714
10715 </desc>
10716 </method>
10717
10718 <method name="resizeCompleted">
10719 <desc>
10720 Signals that a framebuffer has completed the resize operation.
10721
10722 <result name="VBOX_E_NOT_SUPPORTED">
10723 Operation only valid for external frame buffers.
10724 </result>
10725
10726 </desc>
10727 <param name="screenId" type="unsigned long" dir="in"/>
10728 </method>
10729
10730 <method name="updateCompleted">
10731 <desc>
10732 Signals that a framebuffer has completed the update operation.
10733
10734 <result name="VBOX_E_NOT_SUPPORTED">
10735 Operation only valid for external frame buffers.
10736 </result>
10737
10738 </desc>
10739 </method>
10740
10741 </interface>
10742
10743 <!--
10744 // INetworkAdapter
10745 /////////////////////////////////////////////////////////////////////////
10746 -->
10747
10748 <enum
10749 name="NetworkAttachmentType"
10750 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10751 >
10752 <desc>
10753 Network attachment type.
10754 </desc>
10755
10756 <const name="Null" value="0">
10757 <desc>Null value, also means "not attached".</desc>
10758 </const>
10759 <const name="NAT" value="1"/>
10760 <const name="Bridged" value="2"/>
10761 <const name="Internal" value="3"/>
10762 <const name="HostOnly" value="4"/>
10763 </enum>
10764
10765 <enum
10766 name="NetworkAdapterType"
10767 uuid="156b17b9-5d61-4d54-be90-62e37dda848d"
10768 >
10769 <desc>
10770 Network adapter type.
10771 </desc>
10772
10773 <const name="Null" value="0">
10774 <desc>Null value (never used by the API).</desc>
10775 </const>
10776 <const name="Am79C970A" value="1"/>
10777 <const name="Am79C973" value="2"/>
10778 <const name="I82540EM" value="3"/>
10779 <const name="I82543GC" value="4"/>
10780 </enum>
10781
10782 <interface
10783 name="INetworkAdapter" extends="$unknown"
10784 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10785 wsmap="managed"
10786 >
10787 <desc>
10788 Represents a virtual network adapter that is attached to a virtual machine.
10789 Each virtual machine has a fixed number of network adapter slots with one
10790 instance of this attached to each of them. Call
10791 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10792 is attached to a given slot in a given machine.
10793
10794 Each network adapter can be in one of five attachment modes, which are
10795 represented by the <link to="NetworkAttachmentType" /> enumeration;
10796 see the <link to="#attachmentType" /> attribute.
10797 </desc>
10798
10799 <attribute name="adapterType" type="NetworkAdapterType">
10800 <desc>
10801 Type of the virtual network adapter. Depending on this value,
10802 VirtualBox will provide a different virtual network hardware
10803 to the guest.
10804 </desc>
10805 </attribute>
10806
10807 <attribute name="slot" type="unsigned long" readonly="yes">
10808 <desc>
10809 Slot number this adapter is plugged into. Corresponds to
10810 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10811 to obtain this instance.
10812 </desc>
10813 </attribute>
10814
10815 <attribute name="enabled" type="boolean">
10816 <desc>
10817 Flag whether the network adapter is present in the
10818 guest system. If disabled, the virtual guest hardware will
10819 not contain this network adapter. Can only be changed when
10820 the VM is not running.
10821 </desc>
10822 </attribute>
10823
10824 <attribute name="MACAddress" type="wstring">
10825 <desc>
10826 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10827 it to NULL, VirtualBox will generate a unique MAC address.
10828 </desc>
10829 </attribute>
10830
10831 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10832
10833 <attribute name="hostInterface" type="wstring">
10834 <desc>
10835 Name of the host network interface the VM is attached to.
10836 </desc>
10837 </attribute>
10838
10839 <attribute name="internalNetwork" type="wstring">
10840 <desc>
10841 Name of the internal network the VM is attached to.
10842 </desc>
10843 </attribute>
10844
10845 <attribute name="NATNetwork" type="wstring">
10846 <desc>
10847 Name of the NAT network the VM is attached to.
10848 </desc>
10849 </attribute>
10850
10851 <attribute name="cableConnected" type="boolean">
10852 <desc>
10853 Flag whether the adapter reports the cable as connected or not.
10854 It can be used to report offline situations to a VM.
10855 </desc>
10856 </attribute>
10857
10858 <attribute name="lineSpeed" type="unsigned long">
10859 <desc>
10860 Line speed reported by custom drivers, in units of 1 kbps.
10861 </desc>
10862 </attribute>
10863
10864 <attribute name="traceEnabled" type="boolean">
10865 <desc>
10866 Flag whether network traffic from/to the network card should be traced.
10867 Can only be toggled when the VM is turned off.
10868 </desc>
10869 </attribute>
10870
10871 <attribute name="traceFile" type="wstring">
10872 <desc>
10873 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10874 will be used.
10875 </desc>
10876 </attribute>
10877
10878 <method name="attachToNAT">
10879 <desc>
10880 Attach the network adapter to the Network Address Translation (NAT) interface.
10881 </desc>
10882 </method>
10883
10884 <method name="attachToBridgedInterface">
10885 <desc>
10886 Attach the network adapter to a bridged host interface.
10887 </desc>
10888 </method>
10889
10890 <method name="attachToInternalNetwork">
10891 <desc>
10892 Attach the network adapter to an internal network.
10893 </desc>
10894 </method>
10895
10896 <method name="attachToHostOnlyInterface">
10897 <desc>
10898 Attach the network adapter to the host-only network.
10899 </desc>
10900 </method>
10901
10902 <method name="detach">
10903 <desc>
10904 Detach the network adapter
10905 </desc>
10906 </method>
10907 </interface>
10908
10909
10910 <!--
10911 // ISerialPort
10912 /////////////////////////////////////////////////////////////////////////
10913 -->
10914
10915 <enum
10916 name="PortMode"
10917 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
10918 >
10919 <desc>
10920 The PortMode enumeration represents possible communication modes for
10921 the virtual serial port device.
10922 </desc>
10923
10924 <const name="Disconnected" value="0">
10925 <desc>Virtual device is not attached to any real host device.</desc>
10926 </const>
10927 <const name="HostPipe" value="1">
10928 <desc>Virtual device is attached to a host pipe.</desc>
10929 </const>
10930 <const name="HostDevice" value="2">
10931 <desc>Virtual device is attached to a host device.</desc>
10932 </const>
10933 </enum>
10934
10935 <interface
10936 name="ISerialPort" extends="$unknown"
10937 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10938 wsmap="managed"
10939 >
10940
10941 <desc>
10942 The ISerialPort interface represents the virtual serial port device.
10943
10944 The virtual serial port device acts like an ordinary serial port
10945 inside the virtual machine. This device communicates to the real
10946 serial port hardware in one of two modes: host pipe or host device.
10947
10948 In host pipe mode, the #path attribute specifies the path to the pipe on
10949 the host computer that represents a serial port. The #server attribute
10950 determines if this pipe is created by the virtual machine process at
10951 machine startup or it must already exist before starting machine
10952 execution.
10953
10954 In host device mode, the #path attribute specifies the name of the
10955 serial port device on the host computer.
10956
10957 There is also a third communication mode: the disconnected mode. In this
10958 mode, the guest OS running inside the virtual machine will be able to
10959 detect the serial port, but all port write operations will be discarded
10960 and all port read operations will return no data.
10961
10962 <see>IMachine::getSerialPort</see>
10963 </desc>
10964
10965 <attribute name="slot" type="unsigned long" readonly="yes">
10966 <desc>
10967 Slot number this serial port is plugged into. Corresponds to
10968 the value you pass to <link to="IMachine::getSerialPort"/>
10969 to obtain this instance.
10970 </desc>
10971 </attribute>
10972
10973 <attribute name="enabled" type="boolean">
10974 <desc>
10975 Flag whether the serial port is enabled. If disabled,
10976 the serial port will not be reported to the guest OS.
10977 </desc>
10978 </attribute>
10979
10980 <attribute name="IOBase" type="unsigned long">
10981 <desc>Base I/O address of the serial port.</desc>
10982 </attribute>
10983
10984 <attribute name="IRQ" type="unsigned long">
10985 <desc>IRQ number of the serial port.</desc>
10986 </attribute>
10987
10988 <attribute name="hostMode" type="PortMode">
10989 <desc>
10990 How is this port connected to the host.
10991 <note>
10992 Changing this attribute may fail if the conditions for
10993 <link to="#path"/> are not met.
10994 </note>
10995 </desc>
10996 </attribute>
10997
10998 <attribute name="server" type="boolean">
10999 <desc>
11000 Flag whether this serial port acts as a server (creates a new pipe on
11001 the host) or as a client (uses the existing pipe). This attribute is
11002 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11003 </desc>
11004 </attribute>
11005
11006 <attribute name="path" type="wstring">
11007 <desc>
11008 Path to the serial port's pipe on the host when <link to="#hostMode"/> is
11009 PortMode_HostPipe, or the host serial device name when
11010 <link to="#hostMode"/> is PortMode_HostDevice. In either of the above
11011 cases, setting a @c null or an empty string as the attribute's value
11012 will result into an error. Otherwise, the value of this property is
11013 ignored.
11014 </desc>
11015 </attribute>
11016
11017 </interface>
11018
11019 <!--
11020 // IParallelPort
11021 /////////////////////////////////////////////////////////////////////////
11022 -->
11023
11024 <interface
11025 name="IParallelPort" extends="$unknown"
11026 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11027 wsmap="managed"
11028 >
11029
11030 <desc>
11031 The IParallelPort interface represents the virtual parallel port device.
11032
11033 The virtual parallel port device acts like an ordinary parallel port
11034 inside the virtual machine. This device communicates to the real
11035 parallel port hardware using the name of the parallel device on the host
11036 computer specified in the #path attribute.
11037
11038 Each virtual parallel port device is assigned a base I/O address and an
11039 IRQ number that will be reported to the guest operating system and used
11040 to operate the given parallel port from within the virtual machine.
11041
11042 <see>IMachine::getParallelPort</see>
11043 </desc>
11044
11045 <attribute name="slot" type="unsigned long" readonly="yes">
11046 <desc>
11047 Slot number this parallel port is plugged into. Corresponds to
11048 the value you pass to <link to="IMachine::getParallelPort"/>
11049 to obtain this instance.
11050 </desc>
11051 </attribute>
11052
11053 <attribute name="enabled" type="boolean">
11054 <desc>
11055 Flag whether the parallel port is enabled. If disabled,
11056 the parallel port will not be reported to the guest OS.
11057 </desc>
11058 </attribute>
11059
11060 <attribute name="IOBase" type="unsigned long">
11061 <desc>Base I/O address of the parallel port.</desc>
11062 </attribute>
11063
11064 <attribute name="IRQ" type="unsigned long">
11065 <desc>IRQ number of the parallel port.</desc>
11066 </attribute>
11067
11068 <attribute name="path" type="wstring">
11069 <desc>
11070 Host parallel device name. If this parallel port is enabled, setting a
11071 @c null or an empty string as this attribute's value will result into
11072 an error.
11073 </desc>
11074 </attribute>
11075
11076 </interface>
11077
11078
11079 <!--
11080 // IMachineDebugger
11081 /////////////////////////////////////////////////////////////////////////
11082 -->
11083
11084 <interface
11085 name="IMachineDebugger" extends="$unknown"
11086 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11087 wsmap="suppress"
11088 >
11089 <method name="resetStats">
11090 <desc>
11091 Reset VM statistics.
11092 </desc>
11093 <param name="pattern" type="wstring" dir="in">
11094 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11095 </param>
11096 </method>
11097
11098 <method name="dumpStats">
11099 <desc>
11100 Dumps VM statistics.
11101 </desc>
11102 <param name="pattern" type="wstring" dir="in">
11103 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11104 </param>
11105 </method>
11106
11107 <method name="getStats">
11108 <desc>
11109 Get the VM statistics in a XMLish format.
11110 </desc>
11111 <param name="pattern" type="wstring" dir="in">
11112 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11113 </param>
11114 <param name="withDescriptions" type="boolean" dir="in">
11115 <desc>Whether to include the descriptions.</desc>
11116 </param>
11117 <param name="stats" type="wstring" dir="out">
11118 <desc>The XML document containing the statistics.</desc>
11119 </param>
11120 </method>
11121
11122 <method name="injectNMI">
11123 <desc>
11124 Inject an NMI into a running VT-x/AMD-V VM.
11125 </desc>
11126 </method>
11127
11128 <attribute name="singlestep" type="boolean">
11129 <desc>Switch for enabling singlestepping.</desc>
11130 </attribute>
11131
11132 <attribute name="recompileUser" type="boolean">
11133 <desc>Switch for forcing code recompilation for user mode code.</desc>
11134 </attribute>
11135
11136 <attribute name="recompileSupervisor" type="boolean">
11137 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11138 </attribute>
11139
11140 <attribute name="PATMEnabled" type="boolean">
11141 <desc>Switch for enabling and disabling the PATM component.</desc>
11142 </attribute>
11143
11144 <attribute name="CSAMEnabled" type="boolean">
11145 <desc>Switch for enabling and disabling the CSAM component.</desc>
11146 </attribute>
11147
11148 <attribute name="logEnabled" type="boolean">
11149 <desc>Switch for enabling and disabling logging.</desc>
11150 </attribute>
11151
11152 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11153 <desc>
11154 Flag indicating whether the VM is currently making use of CPU hardware
11155 virtualization extensions.
11156 </desc>
11157 </attribute>
11158
11159 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11160 <desc>
11161 Flag indicating whether the VM is currently making use of the nested paging
11162 CPU hardware virtualization extension.
11163 </desc>
11164 </attribute>
11165
11166 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11167 <desc>
11168 Flag indicating whether the VM is currently making use of the VPID
11169 VT-x extension.
11170 </desc>
11171 </attribute>
11172
11173 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11174 <desc>
11175 Flag indicating whether the VM is currently making use of the Physical
11176 Address Extension CPU feature.
11177 </desc>
11178 </attribute>
11179
11180 <attribute name="virtualTimeRate" type="unsigned long">
11181 <desc>
11182 The rate at which the virtual time runs expressed as a percentage.
11183 The accepted range is 2% to 20000%.
11184 </desc>
11185 </attribute>
11186
11187 <!-- @todo method for setting log flags, groups and destination! -->
11188
11189 <attribute name="VM" type="unsigned long long" readonly="yes">
11190 <desc>
11191 Gets the VM handle. This is only for internal use while
11192 we carve the details of this interface.
11193 </desc>
11194 </attribute>
11195
11196 </interface>
11197
11198 <!--
11199 // IUSBController
11200 /////////////////////////////////////////////////////////////////////////
11201 -->
11202
11203 <interface
11204 name="IUSBController" extends="$unknown"
11205 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11206 wsmap="managed"
11207 >
11208 <attribute name="enabled" type="boolean">
11209 <desc>
11210 Flag whether the USB controller is present in the
11211 guest system. If disabled, the virtual guest hardware will
11212 not contain any USB controller. Can only be changed when
11213 the VM is powered off.
11214 </desc>
11215 </attribute>
11216
11217 <attribute name="enabledEhci" type="boolean">
11218 <desc>
11219 Flag whether the USB EHCI controller is present in the
11220 guest system. If disabled, the virtual guest hardware will
11221 not contain a USB EHCI controller. Can only be changed when
11222 the VM is powered off.
11223 </desc>
11224 </attribute>
11225
11226 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11227 <desc>
11228 USB standard version which the controller implements.
11229 This is a BCD which means that the major version is in the
11230 high byte and minor version is in the low byte.
11231 </desc>
11232 </attribute>
11233
11234 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11235 <desc>
11236 List of USB device filters associated with the machine.
11237
11238 If the machine is currently running, these filters are activated
11239 every time a new (supported) USB device is attached to the host
11240 computer that was not ignored by global filters
11241 (<link to="IHost::USBDeviceFilters"/>).
11242
11243 These filters are also activated when the machine is powered up.
11244 They are run against a list of all currently available USB
11245 devices (in states
11246 <link to="USBDeviceState_Available"/>,
11247 <link to="USBDeviceState_Busy"/>,
11248 <link to="USBDeviceState_Held"/>) that were not previously
11249 ignored by global filters.
11250
11251 If at least one filter matches the USB device in question, this
11252 device is automatically captured (attached to) the virtual USB
11253 controller of this machine.
11254
11255 <see>IUSBDeviceFilter, ::IUSBController</see>
11256 </desc>
11257 </attribute>
11258
11259 <method name="createDeviceFilter">
11260 <desc>
11261 Creates a new USB device filter. All attributes except
11262 the filter name are set to <tt>null</tt> (any match),
11263 <i>active</i> is <tt>false</tt> (the filter is not active).
11264
11265 The created filter can then be added to the list of filters using
11266 <link to="#insertDeviceFilter"/>.
11267
11268 <result name="VBOX_E_INVALID_VM_STATE">
11269 The virtual machine is not mutable.
11270 </result>
11271
11272 <see>#deviceFilters</see>
11273 </desc>
11274 <param name="name" type="wstring" dir="in">
11275 <desc>
11276 Filter name. See <link to="IUSBDeviceFilter::name"/>
11277 for more info.
11278 </desc>
11279 </param>
11280 <param name="filter" type="IUSBDeviceFilter" dir="return">
11281 <desc>Created filter object.</desc>
11282 </param>
11283 </method>
11284
11285 <method name="insertDeviceFilter">
11286 <desc>
11287 Inserts the given USB device to the specified position
11288 in the list of filters.
11289
11290 Positions are numbered starting from <tt>0</tt>. If the specified
11291 position is equal to or greater than the number of elements in
11292 the list, the filter is added to the end of the collection.
11293
11294 <note>
11295 Duplicates are not allowed, so an attempt to insert a
11296 filter that is already in the collection, will return an
11297 error.
11298 </note>
11299
11300 <result name="VBOX_E_INVALID_VM_STATE">
11301 Virtual machine is not mutable.
11302 </result>
11303 <result name="E_INVALIDARG">
11304 USB device filter not created within this VirtualBox instance.
11305 </result>
11306 <result name="VBOX_E_INVALID_OBJECT_STATE">
11307 USB device filter already in list.
11308 </result>
11309
11310 <see>#deviceFilters</see>
11311 </desc>
11312 <param name="position" type="unsigned long" dir="in">
11313 <desc>Position to insert the filter to.</desc>
11314 </param>
11315 <param name="filter" type="IUSBDeviceFilter" dir="in">
11316 <desc>USB device filter to insert.</desc>
11317 </param>
11318 </method>
11319
11320 <method name="removeDeviceFilter">
11321 <desc>
11322 Removes a USB device filter from the specified position in the
11323 list of filters.
11324
11325 Positions are numbered starting from <tt>0</tt>. Specifying a
11326 position equal to or greater than the number of elements in
11327 the list will produce an error.
11328
11329 <see>#deviceFilters</see>
11330
11331 <result name="VBOX_E_INVALID_VM_STATE">
11332 Virtual machine is not mutable.
11333 </result>
11334 <result name="E_INVALIDARG">
11335 USB device filter list empty or invalid @a position.
11336 </result>
11337
11338 </desc>
11339 <param name="position" type="unsigned long" dir="in">
11340 <desc>Position to remove the filter from.</desc>
11341 </param>
11342 <param name="filter" type="IUSBDeviceFilter" dir="return">
11343 <desc>Removed USB device filter.</desc>
11344 </param>
11345 </method>
11346
11347 </interface>
11348
11349
11350 <!--
11351 // IUSBDevice
11352 /////////////////////////////////////////////////////////////////////////
11353 -->
11354
11355 <interface
11356 name="IUSBDevice" extends="$unknown"
11357 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11358 wsmap="managed"
11359 >
11360 <desc>
11361 The IUSBDevice interface represents a virtual USB device attached to the
11362 virtual machine.
11363
11364 A collection of objects implementing this interface is stored in the
11365 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11366 attached to a running virtual machine's USB controller.
11367 </desc>
11368
11369 <attribute name="id" type="uuid" readonly="yes">
11370 <desc>
11371 Unique USB device ID. This ID is built from #vendorId,
11372 #productId, #revision and #serialNumber.
11373 </desc>
11374 </attribute>
11375
11376 <attribute name="vendorId" type="unsigned short" readonly="yes">
11377 <desc>Vendor ID.</desc>
11378 </attribute>
11379
11380 <attribute name="productId" type="unsigned short" readonly="yes">
11381 <desc>Product ID.</desc>
11382 </attribute>
11383
11384 <attribute name="revision" type="unsigned short" readonly="yes">
11385 <desc>
11386 Product revision number. This is a packed BCD represented as
11387 unsigned short. The high byte is the integer part and the low
11388 byte is the decimal.
11389 </desc>
11390 </attribute>
11391
11392 <attribute name="manufacturer" type="wstring" readonly="yes">
11393 <desc>Manufacturer string.</desc>
11394 </attribute>
11395
11396 <attribute name="product" type="wstring" readonly="yes">
11397 <desc>Product string.</desc>
11398 </attribute>
11399
11400 <attribute name="serialNumber" type="wstring" readonly="yes">
11401 <desc>Serial number string.</desc>
11402 </attribute>
11403
11404 <attribute name="address" type="wstring" readonly="yes">
11405 <desc>Host specific address of the device.</desc>
11406 </attribute>
11407
11408 <attribute name="port" type="unsigned short" readonly="yes">
11409 <desc>
11410 Host USB port number the device is physically
11411 connected to.
11412 </desc>
11413 </attribute>
11414
11415 <attribute name="version" type="unsigned short" readonly="yes">
11416 <desc>
11417 The major USB version of the device - 1 or 2.
11418 </desc>
11419 </attribute>
11420
11421 <attribute name="portVersion" type="unsigned short" readonly="yes">
11422 <desc>
11423 The major USB version of the host USB port the device is
11424 physically connected to - 1 or 2. For devices not connected to
11425 anything this will have the same value as the version attribute.
11426 </desc>
11427 </attribute>
11428
11429 <attribute name="remote" type="boolean" readonly="yes">
11430 <desc>
11431 Whether the device is physically connected to a remote VRDP
11432 client or to a local host machine.
11433 </desc>
11434 </attribute>
11435
11436 </interface>
11437
11438
11439 <!--
11440 // IUSBDeviceFilter
11441 /////////////////////////////////////////////////////////////////////////
11442 -->
11443
11444 <interface
11445 name="IUSBDeviceFilter" extends="$unknown"
11446 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11447 wsmap="managed"
11448 >
11449 <desc>
11450 The IUSBDeviceFilter interface represents an USB device filter used
11451 to perform actions on a group of USB devices.
11452
11453 This type of filters is used by running virtual machines to
11454 automatically capture selected USB devices once they are physically
11455 attached to the host computer.
11456
11457 A USB device is matched to the given device filter if and only if all
11458 attributes of the device match the corresponding attributes of the
11459 filter (that is, attributes are joined together using the logical AND
11460 operation). On the other hand, all together, filters in the list of
11461 filters carry the semantics of the logical OR operation. So if it is
11462 desirable to create a match like "this vendor id OR this product id",
11463 one needs to create two filters and specify "any match" (see below)
11464 for unused attributes.
11465
11466 All filter attributes used for matching are strings. Each string
11467 is an expression representing a set of values of the corresponding
11468 device attribute, that will match the given filter. Currently, the
11469 following filtering expressions are supported:
11470
11471 <ul>
11472 <li><i>Interval filters</i>. Used to specify valid intervals for
11473 integer device attributes (Vendor ID, Product ID and Revision).
11474 The format of the string is:
11475
11476 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11477
11478 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11479 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11480 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11481 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11482 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11483 possible integer is assumed.
11484 </li>
11485 <li><i>Boolean filters</i>. Used to specify acceptable values for
11486 boolean device attributes. The format of the string is:
11487
11488 <tt>true|false|yes|no|0|1</tt>
11489
11490 </li>
11491 <li><i>Exact match</i>. Used to specify a single value for the given
11492 device attribute. Any string that doesn't start with <tt>int:</tt>
11493 represents the exact match. String device attributes are compared to
11494 this string including case of symbols. Integer attributes are first
11495 converted to a string (see individual filter attributes) and then
11496 compared ignoring case.
11497
11498 </li>
11499 <li><i>Any match</i>. Any value of the corresponding device attribute
11500 will match the given filter. An empty or <tt>null</tt> string is
11501 used to construct this type of filtering expressions.
11502
11503 </li>
11504 </ul>
11505
11506 <note>
11507 On the Windows host platform, interval filters are not currently
11508 available. Also all string filter attributes
11509 (<link to="#manufacturer"/>, <link to="#product"/>,
11510 <link to="#serialNumber"/>) are ignored, so they behave as
11511 <i>any match</i> no matter what string expression is specified.
11512 </note>
11513
11514 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11515 </desc>
11516
11517 <attribute name="name" type="wstring">
11518 <desc>
11519 Visible name for this filter.
11520 This name is used to visually distinguish one filter from another,
11521 so it can neither be <tt>null</tt> nor an empty string.
11522 </desc>
11523 </attribute>
11524
11525 <attribute name="active" type="boolean">
11526 <desc>Whether this filter active or has been temporarily disabled.</desc>
11527 </attribute>
11528
11529 <attribute name="vendorId" type="wstring">
11530 <desc>
11531 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11532 The string representation for the <i>exact matching</i>
11533 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11534 (including leading zeroes).
11535 </desc>
11536 </attribute>
11537
11538 <attribute name="productId" type="wstring">
11539 <desc>
11540 <link to="IUSBDevice::productId">Product ID</link> filter.
11541 The string representation for the <i>exact matching</i>
11542 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11543 (including leading zeroes).
11544 </desc>
11545 </attribute>
11546
11547 <attribute name="revision" type="wstring">
11548 <desc>
11549 <link to="IUSBDevice::productId">Product revision number</link>
11550 filter. The string representation for the <i>exact matching</i>
11551 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11552 of the integer part of the revision, and <tt>F</tt> is the
11553 decimal digit of its fractional part (including leading and
11554 trailing zeros).
11555 Note that for interval filters, it's best to use the hexadecimal
11556 form, because the revision is stored as a 16 bit packed BCD value;
11557 so the expression <tt>int:0x0100-0x0199</tt> will match any
11558 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11559 </desc>
11560 </attribute>
11561
11562 <attribute name="manufacturer" type="wstring">
11563 <desc>
11564 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11565 </desc>
11566 </attribute>
11567
11568 <attribute name="product" type="wstring">
11569 <desc>
11570 <link to="IUSBDevice::product">Product</link> filter.
11571 </desc>
11572 </attribute>
11573
11574 <attribute name="serialNumber" type="wstring">
11575 <desc>
11576 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11577 </desc>
11578 </attribute>
11579
11580 <attribute name="port" type="wstring">
11581 <desc>
11582 <link to="IUSBDevice::port">Host USB port</link> filter.
11583 </desc>
11584 </attribute>
11585
11586 <attribute name="remote" type="wstring">
11587 <desc>
11588 <link to="IUSBDevice::remote">Remote state</link> filter.
11589 <note>
11590 This filter makes sense only for machine USB filters,
11591 i.e. it is ignored by IHostUSBDeviceFilter objects.
11592 </note>
11593 </desc>
11594 </attribute>
11595
11596 <attribute name="maskedInterfaces" type="unsigned long">
11597 <desc>
11598 This is an advanced option for hiding one or more USB interfaces
11599 from the guest. The value is a bit mask where the bits that are set
11600 means the corresponding USB interface should be hidden, masked off
11601 if you like.
11602 This feature only works on Linux hosts.
11603 </desc>
11604 </attribute>
11605
11606 </interface>
11607
11608
11609 <!--
11610 // IHostUSBDevice
11611 /////////////////////////////////////////////////////////////////////////
11612 -->
11613
11614 <enum
11615 name="USBDeviceState"
11616 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11617 >
11618 <desc>
11619 USB device state. This enumeration represents all possible states
11620 of the USB device physically attached to the host computer regarding
11621 its state on the host computer and availability to guest computers
11622 (all currently running virtual machines).
11623
11624 Once a supported USB device is attached to the host, global USB
11625 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11626 either ignore the device, or put it to USBDeviceState_Held state, or do
11627 nothing. Unless the device is ignored by global filters, filters of all
11628 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11629 activated that can put it to USBDeviceState_Captured state.
11630
11631 If the device was ignored by global filters, or didn't match
11632 any filters at all (including guest ones), it is handled by the host
11633 in a normal way. In this case, the device state is determined by
11634 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11635 or USBDeviceState_Available, depending on the current device usage.
11636
11637 Besides auto-capturing based on filters, the device can be manually
11638 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11639 state is USBDeviceState_Busy, USBDeviceState_Available or
11640 USBDeviceState_Held.
11641
11642 <note>
11643 Due to differences in USB stack implementations in Linux and Win32,
11644 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11645 only to the Linux version of the product. This also means that (<link
11646 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11647 device state is USBDeviceState_Held.
11648 </note>
11649
11650 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11651 </desc>
11652
11653 <const name="NotSupported" value="0">
11654 <desc>
11655 Not supported by the VirtualBox server, not available to guests.
11656 </desc>
11657 </const>
11658 <const name="Unavailable" value="1">
11659 <desc>
11660 Being used by the host computer exclusively,
11661 not available to guests.
11662 </desc>
11663 </const>
11664 <const name="Busy" value="2">
11665 <desc>
11666 Being used by the host computer, potentially available to guests.
11667 </desc>
11668 </const>
11669 <const name="Available" value="3">
11670 <desc>
11671 Not used by the host computer, available to guests (the host computer
11672 can also start using the device at any time).
11673 </desc>
11674 </const>
11675 <const name="Held" value="4">
11676 <desc>
11677 Held by the VirtualBox server (ignored by the host computer),
11678 available to guests.
11679 </desc>
11680 </const>
11681 <const name="Captured" value="5">
11682 <desc>
11683 Captured by one of the guest computers, not available
11684 to anybody else.
11685 </desc>
11686 </const>
11687 </enum>
11688
11689 <interface
11690 name="IHostUSBDevice" extends="IUSBDevice"
11691 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11692 wsmap="managed"
11693 >
11694 <desc>
11695 The IHostUSBDevice interface represents a physical USB device attached
11696 to the host computer.
11697
11698 Besides properties inherited from IUSBDevice, this interface adds the
11699 <link to="#state"/> property that holds the current state of the USB
11700 device.
11701
11702 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11703 </desc>
11704
11705 <attribute name="state" type="USBDeviceState" readonly="yes">
11706 <desc>
11707 Current state of the device.
11708 </desc>
11709 </attribute>
11710
11711 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11712
11713 </interface>
11714
11715
11716 <!--
11717 // IHostUSBDeviceFilter
11718 /////////////////////////////////////////////////////////////////////////
11719 -->
11720
11721 <enum
11722 name="USBDeviceFilterAction"
11723 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11724 >
11725 <desc>
11726 Actions for host USB device filters.
11727 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11728 </desc>
11729
11730 <const name="Null" value="0">
11731 <desc>Null value (never used by the API).</desc>
11732 </const>
11733 <const name="Ignore" value="1">
11734 <desc>Ignore the matched USB device.</desc>
11735 </const>
11736 <const name="Hold" value="2">
11737 <desc>Hold the matched USB device.</desc>
11738 </const>
11739 </enum>
11740
11741 <interface
11742 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11743 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11744 wsmap="managed"
11745 >
11746 <desc>
11747 The IHostUSBDeviceFilter interface represents a global filter for a
11748 physical USB device used by the host computer. Used indirectly in
11749 <link to="IHost::USBDeviceFilters"/>.
11750
11751 Using filters of this type, the host computer determines the initial
11752 state of the USB device after it is physically attached to the
11753 host's USB controller.
11754
11755 <note>
11756 The <link to="#remote"/> attribute is ignored by this type of
11757 filters, because it makes sense only for
11758 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11759 </note>
11760
11761 <see>IHost::USBDeviceFilters</see>
11762 </desc>
11763
11764 <attribute name="action" type="USBDeviceFilterAction">
11765 <desc>
11766 Action performed by the host when an attached USB device
11767 matches this filter.
11768 </desc>
11769 </attribute>
11770
11771 </interface>
11772
11773 <!--
11774 // IAudioAdapter
11775 /////////////////////////////////////////////////////////////////////////
11776 -->
11777
11778 <enum
11779 name="AudioDriverType"
11780 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11781 >
11782 <desc>
11783 Host audio driver type.
11784 </desc>
11785
11786 <const name="Null" value="0">
11787 <desc>Null value, also means "dummy audio driver".</desc>
11788 </const>
11789 <const name="WinMM" value="1"/>
11790 <const name="OSS" value="2"/>
11791 <const name="ALSA" value="3"/>
11792 <const name="DirectSound" value="4"/>
11793 <const name="CoreAudio" value="5"/>
11794 <const name="MMPM" value="6"/>
11795 <const name="Pulse" value="7"/>
11796 <const name="SolAudio" value="8"/>
11797 </enum>
11798
11799 <enum
11800 name="AudioControllerType"
11801 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11802 >
11803 <desc>
11804 Virtual audio controller type.
11805 </desc>
11806
11807 <const name="AC97" value="0"/>
11808 <const name="SB16" value="1"/>
11809 </enum>
11810
11811 <interface
11812 name="IAudioAdapter" extends="$unknown"
11813 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11814 wsmap="managed"
11815 >
11816 <desc>
11817 The IAudioAdapter interface represents the virtual audio adapter of
11818 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11819 </desc>
11820 <attribute name="enabled" type="boolean">
11821 <desc>
11822 Flag whether the audio adapter is present in the
11823 guest system. If disabled, the virtual guest hardware will
11824 not contain any audio adapter. Can only be changed when
11825 the VM is not running.
11826 </desc>
11827 </attribute>
11828 <attribute name="audioController" type="AudioControllerType">
11829 <desc>
11830 The audio hardware we emulate.
11831 </desc>
11832 </attribute>
11833 <attribute name="audioDriver" type="AudioDriverType">
11834 <desc>
11835 Audio driver the adapter is connected to. This setting
11836 can only be changed when the VM is not running.
11837 </desc>
11838 </attribute>
11839 </interface>
11840
11841 <!--
11842 // IVRDPServer
11843 /////////////////////////////////////////////////////////////////////////
11844 -->
11845
11846 <enum
11847 name="VRDPAuthType"
11848 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11849 >
11850 <desc>
11851 VRDP authentication type.
11852 </desc>
11853
11854 <const name="Null" value="0">
11855 <desc>Null value, also means "no authentication".</desc>
11856 </const>
11857 <const name="External" value="1"/>
11858 <const name="Guest" value="2"/>
11859 </enum>
11860
11861 <interface
11862 name="IVRDPServer" extends="$unknown"
11863 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
11864 wsmap="managed"
11865 >
11866 <attribute name="enabled" type="boolean">
11867 <desc>VRDP server status.</desc>
11868 </attribute>
11869
11870 <attribute name="port" type="unsigned long">
11871 <desc>
11872 VRDP server port number.
11873 <note>
11874 Setting the value of this property to <tt>0</tt> will reset the port
11875 number to the default value which is
11876 currently <tt>3389</tt>. Reading this property will always return a
11877 real port number, even after it has been set to <tt>0</tt> (in which
11878 case the default port is returned).
11879 </note>
11880 </desc>
11881 </attribute>
11882
11883 <attribute name="netAddress" type="wstring">
11884 <desc>VRDP server address.</desc>
11885 </attribute>
11886
11887 <attribute name="authType" type="VRDPAuthType">
11888 <desc>VRDP authentication method.</desc>
11889 </attribute>
11890
11891 <attribute name="authTimeout" type="unsigned long">
11892 <desc>Timeout for guest authentication. Milliseconds.</desc>
11893 </attribute>
11894
11895 <attribute name="allowMultiConnection" type="boolean">
11896 <desc>
11897 Flag whether multiple simultaneous connections to the VM are permitted.
11898 Note that this will be replaced by a more powerful mechanism in the future.
11899 </desc>
11900 </attribute>
11901
11902 <attribute name="reuseSingleConnection" type="boolean">
11903 <desc>
11904 Flag whether the existing connection must be dropped and a new connection
11905 must be established by the VRDP server, when a new client connects in single
11906 connection mode.
11907 </desc>
11908 </attribute>
11909
11910 </interface>
11911
11912
11913 <!--
11914 // ISharedFolder
11915 /////////////////////////////////////////////////////////////////////////
11916 -->
11917
11918 <interface
11919 name="ISharedFolder" extends="$unknown"
11920 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11921 wsmap="struct"
11922 >
11923 <desc>
11924 The ISharedFolder interface represents a folder in the host computer's
11925 file system accessible from the guest OS running inside a virtual
11926 machine using an associated logical name.
11927
11928 There are three types of shared folders:
11929 <ul>
11930 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11931 folders available to all virtual machines.</li>
11932 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11933 VM-specific shared folders available to the given virtual machine at
11934 startup.</li>
11935 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11936 VM-specific shared folders created in the session context (for
11937 example, when the virtual machine is running) and automatically
11938 discarded when the session is closed (the VM is powered off).</li>
11939 </ul>
11940
11941 Logical names of shared folders must be unique within the given scope
11942 (global, permanent or transient). However, they do not need to be unique
11943 across scopes. In this case, the definition of the shared folder in a
11944 more specific scope takes precedence over definitions in all other
11945 scopes. The order of precedence is (more specific to more general):
11946 <ol>
11947 <li>Transient definitions</li>
11948 <li>Permanent definitions</li>
11949 <li>Global definitions</li>
11950 </ol>
11951
11952 For example, if MyMachine has a shared folder named
11953 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11954 transient shared folder named <tt>C_DRIVE</tt> (that points
11955 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11956 of <tt>C_DRIVE</tt> in the guest OS so
11957 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11958 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11959 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11960 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11961 to <tt>C:\\</tt> if it still exists.
11962
11963 Note that permanent and transient shared folders of different machines
11964 are in different name spaces, so they don't overlap and don't need to
11965 have unique logical names.
11966
11967 <note>
11968 Global shared folders are not implemented in the current version of the
11969 product.
11970 </note>
11971 </desc>
11972
11973 <attribute name="name" type="wstring" readonly="yes">
11974 <desc>Logical name of the shared folder.</desc>
11975 </attribute>
11976
11977 <attribute name="hostPath" type="wstring" readonly="yes">
11978 <desc>Full path to the shared folder in the host file system.</desc>
11979 </attribute>
11980
11981 <attribute name="accessible" type="boolean" readonly="yes">
11982 <desc>
11983 Whether the folder defined by the host path is currently
11984 accessible or not.
11985 For example, the folder can be unaccessible if it is placed
11986 on the network share that is not available by the time
11987 this property is read.
11988 </desc>
11989 </attribute>
11990
11991 <attribute name="writable" type="boolean" readonly="yes">
11992 <desc>
11993 Whether the folder defined by the host path is writable or
11994 not.
11995 </desc>
11996 </attribute>
11997
11998 <attribute name="lastAccessError" type="wstring" readonly="yes">
11999 <desc>
12000 Text message that represents the result of the last accessibility
12001 check.
12002
12003 Accessibility checks are performed each time the <link to="#accessible"/>
12004 attribute is read. A @c null string is returned if the last
12005 accessibility check was successful. A non-null string indicates a
12006 failure and should normally describe a reason of the failure (for
12007 example, a file read error).
12008 </desc>
12009 </attribute>
12010
12011 </interface>
12012
12013 <!--
12014 // ISession
12015 /////////////////////////////////////////////////////////////////////////
12016 -->
12017
12018 <interface
12019 name="IInternalSessionControl" extends="$unknown"
12020 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
12021 internal="yes"
12022 wsmap="suppress"
12023 >
12024 <method name="getPID">
12025 <desc>PID of the process that has created this Session object.
12026 </desc>
12027 <param name="pid" type="unsigned long" dir="return"/>
12028 </method>
12029
12030 <method name="getRemoteConsole">
12031 <desc>
12032 Returns the console object suitable for remote control.
12033
12034 <result name="VBOX_E_INVALID_VM_STATE">
12035 Session state prevents operation.
12036 </result>
12037 <result name="VBOX_E_INVALID_OBJECT_STATE">
12038 Session type prevents operation.
12039 </result>
12040
12041 </desc>
12042 <param name="console" type="IConsole" dir="return"/>
12043 </method>
12044
12045 <method name="assignMachine">
12046 <desc>
12047 Assigns the machine object associated with this direct-type
12048 session or informs the session that it will be a remote one
12049 (if @a machine == NULL).
12050
12051 <result name="VBOX_E_INVALID_VM_STATE">
12052 Session state prevents operation.
12053 </result>
12054 <result name="VBOX_E_INVALID_OBJECT_STATE">
12055 Session type prevents operation.
12056 </result>
12057
12058 </desc>
12059 <param name="machine" type="IMachine" dir="in"/>
12060 </method>
12061
12062 <method name="assignRemoteMachine">
12063 <desc>
12064 Assigns the machine and the (remote) console object associated with
12065 this remote-type session.
12066
12067 <result name="VBOX_E_INVALID_VM_STATE">
12068 Session state prevents operation.
12069 </result>
12070
12071 </desc>
12072 <param name="machine" type="IMachine" dir="in"/>
12073 <param name="console" type="IConsole" dir="in"/>
12074 </method>
12075
12076 <method name="updateMachineState">
12077 <desc>
12078 Updates the machine state in the VM process.
12079 Must be called only in certain cases
12080 (see the method implementation).
12081
12082 <result name="VBOX_E_INVALID_VM_STATE">
12083 Session state prevents operation.
12084 </result>
12085 <result name="VBOX_E_INVALID_OBJECT_STATE">
12086 Session type prevents operation.
12087 </result>
12088
12089 </desc>
12090 <param name="aMachineState" type="MachineState" dir="in"/>
12091 </method>
12092
12093 <method name="uninitialize">
12094 <desc>
12095 Uninitializes (closes) this session. Used by VirtualBox to close
12096 the corresponding remote session when the direct session dies
12097 or gets closed.
12098
12099 <result name="VBOX_E_INVALID_VM_STATE">
12100 Session state prevents operation.
12101 </result>
12102
12103 </desc>
12104 </method>
12105
12106 <method name="onDVDDriveChange">
12107 <desc>
12108 Triggered when settings of the DVD drive object of the
12109 associated virtual machine have changed.
12110
12111 <result name="VBOX_E_INVALID_VM_STATE">
12112 Session state prevents operation.
12113 </result>
12114 <result name="VBOX_E_INVALID_OBJECT_STATE">
12115 Session type prevents operation.
12116 </result>
12117
12118 </desc>
12119 </method>
12120
12121 <method name="onFloppyDriveChange">
12122 <desc>
12123 Triggered when settings of the floppy drive object of the
12124 associated virtual machine have changed.
12125
12126 <result name="VBOX_E_INVALID_VM_STATE">
12127 Session state prevents operation.
12128 </result>
12129 <result name="VBOX_E_INVALID_OBJECT_STATE">
12130 Session type prevents operation.
12131 </result>
12132
12133 </desc>
12134 </method>
12135
12136 <method name="onNetworkAdapterChange">
12137 <desc>
12138 Triggered when settings of a network adapter of the
12139 associated virtual machine have changed.
12140
12141 <result name="VBOX_E_INVALID_VM_STATE">
12142 Session state prevents operation.
12143 </result>
12144 <result name="VBOX_E_INVALID_OBJECT_STATE">
12145 Session type prevents operation.
12146 </result>
12147
12148 </desc>
12149 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12150 </method>
12151
12152 <method name="onSerialPortChange">
12153 <desc>
12154 Triggered when settings of a serial port of the
12155 associated virtual machine have changed.
12156
12157 <result name="VBOX_E_INVALID_VM_STATE">
12158 Session state prevents operation.
12159 </result>
12160 <result name="VBOX_E_INVALID_OBJECT_STATE">
12161 Session type prevents operation.
12162 </result>
12163
12164 </desc>
12165 <param name="serialPort" type="ISerialPort" dir="in"/>
12166 </method>
12167
12168 <method name="onParallelPortChange">
12169 <desc>
12170 Triggered when settings of a parallel port of the
12171 associated virtual machine have changed.
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="parallelPort" type="IParallelPort" dir="in"/>
12182 </method>
12183
12184 <method name="onStorageControllerChange">
12185 <desc>
12186 Triggered when settings of a storage controller of the
12187 associated virtual machine have changed.
12188
12189 <result name="VBOX_E_INVALID_VM_STATE">
12190 Session state prevents operation.
12191 </result>
12192 <result name="VBOX_E_INVALID_OBJECT_STATE">
12193 Session type prevents operation.
12194 </result>
12195
12196 </desc>
12197 </method>
12198
12199 <method name="onVRDPServerChange">
12200 <desc>
12201 Triggered when settings of the VRDP server object of the
12202 associated virtual machine have changed.
12203
12204 <result name="VBOX_E_INVALID_VM_STATE">
12205 Session state prevents operation.
12206 </result>
12207 <result name="VBOX_E_INVALID_OBJECT_STATE">
12208 Session type prevents operation.
12209 </result>
12210
12211 </desc>
12212 </method>
12213
12214 <method name="onUSBControllerChange">
12215 <desc>
12216 Triggered when settings of the USB controller object of the
12217 associated virtual machine have changed.
12218
12219 <result name="VBOX_E_INVALID_VM_STATE">
12220 Session state prevents operation.
12221 </result>
12222 <result name="VBOX_E_INVALID_OBJECT_STATE">
12223 Session type prevents operation.
12224 </result>
12225
12226 </desc>
12227 </method>
12228
12229 <method name="onSharedFolderChange">
12230 <desc>
12231 Triggered when a permanent (global or machine) shared folder has been
12232 created or removed.
12233 <note>
12234 We don't pass shared folder parameters in this notification because
12235 the order in which parallel notifications are delivered is not defined,
12236 therefore it could happen that these parameters were outdated by the
12237 time of processing this notification.
12238 </note>
12239
12240 <result name="VBOX_E_INVALID_VM_STATE">
12241 Session state prevents operation.
12242 </result>
12243 <result name="VBOX_E_INVALID_OBJECT_STATE">
12244 Session type prevents operation.
12245 </result>
12246
12247 </desc>
12248 <param name="global" type="boolean" dir="in"/>
12249 </method>
12250
12251 <method name="onUSBDeviceAttach">
12252 <desc>
12253 Triggered when a request to capture a USB device (as a result
12254 of matched USB filters or direct call to
12255 <link to="IConsole::attachUSBDevice"/>) has completed.
12256 A @c null @a error object means success, otherwise it
12257 describes a failure.
12258
12259 <result name="VBOX_E_INVALID_VM_STATE">
12260 Session state prevents operation.
12261 </result>
12262 <result name="VBOX_E_INVALID_OBJECT_STATE">
12263 Session type prevents operation.
12264 </result>
12265
12266 </desc>
12267 <param name="device" type="IUSBDevice" dir="in"/>
12268 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12269 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12270 </method>
12271
12272 <method name="onUSBDeviceDetach">
12273 <desc>
12274 Triggered when a request to release the USB device (as a result
12275 of machine termination or direct call to
12276 <link to="IConsole::detachUSBDevice"/>) has completed.
12277 A @c null @a error object means success, otherwise it
12278
12279 <result name="VBOX_E_INVALID_VM_STATE">
12280 Session state prevents operation.
12281 </result>
12282 <result name="VBOX_E_INVALID_OBJECT_STATE">
12283 Session type prevents operation.
12284 </result>
12285
12286 </desc>
12287 <param name="id" type="uuid" dir="in"/>
12288 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12289 </method>
12290
12291 <method name="onShowWindow">
12292 <desc>
12293 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12294 <link to="IMachine::showConsoleWindow"/> in order to notify
12295 console callbacks
12296 <link to="IConsoleCallback::onCanShowWindow"/>
12297 and <link to="IConsoleCallback::onShowWindow"/>.
12298
12299 <result name="VBOX_E_INVALID_OBJECT_STATE">
12300 Session type prevents operation.
12301 </result>
12302
12303 </desc>
12304 <param name="check" type="boolean" dir="in"/>
12305 <param name="canShow" type="boolean" dir="out"/>
12306 <param name="winId" type="unsigned long long" dir="out"/>
12307 </method>
12308
12309 <method name="accessGuestProperty">
12310 <desc>
12311 Called by <link to="IMachine::getGuestProperty"/> and by
12312 <link to="IMachine::setGuestProperty"/> in order to read and
12313 modify guest properties.
12314
12315 <result name="VBOX_E_INVALID_VM_STATE">
12316 Machine session is not open.
12317 </result>
12318 <result name="VBOX_E_INVALID_OBJECT_STATE">
12319 Session type is not direct.
12320 </result>
12321
12322 </desc>
12323 <param name="name" type="wstring" dir="in"/>
12324 <param name="value" type="wstring" dir="in"/>
12325 <param name="flags" type="wstring" dir="in"/>
12326 <param name="isSetter" type="boolean" dir="in"/>
12327 <param name="retValue" type="wstring" dir="out"/>
12328 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12329 <param name="retFlags" type="wstring" dir="out"/>
12330 </method>
12331
12332 <method name="enumerateGuestProperties">
12333 <desc>
12334 Return a list of the guest properties matching a set of patterns along
12335 with their values, time stamps and flags.
12336
12337 <result name="VBOX_E_INVALID_VM_STATE">
12338 Machine session is not open.
12339 </result>
12340 <result name="VBOX_E_INVALID_OBJECT_STATE">
12341 Session type is not direct.
12342 </result>
12343
12344 </desc>
12345 <param name="patterns" type="wstring" dir="in">
12346 <desc>
12347 The patterns to match the properties against as a comma-separated
12348 string. If this is empty, all properties currently set will be
12349 returned.
12350 </desc>
12351 </param>
12352 <param name="key" type="wstring" dir="out" safearray="yes">
12353 <desc>
12354 The key names of the properties returned.
12355 </desc>
12356 </param>
12357 <param name="value" type="wstring" dir="out" safearray="yes">
12358 <desc>
12359 The values of the properties returned. The array entries match the
12360 corresponding entries in the @a key array.
12361 </desc>
12362 </param>
12363 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12364 <desc>
12365 The time stamps of the properties returned. The array entries match
12366 the corresponding entries in the @a key array.
12367 </desc>
12368 </param>
12369 <param name="flags" type="wstring" dir="out" safearray="yes">
12370 <desc>
12371 The flags of the properties returned. The array entries match the
12372 corresponding entries in the @a key array.
12373 </desc>
12374 </param>
12375 </method>
12376
12377 </interface>
12378
12379 <interface
12380 name="ISession" extends="$dispatched"
12381 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12382 wsmap="managed"
12383 >
12384 <desc>
12385 The ISession interface represents a serialization primitive for virtual
12386 machines.
12387
12388 With VirtualBox, every time one wishes to manipulate a virtual machine
12389 (e.g. change its settings or start execution), a session object is
12390 required. Such an object must be passed to one of the session methods
12391 that open the given session, which then initiates the machine manipulation.
12392
12393 A session serves several purposes: it identifies to the inter-process VirtualBox
12394 code which process is currently working with the virtual machine, and it ensures
12395 that there are no incompatible requests from several processes for the
12396 same virtual machine. Session objects can therefore be thought of as mutex
12397 semaphores that lock virtual machines to prevent conflicting accesses from
12398 several processes.
12399
12400 How sessions objects are used depends on whether you use the Main API
12401 via COM or via the webservice:
12402
12403 <ul>
12404 <li>When using the COM API directly, an object of the Session class from the
12405 VirtualBox type library needs to be created. In regular COM C++ client code,
12406 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12407 This object will then act as a local session object in further calls to open
12408 a session.
12409 </li>
12410
12411 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12412 one session object automatically when <link to="IWebsessionManager::logon" />
12413 is called. A managed object reference to that session object can be retrieved by
12414 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12415 reference can then be used to open sessions.
12416 </li>
12417 </ul>
12418
12419 Sessions are mainly used in two variations:
12420
12421 <ul>
12422 <li>
12423 To start a virtual machine in a separate process, one would call
12424 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12425 object as its first parameter. This session then identifies the caller
12426 and lets him control the started machine (for example, pause machine
12427 execution or power it down) as well as be notified about machine
12428 execution state changes.
12429 </li>
12430
12431 <li>To alter machine settings, or to start machine execution within the
12432 current process, one needs to open a direct session for the machine first by
12433 calling <link to="IVirtualBox::openSession"/>. While a direct session
12434 is open within one process, no any other process may open another direct
12435 session for the same machine. This prevents the machine from being changed
12436 by other processes while it is running or while the machine is being configured.
12437 </li>
12438 </ul>
12439
12440 One also can attach to an existing direct session already opened by
12441 another process (for example, in order to send a control request to the
12442 virtual machine such as the pause or the reset request). This is done by
12443 calling <link to="IVirtualBox::openExistingSession"/>.
12444
12445 <note>
12446 Unless you are trying to write a new VirtualBox front-end that
12447 performs direct machine execution (like the VirtualBox or VBoxSDL
12448 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12449 session opened by <link to="IVirtualBox::openSession"/> and use this
12450 session only to change virtual machine settings. If you simply want to
12451 start virtual machine execution using one of the existing front-ends
12452 (for example the VirtualBox GUI or headless server), simply use
12453 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12454 will power up the machine automatically for you.
12455 </note>
12456 </desc>
12457
12458 <attribute name="state" type="SessionState" readonly="yes">
12459 <desc>Current state of this session.</desc>
12460 </attribute>
12461
12462 <attribute name="type" type="SessionType" readonly="yes">
12463 <desc>
12464 Type of this session. The value of this attribute is valid only
12465 if the session is currently open (i.e. its #state is
12466 SessionType_SessionOpen), otherwise an error will be returned.
12467 </desc>
12468 </attribute>
12469
12470 <attribute name="machine" type="IMachine" readonly="yes">
12471 <desc>Machine object associated with this session.</desc>
12472 </attribute>
12473
12474 <attribute name="console" type="IConsole" readonly="yes">
12475 <desc>Console object associated with this session.</desc>
12476 </attribute>
12477
12478 <method name="close">
12479 <desc>
12480 Closes a session that was previously opened.
12481
12482 It is recommended that every time an "open session" method (such as
12483 <link to="IVirtualBox::openRemoteSession" /> or
12484 <link to="IVirtualBox::openSession" />) has been called to
12485 manipulate a virtual machine, the caller invoke
12486 ISession::close() when it's done doing so. Since sessions are
12487 serialization primitives much like ordinary mutexes, they are
12488 best used the same way: for each "open" call, there should be
12489 a matching "close" call, even when errors occur.
12490
12491 Otherwise, if a direct session for a machine opened with
12492 <link to="IVirtualBox::openSession"/> is not explicitly closed
12493 when the application terminates, the state of the machine will
12494 be set to <link to="MachineState_Aborted" /> on the server.
12495
12496 Generally, it is recommended to close all open sessions explicitly
12497 before terminating the application (regardless of the reason for
12498 the termination).
12499
12500 <note>
12501 Do not expect the session state (<link to="ISession::state" />
12502 to return to "Closed" immediately after you invoke
12503 ISession::close(), particularly if you have started a remote
12504 session to execute the VM in a new process. The session state will
12505 automatically return to "Closed" once the VM is no longer executing,
12506 which can of course take a very long time.
12507 </note>
12508
12509 <result name="E_UNEXPECTED">
12510 Session is not open.
12511 </result>
12512
12513 </desc>
12514 </method>
12515
12516 </interface>
12517
12518 <!--
12519 // IStorageController
12520 /////////////////////////////////////////////////////////////////////////
12521 -->
12522
12523 <enum
12524 name="StorageBus"
12525 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12526 >
12527 <desc>
12528 The connection type of the storage controller.
12529 </desc>
12530 <const name="Null" value="0">
12531 <desc><tt>null</tt> value. Never used by the API.</desc>
12532 </const>
12533 <const name="IDE" value="1"/>
12534 <const name="SATA" value="2"/>
12535 <const name="SCSI" value="3"/>
12536 </enum>
12537
12538 <enum
12539 name="StorageControllerType"
12540 uuid="685387db-a837-4320-a258-08f46a22f62a"
12541 >
12542 <desc>
12543 Storage controller type.
12544 </desc>
12545
12546 <const name="Null" value="0">
12547 <desc><tt>null</tt> value. Never used by the API.</desc>
12548 </const>
12549 <const name="LsiLogic" value="1"/>
12550 <const name="BusLogic" value="2"/>
12551 <const name="IntelAhci" value="3"/>
12552 <const name="PIIX3" value="4"/>
12553 <const name="PIIX4" value="5"/>
12554 <const name="ICH6" value="6"/>
12555 </enum>
12556
12557 <interface
12558 name="IStorageController" extends="$unknown"
12559 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12560 wsmap="managed"
12561 >
12562 <desc>
12563 Represents a storage controller that is attached to a virtual machine
12564 (<link to="IMachine" />). Just as hard disks are attached to storage
12565 controllers in a real computer, virtual hard disks (represented by
12566 <link to="IHardDisk" />) are attached to virtual storage controllers,
12567 represented by this interface.
12568
12569 VirtualBox supports three types of virtual storage controller hardware:
12570 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12571 these three is used, certain sub-types are available and can be
12572 selected in <link to="#controllerType" />.
12573 </desc>
12574
12575 <attribute name="name" type="wstring" readonly="yes">
12576 <desc>
12577 Name of the storage controller, as originally specified with
12578 <link to="IMachine::addStorageController" />. This then uniquely
12579 identifies this controller with other method calls such as
12580 <link to="IMachine::attachHardDisk" />.
12581 </desc>
12582 </attribute>
12583
12584 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12585 <desc>
12586 Maximum number of devices which can be attached to one port.
12587 </desc>
12588 </attribute>
12589
12590 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12591 <desc>
12592 Minimum number of ports which can be set with
12593 <link to="IStorageController::SetPortCount"/>.
12594 </desc>
12595 </attribute>
12596
12597 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12598 <desc>
12599 Maximum number of ports which can be set with
12600 <link to="IStorageController::SetPortCount"/>.
12601 </desc>
12602 </attribute>
12603
12604 <attribute name="instance" type="unsigned long">
12605 <desc>
12606 The instance number of the device in the running VM.
12607 </desc>
12608 </attribute>
12609
12610 <attribute name="portCount" type="unsigned long">
12611 <desc>
12612 The number of currently usable ports on the controller.
12613 The minimum and maximum number of ports for one controller type can
12614 be determined with <link to="IStorageController::GetMinPortCount"/>
12615 and <link to="IStorageController::GetMaxPortCount"/>..
12616 </desc>
12617 </attribute>
12618
12619 <attribute name="bus" type="StorageBus" readonly="yes">
12620 <desc>
12621 The connection type of the storage controller.
12622 </desc>
12623 </attribute>
12624
12625 <attribute name="controllerType" type="StorageControllerType">
12626 <desc>
12627 Type of the virtual storage controller. Depending on this value,
12628 VirtualBox will provide a different virtual storage controller hardware
12629 to the guest.
12630
12631 For SCSI controllers, the default type is LsiLogic.
12632 </desc>
12633 </attribute>
12634
12635 <method name="GetIDEEmulationPort">
12636 <desc>
12637 Gets the corresponding port number which is emulated as an IDE device.
12638
12639 <result name="E_INVALIDARG">
12640 The @a devicePosition is not in the range 0 to 3.
12641 </result>
12642 <result name="E_NOTIMPL">
12643 The storage controller type is not SATAIntelAhci.
12644 </result>
12645
12646 </desc>
12647 <param name="devicePosition" type="long" dir="in"/>
12648 <param name="portNumber" type="long" dir="return"/>
12649 </method>
12650
12651 <method name="SetIDEEmulationPort">
12652 <desc>
12653 Sets the port number which is emulated as an IDE device.
12654
12655 <result name="E_INVALIDARG">
12656 The @a devicePosition is not in the range 0 to 3 or the
12657 @a portNumber is not in the range 0 to 29.
12658 </result>
12659 <result name="E_NOTIMPL">
12660 The storage controller type is not SATAIntelAhci.
12661 </result>
12662
12663 </desc>
12664 <param name="devicePosition" type="long" dir="in"/>
12665 <param name="portNumber" type="long" dir="in"/>
12666 </method>
12667
12668 </interface>
12669
12670<if target="wsdl">
12671
12672 <!--
12673 // IManagedObjectRef
12674 /////////////////////////////////////////////////////////////////////////
12675 -->
12676
12677 <interface
12678 name="IManagedObjectRef" extends="$unknown"
12679 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12680 internal="yes"
12681 wsmap="managed"
12682 wscpp="hardcoded"
12683 >
12684 <desc>
12685 Managed object reference.
12686
12687 Only within the webservice, a managed object reference (which is really
12688 an opaque number) allows a webservice client to address an object
12689 that lives in the address space of the webservice server.
12690
12691 Behind each managed object reference, there is a COM object that lives
12692 in the webservice server's address space. The COM object is not freed
12693 until the managed object reference is released, either by an explicit
12694 call to <link to="IManagedObjectRef::release" /> or by logging off from
12695 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12696 all objects created during the webservice session.
12697
12698 Whenever a method call of the VirtualBox API returns a COM object, the
12699 webservice representation of that method will instead return a
12700 managed object reference, which can then be used to invoke methods
12701 on that object.
12702 </desc>
12703
12704 <method name="getInterfaceName">
12705 <desc>
12706 Returns the name of the interface that this managed object represents,
12707 for example, "IMachine", as a string.
12708 </desc>
12709 <param name="return" type="wstring" dir="return"/>
12710 </method>
12711
12712 <method name="release">
12713 <desc>
12714 Releases this managed object reference and frees the resources that
12715 were allocated for it in the webservice server process. After calling
12716 this method, the identifier of the reference can no longer be used.
12717 </desc>
12718 </method>
12719
12720 </interface>
12721
12722 <!--
12723 // IWebsessionManager
12724 /////////////////////////////////////////////////////////////////////////
12725 -->
12726
12727 <interface
12728 name="IWebsessionManager" extends="$unknown"
12729 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12730 internal="yes"
12731 wsmap="global"
12732 wscpp="hardcoded"
12733 >
12734 <desc>
12735 Websession manager. This provides essential services
12736 to webservice clients.
12737 </desc>
12738 <method name="logon">
12739 <desc>
12740 Logs a new client onto the webservice and returns a managed object reference to
12741 the IVirtualBox instance, which the client can then use as a basis to further
12742 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12743 interface, in one way or the other.
12744 </desc>
12745 <param name="username" type="wstring" dir="in"/>
12746 <param name="password" type="wstring" dir="in"/>
12747 <param name="return" type="IVirtualBox" dir="return"/>
12748 </method>
12749
12750 <method name="getSessionObject">
12751 <desc>
12752 Returns a managed object reference to the internal ISession object that was created
12753 for this web service session when the client logged on.
12754
12755 <see>ISession</see>
12756 </desc>
12757 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12758 <param name="return" type="ISession" dir="return"/>
12759 </method>
12760
12761 <method name="logoff">
12762 <desc>
12763 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12764 and destroys all resources associated with the session (most importantly, all
12765 managed objects created in the server while the session was active).
12766 </desc>
12767 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12768 </method>
12769
12770 </interface>
12771
12772</if>
12773
12774 <!--
12775 // IPerformanceCollector & friends
12776 /////////////////////////////////////////////////////////////////////////
12777 -->
12778
12779 <interface
12780 name="IPerformanceMetric" extends="$unknown"
12781 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12782 >
12783 <desc>
12784 The IPerformanceMetric interface represents parameters of the given
12785 performance metric.
12786 </desc>
12787
12788 <attribute name="metricName" type="wstring" readonly="yes">
12789 <desc>
12790 Name of the metric.
12791 </desc>
12792 </attribute>
12793
12794 <attribute name="object" type="$unknown" readonly="yes">
12795 <desc>
12796 Object this metric belongs to.
12797 </desc>
12798 </attribute>
12799
12800 <attribute name="description" type="wstring" readonly="yes">
12801 <desc>
12802 Textual description of the metric.
12803 </desc>
12804 </attribute>
12805
12806 <attribute name="period" type="unsigned long" readonly="yes">
12807 <desc>
12808 Time interval between samples, measured in seconds.
12809 </desc>
12810 </attribute>
12811
12812 <attribute name="count" type="unsigned long" readonly="yes">
12813 <desc>
12814 Number of recent samples retained by the performance collector for this
12815 metric.
12816
12817 When the collected sample count exceeds this number, older samples
12818 are discarded.
12819 </desc>
12820 </attribute>
12821
12822 <attribute name="unit" type="wstring" readonly="yes">
12823 <desc>
12824 Unit of measurement.
12825 </desc>
12826 </attribute>
12827
12828 <attribute name="minimumValue" type="long" readonly="yes">
12829 <desc>
12830 Minimum possible value of this metric.
12831 </desc>
12832 </attribute>
12833
12834 <attribute name="maximumValue" type="long" readonly="yes">
12835 <desc>
12836 Maximum possible value of this metric.
12837 </desc>
12838 </attribute>
12839 </interface>
12840
12841 <interface
12842 name="IPerformanceCollector" extends="$unknown"
12843 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12844 wsmap="managed"
12845 >
12846 <desc>
12847 The IPerformanceCollector interface represents a service that collects and
12848 stores performance metrics data.
12849
12850 Performance metrics are associated with objects like IHost and
12851 IMachine. Each object has a distinct set of performance metrics.
12852 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12853
12854 Metric data are collected at the specified intervals and are retained
12855 internally. The interval and the number of samples retained can be set
12856 with <link to="IPerformanceCollector::setupMetrics" />.
12857
12858 Metrics are organized hierarchically, each level separated by slash (/).
12859 General scheme for metric name is
12860 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
12861 metric name stands for: CPU category, Load metric, User submetric, average
12862 aggregate. An aggregate function is computed over all retained data. Valid
12863 aggregate functions are:
12864
12865 <ul>
12866 <li>avg -- average</li>
12867 <li>min -- minimum</li>
12868 <li>max -- maximum</li>
12869 </ul>
12870
12871 "Category/Metric" together form base metric name. A base metric is the
12872 smallest unit for which a sampling interval and the number of retained
12873 samples can be set. Only base metrics can be enabled and disabled. All
12874 sub-metrics are collected when their base metric is collected.
12875 Collected values for any set of sub-metrics can be queried with
12876 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
12877 metric parameters, querying metric data, enabling or disabling metrics
12878 wildcards can be used in metric names to specify a subset of metrics. For
12879 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12880 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12881 values without aggregates <tt>*:</tt> can be used.
12882
12883 The valid names for base metrics are:
12884
12885 <ul>
12886 <li>CPU/Load</li>
12887 <li>CPU/MHz</li>
12888 <li>RAM/Usage</li>
12889 </ul>
12890
12891 The general sequence for collecting and retrieving the metrics is:
12892 <ul>
12893 <li>
12894 Obtain an instance of IPerformanceCollector with
12895 <link to="IVirtualBox::performanceCollector" />
12896 </li>
12897 <li>
12898 Allocate and populate an array with references to objects the metrics
12899 will be collected for. Use references to IHost and IMachine objects.
12900 </li>
12901 <li>
12902 Allocate and populate an array with base metric names the data will be
12903 collected for.
12904 </li>
12905 <li>
12906 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12907 metric data will be collected and stored.
12908 </li>
12909 <li>
12910 Wait for the data to get collected.
12911 </li>
12912 <li>
12913 Allocate and populate an array with references to objects the metric
12914 values will be queried for. You can re-use the object array used for
12915 setting base metrics.
12916 </li>
12917 <li>
12918 Allocate and populate an array with metric names the data will be
12919 collected for. Note that metric names differ from base metric names.
12920 </li>
12921 <li>
12922 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12923 have been collected so far are returned. Note that the values are still
12924 retained internally and data collection continues.
12925 </li>
12926 </ul>
12927
12928 For an example of usage refer to the following files in VirtualBox SDK:
12929 <ul>
12930 <li>
12931 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12932 </li>
12933 <li>
12934 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12935 </li>
12936 </ul>
12937 </desc>
12938
12939 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12940 <desc>
12941 Array of unique names of metrics.
12942
12943 This array represents all metrics supported by the performance
12944 collector. Individual objects do not necessarily support all of them.
12945 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12946 list of supported metrics for a particular object.
12947 </desc>
12948 </attribute>
12949
12950 <method name="getMetrics">
12951 <desc>
12952 Returns parameters of specified metrics for a set of objects.
12953 <note>
12954 @c Null metrics array means all metrics. @c Null object array means
12955 all existing objects.
12956 </note>
12957 </desc>
12958 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12959 <desc>
12960 Metric name filter. Currently, only a comma-separated list of metrics
12961 is supported.
12962 </desc>
12963 </param>
12964 <param name="objects" type="$unknown" dir="in" safearray="yes">
12965 <desc>
12966 Set of objects to return metric parameters for.
12967 </desc>
12968 </param>
12969 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12970 <desc>
12971 Array of returned metric parameters.
12972 </desc>
12973 </param>
12974 </method>
12975
12976 <method name="setupMetrics">
12977 <desc>
12978 Sets parameters of specified base metrics for a set of objects. Returns
12979 an array of <link to="IPerformanceMetric" /> describing the metrics have
12980 been affected.
12981 <note>
12982 @c Null or empty metric name array means all metrics. @c Null or empty
12983 object array means all existing objects. If metric name array contains
12984 a single element and object array contains many, the single metric
12985 name array element is applied to each object array element to form
12986 metric/object pairs.
12987 </note>
12988 </desc>
12989 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12990 <desc>
12991 Metric name filter. Comma-separated list of metrics with wildcard
12992 support.
12993 </desc>
12994 </param>
12995 <param name="objects" type="$unknown" dir="in" safearray="yes">
12996 <desc>
12997 Set of objects to setup metric parameters for.
12998 </desc>
12999 </param>
13000 <param name="period" type="unsigned long" dir="in">
13001 <desc>
13002 Time interval in seconds between two consecutive samples of performance
13003 data.
13004 </desc>
13005 </param>
13006 <param name="count" type="unsigned long" dir="in">
13007 <desc>
13008 Number of samples to retain in performance data history. Older samples
13009 get discarded.
13010 </desc>
13011 </param>
13012 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13013 <desc>
13014 Array of metrics that have been modified by the call to this method.
13015 </desc>
13016 </param>
13017 </method>
13018
13019 <method name="enableMetrics">
13020 <desc>
13021 Turns on collecting specified base metrics. Returns an array of
13022 <link to="IPerformanceMetric" /> describing the metrics have been
13023 affected.
13024 <note>
13025 @c Null or empty metric name array means all metrics. @c Null or empty
13026 object array means all existing objects. If metric name array contains
13027 a single element and object array contains many, the single metric
13028 name array element is applied to each object array element to form
13029 metric/object pairs.
13030 </note>
13031 </desc>
13032 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13033 <desc>
13034 Metric name filter. Comma-separated list of metrics with wildcard
13035 support.
13036 </desc>
13037 </param>
13038 <param name="objects" type="$unknown" dir="in" safearray="yes">
13039 <desc>
13040 Set of objects to enable metrics for.
13041 </desc>
13042 </param>
13043 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13044 <desc>
13045 Array of metrics that have been modified by the call to this method.
13046 </desc>
13047 </param>
13048 </method>
13049
13050 <method name="disableMetrics">
13051 <desc>
13052 Turns off collecting specified base metrics. Returns an array of
13053 <link to="IPerformanceMetric" /> describing the metrics have been
13054 affected.
13055 <note>
13056 @c Null or empty metric name array means all metrics. @c Null or empty
13057 object array means all existing objects. If metric name array contains
13058 a single element and object array contains many, the single metric
13059 name array element is applied to each object array element to form
13060 metric/object pairs.
13061 </note>
13062 </desc>
13063 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13064 <desc>
13065 Metric name filter. Comma-separated list of metrics with wildcard
13066 support.
13067 </desc>
13068 </param>
13069 <param name="objects" type="$unknown" dir="in" safearray="yes">
13070 <desc>
13071 Set of objects to disable metrics for.
13072 </desc>
13073 </param>
13074 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13075 <desc>
13076 Array of metrics that have been modified by the call to this method.
13077 </desc>
13078 </param>
13079 </method>
13080
13081 <method name="queryMetricsData">
13082 <desc>
13083 Queries collected metrics data for a set of objects.
13084
13085 The data itself and related metric information are returned in seven
13086 parallel and one flattened array of arrays. Elements of
13087 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13088 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13089 the same index describe one set of values corresponding to a single
13090 metric.
13091
13092 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13093 start and length of a sub-array is indicated by
13094 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13095 value for metric <tt>metricNames[i]</tt> is at
13096 <tt>returnData[returnIndices[i]]</tt>.
13097
13098 <note>
13099 @c Null or empty metric name array means all metrics. @c Null or empty
13100 object array means all existing objects. If metric name array contains
13101 a single element and object array contains many, the single metric
13102 name array element is applied to each object array element to form
13103 metric/object pairs.
13104 </note>
13105 <note>
13106 Data collection continues behind the scenes after call to
13107 @c queryMetricsData. The return data can be seen as the snapshot of
13108 the current state at the time of @c queryMetricsData call. The
13109 internally kept metric values are not cleared by the call. This makes
13110 possible querying different subsets of metrics or aggregates with
13111 subsequent calls. If periodic querying is needed it is highly
13112 suggested to query the values with @c interval*count period to avoid
13113 confusion. This way a completely new set of data values will be
13114 provided by each query.
13115 </note>
13116 </desc>
13117 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13118 <desc>
13119 Metric name filter. Comma-separated list of metrics with wildcard
13120 support.
13121 </desc>
13122 </param>
13123 <param name="objects" type="$unknown" dir="in" safearray="yes">
13124 <desc>
13125 Set of objects to query metrics for.
13126 </desc>
13127 </param>
13128 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13129 <desc>
13130 Names of metrics returned in @c returnData.
13131 </desc>
13132 </param>
13133 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13134 <desc>
13135 Objects associated with metrics returned in @c returnData.
13136 </desc>
13137 </param>
13138 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13139 <desc>
13140 Units of measurement for each returned metric.
13141 </desc>
13142 </param>
13143 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13144 <desc>
13145 Divisor that should be applied to return values in order to get
13146 floating point values. For example:
13147 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13148 will retrieve the floating point value of i-th sample of the first
13149 metric.
13150 </desc>
13151 </param>
13152 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13153 <desc>
13154 Sequence numbers of the first elements of value sequences of particular metrics
13155 returned in @c returnData. For aggregate metrics it is the sequence number of
13156 the sample the aggregate started calculation from.
13157 </desc>
13158 </param>
13159 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13160 <desc>
13161 Indices of the first elements of value sequences of particular metrics
13162 returned in @c returnData.
13163 </desc>
13164 </param>
13165 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13166 <desc>
13167 Lengths of value sequences of particular metrics.
13168 </desc>
13169 </param>
13170 <param name="returnData" type="long" dir="return" safearray="yes">
13171 <desc>
13172 Flattened array of all metric data containing sequences of values for
13173 each metric.
13174 </desc>
13175 </param>
13176 </method>
13177
13178 </interface>
13179
13180 <module name="VBoxSVC" context="LocalServer">
13181 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13182 namespace="virtualbox.org">
13183 <interface name="IVirtualBox" default="yes"/>
13184 </class>
13185 </module>
13186
13187 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13188 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13189 namespace="virtualbox.org">
13190 <interface name="ISession" default="yes"/>
13191 </class>
13192 </module>
13193
13194</library>
13195
13196</idl>
13197
13198<!-- 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