VirtualBox

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

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

undo 45832

  • Property svn:eol-style set to native
File size: 491.9 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129
130#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
131# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
132 NS_IMPL_THREADSAFE_ADDREF(_class) \
133 NS_IMPL_THREADSAFE_RELEASE(_class) \
134 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
135 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
136#endif
137
138#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
139# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
140 NS_IMPL_THREADSAFE_ADDREF(_class) \
141 NS_IMPL_THREADSAFE_RELEASE(_class) \
142 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
143 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
144#endif
145
146#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
147# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
148 NS_INTERFACE_MAP_BEGIN(_class) \
149 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
150 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
151 NS_IMPL_QUERY_CLASSINFO(_class) \
152 NS_INTERFACE_MAP_END
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
157 _i2, _ic2) \
158 NS_INTERFACE_MAP_BEGIN(_class) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
160 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
161 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
162 NS_IMPL_QUERY_CLASSINFO(_class) \
163 NS_INTERFACE_MAP_END
164#endif
165
166#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
167#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
168
169#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
170# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
171 NS_IMPL_THREADSAFE_ADDREF(_class) \
172 NS_IMPL_THREADSAFE_RELEASE(_class) \
173 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
174 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
175#endif
176
177#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
178# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
179 _i2, _ic2) \
180 NS_IMPL_THREADSAFE_ADDREF(_class) \
181 NS_IMPL_THREADSAFE_RELEASE(_class) \
182 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2) \
184 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
185#endif
186 </cpp>
187</if>
188
189<library
190 name="VirtualBox"
191 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
192 version="1.3"
193 desc="VirtualBox Type Library"
194 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
195 supportsErrorInfo="yes"
196>
197
198
199 <!--
200 // COM result codes for VirtualBox
201 /////////////////////////////////////////////////////////////////////////
202 -->
203
204 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
205 <desc>
206 This section describes all VirtualBox-specific COM result codes that may
207 be returned by methods of VirtualBox COM interfaces in addition to
208 standard COM result codes.
209
210 Note that along with the result code, every VirtualBox method returns
211 extended error information through the IVirtualBoxErrorInfo interface on
212 failure. This interface is a preferred way to present the error to the end
213 user because it contains a human readable description of the error. Raw
214 result codes, both standard and described in this section, are intended to
215 be used by programs to analyze the reason of a failure and select an
216 appropriate course of action without involving the end user (for example,
217 retry the operation later or make a different call).
218
219 The standard COM result codes that may originate from our methods include:
220
221 <table>
222 <tr><td>E_INVALIDARG</td>
223 <td>
224 Returned when the value of the method's argument is not within the range
225 of valid values. This should not be confused with situations when the
226 value is within the range but simply doesn't suit the current object
227 state and there is a possibility that it will be accepted later (in such
228 cases VirtualBox-specific codes are returned, for example,
229 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
230 </td>
231 </tr>
232 <tr><td>E_POINTER</td>
233 <td>
234 Returned if a memory pointer for the output argument is invalid (for
235 example, <tt>NULL</tt>). Note that when pointers representing input
236 arguments (such as strings) are invalid, E_INVALIDARG is returned.
237 </td>
238 </tr>
239 <tr><td>E_ACCESSDENIED</td>
240 <td>
241 Returned when the called object is not ready. Since the lifetime of a
242 public COM object cannot be fully controlled by the implementation,
243 VirtualBox maintains the readiness state for all objects it creates and
244 returns this code in response to any method call on the object that was
245 deactivated by VirtualBox and is not functioning any more.
246 </td>
247 </tr>
248 <tr><td>E_OUTOFMEMORY</td>
249 <td>
250 Returned when a memory allocation operation fails.
251 </td>
252 </tr>
253 </table>
254 </desc>
255 </descGroup>
256
257 <!--
258 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
259 everything in <result>/<desc> after (and including) the first dot, so express
260 the matter of the error code in the first sentence and keep it short.
261 -->
262
263 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
264 <desc>
265 Object corresponding to the supplied arguments does not exist.
266 </desc>
267 </result>
268
269 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
270 <desc>
271 Current virtual machine state prevents the operation.
272 </desc>
273 </result>
274
275 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
276 <desc>
277 Virtual machine error occurred attempting the operation.
278 </desc>
279 </result>
280
281 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
282 <desc>
283 File not accessible or erroneous file contents.
284 </desc>
285 </result>
286
287 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
288 <desc>
289 Runtime subsystem error.
290 </desc>
291 </result>
292
293 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
294 <desc>
295 Pluggable Device Manager error.
296 </desc>
297 </result>
298
299 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
300 <desc>
301 Current object state prohibits operation.
302 </desc>
303 </result>
304
305 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
306 <desc>
307 Host operating system related error.
308 </desc>
309 </result>
310
311 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
312 <desc>
313 Requested operation is not supported.
314 </desc>
315 </result>
316
317 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
318 <desc>
319 Invalid XML found.
320 </desc>
321 </result>
322
323 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
324 <desc>
325 Current session state prohibits operation.
326 </desc>
327 </result>
328
329 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
330 <desc>
331 Object being in use prohibits operation.
332 </desc>
333 </result>
334
335 <!--
336 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
337 everything in <result>/<desc> after (and including) the first dot, so express
338 the matter of the error code in the first sentence and keep it short.
339 -->
340
341 <descGroup/>
342
343 <!--
344 // all common enums
345 /////////////////////////////////////////////////////////////////////////
346 -->
347
348 <enum
349 name="TSBool"
350 uuid="523ff64d-842a-4b1a-80e7-c311b028cb3a"
351 >
352 <desc>
353 Boolean variable having a third state, default.
354 </desc>
355
356 <const name="False" value="0"/>
357 <const name="True" value="1"/>
358 <const name="Default" value="2"/>
359 </enum>
360
361 <enum
362 name="AccessMode"
363 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
364 >
365 <desc>
366 Access mode for opening files.
367 </desc>
368
369 <const name="ReadOnly" value="1"/>
370 <const name="ReadWrite" value="2"/>
371 </enum>
372
373 <enum
374 name="MachineState"
375 uuid="73bf04d0-7c4f-4684-9abf-d65a9ad74343"
376 >
377 <desc>
378 Virtual machine execution state.
379
380 This enumeration represents possible values of the <link
381 to="IMachine::state"/> attribute.
382
383 Below is the basic virtual machine state diagram. It shows how the state
384 changes during virtual machine execution. The text in square braces shows
385 a method of the IConsole interface that performs the given state
386 transition.
387
388 <pre>
389 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
390 V |
391 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
392 | | | | V |
393 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
394 | | ^ | ^ |
395 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
396 | ^ | | | |
397 | | +-----------------------------------------+-|-------------------+ +
398 | | | | |
399 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
400 | | | |
401 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
402 | | |
403 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
404 </pre>
405
406 Note that states to the right from PoweredOff, Aborted and Saved in the
407 above diagram are called <i>online VM states</i>. These states
408 represent the virtual machine which is being executed in a dedicated
409 process (usually with a GUI window attached to it where you can see the
410 activity of the virtual machine and interact with it). There are two
411 special pseudo-states, FirstOnline and LastOnline, that can be used in
412 relational expressions to detect if the given machine state is online or
413 not:
414
415 <pre>
416 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
417 machine.GetState() &lt;= MachineState_LastOnline)
418 {
419 ...the machine is being executed...
420 }
421 </pre>
422
423 When the virtual machine is in one of the online VM states (that is, being
424 executed), only a few machine settings can be modified. Methods working
425 with such settings contain an explicit note about that. An attempt to
426 change any oter setting or perform a modifying operation during this time
427 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
428
429 All online states except Running, Paused and Stuck are transitional: they
430 represent temporary conditions of the virtual machine that will last as
431 long as the operation that initiated such a condition.
432
433 The Stuck state is a special case. It means that execution of the machine
434 has reached the "Guru Meditation" condition. This condition indicates an
435 internal VMM (virtual machine manager) failure which may happen as a
436 result of either an unhandled low-level virtual hardware exception or one
437 of the recompiler exceptions (such as the <i>too-many-traps</i>
438 condition).
439
440 Note also that any online VM state may transit to the Aborted state. This
441 happens if the process that is executing the virtual machine terminates
442 unexpectedly (for example, crashes). Other than that, the Aborted state is
443 equivalent to PoweredOff.
444
445 There are also a few additional state diagrams that do not deal with
446 virtual machine execution and therefore are shown separately. The states
447 shown on these diagrams are called <i>offline VM states</i> (this includes
448 PoweredOff, Aborted and Saved too).
449
450 The first diagram shows what happens when a lengthy setup operation is
451 being executed (such as <link to="IMachine::attachHardDisk"/>).
452
453 <pre>
454 +----------------------------------(same state as before the call)------+
455 | |
456 +-&gt; PoweredOff --+ |
457 | | |
458 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
459 | |
460 +-&gt; Saved -------+
461 </pre>
462
463 The next two diagrams demonstrate the process of taking a snapshot of a
464 powered off virtual machine and performing one of the "discard..."
465 operations, respectively.
466
467 <pre>
468 +----------------------------------(same state as before the call)------+
469 | |
470 +-&gt; PoweredOff --+ |
471 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
472 +-&gt; Aborted -----+
473
474 +-&gt; PoweredOff --+
475 | |
476 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
477 | | [discardCurrentState()] |
478 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
479 | |
480 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
481 </pre>
482
483 Note that the Saving state is present in both the offline state group and
484 online state group. Currently, the only way to determine what group is
485 assumed in a particular case is to remember the previous machine state: if
486 it was Running or Paused, then Saving is an online state, otherwise it is
487 an offline state. This inconsistency may be removed in one of the future
488 versions of VirtualBox by adding a new state.
489
490 <note internal="yes">
491 For whoever decides to touch this enum: In order to keep the
492 comparisons involving FirstOnline and LastOnline pseudo-states valid,
493 the numeric values of these states must be correspondingly updated if
494 needed: for any online VM state, the condition
495 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
496 <tt>true</tt>. The same relates to transient states for which
497 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
498 <tt>true</tt>.
499 </note>
500 </desc>
501
502 <const name="Null" value="0">
503 <desc>Null value (never used by the API).</desc>
504 </const>
505 <const name="PoweredOff" value="1">
506 <desc>
507 The machine is not running.
508 </desc>
509 </const>
510 <const name="Saved" value="2">
511 <desc>
512 The machine is not currently running, but the execution state of the machine
513 has been saved to an external file when it was running.
514 </desc>
515 </const>
516 <const name="Aborted" value="3">
517 <desc>
518 The process running the machine has terminated abnormally.
519 </desc>
520 </const>
521 <const name="Running" value="4">
522 <desc>
523 The machine is currently being executed.
524 <note internal="yes">
525 For whoever decides to touch this enum: In order to keep the
526 comparisons in the old source code valid, this state must immediately
527 precede the Paused state.
528 </note>
529 </desc>
530 </const>
531 <const name="Paused" value="5">
532 <desc>
533 Execution of the machine has been paused.
534 <note internal="yes">
535 For whoever decides to touch this enum: In order to keep the
536 comparisons in the old source code valid, this state must immediately
537 follow the Running state.
538 </note>
539 </desc>
540 </const>
541 <const name="Stuck" value="6">
542 <desc>
543 Execution of the machine has reached the "Guru Meditation"
544 condition.
545 </desc>
546 </const>
547 <const name="Starting" value="7">
548 <desc>
549 Machine is being started after powering it on from a
550 zero execution state.
551 </desc>
552 </const>
553 <const name="Stopping" value="8">
554 <desc>
555 Machine is being normally stopped powering it off, or after the guest OS
556 has initiated a shutdown sequence.
557 </desc>
558 </const>
559 <const name="Saving" value="9">
560 <desc>
561 Machine is saving its execution state to a file or an online
562 snapshot of the machine is being taken.
563 </desc>
564 </const>
565 <const name="Restoring" value="10">
566 <desc>
567 Execution state of the machine is being restored from a file
568 after powering it on from the saved execution state.
569 </desc>
570 </const>
571 <const name="Discarding" value="11">
572 <desc>
573 Snapshot of the machine is being discarded.
574 </desc>
575 </const>
576 <const name="SettingUp" value="12">
577 <desc>
578 Lengthy setup operation is in progress.
579 </desc>
580 </const>
581
582 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
583 <desc>
584 Pseudo-state: first online state (for use in relational expressions).
585 </desc>
586 </const>
587 <const name="LastOnline" value="10" wsmap="suppress"> <!-- Restoring -->
588 <desc>
589 Pseudo-state: last online state (for use in relational expressions).
590 </desc>
591 </const>
592
593 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
594 <desc>
595 Pseudo-state: first transient state (for use in relational expressions).
596 </desc>
597 </const>
598 <const name="LastTransient" value="12" wsmap="suppress"> <!-- SettingUp -->
599 <desc>
600 Pseudo-state: last transient state (for use in relational expressions).
601 </desc>
602 </const>
603
604 </enum>
605
606 <enum
607 name="SessionState"
608 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
609 >
610 <desc>
611 Session state. This enumeration represents possible values of
612 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
613 attributes. See individual enumerator descriptions for the meaning for
614 every value.
615 </desc>
616
617 <const name="Null" value="0">
618 <desc>Null value (never used by the API).</desc>
619 </const>
620 <const name="Closed" value="1">
621 <desc>
622 The machine has no open sessions (<link to="IMachine::sessionState"/>);
623 the session is closed (<link to="ISession::state"/>)
624 </desc>
625 </const>
626 <const name="Open" value="2">
627 <desc>
628 The machine has an open direct session (<link to="IMachine::sessionState"/>);
629 the session is open (<link to="ISession::state"/>)
630 </desc>
631 </const>
632 <const name="Spawning" value="3">
633 <desc>
634 A new (direct) session is being opened for the machine
635 as a result of <link to="IVirtualBox::openRemoteSession"/>
636 call (<link to="IMachine::sessionState"/>);
637 the session is currently being opened
638 as a result of <link to="IVirtualBox::openRemoteSession"/>
639 call (<link to="ISession::state"/>)
640 </desc>
641 </const>
642 <const name="Closing" value="4">
643 <desc>
644 The direct session is being closed (<link to="IMachine::sessionState"/>);
645 the session is being closed (<link to="ISession::state"/>)
646 </desc>
647 </const>
648 </enum>
649
650 <enum
651 name="SessionType"
652 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
653 >
654 <desc>
655 Session type. This enumeration represents possible values of the
656 <link to="ISession::type"/> attribute.
657 </desc>
658
659 <const name="Null" value="0">
660 <desc>Null value (never used by the API).</desc>
661 </const>
662 <const name="Direct" value="1">
663 <desc>
664 Direct session
665 (opened by <link to="IVirtualBox::openSession"/>)
666 </desc>
667 </const>
668 <const name="Remote" value="2">
669 <desc>
670 Remote session
671 (opened by <link to="IVirtualBox::openRemoteSession"/>)
672 </desc>
673 </const>
674 <const name="Existing" value="3">
675 <desc>
676 Existing session
677 (opened by <link to="IVirtualBox::openExistingSession"/>)
678 </desc>
679 </const>
680 </enum>
681
682 <enum
683 name="DeviceType"
684 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
685 >
686 <desc>
687 Device type.
688 </desc>
689 <const name="Null" value="0">
690 <desc>
691 Null value, may also mean "no device" (not allowed for
692 <link to="IConsole::getDeviceActivity"/>).
693 </desc>
694 </const>
695 <const name="Floppy" value="1">
696 <desc>Floppy device.</desc>
697 </const>
698 <const name="DVD" value="2">
699 <desc>CD/DVD-ROM device.</desc>
700 </const>
701 <const name="HardDisk" value="3">
702 <desc>Hard disk device.</desc>
703 </const>
704 <const name="Network" value="4">
705 <desc>Network device.</desc>
706 </const>
707 <const name="USB" value="5">
708 <desc>USB device.</desc>
709 </const>
710 <const name="SharedFolder" value="6">
711 <desc>Shared folder device.</desc>
712 </const>
713 </enum>
714
715 <enum
716 name="DeviceActivity"
717 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
718 >
719 <desc>
720 Device activity for <link to="IConsole::getDeviceActivity"/>.
721 </desc>
722
723 <const name="Null" value="0"/>
724 <const name="Idle" value="1"/>
725 <const name="Reading" value="2"/>
726 <const name="Writing" value="3"/>
727 </enum>
728
729 <enum
730 name="ClipboardMode"
731 uuid="33364716-4008-4701-8f14-be0fa3d62950"
732 >
733 <desc>
734 Host-Guest clipboard interchange mode.
735 </desc>
736
737 <const name="Disabled" value="0"/>
738 <const name="HostToGuest" value="1"/>
739 <const name="GuestToHost" value="2"/>
740 <const name="Bidirectional" value="3"/>
741 </enum>
742
743 <enum
744 name="Scope"
745 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
746 >
747 <desc>
748 Scope of the operation.
749
750 A generic enumeration used in various methods to define the action or
751 argument scope.
752 </desc>
753
754 <const name="Global" value="0"/>
755 <const name="Machine" value="1"/>
756 <const name="Session" value="2"/>
757 </enum>
758
759 <enum
760 name="GuestStatisticType"
761 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
762 >
763 <desc>
764 Statistics type for <link to="IGuest::getStatistic"/>.
765 </desc>
766
767 <const name="CPULoad_Idle" value="0">
768 <desc>
769 Idle CPU load (0-100%) for last interval.
770 </desc>
771 </const>
772 <const name="CPULoad_Kernel" value="1">
773 <desc>
774 Kernel CPU load (0-100%) for last interval.
775 </desc>
776 </const>
777 <const name="CPULoad_User" value="2">
778 <desc>
779 User CPU load (0-100%) for last interval.
780 </desc>
781 </const>
782 <const name="Threads" value="3">
783 <desc>
784 Total number of threads in the system.
785 </desc>
786 </const>
787 <const name="Processes" value="4">
788 <desc>
789 Total number of processes in the system.
790 </desc>
791 </const>
792 <const name="Handles" value="5">
793 <desc>
794 Total number of handles in the system.
795 </desc>
796 </const>
797 <const name="MemoryLoad" value="6">
798 <desc>
799 Memory load (0-100%).
800 </desc>
801 </const>
802 <const name="PhysMemTotal" value="7">
803 <desc>
804 Total physical memory in megabytes.
805 </desc>
806 </const>
807 <const name="PhysMemAvailable" value="8">
808 <desc>
809 Free physical memory in megabytes.
810 </desc>
811 </const>
812 <const name="PhysMemBalloon" value="9">
813 <desc>
814 Ballooned physical memory in megabytes.
815 </desc>
816 </const>
817 <const name="MemCommitTotal" value="10">
818 <desc>
819 Total amount of memory in the committed state in megabytes.
820 </desc>
821 </const>
822 <const name="MemKernelTotal" value="11">
823 <desc>
824 Total amount of memory used by the guest OS's kernel in megabytes.
825 </desc>
826 </const>
827 <const name="MemKernelPaged" value="12">
828 <desc>
829 Total amount of paged memory used by the guest OS's kernel in megabytes.
830 </desc>
831 </const>
832 <const name="MemKernelNonpaged" value="13">
833 <desc>
834 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
835 </desc>
836 </const>
837 <const name="MemSystemCache" value="14">
838 <desc>
839 Total amount of memory used by the guest OS's system cache in megabytes.
840 </desc>
841 </const>
842 <const name="PageFileSize" value="15">
843 <desc>
844 Pagefile size in megabytes.
845 </desc>
846 </const>
847 <const name="SampleNumber" value="16">
848 <desc>
849 Statistics sample number
850 </desc>
851 </const>
852 <const name="MaxVal" value="17"/>
853 </enum>
854
855 <enum
856 name="BIOSBootMenuMode"
857 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
858 >
859 <desc>
860 BIOS boot menu mode.
861 </desc>
862
863 <const name="Disabled" value="0"/>
864 <const name="MenuOnly" value="1"/>
865 <const name="MessageAndMenu" value="2"/>
866 </enum>
867
868 <enum
869 name="DriveState"
870 uuid="cb7233b7-c519-42a5-8310-1830953cacbc"
871 >
872 <const name="Null" value="0">
873 <desc>Null value (never used by the API).</desc>
874 </const>
875 <const name="NotMounted" value="1"/>
876 <const name="ImageMounted" value="2"/>
877 <const name="HostDriveCaptured" value="3"/>
878 </enum>
879
880 <enum
881 name="ProcessorFeature"
882 uuid="b8353b35-705d-4796-9967-ebfb7ba54af4"
883 >
884 <desc>
885 CPU features.
886 </desc>
887
888 <const name="HWVirtEx" value="0"/>
889 <const name="PAE" value="1"/>
890 <const name="LongMode" value="2"/>
891 </enum>
892
893
894 <!--
895 // IVirtualBoxErrorInfo
896 /////////////////////////////////////////////////////////////////////////
897 -->
898
899 <interface
900 name="IVirtualBoxErrorInfo" extends="$errorinfo"
901 uuid="e98b5376-8eb4-4eea-812a-3964bf3bb26f"
902 supportsErrorInfo="no"
903 wsmap="suppress"
904 >
905 <desc>
906 The IVirtualBoxErrorInfo interface represents extended error information.
907
908 Extended error information can be set by VirtualBox components after
909 unsuccessful or partially successful method invocation. This information
910 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
911 and then shown to the client in addition to the plain 32-bit result code.
912
913 In MS COM, this interface extends the IErrorInfo interface,
914 in XPCOM, it extends the nsIException interface. In both cases,
915 it provides a set of common attributes to retrieve error
916 information.
917
918 Sometimes invocation of some component's method may involve methods of
919 other components that may also fail (independently of this method's
920 failure), or a series of non-fatal errors may precede a fatal error that
921 causes method failure. In cases like that, it may be desirable to preserve
922 information about all errors happened during method invocation and deliver
923 it to the caller. The <link to="#next"/> attribute is intended
924 specifically for this purpose and allows to represent a chain of errors
925 through a single IVirtualBoxErrorInfo object set after method invocation.
926
927 Note that errors are stored to a chain in the reverse order, i.e. the
928 initial error object you query right after method invocation is the last
929 error set by the callee, the object it points to in the @a next attribute
930 is the previous error and so on, up to the first error (which is the last
931 in the chain).
932 </desc>
933
934 <attribute name="resultCode" type="result" readonly="yes">
935 <desc>
936 Result code of the error.
937 Usually, it will be the same as the result code returned
938 by the method that provided this error information, but not
939 always. For example, on Win32, CoCreateInstance() will most
940 likely return E_NOINTERFACE upon unsuccessful component
941 instantiation attempt, but not the value the component factory
942 returned.
943 <note>
944 In MS COM, there is no equivalent.
945 In XPCOM, it is the same as nsIException::result.
946 </note>
947 </desc>
948 </attribute>
949
950 <attribute name="interfaceID" type="uuid" readonly="yes">
951 <desc>
952 UUID of the interface that defined the error.
953 <note>
954 In MS COM, it is the same as IErrorInfo::GetGUID.
955 In XPCOM, there is no equivalent.
956 </note>
957 </desc>
958 </attribute>
959
960 <attribute name="component" type="wstring" readonly="yes">
961 <desc>
962 Name of the component that generated the error.
963 <note>
964 In MS COM, it is the same as IErrorInfo::GetSource.
965 In XPCOM, there is no equivalent.
966 </note>
967 </desc>
968 </attribute>
969
970 <attribute name="text" type="wstring" readonly="yes">
971 <desc>
972 Text description of the error.
973 <note>
974 In MS COM, it is the same as IErrorInfo::GetDescription.
975 In XPCOM, it is the same as nsIException::message.
976 </note>
977 </desc>
978 </attribute>
979
980 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
981 <desc>
982 Next error object if there is any, or @c null otherwise.
983 <note>
984 In MS COM, there is no equivalent.
985 In XPCOM, it is the same as nsIException::inner.
986 </note>
987 </desc>
988 </attribute>
989
990 </interface>
991
992
993 <!--
994 // IVirtualBox
995 /////////////////////////////////////////////////////////////////////////
996 -->
997
998 <interface
999 name="IVirtualBoxCallback" extends="$unknown"
1000 uuid="5516cc08-fb81-47a6-b184-031e7bbd2997"
1001 wsmap="suppress"
1002 >
1003 <method name="onMachineStateChange">
1004 <desc>
1005 The execution state of the given machine has changed.
1006 <see>IMachine::state</see>
1007 </desc>
1008 <param name="machineId" type="uuid" dir="in">
1009 <desc>ID of the machine this event relates to.</desc>
1010 </param>
1011 <param name="state" type="MachineState" dir="in">
1012 <desc>New execution state.</desc>
1013 </param>
1014 </method>
1015
1016 <method name="onMachineDataChange">
1017 <desc>
1018 Any of the settings of the given machine has changed.
1019 </desc>
1020 <param name="machineId" type="uuid" dir="in">
1021 <desc>ID of the machine this event relates to.</desc>
1022 </param>
1023 </method>
1024
1025 <method name="onExtraDataCanChange">
1026 <desc>
1027 Notification when someone tries to change extra data for
1028 either the given machine or (if null) global extra data.
1029 This gives the chance to veto against changes.
1030 </desc>
1031 <param name="machineId" type="uuid" dir="in">
1032 <desc>
1033 ID of the machine this event relates to
1034 (null ID for global extra data change requests).
1035 </desc>
1036 </param>
1037 <param name="key" type="wstring" dir="in">
1038 <desc>
1039 Extra data key for the attempted write.
1040 </desc>
1041 </param>
1042 <param name="value" type="wstring" dir="in">
1043 <desc>
1044 Extra data value for the given key.
1045 </desc>
1046 </param>
1047 <param name="error" type="wstring" dir="out">
1048 <desc>
1049 Optional error message describing the reason of the
1050 veto (ignored if this notification returns @c true).
1051 </desc>
1052 </param>
1053 <param name="allowChange" type="boolean" dir="return">
1054 <desc>
1055 Flag to indicate whether the callee agrees (@c true)
1056 or vetoes against the change (@c false).
1057 </desc>
1058 </param>
1059 </method>
1060
1061 <method name="onExtraDataChange">
1062 <desc>
1063 Notification when machine specific or global extra data
1064 has changed.
1065 </desc>
1066 <param name="machineId" type="uuid" dir="in">
1067 <desc>
1068 ID of the machine this event relates to.
1069 Null for global extra data changes.
1070 </desc>
1071 </param>
1072 <param name="key" type="wstring" dir="in">
1073 <desc>
1074 Extra data key that has changed.
1075 </desc>
1076 </param>
1077 <param name="value" type="wstring" dir="in">
1078 <desc>
1079 Extra data value for the given key.
1080 </desc>
1081 </param>
1082 </method>
1083
1084 <method name="onMediaRegistered">
1085 <desc>
1086 The given media was registered or unregistered
1087 within this VirtualBox installation.
1088
1089 The @a mediaType parameter describes what type of
1090 media the specified @a mediaId refers to. Possible
1091 values are:
1092
1093 <ul>
1094 <li><link to="DeviceType_HardDisk"/>: the media is a hard disk
1095 that, if registered, can be obtained using the
1096 <link to="IVirtualBox::getHardDisk"/> call.</li>
1097 <li><link to="DeviceType_DVD"/>: the media is a CD/DVD image
1098 that, if registered, can be obtained using the
1099 <link to="IVirtualBox::getDVDImage"/> call.</li>
1100 <li><link to="DeviceType_Floppy"/>: the media is a Floppy image
1101 that, if registered, can be obtained using the
1102 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1103 </ul>
1104
1105 Note that if this is a deregistration notification,
1106 there is no way to access the object representing the
1107 unregistered media. It is supposed that the
1108 application will do required cleanup based on the
1109 @a mediaId value.
1110 </desc>
1111 <param name="mediaId" type="uuid" dir="in">
1112 <desc>ID of the media this event relates to.</desc>
1113 </param>
1114 <param name="mediaType" type="DeviceType" dir="in">
1115 <desc>Type of the media this event relates to.</desc>
1116 </param>
1117 <param name="registered" type="boolean" dir="in">
1118 <desc>
1119 If true, the media was registered, otherwise it was
1120 unregistered.
1121 </desc>
1122 </param>
1123 </method>
1124
1125 <method name="onMachineRegistered">
1126 <desc>
1127 The given machine was registered or unregistered
1128 within this VirtualBox installation.
1129 </desc>
1130 <param name="machineId" type="uuid" dir="in">
1131 <desc>ID of the machine this event relates to.</desc>
1132 </param>
1133 <param name="registered" type="boolean" dir="in">
1134 <desc>
1135 If true, the machine was registered, otherwise it was
1136 unregistered.
1137 </desc>
1138 </param>
1139 </method>
1140
1141 <method name="onSessionStateChange">
1142 <desc>
1143 The state of the session for the given machine was changed.
1144 <see>IMachine::sessionState</see>
1145 </desc>
1146 <param name="machineId" type="uuid" dir="in">
1147 <desc>ID of the machine this event relates to.</desc>
1148 </param>
1149 <param name="state" type="SessionState" dir="in">
1150 <desc>New session state.</desc>
1151 </param>
1152 </method>
1153
1154 <method name="onSnapshotTaken">
1155 <desc>
1156 A new snapshot of the machine has been taken.
1157 <see>ISnapshot</see>
1158 </desc>
1159 <param name="machineId" type="uuid" dir="in">
1160 <desc>ID of the machine this event relates to.</desc>
1161 </param>
1162 <param name="snapshotId" type="uuid" dir="in">
1163 <desc>ID of the new snapshot.</desc>
1164 </param>
1165 </method>
1166
1167 <method name="onSnapshotDiscarded">
1168 <desc>
1169 Snapshot of the given machine has been discarded.
1170
1171 <note>
1172 This notification is delivered <b>after</b> the snapshot
1173 object has been uninitialized on the server (so that any
1174 attempt to call its methods will return an error).
1175 </note>
1176
1177 <see>ISnapshot</see>
1178 </desc>
1179 <param name="machineId" type="uuid" dir="in">
1180 <desc>ID of the machine this event relates to.</desc>
1181 </param>
1182 <param name="snapshotId" type="uuid" dir="in">
1183 <desc>
1184 ID of the discarded snapshot. <tt>null</tt> means the
1185 current machine state has been discarded (restored from
1186 the current snapshot).
1187 </desc>
1188 </param>
1189 </method>
1190
1191 <method name="onSnapshotChange">
1192 <desc>
1193 Snapshot properties (name and/or description) have been changed.
1194 <see>ISnapshot</see>
1195 </desc>
1196 <param name="machineId" type="uuid" dir="in">
1197 <desc>ID of the machine this event relates to.</desc>
1198 </param>
1199 <param name="snapshotId" type="uuid" dir="in">
1200 <desc>ID of the changed snapshot.</desc>
1201 </param>
1202 </method>
1203
1204 <method name="onGuestPropertyChange">
1205 <desc>
1206 Notification when a guest property has changed.
1207 </desc>
1208 <param name="machineId" type="uuid" dir="in">
1209 <desc>
1210 ID of the machine this event relates to.
1211 </desc>
1212 </param>
1213 <param name="name" type="wstring" dir="in">
1214 <desc>
1215 The name of the property that has changed.
1216 </desc>
1217 </param>
1218 <param name="value" type="wstring" dir="in">
1219 <desc>
1220 The new property value.
1221 </desc>
1222 </param>
1223 <param name="flags" type="wstring" dir="in">
1224 <desc>
1225 The new property flags.
1226 </desc>
1227 </param>
1228 </method>
1229
1230 </interface>
1231
1232 <interface
1233 name="IDHCPServer" extends="$unknown"
1234 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1235 wsmap="managed"
1236 >
1237 <desc>
1238 The IDHCPServer interface represents the vbox dhcp server configuration.
1239
1240 To enumerate all the dhcp servers on the host, use the
1241 <link to="IVirtualBox::DHCPServers"/> attribute.
1242 </desc>
1243
1244 <attribute name="enabled" type="boolean">
1245 <desc>
1246 specifies if the dhcp server is enabled
1247 </desc>
1248 </attribute>
1249
1250 <attribute name="IPAddress" type="wstring" readonly="yes">
1251 <desc>
1252 specifies server IP
1253 </desc>
1254 </attribute>
1255
1256 <attribute name="networkMask" type="wstring" readonly="yes">
1257 <desc>
1258 specifies server network mask
1259 </desc>
1260 </attribute>
1261
1262 <attribute name="networkName" type="wstring" readonly="yes">
1263 <desc>
1264 specifies internal network name the server is used for
1265 </desc>
1266 </attribute>
1267
1268 <attribute name="lowerIP" type="wstring" readonly="yes">
1269 <desc>
1270 specifies from IP adrres in server address range
1271 </desc>
1272 </attribute>
1273
1274 <attribute name="upperIP" type="wstring" readonly="yes">
1275 <desc>
1276 specifies to IP adrres in server address range
1277 </desc>
1278 </attribute>
1279
1280 <method name="setConfiguration">
1281 <desc>
1282 configures the server
1283 <result name="E_INVALIDARG">
1284 invalid configuration supplied
1285 </result>
1286 </desc>
1287 <param name="IPAddress" type="wstring" dir="in">
1288 <desc>
1289 server IP address
1290 </desc>
1291 </param>
1292 <param name="networkMask" type="wstring" dir="in">
1293 <desc>
1294 server network mask
1295 </desc>
1296 </param>
1297 <param name="FromIPAddress" type="wstring" dir="in">
1298 <desc>
1299 server From IP address for address range
1300 </desc>
1301 </param>
1302 <param name="ToIPAddress" type="wstring" dir="in">
1303 <desc>
1304 server To IP address for address range
1305 </desc>
1306 </param>
1307 </method>
1308
1309 <method name="start">
1310 <desc>
1311 Starts DHCP server process.
1312 <result name="E_FAIL">
1313 Failed to start the process.
1314 </result>
1315 </desc>
1316 <param name="networkName" type="wstring" dir="in">
1317 <desc>
1318 Name of internal network DHCP server should attach to.
1319 </desc>
1320 </param>
1321 <param name="trunkName" type="wstring" dir="in">
1322 <desc>
1323 Name of internal network trunk.
1324 </desc>
1325 </param>
1326 <param name="trunkType" type="wstring" dir="in">
1327 <desc>
1328 Type of internal network trunk.
1329 </desc>
1330 </param>
1331 </method>
1332
1333 <method name="stop">
1334 <desc>
1335 Stops DHCP server process.
1336 <result name="E_FAIL">
1337 Failed to stop the process.
1338 </result>
1339 </desc>
1340 </method>
1341 </interface>
1342
1343 <interface
1344 name="IVirtualBox" extends="$dispatched"
1345 uuid="779264f4-65ed-48ed-be39-518ca549e296"
1346 wsmap="managed"
1347 >
1348 <desc>
1349 The IVirtualBox interface represents the main interface exposed by the
1350 product that provides virtual machine management.
1351
1352 An instance of IVirtualBox is required for the product to do anything
1353 useful. Even though the interface does not expose this, internally,
1354 IVirtualBox is implemented as a singleton and actually lives in the
1355 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1356 IVirtualBox can track the state of all virtual machines on a particular
1357 host, regardless of which frontend started them.
1358
1359 To enumerate all the virtual machines on the host, use the
1360 <link to="IVirtualBox::machines"/> attribute.
1361 </desc>
1362
1363 <attribute name="version" type="wstring" readonly="yes">
1364 <desc>
1365 A string representing the version number of the product. The
1366 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1367 last number represents the build number and will frequently change.
1368 </desc>
1369 </attribute>
1370
1371 <attribute name="revision" type="unsigned long" readonly="yes">
1372 <desc>
1373 The internal build revision number of the product.
1374 </desc>
1375 </attribute>
1376
1377 <attribute name="packageType" type="wstring" readonly="yes">
1378 <desc>
1379 A string representing the package type of this product. The
1380 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1381 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1382 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1383 this.
1384 </desc>
1385 </attribute>
1386
1387 <attribute name="homeFolder" type="wstring" readonly="yes">
1388 <desc>
1389 Full path to the directory where the global settings file,
1390 <tt>VirtualBox.xml</tt>, is stored.
1391
1392 In this version of VirtualBox, the value of this property is
1393 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1394 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1395 as determined by the host OS), and cannot be changed.
1396
1397 This path is also used as the base to resolve relative paths in
1398 places where relative paths are allowed (unless otherwise
1399 expressly indicated).
1400 </desc>
1401 </attribute>
1402
1403 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1404 <desc>
1405 Full name of the global settings file.
1406 The value of this property corresponds to the value of
1407 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1408 </desc>
1409 </attribute>
1410
1411 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
1412 <desc>
1413 Current version of the format of the global VirtualBox settings file
1414 (<tt>VirtualBox.xml</tt>).
1415
1416 The version string has the following format:
1417 <pre>
1418 x.y-platform
1419 </pre>
1420 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1421 versions, and <tt>platform</tt> is the platform identifier.
1422
1423 The current version usually matches the value of the
1424 <link to="#settingsFormatVersion"/> attribute unless the
1425 settings file was created by an older version of VirtualBox and there
1426 was a change of the settings file format since then.
1427
1428 Note that VirtualBox automatically converts settings files from older
1429 versions to the most recent version when reading them (usually at
1430 VirtualBox startup) but it doesn't save the changes back until
1431 you call a method that implicitly saves settings (such as
1432 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
1433 explicitly. Therefore, if the value of this attribute differs from the
1434 value of <link to="#settingsFormatVersion"/>, then it
1435 means that the settings file was converted but the result of the
1436 conversion is not yet saved to disk.
1437
1438 The above feature may be used by interactive front-ends to inform users
1439 about the settings file format change and offer them to explicitly save
1440 all converted settings files (the global and VM-specific ones),
1441 optionally create backup copies of the old settings files before saving,
1442 etc.
1443
1444 <see>settingsFormatVersion, saveSettingsWithBackup()</see>
1445 </desc>
1446 </attribute>
1447
1448 <attribute name="settingsFormatVersion" type="wstring" readonly="yes">
1449 <desc>
1450 Most recent version of the settings file format.
1451
1452 The version string has the following format:
1453 <pre>
1454 x.y-platform
1455 </pre>
1456 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
1457 versions, and <tt>platform</tt> is the platform identifier.
1458
1459 VirtualBox uses this version of the format when saving settings files
1460 (either as a result of method calls that require to save settings or as
1461 a result of an explicit call to <link to="#saveSettings"/>).
1462
1463 <see>settingsFileVersion</see>
1464 </desc>
1465 </attribute>
1466
1467 <attribute name="host" type="IHost" readonly="yes">
1468 <desc>Associated host object.</desc>
1469 </attribute>
1470
1471 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1472 <desc>Associated system information object.</desc>
1473 </attribute>
1474
1475 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1476 <desc>
1477 Array of machine objects registered within this VirtualBox instance.
1478 </desc>
1479 </attribute>
1480
1481 <attribute name="hardDisks" type="IHardDisk" readonly="yes" safearray="yes">
1482 <desc>
1483 Array of hard disk objects known to this VirtualBox installation.
1484
1485 This array contains only base (root) hard disks. All differencing
1486 hard disks of the given base hard disk can be enumerated using
1487 <link to="IHardDisk::children"/>.
1488 </desc>
1489 </attribute>
1490
1491 <attribute name="DVDImages" type="IDVDImage" readonly="yes" safearray="yes">
1492 <desc>
1493 Array of CD/DVD image objects registered with this VirtualBox instance.
1494 </desc>
1495 </attribute>
1496
1497 <attribute name="floppyImages" type="IFloppyImage" readonly="yes" safearray="yes">
1498 <desc>
1499 Array of floppy image objects registered with this VirtualBox instance.
1500 </desc>
1501 </attribute>
1502
1503 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1504
1505 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1506
1507 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1508 <desc>
1509 Collection of global shared folders. Global shared folders are
1510 available to all virtual machines.
1511
1512 New shared folders are added to the collection using
1513 <link to="#createSharedFolder"/>. Existing shared folders can be
1514 removed using <link to="#removeSharedFolder"/>.
1515
1516 <note>
1517 In the current version of the product, global shared folders are not
1518 implemented and therefore this collection is always empty.
1519 </note>
1520 </desc>
1521 </attribute>
1522
1523 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1524 <desc>
1525 Associated performance collector object.
1526 </desc>
1527 </attribute>
1528
1529 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1530 <desc>
1531 dhcp server settings.
1532 </desc>
1533 </attribute>
1534
1535 <method name="createMachine">
1536 <desc>
1537 Creates a new virtual machine.
1538
1539 The new machine is created unregistered, with the initial configuration
1540 set according to the specified guest OS type. A typical sequence of
1541 actions to create a new virtual machine is as follows:
1542
1543 <ol>
1544 <li>
1545 Call this method to have a new machine created. The returned machine
1546 object will be "mutable" allowing to change any machine property.
1547 </li>
1548
1549 <li>
1550 Configure the machine using the appropriate attributes and methods.
1551 </li>
1552
1553 <li>
1554 Call <link to="IMachine::saveSettings" /> to write the settings
1555 to the machine's XML settings file. The configuration of the newly
1556 created machine will not be saved to disk until this method is
1557 called.
1558 </li>
1559
1560 <li>
1561 Call <link to="#registerMachine" /> to add the machine to the list
1562 of machines known to VirtualBox.
1563 </li>
1564 </ol>
1565
1566 You should specify valid name for the newly created machine when calling
1567 this method. See the <link to="IMachine::name"/> attribute description
1568 for more details about the machine name.
1569
1570 The specified guest OS type identifier must match an ID of one of known
1571 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1572 array.
1573
1574 Every machine has a <i>settings file</i> that is used to store
1575 the machine configuration. This file is stored in a directory called the
1576 <i>machine settings subfolder</i>. Both the settings subfolder and file
1577 will have a name that corresponds to the name of the virtual machine.
1578 You can specify where to create the machine setting subfolder using the
1579 @a baseFolder argument. The base folder can be absolute (full path) or
1580 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1581 directory</link>.
1582
1583 If @a baseFolder is a null or empty string (which is recommended), the
1584 <link to="ISystemProperties::defaultMachineFolder">default machine
1585 settings folder</link> will be used as a base folder for the created
1586 machine. Otherwise the given base folder will be used. In either case,
1587 the full path to the resulting settings file has the following
1588 structure:
1589 <pre>
1590 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1591 </pre>
1592
1593 Note that if the resulting settings file already exists, this method
1594 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1595
1596 Optionally, you may specify an UUID of to assign to the created machine.
1597 However, this is not recommended and you should normally pass an empty
1598 (null) UUID to this method so that a new UUID will be automatically
1599 generated for every created machine. You can use UUID
1600 00000000-0000-0000-0000-000000000000 as null value.
1601
1602 <note>
1603 There is no way to change the name of the settings file or
1604 subfolder of the created machine directly.
1605 </note>
1606
1607 <result name="VBOX_E_OBJECT_NOT_FOUND">
1608 @a osTypeId is invalid.
1609 </result>
1610 <result name="VBOX_E_FILE_ERROR">
1611 Resulting settings file name is invalid or the settings file already
1612 exists or could not be created due to an I/O error.
1613 </result>
1614 <result name="E_INVALIDARG">
1615 @a name is empty or null.
1616 </result>
1617 </desc>
1618
1619 <param name="name" type="wstring" dir="in">
1620 <desc>Machine name.</desc>
1621 </param>
1622 <param name="osTypeId" type="wstring" dir="in">
1623 <desc>Guest OS Type ID.</desc>
1624 </param>
1625 <param name="baseFolder" type="wstring" dir="in">
1626 <desc>Base machine folder (optional).</desc>
1627 </param>
1628 <param name="id" type="uuid" dir="in">
1629 <desc>Machine UUID (optional).</desc>
1630 </param>
1631 <param name="machine" type="IMachine" dir="return">
1632 <desc>Created machine object.</desc>
1633 </param>
1634 </method>
1635
1636 <method name="createLegacyMachine">
1637 <desc>
1638 Creates a new virtual machine in "legacy" mode, using the specified
1639 settings file to store machine settings.
1640
1641 As opposed to machines created by <link to="#createMachine"/>,
1642 the settings file of the machine created in "legacy" mode is not
1643 automatically renamed when the machine name is changed -- it will always
1644 remain the same as specified in this method call.
1645
1646 The specified settings file name can be absolute (full path) or relative
1647 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1648 directory</link>. If the file name doesn't contain an extension, the
1649 default extension (.xml) will be appended.
1650
1651 Note that the configuration of the newly created machine is not
1652 saved to disk (and therefore no settings file is created)
1653 until <link to="IMachine::saveSettings"/> is called. If the
1654 specified settings file already exists, this method
1655 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1656
1657 See <link to="#createMachine"/> for more information.
1658
1659 @deprecated This method may be removed later. Use <link
1660 to="IVirtualBox::createMachine"/> instead.
1661
1662 <note>
1663 There is no way to change the name of the settings file
1664 of the machine created in "legacy" mode.
1665 </note>
1666
1667 <result name="VBOX_E_OBJECT_NOT_FOUND">
1668 @a osTypeId is invalid.
1669 </result>
1670 <result name="VBOX_E_FILE_ERROR">
1671 @a settingsFile is invalid or the settings file already exists or
1672 could not be created due to an I/O error.
1673 </result>
1674 <result name="E_INVALIDARG">
1675 @a name or @a settingsFile is empty or null.
1676 </result>
1677 </desc>
1678
1679 <param name="name" type="wstring" dir="in">
1680 <desc>Machine name.</desc>
1681 </param>
1682 <param name="osTypeId" type="wstring" dir="in">
1683 <desc>Machine OS Type ID.</desc>
1684 </param>
1685 <param name="settingsFile" type="wstring" dir="in">
1686 <desc>Name of the machine settings file.</desc>
1687 </param>
1688 <param name="id" type="uuid" dir="in">
1689 <desc>Machine UUID (optional).</desc>
1690 </param>
1691 <param name="machine" type="IMachine" dir="return">
1692 <desc>Created machine object.</desc>
1693 </param>
1694 </method>
1695
1696 <method name="openMachine">
1697 <desc>
1698 Opens a virtual machine from the existing settings file.
1699 The opened machine remains unregistered until you call
1700 <link to="#registerMachine"/>.
1701
1702 The specified settings file name can be absolute
1703 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1704 VirtualBox home directory</link>. This file must exist
1705 and must be a valid machine settings file whose contents
1706 will be used to construct the machine object.
1707
1708 @deprecated Will be removed soon.
1709 <result name="VBOX_E_FILE_ERROR">
1710 Settings file name invalid, not found or sharing violation.
1711 </result>
1712 </desc>
1713 <param name="settingsFile" type="wstring" dir="in">
1714 <desc>
1715 Name of the machine settings file.
1716 </desc>
1717 </param>
1718 <param name="machine" type="IMachine" dir="return">
1719 <desc>Opened machine object.</desc>
1720 </param>
1721 <note>
1722 <link to="IMachine::settingsModified"/> will return
1723 false for the created machine, until any of machine settings
1724 are changed.
1725 </note>
1726 </method>
1727
1728 <method name="registerMachine">
1729 <desc>
1730
1731 Registers the machine previously created using
1732 <link to="#createMachine"/> or opened using
1733 <link to="#openMachine"/> within this VirtualBox installation. After
1734 successful method invocation, the
1735 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1736 to all registered callbacks.
1737
1738 <note>
1739 This method implicitly calls <link to="IMachine::saveSettings"/>
1740 to save all current machine settings before registering it.
1741 </note>
1742
1743 <result name="VBOX_E_OBJECT_NOT_FOUND">
1744 No matching virtual machine found.
1745 </result>
1746 <result name="VBOX_E_INVALID_OBJECT_STATE">
1747 Virtual machine was not created within this VirtualBox instance.
1748 </result>
1749
1750 </desc>
1751 <param name="machine" type="IMachine" dir="in"/>
1752 </method>
1753
1754 <method name="getMachine">
1755 <desc>
1756 Attempts to find a virtual machine given its UUID.
1757 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1758 instead.
1759
1760 <result name="VBOX_E_OBJECT_NOT_FOUND">
1761 Could not find registered machine matching @a id.
1762 </result>
1763
1764 </desc>
1765 <param name="id" type="uuid" dir="in"/>
1766 <param name="machine" type="IMachine" dir="return"/>
1767 </method>
1768
1769 <method name="findMachine">
1770 <desc>
1771 Attempts to find a virtual machine given its name.
1772 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1773 instead.
1774
1775 <result name="VBOX_E_OBJECT_NOT_FOUND">
1776 Could not find registered machine matching @a name.
1777 </result>
1778
1779 </desc>
1780 <param name="name" type="wstring" dir="in"/>
1781 <param name="machine" type="IMachine" dir="return"/>
1782 </method>
1783
1784 <method name="unregisterMachine">
1785 <desc>
1786
1787 Unregisters the machine previously registered using
1788 <link to="#registerMachine"/>. After successful method invocation, the
1789 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1790 to all registered callbacks.
1791
1792 <note>
1793 The specified machine must not be in the Saved state, have an open
1794 (or a spawning) direct session associated with it, have snapshots or
1795 have hard disks attached.
1796 </note>
1797
1798 <note>
1799 This method implicitly calls <link to="IMachine::saveSettings"/> to
1800 save all current machine settings before unregistering it.
1801 </note>
1802
1803 <note>
1804 If the given machine is inaccessible (see
1805 <link to="IMachine::accessible"/>), it will be unregistered and
1806 fully uninitialized right afterwards. As a result, the returned
1807 machine object will be unusable and an attempt to call
1808 <b>any</b> method will return the "Object not ready" error.
1809 </note>
1810
1811 <result name="VBOX_E_OBJECT_NOT_FOUND">
1812 Could not find registered machine matching @a id.
1813 </result>
1814 <result name="VBOX_E_INVALID_VM_STATE">
1815 Machine is in Saved state.
1816 </result>
1817 <result name="VBOX_E_INVALID_OBJECT_STATE">
1818 Machine has snapshot or open session or hard disk attached.
1819 </result>
1820
1821 </desc>
1822 <param name="id" type="uuid" dir="in">
1823 <desc>UUID of the machine to unregister.</desc>
1824 </param>
1825 <param name="machine" type="IMachine" dir="return">
1826 <desc>Unregistered machine object.</desc>
1827 </param>
1828 </method>
1829
1830 <method name="createAppliance">
1831 <desc>
1832 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1833 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1834 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1835 </desc>
1836 <param name="appliance" type="IAppliance" dir="return">
1837 <desc>New appliance.</desc>
1838 </param>
1839 </method>
1840
1841 <method name="createHardDisk">
1842 <desc>
1843 Creates a new base hard disk object that will use the given storage
1844 format and location for hard disk data.
1845
1846 Note that the actual storage unit is not created by this method. In
1847 order to do it, and before you are able to attach the created hard disk
1848 to virtual machines, you must call one of the following methods to
1849 allocate a format-specific storage unit at the specified location:
1850 <ul>
1851 <li><link to="IHardDisk::createBaseStorage"/></li>
1852 <li><link to="IHardDisk::createDiffStorage"/></li>
1853 </ul>
1854
1855 Some hard disk attributes, such as <link to="IHardDisk::id"/>, may
1856 remain uninitialized until the hard disk storage unit is successfully
1857 created by one of the above methods.
1858
1859 After the storage unit is successfully created, the hard disk gets
1860 remembered by this VirtualBox installation and will be accessible
1861 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1862 methods. Remembered root (base) hard disks are also returned as part of
1863 the <link to="#hardDisks"/> array. See IHardDisk for more details.
1864
1865 The list of all storage formats supported by this VirtualBox
1866 installation can be obtained using
1867 <link to="ISystemProperties::hardDiskFormats"/>. If the @a format
1868 attribute is empty or <tt>null</tt> then the default storage format
1869 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1870 be used for creating a storage unit of the hard disk.
1871
1872 Note that the format of the location string is storage format specific.
1873 See <link to="IMedium::location"/>, IHardDisk and
1874 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1875
1876 <result name="VBOX_E_OBJECT_NOT_FOUND">
1877 @a format identifier is invalid. See
1878 <link to="ISystemProperties::hardDiskFormats"/>.
1879 </result>
1880 <result name="VBOX_E_FILE_ERROR">
1881 @a location is a not valid file name (for file-based formats only).
1882 </result>
1883 <result name="E_INVALIDARG">
1884 @a format is a null or empty string.
1885 </result>
1886 </desc>
1887 <param name="format" type="wstring" dir="in">
1888 <desc>
1889 Identifier of the storage format to use for the new hard disk.
1890 </desc>
1891 </param>
1892 <param name="location" type="wstring" dir="in">
1893 <desc>
1894 Location of the storage unit for the new hard disk.
1895 </desc>
1896 </param>
1897 <param name="hardDisk" type="IHardDisk" dir="return">
1898 <desc>Created hard disk object.</desc>
1899 </param>
1900 </method>
1901
1902 <method name="openHardDisk">
1903 <desc>
1904 Opens a hard disk from an existing location.
1905
1906 After the hard disk is successfully opened by this method, it gets
1907 remembered by (known to) this VirtualBox installation and will be
1908 accessible through <link to="#getHardDisk"/> and
1909 <link to="#findHardDisk"/> methods. Remembered root (base) hard disks
1910 are also returned as part of the <link to="#hardDisks"/> array and can
1911 be attached to virtual machines. See IHardDisk for more details.
1912
1913 If a differencing hard disk is to be opened by this method, the
1914 operation will succeed only if its parent hard disk and all ancestors,
1915 if any, are already known to this VirtualBox installation (for example,
1916 were opened by this method before).
1917
1918 This method tries to guess the storage format of the specified hard disk
1919 by reading hard disk data at the specified location.
1920
1921 If @a write is ReadWrite (which it should be), the image is opened for
1922 read/write access and must have according permissions, as VirtualBox
1923 may actually write status information into the disk's metadata sections.
1924
1925 Note that write access is required for all typical image usage in VirtualBox,
1926 since VirtualBox may need to write metadata such as a UUID into the image.
1927 The only exception is opening a source image temporarily for copying and
1928 cloning when the image will quickly be closed again.
1929
1930 Note that the format of the location string is storage format specific.
1931 See <link to="IMedium::location"/>, IHardDisk and
1932 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1933
1934 <result name="VBOX_E_FILE_ERROR">
1935 Invalid hard disk storage file location or could not find the hard
1936 disk at the specified location.
1937 </result>
1938 <result name="VBOX_E_IPRT_ERROR">
1939 Could not get hard disk storage format.
1940 </result>
1941 <result name="E_INVALIDARG">
1942 Invalid hard disk storage format.
1943 </result>
1944
1945 </desc>
1946 <param name="location" type="wstring" dir="in">
1947 <desc>
1948 Location of the storage unit that contains hard disk data in one of
1949 the supported storage formats.
1950 </desc>
1951 </param>
1952 <param name="accessMode" type="AccessMode" dir="in">
1953 <desc>
1954 Determines whether to open the image in read/write or read-only mode.
1955 </desc>
1956 </param>
1957 <param name="hardDisk" type="IHardDisk" dir="return">
1958 <desc>Opened hard disk object.</desc>
1959 </param>
1960 </method>
1961
1962 <method name="getHardDisk" const="yes">
1963 <desc>
1964 Returns a hard disk with the given UUID.
1965
1966 The hard disk with the given UUID must be known to this VirtualBox
1967 installation, i.e. it must be previously created by
1968 <link to="#createHardDisk"/> or opened by <link
1969 to="#openHardDisk"/>, or attached to some known virtual machine.
1970
1971 <result name="VBOX_E_OBJECT_NOT_FOUND">
1972 No hard disk object matching @a id found.
1973 </result>
1974
1975 </desc>
1976 <param name="id" type="uuid" dir="in">
1977 <desc>UUID of the hard disk to look for.</desc>
1978 </param>
1979 <param name="hardDisk" type="IHardDisk" dir="return">
1980 <desc>Found hard disk object.</desc>
1981 </param>
1982 </method>
1983
1984 <method name="findHardDisk">
1985 <desc>
1986 Returns a hard disk that uses the given location to store hard
1987 disk data.
1988
1989 The given hard disk must be known to this VirtualBox installation, i.e.
1990 it must be previously created by
1991 <link to="#createHardDisk"/> or opened by <link
1992 to="#openHardDisk"/>, or attached to some known virtual machine.
1993
1994 The search is done by comparing the value of the @a location argument to
1995 the <link to="IHardDisk::location"/> attribute of each known hard
1996 disk.
1997
1998 For locations represented by file names in the host's file system, the
1999 requested location can be a path relative to the
2000 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2001 only a file name without any path is given, the
2002 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2003 folder</link> will be prepended to the file name before searching. Note
2004 that on case sensitive file systems, a case sensitive comparison is
2005 performed, otherwise the case of symbols in the file path is ignored.
2006
2007 <result name="VBOX_E_OBJECT_NOT_FOUND">
2008 No hard disk object matching @a location found.
2009 </result>
2010
2011 </desc>
2012 <param name="location" type="wstring" dir="in">
2013 <desc>Location string to search for.</desc>
2014 </param>
2015 <param name="hardDisk" type="IHardDisk" dir="return">
2016 <desc>Found hard disk object.</desc>
2017 </param>
2018 </method>
2019
2020 <method name="openDVDImage">
2021 <desc>
2022 Opens a CD/DVD image contained in the specified file of the supported
2023 format and assigns it the given UUID.
2024
2025 After the image is successfully opened by this method, it gets
2026 remembered by (known to) this VirtualBox installation and will be
2027 accessible through <link to="#getDVDImage"/> and
2028 <link to="#findDVDImage"/> methods. Remembered images are also
2029 returned as part of the <link to="#DVDImages"/> array and can be mounted
2030 to virtual machines. See IMedium for more details.
2031
2032 See <link to="IMedium::location"/> to get more details about the format
2033 of the location string.
2034
2035 <note>
2036 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2037 </note>
2038
2039 <result name="VBOX_E_FILE_ERROR">
2040 Invalid CD/DVD image file location or could not find the CD/DVD
2041 image at the specified location.
2042 </result>
2043 <result name="VBOX_E_INVALID_OBJECT_STATE">
2044 CD/DVD image already exists in the media registry.
2045 </result>
2046
2047 </desc>
2048 <param name="location" type="wstring" dir="in">
2049 <desc>
2050 Full path to the file that contains a valid CD/DVD image.
2051 </desc>
2052 </param>
2053 <param name="id" type="uuid" dir="in">
2054 <desc>
2055 UUID to assign to the given image within this VirtualBox installation.
2056 If an empty (null) UUID is specified, the system will randomly
2057 generate a new UUID.
2058 </desc>
2059 </param>
2060 <param name="image" type="IDVDImage" dir="return">
2061 <desc>Opened CD/DVD image object.</desc>
2062 </param>
2063 </method>
2064
2065 <method name="getDVDImage">
2066 <desc>
2067 Returns a CD/DVD image with the given UUID.
2068
2069 The image with the given UUID must be known to this VirtualBox
2070 installation, i.e. it must be previously opened by <link
2071 to="#openDVDImage"/>, or mounted to some known virtual machine.
2072
2073 <result name="VBOX_E_OBJECT_NOT_FOUND">
2074 No matching DVD image found in the media registry.
2075 </result>
2076
2077 </desc>
2078 <param name="id" type="uuid" dir="in">
2079 <desc>UUID of the image to look for.</desc>
2080 </param>
2081 <param name="image" type="IDVDImage" dir="return">
2082 <desc>Found CD/DVD image object.</desc>
2083 </param>
2084 </method>
2085
2086 <method name="findDVDImage">
2087 <desc>
2088 Returns a CD/DVD image with the given image location.
2089
2090 The image with the given UUID must be known to this VirtualBox
2091 installation, i.e. it must be previously opened by <link
2092 to="#openDVDImage"/>, or mounted to some known virtual machine.
2093
2094 The search is done by comparing the value of the @a location argument to
2095 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2096
2097 The requested location can be a path relative to the
2098 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2099 only a file name without any path is given, the
2100 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2101 folder</link> will be prepended to the file name before searching. Note
2102 that on case sensitive file systems, a case sensitive comparison is
2103 performed, otherwise the case in the file path is ignored.
2104
2105 <result name="VBOX_E_FILE_ERROR">
2106 Invalid image file location.
2107 </result>
2108 <result name="VBOX_E_OBJECT_NOT_FOUND">
2109 No matching DVD image found in the media registry.
2110 </result>
2111
2112 </desc>
2113 <param name="location" type="wstring" dir="in">
2114 <desc>CD/DVD image file path to look for.</desc>
2115 </param>
2116 <param name="image" type="IDVDImage" dir="return">
2117 <desc>Found CD/DVD image object.</desc>
2118 </param>
2119 </method>
2120
2121 <method name="openFloppyImage">
2122 <desc>
2123 Opens a floppy image contained in the specified file of the supported
2124 format and assigns it the given UUID.
2125
2126 After the image is successfully opened by this method, it gets
2127 remembered by (known to) this VirtualBox installation and will be
2128 accessible through <link to="#getFloppyImage"/> and
2129 <link to="#findFloppyImage"/> methods. Remembered images are also
2130 returned as part of the <link to="#floppyImages"/> array and can be
2131 mounted to virtual machines. See IMedium for more details.
2132
2133 See <link to="IMedium::location"/> to get more details about the format
2134 of the location string.
2135
2136 <result name="VBOX_E_FILE_ERROR">
2137 Invalid floppy image file location or could not find the floppy
2138 image at the specified location.
2139 </result>
2140 <result name="VBOX_E_INVALID_OBJECT_STATE">
2141 Floppy image already exists in the media registry.
2142 </result>
2143
2144 <note>
2145 Currently, only raw floppy images are supported by VirtualBox.
2146 </note>
2147 </desc>
2148 <param name="location" type="wstring" dir="in">
2149 <desc>
2150 Full path to the file that contains a valid floppy image.
2151 </desc>
2152 </param>
2153 <param name="id" type="uuid" dir="in">
2154 <desc>
2155 UUID to assign to the given image file within this VirtualBox
2156 installation. If an empty (null) UUID is specified, the system will
2157 randomly generate a new UUID.
2158 </desc>
2159 </param>
2160 <param name="image" type="IFloppyImage" dir="return">
2161 <desc>Opened floppy image object.</desc>
2162 </param>
2163 </method>
2164
2165 <method name="getFloppyImage">
2166 <desc>
2167 Returns a floppy image with the given UUID.
2168
2169 The image with the given UUID must be known to this VirtualBox
2170 installation, i.e. it must be previously opened by <link
2171 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2172
2173 <result name="VBOX_E_OBJECT_NOT_FOUND">
2174 No matching floppy image found in the media registry.
2175 </result>
2176
2177 </desc>
2178 <param name="id" type="uuid" dir="in">
2179 <desc>UUID of the image to look for.</desc>
2180 </param>
2181 <param name="image" type="IFloppyImage" dir="return">
2182 <desc>Found floppy image object.</desc>
2183 </param>
2184 </method>
2185
2186 <method name="findFloppyImage">
2187 <desc>
2188 Returns a floppy image with the given image location.
2189
2190 The image with the given UUID must be known to this VirtualBox
2191 installation, i.e. it must be previously opened by <link
2192 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2193
2194 The search is done by comparing the value of the @a location argument to
2195 the <link to="IMedium::location"/> attribute of each known floppy image.
2196
2197 The requested location can be a path relative to the
2198 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2199 only a file name without any path is given, the
2200 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2201 folder</link> will be prepended to the file name before searching. Note
2202 that on case sensitive file systems, a case sensitive comparison is
2203 performed, otherwise the case of symbols in the file path is ignored.
2204
2205 <result name="VBOX_E_FILE_ERROR">
2206 Invalid image file location.
2207 </result>
2208 <result name="VBOX_E_OBJECT_NOT_FOUND">
2209 No matching floppy image found in the media registry.
2210 </result>
2211
2212 </desc>
2213 <param name="location" type="wstring" dir="in">
2214 <desc>Floppy image file path to look for.</desc>
2215 </param>
2216 <param name="image" type="IFloppyImage" dir="return">
2217 <desc>Found floppy image object.</desc>
2218 </param>
2219 </method>
2220
2221 <method name="getGuestOSType">
2222 <desc>
2223 Returns an object describing the specified guest OS type.
2224
2225 The requested guest OS type is specified using a string which is a
2226 mnemonic identifier of the guest operating system, such as
2227 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2228 particular virtual machine can be read or set using the
2229 <link to="IMachine::OSTypeId"/> attribute.
2230
2231 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2232 available guest OS type objects. Each object has an
2233 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2234 the guest OS this object describes.
2235
2236 <result name="E_INVALIDARG">
2237 @a id is not a valid Guest OS type.
2238 </result>
2239
2240 </desc>
2241 <param name="id" type="wstring" dir="in">
2242 <desc>Guest OS type ID string.</desc>
2243 </param>
2244 <param name="type" type="IGuestOSType" dir="return">
2245 <desc>Guest OS type object.</desc>
2246 </param>
2247 </method>
2248
2249 <method name="createSharedFolder">
2250 <desc>
2251 Creates a new global shared folder by associating the given logical
2252 name with the given host path, adds it to the collection of shared
2253 folders and starts sharing it. Refer to the description of
2254 <link to="ISharedFolder"/> to read more about logical names.
2255 <note>
2256 In the current implementation, this operation is not
2257 implemented.
2258 </note>
2259 </desc>
2260 <param name="name" type="wstring" dir="in">
2261 <desc>Unique logical name of the shared folder.</desc>
2262 </param>
2263 <param name="hostPath" type="wstring" dir="in">
2264 <desc>Full path to the shared folder in the host file system.</desc>
2265 </param>
2266 <param name="writable" type="boolean" dir="in">
2267 <desc>Whether the share is writable or readonly</desc>
2268 </param>
2269 </method>
2270
2271 <method name="removeSharedFolder">
2272 <desc>
2273 Removes the global shared folder with the given name previously
2274 created by <link to="#createSharedFolder"/> from the collection of
2275 shared folders and stops sharing it.
2276 <note>
2277 In the current implementation, this operation is not
2278 implemented.
2279 </note>
2280 </desc>
2281 <param name="name" type="wstring" dir="in">
2282 <desc>Logical name of the shared folder to remove.</desc>
2283 </param>
2284 </method>
2285
2286 <method name="getNextExtraDataKey">
2287 <desc>
2288 Returns the global extra data key name following the supplied key.
2289
2290 An error is returned if the supplied @a key does not exist. @c NULL is
2291 returned in @a nextKey if the supplied key is the last key. When
2292 supplying @c NULL or an empty string for the @a key, the first key item
2293 is returned in @a nextKey (if there is any). @a nextValue is an optional
2294 parameter and if supplied, the next key's value is returned in it.
2295
2296 <result name="VBOX_E_OBJECT_NOT_FOUND">
2297 Extra data @a key not found.
2298 </result>
2299
2300 </desc>
2301 <param name="key" type="wstring" dir="in">
2302 <desc>Name of the data key to follow.</desc>
2303 </param>
2304 <param name="nextKey" type="wstring" dir="out">
2305 <desc>Name of the next data key.</desc>
2306 </param>
2307 <param name="nextValue" type="wstring" dir="out">
2308 <desc>Value of the next data key.</desc>
2309 </param>
2310 </method>
2311
2312 <method name="getExtraData">
2313 <desc>
2314 Returns associated global extra data.
2315
2316 If the requested data @a key does not exist, this function will
2317 succeed and return @c NULL in the @a value argument.
2318
2319 <result name="VBOX_E_FILE_ERROR">
2320 Settings file not accessible.
2321 </result>
2322 <result name="VBOX_E_XML_ERROR">
2323 Could not parse the settings file.
2324 </result>
2325
2326 </desc>
2327 <param name="key" type="wstring" dir="in">
2328 <desc>Name of the data key to get.</desc>
2329 </param>
2330 <param name="value" type="wstring" dir="return">
2331 <desc>Value of the requested data key.</desc>
2332 </param>
2333 </method>
2334
2335 <method name="setExtraData">
2336 <desc>
2337 Sets associated global extra data.
2338
2339 If you pass @c NULL as a key @a value, the given @a key will be
2340 deleted.
2341
2342 <note>
2343 Before performing the actual data change, this method will ask all
2344 registered callbacks using the
2345 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2346 notification for a permission. If one of the callbacks refuses the
2347 new value, the change will not be performed.
2348 </note>
2349 <note>
2350 On success, the
2351 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2352 is called to inform all registered callbacks about a successful data
2353 change.
2354 </note>
2355
2356 <result name="VBOX_E_FILE_ERROR">
2357 Settings file not accessible.
2358 </result>
2359 <result name="VBOX_E_XML_ERROR">
2360 Could not parse the settings file.
2361 </result>
2362 <result name="E_ACCESSDENIED">
2363 Modification request refused.
2364 </result>
2365
2366 </desc>
2367 <param name="key" type="wstring" dir="in">
2368 <desc>Name of the data key to set.</desc>
2369 </param>
2370 <param name="value" type="wstring" dir="in">
2371 <desc>Value to assign to the key.</desc>
2372 </param>
2373 </method>
2374
2375 <method name="openSession">
2376 <desc>
2377 Opens a new direct session with the given virtual machine.
2378
2379 A direct session acts as a local lock on the given VM.
2380 There can be only one direct session open at a time for every
2381 virtual machine, protecting the VM from being manipulated by
2382 conflicting actions from different processes. Only after a
2383 direct session has been opened, one can change all VM settings
2384 and execute the VM in the process space of the session object.
2385
2386 Sessions therefore can be compared to mutex semaphores that
2387 lock a given VM for modification and execution.
2388 See <link to="ISession">ISession</link> for details.
2389
2390 <note>Unless you are writing a new VM frontend, you will not
2391 want to execute a VM in the current process. To spawn a new
2392 process that executes a VM, use
2393 <link to="IVirtualBox::openRemoteSession" />
2394 instead.</note>
2395
2396 Upon successful return, the session object can be used to
2397 get access to the machine and to the VM console.
2398
2399 In VirtualBox terminology, the machine becomes "mutable" after
2400 a session has been opened. Note that the "mutable" machine
2401 object, on which you may invoke IMachine methods to change its
2402 settings, will be a different object from the immutable IMachine
2403 objects returned by various IVirtualBox methods. To obtain a
2404 mutable IMachine object (upon which you can invoke settings methods),
2405 use the <link to="ISession::machine" /> attribute.
2406
2407 One must always call <link to="ISession::close" /> to release the
2408 lock on the machine, or the machine's state will eventually be
2409 set to "Aborted".
2410
2411 In other words, to change settings on a machine, the following
2412 sequence is typically performed:
2413
2414 <ol>
2415 <li>Call this method (openSession) to have a machine locked for
2416 the current session.</li>
2417
2418 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2419
2420 <li>Change the settings of the machine.</li>
2421
2422 <li>Call <link to="IMachine::saveSettings" />.</li>
2423
2424 <li>Close the session by calling <link to="ISession::close"/>.</li>
2425 </ol>
2426
2427 <result name="E_UNEXPECTED">
2428 Virtual machine not registered.
2429 </result>
2430 <result name="E_ACCESSDENIED">
2431 Process not started by OpenRemoteSession.
2432 </result>
2433 <result name="VBOX_E_OBJECT_NOT_FOUND">
2434 No matching virtual machine found.
2435 </result>
2436 <result name="VBOX_E_INVALID_OBJECT_STATE">
2437 Session already open or being opened.
2438 </result>
2439 <result name="VBOX_E_VM_ERROR">
2440 Failed to assign machine to session.
2441 </result>
2442
2443 </desc>
2444 <param name="session" type="ISession" dir="in">
2445 <desc>
2446 Session object that will represent the opened session after
2447 successful method invocation. This object must not represent
2448 the already open session.
2449 <note>
2450 This session will be automatically closed if the
2451 VirtualBox server is terminated for some reason.
2452 </note>
2453 </desc>
2454 </param>
2455 <param name="machineId" type="uuid" dir="in">
2456 <desc>ID of the virtual machine to open a session with.</desc>
2457 </param>
2458 </method>
2459
2460 <method name="openRemoteSession">
2461 <desc>
2462 Spawns a new process that executes a virtual machine (called a
2463 "remote session").
2464
2465 Opening a remote session causes the VirtualBox server to start a new
2466 process that opens a direct session with the given VM. As a result, the
2467 VM is locked by that direct session in the new process, preventing
2468 conflicting changes from other processes. Since sessions act as locks
2469 that prevent conflicting changes, one cannot open a remote session
2470 for a VM that already has another open session (direct or remote), or
2471 is currently in the process of opening one (see <link
2472 to="IMachine::sessionState"/>).
2473
2474 While the remote session still provides some level of control over the
2475 VM execution to the caller (using the <link to="IConsole" /> interface),
2476 not all VM settings are available for modification within the remote
2477 session context.
2478
2479 This operation can take some time (a new VM is started in a new process,
2480 for which memory and other resources need to be set up). Because of this,
2481 an <link to="IProgress" /> is returned to allow the caller to wait for this
2482 asynchronous operation to be completed. Until then, the remote session
2483 object remains in the closed state, and accessing the machine or its
2484 console through it is invalid. It is recommended to use
2485 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2486 completion.
2487
2488 As with all <link to="ISession" /> objects, it is recommended to call
2489 <link to="ISession::close" /> on the local session object once openRemoteSession()
2490 has been called. However, the session's state (see <link to="ISession::state" />)
2491 will not return to "Closed" until the remote session has also closed (i.e.
2492 until the VM is no longer running). In that case, however, the state of
2493 the session will automatically change back to "Closed".
2494
2495 Currently supported session types (values of the @a type
2496 argument) are:
2497 <ul>
2498 <li><tt>gui</tt>: VirtualBox Qt GUI session</li>
2499 <li><tt>vrdp</tt>: VirtualBox VRDP Server session</li>
2500 </ul>
2501
2502 The @a environment argument is a string containing definitions of
2503 environment variables in the following format:
2504 @code
2505 NAME[=VALUE]\n
2506 NAME[=VALUE]\n
2507 ...
2508 @endcode
2509 where <tt>\\n</tt> is the new line character. These environment
2510 variables will be appended to the environment of the VirtualBox server
2511 process. If an environment variable exists both in the server process
2512 and in this list, the value from this list takes precedence over the
2513 server's variable. If the value of the environment variable is
2514 omitted, this variable will be removed from the resulting environment.
2515 If the environment string is @c null, the server environment is
2516 inherited by the started process as is.
2517
2518 <see>openExistingSession</see>
2519
2520 <result name="E_UNEXPECTED">
2521 Virtual machine not registered.
2522 </result>
2523 <result name="E_INVALIDARG">
2524 Invalid session type @a type.
2525 </result>
2526 <result name="VBOX_E_OBJECT_NOT_FOUND">
2527 No machine matching @a machineId found.
2528 </result>
2529 <result name="VBOX_E_INVALID_OBJECT_STATE">
2530 Session already open or being opened.
2531 </result>
2532 <result name="VBOX_E_IPRT_ERROR">
2533 Launching process for machine failed.
2534 </result>
2535 <result name="VBOX_E_VM_ERROR">
2536 Failed to assign machine to session.
2537 </result>
2538
2539 </desc>
2540 <param name="session" type="ISession" dir="in">
2541 <desc>
2542 Session object that will represent the opened remote session
2543 after successful method invocation (this object must not
2544 represent an already open session).
2545 </desc>
2546 </param>
2547 <param name="machineId" type="uuid" dir="in">
2548 <desc>ID of the virtual machine to open a session with.</desc>
2549 </param>
2550 <param name="type" type="wstring" dir="in">
2551 <desc>
2552 Type of the remote session (case sensitive).
2553 </desc>
2554 </param>
2555 <param name="environment" type="wstring" dir="in">
2556 <desc>
2557 Environment to pass to the opened session (may be @c null).
2558 </desc>
2559 </param>
2560 <param name="progress" type="IProgress" dir="return">
2561 <desc>Progress object to track the operation completion.</desc>
2562 </param>
2563 </method>
2564
2565 <method name="openExistingSession">
2566 <desc>
2567 Opens a new remote session with the virtual machine for
2568 which a direct session is already open.
2569
2570 The remote session provides some level of control over the VM
2571 execution (using the IConsole interface) to the caller; however,
2572 within the remote session context, not all VM settings are available
2573 for modification.
2574
2575 As opposed to <link to="#openRemoteSession"/>, the number of
2576 remote sessions opened this way is not limited by the API
2577
2578 <note>
2579 It is an error to open a remote session with the machine that
2580 doesn't have an open direct session.
2581 </note>
2582
2583 <result name="E_UNEXPECTED">
2584 Virtual machine not registered.
2585 </result>
2586 <result name="VBOX_E_OBJECT_NOT_FOUND">
2587 No machine matching @a machineId found.
2588 </result>
2589 <result name="VBOX_E_INVALID_OBJECT_STATE">
2590 Session already open or being opened.
2591 </result>
2592 <result name="VBOX_E_INVALID_SESSION_STATE">
2593 Direct session state not Open.
2594 </result>
2595 <result name="VBOX_E_VM_ERROR">
2596 Failed to get console object from direct session or assign
2597 machine to session.
2598 </result>
2599
2600 <see>openRemoteSession</see>
2601 </desc>
2602 <param name="session" type="ISession" dir="in">
2603 <desc>
2604 Session object that will represent the open remote session
2605 after successful method invocation. This object must not
2606 represent an already open session.
2607 <note>
2608 This session will be automatically closed when the peer
2609 (direct) session dies or gets closed.
2610 </note>
2611 </desc>
2612 </param>
2613 <param name="machineId" type="uuid" dir="in">
2614 <desc>ID of the virtual machine to open a session with.</desc>
2615 </param>
2616 </method>
2617
2618 <method name="registerCallback">
2619 <desc>
2620 Registers a new global VirtualBox callback. The methods of the given
2621 callback object will be called by VirtualBox when an appropriate
2622 event occurs.
2623
2624 <result name="E_INVALIDARG">
2625 A @c NULL callback cannot be registered.
2626 </result>
2627
2628 </desc>
2629 <param name="callback" type="IVirtualBoxCallback" dir="in">
2630 <desc>Callback object to register.</desc>
2631 </param>
2632 </method>
2633
2634 <method name="unregisterCallback">
2635 <desc>
2636 Unregisters the previously registered global VirtualBox callback.
2637
2638 <result name="E_INVALIDARG">
2639 Specified @a callback not registered.
2640 </result>
2641
2642 </desc>
2643 <param name="callback" type="IVirtualBoxCallback" dir="in">
2644 <desc>Callback object to unregister.</desc>
2645 </param>
2646 </method>
2647
2648 <method name="waitForPropertyChange">
2649 <desc>
2650 Blocks the caller until any of the properties represented by the
2651 @a what argument changes the value or until the given timeout interval
2652 expires.
2653
2654 The @a what argument is a comma separated list of property masks that
2655 describe properties the caller is interested in. The property mask is
2656 a string in the following format:
2657
2658 <pre>
2659 [[group.]subgroup.]name
2660 </pre>
2661
2662 where @c name is the property name and @c group, @c subgroup are zero
2663 or more property group specifiers. Each element (group or name) in
2664 the property mask may be either a Latin string or an asterisk symbol
2665 (@c "*") which is used to match any string for the given element. A
2666 property mask that doesn't contain asterisk symbols represents a
2667 single fully qualified property name.
2668
2669 Groups in the fully qualified property name go from more generic (the
2670 left-most part) to more specific (the right-most part). The first
2671 element is usually a name of the object the property belongs to. The
2672 second element may be either a property name, or a child object name,
2673 or an index if the preceding element names an object which is one of
2674 many objects of the same type. This way, property names form a
2675 hierarchy of properties. Here are some examples of property names:
2676
2677 <table>
2678 <tr>
2679 <td><tt>VirtualBox.version</tt></td>
2680 <td><link to="IVirtualBox::version"/> property</td>
2681 </tr>
2682 <tr>
2683 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2684 <td><link to="IMachine::name"/> property of the machine with the
2685 given UUID</td>
2686 </tr>
2687 </table>
2688
2689 Most property names directly correspond to the properties of objects
2690 (components) provided by the VirtualBox library and may be used to
2691 track changes to these properties. However, there may be
2692 pseudo-property names that don't correspond to any existing object's
2693 property directly, as well as there may be object properties that
2694 don't have a corresponding property name that is understood by this
2695 method, and therefore changes to such properties cannot be
2696 tracked. See individual object's property descriptions to get a
2697 fully qualified property name that can be used with this method (if
2698 any).
2699
2700 There is a special property mask @c "*" (i.e. a string consisting of a
2701 single asterisk symbol) that can be used to match all properties.
2702 Below are more examples of property masks:
2703
2704 <table>
2705 <tr>
2706 <td><tt>VirtualBox.*</tt></td>
2707 <td>Track all properties of the VirtualBox object</td>
2708 </tr>
2709 <tr>
2710 <td><tt>Machine.*.name</tt></td>
2711 <td>Track changes to the <link to="IMachine::name"/> property of
2712 all registered virtual machines</td>
2713 </tr>
2714 </table>
2715
2716 <note>
2717 This function is not implemented in the current version of the
2718 product.
2719 </note>
2720 </desc>
2721 <param name="what" type="wstring" dir="in">
2722 <desc>Comma separated list of property masks.</desc>
2723 </param>
2724 <param name="timeout" type="unsigned long" dir="in">
2725 <desc>
2726 Wait timeout in milliseconds.
2727 Specify -1 for an indefinite wait.
2728 </desc>
2729 </param>
2730 <param name="changed" type="wstring" dir="out">
2731 <desc>
2732 Comma separated list of properties that have been changed and caused
2733 this method to return to the caller.
2734 </desc>
2735 </param>
2736 <param name="values" type="wstring" dir="out">
2737 <desc>Reserved, not currently used.</desc>
2738 </param>
2739 </method>
2740
2741 <method name="saveSettings">
2742 <desc>
2743 Saves the global settings to the global settings file
2744 (<link to="#settingsFilePath"/>).
2745
2746 This method is only useful for explicitly saving the global settings
2747 file after it has been auto-converted from the old format to the most
2748 recent format (see <link to="#settingsFileVersion"/> for details).
2749 Normally, the global settings file is implicitly saved when a global
2750 setting is changed.
2751
2752 <result name="VBOX_E_FILE_ERROR">
2753 Settings file not accessible.
2754 </result>
2755 <result name="VBOX_E_XML_ERROR">
2756 Could not parse the settings file.
2757 </result>
2758
2759 </desc>
2760 </method>
2761
2762 <method name="saveSettingsWithBackup">
2763 <desc>
2764 Creates a backup copy of the global settings file
2765 (<link to="IVirtualBox::settingsFilePath"/>) in case of auto-conversion,
2766 and then calls <link to="IVirtualBox::saveSettings"/>.
2767
2768 Note that the backup copy is created <b>only</b> if the settings file
2769 auto-conversion took place (see <link to="#settingsFileVersion"/> for
2770 details). Otherwise, this call is fully equivalent to
2771 <link to="IVirtualBox::saveSettings"/> and no backup copying is done.
2772
2773 The backup copy is created in the same directory where the original
2774 settings file is located. It is given the following file name:
2775 <pre>
2776 original.xml.x.y-platform.bak
2777 </pre>
2778 where <tt>original.xml</tt> is the original settings file name
2779 (excluding path), and <tt>x.y-platform</tt> is the version of the old
2780 format of the settings file (before auto-conversion).
2781
2782 If the given backup file already exists, this method will try to add the
2783 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
2784 0 to 9) and copy it again until it succeeds. If all suffixes are
2785 occupied, or if any other copy error occurs, this method will return a
2786 failure.
2787
2788 If the copy operation succeeds, the @a bakFileName return argument will
2789 receive a full path to the created backup file (for informational
2790 purposes). Note that this will happen even if the subsequent
2791 <link to="#saveSettings"/> call performed by this method after the
2792 copy operation, fails.
2793
2794 <note>
2795 The VirtualBox API never calls this method. It is intended purely for
2796 the purposes of creating backup copies of the settings files by
2797 front-ends before saving the results of the automatically performed
2798 settings conversion to disk.
2799 </note>
2800
2801 <see>settingsFileVersion</see>
2802
2803 <result name="VBOX_E_FILE_ERROR">
2804 Settings file not accessible.
2805 </result>
2806 <result name="VBOX_E_XML_ERROR">
2807 Could not parse the settings file.
2808 </result>
2809 <result name="VBOX_E_IPRT_ERROR">
2810 Could not copy the settings file.
2811 </result>
2812
2813 </desc>
2814 <param name="bakFileName" type="wstring" dir="return">
2815 <desc>Full path to the created backup copy.</desc>
2816 </param>
2817 </method>
2818
2819 <!--method name="createDHCPServerForInterface">
2820 <desc>
2821 Creates a dhcp server settings to be used for the given interface
2822 <result name="E_INVALIDARG">
2823 Host network interface @a name already exists.
2824 </result>
2825 </desc>
2826 <param name="interface" type="IHostNetworkInterface" dir="in">
2827 <desc>Network Interface</desc>
2828 </param>
2829 <param name="server" type="IDHCPServer" dir="out">
2830 <desc>Dhcp server settings</desc>
2831 </param>
2832 </method-->
2833
2834 <method name="createDHCPServer">
2835 <desc>
2836 Creates a dhcp server settings to be used for the given internal network name
2837 <result name="E_INVALIDARG">
2838 Host network interface @a name already exists.
2839 </result>
2840 </desc>
2841 <param name="name" type="wstring" dir="in">
2842 <desc>server name</desc>
2843 </param>
2844 <param name="server" type="IDHCPServer" dir="return">
2845 <desc>Dhcp server settings</desc>
2846 </param>
2847 </method>
2848
2849 <method name="findDHCPServerByNetworkName">
2850 <desc>
2851 Searches a dhcp server settings to be used for the given internal network name
2852 <result name="E_INVALIDARG">
2853 Host network interface @a name already exists.
2854 </result>
2855
2856 </desc>
2857 <param name="name" type="wstring" dir="in">
2858 <desc>server name</desc>
2859 </param>
2860 <param name="server" type="IDHCPServer" dir="return">
2861 <desc>Dhcp server settings</desc>
2862 </param>
2863 </method>
2864
2865 <!--method name="findDHCPServerForInterface">
2866 <desc>
2867 Searches a dhcp server settings to be used for the given interface
2868 <result name="E_INVALIDARG">
2869 Host network interface @a name already exists.
2870 </result>
2871 </desc>
2872 <param name="interface" type="IHostNetworkInterface" dir="in">
2873 <desc>Network Interface</desc>
2874 </param>
2875 <param name="server" type="IDHCPServer" dir="out">
2876 <desc>Dhcp server settings</desc>
2877 </param>
2878 </method-->
2879
2880 <method name="removeDHCPServer">
2881 <desc>
2882 Removes the dhcp server settings
2883 <result name="E_INVALIDARG">
2884 Host network interface @a name already exists.
2885 </result>
2886 </desc>
2887 <param name="server" type="IDHCPServer" dir="in">
2888 <desc>Dhcp server settings to be removed</desc>
2889 </param>
2890 </method>
2891
2892 </interface>
2893
2894 <!--
2895 // IAppliance
2896 /////////////////////////////////////////////////////////////////////////
2897 -->
2898
2899 <enum
2900 name="CIMOSType"
2901 uuid="86ef5f8c-18b2-4db8-a314-33721b59f89b"
2902 >
2903 <desc>
2904 OVF operating system values according to CIM V2.20 (as of Nov 2008); http://www.dmtf.org/standards/cim/cim_schema_v220
2905 </desc>
2906
2907 <const name="CIMOS_Unknown" value="0" /> <!-- "Unknown" -->
2908 <const name="CIMOS_Other" value="1" /> <!-- "Other" -->
2909 <const name="CIMOS_MACOS" value="2" /> <!-- "MACOS" -->
2910 <const name="CIMOS_ATTUNIX" value="3" /> <!-- "ATTUNIX" -->
2911 <const name="CIMOS_DGUX" value="4" /> <!-- "DGUX" -->
2912 <const name="CIMOS_DECNT" value="5" /> <!-- "DECNT" -->
2913 <const name="CIMOS_Tru64UNIX" value="6" /> <!-- "Tru64 UNIX" -->
2914 <const name="CIMOS_OpenVMS" value="7" /> <!-- "OpenVMS" -->
2915 <const name="CIMOS_HPUX" value="8" /> <!-- "HPUX" -->
2916 <const name="CIMOS_AIX" value="9" /> <!-- "AIX" -->
2917 <const name="CIMOS_MVS" value="10" /> <!-- "MVS" -->
2918 <const name="CIMOS_OS400" value="11" /> <!-- "OS400" -->
2919 <const name="CIMOS_OS2" value="12" /> <!-- "OS/2" -->
2920 <const name="CIMOS_JavaVM" value="13" /> <!-- "JavaVM" -->
2921 <const name="CIMOS_MSDOS" value="14" /> <!-- "MSDOS" -->
2922 <const name="CIMOS_WIN3x" value="15" /> <!-- "WIN3x" -->
2923 <const name="CIMOS_WIN95" value="16" /> <!-- "WIN95" -->
2924 <const name="CIMOS_WIN98" value="17" /> <!-- "WIN98" -->
2925 <const name="CIMOS_WINNT" value="18" /> <!-- "WINNT" -->
2926 <const name="CIMOS_WINCE" value="19" /> <!-- "WINCE" -->
2927 <const name="CIMOS_NCR3000" value="20" /> <!-- "NCR3000" -->
2928 <const name="CIMOS_NetWare" value="21" /> <!-- "NetWare" -->
2929 <const name="CIMOS_OSF" value="22" /> <!-- "OSF" -->
2930 <const name="CIMOS_DCOS" value="23" /> <!-- "DC/OS" -->
2931 <const name="CIMOS_ReliantUNIX" value="24" /> <!-- "Reliant UNIX" -->
2932 <const name="CIMOS_SCOUnixWare" value="25" /> <!-- "SCO UnixWare" -->
2933 <const name="CIMOS_SCOOpenServer" value="26" /> <!-- "SCO OpenServer" -->
2934 <const name="CIMOS_Sequent" value="27" /> <!-- "Sequent" -->
2935 <const name="CIMOS_IRIX" value="28" /> <!-- "IRIX" -->
2936 <const name="CIMOS_Solaris" value="29" /> <!-- "Solaris" -->
2937 <const name="CIMOS_SunOS" value="30" /> <!-- "SunOS" -->
2938 <const name="CIMOS_U6000" value="31" /> <!-- "U6000" -->
2939 <const name="CIMOS_ASERIES" value="32" /> <!-- "ASERIES" -->
2940 <const name="CIMOS_HPNonStopOS" value="33" /> <!-- "HP NonStop OS" -->
2941 <const name="CIMOS_HPNonStopOSS" value="34" /> <!-- "HP NonStop OSS" -->
2942 <const name="CIMOS_BS2000" value="35" /> <!-- "BS2000" -->
2943 <const name="CIMOS_LINUX" value="36" /> <!-- "LINUX" -->
2944 <const name="CIMOS_Lynx" value="37" /> <!-- "Lynx" -->
2945 <const name="CIMOS_XENIX" value="38" /> <!-- "XENIX" -->
2946 <const name="CIMOS_VM" value="39" /> <!-- "VM" -->
2947 <const name="CIMOS_InteractiveUNIX" value="40" /> <!-- "Interactive UNIX" -->
2948 <const name="CIMOS_BSDUNIX" value="41" /> <!-- "BSDUNIX" -->
2949 <const name="CIMOS_FreeBSD" value="42" /> <!-- "FreeBSD" -->
2950 <const name="CIMOS_NetBSD" value="43" /> <!-- "NetBSD" -->
2951 <const name="CIMOS_GNUHurd" value="44" /> <!-- "GNU Hurd" -->
2952 <const name="CIMOS_OS9" value="45" /> <!-- "OS9" -->
2953 <const name="CIMOS_MACHKernel" value="46" /> <!-- "MACH Kernel" -->
2954 <const name="CIMOS_Inferno" value="47" /> <!-- "Inferno" -->
2955 <const name="CIMOS_QNX" value="48" /> <!-- "QNX" -->
2956 <const name="CIMOS_EPOC" value="49" /> <!-- "EPOC" -->
2957 <const name="CIMOS_IxWorks" value="50" /> <!-- "IxWorks" -->
2958 <const name="CIMOS_VxWorks" value="51" /> <!-- "VxWorks" -->
2959 <const name="CIMOS_MiNT" value="52" /> <!-- "MiNT" -->
2960 <const name="CIMOS_BeOS" value="53" /> <!-- "BeOS" -->
2961 <const name="CIMOS_HPMPE" value="54" /> <!-- "HP MPE" -->
2962 <const name="CIMOS_NextStep" value="55" /> <!-- "NextStep" -->
2963 <const name="CIMOS_PalmPilot" value="56" /> <!-- "PalmPilot" -->
2964 <const name="CIMOS_Rhapsody" value="57" /> <!-- "Rhapsody" -->
2965 <const name="CIMOS_Windows2000" value="58" /> <!-- "Windows 2000" -->
2966 <const name="CIMOS_Dedicated" value="59" /> <!-- "Dedicated" -->
2967 <const name="CIMOS_OS390" value="60" /> <!-- "OS/390" -->
2968 <const name="CIMOS_VSE" value="61" /> <!-- "VSE" -->
2969 <const name="CIMOS_TPF" value="62" /> <!-- "TPF" -->
2970 <const name="CIMOS_WindowsMe" value="63" /> <!-- "Windows (R) Me" -->
2971 <const name="CIMOS_CalderaOpenUNIX" value="64" /> <!-- "Caldera Open UNIX" -->
2972 <const name="CIMOS_OpenBSD" value="65" /> <!-- "OpenBSD" -->
2973 <const name="CIMOS_NotApplicable" value="66" /> <!-- "Not Applicable" -->
2974 <const name="CIMOS_WindowsXP" value="67" /> <!-- "Windows XP" -->
2975 <const name="CIMOS_zOS" value="68" /> <!-- "z/OS" -->
2976 <const name="CIMOS_MicrosoftWindowsServer2003" value="69" /> <!-- "Microsoft Windows Server 2003" -->
2977 <const name="CIMOS_MicrosoftWindowsServer2003_64" value="70" /> <!-- "Microsoft Windows Server 2003 64-Bit" -->
2978 <const name="CIMOS_WindowsXP_64" value="71" /> <!-- "Windows XP 64-Bit" -->
2979 <const name="CIMOS_WindowsXPEmbedded" value="72" /> <!-- "Windows XP Embedded" -->
2980 <const name="CIMOS_WindowsVista" value="73" /> <!-- "Windows Vista" -->
2981 <const name="CIMOS_WindowsVista_64" value="74" /> <!-- "Windows Vista 64-Bit" -->
2982 <const name="CIMOS_WindowsEmbeddedforPointofService" value="75" /> <!-- "Windows Embedded for Point of Service" -->
2983 <const name="CIMOS_MicrosoftWindowsServer2008" value="76" /> <!-- "Microsoft Windows Server 2008" -->
2984 <const name="CIMOS_MicrosoftWindowsServer2008_64" value="77" /> <!-- "Microsoft Windows Server 2008 64-Bit" -->
2985 <const name="CIMOS_FreeBSD_64" value="78" /> <!-- "FreeBSD 64-Bit" -->
2986 <const name="CIMOS_RedHatEnterpriseLinux" value="79" /> <!-- "RedHat Enterprise Linux" -->
2987 <const name="CIMOS_RedHatEnterpriseLinux_64" value="80" /> <!-- "RedHat Enterprise Linux 64-Bit" -->
2988 <const name="CIMOS_Solaris_64" value="81" /> <!-- "Solaris 64-Bit" -->
2989 <const name="CIMOS_SUSE" value="82" /> <!-- "SUSE" -->
2990 <const name="CIMOS_SUSE_64" value="83" /> <!-- "SUSE 64-Bit" -->
2991 <const name="CIMOS_SLES" value="84" /> <!-- "SLES" -->
2992 <const name="CIMOS_SLES_64" value="85" /> <!-- "SLES 64-Bit" -->
2993 <const name="CIMOS_NovellOES" value="86" /> <!-- "Novell OES" -->
2994 <const name="CIMOS_NovellLinuxDesktop" value="87" /> <!-- "Novell Linux Desktop" -->
2995 <const name="CIMOS_SunJavaDesktopSystem" value="88" /> <!-- "Sun Java Desktop System" -->
2996 <const name="CIMOS_Mandriva" value="89" /> <!-- "Mandriva" -->
2997 <const name="CIMOS_Mandriva_64" value="90" /> <!-- "Mandriva 64-Bit" -->
2998 <const name="CIMOS_TurboLinux" value="91" /> <!-- "TurboLinux" -->
2999 <const name="CIMOS_TurboLinux_64" value="92" /> <!-- "TurboLinux 64-Bit" -->
3000 <const name="CIMOS_Ubuntu" value="93" /> <!-- "Ubuntu" -->
3001 <const name="CIMOS_Ubuntu_64" value="94" /> <!-- "Ubuntu 64-Bit" -->
3002 <const name="CIMOS_Debian" value="95" /> <!-- "Debian" -->
3003 <const name="CIMOS_Debian_64" value="96" /> <!-- "Debian 64-Bit" -->
3004 <const name="CIMOS_Linux_2_4_x" value="97" /> <!-- "Linux 2.4.x" -->
3005 <const name="CIMOS_Linux_2_4_x_64" value="98" /> <!-- "Linux 2.4.x 64-Bit" -->
3006 <const name="CIMOS_Linux_2_6_x" value="99" /> <!-- "Linux 2.6.x" -->
3007 <const name="CIMOS_Linux_2_6_x_64" value="100" /> <!-- "Linux 2.6.x 64-Bit" -->
3008 <const name="CIMOS_Linux_64" value="101" /> <!-- "Linux 64-Bit" -->
3009 <const name="CIMOS_Other_64" value="102" /> <!-- "Other 64-Bit" -->
3010 </enum>
3011
3012 <enum
3013 name="OVFResourceType"
3014 uuid="646a78d7-6f04-49f4-82c4-75c28a75a4cd"
3015 >
3016 <desc>
3017 OVF resource type (as listed with CIM_ResourceAllocationSettingData; see for example
3018 http://msdn.microsoft.com/en-us/library/cc136877(VS.85).aspx).
3019 </desc>
3020
3021 <const name="Other" value="1" />
3022 <const name="ComputerSystem" value="2" />
3023 <const name="Processor" value="3" />
3024 <const name="Memory" value="4" />
3025 <const name="IDEController" value="5" />
3026 <const name="ParallelSCSIHBA" value="6" />
3027 <const name="FCHBA" value="7" />
3028 <const name="iSCSIHBA" value="8" />
3029 <const name="IBHCA" value="9" />
3030 <const name="EthernetAdapter" value="10" />
3031 <const name="OtherNetworkAdapter" value="11" />
3032 <const name="IOSlot" value="12" />
3033 <const name="IODevice" value="13" />
3034 <const name="FloppyDrive" value="14" />
3035 <const name="CDDrive" value="15" />
3036 <const name="DVDDrive" value="16" />
3037 <const name="HardDisk" value="17" />
3038 <const name="OtherStorageDevice" value="20" />
3039 <const name="USBController" value="23" />
3040 <const name="SoundCard" value="35" />
3041 </enum>
3042
3043 <interface
3044 name="IAppliance" extends="$unknown"
3045 uuid="30bfa6b8-9eda-4b0a-b218-a86813248ccd"
3046 wsmap="managed"
3047 >
3048 <desc>
3049 Represents a platform-independent appliance in OVF format. An instance of this is returned
3050 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3051 appliances with VirtualBox.
3052
3053 The OVF standard suggests two different physical file formats:
3054
3055 <ol>
3056 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3057 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3058 this descriptor file references other files, as OVF appliances distributed as a set of
3059 files most likely do, those files must be in the same directory as the descriptor file.</li>
3060
3061 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3062 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3063 files and optionally other files.
3064
3065 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3066 be added with a later version.</li>
3067 </ol>
3068
3069 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3070 <link to="IMachine" /> involves the following sequence of API calls:
3071
3072 <ol>
3073 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3074 </li>
3075
3076 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3077 would like to import. So long as this file is syntactically valid, this will succeed
3078 and return an instance of IAppliance that contains the parsed data from the OVF file.
3079 </li>
3080
3081 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3082 contents of the IAppliance attributes accordingly. These can be inspected by a
3083 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3084 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3085 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3086 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3087 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3088 The GUI can then give the user the option to confirm and/or change these suggestions.
3089 </li>
3090
3091 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3092 virtual system to override the suggestions made by the interpret() routine.
3093 </li>
3094
3095 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3096 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3097 virtual system descriptions.
3098 </li>
3099 </ol>
3100
3101 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3102
3103 <ol>
3104 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3105 an empty IAppliance object.
3106 </li>
3107
3108 <li>For each machine you would like to export, call <link to="IMachine::export" />
3109 with the IAppliance object you just created. This creates an instance of
3110 <link to="IVirtualSystemDescription" /> inside the appliance.
3111 </li>
3112
3113 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3114 virtual system to override the suggestions made by the export() routine.
3115 </li>
3116
3117 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3118 file written.</li>
3119 </ol>
3120
3121 </desc>
3122
3123 <attribute name="path" type="wstring" readonly="yes">
3124 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3125 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3126 <link to="#write" /> (for export).
3127 This attribute is empty until one of these methods has been called.
3128 </desc>
3129 </attribute>
3130
3131 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3132 <desc>
3133 Array of virtual disk definitions. One such description exists for each
3134 disk definition in the OVF; each string array item represents one such piece of
3135 disk information, with the information fields separated by tab (\\t) characters.
3136
3137 The caller should be prepared for additional fields being appended to
3138 this string in future versions of VirtualBox and therefore check for
3139 the number of tabs in the strings returned.
3140
3141 In the current version, the following eight fields are returned per string
3142 in the array:
3143
3144 <ol>
3145 <li>Disk ID (unique string identifier given to disk)</li>
3146
3147 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3148
3149 <li>Populated size (optional unsigned integer indicating the current size of the
3150 disk; can be approximate; -1 if unspecified)</li>
3151
3152 <li>Format (string identifying the disk format, typically
3153 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3154
3155 <li>Reference (where to find the disk image, typically a file name; if empty,
3156 then the disk should be created on import)</li>
3157
3158 <li>Image size (optional unsigned integer indicating the size of the image,
3159 which need not necessarily be the same as the values specified above, since
3160 the image may be compressed or sparse; -1 if not specified)</li>
3161
3162 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3163 presently unsupported and always -1)</li>
3164
3165 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3166 </ol>
3167 </desc>
3168 </attribute>
3169
3170 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3171 <desc> Array of virtual system descriptions. One such description is created
3172 for each virtual system found in the OVF.
3173 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3174 (for export) has been called.
3175 </desc>
3176 </attribute>
3177
3178 <method name="read">
3179 <desc>
3180 Reads an OVF file into the appliance object.
3181
3182 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3183 mere fact that this method returns successfully does not mean that VirtualBox supports all
3184 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3185 </desc>
3186 <param name="file" type="wstring" dir="in">
3187 <desc>
3188 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3189 on whether the appliance is distributed as a set of files or as a single file, respectively).
3190 </desc>
3191 </param>
3192 </method>
3193
3194 <method name="interpret">
3195 <desc>
3196 Interprets the OVF data that was read when the appliance was constructed. After
3197 calling this method, one can inspect the
3198 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3199 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3200 the appliance.
3201
3202 Calling this method is the second step of importing an appliance into VirtualBox;
3203 see <link to="IAppliance" /> for an overview.
3204
3205 After calling this method, one should call <link to="#getWarnings" /> to find out
3206 if problems were encountered during the processing which might later lead to
3207 errors.
3208 </desc>
3209 </method>
3210
3211 <method name="importMachines">
3212 <desc>
3213 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3214 and other interfaces that match the information contained in the appliance as
3215 closely as possible, as represented by the import instructions in the
3216 <link to="#virtualSystemDescriptions" /> array.
3217
3218 Calling this method is the final step of importing an appliance into VirtualBox;
3219 see <link to="IAppliance" /> for an overview.
3220
3221 Since importing the appliance will most probably involve copying and converting
3222 disk images, which can take a long time, this method operates asynchronously and
3223 returns an IProgress object to allow the caller to monitor the progress.
3224 </desc>
3225
3226 <param name="aProgress" type="IProgress" dir="return">
3227 <desc></desc>
3228 </param>
3229 </method>
3230
3231 <method name="write">
3232 <desc>
3233 Writes the contents of the appliance exports into a new OVF file.
3234
3235 Calling this method is the final step of exporting an appliance from VirtualBox;
3236 see <link to="IAppliance" /> for an overview.
3237
3238 Since exporting the appliance will most probably involve copying and converting
3239 disk images, which can take a long time, this method operates asynchronously and
3240 returns an IProgress object to allow the caller to monitor the progress.
3241 </desc>
3242 <param name="format" type="wstring" dir="in">
3243 <desc>
3244 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3245 future versions of VirtualBox may support additional formats.
3246 </desc>
3247 </param>
3248 <param name="path" type="wstring" dir="in">
3249 <desc>
3250 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3251 on whether the appliance is distributed as a set of files or as a single file, respectively).
3252 </desc>
3253 </param>
3254 <param name="aProgress" type="IProgress" dir="return">
3255 <desc></desc>
3256 </param>
3257 </method>
3258
3259 <method name="getWarnings">
3260 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3261
3262 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3263 <desc></desc>
3264 </param>
3265 </method>
3266
3267 </interface>
3268
3269 <enum
3270 name="VirtualSystemDescriptionType"
3271 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3272 >
3273 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3274 a configuration value.</desc>
3275
3276 <const name="Ignore" value="1" />
3277 <const name="OS" value="2" />
3278 <const name="Name" value="3" />
3279 <const name="Product" value="4" />
3280 <const name="Vendor" value="5" />
3281 <const name="Version" value="6" />
3282 <const name="ProductUrl" value="7" />
3283 <const name="VendorUrl" value="8" />
3284 <const name="Description" value="9" />
3285 <const name="License" value="10" />
3286 <const name="Miscellaneous" value="11" />
3287 <const name="CPU" value="12" />
3288 <const name="Memory" value="13" />
3289 <const name="HardDiskControllerIDE" value="14" />
3290 <const name="HardDiskControllerSATA" value="15" />
3291 <const name="HardDiskControllerSCSI" value="16" />
3292 <const name="HardDiskImage" value="17" />
3293 <const name="Floppy" value="18" />
3294 <const name="CDROM" value="19" />
3295 <const name="NetworkAdapter" value="20" />
3296 <const name="USBController" value="21" />
3297 <const name="SoundCard" value="22" />
3298
3299 </enum>
3300
3301 <enum
3302 name="VirtualSystemDescriptionValueType"
3303 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3304 >
3305 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3306 type to fetch.</desc>
3307
3308 <const name="Reference" value="1" />
3309 <const name="Original" value="2" />
3310 <const name="Auto" value="3" />
3311 <const name="ExtraConfig" value="4" />
3312
3313 </enum>
3314
3315 <interface
3316 name="IVirtualSystemDescription" extends="$unknown"
3317 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3318 wsmap="managed"
3319 >
3320
3321 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3322 After <link to="IAppliance::interpret" /> has been called, that array contains
3323 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3324 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3325 into VirtualBox.
3326 </desc>
3327
3328 <attribute name="count" type="unsigned long" readonly="yes">
3329 <desc>Return the number of virtual system description entries.</desc>
3330 </attribute>
3331
3332 <method name="getDescription">
3333 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3334 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3335
3336 The list below identifies the value sets that are possible depending on the
3337 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3338 the array item with the same index in aOvfValues[] will contain the original value as contained
3339 in the OVF file (just for informational purposes), and the corresponding item in aVboxValues[]
3340 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3341 the aExtraConfigValues[] array item may also be used.
3342
3343 <ul>
3344 <li>
3345 "OS": the guest operating system type. There must be exactly one such array item on import. The
3346 corresponding item in aVboxValues[] contains the suggested guest operating system for VirtualBox.
3347 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3348 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF
3349 (see <link to="CIMOSType" />).
3350 </li>
3351 <li>
3352 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3353 if none is present on import, then an automatic name will be created from the operating system
3354 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3355 from the OVF file, and aVboxValues[] will contain a suggestion for a unique VirtualBox
3356 <link to="IMachine" /> name that does not exist yet.
3357 </li>
3358 <li>
3359 "Description": an arbitrary description.
3360 </li>
3361 <li>
3362 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3363 code to display such a license for agreement; the Main API does not enforce any such policy.
3364 </li>
3365 <li>
3366 Miscellaneous: reserved for future use.
3367 </li>
3368 <li>
3369 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3370 </li>
3371 <li>
3372 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3373 is present on import, then VirtualBox will set a meaningful default based on the operating system
3374 type.
3375 </li>
3376 <li>
3377 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3378 has no value in aOvfValues[] or aVboxValues[].
3379 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3380 type can use to specify which hard disk controller a virtual disk should be connected to.
3381 </li>
3382 <li>
3383 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3384 has no value in aOvfValues[] or aVboxValues[].
3385 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3386 </li>
3387 <li>
3388 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3389 The items in aOvfValues[] and aVboxValues[] will either be "LsiLogic" or "BusLogic".
3390 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3391 </li>
3392 <li>
3393 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3394 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3395
3396 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3397 a path since the image file should be in the same location as the OVF file itself), whereas the
3398 item in aVboxValues[] will contain a qualified path specification to where VirtualBox uses the
3399 hard disk image. This means that on import the image will be copied and converted from the
3400 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3401 On import, the target image will also be registered with VirtualBox.
3402
3403 The matching item in the aExtraConfigValues[] array must contain a string of the following
3404 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3405 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3406 the image to. That number must be the index of an array item with one of the hard disk controller
3407 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3408 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3409 this can range from 0-2 (which VirtualBox will interpret as primary master, primary slave,
3410 secondary slave; VirtualBox reserves the secondary master for the CD-ROM drive). For SATA and
3411 SCSI conrollers, the channel can range from 0-29.
3412 </li>
3413 <li>
3414 "NetworkAdapter": a network adapter. The array item in aVboxValues[] will specify the hardware
3415 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3416 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3417 </li>
3418 <li>
3419 "USBController": a USB controller. There can be at most one such item. If and only if such an
3420 item ispresent, USB support will be enabled for the new virtual machine.
3421 </li>
3422 <li>
3423 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3424 present, sound support will be enabled for the new virtual machine. Note that the virtual
3425 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3426 may be different from the virtual soundcard expected by the appliance.
3427 </li>
3428 </ul>
3429
3430 </desc>
3431
3432 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3433 <desc></desc>
3434 </param>
3435
3436 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3437 <desc></desc>
3438 </param>
3439
3440 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3441 <desc></desc>
3442 </param>
3443
3444 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3445 <desc></desc>
3446 </param>
3447
3448 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3449 <desc></desc>
3450 </param>
3451
3452 </method>
3453
3454 <method name="getDescriptionByType">
3455 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3456 should be returned.</desc>
3457
3458 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3459 <desc></desc>
3460 </param>
3461
3462 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3463 <desc></desc>
3464 </param>
3465
3466 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3467 <desc></desc>
3468 </param>
3469
3470 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3471 <desc></desc>
3472 </param>
3473
3474 <param name="aVboxValues" type="wstring" dir="out" safearray="yes">
3475 <desc></desc>
3476 </param>
3477
3478 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3479 <desc></desc>
3480 </param>
3481
3482 </method>
3483
3484 <method name="getValuesByType">
3485 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3486 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3487 values.</desc>
3488
3489 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3490 <desc></desc>
3491 </param>
3492
3493 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3494 <desc></desc>
3495 </param>
3496
3497 <param name="aValues" type="wstring" dir="return" safearray="yes">
3498 <desc></desc>
3499 </param>
3500
3501 </method>
3502
3503 <method name="setFinalValues">
3504 <desc>
3505 This method allows the appliance's user to change the configuration for the virtual
3506 system descriptions. For each array item returned from <link to="#getDescription" />,
3507 you must pass in one boolean value and one configuration value.
3508
3509 Each item in the boolean array determines whether the particular configuration item
3510 should be enabled.
3511 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3512 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3513 and SoundCard.
3514
3515 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3516 as returned in the aVboxValues and aExtraConfigValues arrays from getDescription(),
3517 the configuration remains unchanged. Please see the documentation for getDescription()
3518 for valid configuration values for the individual array item types. If the
3519 corresponding item in the aEnabled array is false, the configuration value is ignored.
3520 </desc>
3521
3522 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3523 <desc></desc>
3524 </param>
3525
3526 <param name="aVboxValues" type="wstring" dir="in" safearray="yes">
3527 <desc></desc>
3528 </param>
3529
3530 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3531 <desc></desc>
3532 </param>
3533 </method>
3534
3535 <method name="addDescription">
3536 <desc>
3537 This method adds an additional description entry to the stack of already
3538 available descriptions for this virtual system. This is handy for writing
3539 values which aren't directly supported by VirtualBox. One example would
3540 be the License type of <link to="VirtualSystemDescriptionType" />.
3541 </desc>
3542
3543 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3544 <desc></desc>
3545 </param>
3546
3547 <param name="aVboxValue" type="wstring" dir="in">
3548 <desc></desc>
3549 </param>
3550
3551 <param name="aExtraConfigValue" type="wstring" dir="in">
3552 <desc></desc>
3553 </param>
3554 </method>
3555 </interface>
3556
3557
3558 <!--
3559 // IMachine
3560 /////////////////////////////////////////////////////////////////////////
3561 -->
3562
3563 <interface
3564 name="IInternalMachineControl" extends="$unknown"
3565 uuid="2c88b969-7a74-4ef3-b95f-8a209a1535f3"
3566 internal="yes"
3567 wsmap="suppress"
3568 >
3569 <method name="updateState">
3570 <desc>
3571 Updates the VM state.
3572 <note>
3573 This operation will also update the settings file with
3574 the correct information about the saved state file
3575 and delete this file from disk when appropriate.
3576 </note>
3577 </desc>
3578 <param name="state" type="MachineState" dir="in"/>
3579 </method>
3580
3581 <method name="getIPCId">
3582 <param name="id" type="wstring" dir="return"/>
3583 </method>
3584
3585 <method name="runUSBDeviceFilters">
3586 <desc>
3587 Asks the server to run USB devices filters of the associated
3588 machine against the given USB device and tell if there is
3589 a match.
3590 <note>
3591 Intended to be used only for remote USB devices. Local
3592 ones don't require to call this method (this is done
3593 implicitly by the Host and USBProxyService).
3594 </note>
3595 </desc>
3596 <param name="device" type="IUSBDevice" dir="in"/>
3597 <param name="matched" type="boolean" dir="out"/>
3598 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3599 </method>
3600
3601 <method name="captureUSBDevice">
3602 <desc>
3603 Requests a capture of the given host USB device.
3604 When the request is completed, the VM process will
3605 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3606 notification.
3607 </desc>
3608 <param name="id" type="uuid" dir="in"/>
3609 </method>
3610
3611 <method name="detachUSBDevice">
3612 <desc>
3613 Notification that a VM is going to detach (done = false) or has
3614 already detached (done = true) the given USB device.
3615 When the done = true request is completed, the VM process will
3616 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3617 notification.
3618 <note>
3619 In the done = true case, the server must run its own filters
3620 and filters of all VMs but this one on the detached device
3621 as if it were just attached to the host computer.
3622 </note>
3623 </desc>
3624 <param name="id" type="uuid" dir="in"/>
3625 <param name="done" type="boolean" dir="in"/>
3626 </method>
3627
3628 <method name="autoCaptureUSBDevices">
3629 <desc>
3630 Requests a capture all matching USB devices attached to the host.
3631 When the request is completed, the VM process will
3632 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3633 notification per every captured device.
3634 </desc>
3635 </method>
3636
3637 <method name="detachAllUSBDevices">
3638 <desc>
3639 Notification that a VM that is being powered down. The done
3640 parameter indicates whether which stage of the power down
3641 we're at. When done = false the VM is announcing its
3642 intentions, while when done = true the VM is reporting
3643 what it has done.
3644 <note>
3645 In the done = true case, the server must run its own filters
3646 and filters of all VMs but this one on all detach devices as
3647 if they were just attached to the host computer.
3648 </note>
3649 </desc>
3650 <param name="done" type="boolean" dir="in"/>
3651 </method>
3652
3653 <method name="onSessionEnd">
3654 <desc>
3655 Triggered by the given session object when the session is about
3656 to close normally.
3657 </desc>
3658 <param name="session" type="ISession" dir="in">
3659 <desc>Session that is being closed</desc>
3660 </param>
3661 <param name="progress" type="IProgress" dir="return">
3662 <desc>
3663 Used to wait until the corresponding machine is actually
3664 dissociated from the given session on the server.
3665 Returned only when this session is a direct one.
3666 </desc>
3667 </param>
3668 </method>
3669
3670 <method name="beginSavingState">
3671 <desc>
3672 Called by the VM process to inform the server it wants to
3673 save the current state and stop the VM execution.
3674 </desc>
3675 <param name="progress" type="IProgress" dir="in">
3676 <desc>
3677 Progress object created by the VM process to wait until
3678 the state is saved.
3679 </desc>
3680 </param>
3681 <param name="stateFilePath" type="wstring" dir="out">
3682 <desc>
3683 File path the VM process must save the execution state to.
3684 </desc>
3685 </param>
3686 </method>
3687
3688 <method name="endSavingState">
3689 <desc>
3690 Called by the VM process to inform the server that saving
3691 the state previously requested by #beginSavingState is either
3692 successfully finished or there was a failure.
3693
3694 <result name="VBOX_E_FILE_ERROR">
3695 Settings file not accessible.
3696 </result>
3697 <result name="VBOX_E_XML_ERROR">
3698 Could not parse the settings file.
3699 </result>
3700
3701 </desc>
3702
3703 <param name="success" type="boolean" dir="in">
3704 <desc><tt>true</tt> to indicate success and <tt>false</tt>
3705 otherwise.
3706 </desc>
3707 </param>
3708 </method>
3709
3710 <method name="adoptSavedState">
3711 <desc>
3712 Gets called by IConsole::adoptSavedState.
3713 <result name="VBOX_E_FILE_ERROR">
3714 Invalid saved state file path.
3715 </result>
3716 </desc>
3717 <param name="savedStateFile" type="wstring" dir="in">
3718 <desc>Path to the saved state file to adopt.</desc>
3719 </param>
3720 </method>
3721
3722 <method name="beginTakingSnapshot">
3723 <desc>
3724 Called by the VM process to inform the server it wants to
3725 take a snapshot.
3726
3727 <result name="VBOX_E_FILE_ERROR">
3728 Settings file not accessible.
3729 </result>
3730 <result name="VBOX_E_XML_ERROR">
3731 Could not parse the settings file.
3732 </result>
3733 </desc>
3734 <param name="initiator" type="IConsole" dir="in">
3735 <desc>The console object that initiated this call.</desc>
3736 </param>
3737 <param name="name" type="wstring" dir="in">
3738 <desc>Snapshot name.</desc>
3739 </param>
3740 <param name="description" type="wstring" dir="in">
3741 <desc>Snapshot description.</desc>
3742 </param>
3743 <param name="progress" type="IProgress" dir="in">
3744 <desc>
3745 Progress object created by the VM process to wait until
3746 the state is saved (only for online snapshots).
3747 </desc>
3748 </param>
3749 <param name="stateFilePath" type="wstring" dir="out">
3750 <desc>
3751 File path the VM process must save the execution state to.
3752 </desc>
3753 </param>
3754 <param name="serverProgress" type="IProgress" dir="out">
3755 <desc>
3756 Progress object created by the server process to wait until
3757 the snapshot is taken (VDI diff creation, etc.).
3758 </desc>
3759 </param>
3760 </method>
3761
3762 <method name="endTakingSnapshot">
3763 <desc>
3764 Called by the VM process to inform the server that the snapshot
3765 previously requested by #beginTakingSnapshot is either
3766 successfully taken or there was a failure.
3767 </desc>
3768
3769 <param name="success" type="boolean" dir="in">
3770 <desc><tt>true</tt> to indicate success and <tt>false</tt> otherwise</desc>
3771 </param>
3772 </method>
3773
3774 <method name="discardSnapshot">
3775 <desc>
3776 Gets called by IConsole::discardSnapshot.
3777 <result name="VBOX_E_INVALID_OBJECT_STATE">
3778 Snapshot has more than one child snapshot.
3779 </result>
3780 </desc>
3781 <param name="initiator" type="IConsole" dir="in">
3782 <desc>The console object that initiated this call.</desc>
3783 </param>
3784 <param name="id" type="uuid" dir="in">
3785 <desc>UUID of the snapshot to discard.</desc>
3786 </param>
3787 <param name="machineState" type="MachineState" dir="out">
3788 <desc>New machine state after this operation is started.</desc>
3789 </param>
3790 <param name="progress" type="IProgress" dir="return">
3791 <desc>Progress object to track the operation completion.</desc>
3792 </param>
3793 </method>
3794
3795 <method name="discardCurrentState">
3796 <desc>
3797 Gets called by IConsole::discardCurrentState.
3798 <result name="VBOX_E_INVALID_OBJECT_STATE">
3799 Virtual machine does not have any snapshot.
3800 </result>
3801 </desc>
3802 <param name="initiator" type="IConsole" dir="in">
3803 <desc>The console object that initiated this call.</desc>
3804 </param>
3805 <param name="machineState" type="MachineState" dir="out">
3806 <desc>New machine state after this operation is started.</desc>
3807 </param>
3808 <param name="progress" type="IProgress" dir="return">
3809 <desc>Progress object to track the operation completion.</desc>
3810 </param>
3811 </method>
3812
3813 <method name="discardCurrentSnapshotAndState">
3814 <desc>
3815 Gets called by IConsole::discardCurrentSnapshotAndState.
3816 <result name="VBOX_E_INVALID_OBJECT_STATE">
3817 Virtual machine does not have any snapshot.
3818 </result>
3819 </desc>
3820 <param name="initiator" type="IConsole" dir="in">
3821 <desc>The console object that initiated this call.</desc>
3822 </param>
3823 <param name="machineState" type="MachineState" dir="out">
3824 <desc>New machine state after this operation is started.</desc>
3825 </param>
3826 <param name="progress" type="IProgress" dir="return">
3827 <desc>Progress object to track the operation completion.</desc>
3828 </param>
3829 </method>
3830
3831 <method name="pullGuestProperties">
3832 <desc>
3833 Get the list of the guest properties matching a set of patterns along
3834 with their values, time stamps and flags and give responsibility for
3835 managing properties to the console.
3836 </desc>
3837 <param name="name" type="wstring" dir="out" safearray="yes">
3838 <desc>
3839 The names of the properties returned.
3840 </desc>
3841 </param>
3842 <param name="value" type="wstring" dir="out" safearray="yes">
3843 <desc>
3844 The values of the properties returned. The array entries match the
3845 corresponding entries in the @a name array.
3846 </desc>
3847 </param>
3848 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3849 <desc>
3850 The time stamps of the properties returned. The array entries match
3851 the corresponding entries in the @a name array.
3852 </desc>
3853 </param>
3854 <param name="flags" type="wstring" dir="out" safearray="yes">
3855 <desc>
3856 The flags of the properties returned. The array entries match the
3857 corresponding entries in the @a name array.
3858 </desc>
3859 </param>
3860 </method>
3861
3862 <method name="pushGuestProperties">
3863 <desc>
3864 Set the list of the guest properties matching a set of patterns along
3865 with their values, time stamps and flags and return responsibility for
3866 managing properties to IMachine.
3867 </desc>
3868 <param name="name" type="wstring" dir="in" safearray="yes">
3869 <desc>
3870 The names of the properties.
3871 </desc>
3872 </param>
3873 <param name="value" type="wstring" dir="in" safearray="yes">
3874 <desc>
3875 The values of the properties. The array entries match the
3876 corresponding entries in the @a name array.
3877 </desc>
3878 </param>
3879 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3880 <desc>
3881 The time stamps of the properties. The array entries match
3882 the corresponding entries in the @a name array.
3883 </desc>
3884 </param>
3885 <param name="flags" type="wstring" dir="in" safearray="yes">
3886 <desc>
3887 The flags of the properties. The array entries match the
3888 corresponding entries in the @a name array.
3889 </desc>
3890 </param>
3891 </method>
3892 <method name="pushGuestProperty">
3893 <desc>
3894 Update a single guest property in IMachine.
3895 </desc>
3896 <param name="name" type="wstring" dir="in">
3897 <desc>
3898 The name of the property to be updated.
3899 </desc>
3900 </param>
3901 <param name="value" type="wstring" dir="in">
3902 <desc>
3903 The value of the property.
3904 </desc>
3905 </param>
3906 <param name="timestamp" type="unsigned long long" dir="in">
3907 <desc>
3908 The timestamp of the property.
3909 </desc>
3910 </param>
3911 <param name="flags" type="wstring" dir="in">
3912 <desc>
3913 The flags of the property.
3914 </desc>
3915 </param>
3916 </method>
3917
3918 <method name="lockMedia">
3919 <desc>
3920 Locks all media attached to the machine for writing and parents of
3921 attahced different hard disks (if any) for reading. This operation is
3922 atomic so that if it fails no media is actually locked.
3923
3924 This method is intended to be called when the machine is in Starting or
3925 Restoring state. The locked media will be automatically unlocked when
3926 the machine is powered off or crashed.
3927 </desc>
3928 </method>
3929 </interface>
3930
3931 <interface
3932 name="IBIOSSettings" extends="$unknown"
3933 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3934 wsmap="managed"
3935 >
3936 <desc>
3937 The IBIOSSettings interface represents BIOS settings of the virtual
3938 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3939 </desc>
3940 <attribute name="logoFadeIn" type="boolean">
3941 <desc>Fade in flag for BIOS logo animation.</desc>
3942 </attribute>
3943
3944 <attribute name="logoFadeOut" type="boolean">
3945 <desc>Fade out flag for BIOS logo animation.</desc>
3946 </attribute>
3947
3948 <attribute name="logoDisplayTime" type="unsigned long">
3949 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3950 </attribute>
3951
3952 <attribute name="logoImagePath" type="wstring">
3953 <desc>Local file system path for external BIOS image.</desc>
3954 </attribute>
3955
3956 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3957 <desc>Mode of the BIOS boot device menu.</desc>
3958 </attribute>
3959
3960 <attribute name="ACPIEnabled" type="boolean">
3961 <desc>ACPI support flag.</desc>
3962 </attribute>
3963
3964 <attribute name="IOAPICEnabled" type="boolean">
3965 <desc>
3966 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3967 and support IRQs above 15.
3968 </desc>
3969 </attribute>
3970
3971 <attribute name="timeOffset" type="long long">
3972 <desc>
3973 Offset in milliseconds from the host system time. This allows for
3974 guests running with a different system date/time than the host.
3975 It is equivalent to setting the system date/time in the BIOS except
3976 it is not an absolute value but a relative one. Guest Additions
3977 time synchronization honors this offset.
3978 </desc>
3979 </attribute>
3980
3981 <attribute name="PXEDebugEnabled" type="boolean">
3982 <desc>
3983 PXE debug logging flag. If set, VirtualBox will write extensive
3984 PXE trace information to the release log.
3985 </desc>
3986 </attribute>
3987
3988 </interface>
3989
3990 <interface
3991 name="IMachine" extends="$unknown"
3992 uuid="13420cbb-175a-4456-85d0-301126dfdec7"
3993 wsmap="managed"
3994 >
3995 <desc>
3996 The IMachine interface represents a virtual machine, or guest, created
3997 in VirtualBox.
3998
3999 This interface is used in two contexts. First of all, a collection of
4000 objects implementing this interface is stored in the
4001 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4002 machines that are currently registered with this VirtualBox
4003 installation. Also, once a session has been opened for the given virtual
4004 machine (e.g. the virtual machine is running), the machine object
4005 associated with the open session can be queried from the session object;
4006 see <link to="ISession"/> for details.
4007
4008 The main role of this interface is to expose the settings of the virtual
4009 machine and provide methods to change various aspects of the virtual
4010 machine's configuration. For machine objects stored in the
4011 <link to="IVirtualBox::machines"/> collection, all attributes are
4012 read-only unless explicitly stated otherwise in individual attribute
4013 and method descriptions. In order to change a machine setting, a session
4014 for this machine must be opened using one of
4015 <link to="IVirtualBox::openSession"/>,
4016 <link to="IVirtualBox::openRemoteSession"/> or
4017 <link to="IVirtualBox::openExistingSession"/> methods. After the
4018 session has been successfully opened, a mutable machine object needs to
4019 be queried from the session object and then the desired settings changes
4020 can be applied to the returned object using IMachine attributes and
4021 methods. See the ISession interface description for more information
4022 about sessions.
4023
4024 Note that the IMachine interface does not provide methods to control
4025 virtual machine execution (such as start the machine, or power it
4026 down) -- these methods are grouped in a separate IConsole
4027 interface. Refer to the IConsole interface description to get more
4028 information about this topic.
4029
4030 <see>ISession, IConsole</see>
4031 </desc>
4032
4033 <attribute name="parent" type="IVirtualBox" readonly="yes">
4034 <desc>Associated parent object.</desc>
4035 </attribute>
4036
4037 <attribute name="accessible" type="boolean" readonly="yes">
4038 <desc>
4039 Whether this virtual machine is currently accessible or not.
4040
4041 The machine is considered to be inaccessible when:
4042 <ul>
4043 <li>It is a registered virtual machine, and
4044 </li>
4045 <li>Its settings file is inaccessible (for example, it is
4046 located on a network share that is not accessible during
4047 VirtualBox startup, or becomes inaccessible later, or if
4048 the settings file can be read but is invalid).
4049 </li>
4050 </ul>
4051
4052 Otherwise, the value of this property is always <tt>true</tt>.
4053
4054 Every time this property is read, the accessibility state of
4055 this machine is re-evaluated. If the returned value is |false|,
4056 the <link to="#accessError"/> property may be used to get the
4057 detailed error information describing the reason of
4058 inaccessibility.
4059
4060 When the machine is inaccessible, only the following properties
4061 can be used on it:
4062 <ul>
4063 <li><link to="#parent"/></li>
4064 <li><link to="#id"/></li>
4065 <li><link to="#settingsFilePath"/></li>
4066 <li><link to="#accessible"/></li>
4067 <li><link to="#accessError"/></li>
4068 </ul>
4069
4070 An attempt to access any other property or method will return
4071 an error.
4072
4073 The only possible action you can perform on an inaccessible
4074 machine is to unregister it using the
4075 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4076 for the accessibility state once more by querying this
4077 property).
4078
4079 <note>
4080 In the current implementation, once this property returns
4081 <tt>true</tt>, the machine will never become inaccessible
4082 later, even if its settings file cannot be successfully
4083 read/written any more (at least, until the VirtualBox
4084 server is restarted). This limitation may be removed in
4085 future releases.
4086 </note>
4087 </desc>
4088 </attribute>
4089
4090 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4091 <desc>
4092 Error information describing the reason of machine
4093 inaccessibility.
4094
4095 Reading this property is only valid after the last call to
4096 <link to="#accessible"/> returned <tt>false</tt> (i.e. the
4097 machine is currently unaccessible). Otherwise, a null
4098 IVirtualBoxErrorInfo object will be returned.
4099 </desc>
4100 </attribute>
4101
4102 <attribute name="name" type="wstring">
4103 <desc>
4104 Name of the virtual machine.
4105
4106 Besides being used for human-readable identification purposes
4107 everywhere in VirtualBox, the virtual machine name is also used
4108 as a name of the machine's settings file and as a name of the
4109 subdirectory this settings file resides in. Thus, every time you
4110 change the value of this property, the settings file will be
4111 renamed once you call <link to="#saveSettings"/> to confirm the
4112 change. The containing subdirectory will be also renamed, but
4113 only if it has exactly the same name as the settings file
4114 itself prior to changing this property (for backward compatibility
4115 with previous API releases). The above implies the following
4116 limitations:
4117 <ul>
4118 <li>The machine name cannot be empty.</li>
4119 <li>The machine name can contain only characters that are valid
4120 file name characters according to the rules of the file
4121 system used to store VirtualBox configuration.</li>
4122 <li>You cannot have two or more machines with the same name
4123 if they use the same subdirectory for storing the machine
4124 settings files.</li>
4125 <li>You cannot change the name of the machine if it is running,
4126 or if any file in the directory containing the settings file
4127 is being used by another running machine or by any other
4128 process in the host operating system at a time when
4129 <link to="#saveSettings"/> is called.
4130 </li>
4131 </ul>
4132 If any of the above limitations are hit, <link to="#saveSettings"/>
4133 will return an appropriate error message explaining the exact
4134 reason and the changes you made to this machine will not be
4135 saved.
4136 <note>
4137 For "legacy" machines created using the
4138 <link to="IVirtualBox::createLegacyMachine"/> call,
4139 the above naming limitations do not apply because the
4140 machine name does not affect the settings file name.
4141 The settings file name remains the same as it was specified
4142 during machine creation and never changes.
4143 </note>
4144 </desc>
4145 </attribute>
4146
4147 <attribute name="description" type="wstring">
4148 <desc>
4149 Description of the virtual machine.
4150
4151 The description attribute can contain any text and is
4152 typically used to describe the hardware and software
4153 configuration of the virtual machine in detail (i.e. network
4154 settings, versions of the installed software and so on).
4155 </desc>
4156 </attribute>
4157
4158 <attribute name="id" type="uuid" readonly="yes">
4159 <desc>UUID of the virtual machine.</desc>
4160 </attribute>
4161
4162 <attribute name="OSTypeId" type="wstring">
4163 <desc>
4164 User-defined identifier of the Guest OS type.
4165 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4166 an IGuestOSType object representing details about the given
4167 Guest OS type.
4168 <note>
4169 This value may differ from the value returned by
4170 <link to="IGuest::OSTypeId"/> if Guest Additions are
4171 installed to the guest OS.
4172 </note>
4173 </desc>
4174 </attribute>
4175
4176 <attribute name="HardwareVersion" type="wstring">
4177 <desc>Hardware version identifier. Internal use only for now.</desc>
4178 </attribute>
4179
4180 <attribute name="CPUCount" type="unsigned long">
4181 <desc>Number of virtual CPUs in the VM. In the current version of the product, this is always 1.</desc>
4182 </attribute>
4183
4184 <attribute name="memorySize" type="unsigned long">
4185 <desc>System memory size in megabytes.</desc>
4186 </attribute>
4187
4188 <attribute name="memoryBalloonSize" type="unsigned long">
4189 <desc>Initial memory balloon size in megabytes.</desc>
4190 </attribute>
4191
4192 <attribute name="statisticsUpdateInterval" type="unsigned long">
4193 <desc>Initial interval to update guest statistics in seconds.</desc>
4194 </attribute>
4195
4196 <attribute name="VRAMSize" type="unsigned long">
4197 <desc>Video memory size in megabytes.</desc>
4198 </attribute>
4199
4200 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4201 <desc>
4202 This setting determines whether VirtualBox allows guests to make use
4203 of the 3D graphics support available on the host. Currently limited
4204 to OpenGL only. </desc>
4205 </attribute>
4206
4207 <attribute name="monitorCount" type="unsigned long">
4208 <desc>
4209 Number of virtual monitors.
4210 <note>
4211 Only effective on Windows XP and later guests with
4212 Guest Additions installed.
4213 </note>
4214 </desc>
4215 </attribute>
4216
4217 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4218 <desc>Object containing all BIOS settings.</desc>
4219 </attribute>
4220
4221 <attribute name="HWVirtExEnabled" type="TSBool">
4222 <desc>
4223 This setting determines whether VirtualBox will try to make use of
4224 the host CPU's hardware virtualization extensions such as Intel VT-x
4225 and AMD-V. Note that in case such extensions are not available,
4226 they will not be used.
4227 </desc>
4228 </attribute>
4229
4230 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4231 <desc>
4232 This setting determines whether VirtualBox will try to make use of
4233 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4234 such extensions are not available, they will not be used.
4235 </desc>
4236 </attribute>
4237
4238 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4239 <desc>
4240 This setting determines whether VirtualBox will try to make use of
4241 the VPID extension of Intel VT-x. Note that in case such extensions are
4242 not available, they will not be used.
4243 </desc>
4244 </attribute>
4245
4246 <attribute name="PAEEnabled" type="boolean" default="false">
4247 <desc>
4248 This setting determines whether VirtualBox will expose the Physical Address
4249 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4250 is not available, it will not be reported.
4251 </desc>
4252 </attribute>
4253
4254 <attribute name="snapshotFolder" type="wstring">
4255 <desc>
4256 Full path to the directory used to store snapshot data
4257 (differencing hard disks and saved state files) of this machine.
4258
4259 The initial value of this property is
4260 <tt>&lt;</tt><link to="#settingsFilePath">
4261 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4262 <link to="#id">machine_uuid</link>
4263 <tt>&gt;</tt>.
4264
4265 Currently, it is an error to try to change this property on
4266 a machine that has snapshots (because this would require to
4267 move possibly large files to a different location).
4268 A separate method will be available for this purpose later.
4269
4270 <note>
4271 Setting this property to <tt>null</tt> will restore the
4272 initial value.
4273 </note>
4274 <note>
4275 When setting this property, the specified path can be
4276 absolute (full path) or relative to the directory where the
4277 <link to="#settingsFilePath">machine settings file</link>
4278 is located. When reading this property, a full path is
4279 always returned.
4280 </note>
4281 <note>
4282 The specified path may not exist, it will be created
4283 when necessary.
4284 </note>
4285 </desc>
4286 </attribute>
4287
4288 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4289 <desc>VRDP server object.</desc>
4290 </attribute>
4291
4292 <attribute name="hardDiskAttachments" type="IHardDiskAttachment" readonly="yes" safearray="yes">
4293 <desc>Array of hard disks attached to this machine.</desc>
4294 </attribute>
4295
4296 <attribute name="DVDDrive" type="IDVDDrive" readonly="yes">
4297 <desc>Associated DVD drive object.</desc>
4298 </attribute>
4299
4300 <attribute name="floppyDrive" type="IFloppyDrive" readonly="yes">
4301 <desc>Associated floppy drive object.</desc>
4302 </attribute>
4303
4304 <attribute name="USBController" type="IUSBController" readonly="yes">
4305 <desc>
4306 Associated USB controller object.
4307
4308 <note>
4309 If USB functionality is not available in the given edition of
4310 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4311 </note>
4312 </desc>
4313 </attribute>
4314
4315 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4316 <desc>Associated audio adapter, always present.</desc>
4317 </attribute>
4318
4319 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4320 <desc>Array of storage controllers attached to this machine.</desc>
4321 </attribute>
4322
4323 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4324 <desc>
4325 Full name of the file containing machine settings data.
4326 </desc>
4327 </attribute>
4328
4329 <attribute name="settingsFileVersion" type="wstring" readonly="yes">
4330 <desc>
4331 Current version of the format of the settings file of this machine
4332 (<link to="IMachine::settingsFilePath"/>).
4333
4334 The version string has the following format:
4335 <pre>
4336 x.y-platform
4337 </pre>
4338 where <tt>x</tt> and <tt>y</tt> are the major and the minor format
4339 versions, and <tt>platform</tt> is the platform identifier.
4340
4341 The current version usually matches the value of the
4342 <link to="IVirtualBox::settingsFormatVersion"/> attribute unless the
4343 settings file was created by an older version of VirtualBox and there
4344 was a change of the settings file format since then.
4345
4346 Note that VirtualBox automatically converts settings files from older
4347 versions to the most recent version when reading them (usually at
4348 VirtualBox startup) but it doesn't save the changes back until
4349 you call a method that implicitly saves settings (such as
4350 <link to="#setExtraData"/>) or call <link to="#saveSettings"/>
4351 explicitly. Therefore, if the value of this attribute differs from the
4352 value of <link to="IVirtualBox::settingsFormatVersion"/>, then it
4353 means that the settings file was converted but the result of the
4354 conversion is not yet saved to disk.
4355
4356 The above feature may be used by interactive front-ends to inform users
4357 about the settings file format change and offer them to explicitly save
4358 all converted settings files (the global and VM-specific ones),
4359 optionally create backup copies of the old settings files before saving,
4360 etc.
4361
4362 <see>IVirtualBox::settingsFormatVersion, saveSettingsWithBackup()</see>
4363 </desc>
4364 </attribute>
4365
4366 <attribute name="settingsModified" type="boolean" readonly="yes">
4367 <desc>
4368 Whether the settings of this machine have been modified
4369 (but neither yet saved nor discarded).
4370 <note>
4371 Reading this property is only valid on instances returned
4372 by <link to="ISession::machine"/> and on new machines
4373 created by <link to="IVirtualBox::createMachine"/> or opened
4374 by <link to="IVirtualBox::openMachine"/> but not
4375 yet registered, or on unregistered machines after calling
4376 <link to="IVirtualBox::unregisterMachine"/>. For all other
4377 cases, the settings can never be modified.
4378 </note>
4379 <note>
4380 For newly created unregistered machines, the value of this
4381 property is always TRUE until <link to="#saveSettings"/>
4382 is called (no matter if any machine settings have been
4383 changed after the creation or not). For opened machines
4384 the value is set to FALSE (and then follows to normal rules).
4385 </note>
4386 </desc>
4387 </attribute>
4388
4389 <attribute name="sessionState" type="SessionState" readonly="yes">
4390 <desc>Current session state for this machine.</desc>
4391 </attribute>
4392
4393 <attribute name="sessionType" type="wstring" readonly="yes">
4394 <desc>
4395 Type of the session. If <link to="#sessionState"/> is
4396 SessionSpawning or SessionOpen, this attribute contains the
4397 same value as passed to the
4398 <link to="IVirtualBox::openRemoteSession"/> method in the
4399 @a type parameter. If the session was opened directly using
4400 <link to="IVirtualBox::openSession"/>, or if
4401 <link to="#sessionState"/> is SessionClosed, the value of this
4402 attribute is @c null.
4403 </desc>
4404 </attribute>
4405
4406 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4407 <desc>
4408 Identifier of the session process. This attribute contains the
4409 platform-dependent identifier of the process that has opened a
4410 direct session for this machine using the
4411 <link to="IVirtualBox::openSession"/> call. The returned value
4412 is only valid if <link to="#sessionState"/> is SessionOpen or
4413 SessionClosing (i.e. a session is currently open or being
4414 closed) by the time this property is read.
4415 </desc>
4416 </attribute>
4417
4418 <attribute name="state" type="MachineState" readonly="yes">
4419 <desc>Current execution state of this machine.</desc>
4420 </attribute>
4421
4422 <attribute name="lastStateChange" type="long long" readonly="yes">
4423 <desc>
4424 Time stamp of the last execution state change,
4425 in milliseconds since 1970-01-01 UTC.
4426 </desc>
4427 </attribute>
4428
4429 <attribute name="stateFilePath" type="wstring" readonly="yes">
4430 <desc>
4431 Full path to the file that stores the execution state of
4432 the machine when it is in the <link to="MachineState_Saved"/> state.
4433 <note>
4434 When the machine is not in the Saved state, this attribute
4435 <tt>null</tt>.
4436 </note>
4437 </desc>
4438 </attribute>
4439
4440 <attribute name="logFolder" type="wstring" readonly="yes">
4441 <desc>
4442 Full path to the folder that stores a set of rotated log files
4443 recorded during machine execution. The most recent log file is
4444 named <tt>VBox.log</tt>, the previous log file is
4445 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4446 in the current version).
4447 </desc>
4448 </attribute>
4449
4450 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4451 <desc>
4452 Current snapshot of this machine.
4453 <note>
4454 A <tt>null</tt> object is returned if the machine doesn't
4455 have snapshots.
4456 </note>
4457 <see><link to="ISnapshot"/></see>
4458 </desc>
4459 </attribute>
4460
4461 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4462 <desc>
4463 Number of snapshots taken on this machine. Zero means the
4464 machine doesn't have any snapshots.
4465 </desc>
4466 </attribute>
4467
4468 <attribute name="currentStateModified" type="boolean" readonly="yes">
4469 <desc>
4470 Returns <tt>true</tt> if the current state of the machine is not
4471 identical to the state stored in the current snapshot.
4472
4473 The current state is identical to the current snapshot right
4474 after one of the following calls are made:
4475 <ul>
4476 <li><link to="IConsole::discardCurrentState"/> or
4477 <link to="IConsole::discardCurrentSnapshotAndState"/>
4478 </li>
4479 <li><link to="IConsole::takeSnapshot"/> (issued on a
4480 powered off or saved machine, for which
4481 <link to="#settingsModified"/> returns <tt>false</tt>)
4482 </li>
4483 <li><link to="IMachine::setCurrentSnapshot"/>
4484 </li>
4485 </ul>
4486
4487 The current state remains identical until one of the following
4488 happens:
4489 <ul>
4490 <li>settings of the machine are changed</li>
4491 <li>the saved state is discarded</li>
4492 <li>the current snapshot is discarded</li>
4493 <li>an attempt to execute the machine is made</li>
4494 </ul>
4495
4496 <note>
4497 For machines that don't have snapshots, this property is
4498 always <tt>false</tt>.
4499 </note>
4500 </desc>
4501 </attribute>
4502
4503 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4504 <desc>
4505 Collection of shared folders for this machine (permanent shared
4506 folders). These folders are shared automatically at machine startup
4507 and available only to the guest OS installed within this machine.
4508
4509 New shared folders are added to the collection using
4510 <link to="#createSharedFolder"/>. Existing shared folders can be
4511 removed using <link to="#removeSharedFolder"/>.
4512 </desc>
4513 </attribute>
4514
4515 <attribute name="clipboardMode" type="ClipboardMode">
4516 <desc>
4517 Synchronization mode between the host OS clipboard
4518 and the guest OS clipboard.
4519 </desc>
4520 </attribute>
4521
4522 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4523 <desc>
4524 A comma-separated list of simple glob patterns. Changes to guest
4525 properties whose name matches one of the patterns will generate an
4526 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4527 </desc>
4528 </attribute>
4529
4530 <method name="setBootOrder">
4531 <desc>
4532 Puts the given device to the specified position in
4533 the boot order.
4534
4535 To indicate that no device is associated with the given position,
4536 <link to="DeviceType_Null"/> should be used.
4537
4538 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4539
4540 <result name="E_INVALIDARG">
4541 Boot @a position out of range.
4542 </result>
4543 <result name="E_NOTIMPL">
4544 Booting from USB @a device currently not supported.
4545 </result>
4546
4547 </desc>
4548 <param name="position" type="unsigned long" dir="in">
4549 <desc>
4550 Position in the boot order (<tt>1</tt> to the total number of
4551 devices the machine can boot from, as returned by
4552 <link to="ISystemProperties::maxBootPosition"/>).
4553 </desc>
4554 </param>
4555 <param name="device" type="DeviceType" dir="in">
4556 <desc>
4557 The type of the device used to boot at the given position.
4558 </desc>
4559 </param>
4560 </method>
4561
4562 <method name="getBootOrder" const="yes">
4563 <desc>
4564 Returns the device type that occupies the specified
4565 position in the boot order.
4566
4567 @todo [remove?]
4568 If the machine can have more than one device of the returned type
4569 (such as hard disks), then a separate method should be used to
4570 retrieve the individual device that occupies the given position.
4571
4572 If here are no devices at the given position, then
4573 <link to="DeviceType_Null"/> is returned.
4574
4575 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4576
4577 <result name="E_INVALIDARG">
4578 Boot @a position out of range.
4579 </result>
4580
4581 </desc>
4582 <param name="position" type="unsigned long" dir="in">
4583 <desc>
4584 Position in the boot order (<tt>1</tt> to the total number of
4585 devices the machine can boot from, as returned by
4586 <link to="ISystemProperties::maxBootPosition"/>).
4587 </desc>
4588 </param>
4589 <param name="device" type="DeviceType" dir="return">
4590 <desc>
4591 Device at the given position.
4592 </desc>
4593 </param>
4594 </method>
4595
4596 <method name="attachHardDisk">
4597 <desc>
4598 Attaches a virtual hard disk (<link to="IHardDisk" />, identified
4599 by the given UUID @a id) to the given hard disk controller
4600 (<link to="IStorageController" />, identified by @a name),
4601 at the indicated port and device.
4602
4603 For the IDE bus, the @a controllerPort parameter can be either
4604 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4605 respectively. For the primary controller of the IDE bus,
4606 @a device can be either @c 0 or @c 1, to specify the master or the
4607 slave device, respectively. For the secondary IDE controller, the
4608 device number must be @c 1 because VirtualBox reserves the
4609 secondary master for the CD-ROM drive.
4610
4611 For an SATA controller, @a controllerPort must be a number ranging
4612 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4613 be a number ranging from @c 0 to @c 15.
4614
4615 For both SCSI and SATA, the @a device parameter is unused and must
4616 be @c 0.
4617
4618 The specified device slot must not have another disk attached to it, or
4619 this method will fail.
4620
4621 See <link to="IHardDisk"/> for more detailed information about
4622 attaching hard disks.
4623
4624 <note>
4625 You cannot attach a hard disk to a running machine. Also, you cannot
4626 attach a hard disk to a newly created machine until this machine's
4627 settings are saved to disk using <link to="#saveSettings"/>.
4628 </note>
4629 <note>
4630 If the hard disk is being attached indirectly, a new differencing hard
4631 disk will implicitly be created for it and attached instead. If the
4632 changes made to the machine settings (including this indirect
4633 attachment) are later cancelled using <link to="#discardSettings"/>,
4634 this implicitly created differencing hard disk will implicitly
4635 be deleted.
4636 </note>
4637
4638 <result name="E_INVALIDARG">
4639 SATA device, SATA port, IDE port or IDE slot out of range.
4640 </result>
4641 <result name="VBOX_E_INVALID_OBJECT_STATE">
4642 Attempt to attach hard disk to an unregistered virtual machine.
4643 </result>
4644 <result name="VBOX_E_INVALID_VM_STATE">
4645 Invalid machine state.
4646 </result>
4647 <result name="VBOX_E_OBJECT_IN_USE">
4648 Hard disk already attached to this or another virtual machine.
4649 </result>
4650
4651 </desc>
4652 <param name="id" type="uuid" dir="in">
4653 <desc>UUID of the hard disk to attach.</desc>
4654 </param>
4655 <param name="name" type="wstring" dir="in">
4656 <desc>Name of the storage controller to attach the hard disk to.</desc>
4657 </param>
4658 <param name="controllerPort" type="long" dir="in">
4659 <desc>Port to attach the hard disk to.</desc>
4660 </param>
4661 <param name="device" type="long" dir="in">
4662 <desc>
4663 Device slot in the given port to attach the hard disk to.
4664 </desc>
4665 </param>
4666 </method>
4667
4668 <method name="getHardDisk" const="yes">
4669 <desc>
4670 Returns the virtual hard disk attached to a device slot of the specified
4671 bus.
4672
4673 Note that if the hard disk was indirectly attached by
4674 <link to="#attachHardDisk"/> to the given device slot then this
4675 method will return not the same object as passed to the
4676 <link to="#attachHardDisk"/> call. See <link to="IHardDisk"/> for
4677 more detailed information about attaching hard disks.
4678
4679 <result name="VBOX_E_OBJECT_NOT_FOUND">
4680 No hard disk attached to given slot/bus.
4681 </result>
4682
4683 </desc>
4684 <param name="name" type="wstring" dir="in">
4685 <desc>Name of the storage controller the hard disk is attached to.</desc>
4686 </param>
4687 <param name="controllerPort" type="long" dir="in">
4688 <desc>Port to query.</desc>
4689 </param>
4690 <param name="device" type="long" dir="in">
4691 <desc>Device slot in the given port to query.</desc>
4692 </param>
4693 <param name="hardDisk" type="IHardDisk" dir="return">
4694 <desc>Attached hard disk object.</desc>
4695 </param>
4696 </method>
4697
4698 <method name="detachHardDisk">
4699 <desc>
4700 Detaches the virtual hard disk attached to a device slot of the
4701 specified bus.
4702
4703 Detaching the hard disk from the virtual machine is deferred. This means
4704 that the hard disk remains associated with the machine when this method
4705 returns and gets actually de-associated only after a successful
4706 <link to="#saveSettings"/> call. See <link to="IHardDisk"/>
4707 for more detailed information about attaching hard disks.
4708
4709 <note>
4710 You cannot detach the hard disk from a running machine.
4711 </note>
4712 <note>
4713 Detaching differencing hard disks implicitly created by <link
4714 to="#attachHardDisk"/> for the indirect attachment using this
4715 method will <b>not</b> implicitly delete them. The
4716 <link to="IHardDisk::deleteStorage"/> operation should be
4717 explicitly performed by the caller after the hard disk is successfully
4718 detached and the settings are saved with
4719 <link to="#saveSettings"/>, if it is the desired action.
4720 </note>
4721
4722 <result name="VBOX_E_INVALID_VM_STATE">
4723 Attempt to detach hard disk from a running virtual machine.
4724 </result>
4725 <result name="VBOX_E_OBJECT_NOT_FOUND">
4726 No hard disk attached to given slot/bus.
4727 </result>
4728 <result name="VBOX_E_NOT_SUPPORTED">
4729 Hard disk format does not support storage deletion.
4730 </result>
4731
4732 </desc>
4733 <param name="name" type="wstring" dir="in">
4734 <desc>name of the storage controller to detach the hard disk from.</desc>
4735 </param>
4736 <param name="controllerPort" type="long" dir="in">
4737 <desc>Port number to detach the hard disk from.</desc>
4738 </param>
4739 <param name="device" type="long" dir="in">
4740 <desc>Device slot number to detach the hard disk from.</desc>
4741 </param>
4742 </method>
4743
4744 <method name="getHardDiskAttachmentsOfController" const="yes">
4745 <desc>
4746 Returns an array of hard disk attachments which are attached to the
4747 the controller with the given name.
4748
4749 <result name="VBOX_E_OBJECT_NOT_FOUND">
4750 A storage controller with given name doesn't exist.
4751 </result>
4752 </desc>
4753 <param name="name" type="wstring" dir="in"/>
4754 <param name="hardDiskAttachments" type="IHardDiskAttachment" safearray="yes" dir="return"/>
4755 </method>
4756
4757 <method name="getNetworkAdapter" const="yes">
4758 <desc>
4759 Returns the network adapter associated with the given slot.
4760 Slots are numbered sequentially, starting with zero. The total
4761 number of adapters per machine is defined by the
4762 <link to="ISystemProperties::networkAdapterCount"/> property,
4763 so the maximum slot number is one less than that property's value.
4764
4765 <result name="E_INVALIDARG">
4766 Invalid @a slot number.
4767 </result>
4768
4769 </desc>
4770 <param name="slot" type="unsigned long" dir="in"/>
4771 <param name="adapter" type="INetworkAdapter" dir="return"/>
4772 </method>
4773
4774 <method name="addStorageController">
4775 <desc>
4776 Adds a new storage controller (SCSI or SATA controller) to the
4777 machine and returns it as an instance of
4778 <link to="IStorageController" />.
4779
4780 @a name identifies the controller for subsequent calls such as
4781 <link to="#getStorageControllerByName" /> or
4782 <link to="#removeStorageController" /> or
4783 <link to="#attachHardDisk" />.
4784
4785 After the controller has been added, you can set its exact
4786 type by setting the <link to="IStorageController::controllerType" />.
4787
4788 <result name="VBOX_E_OBJECT_IN_USE">
4789 A storage controller with given name exists already.
4790 </result>
4791 <result name="E_INVALIDARG">
4792 Invalid @a controllerType.
4793 </result>
4794 </desc>
4795 <param name="name" type="wstring" dir="in"/>
4796 <param name="connectionType" type="StorageBus" dir="in"/>
4797 <param name="controller" type="IStorageController" dir="return"/>
4798 </method>
4799
4800 <method name="getStorageControllerByName" const="yes">
4801 <desc>
4802 Returns a storage controller with the given name.
4803
4804 <result name="VBOX_E_OBJECT_NOT_FOUND">
4805 A storage controller with given name doesn't exist.
4806 </result>
4807 </desc>
4808 <param name="name" type="wstring" dir="in"/>
4809 <param name="storageController" type="IStorageController" dir="return"/>
4810 </method>
4811
4812 <method name="removeStorageController">
4813 <desc>
4814 Removes a storage controller from the machine.
4815
4816 <result name="VBOX_E_OBJECT_NOT_FOUND">
4817 A storage controller with given name doesn't exist.
4818 </result>
4819 </desc>
4820 <param name="name" type="wstring" dir="in"/>
4821 </method>
4822
4823 <method name="getSerialPort" const="yes">
4824 <desc>
4825 Returns the serial port associated with the given slot.
4826 Slots are numbered sequentially, starting with zero. The total
4827 number of serial ports per machine is defined by the
4828 <link to="ISystemProperties::serialPortCount"/> property,
4829 so the maximum slot number is one less than that property's value.
4830
4831 <result name="E_INVALIDARG">
4832 Invalid @a slot number.
4833 </result>
4834
4835 </desc>
4836 <param name="slot" type="unsigned long" dir="in"/>
4837 <param name="port" type="ISerialPort" dir="return"/>
4838 </method>
4839
4840 <method name="getParallelPort" const="yes">
4841 <desc>
4842 Returns the parallel port associated with the given slot.
4843 Slots are numbered sequentially, starting with zero. The total
4844 number of parallel ports per machine is defined by the
4845 <link to="ISystemProperties::parallelPortCount"/> property,
4846 so the maximum slot number is one less than that property's value.
4847
4848 <result name="E_INVALIDARG">
4849 Invalid @a slot number.
4850 </result>
4851
4852 </desc>
4853 <param name="slot" type="unsigned long" dir="in"/>
4854 <param name="port" type="IParallelPort" dir="return"/>
4855 </method>
4856
4857 <method name="getNextExtraDataKey">
4858 <desc>
4859 Returns the machine-specific extra data key name following the
4860 supplied key.
4861
4862 An error is returned if the supplied @a key does not exist. @c NULL is
4863 returned in @a nextKey if the supplied key is the last key. When
4864 supplying @c NULL for the @a key, the first key item is returned in
4865 @a nextKey (if there is any). @a nextValue is an optional parameter and
4866 if supplied, the next key's value is returned in it.
4867
4868 <result name="VBOX_E_OBJECT_NOT_FOUND">
4869 Extra data @a key not found.
4870 </result>
4871
4872 </desc>
4873 <param name="key" type="wstring" dir="in">
4874 <desc>Name of the data key to follow.</desc>
4875 </param>
4876 <param name="nextKey" type="wstring" dir="out">
4877 <desc>Name of the next data key.</desc>
4878 </param>
4879 <param name="nextValue" type="wstring" dir="out">
4880 <desc>Value of the next data key.</desc>
4881 </param>
4882 </method>
4883
4884 <method name="getExtraData">
4885 <desc>
4886 Returns associated machine-specific extra data.
4887
4888 If the requested data @a key does not exist, this function will
4889 succeed and return @c NULL in the @a value argument.
4890
4891 <result name="VBOX_E_FILE_ERROR">
4892 Settings file not accessible.
4893 </result>
4894 <result name="VBOX_E_XML_ERROR">
4895 Could not parse the settings file.
4896 </result>
4897
4898 </desc>
4899 <param name="key" type="wstring" dir="in">
4900 <desc>Name of the data key to get.</desc>
4901 </param>
4902 <param name="value" type="wstring" dir="return">
4903 <desc>Value of the requested data key.</desc>
4904 </param>
4905 </method>
4906
4907 <method name="setExtraData">
4908 <desc>
4909 Sets associated machine-specific extra data.
4910
4911 If you pass @c NULL as a key @a value, the given @a key will be
4912 deleted.
4913
4914 <note>
4915 Before performing the actual data change, this method will ask all
4916 registered callbacks using the
4917 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4918 notification for a permission. If one of the callbacks refuses the
4919 new value, the change will not be performed.
4920 </note>
4921 <note>
4922 On success, the
4923 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4924 is called to inform all registered callbacks about a successful data
4925 change.
4926 </note>
4927 <note>
4928 This method can be called outside the machine session and therefore
4929 it's a caller's responsibility to handle possible race conditions
4930 when several clients change the same key at the same time.
4931 </note>
4932
4933 <result name="VBOX_E_FILE_ERROR">
4934 Settings file not accessible.
4935 </result>
4936 <result name="VBOX_E_XML_ERROR">
4937 Could not parse the settings file.
4938 </result>
4939
4940 </desc>
4941 <param name="key" type="wstring" dir="in">
4942 <desc>Name of the data key to set.</desc>
4943 </param>
4944 <param name="value" type="wstring" dir="in">
4945 <desc>Value to assign to the key.</desc>
4946 </param>
4947 </method>
4948
4949 <method name="saveSettings">
4950 <desc>
4951 Saves any changes to machine settings made since the session
4952 has been opened or a new machine has been created, or since the
4953 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4954 For registered machines, new settings become visible to all
4955 other VirtualBox clients after successful invocation of this
4956 method.
4957 <note>
4958 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
4959 notification event after the configuration has been successfully
4960 saved (only for registered machines).
4961 </note>
4962 <note>
4963 Calling this method is only valid on instances returned
4964 by <link to="ISession::machine"/> and on new machines
4965 created by <link to="IVirtualBox::createMachine"/> but not
4966 yet registered, or on unregistered machines after calling
4967 <link to="IVirtualBox::unregisterMachine"/>.
4968 </note>
4969
4970 <result name="VBOX_E_FILE_ERROR">
4971 Settings file not accessible.
4972 </result>
4973 <result name="VBOX_E_XML_ERROR">
4974 Could not parse the settings file.
4975 </result>
4976 <result name="E_ACCESSDENIED">
4977 Modification request refused.
4978 </result>
4979
4980 </desc>
4981 </method>
4982
4983 <method name="saveSettingsWithBackup">
4984 <desc>
4985 Creates a backup copy of the machine settings file (<link
4986 to="IMachine::settingsFilePath"/>) in case of auto-conversion, and then calls
4987 <link to="IMachine::saveSettings"/>.
4988
4989 Note that the backup copy is created <b>only</b> if the settings file
4990 auto-conversion took place (see <link to="#settingsFileVersion"/> for
4991 details). Otherwise, this call is fully equivalent to
4992 <link to="IMachine::saveSettings"/> and no backup copying is done.
4993
4994 The backup copy is created in the same directory where the original
4995 settings file is located. It is given the following file name:
4996 <pre>
4997 original.xml.x.y-platform.bak
4998 </pre>
4999 where <tt>original.xml</tt> is the original settings file name
5000 (excluding path), and <tt>x.y-platform</tt> is the version of the old
5001 format of the settings file (before auto-conversion).
5002
5003 If the given backup file already exists, this method will try to add the
5004 <tt>.N</tt> suffix to the backup file name (where <tt>N</tt> counts from
5005 0 to 9) and copy it again until it succeeds. If all suffixes are
5006 occupied, or if any other copy error occurs, this method will return a
5007 failure.
5008
5009 If the copy operation succeeds, the @a bakFileName return argument will
5010 receive a full path to the created backup file (for informational
5011 purposes). Note that this will happen even if the subsequent
5012 <link to="#saveSettings"/> call performed by this method after the
5013 copy operation, fails.
5014
5015 <note>
5016 The VirtualBox API never calls this method. It is intended purely for
5017 the purposes of creating backup copies of the settings files by
5018 front-ends before saving the results of the automatically performed
5019 settings conversion to disk.
5020 </note>
5021
5022 <see>settingsFileVersion</see>
5023
5024 <result name="VBOX_E_FILE_ERROR">
5025 Settings file not accessible.
5026 </result>
5027 <result name="VBOX_E_XML_ERROR">
5028 Could not parse the settings file.
5029 </result>
5030 <result name="VBOX_E_INVALID_VM_STATE">
5031 Virtual machine is not mutable.
5032 </result>
5033 <result name="E_ACCESSDENIED">
5034 Modification request refused.
5035 </result>
5036
5037 </desc>
5038 <param name="bakFileName" type="wstring" dir="return">
5039 <desc>Full path to the created backup copy.</desc>
5040 </param>
5041 </method>
5042
5043 <method name="discardSettings">
5044 <desc>
5045 Discards any changes to the machine settings made since the session
5046 has been opened or since the last call to <link to="#saveSettings"/>
5047 or <link to="#discardSettings"/>.
5048 <note>
5049 Calling this method is only valid on instances returned
5050 by <link to="ISession::machine"/> and on new machines
5051 created by <link to="IVirtualBox::createMachine"/> or
5052 opened by <link to="IVirtualBox::openMachine"/> but not
5053 yet registered, or on unregistered machines after calling
5054 <link to="IVirtualBox::unregisterMachine"/>.
5055 </note>
5056
5057 <result name="VBOX_E_INVALID_VM_STATE">
5058 Virtual machine is not mutable.
5059 </result>
5060
5061 </desc>
5062 </method>
5063
5064 <method name="deleteSettings">
5065 <desc>
5066 Deletes the settings file of this machine from disk.
5067 The machine must not be registered in order for this operation
5068 to succeed.
5069 <note>
5070 <link to="#settingsModified"/> will return TRUE after this
5071 method successfully returns.
5072 </note>
5073 <note>
5074 Calling this method is only valid on instances returned
5075 by <link to="ISession::machine"/> and on new machines
5076 created by <link to="IVirtualBox::createMachine"/> or
5077 opened by <link to="IVirtualBox::openMachine"/> but not
5078 yet registered, or on unregistered machines after calling
5079 <link to="IVirtualBox::unregisterMachine"/>.
5080 </note>
5081 <note>
5082 The deleted machine settings file can be restored (saved again)
5083 by calling <link to="#saveSettings"/>.
5084 </note>
5085
5086 <result name="VBOX_E_INVALID_VM_STATE">
5087 Cannot delete settings of a registered machine or
5088 machine not mutable.
5089 </result>
5090 <result name="VBOX_E_IPRT_ERROR">
5091 Could not delete the settings file.
5092 </result>
5093
5094 </desc>
5095 </method>
5096
5097 <method name="export">
5098 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5099 steps required to export VirtualBox machines to OVF.
5100 </desc>
5101
5102 <param name="aAppliance" type="IAppliance" dir="in">
5103 <desc>Appliance to export this machine to.</desc>
5104 </param>
5105 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5106 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5107 </param>
5108 </method >
5109
5110 <method name="getSnapshot">
5111 <desc>
5112 Returns a snapshot of this machine with the given UUID.
5113 A <tt>null</tt> UUID can be used to obtain the first snapshot
5114 taken on this machine. This is useful if you want to traverse
5115 the whole tree of snapshots starting from the root.
5116
5117 <result name="VBOX_E_OBJECT_NOT_FOUND">
5118 Virtual machine has no snapshots or snapshot not found.
5119 </result>
5120
5121 </desc>
5122 <param name="id" type="uuid" dir="in">
5123 <desc>UUID of the snapshot to get</desc>
5124 </param>
5125 <param name="snapshot" type="ISnapshot" dir="return">
5126 <desc>Snapshot object with the given UUID.</desc>
5127 </param>
5128 </method>
5129
5130 <method name="findSnapshot">
5131 <desc>
5132 Returns a snapshot of this machine with the given name.
5133
5134 <result name="VBOX_E_OBJECT_NOT_FOUND">
5135 Virtual machine has no snapshots or snapshot not found.
5136 </result>
5137
5138 </desc>
5139 <param name="name" type="wstring" dir="in">
5140 <desc>Name of the snapshot to find</desc>
5141 </param>
5142 <param name="snapshot" type="ISnapshot" dir="return">
5143 <desc>Snapshot object with the given name.</desc>
5144 </param>
5145 </method>
5146
5147 <method name="setCurrentSnapshot">
5148 <desc>
5149 Sets the current snapshot of this machine.
5150 <note>
5151 In the current implementation, this operation is not
5152 implemented.
5153 </note>
5154 </desc>
5155 <param name="id" type="uuid" dir="in">
5156 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5157 </param>
5158 </method>
5159
5160 <method name="createSharedFolder">
5161 <desc>
5162 Creates a new permanent shared folder by associating the given logical
5163 name with the given host path, adds it to the collection of shared
5164 folders and starts sharing it. Refer to the description of
5165 <link to="ISharedFolder"/> to read more about logical names.
5166
5167 <result name="VBOX_E_OBJECT_IN_USE">
5168 Shared folder already exists.
5169 </result>
5170 <result name="VBOX_E_FILE_ERROR">
5171 Shared folder @a hostPath not accessible.
5172 </result>
5173
5174 </desc>
5175 <param name="name" type="wstring" dir="in">
5176 <desc>Unique logical name of the shared folder.</desc>
5177 </param>
5178 <param name="hostPath" type="wstring" dir="in">
5179 <desc>Full path to the shared folder in the host file system.</desc>
5180 </param>
5181 <param name="writable" type="boolean" dir="in">
5182 <desc>Whether the share is writable or readonly</desc>
5183 </param>
5184 </method>
5185
5186 <method name="removeSharedFolder">
5187 <desc>
5188 Removes the permanent shared folder with the given name previously
5189 created by <link to="#createSharedFolder"/> from the collection of
5190 shared folders and stops sharing it.
5191
5192 <result name="VBOX_E_INVALID_VM_STATE">
5193 Virtual machine is not mutable.
5194 </result>
5195 <result name="VBOX_E_OBJECT_NOT_FOUND">
5196 Shared folder @a name does not exist.
5197 </result>
5198
5199 </desc>
5200 <param name="name" type="wstring" dir="in">
5201 <desc>Logical name of the shared folder to remove.</desc>
5202 </param>
5203 </method>
5204
5205 <method name="canShowConsoleWindow">
5206 <desc>
5207 Returns @c true if the VM console process can activate the
5208 console window and bring it to foreground on the desktop of
5209 the host PC.
5210 <note>
5211 This method will fail if a session for this machine is not
5212 currently open.
5213 </note>
5214
5215 <result name="VBOX_E_INVALID_VM_STATE">
5216 Machine session is not open.
5217 </result>
5218
5219 </desc>
5220 <param name="canShow" type="boolean" dir="return">
5221 <desc>
5222 @c true if the console window can be shown and @c
5223 false otherwise.
5224 </desc>
5225 </param>
5226 </method>
5227
5228 <method name="showConsoleWindow">
5229 <desc>
5230 Activates the console window and brings it to foreground on
5231 the desktop of the host PC. Many modern window managers on
5232 many platforms implement some sort of focus stealing
5233 prevention logic, so that it may be impossible to activate
5234 a window without the help of the currently active
5235 application. In this case, this method will return a non-zero
5236 identifier that represents the top-level window of the VM
5237 console process. The caller, if it represents a currently
5238 active process, is responsible to use this identifier (in a
5239 platform-dependent manner) to perform actual window
5240 activation.
5241 <note>
5242 This method will fail if a session for this machine is not
5243 currently open.
5244 </note>
5245
5246 <result name="VBOX_E_INVALID_VM_STATE">
5247 Machine session is not open.
5248 </result>
5249
5250 </desc>
5251 <param name="winId" type="unsigned long long" dir="return">
5252 <desc>
5253 Platform-dependent identifier of the top-level VM console
5254 window, or zero if this method has performed all actions
5255 necessary to implement the <i>show window</i> semantics for
5256 the given platform and/or VirtualBox front-end.
5257 </desc>
5258 </param>
5259 </method>
5260
5261 <method name="getGuestProperty">
5262 <desc>
5263 Reads an entry from the machine's guest property store.
5264
5265 <result name="VBOX_E_INVALID_VM_STATE">
5266 Machine session is not open.
5267 </result>
5268
5269 </desc>
5270 <param name="name" type="wstring" dir="in">
5271 <desc>
5272 The name of the property to read.
5273 </desc>
5274 </param>
5275 <param name="value" type="wstring" dir="out">
5276 <desc>
5277 The value of the property. If the property does not exist then this
5278 will be empty.
5279 </desc>
5280 </param>
5281 <param name="timestamp" type="unsigned long long" dir="out">
5282 <desc>
5283 The time at which the property was last modified, as seen by the
5284 server process.
5285 </desc>
5286 </param>
5287 <param name="flags" type="wstring" dir="out">
5288 <desc>
5289 Additional property parameters, passed as a comma-separated list of
5290 "name=value" type entries.
5291 </desc>
5292 </param>
5293 </method>
5294
5295 <method name="getGuestPropertyValue">
5296 <desc>
5297 Reads a value from the machine's guest property store.
5298
5299 <result name="VBOX_E_INVALID_VM_STATE">
5300 Machine session is not open.
5301 </result>
5302
5303 </desc>
5304 <param name="property" type="wstring" dir="in">
5305 <desc>
5306 The name of the property to read.
5307 </desc>
5308 </param>
5309 <param name="value" type="wstring" dir="return">
5310 <desc>
5311 The value of the property. If the property does not exist then this
5312 will be empty.
5313 </desc>
5314 </param>
5315 </method>
5316
5317 <method name="getGuestPropertyTimestamp">
5318 <desc>
5319 Reads a property timestamp from the machine's guest property store.
5320
5321 <result name="VBOX_E_INVALID_VM_STATE">
5322 Machine session is not open.
5323 </result>
5324
5325 </desc>
5326 <param name="property" type="wstring" dir="in">
5327 <desc>
5328 The name of the property to read.
5329 </desc>
5330 </param>
5331 <param name="value" type="unsigned long long" dir="return">
5332 <desc>
5333 The timestamp. If the property does not exist then this will be
5334 empty.
5335 </desc>
5336 </param>
5337 </method>
5338
5339 <method name="setGuestProperty">
5340 <desc>
5341 Sets, changes or deletes an entry in the machine's guest property
5342 store.
5343
5344 <result name="E_ACCESSDENIED">
5345 Property cannot be changed.
5346 </result>
5347 <result name="E_INVALIDARG">
5348 Invalid @a flags.
5349 </result>
5350 <result name="VBOX_E_INVALID_VM_STATE">
5351 Virtual machine is not mutable or session not open.
5352 </result>
5353 <result name="VBOX_E_INVALID_OBJECT_STATE">
5354 Cannot set transient property when machine not running.
5355 </result>
5356
5357 </desc>
5358 <param name="property" type="wstring" dir="in">
5359 <desc>
5360 The name of the property to set, change or delete.
5361 </desc>
5362 </param>
5363 <param name="value" type="wstring" dir="in">
5364 <desc>
5365 The new value of the property to set, change or delete. If the
5366 property does not yet exist and value is non-empty, it will be
5367 created. If the value is empty, the key will be deleted if it
5368 exists.
5369 </desc>
5370 </param>
5371 <param name="flags" type="wstring" dir="in">
5372 <desc>
5373 Additional property parameters, passed as a comma-separated list of
5374 "name=value" type entries.
5375 </desc>
5376 </param>
5377 </method>
5378
5379 <method name="setGuestPropertyValue">
5380 <desc>
5381 Sets, changes or deletes a value in the machine's guest property
5382 store. The flags field will be left unchanged or created empty for a
5383 new property.
5384
5385 <result name="E_ACCESSDENIED">
5386 Property cannot be changed.
5387 </result>
5388 <result name="VBOX_E_INVALID_VM_STATE">
5389 Virtual machine is not mutable or session not open.
5390 </result>
5391 <result name="VBOX_E_INVALID_OBJECT_STATE">
5392 Cannot set transient property when machine not running.
5393 </result>
5394 </desc>
5395
5396 <param name="property" type="wstring" dir="in">
5397 <desc>
5398 The name of the property to set, change or delete.
5399 </desc>
5400 </param>
5401 <param name="value" type="wstring" dir="in">
5402 <desc>
5403 The new value of the property to set, change or delete. If the
5404 property does not yet exist and value is non-empty, it will be
5405 created. If value is empty, the property will be deleted if it
5406 exists.
5407 </desc>
5408 </param>
5409 </method>
5410
5411 <method name="enumerateGuestProperties">
5412 <desc>
5413 Return a list of the guest properties matching a set of patterns along
5414 with their values, time stamps and flags.
5415 </desc>
5416 <param name="patterns" type="wstring" dir="in">
5417 <desc>
5418 The patterns to match the properties against, separated by '|'
5419 characters. If this is empty or NULL, all properties will match.
5420 </desc>
5421 </param>
5422 <param name="name" type="wstring" dir="out" safearray="yes">
5423 <desc>
5424 The names of the properties returned.
5425 </desc>
5426 </param>
5427 <param name="value" type="wstring" dir="out" safearray="yes">
5428 <desc>
5429 The values of the properties returned. The array entries match the
5430 corresponding entries in the @a name array.
5431 </desc>
5432 </param>
5433 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5434 <desc>
5435 The time stamps of the properties returned. The array entries match
5436 the corresponding entries in the @a name array.
5437 </desc>
5438 </param>
5439 <param name="flags" type="wstring" dir="out" safearray="yes">
5440 <desc>
5441 The flags of the properties returned. The array entries match the
5442 corresponding entries in the @a name array.
5443 </desc>
5444 </param>
5445 </method>
5446</interface>
5447
5448 <!--
5449 // IConsole
5450 /////////////////////////////////////////////////////////////////////////
5451 -->
5452
5453 <interface
5454 name="IConsoleCallback" extends="$unknown"
5455 uuid="13dfbef3-b74d-487d-bada-2304529aefa6"
5456 wsmap="suppress"
5457 >
5458
5459 <method name="onMousePointerShapeChange">
5460 <desc>
5461 Notification when the guest mouse pointer shape has
5462 changed. The new shape data is given.
5463 </desc>
5464 <param name="visible" type="boolean" dir="in">
5465 <desc>
5466 Flag whether the pointer is visible.
5467 </desc>
5468 </param>
5469 <param name="alpha" type="boolean" dir="in">
5470 <desc>
5471 Flag whether the pointer has an alpha channel.
5472 </desc>
5473 </param>
5474 <param name="xHot" type="unsigned long" dir="in">
5475 <desc>
5476 The pointer hot spot x coordinate.
5477 </desc>
5478 </param>
5479 <param name="yHot" type="unsigned long" dir="in">
5480 <desc>
5481 The pointer hot spot y coordinate.
5482 </desc>
5483 </param>
5484 <param name="width" type="unsigned long" dir="in">
5485 <desc>
5486 Width of the pointer shape in pixels.
5487 </desc>
5488 </param>
5489 <param name="height" type="unsigned long" dir="in">
5490 <desc>
5491 Height of the pointer shape in pixels.
5492 </desc>
5493 </param>
5494 <param name="shape" type="octet" mod="ptr" dir="in">
5495 <desc>
5496 Address of the shape buffer.
5497
5498 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5499 followed by a 32-bpp XOR (color) mask.
5500
5501 For pointers without alpha channel the XOR mask pixels are 32
5502 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5503 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5504
5505 An AND mask is used for pointers with alpha channel, so if the
5506 callback does not support alpha, the pointer could be
5507 displayed as a normal color pointer.
5508
5509 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5510 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5511 height</tt>. The padding bits at the end of each scanline are
5512 undefined.
5513
5514 The XOR mask follows the AND mask on the next 4-byte aligned
5515 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5516 Bytes in the gap between the AND and the XOR mask are undefined.
5517 The XOR mask scanlines have no gap between them and the size of
5518 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5519
5520 <note>
5521 If @a shape is 0, only the pointer visibility is changed.
5522 </note>
5523 </desc>
5524 </param>
5525 </method>
5526
5527 <method name="onMouseCapabilityChange">
5528 <desc>
5529 Notification when the mouse capabilities reported by the
5530 guest have changed. The new capabilities are passed.
5531 </desc>
5532 <param name="supportsAbsolute" type="boolean" dir="in"/>
5533 <param name="needsHostCursor" type="boolean" dir="in"/>
5534 </method>
5535
5536 <method name="onKeyboardLedsChange">
5537 <desc>
5538 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5539 to alter the state of the keyboard LEDs.
5540 </desc>
5541 <param name="numLock" type="boolean" dir="in"/>
5542 <param name="capsLock" type="boolean" dir="in"/>
5543 <param name="scrollLock" type="boolean" dir="in"/>
5544 </method>
5545
5546 <method name="onStateChange">
5547 <desc>
5548 Notification when the execution state of the machine has changed.
5549 The new state will be given.
5550 </desc>
5551 <param name="state" type="MachineState" dir="in"/>
5552 </method>
5553
5554 <method name="onAdditionsStateChange">
5555 <desc>
5556 Notification when a Guest Additions property changes.
5557 Interested callees should query IGuest attributes to
5558 find out what has changed.
5559 </desc>
5560 </method>
5561
5562 <method name="onDVDDriveChange">
5563 <desc>
5564 Notification when a property of the
5565 virtual <link to="IMachine::DVDDrive">DVD drive</link> changes.
5566 Interested callees should use IDVDDrive methods to find out what has
5567 changed.
5568 </desc>
5569 </method>
5570
5571 <method name="onFloppyDriveChange">
5572 <desc>
5573 Notification when a property of the
5574 virtual <link to="IMachine::floppyDrive">floppy drive</link> changes.
5575 Interested callees should use IFloppyDrive methods to find out what
5576 has changed.
5577 </desc>
5578 </method>
5579
5580 <method name="onNetworkAdapterChange">
5581 <desc>
5582 Notification when a property of one of the
5583 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5584 changes. Interested callees should use INetworkAdapter methods and
5585 attributes to find out what has changed.
5586 </desc>
5587 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5588 <desc>Network adapter that is subject to change.</desc>
5589 </param>
5590 </method>
5591
5592 <method name="onSerialPortChange">
5593 <desc>
5594 Notification when a property of one of the
5595 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5596 Interested callees should use ISerialPort methods and attributes
5597 to find out what has changed.
5598 </desc>
5599 <param name="serialPort" type="ISerialPort" dir="in">
5600 <desc>Serial port that is subject to change.</desc>
5601 </param>
5602 </method>
5603
5604 <method name="onParallelPortChange">
5605 <desc>
5606 Notification when a property of one of the
5607 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5608 changes. Interested callees should use ISerialPort methods and
5609 attributes to find out what has changed.
5610 </desc>
5611 <param name="parallelPort" type="IParallelPort" dir="in">
5612 <desc>Parallel port that is subject to change.</desc>
5613 </param>
5614 </method>
5615
5616 <method name="onStorageControllerChange">
5617 <desc>
5618 Notification when a property of one of the
5619 virtual <link to="IMachine::storageControllers">storage controllers</link>
5620 changes. Interested callees should query the corresponding collections
5621 to find out what has changed.
5622 </desc>
5623 </method>
5624
5625 <method name="onVRDPServerChange">
5626 <desc>
5627 Notification when a property of the
5628 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5629 Interested callees should use IVRDPServer methods and attributes to
5630 find out what has changed.
5631 </desc>
5632 </method>
5633
5634 <method name="onUSBControllerChange">
5635 <desc>
5636 Notification when a property of the virtual
5637 <link to="IMachine::USBController">USB controller</link> changes.
5638 Interested callees should use IUSBController methods and attributes to
5639 find out what has changed.
5640 </desc>
5641 </method>
5642
5643 <method name="onUSBDeviceStateChange">
5644 <desc>
5645 Notification when a USB device is attached to or detached from
5646 the virtual USB controller.
5647
5648 This notification is sent as a result of the indirect
5649 request to attach the device because it matches one of the
5650 machine USB filters, or as a result of the direct request
5651 issued by <link to="IConsole::attachUSBDevice"/> or
5652 <link to="IConsole::detachUSBDevice"/>.
5653
5654 This notification is sent in case of both a succeeded and a
5655 failed request completion. When the request succeeds, the
5656 @a error parameter is @c null, and the given device has been
5657 already added to (when @a attached is @c true) or removed from
5658 (when @a attached is @c false) the collection represented by
5659 <link to="IConsole::USBDevices"/>. On failure, the collection
5660 doesn't change and the @a error parameter represents the error
5661 message describing the failure.
5662
5663 </desc>
5664 <param name="device" type="IUSBDevice" dir="in">
5665 <desc>Device that is subject to state change.</desc>
5666 </param>
5667 <param name="attached" type="boolean" dir="in">
5668 <desc>
5669 <tt>true</tt> if the device was attached
5670 and <tt>false</tt> otherwise.
5671 </desc>
5672 </param>
5673 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5674 <desc>
5675 <tt>null</tt> on success or an error message object on
5676 failure.
5677 </desc>
5678 </param>
5679 </method>
5680
5681 <method name="onSharedFolderChange">
5682 <desc>
5683 Notification when a shared folder is added or removed.
5684 The @a scope argument defines one of three scopes:
5685 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5686 (<link to="Scope_Global">Global</link>),
5687 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5688 the machine (<link to="Scope_Machine">Machine</link>) or <link
5689 to="IConsole::sharedFolders">transient shared folders</link> of the
5690 machine (<link to="Scope_Session">Session</link>). Interested callees
5691 should use query the corresponding collections to find out what has
5692 changed.
5693 </desc>
5694 <param name="scope" type="Scope" dir="in">
5695 <desc>Scope of the notification.</desc>
5696 </param>
5697 </method>
5698
5699 <method name="onRuntimeError">
5700 <desc>
5701 Notification when an error happens during the virtual
5702 machine execution.
5703
5704 There are three kinds of runtime errors:
5705 <ul>
5706 <li><i>fatal</i></li>
5707 <li><i>non-fatal with retry</i></li>
5708 <li><i>non-fatal warnings</i></li>
5709 </ul>
5710
5711 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5712 to <tt>true</tt>. In case of fatal errors, the virtual machine
5713 execution is always paused before calling this notification, and
5714 the notification handler is supposed either to immediately save
5715 the virtual machine state using <link to="IConsole::saveState"/>
5716 or power it off using <link to="IConsole::powerDown"/>.
5717 Resuming the execution can lead to unpredictable results.
5718
5719 <b>Non-fatal</b> errors and warnings are indicated by the
5720 @a fatal parameter set to <tt>false</tt>. If the virtual machine
5721 is in the Paused state by the time the error notification is
5722 received, it means that the user can <i>try to resume</i> the machine
5723 execution after attempting to solve the problem that caused the
5724 error. In this case, the notification handler is supposed
5725 to show an appropriate message to the user (depending on the
5726 value of the @a id parameter) that offers several actions such
5727 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5728 wants to retry, the notification handler should continue
5729 the machine execution using the <link to="IConsole::resume"/>
5730 call. If the machine execution is not Paused during this
5731 notification, then it means this notification is a <i>warning</i>
5732 (for example, about a fatal condition that can happen very soon);
5733 no immediate action is required from the user, the machine
5734 continues its normal execution.
5735
5736 Note that in either case the notification handler
5737 <b>must not</b> perform any action directly on a thread
5738 where this notification is called. Everything it is allowed to
5739 do is to post a message to another thread that will then talk
5740 to the user and take the corresponding action.
5741
5742 Currently, the following error identifiers are known:
5743 <ul>
5744 <li><tt>"HostMemoryLow"</tt></li>
5745 <li><tt>"HostAudioNotResponding"</tt></li>
5746 <li><tt>"VDIStorageFull"</tt></li>
5747 </ul>
5748
5749 <note>
5750 This notification is not designed to be implemented by
5751 more than one callback at a time. If you have multiple
5752 IConsoleCallback instances registered on the given
5753 IConsole object, make sure you simply do nothing but
5754 return @c S_OK from all but one of them that does actual
5755 user notification and performs necessary actions.
5756 </note>
5757
5758 </desc>
5759 <param name="fatal" type="boolean" dir="in">
5760 <desc>Whether the error is fatal or not</desc>
5761 </param>
5762 <param name="id" type="wstring" dir="in">
5763 <desc>Error identifier</desc>
5764 </param>
5765 <param name="message" type="wstring" dir="in">
5766 <desc>Optional error message</desc>
5767 </param>
5768 </method>
5769
5770 <method name="onCanShowWindow">
5771 <desc>
5772 Notification when a call to
5773 <link to="IMachine::canShowConsoleWindow"/> is made by a
5774 front-end to check if a subsequent call to
5775 <link to="IMachine::showConsoleWindow"/> can succeed.
5776
5777 The callee should give an answer appropriate to the current
5778 machine state in the @a canShow argument. This answer must
5779 remain valid at least until the next
5780 <link to="IConsole::state">machine state</link> change.
5781
5782 <note>
5783 This notification is not designed to be implemented by
5784 more than one callback at a time. If you have multiple
5785 IConsoleCallback instances registered on the given
5786 IConsole object, make sure you simply do nothing but
5787 return @c true and @c S_OK from all but one of them that
5788 actually manages console window activation.
5789 </note>
5790 </desc>
5791 <param name="canShow" type="boolean" dir="return">
5792 <desc>
5793 @c true if the console window can be shown and @c
5794 false otherwise.
5795 </desc>
5796 </param>
5797 </method>
5798
5799 <method name="onShowWindow">
5800 <desc>
5801 Notification when a call to
5802 <link to="IMachine::showConsoleWindow"/>
5803 requests the console window to be activated and brought to
5804 foreground on the desktop of the host PC.
5805
5806 This notification should cause the VM console process to
5807 perform the requested action as described above. If it is
5808 impossible to do it at a time of this notification, this
5809 method should return a failure.
5810
5811 Note that many modern window managers on many platforms
5812 implement some sort of focus stealing prevention logic, so
5813 that it may be impossible to activate a window without the
5814 help of the currently active application (which is supposedly
5815 an initiator of this notification). In this case, this method
5816 must return a non-zero identifier that represents the
5817 top-level window of the VM console process. The caller, if it
5818 represents a currently active process, is responsible to use
5819 this identifier (in a platform-dependent manner) to perform
5820 actual window activation.
5821
5822 This method must set @a winId to zero if it has performed all
5823 actions necessary to complete the request and the console
5824 window is now active and in foreground, to indicate that no
5825 further action is required on the caller's side.
5826
5827 <note>
5828 This notification is not designed to be implemented by
5829 more than one callback at a time. If you have multiple
5830 IConsoleCallback instances registered on the given
5831 IConsole object, make sure you simply do nothing but
5832 return @c S_OK from all but one of them that actually
5833 manages console window activation.
5834 </note>
5835 </desc>
5836 <param name="winId" type="unsigned long long" dir="return">
5837 <desc>
5838 Platform-dependent identifier of the top-level VM console
5839 window, or zero if this method has performed all actions
5840 necessary to implement the <i>show window</i> semantics for
5841 the given platform and/or this VirtualBox front-end.
5842 </desc>
5843 </param>
5844 </method>
5845
5846 </interface>
5847
5848 <interface
5849 name="IRemoteDisplayInfo" extends="$unknown"
5850 uuid="550104cd-2dfd-4a6c-857d-f6f8e088e62c"
5851 wsmap="struct"
5852 >
5853 <desc>
5854 Contains information about the remote display (VRDP) capabilities and status.
5855 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5856 </desc>
5857
5858 <attribute name="active" type="boolean" readonly="yes">
5859 <desc>
5860 Whether the remote display connection is active.
5861 </desc>
5862 </attribute>
5863
5864 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5865 <desc>
5866 How many times a client connected.
5867 </desc>
5868 </attribute>
5869
5870 <attribute name="beginTime" type="long long" readonly="yes">
5871 <desc>
5872 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5873 </desc>
5874 </attribute>
5875
5876 <attribute name="endTime" type="long long" readonly="yes">
5877 <desc>
5878 When the last connection was terminated or the current time, if
5879 connection is still active, in milliseconds since 1970-01-01 UTC.
5880 </desc>
5881 </attribute>
5882
5883 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5884 <desc>
5885 How many bytes were sent in last or current, if still active, connection.
5886 </desc>
5887 </attribute>
5888
5889 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5890 <desc>
5891 How many bytes were sent in all connections.
5892 </desc>
5893 </attribute>
5894
5895 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5896 <desc>
5897 How many bytes were received in last or current, if still active, connection.
5898 </desc>
5899 </attribute>
5900
5901 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5902 <desc>
5903 How many bytes were received in all connections.
5904 </desc>
5905 </attribute>
5906
5907 <attribute name="user" type="wstring" readonly="yes">
5908 <desc>
5909 Login user name supplied by the client.
5910 </desc>
5911 </attribute>
5912
5913 <attribute name="domain" type="wstring" readonly="yes">
5914 <desc>
5915 Login domain name supplied by the client.
5916 </desc>
5917 </attribute>
5918
5919 <attribute name="clientName" type="wstring" readonly="yes">
5920 <desc>
5921 The client name supplied by the client.
5922 </desc>
5923 </attribute>
5924
5925 <attribute name="clientIP" type="wstring" readonly="yes">
5926 <desc>
5927 The IP address of the client.
5928 </desc>
5929 </attribute>
5930
5931 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5932 <desc>
5933 The client software version number.
5934 </desc>
5935 </attribute>
5936
5937 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5938 <desc>
5939 Public key exchange method used when connection was established.
5940 Values: 0 - RDP4 public key exchange scheme.
5941 1 - X509 certificates were sent to client.
5942 </desc>
5943 </attribute>
5944
5945 </interface>
5946
5947 <interface
5948 name="IConsole" extends="$unknown"
5949 uuid="9511bc54-15ee-4ddf-808e-472aba03809c"
5950 wsmap="managed"
5951 >
5952 <desc>
5953 The IConsole interface represents an interface to control virtual
5954 machine execution.
5955
5956 The console object that implements the IConsole interface is obtained
5957 from a session object after the session for the given machine has been
5958 opened using one of <link to="IVirtualBox::openSession"/>,
5959 <link to="IVirtualBox::openRemoteSession"/> or
5960 <link to="IVirtualBox::openExistingSession"/> methods.
5961
5962 Methods of the IConsole interface allow the caller to query the current
5963 virtual machine execution state, pause the machine or power it down, save
5964 the machine state or take a snapshot, attach and detach removable media
5965 and so on.
5966
5967 <see>ISession</see>
5968 </desc>
5969
5970 <attribute name="machine" type="IMachine" readonly="yes">
5971 <desc>
5972 Machine object this console is sessioned with.
5973 <note>
5974 This is a convenience property, it has the same value as
5975 <link to="ISession::machine"/> of the corresponding session
5976 object.
5977 </note>
5978 </desc>
5979 </attribute>
5980
5981 <attribute name="state" type="MachineState" readonly="yes">
5982 <desc>
5983 Current execution state of the machine.
5984 <note>
5985 This property always returns the same value as the corresponding
5986 property of the IMachine object this console is sessioned with.
5987 For the process that owns (executes) the VM, this is the
5988 preferable way of querying the VM state, because no IPC
5989 calls are made.
5990 </note>
5991 </desc>
5992 </attribute>
5993
5994 <attribute name="guest" type="IGuest" readonly="yes">
5995 <desc>Guest object.</desc>
5996 </attribute>
5997
5998 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5999 <desc>
6000 Virtual keyboard object.
6001 <note>
6002 If the machine is not running, any attempt to use
6003 the returned object will result in an error.
6004 </note>
6005 </desc>
6006 </attribute>
6007
6008 <attribute name="mouse" type="IMouse" readonly="yes">
6009 <desc>
6010 Virtual mouse object.
6011 <note>
6012 If the machine is not running, any attempt to use
6013 the returned object will result in an error.
6014 </note>
6015 </desc>
6016 </attribute>
6017
6018 <attribute name="display" type="IDisplay" readonly="yes">
6019 <desc>Virtual display object.
6020 <note>
6021 If the machine is not running, any attempt to use
6022 the returned object will result in an error.
6023 </note>
6024 </desc>
6025 </attribute>
6026
6027 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6028 <desc>Debugging interface.</desc>
6029 </attribute>
6030
6031 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6032 <desc>
6033 Collection of USB devices currently attached to the virtual
6034 USB controller.
6035 <note>
6036 The collection is empty if the machine is not running.
6037 </note>
6038 </desc>
6039 </attribute>
6040
6041 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6042 <desc>
6043 List of USB devices currently attached to the remote VRDP client.
6044 Once a new device is physically attached to the remote host computer,
6045 it appears in this list and remains there until detached.
6046 </desc>
6047 </attribute>
6048
6049 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6050 <desc>
6051 Collection of shared folders for the current session. These folders
6052 are called transient shared folders because they are available to the
6053 guest OS running inside the associated virtual machine only for the
6054 duration of the session (as opposed to
6055 <link to="IMachine::sharedFolders"/> which represent permanent shared
6056 folders). When the session is closed (e.g. the machine is powered down),
6057 these folders are automatically discarded.
6058
6059 New shared folders are added to the collection using
6060 <link to="#createSharedFolder"/>. Existing shared folders can be
6061 removed using <link to="#removeSharedFolder"/>.
6062 </desc>
6063 </attribute>
6064
6065 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6066 <desc>
6067 Interface that provides information on Remote Display (VRDP) connection.
6068 </desc>
6069 </attribute>
6070
6071 <method name="powerUp">
6072 <desc>
6073 Starts the virtual machine execution using the current machine
6074 state (that is, its current execution state, current settings and
6075 current hard disks).
6076
6077 If the machine is powered off or aborted, the execution will
6078 start from the beginning (as if the real hardware were just
6079 powered on).
6080
6081 If the machine is in the <link to="MachineState_Saved"/> state,
6082 it will continue its execution the point where the state has
6083 been saved.
6084
6085 <note>
6086 Unless you are trying to write a new VirtualBox front-end that
6087 performs direct machine execution (like the VirtualBox or VBoxSDL
6088 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6089 session opened by <link to="IVirtualBox::openSession"/> and use this
6090 session only to change virtual machine settings. If you simply want to
6091 start virtual machine execution using one of the existing front-ends
6092 (for example the VirtualBox GUI or headless server), simply use
6093 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6094 power up the machine automatically for you.
6095 </note>
6096
6097 <see>#saveState</see>
6098 <result name="VBOX_E_INVALID_VM_STATE">
6099 Virtual machine already running.
6100 </result>
6101 <result name="VBOX_E_HOST_ERROR">
6102 Host interface does not exist or name not set.
6103 </result>
6104 <result name="VBOX_E_FILE_ERROR">
6105 Invalid saved state file.
6106 </result>
6107 </desc>
6108 <param name="progress" type="IProgress" dir="return">
6109 <desc>Progress object to track the operation completion.</desc>
6110 </param>
6111 </method>
6112
6113 <method name="powerUpPaused">
6114 <desc>
6115 Identical to powerUp except that the VM will enter the
6116 <link to="MachineState_Paused"/> state, instead of
6117 <link to="MachineState_Running"/>.
6118
6119 <see>#powerUp</see>
6120 <result name="VBOX_E_INVALID_VM_STATE">
6121 Virtual machine already running.
6122 </result>
6123 <result name="VBOX_E_HOST_ERROR">
6124 Host interface does not exist or name not set.
6125 </result>
6126 <result name="VBOX_E_FILE_ERROR">
6127 Invalid saved state file.
6128 </result>
6129 </desc>
6130 <param name="progress" type="IProgress" dir="return">
6131 <desc>Progress object to track the operation completion.</desc>
6132 </param>
6133 </method>
6134
6135 <method name="powerDown">
6136 <desc>
6137 Stops the virtual machine execution.
6138 After this operation completes, the machine will go to the
6139 PoweredOff state.
6140
6141 @deprecated This method will be removed in VirtualBox 2.1 where the
6142 powerDownAsync() method will take its name. Do not use this method in
6143 the code.
6144 <result name="VBOX_E_INVALID_VM_STATE">
6145 Virtual machine must be Running, Paused or Stuck to be powered down.
6146 </result>
6147 <result name="VBOX_E_VM_ERROR">
6148 Unable to power off or destroy virtual machine.
6149 </result>
6150 </desc>
6151 </method>
6152
6153 <method name="powerDownAsync">
6154 <desc>
6155 Initiates the power down procedure to stop the virtual machine
6156 execution.
6157
6158 The completion of the power down procedure is tracked using the returned
6159 IProgress object. After the operation is complete, the machine will go
6160 to the PoweredOff state.
6161
6162 @warning This method will be renamed to "powerDown" in VirtualBox 2.1
6163 where the original powerDown() method will be removed. You will need to
6164 rename "powerDownAsync" to "powerDown" in your sources to make them
6165 build with version 2.1.
6166 <result name="VBOX_E_INVALID_VM_STATE">
6167 Virtual machine must be Running, Paused or Stuck to be powered down.
6168 </result>
6169 </desc>
6170 <param name="progress" type="IProgress" dir="return">
6171 <desc>Progress object to track the operation completion.</desc>
6172 </param>
6173 </method>
6174
6175 <method name="reset">
6176 <desc>Resets the virtual machine.
6177 <result name="VBOX_E_INVALID_VM_STATE">
6178 Virtual machine not in Running state.
6179 </result>
6180 <result name="VBOX_E_VM_ERROR">
6181 Virtual machine error in reset operation.
6182 </result>
6183 </desc>
6184 </method>
6185
6186 <method name="pause">
6187 <desc>Pauses the virtual machine execution.
6188 <result name="VBOX_E_INVALID_VM_STATE">
6189 Virtual machine not in Running state.
6190 </result>
6191 <result name="VBOX_E_VM_ERROR">
6192 Virtual machine error in suspend operation.
6193 </result>
6194 </desc>
6195 </method>
6196
6197 <method name="resume">
6198 <desc>Resumes the virtual machine execution.
6199 <result name="VBOX_E_INVALID_VM_STATE">
6200 Virtual machine not in Paused state.
6201 </result>
6202 <result name="VBOX_E_VM_ERROR">
6203 Virtual machine error in resume operation.
6204 </result>
6205 </desc>
6206 </method>
6207
6208 <method name="powerButton">
6209 <desc>Sends the ACPI power button event to the guest.
6210 <result name="VBOX_E_INVALID_VM_STATE">
6211 Virtual machine not in Running state.
6212 </result>
6213 <result name="VBOX_E_PDM_ERROR">
6214 Controlled power off failed.
6215 </result>
6216 </desc>
6217 </method>
6218
6219 <method name="sleepButton">
6220 <desc>Sends the ACPI sleep button event to the guest.
6221 <result name="VBOX_E_INVALID_VM_STATE">
6222 Virtual machine not in Running state.
6223 </result>
6224 <result name="VBOX_E_PDM_ERROR">
6225 Sending sleep button event failed.
6226 </result>
6227 </desc>
6228 </method>
6229
6230 <method name="getPowerButtonHandled">
6231 <desc>Checks if the last power button event was handled by guest.
6232 <result name="VBOX_E_PDM_ERROR">
6233 Checking if the event was handled by the guest OS failed.
6234 </result>
6235 </desc>
6236 <param name="handled" type="boolean" dir="return"/>
6237 </method>
6238
6239 <method name="getGuestEnteredACPIMode">
6240 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6241 G1 (sleeping). If this method returns false, the guest will
6242 most likely not respond to external ACPI events.
6243 <result name="VBOX_E_INVALID_VM_STATE">
6244 Virtual machine not in Running state.
6245 </result>
6246 </desc>
6247 <param name="entered" type="boolean" dir="return"/>
6248 </method>
6249
6250 <method name="saveState">
6251 <desc>
6252 Saves the current execution state of a running virtual machine
6253 and stops its execution.
6254
6255 After this operation completes, the machine will go to the
6256 Saved state. Next time it is powered up, this state will
6257 be restored and the machine will continue its execution from
6258 the place where it was saved.
6259
6260 This operation differs from taking a snapshot to the effect
6261 that it doesn't create new differencing hard disks. Also, once
6262 the machine is powered up from the state saved using this method,
6263 the saved state is deleted, so it will be impossible to return
6264 to this state later.
6265
6266 <note>
6267 On success, this method implicitly calls
6268 <link to="IMachine::saveSettings"/> to save all current machine
6269 settings (including runtime changes to the DVD drive, etc.).
6270 Together with the impossibility to change any VM settings when it is
6271 in the Saved state, this guarantees adequate hardware
6272 configuration of the machine when it is restored from the saved
6273 state file.
6274 </note>
6275
6276 <note>
6277 The machine must be in the Running or Paused state, otherwise
6278 the operation will fail.
6279 </note>
6280 <result name="VBOX_E_INVALID_VM_STATE">
6281 Virtual machine state neither Running nor Paused.
6282 </result>
6283 <result name="VBOX_E_FILE_ERROR">
6284 Failed to create directory for saved state file.
6285 </result>
6286
6287 <see><link to="#takeSnapshot"/></see>
6288 </desc>
6289 <param name="progress" type="IProgress" dir="return">
6290 <desc>Progress object to track the operation completion.</desc>
6291 </param>
6292 </method>
6293
6294 <method name="adoptSavedState">
6295 <desc>
6296 Associates the given saved state file to the virtual machine.
6297
6298 On success, the machine will go to the Saved state. Next time it is
6299 powered up, it will be restored from the adopted saved state and
6300 continue execution from the place where the saved state file was
6301 created.
6302
6303 The specified saved state file path may be absolute or relative to the
6304 folder the VM normally saves the state to (usually,
6305 <link to="IMachine::snapshotFolder"/>).
6306
6307 <note>
6308 It's a caller's responsibility to make sure the given saved state
6309 file is compatible with the settings of this virtual machine that
6310 represent its virtual hardware (memory size, hard disk configuration
6311 etc.). If there is a mismatch, the behavior of the virtual machine
6312 is undefined.
6313 </note>
6314 <result name="VBOX_E_INVALID_VM_STATE">
6315 Virtual machine state neither PoweredOff nor Aborted.
6316 </result>
6317 </desc>
6318 <param name="savedStateFile" type="wstring" dir="in">
6319 <desc>Path to the saved state file to adopt.</desc>
6320 </param>
6321 </method>
6322
6323 <method name="discardSavedState">
6324 <desc>
6325 Discards (deletes) the saved state of the virtual machine
6326 previously created by <link to="#saveState"/>. Next time the
6327 machine is powered up, a clean boot will occur.
6328 <note>
6329 This operation is equivalent to resetting or powering off
6330 the machine without doing a proper shutdown in the guest OS.
6331 </note>
6332 <result name="VBOX_E_INVALID_VM_STATE">
6333 Virtual machine not in state Saved.
6334 </result>
6335 </desc>
6336 </method>
6337
6338 <method name="getDeviceActivity">
6339 <desc>
6340 Gets the current activity type of a given device or device group.
6341 <result name="E_INVALIDARG">
6342 Invalid device type.
6343 </result>
6344 </desc>
6345 <param name="type" type="DeviceType" dir="in"/>
6346 <param name="activity" type="DeviceActivity" dir="return"/>
6347 </method>
6348
6349 <method name="attachUSBDevice">
6350 <desc>
6351 Attaches a host USB device with the given UUID to the
6352 USB controller of the virtual machine.
6353
6354 The device needs to be in one of the following states:
6355 <link to="USBDeviceState_Busy"/>,
6356 <link to="USBDeviceState_Available"/> or
6357 <link to="USBDeviceState_Held"/>,
6358 otherwise an error is immediately returned.
6359
6360 When the device state is
6361 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6362 be returned if the host computer refuses to release it for some reason.
6363
6364 <see>IUSBController::deviceFilters, USBDeviceState</see>
6365 <result name="VBOX_E_INVALID_VM_STATE">
6366 Virtual machine state neither Running nor Paused.
6367 </result>
6368 <result name="VBOX_E_PDM_ERROR">
6369 Virtual machine does not have a USB controller.
6370 </result>
6371 </desc>
6372 <param name="id" type="uuid" dir="in">
6373 <desc>UUID of the host USB device to attach.</desc>
6374 </param>
6375 </method>
6376
6377 <method name="detachUSBDevice">
6378 <desc>
6379 Detaches an USB device with the given UUID from the USB controller
6380 of the virtual machine.
6381
6382 After this method succeeds, the VirtualBox server re-initiates
6383 all USB filters as if the device were just physically attached
6384 to the host, but filters of this machine are ignored to avoid
6385 a possible automatic re-attachment.
6386
6387 <see>IUSBController::deviceFilters, USBDeviceState</see>
6388
6389 <result name="VBOX_E_PDM_ERROR">
6390 Virtual machine does not have a USB controller.
6391 </result>
6392 <result name="E_INVALIDARG">
6393 USB device not attached to this virtual machine.
6394 </result>
6395 </desc>
6396 <param name="id" type="uuid" dir="in">
6397 <desc>UUID of the USB device to detach.</desc>
6398 </param>
6399 <param name="device" type="IUSBDevice" dir="return">
6400 <desc>Detached USB device.</desc>
6401 </param>
6402 </method>
6403
6404 <method name="findUSBDeviceByAddress">
6405 <desc>
6406 Searches for a USB device with the given host address.
6407
6408 <result name="VBOX_E_OBJECT_NOT_FOUND">
6409 Given @c name does not correspond to any USB device.
6410 </result>
6411
6412 <see>IUSBDevice::address</see>
6413 </desc>
6414 <param name="name" type="wstring" dir="in">
6415 <desc>
6416 Address of the USB device (as assigned by the host) to
6417 search for.
6418 </desc>
6419 </param>
6420 <param name="device" type="IUSBDevice" dir="return">
6421 <desc>Found USB device object.</desc>
6422 </param>
6423 </method>
6424
6425 <method name="findUSBDeviceById">
6426 <desc>
6427 Searches for a USB device with the given UUID.
6428
6429 <result name="VBOX_E_OBJECT_NOT_FOUND">
6430 Given @c id does not correspond to any USB device.
6431 </result>
6432
6433 <see>IUSBDevice::id</see>
6434 </desc>
6435 <param name="id" type="uuid" dir="in">
6436 <desc>UUID of the USB device to search for.</desc>
6437 </param>
6438 <param name="device" type="IUSBDevice" dir="return">
6439 <desc>Found USB device object.</desc>
6440 </param>
6441 </method>
6442
6443 <method name="createSharedFolder">
6444 <desc>
6445 Creates a transient new shared folder by associating the given logical
6446 name with the given host path, adds it to the collection of shared
6447 folders and starts sharing it. Refer to the description of
6448 <link to="ISharedFolder"/> to read more about logical names.
6449
6450 <result name="VBOX_E_INVALID_VM_STATE">
6451 Virtual machine in Saved state or currently changing state.
6452 </result>
6453 <result name="VBOX_E_FILE_ERROR">
6454 Shared folder already exists or not accessible.
6455 </result>
6456 </desc>
6457 <param name="name" type="wstring" dir="in">
6458 <desc>Unique logical name of the shared folder.</desc>
6459 </param>
6460 <param name="hostPath" type="wstring" dir="in">
6461 <desc>Full path to the shared folder in the host file system.</desc>
6462 </param>
6463 <param name="writable" type="boolean" dir="in">
6464 <desc>Whether the share is writable or readonly</desc>
6465 </param>
6466 </method>
6467
6468 <method name="removeSharedFolder">
6469 <desc>
6470 Removes a transient shared folder with the given name previously
6471 created by <link to="#createSharedFolder"/> from the collection of
6472 shared folders and stops sharing it.
6473 <result name="VBOX_E_INVALID_VM_STATE">
6474 Virtual machine in Saved state or currently changing state.
6475 </result>
6476 <result name="VBOX_E_FILE_ERROR">
6477 Shared folder does not exists.
6478 </result>
6479 </desc>
6480 <param name="name" type="wstring" dir="in">
6481 <desc>Logical name of the shared folder to remove.</desc>
6482 </param>
6483 </method>
6484
6485 <method name="takeSnapshot">
6486 <desc>
6487 Saves the current execution state and all settings of the
6488 machine and creates differencing images for all
6489 normal (non-independent) hard disks.
6490
6491 This method can be called for a PoweredOff, Saved, Running or
6492 Paused virtual machine. When the machine is PoweredOff, an
6493 offline <link to="ISnapshot">snapshot</link> is created,
6494 in all other cases -- an online snapshot.
6495
6496 The taken snapshot is always based on the
6497 <link to="IMachine::currentSnapshot">current
6498 snapshot</link> of the associated virtual machine and becomes
6499 a new current snapshot.
6500
6501 <note>
6502 This method implicitly calls <link to="IMachine::saveSettings"/> to
6503 save all current machine settings before taking an offline snapshot.
6504 </note>
6505
6506 <see>ISnapshot, <link to="#saveState"/></see>
6507 <result name="VBOX_E_INVALID_VM_STATE">
6508 Virtual machine currently changing state.
6509 </result>
6510 </desc>
6511 <param name="name" type="wstring" dir="in">
6512 <desc>Short name for the snapshot.</desc>
6513 </param>
6514 <param name="description" type="wstring" dir="in">
6515 <desc>Optional description of the snapshot.</desc>
6516 </param>
6517 <param name="progress" type="IProgress" dir="return">
6518 <desc>Progress object to track the operation completion.</desc>
6519 </param>
6520 </method>
6521
6522 <method name="discardSnapshot">
6523 <desc>
6524
6525 Starts discarding the specified snapshot. The execution state
6526 and settings of the associated machine stored in the snapshot
6527 will be deleted. The contents of all differencing hard disks of
6528 this snapshot will be merged with the contents of their
6529 dependent child hard disks to keep the, disks valid (in other
6530 words, all changes represented by hard disks being discarded
6531 will be propagated to their child hard disks). After that, this
6532 snapshot's differencing hard disks will be deleted. The parent
6533 of this snapshot will become a new parent for all its child
6534 snapshots.
6535
6536 If the discarded snapshot is the current one, its parent
6537 snapshot will become a new current snapshot. The current machine
6538 state is not directly affected in this case, except that
6539 currently attached differencing hard disks based on hard disks
6540 of the discarded snapshot will be also merged as described
6541 above.
6542
6543 If the discarded snapshot is the first one (the root snapshot)
6544 and it has exactly one child snapshot, this child snapshot will
6545 become the first snapshot after discarding. If there are no
6546 children at all (i.e. the first snapshot is the only snapshot of
6547 the machine), both the current and the first snapshot of the
6548 machine will be set to null. In all other cases, the first
6549 snapshot cannot be discarded.
6550
6551 You cannot discard the snapshot if it
6552 stores <link to="HardDiskType_Normal">normal</link> (non-differencing)
6553 hard disks that have differencing hard disks based on them. Snapshots of
6554 such kind can be discarded only when every normal hard disk has either
6555 no children at all or exactly one child. In the former case, the normal
6556 hard disk simply becomes unused (i.e. not attached to any VM). In the
6557 latter case, it receives all the changes stored in the child hard disk,
6558 and then it replaces the child hard disk in the configuration of the
6559 corresponding snapshot or machine.
6560
6561 Also, you cannot discard the snapshot if it stores hard disks
6562 (of any type) having differencing child hard disks that belong
6563 to other machines. Such snapshots can be only discarded after
6564 you discard all snapshots of other machines containing "foreign"
6565 child disks, or detach these "foreign" child disks from machines
6566 they are attached to.
6567
6568 One particular example of the snapshot storing normal hard disks
6569 is the first snapshot of a virtual machine that had normal hard
6570 disks attached when taking the snapshot. Be careful when
6571 discarding such snapshots because this implicitly commits
6572 changes (made since the snapshot being discarded has been taken)
6573 to normal hard disks (as described above), which may be not what
6574 you want.
6575
6576 The virtual machine is put to
6577 the <link to="MachineState_Discarding">Discarding</link> state until
6578 the discard operation is completed.
6579
6580 <note>
6581 The machine must not be running, otherwise the operation
6582 will fail.
6583 </note>
6584
6585 <note>
6586 Child hard disks of all normal hard disks of the discarded snapshot
6587 must be accessible (see <link to="IMedium::state"/>) for this
6588 operation to succeed. In particular, this means that all virtual
6589 machines, whose hard disks are directly or indirectly based on the
6590 hard disks of discarded snapshot, must be powered off.
6591 </note>
6592 <note>
6593 Merging hard disk contents can be very time and disk space
6594 consuming, if these disks are big in size and have many
6595 children. However, if the snapshot being discarded is the last
6596 (head) snapshot on the branch, the operation will be rather
6597 quick.
6598 </note>
6599 <note>
6600 Note that discarding the current snapshot
6601 will implicitly call <link to="IMachine::saveSettings"/> to
6602 make all current machine settings permanent.
6603 </note>
6604 <result name="VBOX_E_INVALID_VM_STATE">
6605 Virtual machine is running.
6606 </result>
6607 </desc>
6608 <param name="id" type="uuid" dir="in">
6609 <desc>UUID of the snapshot to discard.</desc>
6610 </param>
6611 <param name="progress" type="IProgress" dir="return">
6612 <desc>Progress object to track the operation completion.</desc>
6613 </param>
6614 </method>
6615
6616 <method name="discardCurrentState">
6617 <desc>
6618 This operation is similar to <link to="IConsole::discardSnapshot"/> but
6619 affects the current machine state. This means that the state stored in
6620 the current snapshot will become a new current state, and all current
6621 settings of the machine and changes stored in differencing hard disks
6622 will be lost.
6623
6624 After this operation is successfully completed, new empty differencing
6625 hard disks are created for all normal hard disks of the machine.
6626
6627 If the current snapshot of the machine is an online snapshot, the
6628 machine will go to the <link to="MachineState_Saved"> saved
6629 state</link>, so that the next time it is powered on, the execution
6630 state will be restored from the current snapshot.
6631
6632 <note>
6633 The machine must not be running, otherwise the operation will fail.
6634 </note>
6635
6636 <note>
6637 If the machine state is <link to="MachineState_Saved">Saved</link>
6638 prior to this operation, the saved state file will be implicitly
6639 discarded (as if <link to="IConsole::discardSavedState"/> were
6640 called).
6641 </note>
6642
6643 <result name="VBOX_E_INVALID_VM_STATE">
6644 Virtual machine is running.
6645 </result>
6646 </desc>
6647 <param name="progress" type="IProgress" dir="return">
6648 <desc>Progress object to track the operation completion.</desc>
6649 </param>
6650 </method>
6651
6652 <method name="discardCurrentSnapshotAndState">
6653 <desc>
6654
6655 This method is equivalent to
6656 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6657 (currentSnapshot.id(), progress) followed by
6658 <link to="IConsole::discardCurrentState"/>.
6659
6660 As a result, the machine will be fully restored from the
6661 snapshot preceding the current snapshot, while both the current
6662 snapshot and the current machine state will be discarded.
6663
6664 If the current snapshot is the first snapshot of the machine (i.e. it
6665 has the only snapshot), the current machine state will be
6666 discarded <b>before</b> discarding the snapshot. In other words, the
6667 machine will be restored from its last snapshot, before discarding
6668 it. This differs from performing a single
6669 <link to="IConsole::discardSnapshot"/> call (note that no
6670 <link to="IConsole::discardCurrentState"/> will be possible after it)
6671 to the effect that the latter will preserve the current state instead of
6672 discarding it.
6673
6674 Unless explicitly mentioned otherwise, all remarks and
6675 limitations of the above two methods also apply to this method.
6676
6677 <note>
6678 The machine must not be running, otherwise the operation
6679 will fail.
6680 </note>
6681
6682 <note>
6683 If the machine state is <link to="MachineState_Saved">Saved</link>
6684 prior to this operation, the saved state file will be implicitly
6685 discarded (as if <link to="#discardSavedState"/> were
6686 called).
6687 </note>
6688
6689 <note>
6690 This method is more efficient than calling both of the above
6691 methods separately: it requires less IPC calls and provides
6692 a single progress object.
6693 </note>
6694
6695 <result name="VBOX_E_INVALID_VM_STATE">
6696 Virtual machine is running.
6697 </result>
6698 </desc>
6699 <param name="progress" type="IProgress" dir="return">
6700 <desc>Progress object to track the operation completion.</desc>
6701 </param>
6702 </method>
6703
6704 <method name="registerCallback">
6705 <desc>
6706 Registers a new console callback on this instance. The methods of the
6707 callback interface will be called by this instance when the appropriate
6708 event occurs.
6709 </desc>
6710 <param name="callback" type="IConsoleCallback" dir="in"/>
6711 </method>
6712
6713 <method name="unregisterCallback">
6714 <desc>
6715 Unregisters the console callback previously registered using
6716 <link to="#registerCallback"/>.
6717 <result name="E_INVALIDARG">
6718 Given @a callback handler is not registered.
6719 </result>
6720 </desc>
6721 <param name="callback" type="IConsoleCallback" dir="in"/>
6722 </method>
6723 </interface>
6724
6725 <!--
6726 // IHost
6727 /////////////////////////////////////////////////////////////////////////
6728 -->
6729
6730 <interface
6731 name="IHostDVDDrive" extends="$unknown"
6732 uuid="21f86694-202d-4ce4-8b05-a63ff82dbf4c"
6733 wsmap="managed"
6734 >
6735 <desc>
6736 The IHostDVDDrive interface represents the physical CD/DVD drive
6737 hardware on the host. Used indirectly in <link to="IHost::DVDDrives"/>.
6738 </desc>
6739
6740 <attribute name="name" type="wstring" readonly="yes">
6741 <desc>
6742 Returns the platform-specific device identifier.
6743 On DOS-like platforms, it is a drive name (e.g. R:).
6744 On Unix-like platforms, it is a device name (e.g. /dev/hdc).
6745 </desc>
6746 </attribute>
6747 <attribute name="description" type="wstring" readonly="yes">
6748 <desc>
6749 Returns a human readable description for the drive. This
6750 description usually contains the product and vendor name. A
6751 @c null string is returned if the description is not available.
6752 </desc>
6753 </attribute>
6754 <attribute name="udi" type="wstring" readonly="yes">
6755 <desc>
6756 Returns the unique device identifier for the drive. This
6757 attribute is reserved for future use instead of
6758 <link to="#name"/>. Currently it is not used and may return
6759 @c null on some platforms.
6760 </desc>
6761 </attribute>
6762
6763 </interface>
6764
6765 <interface
6766 name="IHostFloppyDrive" extends="$unknown"
6767 uuid="3f02d604-e908-4919-9fd1-8a4afd68fc63"
6768 wsmap="managed"
6769 >
6770 <desc>
6771 The IHostFloppyDrive interface represents the physical floppy drive
6772 hardware on the host. Used indirectly in <link to="IHost::floppyDrives"/>.
6773 </desc>
6774 <attribute name="name" type="wstring" readonly="yes">
6775 <desc>
6776 Returns the platform-specific device identifier.
6777 On DOS-like platforms, it is a drive name (e.g. A:).
6778 On Unix-like platforms, it is a device name (e.g. /dev/fd0).
6779 </desc>
6780 </attribute>
6781 <attribute name="description" type="wstring" readonly="yes">
6782 <desc>
6783 Returns a human readable description for the drive. This
6784 description usually contains the product and vendor name. A
6785 @c null string is returned if the description is not available.
6786 </desc>
6787 </attribute>
6788 <attribute name="udi" type="wstring" readonly="yes">
6789 <desc>
6790 Returns the unique device identifier for the drive. This
6791 attribute is reserved for future use instead of
6792 <link to="#name"/>. Currently it is not used and may return
6793 @c null on some platforms.
6794 </desc>
6795 </attribute>
6796 </interface>
6797
6798 <enum
6799 name="HostNetworkInterfaceMediumType"
6800 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6801 >
6802 <desc>
6803 Type of encapsulation. Ethernet encapsulation includes both wired and
6804 wireless Ethernet connections.
6805 <see>IHostNetworkInterface</see>
6806 </desc>
6807
6808 <const name="Unknown" value="0">
6809 <desc>
6810 The type of interface cannot be determined.
6811 </desc>
6812 </const>
6813 <const name="Ethernet" value="1">
6814 <desc>
6815 Ethernet frame encapsulation.
6816 </desc>
6817 </const>
6818 <const name="PPP" value="2">
6819 <desc>
6820 Point-to-point protocol encapsulation.
6821 </desc>
6822 </const>
6823 <const name="SLIP" value="3">
6824 <desc>
6825 Serial line IP encapsulation.
6826 </desc>
6827 </const>
6828 </enum>
6829
6830 <enum
6831 name="HostNetworkInterfaceStatus"
6832 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6833 >
6834 <desc>
6835 Current status of the interface.
6836 <see>IHostNetworkInterface</see>
6837 </desc>
6838
6839 <const name="Unknown" value="0">
6840 <desc>
6841 The state of interface cannot be determined.
6842 </desc>
6843 </const>
6844 <const name="Up" value="1">
6845 <desc>
6846 The interface is fully operational.
6847 </desc>
6848 </const>
6849 <const name="Down" value="2">
6850 <desc>
6851 The interface is not functioning.
6852 </desc>
6853 </const>
6854 </enum>
6855
6856 <enum
6857 name="HostNetworkInterfaceType"
6858 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6859 >
6860 <desc>
6861 Network interface type.
6862 </desc>
6863 <const name="Bridged" value="1"/>
6864 <const name="HostOnly" value="2"/>
6865 </enum>
6866
6867 <interface
6868 name="IHostNetworkInterface" extends="$unknown"
6869 uuid="88adaf3f-166b-4542-9457-0f1323507fae"
6870 wsmap="managed"
6871 >
6872 <desc>
6873 Reprents one of host's network interfaces. IP V6 address and network
6874 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6875 separated by colons.
6876 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6877 </desc>
6878 <attribute name="name" type="wstring" readonly="yes">
6879 <desc>Returns the host network interface name.</desc>
6880 </attribute>
6881
6882 <attribute name="id" type="uuid" readonly="yes">
6883 <desc>Returns the interface UUID.</desc>
6884 </attribute>
6885
6886 <attribute name="networkName" type="wstring" readonly="yes">
6887 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6888 </attribute>
6889
6890 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6891 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6892 </attribute>
6893
6894 <attribute name="IPAddress" type="wstring" readonly="yes">
6895 <desc>Returns the IP V4 address of the interface.</desc>
6896 </attribute>
6897
6898 <attribute name="networkMask" type="wstring" readonly="yes">
6899 <desc>Returns the network mask of the interface.</desc>
6900 </attribute>
6901
6902 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6903 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6904 </attribute>
6905
6906 <attribute name="IPV6Address" type="wstring" readonly="yes">
6907 <desc>Returns the IP V6 address of the interface.</desc>
6908 </attribute>
6909
6910 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6911 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6912 </attribute>
6913
6914 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6915 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6916 </attribute>
6917
6918 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6919 <desc>Type of protocol encapsulation used.</desc>
6920 </attribute>
6921
6922 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6923 <desc>Status of the interface.</desc>
6924 </attribute>
6925
6926 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6927 <desc>specifies the host interface type.</desc>
6928 </attribute>
6929
6930 <method name="enableStaticIpConfig">
6931 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6932 <param name="IPAddress" type="wstring" dir="in">
6933 <desc>
6934 IP address.
6935 </desc>
6936 </param>
6937 <param name="networkMask" type="wstring" dir="in">
6938 <desc>
6939 network mask.
6940 </desc>
6941 </param>
6942 </method>
6943
6944 <method name="enableStaticIpConfigV6">
6945 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6946 <param name="IPV6Address" type="wstring" dir="in">
6947 <desc>
6948 IP address.
6949 </desc>
6950 </param>
6951 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6952 <desc>
6953 network mask.
6954 </desc>
6955 </param>
6956 </method>
6957
6958 <method name="enableDynamicIpConfig">
6959 <desc>enables the dynamic IP configuration.</desc>
6960 </method>
6961
6962 <method name="dhcpRediscover">
6963 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6964 </method>
6965
6966 </interface>
6967
6968 <interface
6969 name="IHost" extends="$unknown"
6970 uuid="926469ca-9091-42ef-928e-582d78b66c70"
6971 wsmap="managed"
6972 >
6973 <desc>
6974 The IHost interface represents the physical machine that this VirtualBox
6975 installation runs on.
6976
6977 An object implementing this interface is returned by the
6978 <link to="IVirtualBox::host" /> attribute. This interface contains
6979 read-only information about the host's physical hardware (such as what
6980 processors and disks are available, what the host operating system is,
6981 and so on) and also allows for manipulating some of the host's hardware,
6982 such as global USB device filters and host interface networking.
6983
6984 </desc>
6985 <attribute name="DVDDrives" type="IHostDVDDrive" readonly="yes" safearray="yes">
6986 <desc>List of DVD drives available on the host.</desc>
6987 </attribute>
6988
6989 <attribute name="floppyDrives" type="IHostFloppyDrive" readonly="yes" safearray="yes">
6990 <desc>List of floppy drives available on the host.</desc>
6991 </attribute>
6992
6993 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6994 <desc>
6995 List of USB devices currently attached to the host.
6996 Once a new device is physically attached to the host computer,
6997 it appears in this list and remains there until detached.
6998
6999 <note>
7000 If USB functionality is not available in the given edition of
7001 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7002 </note>
7003 </desc>
7004 </attribute>
7005
7006 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7007 <desc>
7008 List of USB device filters in action.
7009 When a new device is physically attached to the host computer,
7010 filters from this list are applied to it (in order they are stored
7011 in the list). The first matched filter will determine the
7012 <link to="IHostUSBDeviceFilter::action">action</link>
7013 performed on the device.
7014
7015 Unless the device is ignored by these filters, filters of all
7016 currently running virtual machines
7017 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7018
7019 <note>
7020 If USB functionality is not available in the given edition of
7021 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7022 </note>
7023
7024 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7025 </desc>
7026 </attribute>
7027
7028 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7029 <desc>List of host network interfaces currently defined on the host.</desc>
7030 </attribute>
7031
7032 <attribute name="processorCount" type="unsigned long" readonly="yes">
7033 <desc>Number of (logical) CPUs installed in the host system.</desc>
7034 </attribute>
7035
7036 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7037 <desc>Number of (logical) CPUs online in the host system.</desc>
7038 </attribute>
7039
7040 <method name="getProcessorSpeed">
7041 <desc>Query the (approximate) maximum speed of a specified host CPU in
7042 Megahertz.
7043 </desc>
7044 <param name="cpuId" type="unsigned long" dir="in">
7045 <desc>
7046 Identifier of the CPU.
7047 </desc>
7048 </param>
7049 <param name="speed" type="unsigned long" dir="return">
7050 <desc>
7051 Speed value. 0 is returned if value is not known or @a cpuId is
7052 invalid.
7053 </desc>
7054 </param>
7055 </method>
7056
7057 <method name="getProcessorFeature">
7058 <desc>Query whether a CPU feature is supported or not.</desc>
7059 <param name="feature" type="ProcessorFeature" dir="in">
7060 <desc>
7061 CPU Feature identifier.
7062 </desc>
7063 </param>
7064 <param name="supported" type="boolean" dir="return">
7065 <desc>
7066 Feature is supported or not.
7067 </desc>
7068 </param>
7069 </method>
7070
7071 <method name="getProcessorDescription">
7072 <desc>Query the model string of a specified host CPU.
7073 <note>
7074 This function is not implemented in the current version of the
7075 product.
7076 </note>
7077 </desc>
7078 <param name="cpuId" type="unsigned long" dir="in">
7079 <desc>
7080 Identifier of the CPU.
7081 </desc>
7082 </param>
7083 <param name="description" type="wstring" dir="return">
7084 <desc>
7085 Model string. A NULL string is returned if value is not known or
7086 @a cpuId is invalid.
7087 </desc>
7088 </param>
7089 </method>
7090
7091 <attribute name="memorySize" type="unsigned long" readonly="yes">
7092 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7093 </attribute>
7094
7095 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7096 <desc>Available system memory in the host system.</desc>
7097 </attribute>
7098
7099 <attribute name="operatingSystem" type="wstring" readonly="yes">
7100 <desc>Name of the host system's operating system.</desc>
7101 </attribute>
7102
7103 <attribute name="OSVersion" type="wstring" readonly="yes">
7104 <desc>Host operating system's version string.</desc>
7105 </attribute>
7106
7107 <attribute name="UTCTime" type="long long" readonly="yes">
7108 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7109 </attribute>
7110
7111<if target="midl">
7112 <method name="createHostOnlyNetworkInterface">
7113 <desc>
7114 Creates a new adapter for Host Only Networking.
7115 <result name="E_INVALIDARG">
7116 Host network interface @a name already exists.
7117 </result>
7118 </desc>
7119 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7120 <desc>
7121 Created host interface object.
7122 </desc>
7123 </param>
7124 <param name="progress" type="IProgress" dir="return">
7125 <desc>
7126 Progress object to track the operation completion.
7127 </desc>
7128 </param>
7129 </method>
7130 <method name="removeHostOnlyNetworkInterface">
7131 <desc>
7132 Removes the given Host Only Networking interface.
7133 <result name="VBOX_E_OBJECT_NOT_FOUND">
7134 No host network interface matching @a id found.
7135 </result>
7136 </desc>
7137 <param name="id" type="uuid" dir="in">
7138 <desc>
7139 Adapter GUID.
7140 </desc>
7141 </param>
7142 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7143 <desc>
7144 Removed host interface object.
7145 </desc>
7146 </param>
7147 <param name="progress" type="IProgress" dir="return">
7148 <desc>
7149 Progress object to track the operation completion.
7150 </desc>
7151 </param>
7152 </method>
7153</if>
7154
7155 <method name="createUSBDeviceFilter">
7156 <desc>
7157 Creates a new USB device filter. All attributes except
7158 the filter name are set to <tt>null</tt> (any match),
7159 <i>active</i> is <tt>false</tt> (the filter is not active).
7160
7161 The created filter can be added to the list of filters using
7162 <link to="#insertUSBDeviceFilter"/>.
7163
7164 <see>#USBDeviceFilters</see>
7165 </desc>
7166 <param name="name" type="wstring" dir="in">
7167 <desc>
7168 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7169 for more info.
7170 </desc>
7171 </param>
7172 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7173 <desc>Created filter object.</desc>
7174 </param>
7175 </method>
7176
7177 <method name="insertUSBDeviceFilter">
7178 <desc>
7179 Inserts the given USB device to the specified position
7180 in the list of filters.
7181
7182 Positions are numbered starting from <tt>0</tt>. If the specified
7183 position is equal to or greater than the number of elements in
7184 the list, the filter is added at the end of the collection.
7185
7186 <note>
7187 Duplicates are not allowed, so an attempt to insert a
7188 filter already in the list is an error.
7189 </note>
7190 <note>
7191 If USB functionality is not available in the given edition of
7192 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7193 </note>
7194
7195 <see>#USBDeviceFilters</see>
7196
7197 <result name="VBOX_E_INVALID_OBJECT_STATE">
7198 USB device filter is not created within this VirtualBox instance.
7199 </result>
7200 <result name="E_INVALIDARG">
7201 USB device filter already in list.
7202 </result>
7203
7204 </desc>
7205 <param name="position" type="unsigned long" dir="in">
7206 <desc>Position to insert the filter to.</desc>
7207 </param>
7208 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7209 <desc>USB device filter to insert.</desc>
7210 </param>
7211 </method>
7212
7213 <method name="removeUSBDeviceFilter">
7214 <desc>
7215 Removes a USB device filter from the specified position in the
7216 list of filters.
7217
7218 Positions are numbered starting from <tt>0</tt>. Specifying a
7219 position equal to or greater than the number of elements in
7220 the list will produce an error.
7221
7222 <note>
7223 If USB functionality is not available in the given edition of
7224 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7225 </note>
7226
7227 <see>#USBDeviceFilters</see>
7228
7229 <result name="E_INVALIDARG">
7230 USB device filter list empty or invalid @a position.
7231 </result>
7232
7233 </desc>
7234 <param name="position" type="unsigned long" dir="in">
7235 <desc>Position to remove the filter from.</desc>
7236 </param>
7237 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7238 <desc>Removed USB device filter.</desc>
7239 </param>
7240 </method>
7241
7242 <method name="findHostDVDDrive">
7243 <desc>
7244 Searches for a host DVD drive with the given @c name.
7245
7246 <result name="VBOX_E_OBJECT_NOT_FOUND">
7247 Given @c name does not correspond to any host drive.
7248 </result>
7249
7250 </desc>
7251 <param name="name" type="wstring" dir="in">
7252 <desc>Name of the host drive to search for</desc>
7253 </param>
7254 <param name="drive" type="IHostDVDDrive" dir="return">
7255 <desc>Found host drive object</desc>
7256 </param>
7257 </method>
7258
7259 <method name="findHostFloppyDrive">
7260 <desc>
7261 Searches for a host floppy drive with the given @c name.
7262
7263 <result name="VBOX_E_OBJECT_NOT_FOUND">
7264 Given @c name does not correspond to any host floppy drive.
7265 </result>
7266
7267 </desc>
7268 <param name="name" type="wstring" dir="in">
7269 <desc>Name of the host floppy drive to search for</desc>
7270 </param>
7271 <param name="drive" type="IHostFloppyDrive" dir="return">
7272 <desc>Found host floppy drive object</desc>
7273 </param>
7274 </method>
7275
7276 <method name="findHostNetworkInterfaceByName">
7277 <desc>
7278 Searches through all host network interfaces for an interface with
7279 the given @c name.
7280 <note>
7281 The method returns an error if the given @c name does not
7282 correspond to any host network interface.
7283 </note>
7284 </desc>
7285 <param name="name" type="wstring" dir="in">
7286 <desc>Name of the host network interface to search for.</desc>
7287 </param>
7288 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7289 <desc>Found host network interface object.</desc>
7290 </param>
7291 </method>
7292 <method name="findHostNetworkInterfaceById">
7293 <desc>
7294 Searches through all host network interfaces for an interface with
7295 the given GUID.
7296 <note>
7297 The method returns an error if the given GUID does not
7298 correspond to any host network interface.
7299 </note>
7300 </desc>
7301 <param name="id" type="uuid" dir="in">
7302 <desc>GUID of the host network interface to search for.</desc>
7303 </param>
7304 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7305 <desc>Found host network interface object.</desc>
7306 </param>
7307 </method>
7308 <method name="findHostNetworkInterfacesOfType">
7309 <desc>
7310 Searches through all host network interfaces and returns a list of interfaces of the specified type
7311 </desc>
7312 <param name="type" type="HostNetworkInterfaceType" dir="in">
7313 <desc>type of the host network interfaces to search for.</desc>
7314 </param>
7315 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7316 <desc>Found host network interface objects.</desc>
7317 </param>
7318 </method>
7319
7320 <method name="findUSBDeviceById">
7321 <desc>
7322 Searches for a USB device with the given UUID.
7323
7324 <result name="VBOX_E_OBJECT_NOT_FOUND">
7325 Given @c id does not correspond to any USB device.
7326 </result>
7327
7328 <see>IHostUSBDevice::id</see>
7329 </desc>
7330 <param name="id" type="uuid" dir="in">
7331 <desc>UUID of the USB device to search for.</desc>
7332 </param>
7333 <param name="device" type="IHostUSBDevice" dir="return">
7334 <desc>Found USB device object.</desc>
7335 </param>
7336 </method>
7337
7338 <method name="findUSBDeviceByAddress">
7339 <desc>
7340 Searches for a USB device with the given host address.
7341
7342 <result name="VBOX_E_OBJECT_NOT_FOUND">
7343 Given @c name does not correspond to any USB device.
7344 </result>
7345
7346 <see>IHostUSBDevice::address</see>
7347 </desc>
7348 <param name="name" type="wstring" dir="in">
7349 <desc>
7350 Address of the USB device (as assigned by the host) to
7351 search for.
7352 </desc>
7353 </param>
7354 <param name="device" type="IHostUSBDevice" dir="return">
7355 <desc>Found USB device object.</desc>
7356 </param>
7357 </method>
7358
7359 </interface>
7360
7361 <!--
7362 // ISystemProperties
7363 /////////////////////////////////////////////////////////////////////////
7364 -->
7365
7366 <interface
7367 name="ISystemProperties"
7368 extends="$unknown"
7369 uuid="0760e03f-06d0-481e-9f81-be43fef092ba"
7370 wsmap="managed"
7371 >
7372 <desc>
7373 The ISystemProperties interface represents global properties of the given
7374 VirtualBox installation.
7375
7376 These properties define limits and default values for various attributes
7377 and parameters. Most of the properties are read-only, but some can be
7378 changed by a user.
7379 </desc>
7380
7381 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7382 <desc>Minimum guest system memory in Megabytes.</desc>
7383 </attribute>
7384
7385 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7386 <desc>Maximum guest system memory in Megabytes.</desc>
7387 </attribute>
7388
7389 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7390 <desc>Minimum guest video memory in Megabytes.</desc>
7391 </attribute>
7392
7393 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7394 <desc>Maximum guest video memory in Megabytes.</desc>
7395 </attribute>
7396
7397 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7398 <desc>Minimum CPU count.</desc>
7399 </attribute>
7400
7401 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7402 <desc>Maximum CPU count.</desc>
7403 </attribute>
7404
7405 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7406 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7407 </attribute>
7408
7409 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7410 <desc>
7411 Number of network adapters associated with every
7412 <link to="IMachine"/> instance.
7413 </desc>
7414 </attribute>
7415
7416 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7417 <desc>
7418 Number of serial ports associated with every
7419 <link to="IMachine"/> instance.
7420 </desc>
7421 </attribute>
7422
7423 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7424 <desc>
7425 Number of parallel ports associated with every
7426 <link to="IMachine"/> instance.
7427 </desc>
7428 </attribute>
7429
7430 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7431 <desc>
7432 Maximum device position in the boot order. This value corresponds
7433 to the total number of devices a machine can boot from, to make it
7434 possible to include all possible devices to the boot list.
7435 <see><link to="IMachine::setBootOrder"/></see>
7436 </desc>
7437 </attribute>
7438
7439 <attribute name="defaultMachineFolder" type="wstring">
7440 <desc>
7441 Full path to the default directory used to create new or open
7442 existing machines when a settings file name contains no
7443 path.
7444
7445 The initial value of this property is
7446 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7447 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7448
7449 <note>
7450 Setting this property to <tt>null</tt> will restore the
7451 initial value.
7452 </note>
7453 <note>
7454 When settings this property, the specified path can be
7455 absolute (full path) or relative
7456 to the <link to="IVirtualBox::homeFolder">
7457 VirtualBox home directory</link>.
7458 When reading this property, a full path is
7459 always returned.
7460 </note>
7461 <note>
7462 The specified path may not exist, it will be created
7463 when necessary.
7464 </note>
7465
7466 <see>
7467 <link to="IVirtualBox::createMachine"/>,
7468 <link to="IVirtualBox::openMachine"/>
7469 </see>
7470 </desc>
7471 </attribute>
7472
7473 <attribute name="defaultHardDiskFolder" type="wstring">
7474 <desc>
7475 Full path to the default directory used to create new or open existing
7476 virtual disks.
7477
7478 This path is used when the storage unit of a hard disk is a regular file
7479 in the host's file system and only a file name that contains no path is
7480 given.
7481
7482 The initial value of this property is
7483 <tt>&lt;</tt>
7484 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7485 <tt>&gt;/HardDisks</tt>.
7486
7487 <note>
7488 Setting this property to <tt>null</tt> will restore the
7489 initial value.
7490 </note>
7491 <note>
7492 When settings this property, the specified path can be relative
7493 to the
7494 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7495 absolute. When reading this property, a full path is
7496 always returned.
7497 </note>
7498 <note>
7499 The specified path may not exist, it will be created
7500 when necessary.
7501 </note>
7502
7503 <see>
7504 IHardDisk,
7505 <link to="IVirtualBox::createHardDisk"/>,
7506 <link to="IVirtualBox::openHardDisk"/>,
7507 <link to="IMedium::location"/>
7508 </see>
7509 </desc>
7510 </attribute>
7511
7512 <attribute name="hardDiskFormats" type="IHardDiskFormat" safearray="yes" readonly="yes">
7513 <desc>
7514 List of all hard disk storage formats supported by this VirtualBox
7515 installation.
7516
7517 Keep in mind that the hard disk format identifier
7518 (<link to="IHardDiskFormat::id"/>) used in other API calls like
7519 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7520 hard disk format is a case-insensitive string. This means that, for
7521 example, all of the following strings:
7522 <pre>
7523 "VDI"
7524 "vdi"
7525 "VdI"</pre>
7526 refer to the same hard disk format.
7527
7528 Note that the virtual hard disk framework is backend-based, therefore
7529 the list of supported formats depends on what backends are currently
7530 installed.
7531
7532 <see>
7533 <link to="IHardDiskFormat"/>,
7534 </see>
7535 </desc>
7536 </attribute>
7537
7538 <attribute name="defaultHardDiskFormat" type="wstring">
7539 <desc>
7540 Identifier of the default hard disk format used by VirtualBox.
7541
7542 The hard disk format set by this attribute is used by VirtualBox
7543 when the hard disk format was not specified explicitly. One example is
7544 <link to="IVirtualBox::createHardDisk"/> with the <tt>null</tt>
7545 format argument. A more complex example is implicit creation of
7546 differencing hard disks when taking a snapshot of a virtual machine:
7547 this operation will try to use a format of the parent hard disk first
7548 and if this format does not support differencing hard disks the default
7549 format specified by this argument will be used.
7550
7551 The list of supported hard disk formats may be obtained by the
7552 <link to="#hardDiskFormats"/> call. Note that the default hard disk
7553 format must have a capability to create differencing hard disks;
7554 otherwise opeartions that create hard disks implicitly may fail
7555 unexpectedly.
7556
7557 The initial value of this property is <tt>VDI</tt> in the current
7558 version of the VirtualBox product, but may change in the future.
7559
7560 <note>
7561 Setting this property to <tt>null</tt> will restore the
7562 initial value.
7563 </note>
7564
7565 <see>
7566 <link to="#hardDiskFormats"/>,
7567 <link to="IHardDiskFormat::id"/>,
7568 <link to="IVirtualBox::createHardDisk"/>
7569 </see>
7570 </desc>
7571 </attribute>
7572
7573 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7574 <desc>
7575 Library that provides authentication for VRDP clients. The library
7576 is used if a virtual machine's authentication type is set to "external"
7577 in the VM RemoteDisplay configuration.
7578
7579 The system library extension (".DLL" or ".so") must be omitted.
7580 A full path can be specified; if not, then the library must reside on the
7581 system's default library path.
7582
7583 The default value of this property is <tt>VRDPAuth</tt>. There is a library
7584 of that name in one of the default VirtualBox library directories.
7585
7586 For details about VirtualBox authentication libraries and how to implement
7587 them, please refer to the VirtualBox manual.
7588
7589 <note>
7590 Setting this property to <tt>null</tt> will restore the
7591 initial value.
7592 </note>
7593 </desc>
7594 </attribute>
7595
7596 <attribute name="webServiceAuthLibrary" type="wstring">
7597 <desc>
7598 Library that provides authentication for webservice clients. The library
7599 is used if a virtual machine's authentication type is set to "external"
7600 in the VM RemoteDisplay configuration and will be called from
7601 within the <link to="IWebsessionManager::logon" /> implementation.
7602
7603 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7604 there is no per-VM setting for this, as the webservice is a global
7605 resource (if it is running). Only for this setting (for the webservice),
7606 setting this value to a literal "null" string disables authentication,
7607 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7608 no matter what user name and password are supplied.
7609
7610 The initial value of this property is <tt>VRDPAuth</tt>,
7611 meaning that the webservice will use the same authentication
7612 library that is used by default for VBoxVRDP (again, see
7613 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7614 The format and calling convention of authentication libraries
7615 is the same for the webservice as it is for VBoxVRDP.
7616
7617 </desc>
7618 </attribute>
7619
7620 <attribute name="HWVirtExEnabled" type="boolean">
7621 <desc>
7622 This specifies the default value for hardware virtualization
7623 extensions. If enabled, virtual machines will make use of
7624 hardware virtualization extensions such as Intel VT-x and
7625 AMD-V by default. This value can be overridden by each VM
7626 using their <link to="IMachine::HWVirtExEnabled" /> property.
7627 </desc>
7628 </attribute>
7629
7630 <attribute name="LogHistoryCount" type="unsigned long">
7631 <desc>
7632 This value specifies how many old release log files are kept.
7633 </desc>
7634 </attribute>
7635 </interface>
7636
7637 <!--
7638 // IGuest
7639 /////////////////////////////////////////////////////////////////////////
7640 -->
7641
7642 <interface
7643 name="IGuestOSType" extends="$unknown"
7644 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7645 wsmap="struct"
7646 >
7647 <desc>
7648 </desc>
7649
7650 <attribute name="familyId" type="wstring" readonly="yes">
7651 <desc>Guest OS family identifier string.</desc>
7652 </attribute>
7653
7654 <attribute name="familyDescription" type="wstring" readonly="yes">
7655 <desc>Human readable description of the guest OS family.</desc>
7656 </attribute>
7657
7658 <attribute name="id" type="wstring" readonly="yes">
7659 <desc>Guest OS identifier string.</desc>
7660 </attribute>
7661
7662 <attribute name="description" type="wstring" readonly="yes">
7663 <desc>Human readable description of the guest OS.</desc>
7664 </attribute>
7665
7666 <attribute name="is64Bit" type="boolean" readonly="yes">
7667 <desc>Returns @c true if the given OS is 64-bit</desc>
7668 </attribute>
7669
7670 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7671 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7672 </attribute>
7673
7674 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7675 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7676 </attribute>
7677
7678 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7679 <desc>Recommended RAM size in Megabytes.</desc>
7680 </attribute>
7681
7682 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7683 <desc>Recommended video RAM size in Megabytes.</desc>
7684 </attribute>
7685
7686 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7687 <desc>Recommended hard disk size in Megabytes.</desc>
7688 </attribute>
7689
7690 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7691 <desc>Returns recommended network adapter for this OS type.</desc>
7692 </attribute>
7693 </interface>
7694
7695 <interface
7696 name="IGuest" extends="$unknown"
7697 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7698
7699 wsmap="suppress"
7700 >
7701 <desc>
7702 The IGuest interface represents information about the operating system
7703 running inside the virtual machine. Used in
7704 <link to="IConsole::guest"/>.
7705
7706 IGuest provides information about the guest operating system, whether
7707 Guest Additions are installed and other OS-specific virtual machine
7708 properties.
7709 </desc>
7710
7711 <attribute name="OSTypeId" type="wstring" readonly="yes">
7712 <desc>
7713 Identifier of the Guest OS type as reported by the Guest
7714 Additions.
7715 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7716 an IGuestOSType object representing details about the given
7717 Guest OS type.
7718 <note>
7719 If Guest Additions are not installed, this value will be
7720 the same as <link to="IMachine::OSTypeId"/>.
7721 </note>
7722 </desc>
7723 </attribute>
7724
7725 <attribute name="additionsActive" type="boolean" readonly="yes">
7726 <desc>
7727 Flag whether the Guest Additions are installed and active
7728 in which case their version will be returned by the
7729 <link to="#additionsVersion"/> property.
7730 </desc>
7731 </attribute>
7732
7733 <attribute name="additionsVersion" type="wstring" readonly="yes">
7734 <desc>
7735 Version of the Guest Additions (3 decimal numbers separated
7736 by dots) or empty when the Additions are not installed. The
7737 Additions may also report a version but yet not be active as
7738 the version might be refused by VirtualBox (incompatible) or
7739 other failures occurred.
7740 </desc>
7741 </attribute>
7742
7743 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7744 <desc>
7745 Flag whether seamless guest display rendering (seamless desktop
7746 integration) is supported.
7747 </desc>
7748 </attribute>
7749
7750 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7751 <desc>
7752 Flag whether the guest is in graphics mode. If it is not, then
7753 seamless rendering will not work, resize hints are not immediately
7754 acted on and guest display resizes are probably not initiated by
7755 the guest additions.
7756 </desc>
7757 </attribute>
7758
7759 <attribute name="memoryBalloonSize" type="unsigned long">
7760 <desc>Guest system memory balloon size in megabytes.</desc>
7761 </attribute>
7762
7763 <attribute name="statisticsUpdateInterval" type="unsigned long">
7764 <desc>Interval to update guest statistics in seconds.</desc>
7765 </attribute>
7766
7767 <method name="setCredentials">
7768 <desc>
7769 Store login credentials that can be queried by guest operating
7770 systems with Additions installed. The credentials are transient
7771 to the session and the guest may also choose to erase them. Note
7772 that the caller cannot determine whether the guest operating system
7773 has queried or made use of the credentials.
7774
7775 <result name="VBOX_E_VM_ERROR">
7776 VMM device is not available.
7777 </result>
7778
7779 </desc>
7780 <param name="userName" type="wstring" dir="in">
7781 <desc>User name string, can be empty</desc>
7782 </param>
7783 <param name="password" type="wstring" dir="in">
7784 <desc>Password string, can be empty</desc>
7785 </param>
7786 <param name="domain" type="wstring" dir="in">
7787 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7788 </param>
7789 <param name="allowInteractiveLogon" type="boolean" dir="in">
7790 <desc>
7791 Flag whether the guest should alternatively allow the user to
7792 interactively specify different credentials. This flag might
7793 not be supported by all versions of the Additions.
7794 </desc>
7795 </param>
7796 </method>
7797
7798 <method name="getStatistic">
7799 <desc>
7800 Query specified guest statistics as reported by the VirtualBox Additions.
7801 </desc>
7802 <param name="cpuId" type="unsigned long" dir="in">
7803 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7804 </param>
7805 <param name="statistic" type="GuestStatisticType" dir="in">
7806 <desc>Statistic type.</desc>
7807 </param>
7808 <param name="statVal" type="unsigned long" dir="out">
7809 <desc>Statistics value</desc>
7810 </param>
7811 </method>
7812
7813 </interface>
7814
7815
7816 <!--
7817 // IProgress
7818 /////////////////////////////////////////////////////////////////////////
7819 -->
7820
7821 <interface
7822 name="IProgress" extends="$unknown"
7823 uuid="c4f94e6b-2273-446b-9539-4c05bb416fe7"
7824 wsmap="managed"
7825 >
7826 <desc>
7827 The IProgress interface is used to track and control
7828 asynchronous tasks within VirtualBox.
7829
7830 An instance of this is returned every time VirtualBox starts
7831 an asynchronous task (in other words, a separate thread) which
7832 continues to run after a method call returns. For example,
7833 <link to="IConsole::saveState" />, which saves the state of
7834 a running virtual machine, can take a long time to complete.
7835 To be able to display a progress bar, a user interface such as
7836 the VirtualBox graphical user interface can use the IProgress
7837 object returned by that method.
7838
7839 Note that IProgress is a "read-only" interface in the sense
7840 that only the VirtualBox internals behind the Main API can
7841 create and manipulate progress objects, whereas client code
7842 can only use the IProgress object to monitor a task's
7843 progress and, if <link to="#cancelable" /> is true,
7844 cancel the task by calling <link to="#cancel" />.
7845
7846 A task represented by IProgress consists of either one or
7847 several sub-operations that run sequentially, one by one (see
7848 <link to="#operation" /> and <link to="#operationCount" />).
7849 Every operation is identified by a number (starting from 0)
7850 and has a separate description.
7851
7852 You can find the individual percentage of completion of the current
7853 operation in <link to="#operationPercent" /> and the
7854 percentage of completion of the task as a whole
7855 in <link to="#percent" />.
7856
7857 Similarly, you can wait for the completion of a particular
7858 operation via <link to="#waitForOperationCompletion" /> or
7859 for the completion of the whole task via
7860 <link to="#waitForCompletion" />.
7861 </desc>
7862
7863 <attribute name="id" type="uuid" readonly="yes">
7864 <desc>ID of the task.</desc>
7865 </attribute>
7866
7867 <attribute name="description" type="wstring" readonly="yes">
7868 <desc>Description of the task.</desc>
7869 </attribute>
7870
7871 <attribute name="initiator" type="$unknown" readonly="yes">
7872 <desc>Initiator of the task.</desc>
7873 </attribute>
7874
7875 <attribute name="cancelable" type="boolean" readonly="yes">
7876 <desc>Whether the task can be interrupted.</desc>
7877 </attribute>
7878
7879 <attribute name="percent" type="unsigned long" readonly="yes">
7880 <desc>
7881 Current progress value of the task as a whole, in percent.
7882 This value depends on how many operations are already complete.
7883 Returns 100 if <link to="#completed" /> is true.
7884 </desc>
7885 </attribute>
7886
7887 <attribute name="timeRemaining" type="long" readonly="yes">
7888 <desc>
7889 Estimated remaining time until the task completes, in
7890 seconds. Returns 0 once the task has completed; returns -1
7891 if the remaining time cannot be computed, in particular if
7892 the current progress is 0.
7893
7894 Even if a value is returned, the estimate will be unreliable
7895 for low progress values. It will become more reliable as the
7896 task progresses; it is not recommended to display an ETA
7897 before at least 20% of a task have completed.
7898 </desc>
7899 </attribute>
7900
7901 <attribute name="completed" type="boolean" readonly="yes">
7902 <desc>Whether the task has been completed.</desc>
7903 </attribute>
7904
7905 <attribute name="canceled" type="boolean" readonly="yes">
7906 <desc>Whether the task has been canceled.</desc>
7907 </attribute>
7908
7909 <attribute name="resultCode" type="result" readonly="yes">
7910 <desc>
7911 Result code of the progress task.
7912 Valid only if <link to="#completed"/> is true.
7913 </desc>
7914 </attribute>
7915
7916 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7917 <desc>
7918 Extended information about the unsuccessful result of the
7919 progress operation. May be NULL if no extended information
7920 is available.
7921 Valid only if <link to="#completed"/> is true and
7922 <link to="#resultCode"/> indicates a failure.
7923 </desc>
7924 </attribute>
7925
7926 <attribute name="operationCount" type="unsigned long" readonly="yes">
7927 <desc>
7928 Number of sub-operations this task is divided into.
7929 Every task consists of at least one suboperation.
7930 </desc>
7931 </attribute>
7932
7933 <attribute name="operation" type="unsigned long" readonly="yes">
7934 <desc>Number of the sub-operation being currently executed.</desc>
7935 </attribute>
7936
7937 <attribute name="operationDescription" type="wstring" readonly="yes">
7938 <desc>
7939 Description of the sub-operation being currently executed.
7940 </desc>
7941 </attribute>
7942
7943 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7944 <desc>Progress value of the current sub-operation only, in percent.</desc>
7945 </attribute>
7946
7947 <method name="waitForCompletion">
7948 <desc>
7949 Waits until the task is done (including all sub-operations)
7950 with a given timeout in milliseconds; specify -1 for an indefinite wait.
7951
7952 <result name="VBOX_E_IPRT_ERROR">
7953 Failed to wait for task completion.
7954 </result>
7955 </desc>
7956
7957 <param name="timeout" type="long" dir="in">
7958 <desc>
7959 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7960 </desc>
7961 </param>
7962 </method>
7963
7964 <method name="waitForOperationCompletion">
7965 <desc>
7966 Waits until the given operation is done with a given timeout in
7967 milliseconds; specify -1 for an indefinite wait.
7968
7969 <result name="VBOX_E_IPRT_ERROR">
7970 Failed to wait for operation completion.
7971 </result>
7972
7973 </desc>
7974 <param name="operation" type="unsigned long" dir="in">
7975 <desc>
7976 Number of the operation to wait for.
7977 Must be less than <link to="#operationCount"/>.
7978 </desc>
7979 </param>
7980 <param name="timeout" type="long" dir="in">
7981 <desc>
7982 Maximum time in milliseconds to wait or -1 to wait indefinitely.
7983 </desc>
7984 </param>
7985 </method>
7986
7987 <method name="cancel">
7988 <desc>
7989 Cancels the task.
7990 <note>
7991 If <link to="#cancelable"/> is <tt>false</tt>, then
7992 this method will fail.
7993 </note>
7994
7995 <result name="VBOX_E_INVALID_OBJECT_STATE">
7996 Operation cannot be canceled.
7997 </result>
7998
7999 </desc>
8000 </method>
8001
8002 </interface>
8003
8004
8005 <!--
8006 // ISnapshot
8007 /////////////////////////////////////////////////////////////////////////
8008 -->
8009
8010 <interface
8011 name="ISnapshot" extends="$unknown"
8012 uuid="5db6b1d9-c76b-4424-a6f4-8257f642d6ea"
8013 wsmap="managed"
8014 >
8015 <desc>
8016 The ISnapshot interface represents a snapshot of the virtual
8017 machine.
8018
8019 The <i>snapshot</i> stores all the information about a virtual
8020 machine necessary to bring it to exactly the same state as it was at
8021 the time of taking the snapshot. The snapshot includes:
8022
8023 <ul>
8024 <li>all settings of the virtual machine (i.e. its hardware
8025 configuration: RAM size, attached hard disks, etc.)
8026 </li>
8027 <li>the execution state of the virtual machine (memory contents,
8028 CPU state, etc.).
8029 </li>
8030 </ul>
8031
8032 Snapshots can be <i>offline</i> (taken when the VM is powered off)
8033 or <i>online</i> (taken when the VM is running). The execution
8034 state of the offline snapshot is called a <i>zero execution state</i>
8035 (it doesn't actually contain any information about memory contents
8036 or the CPU state, assuming that all hardware is just powered off).
8037
8038 <h3>Snapshot branches</h3>
8039
8040 Snapshots can be chained. Chained snapshots form a branch where
8041 every next snapshot is based on the previous one. This chaining is
8042 mostly related to hard disk branching (see <link to="IHardDisk"/>
8043 description). This means that every time a new snapshot is created,
8044 a new differencing hard disk is implicitly created for all normal
8045 hard disks attached to the given virtual machine. This allows to
8046 fully restore hard disk contents when the machine is later reverted
8047 to a particular snapshot.
8048
8049 In the current implementation, multiple snapshot branches within one
8050 virtual machine are not allowed. Every machine has a single branch,
8051 and <link to="IConsole::takeSnapshot"/> operation adds a new
8052 snapshot to the top of that branch.
8053
8054 Existing snapshots can be discarded using
8055 <link to="IConsole::discardSnapshot"/>.
8056
8057 <h3>Current snapshot</h3>
8058
8059 Every virtual machine has a current snapshot, identified by
8060 <link to="IMachine::currentSnapshot"/>. This snapshot is used as
8061 a base for the <i>current machine state</i> (see below), to the effect
8062 that all normal hard disks of the machine and its execution
8063 state are based on this snapshot.
8064
8065 In the current implementation, the current snapshot is always the
8066 last taken snapshot (i.e. the head snapshot on the branch) and it
8067 cannot be changed.
8068
8069 The current snapshot is <tt>null</tt> if the machine doesn't have
8070 snapshots at all; in this case the current machine state is just
8071 current settings of this machine plus its current execution state.
8072
8073 <h3>Current machine state</h3>
8074
8075 The current machine state is what represented by IMachine instances got
8076 directly from IVirtualBox
8077 using <link
8078 to="IVirtualBox::getMachine">getMachine()</link>, <link
8079 to="IVirtualBox::findMachine">findMachine()</link>, etc. (as opposed
8080 to instances returned by <link to="ISnapshot::machine"/>). This state
8081 is always used when the machine is <link to="IConsole::powerUp"> powered
8082 on</link>.
8083
8084 The current machine state also includes the current execution state.
8085 If the machine is being currently executed
8086 (<link to="IMachine::state"/> is <link to="MachineState_Running"/>
8087 and above), its execution state is just what's happening now.
8088 If it is powered off (<link to="MachineState_PoweredOff"/> or
8089 <link to="MachineState_Aborted"/>), it has a zero execution state.
8090 If the machine is saved (<link to="MachineState_Saved"/>), its
8091 execution state is what saved in the execution state file
8092 (<link to="IMachine::stateFilePath"/>).
8093
8094 If the machine is in the saved state, then, next time it is powered
8095 on, its execution state will be fully restored from the saved state
8096 file and the execution will continue from the point where the state
8097 was saved.
8098
8099 Similarly to snapshots, the current machine state can be discarded
8100 using <link to="IConsole::discardCurrentState"/>.
8101
8102 <h3>Taking and discarding snapshots</h3>
8103
8104 The table below briefly explains the meaning of every snapshot
8105 operation:
8106
8107 <table>
8108 <tr><th>Operation</th><th>Meaning</th><th>Remarks</th></tr>
8109
8110 <tr><td><link to="IConsole::takeSnapshot"/></td>
8111
8112 <td>Save the current state of the virtual machine, including all
8113 settings, contents of normal hard disks and the current modifications
8114 to immutable hard disks (for online snapshots)</td>
8115
8116 <td>The current state is not changed (the machine will continue
8117 execution if it is being executed when the snapshot is
8118 taken)</td></tr>
8119
8120 <tr><td><link to="IConsole::discardSnapshot"/></td>
8121
8122 <td>Forget the state of the virtual machine stored in the snapshot:
8123 dismiss all saved settings and delete the saved execution state (for
8124 online snapshots)</td>
8125
8126 <td>Other snapshots (including child snapshots, if any) and the
8127 current state are not directly affected</td></tr>
8128
8129 <tr><td><link to="IConsole::discardCurrentState"/></td>
8130
8131 <td>Restore the current state of the virtual machine from the state
8132 stored in the current snapshot, including all settings and hard disk
8133 contents</td>
8134
8135 <td>The current state of the machine existed prior to this operation
8136 is lost</td></tr>
8137
8138 <tr><td><link to="IConsole::discardCurrentSnapshotAndState"/></td>
8139
8140 <td>Completely revert the virtual machine to the state it was in
8141 before the current snapshot has been taken</td>
8142
8143 <td>The current state, as well as the current snapshot, are
8144 lost</td></tr>
8145
8146 </table>
8147
8148 </desc>
8149
8150 <attribute name="id" type="uuid" readonly="yes">
8151 <desc>UUID of the snapshot.</desc>
8152 </attribute>
8153
8154 <attribute name="name" type="wstring">
8155 <desc>Short name of the snapshot.</desc>
8156 </attribute>
8157
8158 <attribute name="description" type="wstring">
8159 <desc>Optional description of the snapshot.</desc>
8160 </attribute>
8161
8162 <attribute name="timeStamp" type="long long" readonly="yes">
8163 <desc>
8164 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8165 </desc>
8166 </attribute>
8167
8168 <attribute name="online" type="boolean" readonly="yes">
8169 <desc>
8170 <tt>true</tt> if this snapshot is an online snapshot and
8171 <tt>false</tt> otherwise.
8172
8173 <note>
8174 When this attribute is <tt>true</tt>, the
8175 <link to="IMachine::stateFilePath"/> attribute of the
8176 <link to="#machine"/> object associated with this snapshot
8177 will point to the saved state file. Otherwise, it will be
8178 <tt>null</tt>.
8179 </note>
8180 </desc>
8181 </attribute>
8182
8183 <attribute name="machine" type="IMachine" readonly="yes">
8184 <desc>
8185 Virtual machine this snapshot is taken on. This object
8186 stores all settings the machine had when taking this snapshot.
8187 <note>
8188 The returned machine object is immutable, i.e. no
8189 any settings can be changed.
8190 </note>
8191 </desc>
8192 </attribute>
8193
8194 <attribute name="parent" type="ISnapshot" readonly="yes">
8195 <desc>
8196 Parent snapshot (a snapshot this one is based on).
8197 <note>
8198 It's not an error to read this attribute on a snapshot
8199 that doesn't have a parent -- a null object will be
8200 returned to indicate this.
8201 </note>
8202 </desc>
8203 </attribute>
8204
8205 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8206 <desc>
8207 Child snapshots (all snapshots having this one as a parent).
8208 <note>
8209 In the current implementation, there can be only one
8210 child snapshot, or no children at all, meaning this is the
8211 last (head) snapshot.
8212 </note>
8213 </desc>
8214 </attribute>
8215
8216 </interface>
8217
8218
8219 <!--
8220 // IMedia
8221 /////////////////////////////////////////////////////////////////////////
8222 -->
8223
8224 <enum
8225 name="MediaState"
8226 uuid="8b86e03c-2f1c-412a-8fbd-326f62701200"
8227 >
8228 <desc>
8229 Virtual media state.
8230 <see>IMedia</see>
8231 </desc>
8232
8233 <const name="NotCreated" value="0">
8234 <desc>
8235 Associated media storage does not exist (either was not created yet or
8236 was deleted).
8237 </desc>
8238 </const>
8239 <const name="Created" value="1">
8240 <desc>
8241 Associated storage exists and accessible.
8242 </desc>
8243 </const>
8244 <const name="LockedRead" value="2">
8245 <desc>
8246 Media is locked for reading, no data modification is possible.
8247 </desc>
8248 </const>
8249 <const name="LockedWrite" value="3">
8250 <desc>
8251 Media is locked for writing, no concurrent data reading or modification
8252 is possible.
8253 </desc>
8254 </const>
8255 <const name="Inaccessible" value="4">
8256 <desc>
8257 Associated media storage is not accessible.
8258 </desc>
8259 </const>
8260 <const name="Creating" value="5">
8261 <desc>
8262 Associated media storage is being created.
8263 </desc>
8264 </const>
8265 <const name="Deleting" value="6">
8266 <desc>
8267 Associated media storage is being deleted.
8268 </desc>
8269 </const>
8270 </enum>
8271
8272 <interface
8273 name="IMedium" extends="$unknown"
8274 uuid="a7fb3bfb-c180-4274-bae4-7fbc89046e13"
8275 wsmap="managed"
8276 >
8277 <desc>
8278 The IMedium interface is a common interface for all objects representing
8279 virtual media such as hard disks, CD/DVD images and floppy images.
8280
8281 Each medium is associated with a storage unit (such as a file on the host
8282 computer or a network resource) that holds actual data. The location of
8283 the storage unit is represented by the #location attribute. The value of
8284 this attribute is media type dependent.
8285
8286 The exact media type may be determined by querying the appropriate
8287 interface such as:
8288 <ul>
8289 <li>IHardDisk (virtual hard disks)</li>
8290 <li>IDVDImage (standard CD/DVD ISO image files)</li>
8291 <li>IFloppyImage (raw floppy image files)</li>
8292 </ul>
8293
8294 Existing media are opened using the following methods, depending on the
8295 media type:
8296 <ul>
8297 <li><link to="IVirtualBox::openHardDisk"/></li>
8298 <li><link to="IVirtualBox::openDVDImage"/></li>
8299 <li><link to="IVirtualBox::openFloppyImage"/></li>
8300 </ul>
8301
8302 New hard disk media are created using the
8303 <link to="IVirtualBox::createHardDisk"/> method. CD/DVD and floppy
8304 images are created outside VirtualBox, usually by storing a copy
8305 of the real medium of the corresponding type in a regular file.
8306
8307 <h3>Known Media</h3>
8308
8309 When an existing medium gets opened for the first time, it gets
8310 automatically remembered by the given VirtualBox installation or, in other
8311 words, becomes a <i>known medium</i>. Known media are stored in the media
8312 registry transparently maintained by VirtualBox and stored in settings
8313 files so that this registry is preserved when VirtualBox is not running.
8314
8315 Newly created virtual hard disks get remembered only when the associated
8316 storage unit is actually created (see IHardDisk for more details).
8317
8318 All known media can be enumerated using
8319 <link to="IVirtualBox::hardDisks"/>,
8320 <link to="IVirtualBox::DVDImages"/> and
8321 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8322 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8323 and similar methods or by location using
8324 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8325
8326 Only known media can be attached to virtual machines.
8327
8328 Removing known media from the media registry is performed when the given
8329 medium is closed using the <link to="#close"/> method or when its
8330 associated storage unit is deleted (only for hard disks).
8331
8332 <h3>Accessibility Checks</h3>
8333
8334 The given medium (with the created storage unit) is considered to be
8335 <i>accessible</i> when its storage unit can be read.
8336 Accessible media are indicated by the <link to="MediaState_Created"/>
8337 value of the <link to="#state"/> attribute. When the storage unit cannot
8338 be read (for example, because it is located on a disconnected network
8339 resource, or was accidentally deleted outside VirtualBox), the medium is
8340 considered to be <i>inaccessible</i> which is indicated by the
8341 <link to="MediaState_Inaccessible"/> state. The details about the reason
8342 of being inaccessible can be obtained using the
8343 <link to="#lastAccessError"/> attribute.
8344
8345 A new accessibility check is performed each time the <link to="#state"/>
8346 attribute is read. Please note that this check may take long time (several
8347 seconds or even minutes, depending on the storage unit location and
8348 format), and will block the calling thread until finished. For this
8349 reason, it is recommended to never read this attribute on the main UI
8350 thread to avoid making the UI unresponsive.
8351
8352 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8353 created for the first time), all known media are in the
8354 <link to="MediaState_Inaccessible"/> state but the value of the <link
8355 to="#lastAccessError"/> attribute is <tt>null</tt> because no actual
8356 accessibility check is made on startup. This is done to make the
8357 VirtualBox object ready for serving requests as
8358 fast as possible and let the end-user application decide if it needs to
8359 check media accessibility right away or not.
8360 </desc>
8361
8362 <attribute name="id" type="uuid" readonly="yes">
8363 <desc>
8364 UUID of the medium. For a newly created medium, this value is a randomly
8365 generated UUID.
8366
8367 <note>
8368 For media in one of MediaState_NotCreated, MediaState_Creating or
8369 MediaState_Deleting states, the value of this property is undefined
8370 and will most likely be an empty UUID.
8371 </note>
8372 </desc>
8373 </attribute>
8374
8375 <attribute name="description" type="wstring">
8376 <desc>
8377 Optional description of the medium. For newly created media, the value
8378 of this attribute value is <tt>null</tt>.
8379
8380 Media types that don't support this attribute will return E_NOTIMPL in
8381 attempt to get or set this attribute's value.
8382
8383 <note>
8384 For some storage types, reading this attribute may return an outdated
8385 (last known) value when <link to="#state"/> is <link
8386 to="MediaState_Inaccessible"/> or <link
8387 to="MediaState_LockedWrite"/> because the value of this attribute is
8388 stored within the storage unit itself. Also note that changing the
8389 attribute value is not possible in such case, as well as when the
8390 medium is the <link to="MediaState_LockedRead"/> state.
8391 </note>
8392 </desc>
8393 </attribute>
8394
8395 <attribute name="state" type="MediaState" readonly="yes">
8396 <desc>
8397 Current media state. Inspect <link to="MediaState"/> values for details.
8398
8399 Reading this attribute may take a long time because an accessibility
8400 check of the storage unit is performed each time the attribute is read.
8401 This check may cause a significant delay if the storage unit of the
8402 given medium is, for example, a file located on a network share which is
8403 not currently accessible due to connectivity problems -- the call will
8404 not return until a timeout interval defined by the host OS for this
8405 operation expires.
8406
8407 If the last known state of the medium is <link to="MediaState_Created"/>
8408 and the accessibility check fails then the state would be set to
8409 <link to="MediaState_Inaccessible"/> and <link to="#lastAccessError"/>
8410 may be used to get more details about the failure. If the state of the
8411 medium is <link to="MediaState_LockedRead"/> or
8412 <link to="MediaState_LockedWrite"/> then it remains the same, and a
8413 non-null value of <link to="#lastAccessError"/> will indicate a failed
8414 accessibility check in this case.
8415
8416 Note that not all media states are applicable to all media types.
8417 For example, states <link to="MediaState_NotCreated"/>,
8418 <link to="MediaState_LockedWrite"/>, <link to="MediaState_Creating"/>,
8419 <link to="MediaState_Deleting"/> are meaningless for IDVDImage and
8420 IFloppyImage media.
8421 </desc>
8422 </attribute>
8423
8424 <attribute name="location" type="wstring">
8425 <desc>
8426 Location of the storage unit holding media data.
8427
8428 The format of the location string is media type specific. For media
8429 types using regular files in a host's file system, the location
8430 string is the full file name.
8431
8432 Some media types may support changing the storage unit location by
8433 simply changing the value of this property. If this operation is not
8434 supported, the implementation will return E_NOTIMPL in attempt to set
8435 this attribute's value.
8436
8437 When setting a value of the location attribute which is a regular file
8438 in the host's file system, the given file name may be either relative to
8439 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8440 absolute. Note that if the given location specification does not contain
8441 the file extension part then a proper default extension will be
8442 automatically appended by the implementation depending on the media type.
8443 </desc>
8444 </attribute>
8445
8446 <attribute name="name" type="wstring" readonly="yes">
8447 <desc>
8448 Name of the storage unit holding media data.
8449
8450 The returned string is a short version of the <link to="#location"/>
8451 attribute that is suitable for representing the medium in situations
8452 where the full location specification is too long (such as lists
8453 and comboboxes in GUI frontends). This string is also used by frontends
8454 to sort the media list alphabetically when needed.
8455
8456 For example, for locations that are regular files in the host's file
8457 system, the value of this attribute is just the file name (+ extension),
8458 without the path specification.
8459
8460 Note that as opposed to the <link to="#location"/> attribute, the name
8461 attribute will not necessary be unique for a list of media of the
8462 given type and format.
8463 </desc>
8464 </attribute>
8465
8466 <attribute name="size" type="unsigned long long" readonly="yes">
8467 <desc>
8468 Physical size of the storage unit used to hold media data (in bytes).
8469
8470 <note>
8471 For media whose <link to="#state"/> is <link
8472 to="MediaState_Inaccessible"/>, the value of this property is the
8473 last known size. For <link to="MediaState_NotCreated"/> media,
8474 the returned value is zero.
8475 </note>
8476 </desc>
8477 </attribute>
8478
8479 <attribute name="lastAccessError" type="wstring" readonly="yes">
8480 <desc>
8481 Text message that represents the result of the last accessibility
8482 check.
8483
8484 Accessibility checks are performed each time the <link to="#state"/>
8485 attribute is read. A @c null string is returned if the last
8486 accessibility check was successful. A non-null string indicates a
8487 failure and should normally describe a reason of the failure (for
8488 example, a file read error).
8489 </desc>
8490 </attribute>
8491
8492 <attribute name="machineIds" type="uuid" safearray="yes" readonly="yes">
8493 <desc>
8494 Array of UUIDs of all machines this medium is attached to.
8495
8496 A <tt>null</tt> array is returned if this medium is not attached to any
8497 machine or to any machine's snapshot.
8498
8499 <note>
8500 The returned array will include a machine even if this medium is not
8501 attached to that machine in the current state but attached to it in
8502 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
8503 details.
8504 </note>
8505 </desc>
8506 </attribute>
8507
8508 <method name="getSnapshotIds">
8509 <desc>
8510 Returns an array of UUIDs of all snapshots of the given machine where
8511 this medium is attached to.
8512
8513 If the medium is attached to the machine in the current state, then the
8514 first element in the array will always be the ID of the queried machine
8515 (i.e. the value equal to the @c machineId argument), followed by
8516 snapshot IDs (if any).
8517
8518 If the medium is not attached to the machine in the current state, then
8519 the array will contain only snapshot IDs.
8520
8521 The returned array may be <tt>null</tt> if this medium is not attached
8522 to the given machine at all, neither in the current state nor in one of
8523 the snapshots.
8524 </desc>
8525 <param name="machineId" type="uuid" dir="in">
8526 <desc>
8527 UUID of the machine to query.
8528 </desc>
8529 </param>
8530 <param name="snapshotIds" type="uuid" safearray="yes" dir="return">
8531 <desc>
8532 Array of snapshot UUIDs of the given machine using this medium.
8533 </desc>
8534 </param>
8535 </method>
8536
8537 <method name="lockRead">
8538 <desc>
8539 Locks this medium for reading.
8540
8541 The read lock is shared: many clients can simultaneously lock the
8542 same media for reading unless it is already locked for writing (see
8543 <link to="#lockWrite"/>) in which case an error is returned.
8544
8545 When the medium is locked for reading, it cannot be modified
8546 from within VirtualBox. This means that any method that changes
8547 the properties of this medium or contents of the storage unit
8548 will return an error (unless explicitly stated otherwise) and
8549 that an attempt to start a virtual machine that wants to modify
8550 the medium will also fail.
8551
8552 When the virtual machine is started up, it locks for reading all
8553 media it uses in read-only mode. If some media cannot be locked
8554 for reading, the startup procedure will fail.
8555
8556 The medium locked for reading must be unlocked using the <link
8557 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
8558 can be nested and must be followed by the same number of paired
8559 <link to="#unlockRead"/> calls.
8560
8561 This method sets the media state to <link
8562 to="MediaState_LockedRead"/> on success. The state prior to
8563 this call must be <link to="MediaState_Created"/>, <link
8564 to="MediaState_Inaccessible"/> or <link
8565 to="MediaState_LockedRead"/>. As you can see, inaccessible
8566 media can be locked too. This is not an error; this method
8567 performs a logical lock that prevents modifications of this
8568 media through the VirtualBox API, not a physical lock of the
8569 underlying storage unit.
8570
8571 This method returns the current state of the medium
8572 <b>before</b> the operation.
8573
8574 <result name="VBOX_E_INVALID_OBJECT_STATE">
8575 Invalid media state (e.g. not created, locked, inaccessible,
8576 creating, deleting).
8577 </result>
8578
8579 </desc>
8580 <param name="state" type="MediaState" dir="return">
8581 <desc>
8582 State of the medium after the operation.
8583 </desc>
8584 </param>
8585 </method>
8586
8587 <method name="unlockRead">
8588 <desc>
8589 Cancels the read lock previously set by <link to="#lockRead"/>.
8590
8591 For both, success and failure, this method returns the current state
8592 of the medium <b>after</b> the operation.
8593
8594 See <link to="#lockRead"/> for more details.
8595
8596 <result name="VBOX_E_INVALID_OBJECT_STATE">
8597 Medium not locked for reading.
8598 </result>
8599
8600 </desc>
8601 <param name="state" type="MediaState" dir="return">
8602 <desc>
8603 State of the medium after the operation.
8604 </desc>
8605 </param>
8606 </method>
8607
8608 <method name="lockWrite">
8609 <desc>
8610 Locks this medium for writing.
8611
8612 The write lock, as opposed to <link to="#lockRead"/>, is
8613 exclusive: there may be only one client holding a write lock
8614 and there may be no read locks while the write lock is held.
8615
8616 When the medium is locked for writing, it cannot be modified
8617 from within VirtualBox and it is not guaranteed that the values
8618 of its properties are up-to-date. Any method that changes the
8619 properties of this medium or contents of the storage unit will
8620 return an error (unless explicitly stated otherwise) and an
8621 attempt to start a virtual machine wanting to modify or to
8622 read the medium will fail.
8623
8624 When the virtual machine is started up, it locks for writing all
8625 media it uses to write data to. If any medium could not be locked
8626 for writing, the startup procedure will fail.
8627
8628 The medium locked for writing must be unlocked using the <link
8629 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
8630 can <b>not</b> be nested and must be followed by a<link
8631 to="#unlockWrite"/> call before the next lockWrite call.
8632
8633 This method sets the media state to <link
8634 to="MediaState_LockedWrite"/> on success. The state prior to
8635 this call must be <link to="MediaState_Created"/> or <link
8636 to="MediaState_Inaccessible"/>. As you can see, inaccessible
8637 media can be locked too. This is not an error; this method
8638 performs a logical lock preventing modifications of this
8639 media through the VirtualBox API, not a physical lock of the
8640 underlying storage unit.
8641
8642 For both, success and failure, this method returns the current
8643 state of the medium <b>before</b> the operation.
8644
8645 <result name="VBOX_E_INVALID_OBJECT_STATE">
8646 Invalid media state (e.g. not created, locked, inaccessible,
8647 creating, deleting).
8648 </result>
8649
8650 </desc>
8651 <param name="state" type="MediaState" dir="return">
8652 <desc>
8653 State of the medium after the operation.
8654 </desc>
8655 </param>
8656 </method>
8657
8658 <method name="unlockWrite">
8659 <desc>
8660 Cancels the write lock previously set by <link to="#lockWrite"/>.
8661
8662 For both, success and failure, this method returns the current
8663 state of the medium <b>after</b> the operation.
8664
8665 See <link to="#lockWrite"/> for more details.
8666
8667 <result name="VBOX_E_INVALID_OBJECT_STATE">
8668 Medium not locked for writing.
8669 </result>
8670
8671 </desc>
8672 <param name="state" type="MediaState" dir="return">
8673 <desc>
8674 State of the medium after the operation.
8675 </desc>
8676 </param>
8677 </method>
8678
8679 <method name="close">
8680 <desc>
8681 Closes this medium.
8682
8683 The hard disk must not be attached to any known virtual machine
8684 and must not have any known child hard disks, otherwise the
8685 operation will fail.
8686
8687 When the hard disk is successfully closed, it gets removed from
8688 the list of remembered hard disks, but its storage unit is not
8689 deleted. In particular, this means that this hard disk can be
8690 later opened again using the <link
8691 to="IVirtualBox::openHardDisk"/> call.
8692
8693 Note that after this method successfully returns, the given hard
8694 disk object becomes uninitialized. This means that any attempt
8695 to call any of its methods or attributes will fail with the
8696 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
8697
8698 <result name="VBOX_E_INVALID_OBJECT_STATE">
8699 Invalid media state (other than not created, created or
8700 inaccessible).
8701 </result>
8702 <result name="VBOX_E_OBJECT_IN_USE">
8703 Medium attached to virtual machine.
8704 </result>
8705 <result name="VBOX_E_FILE_ERROR">
8706 Settings file not accessible.
8707 </result>
8708 <result name="VBOX_E_XML_ERROR">
8709 Could not parse the settings file.
8710 </result>
8711
8712 </desc>
8713 </method>
8714
8715 </interface>
8716
8717
8718 <!--
8719 // IHardDisk
8720 /////////////////////////////////////////////////////////////////////////
8721 -->
8722
8723 <enum
8724 name="HardDiskType"
8725 uuid="a348fafd-a64e-4643-ba65-eb3896bd7e0a"
8726 >
8727 <desc>
8728 Virtual hard disk type.
8729 <see>IHardDisk</see>
8730 </desc>
8731
8732 <const name="Normal" value="0">
8733 <desc>
8734 Normal hard disk (attached directly or indirectly, preserved
8735 when taking snapshots).
8736 </desc>
8737 </const>
8738 <const name="Immutable" value="1">
8739 <desc>
8740 Immutable hard disk (attached indirectly, changes are wiped out
8741 after powering off the virtual machine).
8742 </desc>
8743 </const>
8744 <const name="Writethrough" value="2">
8745 <desc>
8746 Write through hard disk (attached directly, ignored when
8747 taking snapshots).
8748 </desc>
8749 </const>
8750 </enum>
8751
8752 <enum
8753 name="HardDiskVariant"
8754 uuid="eb7fc6b3-ae23-4c5d-a1f6-e3522dd1efb0"
8755 >
8756 <desc>
8757 Virtual hard disk image variant. More than one flag may be set.
8758 <see>IHardDisk</see>
8759 </desc>
8760
8761 <const name="Standard" value="0">
8762 <desc>
8763 No particular variant requested, results in using the backend default.
8764 </desc>
8765 </const>
8766 <const name="VmdkSplit2G" value="0x01">
8767 <desc>
8768 VMDK image split in chunks of less than 2GByte.
8769 </desc>
8770 </const>
8771 <const name="VmdkStreamOptimized" value="0x04">
8772 <desc>
8773 VMDK streamOptimized image. Special import/export format which is
8774 read-only/append-only.
8775 </desc>
8776 </const>
8777 <const name="VmdkESX" value="0x08">
8778 <desc>
8779 VMDK format variant used on ESX products.
8780 </desc>
8781 </const>
8782 <const name="Fixed" value="0x10000">
8783 <desc>
8784 Fixed image. Only allowed for base images.
8785 </desc>
8786 </const>
8787 <const name="Diff" value="0x20000">
8788 <desc>
8789 Fixed image. Only allowed for base images.
8790 </desc>
8791 </const>
8792 </enum>
8793
8794 <interface
8795 name="IHardDiskAttachment" extends="$unknown"
8796 uuid="b1dd04bb-93c0-4ad3-a9cf-82316e595836"
8797 wsmap="struct"
8798 >
8799 <desc>
8800 The IHardDiskAttachment interface represents a hard disk attachment of a
8801 virtual machine.
8802
8803 Every hard disk attachment specifies a slot of the virtual hard disk
8804 controller and a virtual hard disk attached to this slot.
8805
8806 The array of hard disk attachments is returned by
8807 <link to="IMachine::hardDiskAttachments"/>.
8808 </desc>
8809 <attribute name="hardDisk" type="IHardDisk" readonly="yes">
8810 <desc>Hard disk object associated with this attachment.</desc>
8811 </attribute>
8812
8813 <attribute name="controller" type="wstring" readonly="yes">
8814 <desc>Interface bus of this attachment.</desc>
8815 </attribute>
8816
8817 <attribute name="port" type="long" readonly="yes">
8818 <desc>Port number of this attachment.</desc>
8819 </attribute>
8820
8821 <attribute name="device" type="long" readonly="yes">
8822 <desc>Device slot number of this attachment.</desc>
8823 </attribute>
8824
8825 </interface>
8826
8827 <interface
8828 name="IHardDisk" extends="IMedium"
8829 uuid="91648dc6-bb19-46bf-9e1c-4bf5b960c8e2"
8830 wsmap="managed"
8831 >
8832 <desc>
8833 The IHardDisk interface represents a virtual hard disk drive
8834 used by a virtual machine. This is a subclass of <link to="IMedium" />; see remarks there.
8835
8836 Virtual hard disk objects virtualize the hard disk hardware and look like
8837 regular hard disks for the guest OS running inside the virtual machine.
8838
8839 <h3>Hard Disk Types</h3>
8840
8841 There are three types of hard disks:
8842 <link to="HardDiskType_Normal">Normal</link>,
8843 <link to="HardDiskType_Immutable">Immutable</link> and
8844 <link to="HardDiskType_Writethrough">Writethrough</link>. The type of the
8845 hard disk defines how the hard disk is attached to a virtual machine and
8846 what happens when a <link to="ISnapshot">snapshot</link> of the virtual
8847 machine with the attached hard disk is taken. The type of the hard disk is
8848 defined by the <link to="#type"/> attribute.
8849
8850 All hard disks can be also divided in two big groups: <i>base</i> hard
8851 disks and <i>differencing</i> hard disks. A base hard disk contains all
8852 sectors of the hard disk data in its storage unit and therefore can be
8853 used independently. On the contrary, a differencing hard disk contains
8854 only some part of the hard disk data (a subset of sectors) and needs
8855 another hard disk to get access to the missing sectors of data. This
8856 another hard disk is called a <i>parent</i> hard disk and defines a hard
8857 disk to which this differencing hard disk is known to be <i>linked to</i>.
8858 The parent hard disk may be itself a differencing hard disk. This
8859 way, differencing hard disks form a linked hard disk chain. This chain
8860 always ends with the base hard disk which is sometimes referred to as the
8861 root hard disk of this chain. Note that several differencing hard disks
8862 may be linked to the same parent hard disk. This way, all known hard disks
8863 form a hard disk tree which is based on their parent-child relationship.
8864
8865 Differencing hard disks can be distinguished from base hard disks by
8866 querying the <link to="#parent"/> attribute: base hard disks do not have
8867 parents they would depend on, so the value of this attribute is always
8868 <tt>null</tt> for them. Using this attribute, it is possible to walk up
8869 the hard disk tree (from the child hard disk to its parent). It is also
8870 possible to walk down the tree using the <link to="#children"/>
8871 attribute.
8872
8873 Note that the type of all differencing hard disks is
8874 <link to="HardDiskType_Normal">Normal</link>; all other values are
8875 meaningless for them. Base hard disks may be of any type.
8876
8877 <h3>Creating Hard Disks</h3>
8878
8879 New base hard disks are created using
8880 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8881 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8882 disks are usually implicitly created by VirtualBox when needed but may
8883 also be created explicitly using <link to="#createDiffStorage"/>.
8884
8885 After the hard disk is successfully created (including the storage unit)
8886 or opened, it becomes a known hard disk (remembered in the internal media
8887 registry). Known hard disks can be attached to a virtual machine, accessed
8888 through <link to="IVirtualBox::getHardDisk"/> and
8889 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8890 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8891
8892 The following methods, besides <link to="IMedium::close"/>,
8893 automatically remove the hard disk from the media registry:
8894 <ul>
8895 <li><link to="#deleteStorage"/></li>
8896 <li><link to="#mergeTo"/></li>
8897 </ul>
8898
8899 If the storage unit of the hard disk is a regular file in the host's
8900 file system then the rules stated in the description of the
8901 <link to="IMedium::location"/> attribute apply when setting its value. In
8902 addition, a plain file name without any path may be given, in which case
8903 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8904 folder</link> will be prepended to it.
8905
8906 <h4>Automatic composition of the file name part</h4>
8907
8908 Another extension to the <link to="IMedium::location"/> attribute is that
8909 there is a possibility to cause VirtualBox to compose a unique value for
8910 the file name part of the location using the UUID of the hard disk. This
8911 applies only to hard disks in <link to="MediaState_NotCreated"/> state,
8912 e.g. before the storage unit is created, and works as follows. You set the
8913 value of the <link to="IMedium::location"/> attribute to a location
8914 specification which only contains the path specification but not the file
8915 name part and ends with either a forward slash or a backslash character.
8916 In response, VirtualBox will generate a new UUID for the hard disk and
8917 compose the file name using the following pattern:
8918 <pre>
8919 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8920 </pre>
8921 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8922 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8923 is the default extension for the storage format of this hard disk. After
8924 that, you may call any of the methods that create a new hard disk storage
8925 unit and they will use the generated UUID and file name.
8926
8927 <h3>Attaching Hard Disks</h3>
8928
8929 Hard disks are attached to virtual machines using the
8930 <link to="IMachine::attachHardDisk"/> method and detached using the
8931 <link to="IMachine::detachHardDisk"/> method. Depending on their
8932 <link to="#type"/>, hard disks are attached either
8933 <i>directly</i> or <i>indirectly</i>.
8934
8935 When a hard disk is being attached directly, it is associated with the
8936 virtual machine and used for hard disk operations when the machine is
8937 running. When a hard disk is being attached indirectly, a new differencing
8938 hard disk linked to it is implicitly created and this differencing hard
8939 disk is associated with the machine and used for hard disk operations.
8940 This also means that if <link to="IMachine::attachHardDisk"/> performs
8941 a direct attachment then the same hard disk will be returned in response
8942 to the subsequent <link to="IMachine::getHardDisk"/> call; however if
8943 an indirect attachment is performed then
8944 <link to="IMachine::getHardDisk"/> will return the implicitly created
8945 differencing hard disk, not the original one passed to <link
8946 to="IMachine::attachHardDisk"/>. The following table shows the
8947 dependency of the attachment type on the hard disk type:
8948
8949 <table>
8950 <tr>
8951 <th>Hard Disk Type</th>
8952 <th>Direct or Indirect?</th>
8953 </tr>
8954 <tr>
8955 <td>Normal (Base)</td>
8956 <td>
8957 Normal base hard disks that do not have children (i.e. differencing
8958 hard disks linked to them) and that are not already attached to
8959 virtual machines in snapshots are attached <b>directly</b>.
8960 Otherwise, they are attached <b>indirectly</b> because having
8961 dependent children or being part of the snapshot makes it impossible
8962 to modify hard disk contents without breaking the integrity of the
8963 dependent party. The <link to="#readOnly"/> attribute allows to
8964 quickly determine the kind of the attachment for the given hard
8965 disk. Note that if a normal base hard disk is to be indirectly
8966 attached to a virtual machine with snapshots then a special
8967 procedure called <i>smart attachment</i> is performed (see below).
8968 </td>
8969 </tr>
8970 <tr>
8971 <td>Normal (Differencing)</td>
8972 <td>
8973 Differencing hard disks are like normal base hard disks: attached
8974 <b>directly</b> if they do not have children and are not attached to
8975 virtual machines in snapshots, and <b>indirectly</b> otherwise. Note
8976 that the smart attachment procedure is never performed for
8977 differencing hard disks.
8978 </td>
8979 </tr>
8980 <tr>
8981 <td>Immutable</td>
8982 <td>
8983 Immutable hard disks are always attached <b>indirectly</b> because
8984 they are designed to be non-writable. If an immutable hard disk is
8985 attached to a virtual machine with snapshots then a special
8986 procedure called smart attachment is performed (see below).
8987 </td>
8988 </tr>
8989 <tr>
8990 <td>Writethrough</td>
8991 <td>
8992 Writethrough hard disks are always attached <b>directly</b>, also as
8993 designed. This also means that writethrough hard disks cannot have
8994 other hard disks linked to them at all.
8995 </td>
8996 </tr>
8997 </table>
8998
8999 Note that the same hard disk, regardless of its type, may be attached to
9000 more than one virtual machine at a time. In this case, the machine that is
9001 started first gains exclusive access to the hard disk and attempts to
9002 start other machines having this hard disk attached will fail until the
9003 first machine is powered down.
9004
9005 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9006 that the given hard disk remains associated with the given machine after a
9007 successful <link to="IMachine::detachHardDisk"/> call until
9008 <link to="IMachine::saveSettings"/> is called to save all changes to
9009 machine settings to disk. This deferring is necessary to guarantee that
9010 the hard disk configuration may be restored at any time by a call to
9011 <link to="IMachine::discardSettings"/> before the settings
9012 are saved (committed).
9013
9014 Note that if <link to="IMachine::discardSettings"/> is called after
9015 indirectly attaching some hard disks to the machine but before a call to
9016 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9017 all differencing hard disks implicitly created by
9018 <link to="IMachine::attachHardDisk"/> for these indirect attachments.
9019 Such implicitly created hard disks will also be immediately deleted when
9020 detached explicitly using the <link to="IMachine::detachHardDisk"/>
9021 call if it is made before <link to="IMachine::saveSettings"/>. This
9022 implicit deletion is safe because newly created differencing hard
9023 disks do not contain any user data.
9024
9025 However, keep in mind that detaching differencing hard disks that were
9026 implicitly created by <link to="IMachine::attachHardDisk"/>
9027 before the last <link to="IMachine::saveSettings"/> call will
9028 <b>not</b> implicitly delete them as they may already contain some data
9029 (for example, as a result of virtual machine execution). If these hard
9030 disks are no more necessary, the caller can always delete them explicitly
9031 using <link to="#deleteStorage"/> after they are actually de-associated
9032 from this machine by the <link to="IMachine::saveSettings"/> call.
9033
9034 <h3>Smart Attachment</h3>
9035
9036 When normal base or immutable hard disks are indirectly attached to a
9037 virtual machine then some additional steps are performed to make sure the
9038 virtual machine will have the most recent "view" of the hard disk being
9039 attached. These steps include walking through the machine's snapshots
9040 starting from the current one and going through ancestors up to the first
9041 snapshot. Hard disks attached to the virtual machine in all
9042 of the encountered snapshots are checked whether they are descendants of
9043 the given normal base or immutable hard disk. The first found child (which
9044 is the differencing hard disk) will be used instead of the normal base or
9045 immutable hard disk as a parent for creating a new differencing hard disk
9046 that will be actually attached to the machine. And only if no descendants
9047 are found or if the virtual machine does not have any snapshots then the
9048 normal base or immutable hard disk will be used itself as a parent for
9049 this differencing hard disk.
9050
9051 It is easier to explain what smart attachment does using the
9052 following example:
9053 <pre>
9054BEFORE attaching B.vdi: AFTER attaching B.vdi:
9055
9056Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9057 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9058 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9059 Snapshot 4 (none) Snapshot 4 (none)
9060 CurState (none) CurState (D3->D2.vdi)
9061
9062 NOT
9063 ...
9064 CurState (D3->B.vdi)
9065 </pre>
9066 The first column is the virtual machine configuration before the base hard
9067 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9068 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9069 mean that the hard disk that is actually attached to the machine is a
9070 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9071 another hard disk, <tt>B.vdi</tt>.
9072
9073 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9074 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9075 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9076 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9077 it cannot be attached directly and needs an indirect attachment (i.e.
9078 implicit creation of a new differencing hard disk). Due to the smart
9079 attachment procedure, the new differencing hard disk
9080 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9081 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9082 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9083 machine.
9084
9085 Note that if there is more than one descendant hard disk of the given base
9086 hard disk found in a snapshot, and there is an exact device, channel and
9087 bus match, then this exact match will be used. Otherwise, the youngest
9088 descendant will be picked up.
9089
9090 There is one more important aspect of the smart attachment procedure which
9091 is not related to snapshots at all. Before walking through the snapshots
9092 as described above, the backup copy of the current list of hard disk
9093 attachment is searched for descendants. This backup copy is created when
9094 the hard disk configuration is changed for the first time after the last
9095 <link to="IMachine::saveSettings"/> call and used by
9096 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9097 changes. When such a descendant is found in this backup copy, it will be
9098 simply re-attached back, without creating a new differencing hard disk for
9099 it. This optimization is necessary to make it possible to re-attach the
9100 base or immutable hard disk to a different bus, channel or device slot
9101 without losing the contents of the differencing hard disk actually
9102 attached to the machine in place of it.
9103 </desc>
9104
9105 <attribute name="format" type="wstring" readonly="yes">
9106 <desc>
9107 Storage format of this hard disk.
9108
9109 The value of this attribute is a string that specifies a backend used to
9110 store hard disk data. The storage format is defined when you create a
9111 new hard disk or automatically detected when you open an existing hard
9112 disk medium, and cannot be changed later.
9113
9114 The list of all storage formats supported by this VirtualBox
9115 installation can be obtained using
9116 <link to="ISystemProperties::hardDiskFormats"/>.
9117 </desc>
9118 </attribute>
9119
9120 <attribute name="type" type="HardDiskType">
9121 <desc>
9122 Type (role) of this hard disk.
9123
9124 The following constraints apply when changing the value of this
9125 attribute:
9126 <ul>
9127 <li>If a hard disk is attached to a virtual machine (either in the
9128 current state or in one of the snapshots), its type cannot be
9129 changed.
9130 </li>
9131 <li>As long as the hard disk has children, its type cannot be set
9132 to <link to="HardDiskType_Writethrough"/>.
9133 </li>
9134 <li>The type of all differencing hard disks is
9135 <link to="HardDiskType_Normal"/> and cannot be changed.
9136 </li>
9137 </ul>
9138
9139 The type of a newly created or opened hard disk is set to
9140 <link to="HardDiskType_Normal"/>.
9141 </desc>
9142 </attribute>
9143
9144 <attribute name="parent" type="IHardDisk" readonly="yes">
9145 <desc>
9146 Parent of this hard disk (a hard disk this hard disk is directly based
9147 on).
9148
9149 Only differencing hard disks have parents. For base (non-differencing)
9150 hard disks, <tt>null</tt> is returned.
9151 </desc>
9152 </attribute>
9153
9154 <attribute name="children" type="IHardDisk" safearray="yes" readonly="yes">
9155 <desc>
9156 Children of this hard disk (all differencing hard disks directly based
9157 on this hard disk). A <tt>null</tt> array is returned if this hard disk
9158 does not have any children.
9159 </desc>
9160 </attribute>
9161
9162 <attribute name="root" type="IHardDisk" readonly="yes">
9163 <desc>
9164 Root hard disk of this hard disk.
9165
9166 If this is a differencing hard disk, its root hard disk is the base hard
9167 disk the given hard disk branch starts from. For all other types of hard
9168 disks, this property returns the hard disk object itself (i.e. the same
9169 object this property is read on).
9170 </desc>
9171 </attribute>
9172
9173 <attribute name="readOnly" type="boolean" readonly="yes">
9174 <desc>
9175 Returns <tt>true</tt> if this hard disk is read-only and <tt>false</tt>
9176 otherwise.
9177
9178 A hard disk is considered to be read-only when its contents cannot be
9179 modified without breaking the integrity of other parties that depend on
9180 this hard disk such as its child hard disks or snapshots of virtual
9181 machines where this hard disk is attached to these machines. If there
9182 are no children and no such snapshots then there is no dependency and
9183 the hard disk is not read-only.
9184
9185 The value of this attribute can be used to determine the kind of the
9186 attachment that will take place when attaching this hard disk to a
9187 virtual machine. If the value is <tt>false</tt> then the hard disk will
9188 be attached directly. If the value is <tt>true</tt> then the hard disk
9189 will be attached indirectly by creating a new differencing child hard
9190 disk for that. See the interface description for more information.
9191
9192 Note that all <link to="HardDiskType_Immutable">Immutable</link> hard
9193 disks are always read-only while all
9194 <link to="HardDiskType_Writethrough">Writethrough</link> hard disks are
9195 always not.
9196
9197 <note>
9198 The read-only condition represented by this attribute is related to
9199 the hard disk type and usage, not to the current
9200 <link to="IMedium::state">media state</link> and not to the read-only
9201 state of the storage unit.
9202 </note>
9203 </desc>
9204 </attribute>
9205
9206 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9207 <desc>
9208 Logical size of this hard disk (in megabytes), as reported to the
9209 guest OS running inside the virtual machine this disk is
9210 attached to. The logical size is defined when the hard disk is created
9211 and cannot be changed later.
9212
9213 <note>
9214 Reading this property on a differencing hard disk will return the size
9215 of its <link to="#root"/> hard disk.
9216 </note>
9217 <note>
9218 For hard disks whose state is <link to="#state"/> is <link
9219 to="MediaState_Inaccessible"/>, the value of this property is the
9220 last known logical size. For <link to="MediaState_NotCreated"/> hard
9221 disks, the returned value is zero.
9222 </note>
9223 </desc>
9224 </attribute>
9225
9226 <attribute name="autoReset" type="boolean">
9227 <desc>
9228 Whether this differencing hard disk will be automatically reset each
9229 time a virtual machine it is attached to is powered up.
9230
9231 See <link to="#reset()"/> for more information about resetting
9232 differencing hard disks.
9233
9234 <note>
9235 Reading this property on a base (non-differencing) hard disk will
9236 always <tt>false</tt>. Changing the value of this property in this
9237 case is not supported.
9238 </note>
9239
9240 <result name="VBOX_E_NOT_SUPPORTED">
9241 This is not a differencing hard disk (when changing the attribute
9242 value).
9243 </result>
9244 </desc>
9245 </attribute>
9246
9247 <!-- storage methods -->
9248
9249 <method name="getProperty">
9250 <desc>
9251 Returns the value of the custom hard disk property with the given name.
9252
9253 The list of all properties supported by the given hard disk format can
9254 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9255
9256 Note that if this method returns a <tt>null</tt> @a value, the requested
9257 property is supported but currently not assigned any value.
9258
9259 <result name="VBOX_E_OBJECT_NOT_FOUND">
9260 Requested property does not exist (not supported by the format).
9261 </result>
9262 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9263 </desc>
9264 <param name="name" type="wstring" dir="in">
9265 <desc>Name of the property to get.</desc>
9266 </param>
9267 <param name="value" type="wstring" dir="return">
9268 <desc>Current property value.</desc>
9269 </param>
9270 </method>
9271
9272 <method name="setProperty">
9273 <desc>
9274 Sets the value of the custom hard disk property with the given name.
9275
9276 The list of all properties supported by the given hard disk format can
9277 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9278
9279 Note that setting the property value to <tt>null</tt> is equivalent to
9280 deleting the existing value. A default value (if it is defined for this
9281 property) will be used by the format backend in this case.
9282
9283 <result name="VBOX_E_OBJECT_NOT_FOUND">
9284 Requested property does not exist (not supported by the format).
9285 </result>
9286 <result name="E_INVALIDARG">@a name is NULL or empty.</result>
9287 </desc>
9288 <param name="name" type="wstring" dir="in">
9289 <desc>Name of the property to set.</desc>
9290 </param>
9291 <param name="value" type="wstring" dir="in">
9292 <desc>Property value to set.</desc>
9293 </param>
9294 </method>
9295
9296 <method name="getProperties">
9297 <desc>
9298 Returns values for a group of properties in one call.
9299
9300 The names of the properties to get are specified using the @a names
9301 argument which is a list of comma-separated property names or
9302 <tt>null</tt> if all properties are to be returned. Note that currently
9303 the value of this argument is ignored and the method always returns all
9304 existing properties.
9305
9306 The list of all properties supported by the given hard disk format can
9307 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9308
9309 The method returns two arrays, the array of property names corresponding
9310 to the @a names argument and the current values of these properties.
9311 Both arrays have the same number of elements with each elemend at the
9312 given index in the first array corresponds to an element at the same
9313 index in the second array.
9314
9315 Note that for properties that do not have assigned values,
9316 <tt>null</tt> is returned at the appropriate index in the
9317 @a returnValues array.
9318
9319 </desc>
9320 <param name="names" type="wstring" dir="in">
9321 <desc>
9322 Names of properties to get.
9323 </desc>
9324 </param>
9325 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9326 <desc>Names of returned properties.</desc>
9327 </param>
9328 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9329 <desc>Values of returned properties.</desc>
9330 </param>
9331 </method>
9332
9333 <method name="setProperties">
9334 <desc>
9335 Sets values for a group of properties in one call.
9336
9337 The names of the properties to set are passed in the @a names
9338 array along with the new values for them in the @a values array. Both
9339 arrays have the same number of elements with each elemend at the given
9340 index in the first array corresponding to an element at the same index
9341 in the second array.
9342
9343 If there is at least one property name in @a names that is not valid,
9344 the method will fail before changing the values of any other properties
9345 from the @a names array.
9346
9347 Using this method over <link to="#setProperty"/> is preferred if you
9348 need to set several properties at once since it will result into less
9349 IPC calls.
9350
9351 The list of all properties supported by the given hard disk format can
9352 be obtained with <link to="IHardDiskFormat::describeProperties"/>.
9353
9354 Note that setting the property value to <tt>null</tt> is equivalent to
9355 deleting the existing value. A default value (if it is defined for this
9356 property) will be used by the format backend in this case.
9357 </desc>
9358 <param name="names" type="wstring" safearray="yes" dir="in">
9359 <desc>Names of properties to set.</desc>
9360 </param>
9361 <param name="values" type="wstring" safearray="yes" dir="in">
9362 <desc>Values of properties to set.</desc>
9363 </param>
9364 </method>
9365
9366 <!-- storage methods -->
9367
9368 <method name="createBaseStorage">
9369 <desc>
9370 Starts creating a hard disk storage unit (fixed/dynamic, according
9371 to the variant flags) in in the background. The previous storage unit
9372 created for this object, if any, must first be deleted using
9373 <link to="#deleteStorage"/>, otherwise the operation will fail.
9374
9375 Before the operation starts, the hard disk is placed in
9376 <link to="MediaState_Creating"/> state. If the create operation
9377 fails, the media will be placed back in <link to="MediaState_NotCreated"/>
9378 state.
9379
9380 After the returned progress object reports that the operation has
9381 successfully completed, the media state will be set to <link
9382 to="MediaState_Created"/>, the hard disk will be remembered by this
9383 VirtualBox installation and may be attached to virtual machines.
9384
9385 <result name="VBOX_E_NOT_SUPPORTED">
9386 The variant of storage creation operation is not supported. See <link
9387 to="IHardDiskFormat::capabilities"/>.
9388 </result>
9389 </desc>
9390 <param name="logicalSize" type="unsigned long long" dir="in">
9391 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9392 </param>
9393 <param name="variant" type="HardDiskVariant" dir="in">
9394 <desc>Exact image variant which should be created.</desc>
9395 </param>
9396 <param name="progress" type="IProgress" dir="return">
9397 <desc>Progress object to track the operation completion.</desc>
9398 </param>
9399 </method>
9400
9401 <method name="deleteStorage">
9402 <desc>
9403 Starts deleting the storage unit of this hard disk.
9404
9405 The hard disk must not be attached to any known virtual machine and must
9406 not have any known child hard disks, otherwise the operation will fail.
9407 It will also fail if there is no storage unit to delete or if deletion
9408 is already in progress, or if the hard disk is being in use (locked for
9409 read or for write) or inaccessible. Therefore, the only valid state for
9410 this operation to succeed is <link to="MediaState_Created"/>.
9411
9412 Before the operation starts, the hard disk is placed to
9413 <link to="MediaState_Deleting"/> state and gets removed from the list
9414 of remembered hard disks (media registry). If the delete operation
9415 fails, the media will be remembered again and placed back to
9416 <link to="MediaState_Created"/> state.
9417
9418 After the returned progress object reports that the operation is
9419 complete, the media state will be set to
9420 <link to="MediaState_NotCreated"/> and you will be able to use one of
9421 the storage creation methods to create it again.
9422
9423 <see>#close()</see>
9424
9425 <result name="VBOX_E_OBJECT_IN_USE">
9426 Hard disk is attached to a virtual machine.
9427 </result>
9428 <result name="VBOX_E_NOT_SUPPORTED">
9429 Storage deletion is not allowed because neither of storage creation
9430 operations are supported. See
9431 <link to="IHardDiskFormat::capabilities"/>.
9432 </result>
9433
9434 <note>
9435 If the deletion operation fails, it is not guaranteed that the storage
9436 unit still exists. You may check the <link to="IMedium::state"/> value
9437 to answer this question.
9438 </note>
9439 </desc>
9440 <param name="progress" type="IProgress" dir="return">
9441 <desc>Progress object to track the operation completion.</desc>
9442 </param>
9443 </method>
9444
9445 <!-- diff methods -->
9446
9447 <method name="createDiffStorage">
9448 <desc>
9449 Starts creating an empty differencing storage unit based on this hard
9450 disk in the format and at the location defined by the @a target
9451 argument.
9452
9453 The target hard disk must be in <link to="MediaState_NotCreated"/>
9454 state (i.e. must not have an existing storage unit). Upon successful
9455 completion, this operation will set the type of the target hard disk to
9456 <link to="HardDiskType_Normal"/> and create a storage unit necessary to
9457 represent the differencing hard disk data in the given format (according
9458 to the storage format of the target object).
9459
9460 After the returned progress object reports that the operation is
9461 successfully complete, the target hard disk gets remembered by this
9462 VirtualBox installation and may be attached to virtual machines.
9463
9464 <note>
9465 The hard disk will be set to <link to="MediaState_LockedRead"/>
9466 state for the duration of this operation.
9467 </note>
9468 <result name="VBOX_E_OBJECT_IN_USE">
9469 Hard disk not in NotCreated state.
9470 </result>
9471 </desc>
9472 <param name="target" type="IHardDisk" dir="in">
9473 <desc>Target hard disk.</desc>
9474 </param>
9475 <param name="variant" type="HardDiskVariant" dir="in">
9476 <desc>Exact image variant which should be created.</desc>
9477 </param>
9478 <param name="progress" type="IProgress" dir="return">
9479 <desc>Progress object to track the operation completion.</desc>
9480 </param>
9481 </method>
9482
9483 <method name="mergeTo">
9484 <desc>
9485 Starts merging the contents of this hard disk and all intermediate
9486 differencing hard disks in the chain to the given target hard disk.
9487
9488 The target hard disk must be either a descendant of this hard disk or
9489 its ancestor (otherwise this method will immediately return a failure).
9490 It follows that there are two logical directions of the merge operation:
9491 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9492 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9493 chain:
9494
9495 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9496
9497 Here, calling this method on the <tt>Base</tt> hard disk object with
9498 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9499 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9500 merge. Note that in both cases the contents of the resulting hard disk
9501 will be the same, the only difference is the hard disk object that takes
9502 the result of the merge operation. In case of the forward merge in the
9503 above example, the result will be written to <tt>Diff_2</tt>; in case of
9504 the backward merge, the result will be written to <tt>Base</tt>. In
9505 other words, the result of the operation is always stored in the target
9506 hard disk.
9507
9508 Upon successful operation completion, the storage units of all hard
9509 disks in the chain between this (source) hard disk and the target hard
9510 disk, including the source hard disk itself, will be automatically
9511 deleted and the relevant hard disk objects (including this hard disk)
9512 will become uninitialized. This means that any attempt to call any of
9513 their methods or attributes will fail with the
9514 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9515 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9516 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9517 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9518 disk itself since it will no longer be based on any other hard disk.
9519
9520 Considering the above, all of the following conditions must be met in
9521 order for the merge operation to succeed:
9522 <ul>
9523 <li>
9524 Neither this (source) hard disk nor any intermediate
9525 differencing hard disk in the chain between it and the target
9526 hard disk is attached to any virtual machine.
9527 </li>
9528 <li>
9529 Neither the source hard disk nor the target hard disk is an
9530 <link to="HardDiskType_Immutable"/> hard disk.
9531 </li>
9532 <li>
9533 The part of the hard disk tree from the source hard disk to the
9534 target hard disk is a linear chain, i.e. all hard disks in this
9535 chain have exactly one child which is the next hard disk in this
9536 chain. The only exception from this rule is the target hard disk in
9537 the forward merge operation; it is allowed to have any number of
9538 child hard disks because the merge operation will hot change its
9539 logical contents (as it is seen by the guest OS or by children).
9540 </li>
9541 <li>
9542 None of the involved hard disks are in
9543 <link to="MediaState_LockedRead"/> or
9544 <link to="MediaState_LockedWrite"/> state.
9545 </li>
9546 </ul>
9547
9548 <note>
9549 This (source) hard disk and all intermediates will be placed to <link
9550 to="MediaState_Deleting"/> state and the target hard disk will be
9551 placed to <link to="MediaState_LockedWrite"/> state and for the
9552 duration of this operation.
9553 </note>
9554 </desc>
9555 <param name="targetId" type="uuid" dir="in">
9556 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9557 </param>
9558 <param name="progress" type="IProgress" dir="return">
9559 <desc>Progress object to track the operation completion.</desc>
9560 </param>
9561 </method>
9562
9563 <!-- clone method -->
9564
9565 <method name="cloneTo">
9566 <desc>
9567 Starts creating a clone of this hard disk in the format and at the
9568 location defined by the @a target argument.
9569
9570 The target hard disk must be in <link to="MediaState_NotCreated"/>
9571 state (i.e. must not have an existing storage unit). Upon successful
9572 completion, the cloned hard disk will contain exactly the same sector
9573 data as the hard disk being cloned, except that a new UUID for the
9574 clone will be randomly generated.
9575
9576 The @a parent argument defines which hard disk will be the parent
9577 of the clone. Passing a NULL reference indicates that the clone will
9578 be a base image, i.e. completely independent. It is possible to specify
9579 an arbitrary hard disk for this parameter, including the parent of the
9580 hard disk which is being cloned. Even cloning to a child of the source
9581 hard disk is possible.
9582
9583 After the returned progress object reports that the operation is
9584 successfully complete, the target hard disk gets remembered by this
9585 VirtualBox installation and may be attached to virtual machines.
9586
9587 <note>
9588 This hard disk will be placed to <link to="MediaState_LockedRead"/>
9589 state for the duration of this operation.
9590 </note>
9591 </desc>
9592 <param name="target" type="IHardDisk" dir="in">
9593 <desc>Target hard disk.</desc>
9594 </param>
9595 <param name="variant" type="HardDiskVariant" dir="in">
9596 <desc>Exact image variant which should be created.</desc>
9597 </param>
9598 <param name="parent" type="IHardDisk" dir="in">
9599 <desc>Parent of the cloned hard disk.</desc>
9600 </param>
9601 <param name="progress" type="IProgress" dir="return">
9602 <desc>Progress object to track the operation completion.</desc>
9603 </param>
9604 </method>
9605
9606 <!-- other methods -->
9607
9608 <method name="compact">
9609 <desc>
9610 Starts compacting of this hard disk. This means that the disk is
9611 transformed into a possibly more compact storage representation.
9612 This potentially creates temporary images, which can require a
9613 substantial amount of additional disk space.
9614
9615 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9616 state and all its parent hard disks (if any) will be placed to
9617 <link to="MediaState_LockedRead"/> state for the duration of this
9618 operation.
9619 </desc>
9620 <param name="progress" type="IProgress" dir="return">
9621 <desc>Progress object to track the operation completion.</desc>
9622 </param>
9623 </method>
9624
9625 <method name="reset">
9626 <desc>
9627 Starts erasing the contents of this differencing hard disk.
9628
9629 This operation will reset the differencing hard disk to its initial
9630 state when it does not contain any sector data and any read operation is
9631 redirected to its parent hard disk.
9632
9633 This hard disk will be placed to <link to="MediaState_LockedWrite"/>
9634 for the duration of this operation.
9635
9636 <result name="VBOX_E_NOT_SUPPORTED">
9637 This is not a differencing hard disk.
9638 </result>
9639 <result name="VBOX_E_INVALID_OBJECT_STATE">
9640 Hard disk is not in <link to="MediaState_Created"/> or
9641 <link to="MediaState_Inaccessible"/> state.
9642 </result>
9643 </desc>
9644 <param name="progress" type="IProgress" dir="return">
9645 <desc>Progress object to track the operation completion.</desc>
9646 </param>
9647 </method>
9648
9649 </interface>
9650
9651
9652 <!--
9653 // IHardDiskFormat
9654 /////////////////////////////////////////////////////////////////////////
9655 -->
9656
9657 <enum
9658 name="DataType"
9659 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9660 >
9661 <const name="Int32" value="0"/>
9662 <const name="Int8" value="1"/>
9663 <const name="String" value="2"/>
9664 </enum>
9665
9666 <enum
9667 name="DataFlags"
9668 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9669 >
9670 <const name="None" value="0x00"/>
9671 <const name="Mandatory" value="0x01"/>
9672 <const name="Expert" value="0x02"/>
9673 <const name="Array" value="0x04"/>
9674 <const name="FlagMask" value="0x07"/>
9675 </enum>
9676
9677 <enum
9678 name="HardDiskFormatCapabilities"
9679 uuid="1df1e4aa-d25a-4ba6-b2a2-02f60eb5903b"
9680 >
9681 <desc>
9682 Hard disk format capability flags.
9683 </desc>
9684
9685 <const name="Uuid" value="0x01">
9686 <desc>
9687 Supports UUIDs as expected by VirtualBox code.
9688 </desc>
9689 </const>
9690
9691 <const name="CreateFixed" value="0x02">
9692 <desc>
9693 Supports creating fixed size images, allocating all space instantly.
9694 </desc>
9695 </const>
9696
9697 <const name="CreateDynamic" value="0x04">
9698 <desc>
9699 Supports creating dynamically growing images, allocating space on
9700 demand.
9701 </desc>
9702 </const>
9703
9704 <const name="CreateSplit2G" value="0x08">
9705 <desc>
9706 Supports creating images split in chunks of a bit less than 2 GBytes.
9707 </desc>
9708 </const>
9709
9710 <const name="Differencing" value="0x10">
9711 <desc>
9712 Supports being used as a format for differencing hard disks (see <link
9713 to="IHardDisk::createDiffStorage"/>).
9714 </desc>
9715 </const>
9716
9717 <const name="Asynchronous" value="0x20">
9718 <desc>
9719 Supports asynchronous I/O operations for at least some configurations.
9720 </desc>
9721 </const>
9722
9723 <const name="File" value="0x40">
9724 <desc>
9725 The format backend operates on files (the <link to="IMedium::location"/>
9726 attribute of the hard disk specifies a file used to store hard disk
9727 data; for a list of supported file extensions see
9728 <link to="IHardDiskFormat::fileExtensions"/>).
9729 </desc>
9730 </const>
9731
9732 <const name="Properties" value="0x80">
9733 <desc>
9734 The format backend uses the property interface to configure the storage
9735 location and properties (the <link to="IHardDiskFormat::describeProperties"/>
9736 method is used to get access to properties supported by the given hard
9737 disk format).
9738 </desc>
9739 </const>
9740
9741 <const name="CapabilityMask" value="0xFF"/>
9742 </enum>
9743
9744 <interface
9745 name="IHardDiskFormat" extends="$unknown"
9746 uuid="7f3ba790-3a0b-4a8a-bac2-bb50150123c5"
9747 wsmap="managed"
9748 >
9749 <desc>
9750 The IHardDiskFormat interface represents a virtual hard disk format.
9751
9752 Each hard disk format has an associated backend which is used to handle
9753 hard disks stored in this format. This interface provides information
9754 about the properties of the associated backend.
9755
9756 Each hard disk format is identified by a string represented by the
9757 <link to="#id"/> attribute. This string is used in calls like
9758 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9759 format.
9760
9761 The list of all supported hard disk formats can be obtained using
9762 <link to="ISystemProperties::hardDiskFormats"/>.
9763
9764 <see>IHardDisk</see>
9765 </desc>
9766
9767 <attribute name="id" type="wstring" readonly="yes">
9768 <desc>
9769 Identifier of this format.
9770
9771 The format identifier is a non-null non-empty ASCII string. Note that
9772 this string is case-insensitive. This means that, for example, all of
9773 the following strings:
9774 <pre>
9775 "VDI"
9776 "vdi"
9777 "VdI"</pre>
9778 refer to the same hard disk format.
9779
9780 This string is used in methods of other interfaces where it is necessary
9781 to specify a hard disk format, such as
9782 <link to="IVirtualBox::createHardDisk"/>.
9783 </desc>
9784 </attribute>
9785
9786 <attribute name="name" type="wstring" readonly="yes">
9787 <desc>
9788 Human readable description of this format.
9789
9790 Mainly for use in file open dialogs.
9791 </desc>
9792 </attribute>
9793
9794 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9795 <desc>
9796 Array of strings containing the supported file extensions.
9797
9798 The first extension in the array is the extension preferred by the
9799 backend. It is recommended to use this extension when specifying a
9800 location of the storage unit for a new hard disk.
9801
9802 Note that some backends do not work on files, so this array may be
9803 empty.
9804
9805 <see>IHardDiskFormat::capabilities</see>
9806 </desc>
9807 </attribute>
9808
9809 <attribute name="capabilities" type="unsigned long" readonly="yes">
9810 <desc>
9811 Capabilities of the format as a set of bit flags.
9812
9813 For the meaning of individual capability flags see
9814 <link to="HardDiskFormatCapabilities"/>.
9815 </desc>
9816 </attribute>
9817
9818 <method name="describeProperties">
9819 <desc>
9820 Returns several arrays describing the properties supported by this
9821 format.
9822
9823 An element with the given index in each array describes one
9824 property. Thus, the number of elements in each returned array is the
9825 same and corresponds to the number of supported properties.
9826
9827 The returned arrays are filled in only if the
9828 <link to="HardDiskFormatCapabilities_Properties"/> flag is set.
9829 All arguments must be non-NULL.
9830
9831 <see>DataType</see>
9832 <see>DataFlags</see>
9833 </desc>
9834
9835 <param name="names" type="wstring" safearray="yes" dir="out">
9836 <desc>Array of property names.</desc>
9837 </param>
9838 <param name="description" type="wstring" safearray="yes" dir="out">
9839 <desc>Array of property descriptions.</desc>
9840 </param>
9841 <param name="types" type="DataType" safearray="yes" dir="out">
9842 <desc>Array of property types.</desc>
9843 </param>
9844 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9845 <desc>Array of property flags.</desc>
9846 </param>
9847 <param name="defaults" type="wstring" safearray="yes" dir="out">
9848 <desc>Array of default property values.</desc>
9849 </param>
9850 </method>
9851
9852 </interface>
9853
9854
9855 <!--
9856 // IFloppyImage
9857 /////////////////////////////////////////////////////////////////////////
9858 -->
9859
9860 <interface
9861 name="IFloppyImage" extends="IMedium"
9862 uuid="faa6101f-078c-4b3a-ab75-75670c8170b3"
9863 wsmap="managed"
9864 >
9865 <desc>
9866 The IFloppyImage interface represents a medium containing the image
9867 of a floppy disk. This is a subclass of <link to="IMedium" />; see remarks there.
9868 </desc>
9869
9870 </interface>
9871
9872
9873 <!--
9874 // IDVDImage
9875 /////////////////////////////////////////////////////////////////////////
9876 -->
9877
9878 <interface
9879 name="IDVDImage" extends="IMedium"
9880 uuid="b1f90bbb-e8a9-4484-9af1-3638e943f763"
9881 wsmap="managed"
9882 >
9883 <desc>
9884 The IDVDImage interface represents a medium containing the image
9885 of a CD or DVD disk in the ISO format.
9886
9887 This is a subclass of <link to="IMedium" />; see remarks there.
9888 </desc>
9889
9890 </interface>
9891
9892
9893 <!--
9894 // IDVDDrive
9895 /////////////////////////////////////////////////////////////////////////
9896 -->
9897
9898 <interface
9899 name="IDVDDrive" extends="$unknown"
9900 uuid="d650ef30-be9b-4dae-b463-11d5824681a5"
9901 wsmap="managed"
9902 >
9903 <desc>
9904 The IDVDDrive interface represents the virtual CD/DVD drive of the
9905 virtual machine. An object of this type is returned by
9906 <link to="IMachine::DVDDrive"/>.
9907 </desc>
9908
9909 <attribute name="state" type="DriveState" readonly="yes">
9910 <desc>Current drive state.</desc>
9911 </attribute>
9912
9913 <attribute name="passthrough" type="boolean">
9914 <desc>
9915 When a host drive is mounted and passthrough is enabled
9916 the guest OS will be able to directly send SCSI commands to
9917 the host drive. This enables the guest OS to use CD/DVD writers
9918 but is potentially dangerous.
9919 </desc>
9920 </attribute>
9921
9922 <method name="mountImage">
9923 <desc>Mounts a CD/DVD image with the specified UUID.
9924
9925 <result name="VBOX_E_FILE_ERROR">
9926 Invalid image file location.
9927 </result>
9928 <result name="VBOX_E_OBJECT_NOT_FOUND">
9929 Could not find a CD/DVD image matching @a imageId.
9930 </result>
9931 <result name="VBOX_E_INVALID_OBJECT_STATE">
9932 Invalid media state.
9933 </result>
9934
9935 </desc>
9936 <param name="imageId" type="uuid" dir="in"/>
9937 </method>
9938
9939 <method name="captureHostDrive">
9940 <desc>Captures the specified host CD/DVD drive.</desc>
9941 <param name="drive" type="IHostDVDDrive" dir="in"/>
9942 </method>
9943
9944 <method name="unmount">
9945 <desc>Unmounts the currently mounted image or host drive.</desc>
9946 </method>
9947
9948 <method name="getImage">
9949 <desc>Returns the currently mounted CD/DVD image.</desc>
9950 <param name="image" type="IDVDImage" dir="return"/>
9951 </method>
9952
9953 <method name="getHostDrive">
9954 <desc>Returns the currently mounted host CD/DVD drive.</desc>
9955 <param name="drive" type="IHostDVDDrive" dir="return"/>
9956 </method>
9957
9958 </interface>
9959
9960
9961 <!--
9962 // IFloppyDrive
9963 /////////////////////////////////////////////////////////////////////////
9964 -->
9965
9966 <interface
9967 name="IFloppyDrive" extends="$unknown"
9968 uuid="159412cd-bab8-452e-8097-218a020825a6"
9969 wsmap="managed"
9970 >
9971 <desc>
9972 The IFloppyDrive interface represents the virtual floppy drive of the
9973 virtual machine. An object of this type is returned by
9974 <link to="IMachine::floppyDrive" />.
9975 </desc>
9976
9977 <attribute name="enabled" type="boolean">
9978 <desc>
9979 Flag whether the floppy drive is enabled. If it is disabled,
9980 the floppy drive will not be reported to the guest OS.
9981 </desc>
9982 </attribute>
9983
9984 <attribute name="state" type="DriveState" readonly="yes">
9985 <desc>Current drive state.</desc>
9986 </attribute>
9987
9988 <method name="mountImage">
9989 <desc>Mounts a floppy image with the specified UUID.
9990
9991 <result name="VBOX_E_FILE_ERROR">
9992 Invalid image file location.
9993 </result>
9994 <result name="VBOX_E_OBJECT_NOT_FOUND">
9995 Could not find a floppy image matching @a imageID.
9996 </result>
9997 <result name="VBOX_E_INVALID_OBJECT_STATE">
9998 Invalid media state.
9999 </result>
10000
10001 </desc>
10002 <param name="imageId" type="uuid" dir="in"/>
10003 </method>
10004
10005 <method name="captureHostDrive">
10006 <desc>Captures the specified host floppy drive.</desc>
10007 <param name="drive" type="IHostFloppyDrive" dir="in"/>
10008 </method>
10009
10010 <method name="unmount">
10011 <desc>Unmounts the currently mounted image or host drive.</desc>
10012 </method>
10013
10014 <method name="getImage">
10015 <desc>Returns the currently mounted floppy image.</desc>
10016 <param name="image" type="IFloppyImage" dir="return"/>
10017 </method>
10018
10019 <method name="getHostDrive">
10020 <desc>Returns the currently mounted host floppy drive.</desc>
10021 <param name="drive" type="IHostFloppyDrive" dir="return"/>
10022 </method>
10023
10024 </interface>
10025
10026
10027 <!--
10028 // IKeyboard
10029 /////////////////////////////////////////////////////////////////////////
10030 -->
10031
10032 <interface
10033 name="IKeyboard" extends="$unknown"
10034 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10035 wsmap="managed"
10036 >
10037 <desc>
10038 The IKeyboard interface represents the virtual machine's keyboard. Used
10039 in <link to="IConsole::keyboard"/>.
10040
10041 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10042 to the virtual machine.
10043
10044 </desc>
10045 <method name="putScancode">
10046 <desc>Sends a scancode to the keyboard.
10047
10048 <result name="VBOX_E_IPRT_ERROR">
10049 Could not send scan code to virtual keyboard.
10050 </result>
10051
10052 </desc>
10053 <param name="scancode" type="long" dir="in"/>
10054 </method>
10055
10056 <method name="putScancodes">
10057 <desc>Sends an array of scancodes to the keyboard.
10058
10059 <result name="VBOX_E_IPRT_ERROR">
10060 Could not send all scan codes to virtual keyboard.
10061 </result>
10062
10063 </desc>
10064 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10065 <param name="codesStored" type="unsigned long" dir="return"/>
10066 </method>
10067
10068 <method name="putCAD">
10069 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10070 function is nothing special, it is just a convenience function
10071 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10072
10073 <result name="VBOX_E_IPRT_ERROR">
10074 Could not send all scan codes to virtual keyboard.
10075 </result>
10076
10077 </desc>
10078 </method>
10079
10080 </interface>
10081
10082
10083 <!--
10084 // IMouse
10085 /////////////////////////////////////////////////////////////////////////
10086 -->
10087
10088 <enum
10089 name="MouseButtonState"
10090 uuid="03131722-2EC5-4173-9794-0DACA46673EF"
10091 >
10092 <desc>
10093 Mouse button state.
10094 </desc>
10095
10096 <const name="LeftButton" value="0x01"/>
10097 <const name="RightButton" value="0x02"/>
10098 <const name="MiddleButton" value="0x04"/>
10099 <const name="WheelUp" value="0x08"/>
10100 <const name="WheelDown" value="0x10"/>
10101 <const name="MouseStateMask" value="0x1F"/>
10102 </enum>
10103
10104 <interface
10105 name="IMouse" extends="$unknown"
10106 uuid="FD443EC1-0006-4F5B-9282-D72760A66916"
10107 wsmap="managed"
10108 >
10109 <desc>
10110 The IMouse interface represents the virtual machine's mouse. Used in
10111 <link to="IConsole::mouse"/>.
10112
10113 Through this interface, the virtual machine's virtual mouse can be
10114 controlled.
10115 </desc>
10116
10117 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10118 <desc>
10119 Whether the guest OS supports absolute mouse pointer positioning
10120 or not.
10121 <note>
10122 VirtualBox Guest Tools need to be installed to the guest OS
10123 in order to enable absolute mouse positioning support.
10124 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10125 callback to be instantly informed about changes of this attribute
10126 during virtual machine execution.
10127 </note>
10128 <see><link to="#putMouseEventAbsolute"/></see>
10129 </desc>
10130 </attribute>
10131
10132 <method name="putMouseEvent">
10133 <desc>
10134 Initiates a mouse event using relative pointer movements
10135 along x and y axis.
10136
10137 <result name="E_ACCESSDENIED">
10138 Console not powered up.
10139 </result>
10140 <result name="VBOX_E_IPRT_ERROR">
10141 Could not send mouse event to virtual mouse.
10142 </result>
10143
10144 </desc>
10145
10146 <param name="dx" type="long" dir="in">
10147 <desc>
10148 Amount of pixels the mouse should move to the right.
10149 Negative values move the mouse to the left.
10150 </desc>
10151 </param>
10152 <param name="dy" type="long" dir="in">
10153 <desc>
10154 Amount of pixels the mouse should move downwards.
10155 Negative values move the mouse upwards.
10156 </desc>
10157 </param>
10158 <param name="dz" type="long" dir="in">
10159 <desc>
10160 Amount of mouse wheel moves.
10161 Positive values describe clockwise wheel rotations,
10162 negative values describe counterclockwise rotations.
10163 </desc>
10164 </param>
10165 <param name="buttonState" type="long" dir="in">
10166 <desc>
10167 The current state of mouse buttons. Every bit represents
10168 a mouse button as follows:
10169 <table>
10170 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10171 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10172 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10173 </table>
10174 A value of <tt>1</tt> means the corresponding button is pressed.
10175 otherwise it is released.
10176 </desc>
10177 </param>
10178 </method>
10179
10180 <method name="putMouseEventAbsolute">
10181 <desc>
10182 Positions the mouse pointer using absolute x and y coordinates.
10183 These coordinates are expressed in pixels and
10184 start from <tt>[1,1]</tt> which corresponds to the top left
10185 corner of the virtual display.
10186
10187 <result name="E_ACCESSDENIED">
10188 Console not powered up.
10189 </result>
10190 <result name="VBOX_E_IPRT_ERROR">
10191 Could not send mouse event to virtual mouse.
10192 </result>
10193
10194 <note>
10195 This method will have effect only if absolute mouse
10196 positioning is supported by the guest OS.
10197 </note>
10198
10199 <see><link to="#absoluteSupported"/></see>
10200 </desc>
10201
10202 <param name="x" type="long" dir="in">
10203 <desc>
10204 X coordinate of the pointer in pixels, starting from <tt>1</tt>.
10205 </desc>
10206 </param>
10207 <param name="y" type="long" dir="in">
10208 <desc>
10209 Y coordinate of the pointer in pixels, starting from <tt>1</tt>.
10210 </desc>
10211 </param>
10212 <param name="dz" type="long" dir="in">
10213 <desc>
10214 Amount of mouse wheel moves.
10215 Positive values describe clockwise wheel rotations,
10216 negative values describe counterclockwise rotations.
10217 </desc>
10218 </param>
10219 <param name="buttonState" type="long" dir="in">
10220 <desc>
10221 The current state of mouse buttons. Every bit represents
10222 a mouse button as follows:
10223 <table>
10224 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10225 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10226 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10227 </table>
10228 A value of <tt>1</tt> means the corresponding button is pressed.
10229 otherwise it is released.
10230 </desc>
10231 </param>
10232 </method>
10233
10234 </interface>
10235
10236 <!--
10237 // IDisplay
10238 /////////////////////////////////////////////////////////////////////////
10239 -->
10240
10241 <enum
10242 name="FramebufferAccelerationOperation"
10243 uuid="f0e5ebbe-dc8e-4e2d-916e-53baa3844df8"
10244 >
10245 <desc>
10246 Frame buffer acceleration operation.
10247 </desc>
10248
10249 <const name="SolidFillAcceleration" value="1"/>
10250 <const name="ScreenCopyAcceleration" value="2"/>
10251 </enum>
10252
10253 <enum
10254 name="FramebufferPixelFormat"
10255 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10256 >
10257 <desc>
10258 Format of the video memory buffer. Constants represented by this enum can
10259 be used to test for particular values of <link
10260 to="IFramebuffer::pixelFormat"/>. See also <link
10261 to="IFramebuffer::requestResize"/>.
10262
10263 See also www.fourcc.org for more information about FOURCC pixel formats.
10264 </desc>
10265
10266 <const name="Opaque" value="0">
10267 <desc>
10268 Unknown buffer format (the user may not assume any particular format of
10269 the buffer).
10270 </desc>
10271 </const>
10272 <const name="FOURCC_RGB" value="0x32424752">
10273 <desc>
10274 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10275 bit layout).
10276 </desc>
10277 </const>
10278 </enum>
10279
10280 <interface
10281 name="IFramebuffer" extends="$unknown"
10282 uuid="af431304-5b09-40e2-94da-3c3cb03822c1"
10283 wsmap="suppress"
10284 >
10285 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10286 <desc>Address of the start byte of the frame buffer.</desc>
10287 </attribute>
10288
10289 <attribute name="width" type="unsigned long" readonly="yes">
10290 <desc>Frame buffer width, in pixels.</desc>
10291 </attribute>
10292
10293 <attribute name="height" type="unsigned long" readonly="yes">
10294 <desc>Frame buffer height, in pixels.</desc>
10295 </attribute>
10296
10297 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10298 <desc>
10299 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10300 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10301 are: 8, 15, 16, 24 and 32.
10302 </desc>
10303 </attribute>
10304
10305 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10306 <desc>
10307 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10308 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10309 size of the scan line must be aligned to 32 bits.
10310 </desc>
10311 </attribute>
10312
10313 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10314 <desc>
10315 Frame buffer pixel format. It's either one of the values defined by <link
10316 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10317 <note>
10318 This attribute must never return <link
10319 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10320 <link to="#address"/> points to must be always known.
10321 </note>
10322 </desc>
10323 </attribute>
10324
10325 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10326 <desc>
10327 Defines whether this frame buffer uses the virtual video card's memory
10328 buffer (guest VRAM) directly or not. See <link
10329 to="IFramebuffer::requestResize"/> for more information.
10330 </desc>
10331 </attribute>
10332
10333 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10334 <desc>
10335 Hint from the frame buffer about how much of the standard
10336 screen height it wants to use for itself. This information is
10337 exposed to the guest through the VESA BIOS and VMMDev interface
10338 so that it can use it for determining its video mode table. It
10339 is not guaranteed that the guest respects the value.
10340 </desc>
10341 </attribute>
10342
10343 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10344 <desc>
10345 An alpha-blended overlay which is superposed over the frame buffer.
10346 The initial purpose is to allow the display of icons providing
10347 information about the VM state, including disk activity, in front
10348 ends which do not have other means of doing that. The overlay is
10349 designed to controlled exclusively by IDisplay. It has no locking
10350 of its own, and any changes made to it are not guaranteed to be
10351 visible until the affected portion of IFramebuffer is updated. The
10352 overlay can be created lazily the first time it is requested. This
10353 attribute can also return NULL to signal that the overlay is not
10354 implemented.
10355 </desc>
10356 </attribute>
10357
10358 <attribute name="winId" type="unsigned long long" readonly="yes">
10359 <desc>
10360 Platform-dependent identifier of the window where context of this
10361 frame buffer is drawn, or zero if there's no such window.
10362 </desc>
10363 </attribute>
10364
10365 <method name="lock">
10366 <desc>
10367 Locks the frame buffer.
10368 Gets called by the IDisplay object where this frame buffer is
10369 bound to.
10370 </desc>
10371 </method>
10372
10373 <method name="unlock">
10374 <desc>
10375 Unlocks the frame buffer.
10376 Gets called by the IDisplay object where this frame buffer is
10377 bound to.
10378 </desc>
10379 </method>
10380
10381 <method name="notifyUpdate">
10382 <desc>
10383 Informs about an update.
10384 Gets called by the display object where this buffer is
10385 registered.
10386 </desc>
10387 <param name="x" type="unsigned long" dir="in"/>
10388 <param name="y" type="unsigned long" dir="in"/>
10389 <param name="width" type="unsigned long" dir="in"/>
10390 <param name="height" type="unsigned long" dir="in"/>
10391 <param name="finished" type="boolean" dir="return"/>
10392 </method>
10393
10394 <method name="requestResize">
10395 <desc>
10396 Requests a size and pixel format change.
10397
10398 There are two modes of working with the video buffer of the virtual
10399 machine. The <i>indirect</i> mode implies that the IFramebuffer
10400 implementation allocates a memory buffer for the requested display mode
10401 and provides it to the virtual machine. In <i>direct</i> mode, the
10402 IFramebuffer implementation uses the memory buffer allocated and owned
10403 by the virtual machine. This buffer represents the video memory of the
10404 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10405 usually faster because the implementation gets a raw pointer to the
10406 guest VRAM buffer which it can directly use for visualizing the contents
10407 of the virtual display, as opposed to the indirect mode where the
10408 contents of guest VRAM are copied to the memory buffer provided by
10409 the implementation every time a display update occurs.
10410
10411 It is important to note that the direct mode is really fast only when
10412 the implementation uses the given guest VRAM buffer directly, for
10413 example, by blitting it to the window representing the virtual machine's
10414 display, which saves at least one copy operation comparing to the
10415 indirect mode. However, using the guest VRAM buffer directly is not
10416 always possible: the format and the color depth of this buffer may be
10417 not supported by the target window, or it may be unknown (opaque) as in
10418 case of text or non-linear multi-plane VGA video modes. In this case,
10419 the indirect mode (that is always available) should be used as a
10420 fallback: when the guest VRAM contents are copied to the
10421 implementation-provided memory buffer, color and format conversion is
10422 done automatically by the underlying code.
10423
10424 The @a pixelFormat parameter defines whether the direct mode is
10425 available or not. If @a pixelFormat is <link
10426 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10427 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10428 @a bytesPerLine parameters must be ignored and the implementation must use
10429 the indirect mode (where it provides its own buffer in one of the
10430 supported formats). In all other cases, @a pixelFormat together with
10431 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10432 buffer pointed to by the @a VRAM parameter and the implementation is
10433 free to choose which mode to use. To indicate that this frame buffer uses
10434 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10435 attribute must return <tt>true</tt> and <link to="#address"/> must
10436 return exactly the same address that is passed in the @a VRAM parameter
10437 of this method; otherwise it is assumed that the indirect strategy is
10438 chosen.
10439
10440 The @a width and @a height parameters represent the size of the
10441 requested display mode in both modes. In case of indirect mode, the
10442 provided memory buffer should be big enough to store data of the given
10443 display mode. In case of direct mode, it is guaranteed that the given
10444 @a VRAM buffer contains enough space to represent the display mode of the
10445 given size. Note that this frame buffer's <link to="#width"/> and <link
10446 to="#height"/> attributes must return exactly the same values as
10447 passed to this method after the resize is completed (see below).
10448
10449 The @a finished output parameter determines if the implementation has
10450 finished resizing the frame buffer or not. If, for some reason, the
10451 resize cannot be finished immediately during this call, @a finished
10452 must be set to @c false, and the implementation must call
10453 <link to="IDisplay::resizeCompleted"/> after it has returned from
10454 this method as soon as possible. If @a finished is @c false, the
10455 machine will not call any frame buffer methods until
10456 <link to="IDisplay::resizeCompleted"/> is called.
10457
10458 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10459 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10460 this frame buffer must return exactly the same values as specified in the
10461 parameters of this method, after the resize is completed. If the
10462 indirect mode is chosen, these attributes must return values describing
10463 the format of the implementation's own memory buffer <link
10464 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10465 value must always correlate with <link to="#pixelFormat"/>. Note that
10466 the <link to="#pixelFormat"/> attribute must never return <link
10467 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10468
10469 <note>
10470 This method is called by the IDisplay object under the
10471 <link to="#lock"/> provided by this IFramebuffer
10472 implementation. If this method returns @c false in @a finished, then
10473 this lock is not released until
10474 <link to="IDisplay::resizeCompleted"/> is called.
10475 </note>
10476 </desc>
10477 <param name="screenId" type="unsigned long" dir="in">
10478 <desc>
10479 Logical screen number. Must be used in the corresponding call to
10480 <link to="IDisplay::resizeCompleted"/> if this call is made.
10481 </desc>
10482 </param>
10483 <param name="pixelFormat" type="unsigned long" dir="in">
10484 <desc>
10485 Pixel format of the memory buffer pointed to by @a VRAM.
10486 See also <link to="FramebufferPixelFormat"/>.
10487 </desc>
10488 </param>
10489 <param name="VRAM" type="octet" mod="ptr" dir="in">
10490 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10491 </param>
10492 <param name="bitsPerPixel" type="unsigned long" dir="in">
10493 <desc>Color depth, bits per pixel.</desc>
10494 </param>
10495 <param name="bytesPerLine" type="unsigned long" dir="in">
10496 <desc>Size of one scan line, in bytes.</desc>
10497 </param>
10498 <param name="width" type="unsigned long" dir="in">
10499 <desc>Width of the guest display, in pixels.</desc>
10500 </param>
10501 <param name="height" type="unsigned long" dir="in">
10502 <desc>Height of the guest display, in pixels.</desc>
10503 </param>
10504 <param name="finished" type="boolean" dir="return">
10505 <desc>
10506 Can the VM start using the new frame buffer immediately
10507 after this method returns or it should wait for
10508 <link to="IDisplay::resizeCompleted"/>.
10509 </desc>
10510 </param>
10511 </method>
10512
10513 <method name="operationSupported">
10514 <desc>
10515 Returns whether the given acceleration operation is supported
10516 by the IFramebuffer implementation. If not, the display object
10517 will not attempt to call the corresponding IFramebuffer entry
10518 point. Even if an operation is indicated as supported, the
10519 IFramebuffer implementation always has the option to return non
10520 supported from the corresponding acceleration method in which
10521 case the operation will be performed by the display engine. This
10522 allows for reduced IFramebuffer implementation complexity where
10523 only common cases are handled.
10524 </desc>
10525 <param name="operation" type="FramebufferAccelerationOperation" dir="in"/>
10526 <param name="supported" type="boolean" dir="return"/>
10527 </method>
10528
10529 <method name="videoModeSupported">
10530 <desc>
10531 Returns whether the frame buffer implementation is willing to
10532 support a given video mode. In case it is not able to render
10533 the video mode (or for some reason not willing), it should
10534 return false. Usually this method is called when the guest
10535 asks the VMM device whether a given video mode is supported
10536 so the information returned is directly exposed to the guest.
10537 It is important that this method returns very quickly.
10538 </desc>
10539 <param name="width" type="unsigned long" dir="in"/>
10540 <param name="height" type="unsigned long" dir="in"/>
10541 <param name="bpp" type="unsigned long" dir="in"/>
10542 <param name="supported" type="boolean" dir="return"/>
10543 </method>
10544
10545 <method name="solidFill">
10546 <desc>
10547 Fills the specified rectangle on screen with a solid color.
10548 </desc>
10549 <param name="x" type="unsigned long" dir="in"/>
10550 <param name="y" type="unsigned long" dir="in"/>
10551 <param name="width" type="unsigned long" dir="in"/>
10552 <param name="height" type="unsigned long" dir="in"/>
10553 <param name="color" type="unsigned long" dir="in"/>
10554 <param name="handled" type="boolean" dir="return"/>
10555 </method>
10556
10557 <method name="copyScreenBits">
10558 <desc>
10559 Copies specified rectangle on the screen.
10560 </desc>
10561 <param name="xDst" type="unsigned long" dir="in"/>
10562 <param name="yDst" type="unsigned long" dir="in"/>
10563 <param name="xSrc" type="unsigned long" dir="in"/>
10564 <param name="ySrc" type="unsigned long" dir="in"/>
10565 <param name="width" type="unsigned long" dir="in"/>
10566 <param name="height" type="unsigned long" dir="in"/>
10567 <param name="handled" type="boolean" dir="return"/>
10568 </method>
10569
10570 <method name="getVisibleRegion">
10571 <desc>
10572 Returns the visible region of this frame buffer.
10573
10574 If the @a rectangles parameter is <tt>NULL</tt> then the value of the
10575 @a count parameter is ignored and the number of elements necessary to
10576 describe the current visible region is returned in @a countCopied.
10577
10578 If @a rectangles is not <tt>NULL</tt> but @a count is less
10579 than the required number of elements to store region data, the method
10580 will report a failure. If @a count is equal or greater than the
10581 required number of elements, then the actual number of elements copied
10582 to the provided array will be returned in @a countCopied.
10583
10584 <note>
10585 The address of the provided array must be in the process space of
10586 this IFramebuffer object.
10587 </note>
10588 <note>
10589 Method not yet implemented.
10590 </note>
10591 </desc>
10592 <param name="rectangles" type="octet" mod="ptr" dir="in">
10593 <desc>Pointer to the <tt>RTRECT</tt> array to receive region data.</desc>
10594 </param>
10595 <param name="count" type="unsigned long" dir="in">
10596 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10597 </param>
10598 <param name="countCopied" type="unsigned long" dir="return">
10599 <desc>Number of elements copied to the @a rectangles array.</desc>
10600 </param>
10601 </method>
10602
10603 <method name="setVisibleRegion">
10604 <desc>
10605 Suggests a new visible region to this frame buffer. This region
10606 represents the area of the VM display which is a union of regions of
10607 all top-level windows of the guest operating system running inside the
10608 VM (if the Guest Additions for this system support this
10609 functionality). This information may be used by the frontends to
10610 implement the seamless desktop integration feature.
10611
10612 <note>
10613 The address of the provided array must be in the process space of
10614 this IFramebuffer object.
10615 </note>
10616 <note>
10617 The IFramebuffer implementation must make a copy of the provided
10618 array of rectangles.
10619 </note>
10620 <note>
10621 Method not yet implemented.
10622 </note>
10623 </desc>
10624 <param name="rectangles" type="octet" mod="ptr" dir="in">
10625 <desc>Pointer to the <tt>RTRECT</tt> array.</desc>
10626 </param>
10627 <param name="count" type="unsigned long" dir="in">
10628 <desc>Number of <tt>RTRECT</tt> elements in the @a rectangles array.</desc>
10629 </param>
10630 </method>
10631
10632 </interface>
10633
10634 <interface
10635 name="IFramebufferOverlay" extends="IFramebuffer"
10636 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10637 wsmap="suppress"
10638 >
10639 <desc>
10640 The IFramebufferOverlay interface represents an alpha blended overlay
10641 for displaying status icons above an IFramebuffer. It is always created
10642 not visible, so that it must be explicitly shown. It only covers a
10643 portion of the IFramebuffer, determined by its width, height and
10644 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10645 that order) format, and may be written to directly. Do re-read the
10646 width though, after setting it, as it may be adjusted (increased) to
10647 make it more suitable for the front end.
10648 </desc>
10649 <attribute name="x" type="unsigned long" readonly="yes">
10650 <desc>X position of the overlay, relative to the frame buffer.</desc>
10651 </attribute>
10652
10653 <attribute name="y" type="unsigned long" readonly="yes">
10654 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10655 </attribute>
10656
10657 <attribute name="visible" type="boolean" readonly="no">
10658 <desc>
10659 Whether the overlay is currently visible.
10660 </desc>
10661 </attribute>
10662
10663 <attribute name="alpha" type="unsigned long" readonly="no">
10664 <desc>
10665 The global alpha value for the overlay. This may or may not be
10666 supported by a given front end.
10667 </desc>
10668 </attribute>
10669
10670 <method name="move">
10671 <desc>
10672 Changes the overlay's position relative to the IFramebuffer.
10673 </desc>
10674 <param name="x" type="unsigned long" dir="in"/>
10675 <param name="y" type="unsigned long" dir="in"/>
10676 </method>
10677
10678 </interface>
10679
10680 <interface
10681 name="IDisplay" extends="$unknown"
10682 uuid="09789f63-4525-48e5-a5e4-1080453b0eab"
10683 wsmap="suppress"
10684 >
10685 <desc>
10686 The IDisplay interface represents the virtual machine's display.
10687
10688 The object implementing this interface is contained in each
10689 <link to="IConsole::display"/> attribute and represents the visual
10690 output of the virtual machine.
10691
10692 The virtual display supports pluggable output targets represented by the
10693 IFramebuffer interface. Examples of the output target are a window on
10694 the host computer or an RDP session's display on a remote computer.
10695 </desc>
10696 <attribute name="width" type="unsigned long" readonly="yes">
10697 <desc>Current display width.</desc>
10698 </attribute>
10699
10700 <attribute name="height" type="unsigned long" readonly="yes">
10701 <desc>Current display height.</desc>
10702 </attribute>
10703
10704 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10705 <desc>
10706 Current guest display color depth. Note that this may differ
10707 from <link to="IFramebuffer::bitsPerPixel"/>.
10708 </desc>
10709 </attribute>
10710
10711 <method name="setupInternalFramebuffer">
10712 <desc>
10713 Prepares an internally managed frame buffer.
10714 </desc>
10715 <param name="depth" type="unsigned long" dir="in"/>
10716 </method>
10717
10718 <method name="lockFramebuffer">
10719 <desc>
10720 Requests access to the internal frame buffer.
10721
10722 <result name="VBOX_E_NOT_SUPPORTED">
10723 Attempt to lock a non-internal frame buffer.
10724 </result>
10725
10726 </desc>
10727 <param name="address" type="octet" mod="ptr" dir="return"/>
10728 </method>
10729
10730 <method name="unlockFramebuffer">
10731 <desc>
10732 Releases access to the internal frame buffer.
10733
10734 <result name="VBOX_E_NOT_SUPPORTED">
10735 Attempt to unlock a non-internal frame buffer.
10736 </result>
10737
10738 </desc>
10739 </method>
10740
10741 <method name="registerExternalFramebuffer">
10742 <desc>
10743 Registers an external frame buffer.
10744 </desc>
10745 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10746 </method>
10747
10748 <method name="setFramebuffer">
10749 <desc>
10750 Sets the framebuffer for given screen.
10751 </desc>
10752 <param name="screenId" type="unsigned long" dir="in"/>
10753 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10754 </method>
10755
10756 <method name="getFramebuffer">
10757 <desc>
10758 Queries the framebuffer for given screen.
10759 </desc>
10760 <param name="screenId" type="unsigned long" dir="in"/>
10761 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10762 <param name="xOrigin" type="long" dir="out"/>
10763 <param name="yOrigin" type="long" dir="out"/>
10764 </method>
10765
10766 <method name="setVideoModeHint">
10767 <desc>
10768 Asks VirtualBox to request the given video mode from
10769 the guest. This is just a hint and it cannot be guaranteed
10770 that the requested resolution will be used. Guest Additions
10771 are required for the request to be seen by guests. The caller
10772 should issue the request and wait for a resolution change and
10773 after a timeout retry.
10774
10775 Specifying <tt>0</tt> for either @a width, @a height or @a bitsPerPixel
10776 parameters means that the corresponding values should be taken from the
10777 current video mode (i.e. left unchanged).
10778
10779 If the guest OS supports multi-monitor configuration then the @a display
10780 parameter specifies the number of the guest display to send the hint to:
10781 <tt>0</tt> is the primary display, <tt>1</tt> is the first secondary and
10782 so on. If the multi-monitor configuration is not supported, @a display
10783 must be <tt>0</tt>.
10784
10785 <result name="E_INVALIDARG">
10786 The @a display is not associated with any monitor.
10787 </result>
10788
10789 </desc>
10790 <param name="width" type="unsigned long" dir="in"/>
10791 <param name="height" type="unsigned long" dir="in"/>
10792 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10793 <param name="display" type="unsigned long" dir="in"/>
10794 </method>
10795
10796 <method name="setSeamlessMode">
10797 <desc>
10798 Enables or disables seamless guest display rendering (seamless desktop
10799 integration) mode.
10800 <note>
10801 Calling this method has no effect if <link
10802 to="IGuest::supportsSeamless"/> returns <tt>false</tt>.
10803 </note>
10804 </desc>
10805 <param name="enabled" type="boolean" dir="in"/>
10806 </method>
10807
10808 <method name="takeScreenShot">
10809 <desc>
10810 Takes a screen shot of the requested size and copies it to the
10811 32-bpp buffer allocated by the caller.
10812
10813 <result name="E_NOTIMPL">
10814 Feature not implemented.
10815 </result>
10816 <result name="VBOX_E_IPRT_ERROR">
10817 Could not take a screenshot.
10818 </result>
10819
10820 </desc>
10821 <param name="address" type="octet" mod="ptr" dir="in"/>
10822 <param name="width" type="unsigned long" dir="in"/>
10823 <param name="height" type="unsigned long" dir="in"/>
10824 </method>
10825
10826 <method name="drawToScreen">
10827 <desc>
10828 Draws a 32-bpp image of the specified size from the given buffer
10829 to the given point on the VM display.
10830
10831 <result name="E_NOTIMPL">
10832 Feature not implemented.
10833 </result>
10834 <result name="VBOX_E_IPRT_ERROR">
10835 Could not draw to screen.
10836 </result>
10837
10838 </desc>
10839 <param name="address" type="octet" mod="ptr" dir="in"/>
10840 <param name="x" type="unsigned long" dir="in"/>
10841 <param name="y" type="unsigned long" dir="in"/>
10842 <param name="width" type="unsigned long" dir="in"/>
10843 <param name="height" type="unsigned long" dir="in"/>
10844 </method>
10845
10846 <method name="invalidateAndUpdate">
10847 <desc>
10848 Does a full invalidation of the VM display and instructs the VM
10849 to update it.
10850
10851 <result name="VBOX_E_IPRT_ERROR">
10852 Could not invalidate and update screen.
10853 </result>
10854
10855 </desc>
10856 </method>
10857
10858 <method name="resizeCompleted">
10859 <desc>
10860 Signals that a framebuffer has completed the resize operation.
10861
10862 <result name="VBOX_E_NOT_SUPPORTED">
10863 Operation only valid for external frame buffers.
10864 </result>
10865
10866 </desc>
10867 <param name="screenId" type="unsigned long" dir="in"/>
10868 </method>
10869
10870 <method name="updateCompleted">
10871 <desc>
10872 Signals that a framebuffer has completed the update operation.
10873
10874 <result name="VBOX_E_NOT_SUPPORTED">
10875 Operation only valid for external frame buffers.
10876 </result>
10877
10878 </desc>
10879 </method>
10880
10881 </interface>
10882
10883 <!--
10884 // INetworkAdapter
10885 /////////////////////////////////////////////////////////////////////////
10886 -->
10887
10888 <enum
10889 name="NetworkAttachmentType"
10890 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10891 >
10892 <desc>
10893 Network attachment type.
10894 </desc>
10895
10896 <const name="Null" value="0">
10897 <desc>Null value, also means "not attached".</desc>
10898 </const>
10899 <const name="NAT" value="1"/>
10900 <const name="Bridged" value="2"/>
10901 <const name="Internal" value="3"/>
10902 <const name="HostOnly" value="4"/>
10903 </enum>
10904
10905 <enum
10906 name="NetworkAdapterType"
10907 uuid="50c3dfd8-07ac-4a31-baac-519c828fbf97"
10908 >
10909 <desc>
10910 Network adapter type.
10911 </desc>
10912
10913 <const name="Null" value="0">
10914 <desc>Null value (never used by the API).</desc>
10915 </const>
10916 <const name="Am79C970A" value="1">
10917 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10918 </const>
10919 <const name="Am79C973" value="2">
10920 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10921 </const>
10922 <const name="I82540EM" value="3">
10923 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10924 </const>
10925 <const name="I82543GC" value="4">
10926 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10927 </const>
10928 <const name="I82545EM" value="5">
10929 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10930 </const>
10931 </enum>
10932
10933 <interface
10934 name="INetworkAdapter" extends="$unknown"
10935 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10936 wsmap="managed"
10937 >
10938 <desc>
10939 Represents a virtual network adapter that is attached to a virtual machine.
10940 Each virtual machine has a fixed number of network adapter slots with one
10941 instance of this attached to each of them. Call
10942 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10943 is attached to a given slot in a given machine.
10944
10945 Each network adapter can be in one of five attachment modes, which are
10946 represented by the <link to="NetworkAttachmentType" /> enumeration;
10947 see the <link to="#attachmentType" /> attribute.
10948 </desc>
10949
10950 <attribute name="adapterType" type="NetworkAdapterType">
10951 <desc>
10952 Type of the virtual network adapter. Depending on this value,
10953 VirtualBox will provide a different virtual network hardware
10954 to the guest.
10955 </desc>
10956 </attribute>
10957
10958 <attribute name="slot" type="unsigned long" readonly="yes">
10959 <desc>
10960 Slot number this adapter is plugged into. Corresponds to
10961 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10962 to obtain this instance.
10963 </desc>
10964 </attribute>
10965
10966 <attribute name="enabled" type="boolean">
10967 <desc>
10968 Flag whether the network adapter is present in the
10969 guest system. If disabled, the virtual guest hardware will
10970 not contain this network adapter. Can only be changed when
10971 the VM is not running.
10972 </desc>
10973 </attribute>
10974
10975 <attribute name="MACAddress" type="wstring">
10976 <desc>
10977 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10978 it to NULL, VirtualBox will generate a unique MAC address.
10979 </desc>
10980 </attribute>
10981
10982 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10983
10984 <attribute name="hostInterface" type="wstring">
10985 <desc>
10986 Name of the host network interface the VM is attached to.
10987 </desc>
10988 </attribute>
10989
10990 <attribute name="internalNetwork" type="wstring">
10991 <desc>
10992 Name of the internal network the VM is attached to.
10993 </desc>
10994 </attribute>
10995
10996 <attribute name="NATNetwork" type="wstring">
10997 <desc>
10998 Name of the NAT network the VM is attached to.
10999 </desc>
11000 </attribute>
11001
11002 <attribute name="cableConnected" type="boolean">
11003 <desc>
11004 Flag whether the adapter reports the cable as connected or not.
11005 It can be used to report offline situations to a VM.
11006 </desc>
11007 </attribute>
11008
11009 <attribute name="lineSpeed" type="unsigned long">
11010 <desc>
11011 Line speed reported by custom drivers, in units of 1 kbps.
11012 </desc>
11013 </attribute>
11014
11015 <attribute name="traceEnabled" type="boolean">
11016 <desc>
11017 Flag whether network traffic from/to the network card should be traced.
11018 Can only be toggled when the VM is turned off.
11019 </desc>
11020 </attribute>
11021
11022 <attribute name="traceFile" type="wstring">
11023 <desc>
11024 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11025 will be used.
11026 </desc>
11027 </attribute>
11028
11029 <method name="attachToNAT">
11030 <desc>
11031 Attach the network adapter to the Network Address Translation (NAT) interface.
11032 </desc>
11033 </method>
11034
11035 <method name="attachToBridgedInterface">
11036 <desc>
11037 Attach the network adapter to a bridged host interface.
11038 </desc>
11039 </method>
11040
11041 <method name="attachToInternalNetwork">
11042 <desc>
11043 Attach the network adapter to an internal network.
11044 </desc>
11045 </method>
11046
11047 <method name="attachToHostOnlyInterface">
11048 <desc>
11049 Attach the network adapter to the host-only network.
11050 </desc>
11051 </method>
11052
11053 <method name="detach">
11054 <desc>
11055 Detach the network adapter
11056 </desc>
11057 </method>
11058 </interface>
11059
11060
11061 <!--
11062 // ISerialPort
11063 /////////////////////////////////////////////////////////////////////////
11064 -->
11065
11066 <enum
11067 name="PortMode"
11068 uuid="b266f43c-2e93-46b3-812b-c20e600e867b"
11069 >
11070 <desc>
11071 The PortMode enumeration represents possible communication modes for
11072 the virtual serial port device.
11073 </desc>
11074
11075 <const name="Disconnected" value="0">
11076 <desc>Virtual device is not attached to any real host device.</desc>
11077 </const>
11078 <const name="HostPipe" value="1">
11079 <desc>Virtual device is attached to a host pipe.</desc>
11080 </const>
11081 <const name="HostDevice" value="2">
11082 <desc>Virtual device is attached to a host device.</desc>
11083 </const>
11084 </enum>
11085
11086 <interface
11087 name="ISerialPort" extends="$unknown"
11088 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11089 wsmap="managed"
11090 >
11091
11092 <desc>
11093 The ISerialPort interface represents the virtual serial port device.
11094
11095 The virtual serial port device acts like an ordinary serial port
11096 inside the virtual machine. This device communicates to the real
11097 serial port hardware in one of two modes: host pipe or host device.
11098
11099 In host pipe mode, the #path attribute specifies the path to the pipe on
11100 the host computer that represents a serial port. The #server attribute
11101 determines if this pipe is created by the virtual machine process at
11102 machine startup or it must already exist before starting machine
11103 execution.
11104
11105 In host device mode, the #path attribute specifies the name of the
11106 serial port device on the host computer.
11107
11108 There is also a third communication mode: the disconnected mode. In this
11109 mode, the guest OS running inside the virtual machine will be able to
11110 detect the serial port, but all port write operations will be discarded
11111 and all port read operations will return no data.
11112
11113 <see>IMachine::getSerialPort</see>
11114 </desc>
11115
11116 <attribute name="slot" type="unsigned long" readonly="yes">
11117 <desc>
11118 Slot number this serial port is plugged into. Corresponds to
11119 the value you pass to <link to="IMachine::getSerialPort"/>
11120 to obtain this instance.
11121 </desc>
11122 </attribute>
11123
11124 <attribute name="enabled" type="boolean">
11125 <desc>
11126 Flag whether the serial port is enabled. If disabled,
11127 the serial port will not be reported to the guest OS.
11128 </desc>
11129 </attribute>
11130
11131 <attribute name="IOBase" type="unsigned long">
11132 <desc>Base I/O address of the serial port.</desc>
11133 </attribute>
11134
11135 <attribute name="IRQ" type="unsigned long">
11136 <desc>IRQ number of the serial port.</desc>
11137 </attribute>
11138
11139 <attribute name="hostMode" type="PortMode">
11140 <desc>
11141 How is this port connected to the host.
11142 <note>
11143 Changing this attribute may fail if the conditions for
11144 <link to="#path"/> are not met.
11145 </note>
11146 </desc>
11147 </attribute>
11148
11149 <attribute name="server" type="boolean">
11150 <desc>
11151 Flag whether this serial port acts as a server (creates a new pipe on
11152 the host) or as a client (uses the existing pipe). This attribute is
11153 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11154 </desc>
11155 </attribute>
11156
11157 <attribute name="path" type="wstring">
11158 <desc>
11159 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11160 PortMode_HostPipe, or the host serial device name when
11161 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11162 cases, setting a @c null or empty string as the attribute's value
11163 is an error. Otherwise, the value of this property is ignored.
11164 </desc>
11165 </attribute>
11166
11167 </interface>
11168
11169 <!--
11170 // IParallelPort
11171 /////////////////////////////////////////////////////////////////////////
11172 -->
11173
11174 <interface
11175 name="IParallelPort" extends="$unknown"
11176 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11177 wsmap="managed"
11178 >
11179
11180 <desc>
11181 The IParallelPort interface represents the virtual parallel port device.
11182
11183 The virtual parallel port device acts like an ordinary parallel port
11184 inside the virtual machine. This device communicates to the real
11185 parallel port hardware using the name of the parallel device on the host
11186 computer specified in the #path attribute.
11187
11188 Each virtual parallel port device is assigned a base I/O address and an
11189 IRQ number that will be reported to the guest operating system and used
11190 to operate the given parallel port from within the virtual machine.
11191
11192 <see>IMachine::getParallelPort</see>
11193 </desc>
11194
11195 <attribute name="slot" type="unsigned long" readonly="yes">
11196 <desc>
11197 Slot number this parallel port is plugged into. Corresponds to
11198 the value you pass to <link to="IMachine::getParallelPort"/>
11199 to obtain this instance.
11200 </desc>
11201 </attribute>
11202
11203 <attribute name="enabled" type="boolean">
11204 <desc>
11205 Flag whether the parallel port is enabled. If disabled,
11206 the parallel port will not be reported to the guest OS.
11207 </desc>
11208 </attribute>
11209
11210 <attribute name="IOBase" type="unsigned long">
11211 <desc>Base I/O address of the parallel port.</desc>
11212 </attribute>
11213
11214 <attribute name="IRQ" type="unsigned long">
11215 <desc>IRQ number of the parallel port.</desc>
11216 </attribute>
11217
11218 <attribute name="path" type="wstring">
11219 <desc>
11220 Host parallel device name. If this parallel port is enabled, setting a
11221 @c null or an empty string as this attribute's value will result into
11222 an error.
11223 </desc>
11224 </attribute>
11225
11226 </interface>
11227
11228
11229 <!--
11230 // IMachineDebugger
11231 /////////////////////////////////////////////////////////////////////////
11232 -->
11233
11234 <interface
11235 name="IMachineDebugger" extends="$unknown"
11236 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11237 wsmap="suppress"
11238 >
11239 <method name="resetStats">
11240 <desc>
11241 Reset VM statistics.
11242 </desc>
11243 <param name="pattern" type="wstring" dir="in">
11244 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11245 </param>
11246 </method>
11247
11248 <method name="dumpStats">
11249 <desc>
11250 Dumps VM statistics.
11251 </desc>
11252 <param name="pattern" type="wstring" dir="in">
11253 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11254 </param>
11255 </method>
11256
11257 <method name="getStats">
11258 <desc>
11259 Get the VM statistics in a XMLish format.
11260 </desc>
11261 <param name="pattern" type="wstring" dir="in">
11262 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11263 </param>
11264 <param name="withDescriptions" type="boolean" dir="in">
11265 <desc>Whether to include the descriptions.</desc>
11266 </param>
11267 <param name="stats" type="wstring" dir="out">
11268 <desc>The XML document containing the statistics.</desc>
11269 </param>
11270 </method>
11271
11272 <method name="injectNMI">
11273 <desc>
11274 Inject an NMI into a running VT-x/AMD-V VM.
11275 </desc>
11276 </method>
11277
11278 <attribute name="singlestep" type="boolean">
11279 <desc>Switch for enabling singlestepping.</desc>
11280 </attribute>
11281
11282 <attribute name="recompileUser" type="boolean">
11283 <desc>Switch for forcing code recompilation for user mode code.</desc>
11284 </attribute>
11285
11286 <attribute name="recompileSupervisor" type="boolean">
11287 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11288 </attribute>
11289
11290 <attribute name="PATMEnabled" type="boolean">
11291 <desc>Switch for enabling and disabling the PATM component.</desc>
11292 </attribute>
11293
11294 <attribute name="CSAMEnabled" type="boolean">
11295 <desc>Switch for enabling and disabling the CSAM component.</desc>
11296 </attribute>
11297
11298 <attribute name="logEnabled" type="boolean">
11299 <desc>Switch for enabling and disabling logging.</desc>
11300 </attribute>
11301
11302 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11303 <desc>
11304 Flag indicating whether the VM is currently making use of CPU hardware
11305 virtualization extensions.
11306 </desc>
11307 </attribute>
11308
11309 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11310 <desc>
11311 Flag indicating whether the VM is currently making use of the nested paging
11312 CPU hardware virtualization extension.
11313 </desc>
11314 </attribute>
11315
11316 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11317 <desc>
11318 Flag indicating whether the VM is currently making use of the VPID
11319 VT-x extension.
11320 </desc>
11321 </attribute>
11322
11323 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11324 <desc>
11325 Flag indicating whether the VM is currently making use of the Physical
11326 Address Extension CPU feature.
11327 </desc>
11328 </attribute>
11329
11330 <attribute name="virtualTimeRate" type="unsigned long">
11331 <desc>
11332 The rate at which the virtual time runs expressed as a percentage.
11333 The accepted range is 2% to 20000%.
11334 </desc>
11335 </attribute>
11336
11337 <!-- @todo method for setting log flags, groups and destination! -->
11338
11339 <attribute name="VM" type="unsigned long long" readonly="yes">
11340 <desc>
11341 Gets the VM handle. This is only for internal use while
11342 we carve the details of this interface.
11343 </desc>
11344 </attribute>
11345
11346 </interface>
11347
11348 <!--
11349 // IUSBController
11350 /////////////////////////////////////////////////////////////////////////
11351 -->
11352
11353 <interface
11354 name="IUSBController" extends="$unknown"
11355 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11356 wsmap="managed"
11357 >
11358 <attribute name="enabled" type="boolean">
11359 <desc>
11360 Flag whether the USB controller is present in the
11361 guest system. If disabled, the virtual guest hardware will
11362 not contain any USB controller. Can only be changed when
11363 the VM is powered off.
11364 </desc>
11365 </attribute>
11366
11367 <attribute name="enabledEhci" type="boolean">
11368 <desc>
11369 Flag whether the USB EHCI controller is present in the
11370 guest system. If disabled, the virtual guest hardware will
11371 not contain a USB EHCI controller. Can only be changed when
11372 the VM is powered off.
11373 </desc>
11374 </attribute>
11375
11376 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11377 <desc>
11378 USB standard version which the controller implements.
11379 This is a BCD which means that the major version is in the
11380 high byte and minor version is in the low byte.
11381 </desc>
11382 </attribute>
11383
11384 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11385 <desc>
11386 List of USB device filters associated with the machine.
11387
11388 If the machine is currently running, these filters are activated
11389 every time a new (supported) USB device is attached to the host
11390 computer that was not ignored by global filters
11391 (<link to="IHost::USBDeviceFilters"/>).
11392
11393 These filters are also activated when the machine is powered up.
11394 They are run against a list of all currently available USB
11395 devices (in states
11396 <link to="USBDeviceState_Available"/>,
11397 <link to="USBDeviceState_Busy"/>,
11398 <link to="USBDeviceState_Held"/>) that were not previously
11399 ignored by global filters.
11400
11401 If at least one filter matches the USB device in question, this
11402 device is automatically captured (attached to) the virtual USB
11403 controller of this machine.
11404
11405 <see>IUSBDeviceFilter, ::IUSBController</see>
11406 </desc>
11407 </attribute>
11408
11409 <method name="createDeviceFilter">
11410 <desc>
11411 Creates a new USB device filter. All attributes except
11412 the filter name are set to <tt>null</tt> (any match),
11413 <i>active</i> is <tt>false</tt> (the filter is not active).
11414
11415 The created filter can then be added to the list of filters using
11416 <link to="#insertDeviceFilter"/>.
11417
11418 <result name="VBOX_E_INVALID_VM_STATE">
11419 The virtual machine is not mutable.
11420 </result>
11421
11422 <see>#deviceFilters</see>
11423 </desc>
11424 <param name="name" type="wstring" dir="in">
11425 <desc>
11426 Filter name. See <link to="IUSBDeviceFilter::name"/>
11427 for more info.
11428 </desc>
11429 </param>
11430 <param name="filter" type="IUSBDeviceFilter" dir="return">
11431 <desc>Created filter object.</desc>
11432 </param>
11433 </method>
11434
11435 <method name="insertDeviceFilter">
11436 <desc>
11437 Inserts the given USB device to the specified position
11438 in the list of filters.
11439
11440 Positions are numbered starting from <tt>0</tt>. If the specified
11441 position is equal to or greater than the number of elements in
11442 the list, the filter is added to the end of the collection.
11443
11444 <note>
11445 Duplicates are not allowed, so an attempt to insert a
11446 filter that is already in the collection, will return an
11447 error.
11448 </note>
11449
11450 <result name="VBOX_E_INVALID_VM_STATE">
11451 Virtual machine is not mutable.
11452 </result>
11453 <result name="E_INVALIDARG">
11454 USB device filter not created within this VirtualBox instance.
11455 </result>
11456 <result name="VBOX_E_INVALID_OBJECT_STATE">
11457 USB device filter already in list.
11458 </result>
11459
11460 <see>#deviceFilters</see>
11461 </desc>
11462 <param name="position" type="unsigned long" dir="in">
11463 <desc>Position to insert the filter to.</desc>
11464 </param>
11465 <param name="filter" type="IUSBDeviceFilter" dir="in">
11466 <desc>USB device filter to insert.</desc>
11467 </param>
11468 </method>
11469
11470 <method name="removeDeviceFilter">
11471 <desc>
11472 Removes a USB device filter from the specified position in the
11473 list of filters.
11474
11475 Positions are numbered starting from <tt>0</tt>. Specifying a
11476 position equal to or greater than the number of elements in
11477 the list will produce an error.
11478
11479 <see>#deviceFilters</see>
11480
11481 <result name="VBOX_E_INVALID_VM_STATE">
11482 Virtual machine is not mutable.
11483 </result>
11484 <result name="E_INVALIDARG">
11485 USB device filter list empty or invalid @a position.
11486 </result>
11487
11488 </desc>
11489 <param name="position" type="unsigned long" dir="in">
11490 <desc>Position to remove the filter from.</desc>
11491 </param>
11492 <param name="filter" type="IUSBDeviceFilter" dir="return">
11493 <desc>Removed USB device filter.</desc>
11494 </param>
11495 </method>
11496
11497 </interface>
11498
11499
11500 <!--
11501 // IUSBDevice
11502 /////////////////////////////////////////////////////////////////////////
11503 -->
11504
11505 <interface
11506 name="IUSBDevice" extends="$unknown"
11507 uuid="850af07b-9ee8-48c2-b6b0-f6d0acbf63c3"
11508 wsmap="managed"
11509 >
11510 <desc>
11511 The IUSBDevice interface represents a virtual USB device attached to the
11512 virtual machine.
11513
11514 A collection of objects implementing this interface is stored in the
11515 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11516 attached to a running virtual machine's USB controller.
11517 </desc>
11518
11519 <attribute name="id" type="uuid" readonly="yes">
11520 <desc>
11521 Unique USB device ID. This ID is built from #vendorId,
11522 #productId, #revision and #serialNumber.
11523 </desc>
11524 </attribute>
11525
11526 <attribute name="vendorId" type="unsigned short" readonly="yes">
11527 <desc>Vendor ID.</desc>
11528 </attribute>
11529
11530 <attribute name="productId" type="unsigned short" readonly="yes">
11531 <desc>Product ID.</desc>
11532 </attribute>
11533
11534 <attribute name="revision" type="unsigned short" readonly="yes">
11535 <desc>
11536 Product revision number. This is a packed BCD represented as
11537 unsigned short. The high byte is the integer part and the low
11538 byte is the decimal.
11539 </desc>
11540 </attribute>
11541
11542 <attribute name="manufacturer" type="wstring" readonly="yes">
11543 <desc>Manufacturer string.</desc>
11544 </attribute>
11545
11546 <attribute name="product" type="wstring" readonly="yes">
11547 <desc>Product string.</desc>
11548 </attribute>
11549
11550 <attribute name="serialNumber" type="wstring" readonly="yes">
11551 <desc>Serial number string.</desc>
11552 </attribute>
11553
11554 <attribute name="address" type="wstring" readonly="yes">
11555 <desc>Host specific address of the device.</desc>
11556 </attribute>
11557
11558 <attribute name="port" type="unsigned short" readonly="yes">
11559 <desc>
11560 Host USB port number the device is physically
11561 connected to.
11562 </desc>
11563 </attribute>
11564
11565 <attribute name="version" type="unsigned short" readonly="yes">
11566 <desc>
11567 The major USB version of the device - 1 or 2.
11568 </desc>
11569 </attribute>
11570
11571 <attribute name="portVersion" type="unsigned short" readonly="yes">
11572 <desc>
11573 The major USB version of the host USB port the device is
11574 physically connected to - 1 or 2. For devices not connected to
11575 anything this will have the same value as the version attribute.
11576 </desc>
11577 </attribute>
11578
11579 <attribute name="remote" type="boolean" readonly="yes">
11580 <desc>
11581 Whether the device is physically connected to a remote VRDP
11582 client or to a local host machine.
11583 </desc>
11584 </attribute>
11585
11586 </interface>
11587
11588
11589 <!--
11590 // IUSBDeviceFilter
11591 /////////////////////////////////////////////////////////////////////////
11592 -->
11593
11594 <interface
11595 name="IUSBDeviceFilter" extends="$unknown"
11596 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11597 wsmap="managed"
11598 >
11599 <desc>
11600 The IUSBDeviceFilter interface represents an USB device filter used
11601 to perform actions on a group of USB devices.
11602
11603 This type of filters is used by running virtual machines to
11604 automatically capture selected USB devices once they are physically
11605 attached to the host computer.
11606
11607 A USB device is matched to the given device filter if and only if all
11608 attributes of the device match the corresponding attributes of the
11609 filter (that is, attributes are joined together using the logical AND
11610 operation). On the other hand, all together, filters in the list of
11611 filters carry the semantics of the logical OR operation. So if it is
11612 desirable to create a match like "this vendor id OR this product id",
11613 one needs to create two filters and specify "any match" (see below)
11614 for unused attributes.
11615
11616 All filter attributes used for matching are strings. Each string
11617 is an expression representing a set of values of the corresponding
11618 device attribute, that will match the given filter. Currently, the
11619 following filtering expressions are supported:
11620
11621 <ul>
11622 <li><i>Interval filters</i>. Used to specify valid intervals for
11623 integer device attributes (Vendor ID, Product ID and Revision).
11624 The format of the string is:
11625
11626 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11627
11628 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11629 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11630 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11631 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11632 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11633 possible integer is assumed.
11634 </li>
11635 <li><i>Boolean filters</i>. Used to specify acceptable values for
11636 boolean device attributes. The format of the string is:
11637
11638 <tt>true|false|yes|no|0|1</tt>
11639
11640 </li>
11641 <li><i>Exact match</i>. Used to specify a single value for the given
11642 device attribute. Any string that doesn't start with <tt>int:</tt>
11643 represents the exact match. String device attributes are compared to
11644 this string including case of symbols. Integer attributes are first
11645 converted to a string (see individual filter attributes) and then
11646 compared ignoring case.
11647
11648 </li>
11649 <li><i>Any match</i>. Any value of the corresponding device attribute
11650 will match the given filter. An empty or <tt>null</tt> string is
11651 used to construct this type of filtering expressions.
11652
11653 </li>
11654 </ul>
11655
11656 <note>
11657 On the Windows host platform, interval filters are not currently
11658 available. Also all string filter attributes
11659 (<link to="#manufacturer"/>, <link to="#product"/>,
11660 <link to="#serialNumber"/>) are ignored, so they behave as
11661 <i>any match</i> no matter what string expression is specified.
11662 </note>
11663
11664 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11665 </desc>
11666
11667 <attribute name="name" type="wstring">
11668 <desc>
11669 Visible name for this filter.
11670 This name is used to visually distinguish one filter from another,
11671 so it can neither be <tt>null</tt> nor an empty string.
11672 </desc>
11673 </attribute>
11674
11675 <attribute name="active" type="boolean">
11676 <desc>Whether this filter active or has been temporarily disabled.</desc>
11677 </attribute>
11678
11679 <attribute name="vendorId" type="wstring">
11680 <desc>
11681 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11682 The string representation for the <i>exact matching</i>
11683 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11684 (including leading zeroes).
11685 </desc>
11686 </attribute>
11687
11688 <attribute name="productId" type="wstring">
11689 <desc>
11690 <link to="IUSBDevice::productId">Product ID</link> filter.
11691 The string representation for the <i>exact matching</i>
11692 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11693 (including leading zeroes).
11694 </desc>
11695 </attribute>
11696
11697 <attribute name="revision" type="wstring">
11698 <desc>
11699 <link to="IUSBDevice::productId">Product revision number</link>
11700 filter. The string representation for the <i>exact matching</i>
11701 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11702 of the integer part of the revision, and <tt>F</tt> is the
11703 decimal digit of its fractional part (including leading and
11704 trailing zeros).
11705 Note that for interval filters, it's best to use the hexadecimal
11706 form, because the revision is stored as a 16 bit packed BCD value;
11707 so the expression <tt>int:0x0100-0x0199</tt> will match any
11708 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11709 </desc>
11710 </attribute>
11711
11712 <attribute name="manufacturer" type="wstring">
11713 <desc>
11714 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11715 </desc>
11716 </attribute>
11717
11718 <attribute name="product" type="wstring">
11719 <desc>
11720 <link to="IUSBDevice::product">Product</link> filter.
11721 </desc>
11722 </attribute>
11723
11724 <attribute name="serialNumber" type="wstring">
11725 <desc>
11726 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11727 </desc>
11728 </attribute>
11729
11730 <attribute name="port" type="wstring">
11731 <desc>
11732 <link to="IUSBDevice::port">Host USB port</link> filter.
11733 </desc>
11734 </attribute>
11735
11736 <attribute name="remote" type="wstring">
11737 <desc>
11738 <link to="IUSBDevice::remote">Remote state</link> filter.
11739 <note>
11740 This filter makes sense only for machine USB filters,
11741 i.e. it is ignored by IHostUSBDeviceFilter objects.
11742 </note>
11743 </desc>
11744 </attribute>
11745
11746 <attribute name="maskedInterfaces" type="unsigned long">
11747 <desc>
11748 This is an advanced option for hiding one or more USB interfaces
11749 from the guest. The value is a bit mask where the bits that are set
11750 means the corresponding USB interface should be hidden, masked off
11751 if you like.
11752 This feature only works on Linux hosts.
11753 </desc>
11754 </attribute>
11755
11756 </interface>
11757
11758
11759 <!--
11760 // IHostUSBDevice
11761 /////////////////////////////////////////////////////////////////////////
11762 -->
11763
11764 <enum
11765 name="USBDeviceState"
11766 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11767 >
11768 <desc>
11769 USB device state. This enumeration represents all possible states
11770 of the USB device physically attached to the host computer regarding
11771 its state on the host computer and availability to guest computers
11772 (all currently running virtual machines).
11773
11774 Once a supported USB device is attached to the host, global USB
11775 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11776 either ignore the device, or put it to USBDeviceState_Held state, or do
11777 nothing. Unless the device is ignored by global filters, filters of all
11778 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11779 activated that can put it to USBDeviceState_Captured state.
11780
11781 If the device was ignored by global filters, or didn't match
11782 any filters at all (including guest ones), it is handled by the host
11783 in a normal way. In this case, the device state is determined by
11784 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11785 or USBDeviceState_Available, depending on the current device usage.
11786
11787 Besides auto-capturing based on filters, the device can be manually
11788 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11789 state is USBDeviceState_Busy, USBDeviceState_Available or
11790 USBDeviceState_Held.
11791
11792 <note>
11793 Due to differences in USB stack implementations in Linux and Win32,
11794 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11795 only to the Linux version of the product. This also means that (<link
11796 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11797 device state is USBDeviceState_Held.
11798 </note>
11799
11800 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11801 </desc>
11802
11803 <const name="NotSupported" value="0">
11804 <desc>
11805 Not supported by the VirtualBox server, not available to guests.
11806 </desc>
11807 </const>
11808 <const name="Unavailable" value="1">
11809 <desc>
11810 Being used by the host computer exclusively,
11811 not available to guests.
11812 </desc>
11813 </const>
11814 <const name="Busy" value="2">
11815 <desc>
11816 Being used by the host computer, potentially available to guests.
11817 </desc>
11818 </const>
11819 <const name="Available" value="3">
11820 <desc>
11821 Not used by the host computer, available to guests (the host computer
11822 can also start using the device at any time).
11823 </desc>
11824 </const>
11825 <const name="Held" value="4">
11826 <desc>
11827 Held by the VirtualBox server (ignored by the host computer),
11828 available to guests.
11829 </desc>
11830 </const>
11831 <const name="Captured" value="5">
11832 <desc>
11833 Captured by one of the guest computers, not available
11834 to anybody else.
11835 </desc>
11836 </const>
11837 </enum>
11838
11839 <interface
11840 name="IHostUSBDevice" extends="IUSBDevice"
11841 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11842 wsmap="managed"
11843 >
11844 <desc>
11845 The IHostUSBDevice interface represents a physical USB device attached
11846 to the host computer.
11847
11848 Besides properties inherited from IUSBDevice, this interface adds the
11849 <link to="#state"/> property that holds the current state of the USB
11850 device.
11851
11852 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11853 </desc>
11854
11855 <attribute name="state" type="USBDeviceState" readonly="yes">
11856 <desc>
11857 Current state of the device.
11858 </desc>
11859 </attribute>
11860
11861 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11862
11863 </interface>
11864
11865
11866 <!--
11867 // IHostUSBDeviceFilter
11868 /////////////////////////////////////////////////////////////////////////
11869 -->
11870
11871 <enum
11872 name="USBDeviceFilterAction"
11873 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11874 >
11875 <desc>
11876 Actions for host USB device filters.
11877 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11878 </desc>
11879
11880 <const name="Null" value="0">
11881 <desc>Null value (never used by the API).</desc>
11882 </const>
11883 <const name="Ignore" value="1">
11884 <desc>Ignore the matched USB device.</desc>
11885 </const>
11886 <const name="Hold" value="2">
11887 <desc>Hold the matched USB device.</desc>
11888 </const>
11889 </enum>
11890
11891 <interface
11892 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11893 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11894 wsmap="managed"
11895 >
11896 <desc>
11897 The IHostUSBDeviceFilter interface represents a global filter for a
11898 physical USB device used by the host computer. Used indirectly in
11899 <link to="IHost::USBDeviceFilters"/>.
11900
11901 Using filters of this type, the host computer determines the initial
11902 state of the USB device after it is physically attached to the
11903 host's USB controller.
11904
11905 <note>
11906 The <link to="#remote"/> attribute is ignored by this type of
11907 filters, because it makes sense only for
11908 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11909 </note>
11910
11911 <see>IHost::USBDeviceFilters</see>
11912 </desc>
11913
11914 <attribute name="action" type="USBDeviceFilterAction">
11915 <desc>
11916 Action performed by the host when an attached USB device
11917 matches this filter.
11918 </desc>
11919 </attribute>
11920
11921 </interface>
11922
11923 <!--
11924 // IAudioAdapter
11925 /////////////////////////////////////////////////////////////////////////
11926 -->
11927
11928 <enum
11929 name="AudioDriverType"
11930 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11931 >
11932 <desc>
11933 Host audio driver type.
11934 </desc>
11935
11936 <const name="Null" value="0">
11937 <desc>Null value, also means "dummy audio driver".</desc>
11938 </const>
11939 <const name="WinMM" value="1"/>
11940 <const name="OSS" value="2"/>
11941 <const name="ALSA" value="3"/>
11942 <const name="DirectSound" value="4"/>
11943 <const name="CoreAudio" value="5"/>
11944 <const name="MMPM" value="6"/>
11945 <const name="Pulse" value="7"/>
11946 <const name="SolAudio" value="8"/>
11947 </enum>
11948
11949 <enum
11950 name="AudioControllerType"
11951 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11952 >
11953 <desc>
11954 Virtual audio controller type.
11955 </desc>
11956
11957 <const name="AC97" value="0"/>
11958 <const name="SB16" value="1"/>
11959 </enum>
11960
11961 <interface
11962 name="IAudioAdapter" extends="$unknown"
11963 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11964 wsmap="managed"
11965 >
11966 <desc>
11967 The IAudioAdapter interface represents the virtual audio adapter of
11968 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11969 </desc>
11970 <attribute name="enabled" type="boolean">
11971 <desc>
11972 Flag whether the audio adapter is present in the
11973 guest system. If disabled, the virtual guest hardware will
11974 not contain any audio adapter. Can only be changed when
11975 the VM is not running.
11976 </desc>
11977 </attribute>
11978 <attribute name="audioController" type="AudioControllerType">
11979 <desc>
11980 The audio hardware we emulate.
11981 </desc>
11982 </attribute>
11983 <attribute name="audioDriver" type="AudioDriverType">
11984 <desc>
11985 Audio driver the adapter is connected to. This setting
11986 can only be changed when the VM is not running.
11987 </desc>
11988 </attribute>
11989 </interface>
11990
11991 <!--
11992 // IVRDPServer
11993 /////////////////////////////////////////////////////////////////////////
11994 -->
11995
11996 <enum
11997 name="VRDPAuthType"
11998 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11999 >
12000 <desc>
12001 VRDP authentication type.
12002 </desc>
12003
12004 <const name="Null" value="0">
12005 <desc>Null value, also means "no authentication".</desc>
12006 </const>
12007 <const name="External" value="1"/>
12008 <const name="Guest" value="2"/>
12009 </enum>
12010
12011 <interface
12012 name="IVRDPServer" extends="$unknown"
12013 uuid="f4584ae7-6bce-474b-83d6-17d235e6aa89"
12014 wsmap="managed"
12015 >
12016 <attribute name="enabled" type="boolean">
12017 <desc>VRDP server status.</desc>
12018 </attribute>
12019
12020 <attribute name="port" type="unsigned long">
12021 <desc>
12022 VRDP server port number.
12023 <note>
12024 Setting the value of this property to <tt>0</tt> will reset the port
12025 number to the default value which is
12026 currently <tt>3389</tt>. Reading this property will always return a
12027 real port number, even after it has been set to <tt>0</tt> (in which
12028 case the default port is returned).
12029 </note>
12030 </desc>
12031 </attribute>
12032
12033 <attribute name="netAddress" type="wstring">
12034 <desc>VRDP server address.</desc>
12035 </attribute>
12036
12037 <attribute name="authType" type="VRDPAuthType">
12038 <desc>VRDP authentication method.</desc>
12039 </attribute>
12040
12041 <attribute name="authTimeout" type="unsigned long">
12042 <desc>Timeout for guest authentication. Milliseconds.</desc>
12043 </attribute>
12044
12045 <attribute name="allowMultiConnection" type="boolean">
12046 <desc>
12047 Flag whether multiple simultaneous connections to the VM are permitted.
12048 Note that this will be replaced by a more powerful mechanism in the future.
12049 </desc>
12050 </attribute>
12051
12052 <attribute name="reuseSingleConnection" type="boolean">
12053 <desc>
12054 Flag whether the existing connection must be dropped and a new connection
12055 must be established by the VRDP server, when a new client connects in single
12056 connection mode.
12057 </desc>
12058 </attribute>
12059
12060 </interface>
12061
12062
12063 <!--
12064 // ISharedFolder
12065 /////////////////////////////////////////////////////////////////////////
12066 -->
12067
12068 <interface
12069 name="ISharedFolder" extends="$unknown"
12070 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12071 wsmap="struct"
12072 >
12073 <desc>
12074 The ISharedFolder interface represents a folder in the host computer's
12075 file system accessible from the guest OS running inside a virtual
12076 machine using an associated logical name.
12077
12078 There are three types of shared folders:
12079 <ul>
12080 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12081 folders available to all virtual machines.</li>
12082 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12083 VM-specific shared folders available to the given virtual machine at
12084 startup.</li>
12085 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12086 VM-specific shared folders created in the session context (for
12087 example, when the virtual machine is running) and automatically
12088 discarded when the session is closed (the VM is powered off).</li>
12089 </ul>
12090
12091 Logical names of shared folders must be unique within the given scope
12092 (global, permanent or transient). However, they do not need to be unique
12093 across scopes. In this case, the definition of the shared folder in a
12094 more specific scope takes precedence over definitions in all other
12095 scopes. The order of precedence is (more specific to more general):
12096 <ol>
12097 <li>Transient definitions</li>
12098 <li>Permanent definitions</li>
12099 <li>Global definitions</li>
12100 </ol>
12101
12102 For example, if MyMachine has a shared folder named
12103 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12104 transient shared folder named <tt>C_DRIVE</tt> (that points
12105 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12106 of <tt>C_DRIVE</tt> in the guest OS so
12107 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12108 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12109 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12110 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12111 to <tt>C:\\</tt> if it still exists.
12112
12113 Note that permanent and transient shared folders of different machines
12114 are in different name spaces, so they don't overlap and don't need to
12115 have unique logical names.
12116
12117 <note>
12118 Global shared folders are not implemented in the current version of the
12119 product.
12120 </note>
12121 </desc>
12122
12123 <attribute name="name" type="wstring" readonly="yes">
12124 <desc>Logical name of the shared folder.</desc>
12125 </attribute>
12126
12127 <attribute name="hostPath" type="wstring" readonly="yes">
12128 <desc>Full path to the shared folder in the host file system.</desc>
12129 </attribute>
12130
12131 <attribute name="accessible" type="boolean" readonly="yes">
12132 <desc>
12133 Whether the folder defined by the host path is currently
12134 accessible or not.
12135 For example, the folder can be unaccessible if it is placed
12136 on the network share that is not available by the time
12137 this property is read.
12138 </desc>
12139 </attribute>
12140
12141 <attribute name="writable" type="boolean" readonly="yes">
12142 <desc>
12143 Whether the folder defined by the host path is writable or
12144 not.
12145 </desc>
12146 </attribute>
12147
12148 <attribute name="lastAccessError" type="wstring" readonly="yes">
12149 <desc>
12150 Text message that represents the result of the last accessibility
12151 check.
12152
12153 Accessibility checks are performed each time the <link to="#accessible"/>
12154 attribute is read. A @c null string is returned if the last
12155 accessibility check was successful. A non-null string indicates a
12156 failure and should normally describe a reason of the failure (for
12157 example, a file read error).
12158 </desc>
12159 </attribute>
12160
12161 </interface>
12162
12163 <!--
12164 // ISession
12165 /////////////////////////////////////////////////////////////////////////
12166 -->
12167
12168 <interface
12169 name="IInternalSessionControl" extends="$unknown"
12170 uuid="2581845a-5a9d-45fb-bc3b-2476552dd970"
12171 internal="yes"
12172 wsmap="suppress"
12173 >
12174 <method name="getPID">
12175 <desc>PID of the process that has created this Session object.
12176 </desc>
12177 <param name="pid" type="unsigned long" dir="return"/>
12178 </method>
12179
12180 <method name="getRemoteConsole">
12181 <desc>
12182 Returns the console object suitable for remote control.
12183
12184 <result name="VBOX_E_INVALID_VM_STATE">
12185 Session state prevents operation.
12186 </result>
12187 <result name="VBOX_E_INVALID_OBJECT_STATE">
12188 Session type prevents operation.
12189 </result>
12190
12191 </desc>
12192 <param name="console" type="IConsole" dir="return"/>
12193 </method>
12194
12195 <method name="assignMachine">
12196 <desc>
12197 Assigns the machine object associated with this direct-type
12198 session or informs the session that it will be a remote one
12199 (if @a machine == NULL).
12200
12201 <result name="VBOX_E_INVALID_VM_STATE">
12202 Session state prevents operation.
12203 </result>
12204 <result name="VBOX_E_INVALID_OBJECT_STATE">
12205 Session type prevents operation.
12206 </result>
12207
12208 </desc>
12209 <param name="machine" type="IMachine" dir="in"/>
12210 </method>
12211
12212 <method name="assignRemoteMachine">
12213 <desc>
12214 Assigns the machine and the (remote) console object associated with
12215 this remote-type session.
12216
12217 <result name="VBOX_E_INVALID_VM_STATE">
12218 Session state prevents operation.
12219 </result>
12220
12221 </desc>
12222 <param name="machine" type="IMachine" dir="in"/>
12223 <param name="console" type="IConsole" dir="in"/>
12224 </method>
12225
12226 <method name="updateMachineState">
12227 <desc>
12228 Updates the machine state in the VM process.
12229 Must be called only in certain cases
12230 (see the method implementation).
12231
12232 <result name="VBOX_E_INVALID_VM_STATE">
12233 Session state prevents operation.
12234 </result>
12235 <result name="VBOX_E_INVALID_OBJECT_STATE">
12236 Session type prevents operation.
12237 </result>
12238
12239 </desc>
12240 <param name="aMachineState" type="MachineState" dir="in"/>
12241 </method>
12242
12243 <method name="uninitialize">
12244 <desc>
12245 Uninitializes (closes) this session. Used by VirtualBox to close
12246 the corresponding remote session when the direct session dies
12247 or gets closed.
12248
12249 <result name="VBOX_E_INVALID_VM_STATE">
12250 Session state prevents operation.
12251 </result>
12252
12253 </desc>
12254 </method>
12255
12256 <method name="onDVDDriveChange">
12257 <desc>
12258 Triggered when settings of the DVD drive object of the
12259 associated virtual machine have changed.
12260
12261 <result name="VBOX_E_INVALID_VM_STATE">
12262 Session state prevents operation.
12263 </result>
12264 <result name="VBOX_E_INVALID_OBJECT_STATE">
12265 Session type prevents operation.
12266 </result>
12267
12268 </desc>
12269 </method>
12270
12271 <method name="onFloppyDriveChange">
12272 <desc>
12273 Triggered when settings of the floppy drive object of the
12274 associated virtual machine have changed.
12275
12276 <result name="VBOX_E_INVALID_VM_STATE">
12277 Session state prevents operation.
12278 </result>
12279 <result name="VBOX_E_INVALID_OBJECT_STATE">
12280 Session type prevents operation.
12281 </result>
12282
12283 </desc>
12284 </method>
12285
12286 <method name="onNetworkAdapterChange">
12287 <desc>
12288 Triggered when settings of a network adapter of the
12289 associated virtual machine have changed.
12290
12291 <result name="VBOX_E_INVALID_VM_STATE">
12292 Session state prevents operation.
12293 </result>
12294 <result name="VBOX_E_INVALID_OBJECT_STATE">
12295 Session type prevents operation.
12296 </result>
12297
12298 </desc>
12299 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12300 </method>
12301
12302 <method name="onSerialPortChange">
12303 <desc>
12304 Triggered when settings of a serial port of the
12305 associated virtual machine have changed.
12306
12307 <result name="VBOX_E_INVALID_VM_STATE">
12308 Session state prevents operation.
12309 </result>
12310 <result name="VBOX_E_INVALID_OBJECT_STATE">
12311 Session type prevents operation.
12312 </result>
12313
12314 </desc>
12315 <param name="serialPort" type="ISerialPort" dir="in"/>
12316 </method>
12317
12318 <method name="onParallelPortChange">
12319 <desc>
12320 Triggered when settings of a parallel port of the
12321 associated virtual machine have changed.
12322
12323 <result name="VBOX_E_INVALID_VM_STATE">
12324 Session state prevents operation.
12325 </result>
12326 <result name="VBOX_E_INVALID_OBJECT_STATE">
12327 Session type prevents operation.
12328 </result>
12329
12330 </desc>
12331 <param name="parallelPort" type="IParallelPort" dir="in"/>
12332 </method>
12333
12334 <method name="onStorageControllerChange">
12335 <desc>
12336 Triggered when settings of a storage controller of the
12337 associated virtual machine have changed.
12338
12339 <result name="VBOX_E_INVALID_VM_STATE">
12340 Session state prevents operation.
12341 </result>
12342 <result name="VBOX_E_INVALID_OBJECT_STATE">
12343 Session type prevents operation.
12344 </result>
12345
12346 </desc>
12347 </method>
12348
12349 <method name="onVRDPServerChange">
12350 <desc>
12351 Triggered when settings of the VRDP server object of the
12352 associated virtual machine have changed.
12353
12354 <result name="VBOX_E_INVALID_VM_STATE">
12355 Session state prevents operation.
12356 </result>
12357 <result name="VBOX_E_INVALID_OBJECT_STATE">
12358 Session type prevents operation.
12359 </result>
12360
12361 </desc>
12362 </method>
12363
12364 <method name="onUSBControllerChange">
12365 <desc>
12366 Triggered when settings of the USB controller object of the
12367 associated virtual machine have changed.
12368
12369 <result name="VBOX_E_INVALID_VM_STATE">
12370 Session state prevents operation.
12371 </result>
12372 <result name="VBOX_E_INVALID_OBJECT_STATE">
12373 Session type prevents operation.
12374 </result>
12375
12376 </desc>
12377 </method>
12378
12379 <method name="onSharedFolderChange">
12380 <desc>
12381 Triggered when a permanent (global or machine) shared folder has been
12382 created or removed.
12383 <note>
12384 We don't pass shared folder parameters in this notification because
12385 the order in which parallel notifications are delivered is not defined,
12386 therefore it could happen that these parameters were outdated by the
12387 time of processing this notification.
12388 </note>
12389
12390 <result name="VBOX_E_INVALID_VM_STATE">
12391 Session state prevents operation.
12392 </result>
12393 <result name="VBOX_E_INVALID_OBJECT_STATE">
12394 Session type prevents operation.
12395 </result>
12396
12397 </desc>
12398 <param name="global" type="boolean" dir="in"/>
12399 </method>
12400
12401 <method name="onUSBDeviceAttach">
12402 <desc>
12403 Triggered when a request to capture a USB device (as a result
12404 of matched USB filters or direct call to
12405 <link to="IConsole::attachUSBDevice"/>) has completed.
12406 A @c null @a error object means success, otherwise it
12407 describes a failure.
12408
12409 <result name="VBOX_E_INVALID_VM_STATE">
12410 Session state prevents operation.
12411 </result>
12412 <result name="VBOX_E_INVALID_OBJECT_STATE">
12413 Session type prevents operation.
12414 </result>
12415
12416 </desc>
12417 <param name="device" type="IUSBDevice" dir="in"/>
12418 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12419 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12420 </method>
12421
12422 <method name="onUSBDeviceDetach">
12423 <desc>
12424 Triggered when a request to release the USB device (as a result
12425 of machine termination or direct call to
12426 <link to="IConsole::detachUSBDevice"/>) has completed.
12427 A @c null @a error object means success, otherwise it
12428
12429 <result name="VBOX_E_INVALID_VM_STATE">
12430 Session state prevents operation.
12431 </result>
12432 <result name="VBOX_E_INVALID_OBJECT_STATE">
12433 Session type prevents operation.
12434 </result>
12435
12436 </desc>
12437 <param name="id" type="uuid" dir="in"/>
12438 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12439 </method>
12440
12441 <method name="onShowWindow">
12442 <desc>
12443 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12444 <link to="IMachine::showConsoleWindow"/> in order to notify
12445 console callbacks
12446 <link to="IConsoleCallback::onCanShowWindow"/>
12447 and <link to="IConsoleCallback::onShowWindow"/>.
12448
12449 <result name="VBOX_E_INVALID_OBJECT_STATE">
12450 Session type prevents operation.
12451 </result>
12452
12453 </desc>
12454 <param name="check" type="boolean" dir="in"/>
12455 <param name="canShow" type="boolean" dir="out"/>
12456 <param name="winId" type="unsigned long long" dir="out"/>
12457 </method>
12458
12459 <method name="accessGuestProperty">
12460 <desc>
12461 Called by <link to="IMachine::getGuestProperty"/> and by
12462 <link to="IMachine::setGuestProperty"/> in order to read and
12463 modify guest properties.
12464
12465 <result name="VBOX_E_INVALID_VM_STATE">
12466 Machine session is not open.
12467 </result>
12468 <result name="VBOX_E_INVALID_OBJECT_STATE">
12469 Session type is not direct.
12470 </result>
12471
12472 </desc>
12473 <param name="name" type="wstring" dir="in"/>
12474 <param name="value" type="wstring" dir="in"/>
12475 <param name="flags" type="wstring" dir="in"/>
12476 <param name="isSetter" type="boolean" dir="in"/>
12477 <param name="retValue" type="wstring" dir="out"/>
12478 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12479 <param name="retFlags" type="wstring" dir="out"/>
12480 </method>
12481
12482 <method name="enumerateGuestProperties">
12483 <desc>
12484 Return a list of the guest properties matching a set of patterns along
12485 with their values, time stamps and flags.
12486
12487 <result name="VBOX_E_INVALID_VM_STATE">
12488 Machine session is not open.
12489 </result>
12490 <result name="VBOX_E_INVALID_OBJECT_STATE">
12491 Session type is not direct.
12492 </result>
12493
12494 </desc>
12495 <param name="patterns" type="wstring" dir="in">
12496 <desc>
12497 The patterns to match the properties against as a comma-separated
12498 string. If this is empty, all properties currently set will be
12499 returned.
12500 </desc>
12501 </param>
12502 <param name="key" type="wstring" dir="out" safearray="yes">
12503 <desc>
12504 The key names of the properties returned.
12505 </desc>
12506 </param>
12507 <param name="value" type="wstring" dir="out" safearray="yes">
12508 <desc>
12509 The values of the properties returned. The array entries match the
12510 corresponding entries in the @a key array.
12511 </desc>
12512 </param>
12513 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12514 <desc>
12515 The time stamps of the properties returned. The array entries match
12516 the corresponding entries in the @a key array.
12517 </desc>
12518 </param>
12519 <param name="flags" type="wstring" dir="out" safearray="yes">
12520 <desc>
12521 The flags of the properties returned. The array entries match the
12522 corresponding entries in the @a key array.
12523 </desc>
12524 </param>
12525 </method>
12526
12527 </interface>
12528
12529 <interface
12530 name="ISession" extends="$dispatched"
12531 uuid="12F4DCDB-12B2-4ec1-B7CD-DDD9F6C5BF4D"
12532 wsmap="managed"
12533 >
12534 <desc>
12535 The ISession interface represents a serialization primitive for virtual
12536 machines.
12537
12538 With VirtualBox, every time one wishes to manipulate a virtual machine
12539 (e.g. change its settings or start execution), a session object is
12540 required. Such an object must be passed to one of the session methods
12541 that open the given session, which then initiates the machine manipulation.
12542
12543 A session serves several purposes: it identifies to the inter-process VirtualBox
12544 code which process is currently working with the virtual machine, and it ensures
12545 that there are no incompatible requests from several processes for the
12546 same virtual machine. Session objects can therefore be thought of as mutex
12547 semaphores that lock virtual machines to prevent conflicting accesses from
12548 several processes.
12549
12550 How sessions objects are used depends on whether you use the Main API
12551 via COM or via the webservice:
12552
12553 <ul>
12554 <li>When using the COM API directly, an object of the Session class from the
12555 VirtualBox type library needs to be created. In regular COM C++ client code,
12556 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12557 This object will then act as a local session object in further calls to open
12558 a session.
12559 </li>
12560
12561 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12562 one session object automatically when <link to="IWebsessionManager::logon" />
12563 is called. A managed object reference to that session object can be retrieved by
12564 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12565 reference can then be used to open sessions.
12566 </li>
12567 </ul>
12568
12569 Sessions are mainly used in two variations:
12570
12571 <ul>
12572 <li>
12573 To start a virtual machine in a separate process, one would call
12574 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12575 object as its first parameter. This session then identifies the caller
12576 and lets him control the started machine (for example, pause machine
12577 execution or power it down) as well as be notified about machine
12578 execution state changes.
12579 </li>
12580
12581 <li>To alter machine settings, or to start machine execution within the
12582 current process, one needs to open a direct session for the machine first by
12583 calling <link to="IVirtualBox::openSession"/>. While a direct session
12584 is open within one process, no any other process may open another direct
12585 session for the same machine. This prevents the machine from being changed
12586 by other processes while it is running or while the machine is being configured.
12587 </li>
12588 </ul>
12589
12590 One also can attach to an existing direct session already opened by
12591 another process (for example, in order to send a control request to the
12592 virtual machine such as the pause or the reset request). This is done by
12593 calling <link to="IVirtualBox::openExistingSession"/>.
12594
12595 <note>
12596 Unless you are trying to write a new VirtualBox front-end that
12597 performs direct machine execution (like the VirtualBox or VBoxSDL
12598 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12599 session opened by <link to="IVirtualBox::openSession"/> and use this
12600 session only to change virtual machine settings. If you simply want to
12601 start virtual machine execution using one of the existing front-ends
12602 (for example the VirtualBox GUI or headless server), simply use
12603 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12604 will power up the machine automatically for you.
12605 </note>
12606 </desc>
12607
12608 <attribute name="state" type="SessionState" readonly="yes">
12609 <desc>Current state of this session.</desc>
12610 </attribute>
12611
12612 <attribute name="type" type="SessionType" readonly="yes">
12613 <desc>
12614 Type of this session. The value of this attribute is valid only
12615 if the session is currently open (i.e. its #state is
12616 SessionType_SessionOpen), otherwise an error will be returned.
12617 </desc>
12618 </attribute>
12619
12620 <attribute name="machine" type="IMachine" readonly="yes">
12621 <desc>Machine object associated with this session.</desc>
12622 </attribute>
12623
12624 <attribute name="console" type="IConsole" readonly="yes">
12625 <desc>Console object associated with this session.</desc>
12626 </attribute>
12627
12628 <method name="close">
12629 <desc>
12630 Closes a session that was previously opened.
12631
12632 It is recommended that every time an "open session" method (such as
12633 <link to="IVirtualBox::openRemoteSession" /> or
12634 <link to="IVirtualBox::openSession" />) has been called to
12635 manipulate a virtual machine, the caller invoke
12636 ISession::close() when it's done doing so. Since sessions are
12637 serialization primitives much like ordinary mutexes, they are
12638 best used the same way: for each "open" call, there should be
12639 a matching "close" call, even when errors occur.
12640
12641 Otherwise, if a direct session for a machine opened with
12642 <link to="IVirtualBox::openSession"/> is not explicitly closed
12643 when the application terminates, the state of the machine will
12644 be set to <link to="MachineState_Aborted" /> on the server.
12645
12646 Generally, it is recommended to close all open sessions explicitly
12647 before terminating the application (regardless of the reason for
12648 the termination).
12649
12650 <note>
12651 Do not expect the session state (<link to="ISession::state" />
12652 to return to "Closed" immediately after you invoke
12653 ISession::close(), particularly if you have started a remote
12654 session to execute the VM in a new process. The session state will
12655 automatically return to "Closed" once the VM is no longer executing,
12656 which can of course take a very long time.
12657 </note>
12658
12659 <result name="E_UNEXPECTED">
12660 Session is not open.
12661 </result>
12662
12663 </desc>
12664 </method>
12665
12666 </interface>
12667
12668 <!--
12669 // IStorageController
12670 /////////////////////////////////////////////////////////////////////////
12671 -->
12672
12673 <enum
12674 name="StorageBus"
12675 uuid="f381fdca-5953-41d0-b2bd-0542b012698d"
12676 >
12677 <desc>
12678 The connection type of the storage controller.
12679 </desc>
12680 <const name="Null" value="0">
12681 <desc><tt>null</tt> value. Never used by the API.</desc>
12682 </const>
12683 <const name="IDE" value="1"/>
12684 <const name="SATA" value="2"/>
12685 <const name="SCSI" value="3"/>
12686 </enum>
12687
12688 <enum
12689 name="StorageControllerType"
12690 uuid="685387db-a837-4320-a258-08f46a22f62a"
12691 >
12692 <desc>
12693 Storage controller type.
12694 </desc>
12695
12696 <const name="Null" value="0">
12697 <desc><tt>null</tt> value. Never used by the API.</desc>
12698 </const>
12699 <const name="LsiLogic" value="1"/>
12700 <const name="BusLogic" value="2"/>
12701 <const name="IntelAhci" value="3"/>
12702 <const name="PIIX3" value="4"/>
12703 <const name="PIIX4" value="5"/>
12704 <const name="ICH6" value="6"/>
12705 </enum>
12706
12707 <interface
12708 name="IStorageController" extends="$unknown"
12709 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12710 wsmap="managed"
12711 >
12712 <desc>
12713 Represents a storage controller that is attached to a virtual machine
12714 (<link to="IMachine" />). Just as hard disks are attached to storage
12715 controllers in a real computer, virtual hard disks (represented by
12716 <link to="IHardDisk" />) are attached to virtual storage controllers,
12717 represented by this interface.
12718
12719 VirtualBox supports three types of virtual storage controller hardware:
12720 IDE, SCSI, and SATA (see <link to="#bus" />). Depending on which of
12721 these three is used, certain sub-types are available and can be
12722 selected in <link to="#controllerType" />.
12723 </desc>
12724
12725 <attribute name="name" type="wstring" readonly="yes">
12726 <desc>
12727 Name of the storage controller, as originally specified with
12728 <link to="IMachine::addStorageController" />. This then uniquely
12729 identifies this controller with other method calls such as
12730 <link to="IMachine::attachHardDisk" />.
12731 </desc>
12732 </attribute>
12733
12734 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12735 <desc>
12736 Maximum number of devices which can be attached to one port.
12737 </desc>
12738 </attribute>
12739
12740 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12741 <desc>
12742 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12743 </desc>
12744 </attribute>
12745
12746 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12747 <desc>
12748 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12749 </desc>
12750 </attribute>
12751
12752 <attribute name="instance" type="unsigned long">
12753 <desc>
12754 The instance number of the device in the running VM.
12755 </desc>
12756 </attribute>
12757
12758 <attribute name="portCount" type="unsigned long">
12759 <desc>
12760 The number of currently usable ports on the controller.
12761 The minimum and maximum number of ports for one controller are
12762 stored in <link to="IStorageController::minPortCount"/>
12763 and <link to="IStorageController::maxPortCount"/>.
12764 </desc>
12765 </attribute>
12766
12767 <attribute name="bus" type="StorageBus" readonly="yes">
12768 <desc>
12769 The connection type of the storage controller.
12770 </desc>
12771 </attribute>
12772
12773 <attribute name="controllerType" type="StorageControllerType">
12774 <desc>
12775 Type of the virtual storage controller. Depending on this value,
12776 VirtualBox will provide a different virtual storage controller hardware
12777 to the guest.
12778
12779 For SCSI controllers, the default type is LsiLogic.
12780 </desc>
12781 </attribute>
12782
12783 <method name="GetIDEEmulationPort">
12784 <desc>
12785 Gets the corresponding port number which is emulated as an IDE device.
12786
12787 <result name="E_INVALIDARG">
12788 The @a devicePosition is not in the range 0 to 3.
12789 </result>
12790 <result name="E_NOTIMPL">
12791 The storage controller type is not SATAIntelAhci.
12792 </result>
12793
12794 </desc>
12795 <param name="devicePosition" type="long" dir="in"/>
12796 <param name="portNumber" type="long" dir="return"/>
12797 </method>
12798
12799 <method name="SetIDEEmulationPort">
12800 <desc>
12801 Sets the port number which is emulated as an IDE device.
12802
12803 <result name="E_INVALIDARG">
12804 The @a devicePosition is not in the range 0 to 3 or the
12805 @a portNumber is not in the range 0 to 29.
12806 </result>
12807 <result name="E_NOTIMPL">
12808 The storage controller type is not SATAIntelAhci.
12809 </result>
12810
12811 </desc>
12812 <param name="devicePosition" type="long" dir="in"/>
12813 <param name="portNumber" type="long" dir="in"/>
12814 </method>
12815
12816 </interface>
12817
12818<if target="wsdl">
12819
12820 <!--
12821 // IManagedObjectRef
12822 /////////////////////////////////////////////////////////////////////////
12823 -->
12824
12825 <interface
12826 name="IManagedObjectRef" extends="$unknown"
12827 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12828 internal="yes"
12829 wsmap="managed"
12830 wscpp="hardcoded"
12831 >
12832 <desc>
12833 Managed object reference.
12834
12835 Only within the webservice, a managed object reference (which is really
12836 an opaque number) allows a webservice client to address an object
12837 that lives in the address space of the webservice server.
12838
12839 Behind each managed object reference, there is a COM object that lives
12840 in the webservice server's address space. The COM object is not freed
12841 until the managed object reference is released, either by an explicit
12842 call to <link to="IManagedObjectRef::release" /> or by logging off from
12843 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12844 all objects created during the webservice session.
12845
12846 Whenever a method call of the VirtualBox API returns a COM object, the
12847 webservice representation of that method will instead return a
12848 managed object reference, which can then be used to invoke methods
12849 on that object.
12850 </desc>
12851
12852 <method name="getInterfaceName">
12853 <desc>
12854 Returns the name of the interface that this managed object represents,
12855 for example, "IMachine", as a string.
12856 </desc>
12857 <param name="return" type="wstring" dir="return"/>
12858 </method>
12859
12860 <method name="release">
12861 <desc>
12862 Releases this managed object reference and frees the resources that
12863 were allocated for it in the webservice server process. After calling
12864 this method, the identifier of the reference can no longer be used.
12865 </desc>
12866 </method>
12867
12868 </interface>
12869
12870 <!--
12871 // IWebsessionManager
12872 /////////////////////////////////////////////////////////////////////////
12873 -->
12874
12875 <interface
12876 name="IWebsessionManager" extends="$unknown"
12877 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12878 internal="yes"
12879 wsmap="global"
12880 wscpp="hardcoded"
12881 >
12882 <desc>
12883 Websession manager. This provides essential services
12884 to webservice clients.
12885 </desc>
12886 <method name="logon">
12887 <desc>
12888 Logs a new client onto the webservice and returns a managed object reference to
12889 the IVirtualBox instance, which the client can then use as a basis to further
12890 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12891 interface, in one way or the other.
12892 </desc>
12893 <param name="username" type="wstring" dir="in"/>
12894 <param name="password" type="wstring" dir="in"/>
12895 <param name="return" type="IVirtualBox" dir="return"/>
12896 </method>
12897
12898 <method name="getSessionObject">
12899 <desc>
12900 Returns a managed object reference to the internal ISession object that was created
12901 for this web service session when the client logged on.
12902
12903 <see>ISession</see>
12904 </desc>
12905 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12906 <param name="return" type="ISession" dir="return"/>
12907 </method>
12908
12909 <method name="logoff">
12910 <desc>
12911 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12912 and destroys all resources associated with the session (most importantly, all
12913 managed objects created in the server while the session was active).
12914 </desc>
12915 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12916 </method>
12917
12918 </interface>
12919
12920</if>
12921
12922 <!--
12923 // IPerformanceCollector & friends
12924 /////////////////////////////////////////////////////////////////////////
12925 -->
12926
12927 <interface
12928 name="IPerformanceMetric" extends="$unknown"
12929 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12930 >
12931 <desc>
12932 The IPerformanceMetric interface represents parameters of the given
12933 performance metric.
12934 </desc>
12935
12936 <attribute name="metricName" type="wstring" readonly="yes">
12937 <desc>
12938 Name of the metric.
12939 </desc>
12940 </attribute>
12941
12942 <attribute name="object" type="$unknown" readonly="yes">
12943 <desc>
12944 Object this metric belongs to.
12945 </desc>
12946 </attribute>
12947
12948 <attribute name="description" type="wstring" readonly="yes">
12949 <desc>
12950 Textual description of the metric.
12951 </desc>
12952 </attribute>
12953
12954 <attribute name="period" type="unsigned long" readonly="yes">
12955 <desc>
12956 Time interval between samples, measured in seconds.
12957 </desc>
12958 </attribute>
12959
12960 <attribute name="count" type="unsigned long" readonly="yes">
12961 <desc>
12962 Number of recent samples retained by the performance collector for this
12963 metric.
12964
12965 When the collected sample count exceeds this number, older samples
12966 are discarded.
12967 </desc>
12968 </attribute>
12969
12970 <attribute name="unit" type="wstring" readonly="yes">
12971 <desc>
12972 Unit of measurement.
12973 </desc>
12974 </attribute>
12975
12976 <attribute name="minimumValue" type="long" readonly="yes">
12977 <desc>
12978 Minimum possible value of this metric.
12979 </desc>
12980 </attribute>
12981
12982 <attribute name="maximumValue" type="long" readonly="yes">
12983 <desc>
12984 Maximum possible value of this metric.
12985 </desc>
12986 </attribute>
12987 </interface>
12988
12989 <interface
12990 name="IPerformanceCollector" extends="$unknown"
12991 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12992 wsmap="managed"
12993 >
12994 <desc>
12995 The IPerformanceCollector interface represents a service that collects and
12996 stores performance metrics data.
12997
12998 Performance metrics are associated with objects like IHost and
12999 IMachine. Each object has a distinct set of performance metrics.
13000 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13001
13002 Metric data are collected at the specified intervals and are retained
13003 internally. The interval and the number of samples retained can be set
13004 with <link to="IPerformanceCollector::setupMetrics" />.
13005
13006 Metrics are organized hierarchically, each level separated by slash (/).
13007 General scheme for metric name is
13008 "Category/Metric[/SubMetric][:aggregation]". For example CPU/Load/User:avg
13009 metric name stands for: CPU category, Load metric, User submetric, average
13010 aggregate. An aggregate function is computed over all retained data. Valid
13011 aggregate functions are:
13012
13013 <ul>
13014 <li>avg -- average</li>
13015 <li>min -- minimum</li>
13016 <li>max -- maximum</li>
13017 </ul>
13018
13019 "Category/Metric" together form base metric name. A base metric is the
13020 smallest unit for which a sampling interval and the number of retained
13021 samples can be set. Only base metrics can be enabled and disabled. All
13022 sub-metrics are collected when their base metric is collected.
13023 Collected values for any set of sub-metrics can be queried with
13024 <link to="IPerformanceCollector::queryMetricsData" />. When setting up
13025 metric parameters, querying metric data, enabling or disabling metrics
13026 wildcards can be used in metric names to specify a subset of metrics. For
13027 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13028 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13029 values without aggregates <tt>*:</tt> can be used.
13030
13031 The valid names for base metrics are:
13032
13033 <ul>
13034 <li>CPU/Load</li>
13035 <li>CPU/MHz</li>
13036 <li>RAM/Usage</li>
13037 </ul>
13038
13039 The general sequence for collecting and retrieving the metrics is:
13040 <ul>
13041 <li>
13042 Obtain an instance of IPerformanceCollector with
13043 <link to="IVirtualBox::performanceCollector" />
13044 </li>
13045 <li>
13046 Allocate and populate an array with references to objects the metrics
13047 will be collected for. Use references to IHost and IMachine objects.
13048 </li>
13049 <li>
13050 Allocate and populate an array with base metric names the data will be
13051 collected for.
13052 </li>
13053 <li>
13054 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13055 metric data will be collected and stored.
13056 </li>
13057 <li>
13058 Wait for the data to get collected.
13059 </li>
13060 <li>
13061 Allocate and populate an array with references to objects the metric
13062 values will be queried for. You can re-use the object array used for
13063 setting base metrics.
13064 </li>
13065 <li>
13066 Allocate and populate an array with metric names the data will be
13067 collected for. Note that metric names differ from base metric names.
13068 </li>
13069 <li>
13070 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13071 have been collected so far are returned. Note that the values are still
13072 retained internally and data collection continues.
13073 </li>
13074 </ul>
13075
13076 For an example of usage refer to the following files in VirtualBox SDK:
13077 <ul>
13078 <li>
13079 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13080 </li>
13081 <li>
13082 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13083 </li>
13084 </ul>
13085 </desc>
13086
13087 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13088 <desc>
13089 Array of unique names of metrics.
13090
13091 This array represents all metrics supported by the performance
13092 collector. Individual objects do not necessarily support all of them.
13093 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13094 list of supported metrics for a particular object.
13095 </desc>
13096 </attribute>
13097
13098 <method name="getMetrics">
13099 <desc>
13100 Returns parameters of specified metrics for a set of objects.
13101 <note>
13102 @c Null metrics array means all metrics. @c Null object array means
13103 all existing objects.
13104 </note>
13105 </desc>
13106 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13107 <desc>
13108 Metric name filter. Currently, only a comma-separated list of metrics
13109 is supported.
13110 </desc>
13111 </param>
13112 <param name="objects" type="$unknown" dir="in" safearray="yes">
13113 <desc>
13114 Set of objects to return metric parameters for.
13115 </desc>
13116 </param>
13117 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13118 <desc>
13119 Array of returned metric parameters.
13120 </desc>
13121 </param>
13122 </method>
13123
13124 <method name="setupMetrics">
13125 <desc>
13126 Sets parameters of specified base metrics for a set of objects. Returns
13127 an array of <link to="IPerformanceMetric" /> describing the metrics have
13128 been affected.
13129 <note>
13130 @c Null or empty metric name array means all metrics. @c Null or empty
13131 object array means all existing objects. If metric name array contains
13132 a single element and object array contains many, the single metric
13133 name array element is applied to each object array element to form
13134 metric/object pairs.
13135 </note>
13136 </desc>
13137 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13138 <desc>
13139 Metric name filter. Comma-separated list of metrics with wildcard
13140 support.
13141 </desc>
13142 </param>
13143 <param name="objects" type="$unknown" dir="in" safearray="yes">
13144 <desc>
13145 Set of objects to setup metric parameters for.
13146 </desc>
13147 </param>
13148 <param name="period" type="unsigned long" dir="in">
13149 <desc>
13150 Time interval in seconds between two consecutive samples of performance
13151 data.
13152 </desc>
13153 </param>
13154 <param name="count" type="unsigned long" dir="in">
13155 <desc>
13156 Number of samples to retain in performance data history. Older samples
13157 get discarded.
13158 </desc>
13159 </param>
13160 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13161 <desc>
13162 Array of metrics that have been modified by the call to this method.
13163 </desc>
13164 </param>
13165 </method>
13166
13167 <method name="enableMetrics">
13168 <desc>
13169 Turns on collecting specified base metrics. Returns an array of
13170 <link to="IPerformanceMetric" /> describing the metrics have been
13171 affected.
13172 <note>
13173 @c Null or empty metric name array means all metrics. @c Null or empty
13174 object array means all existing objects. If metric name array contains
13175 a single element and object array contains many, the single metric
13176 name array element is applied to each object array element to form
13177 metric/object pairs.
13178 </note>
13179 </desc>
13180 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13181 <desc>
13182 Metric name filter. Comma-separated list of metrics with wildcard
13183 support.
13184 </desc>
13185 </param>
13186 <param name="objects" type="$unknown" dir="in" safearray="yes">
13187 <desc>
13188 Set of objects to enable metrics for.
13189 </desc>
13190 </param>
13191 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13192 <desc>
13193 Array of metrics that have been modified by the call to this method.
13194 </desc>
13195 </param>
13196 </method>
13197
13198 <method name="disableMetrics">
13199 <desc>
13200 Turns off collecting specified base metrics. Returns an array of
13201 <link to="IPerformanceMetric" /> describing the metrics have been
13202 affected.
13203 <note>
13204 @c Null or empty metric name array means all metrics. @c Null or empty
13205 object array means all existing objects. If metric name array contains
13206 a single element and object array contains many, the single metric
13207 name array element is applied to each object array element to form
13208 metric/object pairs.
13209 </note>
13210 </desc>
13211 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13212 <desc>
13213 Metric name filter. Comma-separated list of metrics with wildcard
13214 support.
13215 </desc>
13216 </param>
13217 <param name="objects" type="$unknown" dir="in" safearray="yes">
13218 <desc>
13219 Set of objects to disable metrics for.
13220 </desc>
13221 </param>
13222 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13223 <desc>
13224 Array of metrics that have been modified by the call to this method.
13225 </desc>
13226 </param>
13227 </method>
13228
13229 <method name="queryMetricsData">
13230 <desc>
13231 Queries collected metrics data for a set of objects.
13232
13233 The data itself and related metric information are returned in seven
13234 parallel and one flattened array of arrays. Elements of
13235 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13236 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13237 the same index describe one set of values corresponding to a single
13238 metric.
13239
13240 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13241 start and length of a sub-array is indicated by
13242 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13243 value for metric <tt>metricNames[i]</tt> is at
13244 <tt>returnData[returnIndices[i]]</tt>.
13245
13246 <note>
13247 @c Null or empty metric name array means all metrics. @c Null or empty
13248 object array means all existing objects. If metric name array contains
13249 a single element and object array contains many, the single metric
13250 name array element is applied to each object array element to form
13251 metric/object pairs.
13252 </note>
13253 <note>
13254 Data collection continues behind the scenes after call to
13255 @c queryMetricsData. The return data can be seen as the snapshot of
13256 the current state at the time of @c queryMetricsData call. The
13257 internally kept metric values are not cleared by the call. This makes
13258 possible querying different subsets of metrics or aggregates with
13259 subsequent calls. If periodic querying is needed it is highly
13260 suggested to query the values with @c interval*count period to avoid
13261 confusion. This way a completely new set of data values will be
13262 provided by each query.
13263 </note>
13264 </desc>
13265 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13266 <desc>
13267 Metric name filter. Comma-separated list of metrics with wildcard
13268 support.
13269 </desc>
13270 </param>
13271 <param name="objects" type="$unknown" dir="in" safearray="yes">
13272 <desc>
13273 Set of objects to query metrics for.
13274 </desc>
13275 </param>
13276 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13277 <desc>
13278 Names of metrics returned in @c returnData.
13279 </desc>
13280 </param>
13281 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13282 <desc>
13283 Objects associated with metrics returned in @c returnData.
13284 </desc>
13285 </param>
13286 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13287 <desc>
13288 Units of measurement for each returned metric.
13289 </desc>
13290 </param>
13291 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13292 <desc>
13293 Divisor that should be applied to return values in order to get
13294 floating point values. For example:
13295 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13296 will retrieve the floating point value of i-th sample of the first
13297 metric.
13298 </desc>
13299 </param>
13300 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13301 <desc>
13302 Sequence numbers of the first elements of value sequences of particular metrics
13303 returned in @c returnData. For aggregate metrics it is the sequence number of
13304 the sample the aggregate started calculation from.
13305 </desc>
13306 </param>
13307 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13308 <desc>
13309 Indices of the first elements of value sequences of particular metrics
13310 returned in @c returnData.
13311 </desc>
13312 </param>
13313 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13314 <desc>
13315 Lengths of value sequences of particular metrics.
13316 </desc>
13317 </param>
13318 <param name="returnData" type="long" dir="return" safearray="yes">
13319 <desc>
13320 Flattened array of all metric data containing sequences of values for
13321 each metric.
13322 </desc>
13323 </param>
13324 </method>
13325
13326 </interface>
13327
13328 <module name="VBoxSVC" context="LocalServer">
13329 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13330 namespace="virtualbox.org">
13331 <interface name="IVirtualBox" default="yes"/>
13332 </class>
13333 </module>
13334
13335 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13336 <class name="Session" uuid="3C02F46D-C9D2-4f11-A384-53F0CF917214"
13337 namespace="virtualbox.org">
13338 <interface name="ISession" default="yes"/>
13339 </class>
13340 </module>
13341
13342</library>
13343
13344</idl>
13345
13346<!-- 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